> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/home/card-creation-and-management/d1-api-sumuray/inbound-api-to-d1/card-api.md).

# Card API

## Create and order a physical card

> This request is used by the bank backend to create a physical card and trigger its production order.\
> The card creation registers the card with the processor (CMS and D1 Card Manager).\
> The production order is sent to the personalization center based on the \`distributionChannel\`:\
> \- \`THALES\`: Thales personalization center — requires \`shipment\`\
> \- \`INSTANT\`: Instant issuance in branch — requires \`persoStation\`, no shipment\
> \- \`CENTRAL\`: Bank or partner center — requires \`persoCenter\` and \`shipment\`<br>

```json
{"openapi":"3.0.0","info":{"title":"D1 Inbound Physical Card API","version":"2.0"},"tags":[{"name":"Card","description":"Card APIs."}],"servers":[{"url":"https://api.d1.thalescloud.io/banking","description":"Production server"},{"url":"https://api.d1-stg.thalescloud.io/banking","description":"Staging server"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"A JWT generated by the [Get Authorization Token API](oauth2-api).<br/>The server checks the validity of the provided token to control access to this protected resource. Please refer to [Get OAuth 2.0 access token](../../../integrate-the-d1-api/get-oauth-2.0-access-token) for more details on the flow and on how to get this JWT.","type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"createAndOrderPhysicalCardRequest":{"oneOf":[{"$ref":"#/components/schemas/physicalCardRequestThales"},{"$ref":"#/components/schemas/physicalCardRequestInstant"},{"$ref":"#/components/schemas/physicalCardRequestCentral"}]},"physicalCardRequestThales":{"title":"distributionChannel = THALES","additionalProperties":false,"type":"object","required":["distributionChannel","consumerId","cardProductId","name","accountList","services","shipment"],"properties":{"distributionChannel":{"type":"string","description":"Channel used to personalize the card","enum":["THALES"]},"consumerId":{"$ref":"#/components/schemas/consumerId"},"cardProductId":{"$ref":"#/components/schemas/cardProductId"},"name":{"type":"string","minLength":0,"maxLength":26,"pattern":"^[a-zA-Z. -]{0,26}$","description":"Name of the card holder as it will be embossed on the card."},"secondName":{"type":"string","minLength":0,"maxLength":26,"pattern":"^[a-zA-Z. -]{0,26}$","description":"Optional second card holder name as it will be embossed on the card under the first card holder name."},"accountList":{"type":"array","description":"List of accounts the card will be attached to.","items":{"$ref":"#/components/schemas/AccountInformation"}},"issuerRequestId":{"type":"string","description":"Identifier provided by the issuer to identify the card production request.","pattern":"^[a-zA-Z0-9_-]{1,64}$"},"services":{"$ref":"#/components/schemas/physicalServices"},"cardDesign":{"$ref":"#/components/schemas/physicalCardDesign"},"cardCarrierConfig":{"$ref":"#/components/schemas/physicalCardCarrierConfig"},"packagingConfig":{"$ref":"#/components/schemas/physicalPackagingConfig"},"shipment":{"$ref":"#/components/schemas/physicalShipment"}}},"consumerId":{"type":"string","description":"Unique identifier of the consumer. ","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]{1,64}$"},"cardProductId":{"type":"string","description":"Unique identifier of the type of card ( defined during the onboarding of D1)","minLength":1,"maxLength":48,"pattern":"^[A-Za-z0-9_-]{1,48}$"},"AccountInformation":{"additionalProperties":false,"type":"object","required":["default","number","currencyCode"],"properties":{"default":{"type":"boolean","description":"true if the account is the default consumer account"},"type":{"type":"string","description":"Type of the Account. By default if not provided, it is a 'CHECKING' account.","enum":["CHECKING","SAVINGS"]},"number":{"type":"string","minLength":2,"maxLength":24,"pattern":"^[a-zA-Z0-9_]{2,24}$","description":"Account number used for posting to Core Banking System"},"currencyCode":{"$ref":"#/components/schemas/currencyCode"}}},"currencyCode":{"type":"string","pattern":"^[A-Z]{3}$","description":"Currency Code in ISO 4217 alpha code format"},"physicalServices":{"additionalProperties":false,"type":"object","properties":{"priority":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,64}$","description":"The level of priority agreed for the card production. Value must be one of the identifiers configured during onboarding."},"delivery":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,64}$","default":"NO_SHIPMENT","description":"The shipment method. Value must be one of the identifiers configured during onboarding."},"packaging":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,64}$","default":"NO_PACK","description":"Unique identifier of the packaging. Value must be one of the identifiers configured during onboarding."},"cardCarrier":{"type":"string","default":"NO_CARRIER","pattern":"^[a-zA-Z0-9_-]{1,64}$","description":"Unique identifier of the card carrier. Value must be one of the identifiers configured during onboarding."},"pinMailer":{"type":"boolean","default":false,"description":"Enable the option to send the PIN value to the consumer via post mail."},"alphaCard":{"type":"boolean","default":false,"description":"Enable the option to produce a sample card in the production environment."}}},"physicalCardDesign":{"additionalProperties":false,"type":"object","properties":{"images":{"description":"List of additional images that can be printed on the card.","type":"array","minItems":0,"maxItems":5,"default":[],"items":{"type":"string","pattern":"^[A-Za-z0-9_.\\-\\\\\\/%\\^?=]{0,64}$"}},"customLines":{"description":"List of additional texts that can be printed on the card.","type":"array","minItems":0,"maxItems":10,"default":[],"items":{"type":"string","pattern":"^[\\p{L}\\p{N}@ ,.'\\'_#;:\\\\/\\-?=%\\^+&]{0,256}$"}},"artworkId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Unique identifier of the physical card artwork."},"memberId":{"type":"string","description":"MemberId printed onto the card.","pattern":"^[A-Za-z0-9_\\\\\\/.+-]{1,48}$"}}},"physicalCardCarrierConfig":{"additionalProperties":false,"type":"object","properties":{"language":{"description":"The language of the card carrier, based on ISO 639-1 alpha-2 format.","type":"string","minLength":2,"maxLength":2,"pattern":"^[A-Z]{2}$"},"images":{"description":"List of additional images that can be printed on the card carrier.","type":"array","minItems":0,"maxItems":5,"default":[],"items":{"type":"string","pattern":"^[A-Za-z0-9_.\\-\\\\\\/%\\^?=]{0,64}$"}},"customLines":{"description":"List of additional texts that can be printed on the card carrier.","type":"array","minItems":0,"maxItems":10,"default":[],"items":{"type":"string","pattern":"^[\\p{L}\\p{N}@ ,.'\\'_#;:\\\\/\\-?=%\\^+&]{0,256}$"}},"multiCardId":{"description":"All the cards with the same identifier will be grouped on the same card carrier.","type":"string","minLength":1,"maxLength":48,"pattern":"^[A-Za-z0-9_-]{1,48}$"},"multiCardOrder":{"description":"Order of the card on the carrier, compared to other cards.","type":"string","minLength":1,"maxLength":2,"pattern":"^[0-9]{1,2}$"}}},"physicalPackagingConfig":{"additionalProperties":false,"type":"object","properties":{"inserts":{"type":"array","minItems":0,"maxItems":10,"items":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,48}$"},"description":"List of inserts. Each insert must be a unique identifier."}}},"physicalShipment":{"oneOf":[{"$ref":"#/components/schemas/physicalShipmentIndividual"},{"$ref":"#/components/schemas/physicalShipmentBulk"}]},"physicalShipmentIndividual":{"title":"type = INDIVIDUAL","additionalProperties":false,"type":"object","required":["type","deliveryAddress"],"properties":{"type":{"type":"string","enum":["INDIVIDUAL"],"description":"Send the card individually to the consumer's address."},"deliveryAddress":{"description":"The recipient's address.","$ref":"#/components/schemas/physicalAddress"}}},"physicalAddress":{"additionalProperties":false,"type":"object","required":["lastName","line1","zipCode","city","countryCode"],"properties":{"title":{"type":"string","description":"The title.","minLength":1,"maxLength":40,"pattern":"^[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,40}$"},"firstName":{"type":"string","description":"The first name.","minLength":1,"maxLength":40,"pattern":"^[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,40}$"},"lastName":{"type":"string","description":"The last name.","minLength":1,"maxLength":40,"pattern":"^[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,40}$"},"companyName":{"type":"string","description":"The name of the company.","minLength":1,"maxLength":64,"pattern":"^[\\p{L}\\p{N}\\p{M} '_#;:.,-\\/+&]{1,64}$"},"line1":{"type":"string","description":"The first line of the address.","minLength":1,"maxLength":64,"pattern":"^[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,64}$"},"line2":{"type":"string","description":"The second line of the address.","minLength":1,"maxLength":64,"pattern":"^[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,64}$"},"line3":{"type":"string","description":"The third line of the address.","minLength":1,"maxLength":64,"pattern":"^[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,64}$"},"city":{"type":"string","description":"The city name.","minLength":1,"maxLength":32,"pattern":"^[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,32}$"},"state":{"type":"string","description":"The state.","minLength":1,"maxLength":30,"pattern":"^[\\p{L}\\p{N}\\p{M} ,.'_#;:\\/-]{1,30}$"},"zipCode":{"type":"string","description":"The postal code or ZIP Code.","minLength":1,"maxLength":10,"pattern":"^[0-9A-Z- ]{1,10}$"},"countryCode":{"type":"string","description":"The country code, based on ISO 3166-1 alpha-2 format","minLength":2,"maxLength":2,"pattern":"^[A-Z]{2}$"},"mobilePhoneNumber":{"type":"object","required":["countryCode","phoneNumber"],"description":"International phone number, used for card shipment contact purpose.","properties":{"countryCode":{"type":"string","description":"The country calling code.","minLength":2,"maxLength":11,"pattern":"^\\+[0-9]{1,10}$"},"phoneNumber":{"type":"string","description":"The local phone number.","minLength":1,"maxLength":14,"pattern":"^[0-9]{1,14}$"}}},"email":{"type":"string","description":"The email, used for card shipment contact purpose.","minLength":1,"maxLength":255,"pattern":"^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,15}$"}}},"physicalShipmentBulk":{"title":"type = BULK","additionalProperties":false,"type":"object","required":["type","deliveryAddress"],"properties":{"type":{"type":"string","enum":["BULK"],"description":"Send the card in bulk to an agency. All cards with the same delivery address shipped the same day will be grouped together automatically.\n"},"deliveryAddress":{"description":"The recipient's address.","$ref":"#/components/schemas/physicalAddress"},"individualAddress":{"description":"The consumer address. Required only for BULK + card carrier required.","$ref":"#/components/schemas/physicalAddress"},"groupId":{"type":"string","minLength":1,"maxLength":64,"description":"First level of grouping for BULK shipment. All cards with the same groupId will be put in the same box."},"orderId":{"type":"string","minLength":1,"maxLength":64,"description":"Second level of grouping for BULK shipment. All cards with the same orderId will be put together."}}},"physicalCardRequestInstant":{"title":"distributionChannel = INSTANT","additionalProperties":false,"type":"object","required":["distributionChannel","consumerId","cardProductId","name","accountList","services","persoStation"],"properties":{"distributionChannel":{"type":"string","description":"Channel used to personalize the card","enum":["INSTANT"]},"consumerId":{"$ref":"#/components/schemas/consumerId"},"cardProductId":{"$ref":"#/components/schemas/cardProductId"},"name":{"type":"string","minLength":0,"maxLength":26,"pattern":"^[a-zA-Z. -]{0,26}$","description":"Name of the card holder as it will be embossed on the card."},"secondName":{"type":"string","minLength":0,"maxLength":26,"pattern":"^[a-zA-Z. -]{0,26}$","description":"Optional second card holder name as it will be embossed on the card under the first card holder name."},"accountList":{"type":"array","description":"List of accounts the card will be attached to.","items":{"$ref":"#/components/schemas/AccountInformation"}},"persoStation":{"type":"string","description":"Unique identifier of the station used for card personalization.","pattern":"^[a-zA-Z0-9_-]{1,64}$"},"services":{"$ref":"#/components/schemas/physicalServices"},"cardDesign":{"$ref":"#/components/schemas/physicalCardDesign"},"cardCarrierConfig":{"$ref":"#/components/schemas/physicalCardCarrierConfig"}}},"physicalCardRequestCentral":{"title":"distributionChannel = CENTRAL","additionalProperties":false,"type":"object","required":["distributionChannel","consumerId","cardProductId","name","accountList","services","shipment"],"properties":{"distributionChannel":{"type":"string","description":"Channel used to personalize the card","enum":["CENTRAL"]},"consumerId":{"$ref":"#/components/schemas/consumerId"},"cardProductId":{"$ref":"#/components/schemas/cardProductId"},"name":{"type":"string","minLength":0,"maxLength":26,"pattern":"^[a-zA-Z. -]{0,26}$","description":"Name of the card holder as it will be embossed on the card."},"secondName":{"type":"string","minLength":0,"maxLength":26,"pattern":"^[a-zA-Z. -]{0,26}$","description":"Optional second card holder name as it will be embossed on the card under the first card holder name."},"accountList":{"type":"array","description":"List of accounts the card will be attached to.","items":{"$ref":"#/components/schemas/AccountInformation"}},"persoCenter":{"type":"string","description":"Unique identifier of the personalization center.","pattern":"^[a-zA-Z0-9_-]{1,64}$"},"services":{"$ref":"#/components/schemas/physicalServices"},"cardDesign":{"$ref":"#/components/schemas/physicalCardDesign"},"cardCarrierConfig":{"$ref":"#/components/schemas/physicalCardCarrierConfig"},"shipment":{"$ref":"#/components/schemas/physicalShipment"}}},"createAndOrderPhysicalCardResponse":{"type":"object","required":["cardId","operationId"],"properties":{"cardId":{"$ref":"#/components/schemas/cardId"},"operationId":{"$ref":"#/components/schemas/operationId"}}},"cardId":{"type":"string","description":"Unique identifier of the card.","minLength":1,"maxLength":48,"pattern":"^[A-Za-z0-9_-]{1,48}$"},"operationId":{"type":"string","description":"Unique identifier of the operation","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]{1,64}$"},"errorGeneric":{"additionalProperties":false,"type":"object","description":"Generic error returned by the APIs.","properties":{"errorCode":{"type":"string","description":"The type of the error"},"error":{"type":"string","description":"Provide more error details if possible.<br/>For example name of the field with invalid format.<br/>This field is for troubleshooting purposes only, it can change at any time so MUST NOT be parsed, and is not supposed to be human readable so CANNOT be displayed to end users."}}}},"responses":{"ServiceUnavailableError":{"description":"The service is temporarily unavailable. You may retry your request later."}}},"paths":{"/v2/issuers/{issuerId}/cards/physical":{"post":{"summary":"Create and order a physical card","operationId":"createAndOrderPhysicalCard","tags":["Card"],"description":"This request is used by the bank backend to create a physical card and trigger its production order.\nThe card creation registers the card with the processor (CMS and D1 Card Manager).\nThe production order is sent to the personalization center based on the `distributionChannel`:\n- `THALES`: Thales personalization center — requires `shipment`\n- `INSTANT`: Instant issuance in branch — requires `persoStation`, no shipment\n- `CENTRAL`: Bank or partner center — requires `persoCenter` and `shipment`\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createAndOrderPhysicalCardRequest"}}}},"responses":{"201":{"description":"Successful physical card creation and production order submitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createAndOrderPhysicalCardResponse"}}}},"400":{"description":"Bad Request. Invalid request URI, header, or parameters. The below table defines the possible error:\n| errorCode | error | Retryable | Comments |\n| --- | --- | --- | --- |\n| - | - | no | No error details available |\n| FIELD_INVALID_FORMAT | Contains the field in error (first found) | no | JSON not well formatted or one field is not in expected format |\n| FIELD_INVALID_VALUE | Contains the field in error (first found) | no | One field value is not allowed for the given field |\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorGeneric"}}}},"401":{"description":"Unauthorized request, the provided Authorization header is missing or invalid.\n| errorCode | error | Retryable | Comments |\n| --- | --- | --- | --- |\n| AUTHORIZER_UNAUTHORIZED | Unauthorized message | no | Access token not valid |\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorGeneric"}}}},"403":{"description":"Forbidden action detected by WAF or the application.\n| errorCode | error | Retryable | Comments |\n| --- | --- | --- | --- |\n| - | - | no | No error details available |\n| AUTHORIZER_FORBIDDEN | not authorized error message | no | User is not authorized to access this resource |\n| CARD_CREATION_COUNT_EXCEEDED | - | no | The maximum number of cards for the consumer is reached |\n| OPERATION_NOT_ALLOWED | Name of the operation/field that is not allowed | no | Card creation is not allowed for this card product |\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorGeneric"}}}},"404":{"description":"Resource not found. Unknown issuerId or consumerId.\n| errorCode | error | Retryable | Comments |\n| --- | --- | --- | --- |\n| - | - | no | No error details available |\n| UNKNOWN_CONSUMER | - | no | Consumer does not exist |\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorGeneric"}}}},"500":{"description":"Internal Server Error.\n| errorCode | error | Retryable | Comments |\n| --- | --- | --- | --- |\n| - | - | yes | No error details available |\n| INTERNAL_ERROR | error details if any | no | The server has encountered an error when executing the request |\n| WRONG_CONFIGURATION | error details if any | no | At least one configuration is missing.  |\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorGeneric"}}}},"503":{"$ref":"#/components/responses/ServiceUnavailableError"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.payments.thalescloud.io/home/card-creation-and-management/d1-api-sumuray/inbound-api-to-d1/card-api.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
