openapi: 3.2.0 info: description: 'Endpoints for doing various actions connected to the Card entity. All date-time fields adhere to the ISO 8601 standard unless specified otherwise. For example: 2024-05-31T06:55:17Z' version: '1' title: Create Card API contact: name: Enfuce Financial Services url: https://enfuce.com email: info@enfuce.com servers: - url: https://api.{{tenant}}.ext-uat1-sandbox.mycore.enfuce.com/issuer description: UAT Sandbox - url: https://api.{{tenant}}.eu.live.prod.mycore.enfuce.com/issuer description: Production security: - bearerAuth: [] tags: - name: Create Card description: Endpoints for creating a card paths: /v1/cards: post: tags: - Create Card summary: Create Card description: Send a request to this endpoint to create a new card. operationId: createCard parameters: - $ref: '#/components/parameters/x-audit-user' - in: header name: x-idempotency-key required: false description: Idempotency key for the request. schema: type: string requestBody: required: true content: application/json: schema: oneOf: - $ref: '#/components/schemas/CreateCardBody' - $ref: '#/components/schemas/CreateMultiApplicationCardBody' responses: '201': description: Successful creation of new card. content: application/json: schema: oneOf: - $ref: '#/components/schemas/CardResponse' - $ref: '#/components/schemas/CreateMultiApplicationCardResponse' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalServerError' components: schemas: CardConfigurationType: type: string description: The type of card defined by this card configuration. enum: - DEBIT - CREDIT - COMBO example: CREDIT CreateCardBody: type: object title: Create Single Card properties: programId: allOf: - $ref: '#/components/schemas/Id' description: The program id that you want to associate with the new card you are creating. cardConfigurationCode: $ref: '#/components/schemas/CardConfigurationCode' pinStatus: $ref: '#/components/schemas/CreatePinStatus' cardholderId: allOf: - $ref: '#/components/schemas/Id' description: Unique identifier of the cardholder associated with the new card. expirationTime: $ref: '#/components/schemas/ExpirationTime' accountId: allOf: - $ref: '#/components/schemas/AccountId' description: Unique identifier of the account associated with the new card. plastic: $ref: '#/components/schemas/CreatePlasticBody' automaticRenewal: $ref: '#/components/schemas/AutomaticRenewal' digitalLayoutCode: $ref: '#/components/schemas/DigitalLayoutCode' additionalValues: $ref: '#/components/schemas/AdditionalValues' feeConfigId: $ref: '#/components/schemas/FeeConfigId' required: - programId - cardConfigurationCode - accountId CreateMultiApplicationCardResponse: type: object title: Create Multi-Application Card allOf: - $ref: '#/components/schemas/CardResponse' - type: object properties: cardApplications: type: array items: $ref: '#/components/schemas/CardResponse' required: - mainCardId default: [] Id: type: string format: uuid description: Unique identifier of a resource. example: 20218aae-b15e-406c-9e9f-23735cd86a48 AdditionalValues: type: object description: 'You can include up to **30 additional key-value pairs** in the embossing file sent to the card manufacturer. - **Keys** must follow the pattern: `^[a-zA-Z0-9-]{1,36}$` (only letters, numbers, and hyphens, with a maximum length of 36 characters). - **Values** must follow the pattern: `^[a-zA-Z0-9|\-_ +.@éàèùçâêîôûëïü''/=]{1,1000}$`. Enfuce **does not perform any additional validation** on these key-value pairs beyond ensuring they match the specified patterns. These fields are intended for **storing data without further processing**. If you need to store a **complex structure**, you can **base64 encode** the value. The encoded value will be passed as entered, without modifications. ⚠ **Important:** Any usage of these fields should be agreed upon with the manufacturer. ' maxProperties: 30 additionalProperties: type: string example: keyWithPlainTextValue: value1 keyWithBase64Value: dmFsdWUyYmFzZTY0ZW5jb2RlZA== CardVersionStatus: type: string description: '- ACTIVE - The card is completely operational. You can perform all actions with the card. - ACTIVE_LIMITED - The card version is usable for digital transactions only. Provisioning, token payments and e-commerce transactions are allowed, while physical entry modes (chip, contactless, magstripe and ATM) are declined. - INITIAL - The specific card version is awaiting activation. During this state, the card can have limited usage, such as being added to a digital wallet or cardholder can view the PIN (if it is a plastic card). However, in the INITIAL state, the card cannot be used for payments. - CLOSED - The previous versions of the card are no longer valid as a new version is activated or the card is closed. ' enum: - ACTIVE - ACTIVE_LIMITED - INITIAL - CLOSED example: ACTIVE ErrorResponse: type: object properties: type: description: The problem type. type: string title: description: The reason phrase of HttpStatus. type: string status: description: HTTP problem status. type: number detail: description: The problem detail. type: string instance: description: The request path. type: string id: description: Unique error identifier. type: string format: uuid timestamp: description: Date-time when error occurred. type: string format: date-time CardConfigurationCode: type: string description: A unique code to identify the card configuration. Max character limit is 36. example: MC_DEBIT_1 minLength: 1 maxLength: 36 pattern: ^[A-Za-z0-9_-]+$ CreateMultiApplicationCardBody: type: object title: Create Multi-Application Card properties: mainCard: title: MainCard type: object allOf: - $ref: '#/components/schemas/CreateCardBody' properties: multiApplicationProperties: $ref: '#/components/schemas/MultiApplicationProperties' cardApplications: type: array items: type: object properties: cardConfigurationCode: $ref: '#/components/schemas/CardConfigurationCode' pinStatus: $ref: '#/components/schemas/CreatePinStatus' accountId: allOf: - $ref: '#/components/schemas/AccountId' description: The account id that is connected to the card digitalLayoutCode: $ref: '#/components/schemas/DigitalLayoutCode' multiApplicationProperties: $ref: '#/components/schemas/MultiApplicationProperties' additionalValues: $ref: '#/components/schemas/AdditionalValues' feeConfigId: $ref: '#/components/schemas/FeeConfigId' required: - cardConfigurationCode - accountId title: CardApplication minItems: 1 title: CardApplications required: - mainCard - cardApplications CardStatus: type: string description: '- ACTIVE - Card is active and is enabled for normal usage. - BLOCKED - Card is temporarily blocked. - BLOCKED_SUSPECTED_FRAUD - Card is temporarily blocked due to suspected fraud. - CLOSED_DUE_TO_FRAUD - Card has been closed due to fraud. - CLOSED_LOST - Card has been closed due to being lost. - CLOSED_STOLEN - Card has been closed due to being stolen. - CLOSED - Card has been manually closed. - CLOSED_EXPIRED - Card has no active or initial card versions and cannot be used. ' enum: - ACTIVE - BLOCKED - BLOCKED_SUSPECTED_FRAUD - CLOSED_DUE_TO_FRAUD - CLOSED_LOST - CLOSED_STOLEN - CLOSED - CLOSED_EXPIRED example: ACTIVE CreatePinStatus: type: string description: '- GENERATED - This endpoint request would generate a random PIN for the new card. - WAITING - The card PIN would be set later. ' enum: - GENERATED - WAITING example: GENERATED Printed: type: boolean description: 'Indicates whether the specific card would be printed or not. Only applicable to multi-application cards. Otherwise, the request will return 400 Bad Request. ' example: true ExternalLayoutCode: type: string description: Unique code forwarded to the embossing house; the code identifies the plastic layout to be used for printing the new card. Ensure beforehand, the selected embossing house is aligned with the code used for each layout. minLength: 1 maxLength: 32 pattern: ^[a-zA-Z0-9-_]+$ example: 1 ChipEnabled: type: boolean description: 'Whether the card should be visible in card terminal or not. Only applicable to multi-application cards. Otherwise, the request will return 400 Bad Request. ' example: true EmbossingName: type: string description: The name to be embossed on the card. Max character limit is 26. minLength: 1 maxLength: 26 pattern: ^[A-Za-z0-9 /.,&+'\- ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹ ĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰű ŲųŴŵŶŷŸŹźŻżŽžſǪǫȘșȚțȪȫȮȯȲȳḐḑṢṣẞỌọ]+$ example: John Doe UpdateCount: type: integer description: The version number of the entity. example: 1 CardVersion: type: object properties: status: $ref: '#/components/schemas/CardVersionStatus' expirationTime: $ref: '#/components/schemas/ExpirationTime' renewalDate: $ref: '#/components/schemas/RenewalDate' sequenceNumber: $ref: '#/components/schemas/SequenceNumber' keySetId: $ref: '#/components/schemas/KeySetId' createdAt: $ref: '#/components/schemas/Created' updatedAt: $ref: '#/components/schemas/Updated' Plastic: type: object properties: embossingName: $ref: '#/components/schemas/EmbossingName' preferredCardAddress: $ref: '#/components/schemas/Address' preferredCardDeliveryType: $ref: '#/components/schemas/CardDeliveryType' preferredPinAddress: $ref: '#/components/schemas/Address' preferredPinDeliveryType: $ref: '#/components/schemas/PinDeliveryType' manufacturerId: $ref: '#/components/schemas/Id' externalLayoutCode: $ref: '#/components/schemas/ExternalLayoutCode' createdAt: $ref: '#/components/schemas/Created' updatedAt: $ref: '#/components/schemas/Updated' Address: type: object properties: address1: description: First line of address. type: string minLength: 1 maxLength: 255 pattern: ^(?!\s)(?!.*\s$).+(?