# Get Card Art Associations by Account Number source: https://developer.mastercard.com/mdes-digital-card-art-service/documentation/testing/get-card-art-associations-by-account-number/index.md ## Pre-requisites {#pre-requisites} Confirm the following before you send any requests: * Your project is created and Sandbox (Mock) credentials are available. * Your client uses the Sandbox (Mock) base URL: `https://sandbox.api.mastercard.com/mdes/digital-personalization/sandbox` * OAuth 1.0a signing is configured correctly. If you still need onboarding or credential setup, start with the [Quick Start Guide](https://developer.mastercard.com/mdes-digital-card-art-service/documentation/quick-start-guide/index.md) ### Choose a testing method {#choose-a-testing-method} Choose a testing method that best matches how you want to validate requests: * [Postman Collection Guide](https://developer.mastercard.com/platform/documentation/developer-tools/postman-collection/) * [Insomnia Collection Guide](https://developer.mastercard.com/platform/documentation/developer-tools/insomnia-collection/) * `curl` or a custom client for request-by-request validation ### Other configurations before you validate requests {#other-configurations-before-you-validate-requests} 1. Download the Sandbox (Mock) encryption certificate: [public-key-certificate.crt](https://static.developer.mastercard.com/content/mdes-digital-card-art-service/uploads/public-key-certificate.crt) (2KB). 2. Use the static publicKeyFingerprint value `710498B6F697B1ED8E5EB264E96D335763F7C02B` along with the encryption certificate. 3. Unencrypted data to be passed in request in encrypted format in the encryptedData field. ## Testing Scenarios {#testing-scenarios} ### Duplicate Request {#duplicate-request} * Unencrypted_Request * Encrypted_Request * Response * Error_Response ```Unencrypted_Request { "cardAccountData": { "accountNumber": "5432543254320000", "panSequenceNumber": "001" } } ``` ```Encrypted_Request { "requestId": "207306be-25f0-4684-bfff-61b028757777", "reasonCode": "PERSONALIZATIONS", "fundingAccountInfo": { "encryptedPayload": { "publicKeyFingerprint": "0081d44f72dd068608ddd731bbd7e0303b804513", "encryptedKey": "9bfbd42b45e54df16256476b59925a4626d57e82f61edb41f6b05d6143f6ab213f796a28e686fa804ac24b931e55fac596ca6d3249c43306071037afee89fffc180f3094f3aef62e80ca8f1a9e73e42cce54c164d489084151859ef60a79638dbe084c72d233a110f81ba7d9438b61b078db4f20f3e923549e50c07ee389d3edc5302363bd8526fdd00872dd7d4e4e5d4d42927f024994213360bffbc7634eec37823cc15fb8c6709cf3f68b7498cd4e2b8bbbe4fdcdf79fa5700c56cdc33b9218c898e1821612cfe39bdd8fe7d600669020cfa60285e93c4c827919e24b4c4c0a02203a9474b74bf13739ebc9441f36f65ad754d4454ae05a2cec90ef43b488", "oaepHashingAlgorithm": "SHA256", "iv": "00000000000000000000000000000000", "encryptedData": "a1a6dff3f2165e77c6fa2af1e0a493e79405f9208480bcbc3cab5c50b2ed80a3e22cc792f35d002f030f109777c29546b7232c7ae82c6e2b89deba1a39c161f9" } } } ``` ```Response { "responseId": "a515ddad-1084-475c-aca3-f9c8e91b9b8c", "count": 1, "offset": 0, "limit": 10, "total": 1, "associations": [ { "tokenRequestorId": "50120834693", "lastUpdated": "2025-04-22T17:32:28Z", "status": "COMPLETED", "cardArtId": "495146c5-fc52-4bb3-95dc-69722537dce4", "digitalServicePartnerIdentifier": "P1234" } ] } ``` ```Error_Response { "Errors": { "Error": [ { "Source": "MASTERCARD_DIGITAL_PERSONALIZATION_SERVICE", "ReasonCode": "DUPLICATE_REQUEST", "Description": "Duplicate Request", "Recoverable": false, "Details": "This operation has already been submitted and is being processed" } ] } } ``` ### Authorization Failed {#authorization-failed} * Encrypted_Request * Unencrypted_Request * Response * Error_Response ```Encrypted_Request { "requestId": "207306be-25f0-4684-bfff-61b028757777", "reasonCode": "PERSONALIZATIONS", "fundingAccountInfo": { "encryptedPayload": { "publicKeyFingerprint": "0081d44f72dd068608ddd731bbd7e0303b804513", "encryptedKey": "9bfbd42b45e54df16256476b59925a4626d57e82f61edb41f6b05d6143f6ab213f796a28e686fa804ac24b931e55fac596ca6d3249c43306071037afee89fffc180f3094f3aef62e80ca8f1a9e73e42cce54c164d489084151859ef60a79638dbe084c72d233a110f81ba7d9438b61b078db4f20f3e923549e50c07ee389d3edc5302363bd8526fdd00872dd7d4e4e5d4d42927f024994213360bffbc7634eec37823cc15fb8c6709cf3f68b7498cd4e2b8bbbe4fdcdf79fa5700c56cdc33b9218c898e1821612cfe39bdd8fe7d600669020cfa60285e93c4c827919e24b4c4c0a02203a9474b74bf13739ebc9441f36f65ad754d4454ae05a2cec90ef43b488", "oaepHashingAlgorithm": "SHA256", "iv": "00000000000000000000000000000000", "encryptedData": "a1a6dff3f2165e77c6fa2af1e0a493e79405f9208480bcbc3cab5c50b2ed80a3e22cc792f35d002f030f109777c29546b7232c7ae82c6e2b89deba1a39c161f9" } } } ``` ```Unencrypted_Request { "cardAccountData": { "accountNumber": "5432543254321111", "panSequenceNumber": "001" } } ``` ```Response { "responseId": "a515ddad-1084-475c-aca3-f9c8e91b9b8c", "count": 1, "offset": 0, "limit": 10, "total": 1, "associations": [ { "tokenRequestorId": "50120834693", "lastUpdated": "2025-04-22T17:32:28Z", "status": "COMPLETED", "cardArtId": "495146c5-fc52-4bb3-95dc-69722537dce4", "digitalServicePartnerIdentifier": "P1234" } ] } ``` ```Error_Response { "Errors": { "Error": [ { "Source": "MASTERCARD_DIGITAL_PERSONALIZATION_SERVICE", "ReasonCode": "AUTHORIZATION_FAILED", "Description": "Authorization failed.", "Recoverable": false, "Details": "The client could not be authorized to perform the requested action." } ] } } ``` ### CRYPTOGRAPHY_ERROR {#cryptography_error} * Encrypted_Request * Unencrypted_Request * Response * Error_Response ```Encrypted_Request { "requestId": "207306be-25f0-4684-bfff-61b028757777", "reasonCode": "PERSONALIZATIONS", "fundingAccountInfo": { "encryptedPayload": { "publicKeyFingerprint": "0081d44f72dd068608ddd731bbd7e0303b804513", "encryptedKey": "9bfbd42b45e54df16256476b59925a4626d57e82f61edb41f6b05d6143f6ab213f796a28e686fa804ac24b931e55fac596ca6d3249c43306071037afee89fffc180f3094f3aef62e80ca8f1a9e73e42cce54c164d489084151859ef60a79638dbe084c72d233a110f81ba7d9438b61b078db4f20f3e923549e50c07ee389d3edc5302363bd8526fdd00872dd7d4e4e5d4d42927f024994213360bffbc7634eec37823cc15fb8c6709cf3f68b7498cd4e2b8bbbe4fdcdf79fa5700c56cdc33b9218c898e1821612cfe39bdd8fe7d600669020cfa60285e93c4c827919e24b4c4c0a02203a9474b74bf13739ebc9441f36f65ad754d4454ae05a2cec90ef43b488", "oaepHashingAlgorithm": "SHA256", "iv": "00000000000000000000000000000000", "encryptedData": "a1a6dff3f2165e77c6fa2af1e0a493e79405f9208480bcbc3cab5c50b2ed80a3e22cc792f35d002f030f109777c29546b7232c7ae82c6e2b89deba1a39c161f9" } } } ``` ```Unencrypted_Request { "cardAccountData": { "accountNumber": "5432543254322222", "panSequenceNumber": "001" } } ``` ```Response { "responseId": "a515ddad-1084-475c-aca3-f9c8e91b9b8c", "count": 1, "offset": 0, "limit": 10, "total": 1, "associations": [ { "tokenRequestorId": "50120834693", "lastUpdated": "2025-04-22T17:32:28Z", "status": "COMPLETED", "cardArtId": "495146c5-fc52-4bb3-95dc-69722537dce4", "digitalServicePartnerIdentifier": "P1234" } ] } ``` ```Error_Response { "Errors": { "Error": [ { "Source": "MASTERCARD_DIGITAL_PERSONALIZATION_SERVICE", "ReasonCode": "CRYPTOGRAPHY_ERROR", "Description": "Cryptography Error", "Recoverable": false, "Details": "There was an error decrypting the encrypted payload." } ] } } ``` ## Velocity Count Exceeded {#velocity-count-exceeded} * Encrypted_Request * Unencrypted_Request * Response * Error_Response ```Encrypted_Request { "requestId": "207306be-25f0-4684-bfff-61b028757777", "reasonCode": "PERSONALIZATIONS", "fundingAccountInfo": { "encryptedPayload": { "publicKeyFingerprint": "0081d44f72dd068608ddd731bbd7e0303b804513", "encryptedKey": "9bfbd42b45e54df16256476b59925a4626d57e82f61edb41f6b05d6143f6ab213f796a28e686fa804ac24b931e55fac596ca6d3249c43306071037afee89fffc180f3094f3aef62e80ca8f1a9e73e42cce54c164d489084151859ef60a79638dbe084c72d233a110f81ba7d9438b61b078db4f20f3e923549e50c07ee389d3edc5302363bd8526fdd00872dd7d4e4e5d4d42927f024994213360bffbc7634eec37823cc15fb8c6709cf3f68b7498cd4e2b8bbbe4fdcdf79fa5700c56cdc33b9218c898e1821612cfe39bdd8fe7d600669020cfa60285e93c4c827919e24b4c4c0a02203a9474b74bf13739ebc9441f36f65ad754d4454ae05a2cec90ef43b488", "oaepHashingAlgorithm": "SHA256", "iv": "00000000000000000000000000000000", "encryptedData": "a1a6dff3f2165e77c6fa2af1e0a493e79405f9208480bcbc3cab5c50b2ed80a3e22cc792f35d002f030f109777c29546b7232c7ae82c6e2b89deba1a39c161f9" } } } ``` ```Unencrypted_Request { "cardAccountData": { "accountNumber": "5432543254323333", "panSequenceNumber": "001" } } ``` ```Response { "responseId": "a515ddad-1084-475c-aca3-f9c8e91b9b8c", "count": 1, "offset": 0, "limit": 10, "total": 1, "associations": [ { "tokenRequestorId": "50120834693", "lastUpdated": "2025-04-22T17:32:28Z", "status": "COMPLETED", "cardArtId": "495146c5-fc52-4bb3-95dc-69722537dce4", "digitalServicePartnerIdentifier": "P1234" } ] } ``` ```Error_Response { "Errors": { "Error": [ { "Source": "MASTERCARD_DIGITAL_PERSONALIZATION_SERVICE", "ReasonCode": "VELOCITY_COUNT_EXCEEDED", "Description": "Velocity count has been exceeded.", "Recoverable": false, "Details": "The number of card art requests for the provided PAN has exceeded the allowed limit within the defined time window" } ] } } ``` ### REQUEST_ACTION_NOT_PERFORMED {#request_action_not_performed} * Encrypted_Request * Unencrypted_Request * Response * Error_Response ```Encrypted_Request { "requestId": "207306be-25f0-4684-bfff-61b028757777", "reasonCode": "PERSONALIZATIONS", "fundingAccountInfo": { "encryptedPayload": { "publicKeyFingerprint": "0081d44f72dd068608ddd731bbd7e0303b804513", "encryptedKey": "9bfbd42b45e54df16256476b59925a4626d57e82f61edb41f6b05d6143f6ab213f796a28e686fa804ac24b931e55fac596ca6d3249c43306071037afee89fffc180f3094f3aef62e80ca8f1a9e73e42cce54c164d489084151859ef60a79638dbe084c72d233a110f81ba7d9438b61b078db4f20f3e923549e50c07ee389d3edc5302363bd8526fdd00872dd7d4e4e5d4d42927f024994213360bffbc7634eec37823cc15fb8c6709cf3f68b7498cd4e2b8bbbe4fdcdf79fa5700c56cdc33b9218c898e1821612cfe39bdd8fe7d600669020cfa60285e93c4c827919e24b4c4c0a02203a9474b74bf13739ebc9441f36f65ad754d4454ae05a2cec90ef43b488", "oaepHashingAlgorithm": "SHA256", "iv": "00000000000000000000000000000000", "encryptedData": "a1a6dff3f2165e77c6fa2af1e0a493e79405f9208480bcbc3cab5c50b2ed80a3e22cc792f35d002f030f109777c29546b7232c7ae82c6e2b89deba1a39c161f9" } } } ``` ```Unencrypted_Request { "cardAccountData": { "accountNumber": "5432543254324444", "panSequenceNumber": "001" } } ``` ```Response { "responseId": "a515ddad-1084-475c-aca3-f9c8e91b9b8c", "count": 1, "offset": 0, "limit": 10, "total": 1, "associations": [ { "tokenRequestorId": "50120834693", "lastUpdated": "2025-04-22T17:32:28Z", "status": "COMPLETED", "cardArtId": "495146c5-fc52-4bb3-95dc-69722537dce4", "digitalServicePartnerIdentifier": "P1234" } ] } ``` ```Error_Response { "Errors": { "Error": [ { "Source": "MASTERCARD_DIGITAL_PERSONALIZATION_SERVICE", "ReasonCode": "REQUEST_ACTION_NOT_PERFORMED", "Description": "Could not perform action", "Recoverable": false, "Details": "Requested action can not be performed." } ] } } ```