> 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/es/referencia-de-la-api/api-entrante-desde-tes/api-de-transito.md).

# API de Tránsito

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

## Request to send personalization data to a digital card

> This method is used by TES to submit the perso data used for personalizing a digital card.\</br> This request is sent after TES approves a previous provisionCard call and after finishing to prepare the required data.\</br>

```json
{"openapi":"3.1.1","info":{"title":"Gemalto TSH Transit API - TES to TSH","version":"1.0.20"},"servers":[{"url":"/tsh/transitapi/1/0"}],"paths":{"/submitCardPersoData":{"post":{"summary":"Request to send personalization data to a digital card","description":"This method is used by TES to submit the perso data used for personalizing a digital card.</br> This request is sent after TES approves a previous provisionCard call and after finishing to prepare the required data.</br>","operationId":"submitCardPersoData","responses":{"200":{"description":"submitCardPersoData response payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/submitCardPersoDataRes"}}}},"500":{"description":"Internal Server Error"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/submitCardPersoDataReq"}}},"description":"submitCardPersoData request payload","required":true}}}},"components":{"schemas":{"submitCardPersoDataRes":{"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|121|Unknown request|  \n|221|Device or wallet server not accessible|\n|321|Operation already on-going for this device|\n|322|Time to live of the operation expired|                               \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"},"submitCardPersoDataReq":{"type":"object","required":["requestHeader","issuerId","cardId","cardPersoData"],"properties":{"requestHeader":{"$ref":"#/components/schemas/requestHeader"},"issuerId":{"$ref":"#/components/schemas/issuerId"},"cardId":{"$ref":"#/components/schemas/cardId"},"cardPersoData":{"$ref":"#/components/schemas/cardPersoData"}}},"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."},"cardPersoData":{"type":"array","maxItems":200,"description":"Perso Data to be used for personalizing a digital card.","items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string","description":"Data element name (for example, the DGI code)","maxLength":32,"minLength":1},"value":{"type":"string","description":"Data element value","maxLength":8192,"minLength":1},"keyIndex":{"type":"string","description":"Index of the key used to encrypt the value (if encrypted)","minLength":1,"maxLength":32}}}}}}}
```

## Request to update the state of a digital card

> This method is used by TES to request to update the state of a digital card.

```json
{"openapi":"3.1.1","info":{"title":"Gemalto TSH Transit API - TES to TSH","version":"1.0.20"},"servers":[{"url":"/tsh/transitapi/1/0"}],"paths":{"/updateCardState":{"post":{"summary":"Request to update the state of a digital card","description":"This method is used by TES to request to update the state of a digital card.","operationId":"updateCardState","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":{"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|121|Unknown request|  \n|221|Device or wallet server not accessible|\n|321|Operation already on-going for this device|\n|322|Time to live of the operation expired|                               \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","action"],"properties":{"requestHeader":{"$ref":"#/components/schemas/requestHeader"},"issuerId":{"$ref":"#/components/schemas/issuerId"},"cardId":{"$ref":"#/components/schemas/cardId"},"action":{"$ref":"#/components/schemas/action"}}},"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."},"action":{"type":"string","description":"The LCM action to apply on the card.</br>Possible values are:\n  - DELETE\n  - SUSPEND\n  - RESUME\n  - ERASE (used in the Rights of Individuals context)\n    All personal data are physically removed from TSH server","enum":["DELETE","SUSPEND","RESUME","ERASE"]}}}}
```

## Request to update the metadata of a card

> This method is used by TES to request to update the metadata of a digital card:\<ul>\<li>either commute plans metadata\<li>or card arts\</ul>> \
> It's not possible to update them both in a single request.&#x20;

