> 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/transit-digitization/integrate-d1-transit-api/api-reference/inbound-api-to-d1-transit/provisioning-and-management-api.md).

# Provisioning and Management API

### Download OpenAPI specification

[D1-Transit-API-IN-Provisioning-Management-oas3.yaml](https://openapi.gitbook.com/o/fwy1mtbRONGA2YDKDBr0/spec/D1-Transit-API-IN-Provisioning-Management-oas3.yaml)

## Prepare Push Provisioning Bundle

> API used for requesting D1 Transit to prepare a push provisioning bundle that is going to be provided by Transit Issuer mobile app to Digital Wallet SDK eventually.\<br/>\<br/> This request can be used in 3 different cases:\<br/>\
> &#x20;   1\) initial provisioning: in such case, Transit Issuer shall neither provide cardAccountId nor digitalCardId. D1 Transit will create and return these identifiers in the response.\<br/>\
> &#x20;   2\) retry failed provisioning: in case of provisioning failure, Transit Issuer may retry the provisioning, assuming there was no refund/cancellation of customer card account.\<br/>\
> &#x20;   In such case, both cardAccountId and digitalCardId shall be provided.\<br/>\
> &#x20;   3\) restoring an existing cardAccount: in such case, Transit Issuer shall provide cardAccountId only. D1 Transit will assign new digitalCardId and return it along with cardAccountId in the response.\<br/>

```json
{"openapi":"3.1.0","info":{"title":"D1 Transit Inbound API","version":"1.0"},"servers":[{"url":"https://THALES-PROD/d1/transit/api/v1","description":"Prod URL"},{"url":"https://THALES-STG/d1/transit/api/v1","description":"Staging URL"}],"paths":{"/issuers/{issuerId}/wallets/{walletIndicator}/preparePushProvisioningBundle":{"post":{"summary":"Prepare Push Provisioning Bundle","description":"API used for requesting D1 Transit to prepare a push provisioning bundle that is going to be provided by Transit Issuer mobile app to Digital Wallet SDK eventually.<br/><br/> This request can be used in 3 different cases:<br/>\n    1) initial provisioning: in such case, Transit Issuer shall neither provide cardAccountId nor digitalCardId. D1 Transit will create and return these identifiers in the response.<br/>\n    2) retry failed provisioning: in case of provisioning failure, Transit Issuer may retry the provisioning, assuming there was no refund/cancellation of customer card account.<br/>\n    In such case, both cardAccountId and digitalCardId shall be provided.<br/>\n    3) restoring an existing cardAccount: in such case, Transit Issuer shall provide cardAccountId only. D1 Transit will assign new digitalCardId and return it along with cardAccountId in the response.<br/>","operationId":"preparePushProvisioningBundle","parameters":[{"$ref":"#/components/parameters/issuerId"},{"$ref":"#/components/parameters/walletIndicator"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreparePushProvisioningBundleReq"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreparePushProvisioningBundleRes"}}}},"500":{"$ref":"#/components/responses/error500"},"503":{"$ref":"#/components/responses/error503"}}}}},"components":{"parameters":{"issuerId":{"name":"issuerId","in":"path","description":"Issuer unique identifier. Assigned by Thales during onboarding.","required":true,"schema":{"type":"string","maxLength":10}},"walletIndicator":{"name":"walletIndicator","in":"path","description":"Indicates which digital wallet is involved in the use case.\n|Value|Description|\n|---|---|\n|1|Apple|\n|2|Google|\n|3|Samsung|        ","required":true,"schema":{"type":"number"}}},"schemas":{"PreparePushProvisioningBundleReq":{"type":"object","properties":{"requestContext":{"$ref":"#/components/schemas/requestContext"},"cardAccountId":{"$ref":"#/components/schemas/cardAccountId"},"digitalCardId":{"$ref":"#/components/schemas/digitalCardId"},"pushDetails":{"description":"pushDetails shall be consistent with the 'wallet indicator' parameter.<br/>\nI.e. ApplePushDetails shall be provided when 'wallet indicator' = 1, GooglePushDetails shall be provided when 'wallet indicator' = 2","oneOf":[{"$ref":"#/components/schemas/ApplePushDetails"},{"$ref":"#/components/schemas/GooglePushDetails"}]}},"required":["requestContext","pushDetails"]},"requestContext":{"type":"object","properties":{"requestId":{"type":"string","description":"Request unique identifier. Should be different for every retry.","maxLength":64},"correlationId":{"type":"string","description":"Random identifier which can be used to correlate the different API calls done as part of a usecase.\nThere is no strong guarantee of the uniqueness of this identifier, so it should not be used for purposes other than logging and troubleshooting.","maxLength":64}},"required":["requestId","correlationId"]},"cardAccountId":{"type":"string","description":"Card account unique identifier","maxLength":64},"digitalCardId":{"type":"string","description":"Digital card unique identifier","maxLength":64},"ApplePushDetails":{"type":"object","title":"ApplePushDetails","properties":{"certificates":{"type":"array","description":"Leaf and intermediate certificates provided by Apple's servers.<br/>They're retrieved by the transit issuer app using <a href=\"https://developer.apple.com/documentation/passkit/pkaddpaymentpassviewcontroller\">PKAddPaymentPassViewController</a>\n","items":{"type":"string"}},"nonce":{"type":"string","description":"A one-time nonce value generated by Apple's servers.<br/>It's retrieved by the transit issuer app using <a href=\"https://developer.apple.com/documentation/passkit/pkaddpaymentpassviewcontroller\">PKAddPaymentPassViewController</a>\n"},"nonceSignature":{"type":"string","description":"A device-specific signature for the nonce.<br/>It's retrieved by the transit issuer app using <a href=\"https://developer.apple.com/documentation/passkit/pkaddpaymentpassviewcontroller\">PKAddPaymentPassViewController</a>\n"}},"required":["certificates","nonce","nonceSignature"]},"GooglePushDetails":{"type":"object","title":"GooglePushDetails","properties":{"walletId":{"type":"string","description":"Identifier of the active Google Wallet.<br/>It's retrieved by the transit issuer app using <a href=\"https://developers.google.com/pay/issuers/apis/push-provisioning/android/reading-wallet#getactivewalletid\">getActiveWalletId</a> TapAndPay function.\n"}},"required":["walletId"]},"PreparePushProvisioningBundleRes":{"type":"object","properties":{"responseContext":{"$ref":"#/components/schemas/responseContext"},"cardAccountId":{"$ref":"#/components/schemas/cardAccountId","description":"Unique identifier of an account.<br/>Not provided in case of error.\n"},"digitalCardId":{"$ref":"#/components/schemas/digitalCardId","description":"Unique identifier of a digital card.<br/>Not provided in case of error.\n"},"pushProvisioningBundle":{"type":"string","description":"Bundle generated as per Digital Wallet format specified in the\nrequest.<br/>It shall be used by the transit issuer app to trigger\nthe provisioning.\n\n\n**Apple format**<br/>\n\nThis is the string representation of JSON object defined as below:\n\n|Parameter name|Type|Description|\n|-------|-------|-------|\n|activationData|string|See https://developer.apple.com/documentation/passkit/pkaddpaymentpassrequest/activationdata|\n|encryptedPassData|string|See https://developer.apple.com/documentation/passkit/pkaddpaymentpassrequest/encryptedpassdata|\n|ephemeralPublicKey|string|See https://developer.apple.com/documentation/passkit/pkaddpaymentpassrequest/ephemeralpublickey|\n\n\n**Google format**<br/>\n\nThis is the OpaquePaymentCard (OPC) as described in\nhttps://developers.google.com/pay/issuers/apis/push-provisioning/android/wallet-operations\n\n\nNot provided in case of error.                   \n"}},"required":["responseContext"]},"responseContext":{"type":"object","description":"Should be used for most of responses, even if the request processing was not successful.\nIf there was an issue encountered during request processing, the statusCode and statusMessage are used to give more details about what has gone wrong.\n","properties":{"requestId":{"type":"string","description":"requestId value from the corresponding request.","maxLength":64},"statusCode":{"type":"number"},"statusMessage":{"type":"string"}},"required":["requestId","statusCode"]}},"responses":{"error500":{"description":"An unexpected error occurred while processing the request.<br/>\nThe request cannot be retried.<br/>\nOnly used in cases where it's not be possible to provide more information about what went wrong with the request (i.e. return <b>HTTP 200</b> with '<b>responseContext</b>').\n"},"error503":{"description":"Indicates that the system is unavailable.<br/>\nThe request can be retried.\n"}}}}
```

## Cancel Card Account

> API used for cancelling a card account.\<br/>Card Account will be removed from Digital Wallet systems as well.

```json
{"openapi":"3.1.0","info":{"title":"D1 Transit Inbound API","version":"1.0"},"servers":[{"url":"https://THALES-PROD/d1/transit/api/v1","description":"Prod URL"},{"url":"https://THALES-STG/d1/transit/api/v1","description":"Staging URL"}],"paths":{"/issuers/{issuerId}/wallets/{walletIndicator}/cancelCardAccount":{"post":{"summary":"Cancel Card Account","description":"API used for cancelling a card account.<br/>Card Account will be removed from Digital Wallet systems as well.","operationId":"cancelCardAccount","parameters":[{"$ref":"#/components/parameters/issuerId"},{"$ref":"#/components/parameters/walletIndicator"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelCardAccountReq"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelCardAccountRes"}}}},"500":{"$ref":"#/components/responses/error500"},"503":{"$ref":"#/components/responses/error503"}}}}},"components":{"parameters":{"issuerId":{"name":"issuerId","in":"path","description":"Issuer unique identifier. Assigned by Thales during onboarding.","required":true,"schema":{"type":"string","maxLength":10}},"walletIndicator":{"name":"walletIndicator","in":"path","description":"Indicates which digital wallet is involved in the use case.\n|Value|Description|\n|---|---|\n|1|Apple|\n|2|Google|\n|3|Samsung|        ","required":true,"schema":{"type":"number"}}},"schemas":{"CancelCardAccountReq":{"type":"object","properties":{"requestContext":{"$ref":"#/components/schemas/requestContext"},"cardAccountId":{"$ref":"#/components/schemas/cardAccountId"}},"required":["requestContext","cardAccountId"]},"requestContext":{"type":"object","properties":{"requestId":{"type":"string","description":"Request unique identifier. Should be different for every retry.","maxLength":64},"correlationId":{"type":"string","description":"Random identifier which can be used to correlate the different API calls done as part of a usecase.\nThere is no strong guarantee of the uniqueness of this identifier, so it should not be used for purposes other than logging and troubleshooting.","maxLength":64}},"required":["requestId","correlationId"]},"cardAccountId":{"type":"string","description":"Card account unique identifier","maxLength":64},"CancelCardAccountRes":{"type":"object","properties":{"responseContext":{"$ref":"#/components/schemas/responseContext"}},"required":["responseContext"]},"responseContext":{"type":"object","description":"Should be used for most of responses, even if the request processing was not successful.\nIf there was an issue encountered during request processing, the statusCode and statusMessage are used to give more details about what has gone wrong.\n","properties":{"requestId":{"type":"string","description":"requestId value from the corresponding request.","maxLength":64},"statusCode":{"type":"number"},"statusMessage":{"type":"string"}},"required":["requestId","statusCode"]}},"responses":{"error500":{"description":"An unexpected error occurred while processing the request.<br/>\nThe request cannot be retried.<br/>\nOnly used in cases where it's not be possible to provide more information about what went wrong with the request (i.e. return <b>HTTP 200</b> with '<b>responseContext</b>').\n"},"error503":{"description":"Indicates that the system is unavailable.<br/>\nThe request can be retried.\n"}}}}
```

## Get Card Account Info

> API used for getting card account information.

```json
{"openapi":"3.1.0","info":{"title":"D1 Transit Inbound API","version":"1.0"},"servers":[{"url":"https://THALES-PROD/d1/transit/api/v1","description":"Prod URL"},{"url":"https://THALES-STG/d1/transit/api/v1","description":"Staging URL"}],"paths":{"/issuers/{issuerId}/wallets/{walletIndicator}/getCardAccountInfo":{"post":{"summary":"Get Card Account Info","description":"API used for getting card account information.","operationId":"getCardAccountInfo","parameters":[{"$ref":"#/components/parameters/issuerId"},{"$ref":"#/components/parameters/walletIndicator"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCardAccountInfoReq"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCardAccountInfoRes"}}}},"500":{"$ref":"#/components/responses/error500"},"503":{"$ref":"#/components/responses/error503"}}}}},"components":{"parameters":{"issuerId":{"name":"issuerId","in":"path","description":"Issuer unique identifier. Assigned by Thales during onboarding.","required":true,"schema":{"type":"string","maxLength":10}},"walletIndicator":{"name":"walletIndicator","in":"path","description":"Indicates which digital wallet is involved in the use case.\n|Value|Description|\n|---|---|\n|1|Apple|\n|2|Google|\n|3|Samsung|        ","required":true,"schema":{"type":"number"}}},"schemas":{"GetCardAccountInfoReq":{"type":"object","properties":{"requestContext":{"$ref":"#/components/schemas/requestContext"},"cardAccountId":{"$ref":"#/components/schemas/cardAccountId"}},"required":["requestContext","cardAccountId"]},"requestContext":{"type":"object","properties":{"requestId":{"type":"string","description":"Request unique identifier. Should be different for every retry.","maxLength":64},"correlationId":{"type":"string","description":"Random identifier which can be used to correlate the different API calls done as part of a usecase.\nThere is no strong guarantee of the uniqueness of this identifier, so it should not be used for purposes other than logging and troubleshooting.","maxLength":64}},"required":["requestId","correlationId"]},"cardAccountId":{"type":"string","description":"Card account unique identifier","maxLength":64},"GetCardAccountInfoRes":{"type":"object","properties":{"responseContext":{"$ref":"#/components/schemas/responseContext"},"cardAccountState":{"$ref":"#/components/schemas/cardAccountState"},"userId":{"$ref":"#/components/schemas/userId"},"digitalCards":{"type":"array","description":"list of digital cards linked to the card account.","items":{"type":"object","properties":{"digitalCardId":{"$ref":"#/components/schemas/digitalCardId"},"digitalCardState":{"$ref":"#/components/schemas/digitalCardState"},"walletId":{"$ref":"#/components/schemas/walletId"},"deviceType":{"$ref":"#/components/schemas/deviceType"},"csn":{"$ref":"#/components/schemas/csn"}},"required":["digitalCardId","digitalCardState","walletId"]}}},"required":["responseContext"]},"responseContext":{"type":"object","description":"Should be used for most of responses, even if the request processing was not successful.\nIf there was an issue encountered during request processing, the statusCode and statusMessage are used to give more details about what has gone wrong.\n","properties":{"requestId":{"type":"string","description":"requestId value from the corresponding request.","maxLength":64},"statusCode":{"type":"number"},"statusMessage":{"type":"string"}},"required":["requestId","statusCode"]},"cardAccountState":{"type":"string","enum":["active","cancelled","parked"],"description":"Card account state"},"userId":{"type":"string","description":"User unique identifier","maxLength":64},"digitalCardId":{"type":"string","description":"Digital card unique identifier","maxLength":64},"digitalCardState":{"type":"string","enum":["created","failed_provisioning","active","deleted","unlinked","suspended_wallet","suspended_issuer"],"description":"Digital card state"},"walletId":{"type":"string","description":"Wallet unique identifier.<br/>Corresponds to unique device identifier for Apple and Samsung.<br/>Corresponds to unique identifier assigned for a given user and device for Google.","maxLength":64},"deviceType":{"type":"number","description":"Device type.\n|value|description|\n|-------|-------|\n|1|Phone|\n|2|Tablet|\n|3|Watch|\n|4-99|RFU|\n"},"csn":{"type":"string","description":"Calypso serial number.<br/>Applicable for Calypso technology only.","maxLength":16}},"responses":{"error500":{"description":"An unexpected error occurred while processing the request.<br/>\nThe request cannot be retried.<br/>\nOnly used in cases where it's not be possible to provide more information about what went wrong with the request (i.e. return <b>HTTP 200</b> with '<b>responseContext</b>').\n"},"error503":{"description":"Indicates that the system is unavailable.<br/>\nThe request can be retried.\n"}}}}
```

## Manage Digital Card

> API used for managing the state of a digital card provisioned into a device.

```json
{"openapi":"3.1.0","info":{"title":"D1 Transit Inbound API","version":"1.0"},"servers":[{"url":"https://THALES-PROD/d1/transit/api/v1","description":"Prod URL"},{"url":"https://THALES-STG/d1/transit/api/v1","description":"Staging URL"}],"paths":{"/issuers/{issuerId}/wallets/{walletIndicator}/manageDigitalCard":{"post":{"summary":"Manage Digital Card","description":"API used for managing the state of a digital card provisioned into a device.","operationId":"manageDigitalCard","parameters":[{"$ref":"#/components/parameters/issuerId"},{"$ref":"#/components/parameters/walletIndicator"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManageDigitalCardReq"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManageDigitalCardRes"}}}},"500":{"$ref":"#/components/responses/error500"},"503":{"$ref":"#/components/responses/error503"}}}}},"components":{"parameters":{"issuerId":{"name":"issuerId","in":"path","description":"Issuer unique identifier. Assigned by Thales during onboarding.","required":true,"schema":{"type":"string","maxLength":10}},"walletIndicator":{"name":"walletIndicator","in":"path","description":"Indicates which digital wallet is involved in the use case.\n|Value|Description|\n|---|---|\n|1|Apple|\n|2|Google|\n|3|Samsung|        ","required":true,"schema":{"type":"number"}}},"schemas":{"ManageDigitalCardReq":{"type":"object","properties":{"requestContext":{"$ref":"#/components/schemas/requestContext"},"digitalCardId":{"$ref":"#/components/schemas/digitalCardId"},"cardAccountId":{"$ref":"#/components/schemas/cardAccountId"},"action":{"type":"string","enum":["unlink","suspend","resume"]}},"required":["requestContext","digitalCardId","cardAccountId","action"]},"requestContext":{"type":"object","properties":{"requestId":{"type":"string","description":"Request unique identifier. Should be different for every retry.","maxLength":64},"correlationId":{"type":"string","description":"Random identifier which can be used to correlate the different API calls done as part of a usecase.\nThere is no strong guarantee of the uniqueness of this identifier, so it should not be used for purposes other than logging and troubleshooting.","maxLength":64}},"required":["requestId","correlationId"]},"digitalCardId":{"type":"string","description":"Digital card unique identifier","maxLength":64},"cardAccountId":{"type":"string","description":"Card account unique identifier","maxLength":64},"ManageDigitalCardRes":{"type":"object","properties":{"responseContext":{"$ref":"#/components/schemas/responseContext"}},"required":["responseContext"]},"responseContext":{"type":"object","description":"Should be used for most of responses, even if the request processing was not successful.\nIf there was an issue encountered during request processing, the statusCode and statusMessage are used to give more details about what has gone wrong.\n","properties":{"requestId":{"type":"string","description":"requestId value from the corresponding request.","maxLength":64},"statusCode":{"type":"number"},"statusMessage":{"type":"string"}},"required":["requestId","statusCode"]}},"responses":{"error500":{"description":"An unexpected error occurred while processing the request.<br/>\nThe request cannot be retried.<br/>\nOnly used in cases where it's not be possible to provide more information about what went wrong with the request (i.e. return <b>HTTP 200</b> with '<b>responseContext</b>').\n"},"error503":{"description":"Indicates that the system is unavailable.<br/>\nThe request can be retried.\n"}}}}
```


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.payments.thalescloud.io/transit-digitization/integrate-d1-transit-api/api-reference/inbound-api-to-d1-transit/provisioning-and-management-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
