# How to call the Get Issuer API source: https://developer.mastercard.com/priceless-planet-carbon-tracker/tutorial/test-cases/step6/index.md ### Allow issuers to view their details to take decisive actions {#allow-issuers-to-view-their-details-to-take-decisive-actions} The **Get Issuer** service allows a registered issuer to fetch the issuer details from the Carbon Calculator Experience API. ## Pre-requisites {#pre-requisites} Before executing the test cases, acquaint yourself with the endpoint use case and parameters: * [Get Issuer](https://developer.mastercard.com/priceless-planet-carbon-tracker/documentation/use-cases/get_issuer/index.md) * [Get Issuer Parameters](https://developer.mastercard.com/priceless-planet-carbon-tracker/documentation/parameters/index.md#get-issuer/) ## View Issuer Details {#view-issuer-details} 1. To fetch the issuer details, send a GET request. ```py GET https://sandbox.api.mastercard.com/cts/issuers ``` 2. A successful request returns the `HTTP 200 Success` status code with the latest information of an issuer as available on the server. ```json { "clientId": "B6Ao5E71Wn37Zmy8DbMUdXq8XQ4TqpA5f0rs8lV071809844", "customerId": "144136", "supportedAccountRange": "222300,552433,222305,11112,5050,5051", "status": "ACTIVE", "email": "johndoe@partnerbank.com", "currencyCode": "USD", "countryCode": "USA", "countryName": "United States", "privacyNoticeURL": "https://developer.mastercard.com/", "termsAndConditionURL": "https://developer.mastercard.com/", "optOutURL": "https://developer.mastercard.com/", "preferredTheme": { "backgroundColor": "#FFFFFF", "widgetBackgroundColor": "#FFFFFF", "fontColor": "#000000", "buttonColor": "#999999", "barGraphColor": "#111111", "buttonTextColor": "#FFFFFF", "titleFontType": "Mark Offc For MC", "titleFontSize": "28px", "subTitleFontType": "Mark Offc For MC", "subTitleFontSize": "20px", "paragraphFontType": "Mark Offc For MC", "paragraphFontSize": "15px", "buttonTextFontType": "Mark Offc For MC", "buttonTextFontSize": "15px", "linkFontType": "Mark Offc For MC", "linkFontSize": "15px" } } ``` ## Failed scenarios {#failed-scenarios} This section discusses a failed scenario and the error message expected. ### Fetch issuer details when the Issuer ID is not found {#fetch-issuer-details-when-the-issuer-id-is-not-found} 1. To fetch the issuer details, send a GET request. ```py GET https://sandbox.api.mastercard.com/cts/issuers ``` 2. This request fails with the error code `HTTP 404 Bad Request` as the response. ```json { "Errors": { "Error": [ { "Source": "CARBON CALCULATOR EXPERIENCE", "ReasonCode": "SERVICE_PROVIDER_NOT_FOUND", "Description": "Service provider clientId is not Identified", "Recoverable": false, "Details": "Client not found." } ] } } ``` ### Fetch issuer details of an inactive issuer account {#fetch-issuer-details-of-an-inactive-issuer-account} 1. To fetch the issuer details of an inactive issuer account, send a GET request. ```py GET https://sandbox.api.mastercard.com/cts/issuers ``` 2. This request fails with the error code `HTTP 404 Bad Request` as the response. ```json { "Errors": { "Error": [ { "Source": "CARBON CALCULATOR EXPERIENCE", "ReasonCode": "ACCOUNT_INACTIVE", "Description": "Your account is inactive, kindly contact your Mastercard associate to activate it. Until then you won't be able to access any service.", "Recoverable": false, "Details": "Your account is inactive, kindly contact your Mastercard associate to activate it. Until then you won't be able to access any service." } ] } } ``` Note: The above test case can also be replicated to test for suspended and terminated issuer accounts.