```json
{"openapi":"3.1.1","info":{"title":"Gemalto TSH Transit API - TES to TSH","version":"1.0.20"},"servers":[{"url":"/tsh/transitapi/1/0"}],"paths":{"/updateCardMetadata":{"post":{"summary":"Request to update the metadata of a card","description":"This method is used by TES to request to update the metadata of a digital card:<ul><li>either commute plans metadata<li>or card arts</ul>\r\nIt's not possible to update them both in a single request. ","operationId":"updateCardMetadata","responses":{"200":{"description":"updateCardMetadata response payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateCardMetadataRes"}}}},"500":{"description":"Internal Server Error"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateCardMetadataReq"}}},"description":"updateCardMetadata request payload","required":true}}}},"components":{"schemas":{"updateCardMetadataRes":{"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|121|Unknown request|  \n|221|Device or wallet server not accessible|\n|321|Operation already on-going for this device|\n|322|Time to live of the operation expired|                               \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"},"updateCardMetadataReq":{"type":"object","properties":{"requestHeader":{"$ref":"#/components/schemas/requestHeader"},"issuerId":{"$ref":"#/components/schemas/issuerId"},"cardId":{"$ref":"#/components/schemas/cardId"},"commutePlans":{"$ref":"#/components/schemas/commutePlans"},"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\nWhen this parameter is provided, a request will be sent to wallet provider for updating the card arts deployed with the ones specified","items":{"type":"string"}}},"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."},"commutePlans":{"type":"array","maxItems":10,"items":{"type":"object","required":["identifier","title","usage","validityPeriod"],"properties":{"identifier":{"description":"Identifier of a plan, unique to the list of plans.","type":"string","minLength":1,"maxLength":128},"title":{"type":"array","maxItems":10,"items":{"type":"object","required":["label","language"],"properties":{"label":{"description":"Commute plan title label.</br> Examples:<li>First Ferry Monthly Ticket<li>First Ferry Weekly Ticket","type":"string","minLength":1,"maxLength":64},"value":{"description":"Commute plan title extra details.</br> Examples:<li>North Point<li>Hunghom - Kowloon City","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}}}},"usage":{"type":"object","required":["label","value"],"properties":{"label":{"description":"Label describing commute plan usage","type":"string","enum":["Usage","Limitations"]},"value":{"type":"array","maxItems":10,"items":{"type":"object","required":["text","language"],"properties":{"text":{"type":"string","description":"Descriptive text about commute plan usage","maxLength":128,"minLength":1},"language":{"type":"string","description":"Text language as defined by BCP 47 standard.</br> Examples:<li>en-US<li>zh-CN","maxLength":16,"minLength":1}}}}}},"validityPeriod":{"type":"object","required":["startDate","expiryDate"],"properties":{"startDate":{"description":"Starting date of the commute plan (can be in the future).<br/>RFC3339 format<br/> Examples:<li>\"2018-11-24T17:32:28Z\"<li>\"2019-10-02T10:00:00-05:00\"","type":"string","format":"date-time"},"expiryDate":{"description":"Ending date of the commute plan.<br/>RFC3339 format<br/> Examples:<li>\"2018-12-24T17:32:28Z\"<li>\"2019-10-09T10:00:00-05:00\"","type":"string","format":"date-time"},"dateStyle":{"type":"string","description":"Style of the date to be displayed on user device. Default value is \"MEDIUM\".</br> Examples:<li>SHORT ==> \"11/23/19\"<li>MEDIUM ==> \"Nov 23, 2019\"<li>LONG ==> \"November 23, 2019\"","enum":["SHORT","MEDIUM","LONG"]},"timeStyle":{"type":"string","description":"Style of the date to be displayed on user device. Default value is \"SHORT\".</br> Examples:<li>SHORT ==> \"3:30 PM\"<li>MEDIUM ==> \"3:30:32 PM\"<li>LONG ==> \"3:30:32 PM PST\"","enum":["SHORT","MEDIUM","LONG"]}}}}}}}}}
```

## Request to initiate a session for a digital card

> This method is used by TES to request TSH to initiate a session for a digital card.\</br> This request is sent when TES needs to exchange commands with targeted device (during a topup for example).\</br>

```json
{"openapi":"3.1.1","info":{"title":"Gemalto TSH Transit API - TES to TSH","version":"1.0.20"},"servers":[{"url":"/tsh/transitapi/1/0"}],"paths":{"/initiateCardSession":{"post":{"summary":"Request to initiate a session for a digital card","description":"This method is used by TES to request TSH to initiate a session for a digital card.</br> This request is sent when TES needs to exchange commands with targeted device (during a topup for example).</br>","operationId":"initiateCardSession","responses":{"200":{"description":"initiateCardSession response payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/initiateCardSessionRes"}}}},"500":{"description":"Internal Server Error"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/initiateCardSessionReq"}}},"description":"initiateCardSession request payload","required":true}}}},"components":{"schemas":{"initiateCardSessionRes":{"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|121|Unknown request|  \n|221|Device or wallet server not accessible|\n|321|Operation already on-going for this device|\n|322|Time to live of the operation expired|                               \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"},"initiateCardSessionReq":{"type":"object","required":["requestHeader","issuerId","cardId"],"properties":{"requestHeader":{"$ref":"#/components/schemas/requestHeader"},"issuerId":{"$ref":"#/components/schemas/issuerId"},"cardId":{"$ref":"#/components/schemas/cardId"},"operation":{"$ref":"#/components/schemas/operation"}}},"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."},"operation":{"type":"string","description":"The operation to be initiated","enum":["READ_BALANCE","UPDATE_BALANCE","UPDATE_CONFIG","UPDATE_PLAN","ERASE_CARD","PARK_CARD","BLOCK_AND_READ_CARD"]}}}}
```

## Request to get the list of cards details associated to a card account

> This method is used by TES to request TSH to return the list of cards associated to the specified card account.

