Download Prepared Card Data File

This API downloads the bulk prepared card personalization file generated after a successful Card Production and Data Prep (CPDP) request.

Note: This API returns a binary .bin file on success. JSON is returned only when the request fails. Use the same correlationId returned from the bulk CPDP request. Call this endpoint only after data prep has completed (dataPrepStatus = COMPLETED).

Request Message description

This API does not require a request body.

Request Parameters description

Parameter #Parameter nameData typeRequiredDescription
1correlationIdstringtrueCorrelation ID from the bulk CPDP request (POST /card-management/api/v2/cms/cpdp). Identifies the batch whose prepared file should be downloaded.

GET /card-management/api/v1/data-prep/download 

Authorization = Bearer Token 

The client must have at least one of the following permissions: BULK_CARD_PRODUCTION, BULK_CARD_PRODUCTION_V2, BULK_CARD_RETRY, DATA_PREP_INITIATE, DATA_PREP_RETRY.

Sample Request

GET /card-management/api/v1/data-prep/download?correlationId=44adc15977224feb9d81ae46a219b08c 
Authorization: Bearer <access_token> 
Accept: application/octet-stream 

Response Message field description

On success the response body is the prepared card data file (application/octet-stream), not JSON. The JSON fields below apply to error responses.

Field #Field nameDescription
1codeInternal Response Code
2descriptionSuccessful or Error Message
3correlationIdRequest identifier
4errorsErrors array if any errors exists.

Sample Response (success)

HTTP 200 OK 
Content-Type: application/octet-stream 
Content-Disposition: attachment; filename="TPS_14155_2_1787772791457.bin" 
Cache-Control: no-store 
Content-Length: <file size in bytes> 
 
<binary .bin file contents> 

Sample Response (failure) - file not ready

{ 
  "code": "409", 
  "description": "Dataprep file is not ready. Current status: DATA_PREP_SCHEDULING_SUCCESSFUL", 
  "correlationId": "44adc15977224feb9d81ae46a219b08c" 
} 

Sample Response (failure) - not found

{ 
  "code": "404", 
  "description": "Prepared file not found", 
  "correlationId": "44adc15977224feb9d81ae46a219b08c" 
} 

Sample Response (failure) - missing correlationId

{ 
  "code": "400", 
  "description": "correlationId is required." 
} 

Did this page help you?