> 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-classic/api-reference/outgoing-api-to-tes/transit-api.md).

# Transit API

[TES-OUT-v1-transit.yaml](https://openapi.gitbook.com/o/fwy1mtbRONGA2YDKDBr0/spec/TES-OUT-v1-transit.yaml)

## Request to create a digital card account

> This method is used by TSH to request the creation of a digital card account to the TES.\</br> This request can come with a payment order which comprises a payment instrument and either the identifier of wallet card used or the wallet account used for the payment\</br> In this case, the TES is responsible for returning an order confirmation in the form of a purchase identifier in all cases where the user may be deducted money.\</br> The TES shall also create a new card account associated to a unique identifier. In case of stored value account, the card account identifier shall be the card iedntifier.

```json
{"openapi":"3.1.1","info":{"title":"Gemalto TSH Transit API - TSH to TES","version":"1.0.20"},"servers":[{"url":"/tes/transitapi/1/0"}],"paths":{"/createCardAccount":{"post":{"summary":"Request to create a digital card account","description":"This method is used by TSH to request the creation of a digital card account to the TES.</br> This request can come with a payment order which comprises a payment instrument and either the identifier of wallet card used or the wallet account used for the payment</br> In this case, the TES is responsible for returning an order confirmation in the form of a purchase identifier in all cases where the user may be deducted money.</br> The TES shall also create a new card account associated to a unique identifier. In case of stored value account, the card account identifier shall be the card iedntifier.","operationId":"createCardAccount","parameters":[{"$ref":"#/components/parameters/actorHeader"}],"responses":{"200":{"description":"createCardAccount response payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createCardAccountRes"}}}},"500":{"description":"Internal Server Error"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createCardAccountReq"}}},"description":"createCardAccount request payload","required":true}}}},"components":{"parameters":{"actorHeader":{"schema":{"type":"string","maxLength":32},"description":"HTTP header identifying the actor initiating the request.","in":"header","name":"x-actor-id","required":true}},"schemas":{"createCardAccountRes":{"type":"object","required":["responseHeader"],"properties":{"responseHeader":{"$ref":"#/components/schemas/responseHeader"},"cardAccountId":{"$ref":"#/components/schemas/cardAccountId"},"purchaseId":{"$ref":"#/components/schemas/purchaseId"},"signature":{"$ref":"#/components/schemas/signature"}}},"responseHeader":{"type":"object","required":["responseId","sessionId","statusCode"],"properties":{"responseId":{"$ref":"#/components/schemas/responseId"},"sessionId":{"$ref":"#/components/schemas/sessionId"},"generationDateTime":{"$ref":"#/components/schemas/generationDateTime"},"statusCode":{"type":"number","description":"Status code to the request\n|Status code | Description|\n|-------|-------|\n|0|OK|\n|111|Missing mandatory parameter|\n|112|Bad parameter format|\n|113|Unknown issuer|\n|116|Unknown card account|\n|117|Unknown device|\n|118|Unknown session|\n|119|Unknown virtual card|          \n|120|Unknown purchase|  \n|159|Card is blacklisted|\n|160|Card is deleted|          \n|162|Card has unsufficient balance|\n|163|Card product not eligible|    \n|164|Provisioning count exceeded|    \n|166|Invalid card information|\n|167|Card is already provisioned|\n|169|Purchase order declined|\n|170|Provisioning request declined|\n|171|Wallet account mismatch.<br/>The wallet account is already associated<br/>with a card under different customer name|          \n|221|Device or wallet server not accessible|\n|231|Device unexpected error|\n|232|Device out of memory error|\n|321|Operation already on-going for this device|\n|322|Time to live of the operation expired|                               \n|419|PIN required|   \n|420|PIN incorrect|   \n|421|PIN locked|   \n|431|Invalid perso data|\n|432|Operation is not allowed with current card state|  \n|911|Operation failed|          \n|921|Unexpected server error|\n"},"statusMessage":{"type":"string","description":"Textual status message"}}},"responseId":{"description":"Unique response identifier","maxLength":48,"minLength":1,"type":"string"},"sessionId":{"description":"Unique session identifier used to trace the calls across systems during a use case.","maxLength":48,"minLength":1,"type":"string"},"generationDateTime":{"description":"Date time representing when the request or response has been generated.<br/>RFC3339 format.<br/> Examples:<li>\"2018-12-24T17:32:28Z\"<li>\"2019-10-02T10:00:00-05:00\"","type":"string","format":"date-time"},"cardAccountId":{"maxLength":48,"minLength":1,"type":"string","description":"The Card Account Identifier. Unique for each card account."},"purchaseId":{"maxLength":64,"minLength":1,"type":"string","description":""},"signature":{"type":"string","minLength":1,"maxLength":1024,"description":"Signature covering the concatenation of the UTF-8 encoded bytes of orderId followed by purchaseId.</br> It is a ECDSA signature in PKCS7 format."},"createCardAccountReq":{"type":"object","required":["requestHeader","issuerId","walletProviderId","productId"],"properties":{"requestHeader":{"$ref":"#/components/schemas/requestHeader"},"issuerId":{"$ref":"#/components/schemas/issuerId"},"walletProviderId":{"$ref":"#/components/schemas/walletProviderId"},"productId":{"$ref":"#/components/schemas/productId"},"order":{"$ref":"#/components/schemas/order"},"opaqueServiceProviderData":{"$ref":"#/components/schemas/opaqueServiceProviderData"}}},"requestHeader":{"type":"object","required":["requestId","sessionId"],"properties":{"requestId":{"$ref":"#/components/schemas/requestId"},"sessionId":{"$ref":"#/components/schemas/sessionId"},"generationDateTime":{"$ref":"#/components/schemas/generationDateTime"}}},"requestId":{"description":"Unique request identifier","maxLength":48,"minLength":1,"type":"string"},"issuerId":{"maxLength":16,"minLength":1,"type":"string","description":"The Card Issuer Identifier. Unique for each card issuer."},"walletProviderId":{"type":"string","description":"The Wallet Provider Identifier.<br/>For example:<li>APPLE_PAY<li>HUAWEI_PAY<li>XIAOMI_PAY"},"productId":{"maxLength":16,"minLength":1,"type":"string","description":"The Product Identifier. Unique for each product.</br> It is used by TSH to find the right metadata (e.g. card arts) associated to the product."},"order":{"type":"object","required":["orderId","amount","currency","paymentInstrument"],"properties":{"orderId":{"$ref":"#/components/schemas/orderId"},"amount":{"$ref":"#/components/schemas/amount"},"currency":{"$ref":"#/components/schemas/currency"},"paymentInstrument":{"$ref":"#/components/schemas/paymentInstrument"}}},"orderId":{"maxLength":64,"minLength":1,"type":"string","description":"The Order Identifier. Unique for each order.</br> It is generated by the wallet SDK provider."},"amount":{"type":"number","format":"float","description":"The amount of the purchase order."},"currency":{"type":"string","maxLength":3,"minLength":3,"description":"The currency specified as 3 letters code (ISO4217)"},"paymentInstrument":{"type":"object","description":"payment instrument","required":["paymentData","type","version","signature","header"],"properties":{"paymentData":{"type":"string","maxLength":8192,"minLength":1,"description":"The payment instrument parameter contains the base64 representation of the payment instrument/crendial to be used by the PSP to authorize the payment.</br> The base64 format is specific to the type of payment instrument (e.g. Apple Pay In-App cryptogram).</br> The Apple Pay in-app cryptogram can be found in : https://developer.apple.com/library/archive/documentation/PassKit/Reference/PaymentTokenJSON/PaymentTokenJSON.html"},"type":{"type":"string","enum":["IN-APP_CRYPTO"],"description":"The type of payment instrument used for the purchase order.</br> Only IN-APP_CRYPTO is supported in this version."},"version":{"type":"string","description":"Version information about the payment token.</br> The token uses EC_v1 for ECC-encrypted data, and RSA_v1 for RSA-encrypted data.","enum":["EC_v1","RSA_v1"]},"signature":{"type":"string","description":"detached PKCS7 signature, Base64 encoded as string.</br> The signature includes the signing certificate, its intermediate CA certificate, and information about the signing algorithm.","maxLength":8192,"minLength":1},"header":{"type":"object","description":"Contains the ephemeralPublicKey/wrappedKey, transactionId, and publicKeyHash.</br> These values are required in order to locate the right Private Key in order to decrypt the payment data","required":["transactionId","publicKeyHash"],"properties":{"ephemeralPublicKey":{"type":"string","description":"ephemeral public key used for EC_v1 only","maxLength":1536,"minLength":1},"wrappedKey":{"type":"string","description":"encrypted symmetric key used for RSA_v1 only","maxLength":1536,"minLength":1},"transactionId":{"type":"string","maxLength":128,"minLength":1},"publicKeyHash":{"type":"string","maxLength":512,"minLength":1}}}}},"opaqueServiceProviderData":{"type":"object","description":"This object gives additional service provider data captured by the wallet provider during a payment.</br>The structure of this object is opaque to TSH."}}}}
```

## Request to check digital card account eligibility

> This method is used by TSH to check that a card account is eligible for provisioning.

```json
{"openapi":"3.1.1","info":{"title":"Gemalto TSH Transit API - TSH to TES","version":"1.0.20"},"servers":[{"url":"/tes/transitapi/1/0"}],"paths":{"/checkCardAccount":{"post":{"summary":"Request to check digital card account eligibility","description":"This method is used by TSH to check that a card account is eligible for provisioning.","operationId":"checkCardAccount","parameters":[{"$ref":"#/components/parameters/actorHeader"}],"responses":{"200":{"description":"checkCardAccount response payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/checkCardAccountRes"}}}},"500":{"description":"Internal Server Error"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/checkCardAccountReq"}}},"description":"checkCardAccount request payload","required":true}}}},"components":{"parameters":{"actorHeader":{"schema":{"type":"string","maxLength":32},"description":"HTTP header identifying the actor initiating the request.","in":"header","name":"x-actor-id","required":true}},"schemas":{"checkCardAccountRes":{"type":"object","properties":{"responseHeader":{"$ref":"#/components/schemas/responseHeader"},"productId":{"$ref":"#/components/schemas/productId"},"cardArtManifest":{"$ref":"#/components/schemas/cardArtManifest"},"mobileApplicationInfo":{"type":"object","description":"Mobile application details to be used for the 'cardAccountId'\n\nIf this parameter is not specified, TSH will pick default mobile application details linked to issuerId.","properties":{"associatedApplicationIdentifiers":{"type":"array","description":"List of mobile applications that can have access to the card provisioned.\n\nFirst item of the list will be the one displayed in the card metadata.","items":{"type":"string"},"minItems":1},"appLaunchURL":{"type":"string","description":"URL to be passed to the associated app when launching it from the linked app section."}},"required":["associatedApplicationIdentifiers"]}},"required":["responseHeader"]},"responseHeader":{"type":"object","required":["responseId","sessionId","statusCode"],"properties":{"responseId":{"$ref":"#/components/schemas/responseId"},"sessionId":{"$ref":"#/components/schemas/sessionId"},"generationDateTime":{"$ref":"#/components/schemas/generationDateTime"},"statusCode":{"type":"number","description":"Status code to the request\n|Status code | Description|\n|-------|-------|\n|0|OK|\n|111|Missing mandatory parameter|\n|112|Bad parameter format|\n|113|Unknown issuer|\n|116|Unknown card account|\n|117|Unknown device|\n|118|Unknown session|\n|119|Unknown virtual card|          \n|120|Unknown purchase|  \n|159|Card is blacklisted|\n|160|Card is deleted|          \n|162|Card has unsufficient balance|\n|163|Card product not eligible|    \n|164|Provisioning count exceeded|    \n|166|Invalid card information|\n|167|Card is already provisioned|\n|169|Purchase order declined|\n|170|Provisioning request declined|\n|171|Wallet account mismatch.<br/>The wallet account is already associated<br/>with a card under different customer name|          \n|221|Device or wallet server not accessible|\n|231|Device unexpected error|\n|232|Device out of memory error|\n|321|Operation already on-going for this device|\n|322|Time to live of the operation expired|                               \n|419|PIN required|   \n|420|PIN incorrect|   \n|421|PIN locked|   \n|431|Invalid perso data|\n|432|Operation is not allowed with current card state|  \n|911|Operation failed|          \n|921|Unexpected server error|\n"},"statusMessage":{"type":"string","description":"Textual status message"}}},"responseId":{"description":"Unique response identifier","maxLength":48,"minLength":1,"type":"string"},"sessionId":{"description":"Unique session identifier used to trace the calls across systems during a use case.","maxLength":48,"minLength":1,"type":"string"},"generationDateTime":{"description":"Date time representing when the request or response has been generated.<br/>RFC3339 format.<br/> Examples:<li>\"2018-12-24T17:32:28Z\"<li>\"2019-10-02T10:00:00-05:00\"","type":"string","format":"date-time"},"productId":{"maxLength":16,"minLength":1,"type":"string","description":"The Product Identifier. Unique for each product.</br> It is used by TSH to find the right metadata (e.g. card arts) associated to the product."},"cardArtManifest":{"type":"array","description":"Array of asset identifiers required to build\ncard arts.\nBoth cardBackground and icon asset identifiers shall be provided.\n\nAsset identifier can be up to 64 characters.\n\nIf this parameter is not specified, TSH will pick default assets linked to productId.<br/>\nOtherwise the specified assets will be retrieved using the getAsset API","items":{"type":"string"},"minItems":2},"checkCardAccountReq":{"type":"object","required":["requestHeader","issuerId","cardAccountId","walletProviderId","device"],"properties":{"requestHeader":{"$ref":"#/components/schemas/requestHeader"},"issuerId":{"$ref":"#/components/schemas/issuerId"},"cardAccountId":{"$ref":"#/components/schemas/cardAccountId"},"walletProviderId":{"$ref":"#/components/schemas/walletProviderId"},"device":{"$ref":"#/components/schemas/device"},"cardSource":{"$ref":"#/components/schemas/cardSource"}}},"requestHeader":{"type":"object","required":["requestId","sessionId"],"properties":{"requestId":{"$ref":"#/components/schemas/requestId"},"sessionId":{"$ref":"#/components/schemas/sessionId"},"generationDateTime":{"$ref":"#/components/schemas/generationDateTime"}}},"requestId":{"description":"Unique request identifier","maxLength":48,"minLength":1,"type":"string"},"issuerId":{"maxLength":16,"minLength":1,"type":"string","description":"The Card Issuer Identifier. Unique for each card issuer."},"cardAccountId":{"maxLength":48,"minLength":1,"type":"string","description":"The Card Account Identifier. Unique for each card account."},"walletProviderId":{"type":"string","description":"The Wallet Provider Identifier.<br/>For example:<li>APPLE_PAY<li>HUAWEI_PAY<li>XIAOMI_PAY"},"device":{"type":"object","required":["deviceId","deviceType","language"],"properties":{"deviceId":{"$ref":"#/components/schemas/deviceId"},"deviceType":{"$ref":"#/components/schemas/deviceType"},"language":{"$ref":"#/components/schemas/language"},"phoneNumberLastDigits":{"$ref":"#/components/schemas/phoneNumberLastDigits"},"deviceName":{"$ref":"#/components/schemas/deviceName"}}},"deviceId":{"maxLength":48,"minLength":1,"type":"string","description":"Device unique identifier"},"deviceType":{"type":"string","enum":["PHONE","TABLET","WATCH","UNKNOWN"]},"language":{"type":"string","minLength":3,"maxLength":3,"description":"ISO 639-3 three-letter language codes"},"phoneNumberLastDigits":{"type":"string","minLength":1,"maxLength":5,"description":"Last digit of the phone number (usually 4 or 5)"},"deviceName":{"type":"string","minLength":1,"maxLength":128,"description":"Device name that the device owner may use to identify it"},"cardSource":{"type":"string","enum":["ON-FILE","CLIENT-SDK","USER-INPUT","READER-MODE","UNKNOWN"]}}}}
```

## Request to provision a digital card

> This method is used by TSH to provision a digital card to user's device.

```json
{"openapi":"3.1.1","info":{"title":"Gemalto TSH Transit API - TSH to TES","version":"1.0.20"},"servers":[{"url":"/tes/transitapi/1/0"}],"paths":{"/provisionCard":{"post":{"summary":"Request to provision a digital card","description":"This method is used by TSH to provision a digital card to user's device.","operationId":"provisionCard","parameters":[{"$ref":"#/components/parameters/actorHeader"}],"responses":{"200":{"description":"provisionCard response payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/provisionCardRes"}}}},"500":{"description":"Internal Server Error"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/provisionCardReq"}}},"description":"provisionCard request payload","required":true}}}},"components":{"parameters":{"actorHeader":{"schema":{"type":"string","maxLength":32},"description":"HTTP header identifying the actor initiating the request.","in":"header","name":"x-actor-id","required":true}},"schemas":{"provisionCardRes":{"type":"object","required":["responseHeader"],"properties":{"responseHeader":{"$ref":"#/components/schemas/responseHeader"},"cardId":{"$ref":"#/components/schemas/cardId"},"displayCardNumber":{"$ref":"#/components/schemas/displayCardNumber"},"cardholderName":{"$ref":"#/components/schemas/cardholderName"},"cardData":{"$ref":"#/components/schemas/cardData"},"cardArtManifest":{"$ref":"#/components/schemas/cardArtManifest"}}},"responseHeader":{"type":"object","required":["responseId","sessionId","statusCode"],"properties":{"responseId":{"$ref":"#/components/schemas/responseId"},"sessionId":{"$ref":"#/components/schemas/sessionId"},"generationDateTime":{"$ref":"#/components/schemas/generationDateTime"},"statusCode":{"type":"number","description":"Status code to the request\n|Status code | Description|\n|-------|-------|\n|0|OK|\n|111|Missing mandatory parameter|\n|112|Bad parameter format|\n|113|Unknown issuer|\n|116|Unknown card account|\n|117|Unknown device|\n|118|Unknown session|\n|119|Unknown virtual card|          \n|120|Unknown purchase|  \n|159|Card is blacklisted|\n|160|Card is deleted|          \n|162|Card has unsufficient balance|\n|163|Card product not eligible|    \n|164|Provisioning count exceeded|    \n|166|Invalid card information|\n|167|Card is already provisioned|\n|169|Purchase order declined|\n|170|Provisioning request declined|\n|171|Wallet account mismatch.<br/>The wallet account is already associated<br/>with a card under different customer name|          \n|221|Device or wallet server not accessible|\n|231|Device unexpected error|\n|232|Device out of memory error|\n|321|Operation already on-going for this device|\n|322|Time to live of the operation expired|                               \n|419|PIN required|   \n|420|PIN incorrect|   \n|421|PIN locked|   \n|431|Invalid perso data|\n|432|Operation is not allowed with current card state|  \n|911|Operation failed|          \n|921|Unexpected server error|\n"},"statusMessage":{"type":"string","description":"Textual status message"}}},"responseId":{"description":"Unique response identifier","maxLength":48,"minLength":1,"type":"string"},"sessionId":{"description":"Unique session identifier used to trace the calls across systems during a use case.","maxLength":48,"minLength":1,"type":"string"},"generationDateTime":{"description":"Date time representing when the request or response has been generated.<br/>RFC3339 format.<br/> Examples:<li>\"2018-12-24T17:32:28Z\"<li>\"2019-10-02T10:00:00-05:00\"","type":"string","format":"date-time"},"cardId":{"maxLength":48,"minLength":1,"type":"string","description":"The Card Identifier. Unique for each card."},"displayCardNumber":{"minLength":1,"maxLength":16,"type":"string","description":"The card number to be displayed on the wallet.<br/>If it's not provided, the last 16 characters of cardAccountId will be used."},"cardholderName":{"type":"array","maxItems":10,"items":{"type":"object","required":["value","language"],"properties":{"value":{"description":"The card holder to be displayed on the wallet.","minLength":1,"maxLength":128,"type":"string"},"language":{"type":"string","description":"Text language as defined by BCP 47 standard.</br> Examples:<li>en-US<li>zh-CN","maxLength":16,"minLength":1}}}},"cardData":{"type":"object","properties":{"balanceAmount":{"$ref":"#/components/schemas/balanceAmount"}}},"balanceAmount":{"type":"number","format":"double","description":"The current balance amount of the card"},"cardArtManifest":{"type":"array","description":"Array of asset identifiers required to build\ncard arts.\nBoth cardBackground and icon asset identifiers shall be provided.\n\nAsset identifier can be up to 64 characters.\n\nIf this parameter is not specified, TSH will pick default assets linked to productId.<br/>\nOtherwise the specified assets will be retrieved using the getAsset API","items":{"type":"string"},"minItems":2},"provisionCardReq":{"type":"object","required":["requestHeader","issuerId","cardAccountId","walletCardId","walletCardAccountId","walletAccountId","device"],"properties":{"requestHeader":{"$ref":"#/components/schemas/requestHeader"},"issuerId":{"$ref":"#/components/schemas/issuerId"},"cardAccountId":{"$ref":"#/components/schemas/cardAccountId"},"walletCardId":{"$ref":"#/components/schemas/walletCardId"},"walletCardAccountId":{"$ref":"#/components/schemas/walletCardAccountId"},"walletAccountId":{"$ref":"#/components/schemas/walletAccountId"},"device":{"$ref":"#/components/schemas/device"},"walletScoring":{"$ref":"#/components/schemas/walletScoring"},"customerData":{"$ref":"#/components/schemas/customerData"},"cardLastDigits":{"$ref":"#/components/schemas/cardLastDigits"}}},"requestHeader":{"type":"object","required":["requestId","sessionId"],"properties":{"requestId":{"$ref":"#/components/schemas/requestId"},"sessionId":{"$ref":"#/components/schemas/sessionId"},"generationDateTime":{"$ref":"#/components/schemas/generationDateTime"}}},"requestId":{"description":"Unique request identifier","maxLength":48,"minLength":1,"type":"string"},"issuerId":{"maxLength":16,"minLength":1,"type":"string","description":"The Card Issuer Identifier. Unique for each card issuer."},"cardAccountId":{"maxLength":48,"minLength":1,"type":"string","description":"The Card Account Identifier. Unique for each card account."},"walletCardId":{"maxLength":64,"minLength":1,"type":"string","description":"The Wallet Card Identifier. Unique for each wallet card."},"walletCardAccountId":{"maxLength":64,"minLength":1,"type":"string","description":"The Wallet Card Account Identifier. Unique for each wallet card account."},"walletAccountId":{"maxLength":128,"minLength":1,"type":"string","description":"The Wallet Account Identifier. Unique for each wallet account."},"device":{"type":"object","required":["deviceId","deviceType","language"],"properties":{"deviceId":{"$ref":"#/components/schemas/deviceId"},"deviceType":{"$ref":"#/components/schemas/deviceType"},"language":{"$ref":"#/components/schemas/language"},"phoneNumberLastDigits":{"$ref":"#/components/schemas/phoneNumberLastDigits"},"deviceName":{"$ref":"#/components/schemas/deviceName"}}},"deviceId":{"maxLength":48,"minLength":1,"type":"string","description":"Device unique identifier"},"deviceType":{"type":"string","enum":["PHONE","TABLET","WATCH","UNKNOWN"]},"language":{"type":"string","minLength":3,"maxLength":3,"description":"ISO 639-3 three-letter language codes"},"phoneNumberLastDigits":{"type":"string","minLength":1,"maxLength":5,"description":"Last digit of the phone number (usually 4 or 5)"},"deviceName":{"type":"string","minLength":1,"maxLength":128,"description":"Device name that the device owner may use to identify it"},"walletScoring":{"type":"object","required":["color"],"properties":{"color":{"type":"string","enum":["GREEN","YELLOW","ORANGE"]},"deviceScore":{"type":"number","minimum":1,"maximum":5,"description":"|Score|Description|\n|-------|-------|\n|5|Long history of activity; No suspicious activity|\n|4|Short history of activity; No suspicious activity|\n|3|Little or No history|\n|2|Irregular activity noted|\n|1|Improper activity noted|\n"},"accountScore":{"type":"number","minimum":1,"maximum":5,"description":"|Score|Description|\n|-------|-------|\n|5|Long history of activity; No suspicious activity|\n|4|Short history of activity; No suspicious activity|\n|3|Little or No history|\n|2|Irregular activity noted|\n|1|Improper activity noted|\n"},"phoneNumberScore":{"type":"number","minimum":1,"maximum":5,"description":"|Score|Description|\n|-------|-------|\n|5|Long history of activity; No suspicious activity|\n|4|Short history of activity; No suspicious activity|\n|3|Little or No history|\n|2|Irregular activity noted|\n|1|Improper activity noted|\n"},"reasonCodes":{"type":"array","maxItems":100,"description":"List of reasons","items":{"type":"string","minLength":2,"maxLength":2,"description":"|reasonCode|Description|\n|-------|-------|\n|01|User Wallet Account ID too new relative to launch|\n|02|User Wallet Account ID too new relative to provisioning request|\n|03|User Wallet Account ID/Card Pair is newer than date threshold|\n|04|Changes made to account data within date threshold|\n|05|Suspicious transactions linked to this account.|\n|06|The Account has not had activity in the last year.|\n|07|Suspended cards in the secure element|\n|08|The device was put in lost mode in the last 7 days for longer than the duration threshold|\n|09|The number of provisioning attempts on this device in 72 hours exceeds the threshold|\n|0A|There have been more than the threshold number of different cards attempted at provisioning to this phone in 24 hours.|\n|0B|The card provisioning request contains a distinct name in excess of the permitted threshold|\n|0C|Device Score is less than 3|\n|0D|Device Score is less than 4|\n|0E|Device provisioning location outside of OEM marketplace store home country|\n|0F|Model rules not available at this time (in cases where back end systems time out).|\n|0G|Orange path flag|\n|0H|Phone Number Score is less than 3|\n"}}}},"customerData":{"type":"object","properties":{"dateOfBirth":{"description":"Customer date of birth.</br> Date provided in 'YYYY-MM-DD' format as specified in RFC 3339","type":"string","format":"date"},"customerId":{"description":"Customer identifier","type":"string","minLength":1,"maxLength":32}}},"cardLastDigits":{"maxLength":5,"minLength":4,"type":"string","description":"The Card last 4 or 5 digits."}}}}
```

## Operation result notification.

> This method is used by TSH to notify the result of an operation identified by a sessionId.\</br> It can be the result of a provisioning or a state update.

````json
{"openapi":"3.1.1","info":{"title":"Gemalto TSH Transit API - TSH to TES","version":"1.0.20"},"servers":[{"url":"/tes/transitapi/1/0"}],"paths":{"/notifyOperationResult":{"post":{"summary":"Operation result notification.","description":"This method is used by TSH to notify the result of an operation identified by a sessionId.</br> It can be the result of a provisioning or a state update.","operationId":"notifyOperationResult","parameters":[{"$ref":"#/components/parameters/actorHeader"}],"responses":{"200":{"description":"notifyOperationResult response payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/notifyOperationResultRes"}}}},"500":{"description":"Internal Server Error"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/notifyOperationResultReq"}}},"description":"notifyOperationResult request payload","required":true}}}},"components":{"parameters":{"actorHeader":{"schema":{"type":"string","maxLength":32},"description":"HTTP header identifying the actor initiating the request.","in":"header","name":"x-actor-id","required":true}},"schemas":{"notifyOperationResultRes":{"type":"object","required":["responseHeader"],"properties":{"responseHeader":{"$ref":"#/components/schemas/responseHeader"}}},"responseHeader":{"type":"object","required":["responseId","sessionId","statusCode"],"properties":{"responseId":{"$ref":"#/components/schemas/responseId"},"sessionId":{"$ref":"#/components/schemas/sessionId"},"generationDateTime":{"$ref":"#/components/schemas/generationDateTime"},"statusCode":{"type":"number","description":"Status code to the request\n|Status code | Description|\n|-------|-------|\n|0|OK|\n|111|Missing mandatory parameter|\n|112|Bad parameter format|\n|113|Unknown issuer|\n|116|Unknown card account|\n|117|Unknown device|\n|118|Unknown session|\n|119|Unknown virtual card|          \n|120|Unknown purchase|  \n|159|Card is blacklisted|\n|160|Card is deleted|          \n|162|Card has unsufficient balance|\n|163|Card product not eligible|    \n|164|Provisioning count exceeded|    \n|166|Invalid card information|\n|167|Card is already provisioned|\n|169|Purchase order declined|\n|170|Provisioning request declined|\n|171|Wallet account mismatch.<br/>The wallet account is already associated<br/>with a card under different customer name|          \n|221|Device or wallet server not accessible|\n|231|Device unexpected error|\n|232|Device out of memory error|\n|321|Operation already on-going for this device|\n|322|Time to live of the operation expired|                               \n|419|PIN required|   \n|420|PIN incorrect|   \n|421|PIN locked|   \n|431|Invalid perso data|\n|432|Operation is not allowed with current card state|  \n|911|Operation failed|          \n|921|Unexpected server error|\n"},"statusMessage":{"type":"string","description":"Textual status message"}}},"responseId":{"description":"Unique response identifier","maxLength":48,"minLength":1,"type":"string"},"sessionId":{"description":"Unique session identifier used to trace the calls across systems during a use case.","maxLength":48,"minLength":1,"type":"string"},"generationDateTime":{"description":"Date time representing when the request or response has been generated.<br/>RFC3339 format.<br/> Examples:<li>\"2018-12-24T17:32:28Z\"<li>\"2019-10-02T10:00:00-05:00\"","type":"string","format":"date-time"},"notifyOperationResultReq":{"type":"object","required":["requestHeader","isProvisioning","issuerId","statusCode"],"properties":{"requestHeader":{"$ref":"#/components/schemas/requestHeader"},"issuerId":{"$ref":"#/components/schemas/issuerId"},"purchaseId":{"$ref":"#/components/schemas/purchaseId"},"cardAccountId":{"$ref":"#/components/schemas/cardAccountId"},"cardId":{"$ref":"#/components/schemas/cardId"},"isProvisioning":{"type":"boolean","description":"Flag indicating whether this notification is about provisioning or not."},"resultData":{"$ref":"#/components/schemas/resultData"},"statusCode":{"type":"number","description":"The status code."},"statusMsg":{"type":"string","description":"Optional additional status message"}}},"requestHeader":{"type":"object","required":["requestId","sessionId"],"properties":{"requestId":{"$ref":"#/components/schemas/requestId"},"sessionId":{"$ref":"#/components/schemas/sessionId"},"generationDateTime":{"$ref":"#/components/schemas/generationDateTime"}}},"requestId":{"description":"Unique request identifier","maxLength":48,"minLength":1,"type":"string"},"issuerId":{"maxLength":16,"minLength":1,"type":"string","description":"The Card Issuer Identifier. Unique for each card issuer."},"purchaseId":{"maxLength":64,"minLength":1,"type":"string","description":""},"cardAccountId":{"maxLength":48,"minLength":1,"type":"string","description":"The Card Account Identifier. Unique for each card account."},"cardId":{"maxLength":48,"minLength":1,"type":"string","description":"The Card Identifier. Unique for each card."},"resultData":{"type":"object","description":"This object gives additional information about the operation result.</br> For Calypso, the following will be provided:\n```\n\"resultData\": {\n\t\"csn\" : \"1122334455667788\"        \n}\n```\nFor EMV, the following will be provided:\n```\n\"resultData\": {\n\t\"pan\" : \"$encrypted_value\"        \n}\n```"}}}}
````

## Request to top up a digital card account

> This method is used by TSH to request the top up of a card account to the TES.\</br> This request can come with a payment order which comprises a payment instrument.\</br> It is initiated from OEM Wallet.\</br> In this case, the TES is responsible for returning an order confirmation in the form of a purchase identifier in all cases where the user may be deducted money.

```json
{"openapi":"3.1.1","info":{"title":"Gemalto TSH Transit API - TSH to TES","version":"1.0.20"},"servers":[{"url":"/tes/transitapi/1/0"}],"paths":{"/topUpCardAccount":{"post":{"summary":"Request to top up a digital card account","description":"This method is used by TSH to request the top up of a card account to the TES.</br> This request can come with a payment order which comprises a payment instrument.</br> It is initiated from OEM Wallet.</br> In this case, the TES is responsible for returning an order confirmation in the form of a purchase identifier in all cases where the user may be deducted money.","operationId":"topUpCardAccount","parameters":[{"$ref":"#/components/parameters/actorHeader"}],"responses":{"200":{"description":"topUpCardAccount response payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/topUpCardAccountRes"}}}},"500":{"description":"Internal Server Error"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/topUpCardAccountReq"}}},"description":"topUpCardAccount request payload","required":true}}}},"components":{"parameters":{"actorHeader":{"schema":{"type":"string","maxLength":32},"description":"HTTP header identifying the actor initiating the request.","in":"header","name":"x-actor-id","required":true}},"schemas":{"topUpCardAccountRes":{"type":"object","required":["responseHeader"],"properties":{"responseHeader":{"$ref":"#/components/schemas/responseHeader"},"purchaseId":{"$ref":"#/components/schemas/purchaseId"},"signature":{"$ref":"#/components/schemas/signature"}}},"responseHeader":{"type":"object","required":["responseId","sessionId","statusCode"],"properties":{"responseId":{"$ref":"#/components/schemas/responseId"},"sessionId":{"$ref":"#/components/schemas/sessionId"},"generationDateTime":{"$ref":"#/components/schemas/generationDateTime"},"statusCode":{"type":"number","description":"Status code to the request\n|Status code | Description|\n|-------|-------|\n|0|OK|\n|111|Missing mandatory parameter|\n|112|Bad parameter format|\n|113|Unknown issuer|\n|116|Unknown card account|\n|117|Unknown device|\n|118|Unknown session|\n|119|Unknown virtual card|          \n|120|Unknown purchase|  \n|159|Card is blacklisted|\n|160|Card is deleted|          \n|162|Card has unsufficient balance|\n|163|Card product not eligible|    \n|164|Provisioning count exceeded|    \n|166|Invalid card information|\n|167|Card is already provisioned|\n|169|Purchase order declined|\n|170|Provisioning request declined|\n|171|Wallet account mismatch.<br/>The wallet account is already associated<br/>with a card under different customer name|          \n|221|Device or wallet server not accessible|\n|231|Device unexpected error|\n|232|Device out of memory error|\n|321|Operation already on-going for this device|\n|322|Time to live of the operation expired|                               \n|419|PIN required|   \n|420|PIN incorrect|   \n|421|PIN locked|   \n|431|Invalid perso data|\n|432|Operation is not allowed with current card state|  \n|911|Operation failed|          \n|921|Unexpected server error|\n"},"statusMessage":{"type":"string","description":"Textual status message"}}},"responseId":{"description":"Unique response identifier","maxLength":48,"minLength":1,"type":"string"},"sessionId":{"description":"Unique session identifier used to trace the calls across systems during a use case.","maxLength":48,"minLength":1,"type":"string"},"generationDateTime":{"description":"Date time representing when the request or response has been generated.<br/>RFC3339 format.<br/> Examples:<li>\"2018-12-24T17:32:28Z\"<li>\"2019-10-02T10:00:00-05:00\"","type":"string","format":"date-time"},"purchaseId":{"maxLength":64,"minLength":1,"type":"string","description":""},"signature":{"type":"string","minLength":1,"maxLength":1024,"description":"Signature covering the concatenation of the UTF-8 encoded bytes of orderId followed by purchaseId.</br> It is a ECDSA signature in PKCS7 format."},"topUpCardAccountReq":{"type":"object","required":["requestHeader","issuerId","cardAccountId"],"properties":{"requestHeader":{"$ref":"#/components/schemas/requestHeader"},"issuerId":{"$ref":"#/components/schemas/issuerId"},"cardAccountId":{"$ref":"#/components/schemas/cardAccountId"},"order":{"$ref":"#/components/schemas/order"},"opaqueServiceProviderData":{"$ref":"#/components/schemas/opaqueServiceProviderData"}}},"requestHeader":{"type":"object","required":["requestId","sessionId"],"properties":{"requestId":{"$ref":"#/components/schemas/requestId"},"sessionId":{"$ref":"#/components/schemas/sessionId"},"generationDateTime":{"$ref":"#/components/schemas/generationDateTime"}}},"requestId":{"description":"Unique request identifier","maxLength":48,"minLength":1,"type":"string"},"issuerId":{"maxLength":16,"minLength":1,"type":"string","description":"The Card Issuer Identifier. Unique for each card issuer."},"cardAccountId":{"maxLength":48,"minLength":1,"type":"string","description":"The Card Account Identifier. Unique for each card account."},"order":{"type":"object","required":["orderId","amount","currency","paymentInstrument"],"properties":{"orderId":{"$ref":"#/components/schemas/orderId"},"amount":{"$ref":"#/components/schemas/amount"},"currency":{"$ref":"#/components/schemas/currency"},"paymentInstrument":{"$ref":"#/components/schemas/paymentInstrument"}}},"orderId":{"maxLength":64,"minLength":1,"type":"string","description":"The Order Identifier. Unique for each order.</br> It is generated by the wallet SDK provider."},"amount":{"type":"number","format":"float","description":"The amount of the purchase order."},"currency":{"type":"string","maxLength":3,"minLength":3,"description":"The currency specified as 3 letters code (ISO4217)"},"paymentInstrument":{"type":"object","description":"payment instrument","required":["paymentData","type","version","signature","header"],"properties":{"paymentData":{"type":"string","maxLength":8192,"minLength":1,"description":"The payment instrument parameter contains the base64 representation of the payment instrument/crendial to be used by the PSP to authorize the payment.</br> The base64 format is specific to the type of payment instrument (e.g. Apple Pay In-App cryptogram).</br> The Apple Pay in-app cryptogram can be found in : https://developer.apple.com/library/archive/documentation/PassKit/Reference/PaymentTokenJSON/PaymentTokenJSON.html"},"type":{"type":"string","enum":["IN-APP_CRYPTO"],"description":"The type of payment instrument used for the purchase order.</br> Only IN-APP_CRYPTO is supported in this version."},"version":{"type":"string","description":"Version information about the payment token.</br> The token uses EC_v1 for ECC-encrypted data, and RSA_v1 for RSA-encrypted data.","enum":["EC_v1","RSA_v1"]},"signature":{"type":"string","description":"detached PKCS7 signature, Base64 encoded as string.</br> The signature includes the signing certificate, its intermediate CA certificate, and information about the signing algorithm.","maxLength":8192,"minLength":1},"header":{"type":"object","description":"Contains the ephemeralPublicKey/wrappedKey, transactionId, and publicKeyHash.</br> These values are required in order to locate the right Private Key in order to decrypt the payment data","required":["transactionId","publicKeyHash"],"properties":{"ephemeralPublicKey":{"type":"string","description":"ephemeral public key used for EC_v1 only","maxLength":1536,"minLength":1},"wrappedKey":{"type":"string","description":"encrypted symmetric key used for RSA_v1 only","maxLength":1536,"minLength":1},"transactionId":{"type":"string","maxLength":128,"minLength":1},"publicKeyHash":{"type":"string","maxLength":512,"minLength":1}}}}},"opaqueServiceProviderData":{"type":"object","description":"This object gives additional service provider data captured by the wallet provider during a payment.</br>The structure of this object is opaque to TSH."}}}}
```

## Request to update digital card state

> This method is used by TSH to indicate the update of a digital card to the TES.\</br>         It is usually initiated from OEM Wallet.

```json
{"openapi":"3.1.1","info":{"title":"Gemalto TSH Transit API - TSH to TES","version":"1.0.20"},"servers":[{"url":"/tes/transitapi/1/0"}],"paths":{"/updateCardState":{"post":{"summary":"Request to update digital card state","description":"This method is used by TSH to indicate the update of a digital card to the TES.</br>         It is usually initiated from OEM Wallet.","operationId":"updateCardState","parameters":[{"$ref":"#/components/parameters/actorHeader"}],"responses":{"200":{"description":"updateCardState response payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateCardStateRes"}}}},"500":{"description":"Internal Server Error"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateCardStateReq"}}},"description":"updateCardState request payload","required":true}}}},"components":{"parameters":{"actorHeader":{"schema":{"type":"string","maxLength":32},"description":"HTTP header identifying the actor initiating the request.","in":"header","name":"x-actor-id","required":true}},"schemas":{"updateCardStateRes":{"type":"object","required":["responseHeader"],"properties":{"responseHeader":{"$ref":"#/components/schemas/responseHeader"}}},"responseHeader":{"type":"object","required":["responseId","sessionId","statusCode"],"properties":{"responseId":{"$ref":"#/components/schemas/responseId"},"sessionId":{"$ref":"#/components/schemas/sessionId"},"generationDateTime":{"$ref":"#/components/schemas/generationDateTime"},"statusCode":{"type":"number","description":"Status code to the request\n|Status code | Description|\n|-------|-------|\n|0|OK|\n|111|Missing mandatory parameter|\n|112|Bad parameter format|\n|113|Unknown issuer|\n|116|Unknown card account|\n|117|Unknown device|\n|118|Unknown session|\n|119|Unknown virtual card|          \n|120|Unknown purchase|  \n|159|Card is blacklisted|\n|160|Card is deleted|          \n|162|Card has unsufficient balance|\n|163|Card product not eligible|    \n|164|Provisioning count exceeded|    \n|166|Invalid card information|\n|167|Card is already provisioned|\n|169|Purchase order declined|\n|170|Provisioning request declined|\n|171|Wallet account mismatch.<br/>The wallet account is already associated<br/>with a card under different customer name|          \n|221|Device or wallet server not accessible|\n|231|Device unexpected error|\n|232|Device out of memory error|\n|321|Operation already on-going for this device|\n|322|Time to live of the operation expired|                               \n|419|PIN required|   \n|420|PIN incorrect|   \n|421|PIN locked|   \n|431|Invalid perso data|\n|432|Operation is not allowed with current card state|  \n|911|Operation failed|          \n|921|Unexpected server error|\n"},"statusMessage":{"type":"string","description":"Textual status message"}}},"responseId":{"description":"Unique response identifier","maxLength":48,"minLength":1,"type":"string"},"sessionId":{"description":"Unique session identifier used to trace the calls across systems during a use case.","maxLength":48,"minLength":1,"type":"string"},"generationDateTime":{"description":"Date time representing when the request or response has been generated.<br/>RFC3339 format.<br/> Examples:<li>\"2018-12-24T17:32:28Z\"<li>\"2019-10-02T10:00:00-05:00\"","type":"string","format":"date-time"},"updateCardStateReq":{"type":"object","required":["requestHeader","issuerId","cardId","newState"],"properties":{"requestHeader":{"$ref":"#/components/schemas/requestHeader"},"issuerId":{"$ref":"#/components/schemas/issuerId"},"cardId":{"$ref":"#/components/schemas/cardId"},"newState":{"$ref":"#/components/schemas/newState"}}},"requestHeader":{"type":"object","required":["requestId","sessionId"],"properties":{"requestId":{"$ref":"#/components/schemas/requestId"},"sessionId":{"$ref":"#/components/schemas/sessionId"},"generationDateTime":{"$ref":"#/components/schemas/generationDateTime"}}},"requestId":{"description":"Unique request identifier","maxLength":48,"minLength":1,"type":"string"},"issuerId":{"maxLength":16,"minLength":1,"type":"string","description":"The Card Issuer Identifier. Unique for each card issuer."},"cardId":{"maxLength":48,"minLength":1,"type":"string","description":"The Card Identifier. Unique for each card."},"newState":{"type":"string","description":"The new state to apply on the card","enum":["DELETED","SUSPENDED_WALLET","SUSPENDED_ISSUER","ACTIVE","UNLINKED"]}}}}
```

## Request to get the metadata of card accounts for the given list of card account IDs

> This method is used by TSH to request TES to return the metadata of card accounts for the given list of card account IDs.

```json
{"openapi":"3.1.1","info":{"title":"Gemalto TSH Transit API - TSH to TES","version":"1.0.20"},"servers":[{"url":"/tes/transitapi/1/0"}],"paths":{"/getCardAccountsMetadata":{"post":{"summary":"Request to get the metadata of card accounts for the given list of card account IDs","description":"This method is used by TSH to request TES to return the metadata of card accounts for the given list of card account IDs.","operationId":"getCards","responses":{"200":{"description":"getCardAccountsMetadata response payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/getCardAccountsMetadataRes"}}}},"500":{"description":"Internal Server Error"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/getCardAccountsMetadataReq"}}},"description":"getCardAccountsMetadata request payload","required":true}}}},"components":{"schemas":{"getCardAccountsMetadataRes":{"type":"object","properties":{"responseHeader":{"$ref":"#/components/schemas/responseHeader"},"cardAccounts":{"type":"array","items":{"type":"object","properties":{"cardAccountId":{"$ref":"#/components/schemas/cardAccountId"},"cardAccountState":{"type":"string","maxLength":32,"description":"The current card account state.<br/>Possible values are:\n|state|description|\n|---|---|\n|ACTIVE|Valid card account, can be recovered|\n|CANCELLED|Card account is disabled/refunded|\n|UNKNOWN|Card account is temporarily unavailable. For example park is in progress|\n"},"productsList":{"description":"List of products of the card account","type":"array","items":{"type":"object","properties":{"identifier":{"description":"Unique product identifier","type":"string","maxLength":512},"value":{"type":"number","description":"Last known numeric value of the product, if any"},"lastUpdatedDate":{"type":"string","description":"If applicable the date the value was last updated in ISO 8601 date time format.","format":"date-time"},"validFromDate":{"type":"string","description":"If applicable the date the product use is valid from (inclusive), in ISO 8601 date time format.","format":"date-time"},"validUntilDate":{"type":"string","description":"If applicable the date the product use is valid until (inclusive), in ISO 8601 date time format.","format":"date-time"}},"required":["identifier"]}}},"required":["cardAccountId","cardAccountState"]}}},"required":["responseHeader"]},"responseHeader":{"type":"object","required":["responseId","sessionId","statusCode"],"properties":{"responseId":{"$ref":"#/components/schemas/responseId"},"sessionId":{"$ref":"#/components/schemas/sessionId"},"generationDateTime":{"$ref":"#/components/schemas/generationDateTime"},"statusCode":{"type":"number","description":"Status code to the request\n|Status code | Description|\n|-------|-------|\n|0|OK|\n|111|Missing mandatory parameter|\n|112|Bad parameter format|\n|113|Unknown issuer|\n|116|Unknown card account|\n|117|Unknown device|\n|118|Unknown session|\n|119|Unknown virtual card|          \n|120|Unknown purchase|  \n|159|Card is blacklisted|\n|160|Card is deleted|          \n|162|Card has unsufficient balance|\n|163|Card product not eligible|    \n|164|Provisioning count exceeded|    \n|166|Invalid card information|\n|167|Card is already provisioned|\n|169|Purchase order declined|\n|170|Provisioning request declined|\n|171|Wallet account mismatch.<br/>The wallet account is already associated<br/>with a card under different customer name|          \n|221|Device or wallet server not accessible|\n|231|Device unexpected error|\n|232|Device out of memory error|\n|321|Operation already on-going for this device|\n|322|Time to live of the operation expired|                               \n|419|PIN required|   \n|420|PIN incorrect|   \n|421|PIN locked|   \n|431|Invalid perso data|\n|432|Operation is not allowed with current card state|  \n|911|Operation failed|          \n|921|Unexpected server error|\n"},"statusMessage":{"type":"string","description":"Textual status message"}}},"responseId":{"description":"Unique response identifier","maxLength":48,"minLength":1,"type":"string"},"sessionId":{"description":"Unique session identifier used to trace the calls across systems during a use case.","maxLength":48,"minLength":1,"type":"string"},"generationDateTime":{"description":"Date time representing when the request or response has been generated.<br/>RFC3339 format.<br/> Examples:<li>\"2018-12-24T17:32:28Z\"<li>\"2019-10-02T10:00:00-05:00\"","type":"string","format":"date-time"},"cardAccountId":{"maxLength":48,"minLength":1,"type":"string","description":"The Card Account Identifier. Unique for each card account."},"getCardAccountsMetadataReq":{"type":"object","properties":{"requestHeader":{"$ref":"#/components/schemas/requestHeader"},"issuerId":{"$ref":"#/components/schemas/issuerId"},"cardAccountIds":{"type":"array","description":"The list of card account identifiers","items":{"$ref":"#/components/schemas/cardAccountId"}}},"required":["requestHeader","issuerId","cardAccountIds"]},"requestHeader":{"type":"object","required":["requestId","sessionId"],"properties":{"requestId":{"$ref":"#/components/schemas/requestId"},"sessionId":{"$ref":"#/components/schemas/sessionId"},"generationDateTime":{"$ref":"#/components/schemas/generationDateTime"}}},"requestId":{"description":"Unique request identifier","maxLength":48,"minLength":1,"type":"string"},"issuerId":{"maxLength":16,"minLength":1,"type":"string","description":"The Card Issuer Identifier. Unique for each card issuer."}}}}
```

## Request to get the list of available actions for the given card

> This method is used by TSH to request TES to return the list of available actions for a given card.

```json
{"openapi":"3.1.1","info":{"title":"Gemalto TSH Transit API - TSH to TES","version":"1.0.20"},"servers":[{"url":"/tes/transitapi/1/0"}],"paths":{"/getCardActions":{"post":{"summary":"Request to get the list of available actions for the given card","description":"This method is used by TSH to request TES to return the list of available actions for a given card.","operationId":"getCardActions","responses":{"200":{"description":"getCardActions response payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/getCardActionsRes"}}}},"500":{"description":"Internal Server Error"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/getCardActionsReq"}}},"description":"getCardActions request payload","required":true}}}},"components":{"schemas":{"getCardActionsRes":{"type":"object","properties":{"responseHeader":{"$ref":"#/components/schemas/responseHeader"},"cardActions":{"type":"array","items":{"type":"object","properties":{"identifier":{"description":"A unique identifier of the purchase action","type":"string","maxLength":512},"planIdentifier":{"description":"A unique identifier of the commute plan","type":"string","maxLength":512},"title":{"type":"array","description":"array of objects containing language and label and/or value (at least one of the two shall be provided).<br/>If provided, label and/or value will replace the predefined values statically configured in the platform.<br/>Each item shall be provided with a different language for localization","maxItems":10,"items":{"type":"object","required":["language"],"properties":{"label":{"description":"Commute plan title label.</br> Examples:<li>Golden Weekly Pass","type":"string","minLength":1,"maxLength":64},"value":{"description":"Commute plan extra details.</br> Examples:<li>Activate after tap","type":"string","minLength":1,"maxLength":64},"language":{"type":"string","description":"Text language as defined by BCP 47 standard.</br> Examples:<li>en-US<li>zh-CN","maxLength":16,"minLength":1}}}},"amount":{"description":"purchase amount","type":"number","format":"double"},"currency":{"$ref":"#/components/schemas/currency"},"startDate":{"description":"Start date of the plan.<br/>RFC3339 format. Example 2018-12-24T17:32:28Z","type":"string","format":"date-time"},"expirationDate":{"description":"Expiration date of the plan.<br/>RFC3339 format. Example 2018-12-24T17:32:28Z","type":"string","format":"date-time"}},"required":["identifier","planIdentifier","amount","currency"]}},"validUntil":{"description":"Configuration valid until the specified time.<br/>RFC3339 format. Example 2018-12-24T17:32:28Z","type":"string","format":"date-time"}},"required":["responseHeader","cardActions"]},"responseHeader":{"type":"object","required":["responseId","sessionId","statusCode"],"properties":{"responseId":{"$ref":"#/components/schemas/responseId"},"sessionId":{"$ref":"#/components/schemas/sessionId"},"generationDateTime":{"$ref":"#/components/schemas/generationDateTime"},"statusCode":{"type":"number","description":"Status code to the request\n|Status code | Description|\n|-------|-------|\n|0|OK|\n|111|Missing mandatory parameter|\n|112|Bad parameter format|\n|113|Unknown issuer|\n|116|Unknown card account|\n|117|Unknown device|\n|118|Unknown session|\n|119|Unknown virtual card|          \n|120|Unknown purchase|  \n|159|Card is blacklisted|\n|160|Card is deleted|          \n|162|Card has unsufficient balance|\n|163|Card product not eligible|    \n|164|Provisioning count exceeded|    \n|166|Invalid card information|\n|167|Card is already provisioned|\n|169|Purchase order declined|\n|170|Provisioning request declined|\n|171|Wallet account mismatch.<br/>The wallet account is already associated<br/>with a card under different customer name|          \n|221|Device or wallet server not accessible|\n|231|Device unexpected error|\n|232|Device out of memory error|\n|321|Operation already on-going for this device|\n|322|Time to live of the operation expired|                               \n|419|PIN required|   \n|420|PIN incorrect|   \n|421|PIN locked|   \n|431|Invalid perso data|\n|432|Operation is not allowed with current card state|  \n|911|Operation failed|          \n|921|Unexpected server error|\n"},"statusMessage":{"type":"string","description":"Textual status message"}}},"responseId":{"description":"Unique response identifier","maxLength":48,"minLength":1,"type":"string"},"sessionId":{"description":"Unique session identifier used to trace the calls across systems during a use case.","maxLength":48,"minLength":1,"type":"string"},"generationDateTime":{"description":"Date time representing when the request or response has been generated.<br/>RFC3339 format.<br/> Examples:<li>\"2018-12-24T17:32:28Z\"<li>\"2019-10-02T10:00:00-05:00\"","type":"string","format":"date-time"},"currency":{"type":"string","maxLength":3,"minLength":3,"description":"The currency specified as 3 letters code (ISO4217)"},"getCardActionsReq":{"type":"object","properties":{"requestHeader":{"$ref":"#/components/schemas/requestHeader"},"issuerId":{"$ref":"#/components/schemas/issuerId"},"cardId":{"$ref":"#/components/schemas/cardId"},"appletData":{"type":"string","maxLength":8192,"description":"Data from device representing card image, for filtering allowed actions.<br/>Base64 encoded string.","minLength":1},"associatedPlanIdentifier":{"type":"string","description":"Identifier for the plan to retrieve actions for.<br/>If not present, all valid actions shall be returned.","maxLength":64,"minLength":1}},"required":["requestHeader","issuerId","cardId"]},"requestHeader":{"type":"object","required":["requestId","sessionId"],"properties":{"requestId":{"$ref":"#/components/schemas/requestId"},"sessionId":{"$ref":"#/components/schemas/sessionId"},"generationDateTime":{"$ref":"#/components/schemas/generationDateTime"}}},"requestId":{"description":"Unique request identifier","maxLength":48,"minLength":1,"type":"string"},"issuerId":{"maxLength":16,"minLength":1,"type":"string","description":"The Card Issuer Identifier. Unique for each card issuer."},"cardId":{"maxLength":48,"minLength":1,"type":"string","description":"The Card Identifier. Unique for each card."}}}}
```

## Request to get asset from TES

> This method is used by TSH to request asset to TES

```json
{"openapi":"3.1.1","info":{"title":"Gemalto TSH Transit API - TSH to TES","version":"1.0.20"},"servers":[{"url":"/tes/transitapi/1/0"}],"paths":{"/getAsset":{"post":{"summary":"Request to get asset from TES","description":"This method is used by TSH to request asset to TES","operationId":"getAsset","responses":{"200":{"description":"getAsset response payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/getAssetRes"}}}},"500":{"description":"Internal Server Error"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/getAssetReq"}}},"description":"getAsset request payload","required":true}}}},"components":{"schemas":{"getAssetRes":{"type":"object","properties":{"responseHeader":{"$ref":"#/components/schemas/responseHeader"},"contentType":{"type":"string","maxLength":32,"description":"The asset type.<br/>Possible values are:<li>icon<li>cardBackgroundCombined"},"content":{"type":"array","description":"The asset's data.<br />For PNG images, this list can contain several resolutions for the same asset.","items":{"type":"object","required":["mimeType","encodedData"],"properties":{"mimeType":{"type":"string","maxLength":32,"description":"File type of encoded image.<br/>Possible values are:<li>image/pdf<li>image/png<li>image/svg"},"encodedData":{"type":"string","description":"Base64 encoded asset data"},"width":{"type":"number","description":"Width of the asset. Required for PNG images."},"height":{"type":"number","description":"Height of the asset. Required for PNG images."}}}}},"required":["responseHeader","contentType","content"]},"responseHeader":{"type":"object","required":["responseId","sessionId","statusCode"],"properties":{"responseId":{"$ref":"#/components/schemas/responseId"},"sessionId":{"$ref":"#/components/schemas/sessionId"},"generationDateTime":{"$ref":"#/components/schemas/generationDateTime"},"statusCode":{"type":"number","description":"Status code to the request\n|Status code | Description|\n|-------|-------|\n|0|OK|\n|111|Missing mandatory parameter|\n|112|Bad parameter format|\n|113|Unknown issuer|\n|116|Unknown card account|\n|117|Unknown device|\n|118|Unknown session|\n|119|Unknown virtual card|          \n|120|Unknown purchase|  \n|159|Card is blacklisted|\n|160|Card is deleted|          \n|162|Card has unsufficient balance|\n|163|Card product not eligible|    \n|164|Provisioning count exceeded|    \n|166|Invalid card information|\n|167|Card is already provisioned|\n|169|Purchase order declined|\n|170|Provisioning request declined|\n|171|Wallet account mismatch.<br/>The wallet account is already associated<br/>with a card under different customer name|          \n|221|Device or wallet server not accessible|\n|231|Device unexpected error|\n|232|Device out of memory error|\n|321|Operation already on-going for this device|\n|322|Time to live of the operation expired|                               \n|419|PIN required|   \n|420|PIN incorrect|   \n|421|PIN locked|   \n|431|Invalid perso data|\n|432|Operation is not allowed with current card state|  \n|911|Operation failed|          \n|921|Unexpected server error|\n"},"statusMessage":{"type":"string","description":"Textual status message"}}},"responseId":{"description":"Unique response identifier","maxLength":48,"minLength":1,"type":"string"},"sessionId":{"description":"Unique session identifier used to trace the calls across systems during a use case.","maxLength":48,"minLength":1,"type":"string"},"generationDateTime":{"description":"Date time representing when the request or response has been generated.<br/>RFC3339 format.<br/> Examples:<li>\"2018-12-24T17:32:28Z\"<li>\"2019-10-02T10:00:00-05:00\"","type":"string","format":"date-time"},"getAssetReq":{"type":"object","properties":{"requestHeader":{"$ref":"#/components/schemas/requestHeader"},"assetId":{"type":"string","maxLength":64,"description":"Unique identifier of the asset"}},"required":["requestHeader","assetId"]},"requestHeader":{"type":"object","required":["requestId","sessionId"],"properties":{"requestId":{"$ref":"#/components/schemas/requestId"},"sessionId":{"$ref":"#/components/schemas/sessionId"},"generationDateTime":{"$ref":"#/components/schemas/generationDateTime"}}},"requestId":{"description":"Unique request identifier","maxLength":48,"minLength":1,"type":"string"}}}}
```


---

# 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:

```
GET https://docs.payments.thalescloud.io/transit-classic/api-reference/outgoing-api-to-tes/transit-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