```json
{"openapi":"3.1.1","info":{"title":"Gemalto TSH Transit API - TES to TSH","version":"1.0.20"},"servers":[{"url":"/tsh/transitapi/1/0"}],"paths":{"/getCards":{"post":{"summary":"Request to get the list of cards details associated to a card account","description":"This method is used by TES to request TSH to return the list of cards associated to the specified card account.","operationId":"getCards","responses":{"200":{"description":"getCards response payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/getCardsRes"}}}},"500":{"description":"Internal Server Error"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/getCardsReq"}}},"description":"getCards request payload","required":true}}}},"components":{"schemas":{"getCardsRes":{"type":"object","required":["responseHeader"],"properties":{"responseHeader":{"$ref":"#/components/schemas/responseHeader"},"walletCardAccountId":{"$ref":"#/components/schemas/walletCardAccountId"},"walletAccountId":{"$ref":"#/components/schemas/walletAccountId"},"cardAccountState":{"type":"string","enum":["ACTIVE","CANCELLED","PARKED"]},"cards":{"$ref":"#/components/schemas/cards"}}},"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|121|Unknown request|  \n|221|Device or wallet server not accessible|\n|321|Operation already on-going for this device|\n|322|Time to live of the operation expired|                               \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"},"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."},"cards":{"type":"array","maxItems":100,"description":"List of cards","items":{"type":"object","properties":{"cardId":{"$ref":"#/components/schemas/cardId"},"walletCardId":{"$ref":"#/components/schemas/walletCardId"},"cardState":{"type":"string","enum":["CREATED","ACTIVE","SUSPENDED_ISSUER","SUSPENDED_WALLET","UNLINKED"]}}}},"cardId":{"maxLength":48,"minLength":1,"type":"string","description":"The Card Identifier. Unique for each card."},"walletCardId":{"maxLength":64,"minLength":1,"type":"string","description":"The Wallet Card Identifier. Unique for each wallet card."},"getCardsReq":{"type":"object","required":["requestHeader","issuerId","cardAccountId"],"properties":{"requestHeader":{"$ref":"#/components/schemas/requestHeader"},"issuerId":{"$ref":"#/components/schemas/issuerId"},"cardAccountId":{"$ref":"#/components/schemas/cardAccountId"}}},"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."}}}}
```

## Request to refund a card account

> This method is used by TES to notify TSH that a card account has been refunded.

```json
{"openapi":"3.1.1","info":{"title":"Gemalto TSH Transit API - TES to TSH","version":"1.0.20"},"servers":[{"url":"/tsh/transitapi/1/0"}],"paths":{"/refundCardAccount":{"post":{"summary":"Request to refund a card account","description":"This method is used by TES to notify TSH that a card account has been refunded.","operationId":"refundCardAccount","responses":{"200":{"description":"refundCardAccount response payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/refundCardAccountRes"}}}},"500":{"description":"Internal Server Error"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/refundCardAccountReq"}}},"description":"refundCardAccount request payload","required":true}}}},"components":{"schemas":{"refundCardAccountRes":{"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|121|Unknown request|  \n|221|Device or wallet server not accessible|\n|321|Operation already on-going for this device|\n|322|Time to live of the operation expired|                               \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"},"refundCardAccountReq":{"type":"object","required":["requestHeader","issuerId","cardAccountId"],"properties":{"requestHeader":{"$ref":"#/components/schemas/requestHeader"},"issuerId":{"$ref":"#/components/schemas/issuerId"},"cardAccountId":{"$ref":"#/components/schemas/cardAccountId"}}},"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."}}}}
```

## Get request status

> This method is used by TES to check the status of an asynchronous request previously submitted.

```json
{"openapi":"3.1.1","info":{"title":"Gemalto TSH Transit API - TES to TSH","version":"1.0.20"},"servers":[{"url":"/tsh/transitapi/1/0"}],"paths":{"/getRequestStatus":{"post":{"summary":"Get request status","description":"This method is used by TES to check the status of an asynchronous request previously submitted.","operationId":"getRequestStatus","responses":{"200":{"description":"getRequestStatus response payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/getRequestStatusRes"}}}},"500":{"description":"Internal Server Error"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/getRequestStatusReq"}}},"description":"getRequestStatus request payload","required":true}}}},"components":{"schemas":{"getRequestStatusRes":{"type":"object","required":["responseHeader"],"properties":{"responseHeader":{"$ref":"#/components/schemas/responseHeader"},"requestStatus":{"$ref":"#/components/schemas/requestStatus"}}},"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|121|Unknown request|  \n|221|Device or wallet server not accessible|\n|321|Operation already on-going for this device|\n|322|Time to live of the operation expired|                               \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"},"requestStatus":{"type":"string","description":"The status of the request.","enum":["PROCESSING","COMPLETED","FAILED"]},"getRequestStatusReq":{"type":"object","required":["requestHeader","issuerId","targetRequestId"],"properties":{"requestHeader":{"$ref":"#/components/schemas/requestHeader"},"issuerId":{"$ref":"#/components/schemas/issuerId"},"targetRequestId":{"$ref":"#/components/schemas/requestId"}}},"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."}}}}
```


---

# 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/es/referencia-de-la-api/api-entrante-desde-tes/api-de-transito.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.
