### API Response Example Source: https://iinlist.com/docs Example JSON response structure containing card metadata. ```json { "count": 1, "_embedded": { "cards": [ { "scheme": { "name": "Visa" }, "range": { "type": "account" }, "product": { "name": "Visa Classic", "segment": "consumer" }, "account": { "funding": "debit", "country": { "code": "DK" }, "currency": { "code": "DKK" } }, "issuer": { "name": "Foreningen Af Danske Kortudstedere F.M.B.A" }, "fast_funds": { "domestic": false, "cross_border": false } } ] } } ``` -------------------------------- ### Root Resource Response Source: https://iinlist.com/docs Example JSON response from the root endpoint. ```json { "_links": { "self": { "href": "https://api.iinlist.com" }, "cards": { "href": "https://api.iinlist.com/cards{?iin,bin}", "templated": true } } } ``` -------------------------------- ### Perform an IIN Lookup via cURL Source: https://iinlist.com/docs Example of a GET request to the cards endpoint to retrieve IIN information. ```bash curl https://api.iinlist.com/cards?iin=12345678 ``` -------------------------------- ### GET / Source: https://iinlist.com/docs Retrieves the root resource of the API, which provides links to other available resources including the Cards collection. ```APIDOC ## GET / ### Description The Root resource links to all resources in the API to make them discoverable. Currently, it only links to itself and to a collection of Card resources. ### Method GET ### Endpoint https://api.iinlist.com ### Response #### Success Response (200) - **_links** (object) - Contains links to self and cards collection. #### Response Example { "_links": { "self": { "href": "https://api.iinlist.com" }, "cards": { "href": "https://api.iinlist.com/cards{?iin,bin}", "templated": true } } } ``` -------------------------------- ### GET /cards Source: https://iinlist.com/docs Retrieve card information by providing an IIN/BIN as a query parameter. ```APIDOC ## GET /cards ### Description Look up IIN/BIN information in a single request. The API accepts between 6 and 8 digits for the IIN. ### Method GET ### Endpoint https://api.iinlist.com/cards ### Parameters #### Query Parameters - **iin** (string) - Required - The 6-8 digit IIN/BIN to look up. ### Request Example curl https://api.iinlist.com/cards?iin=12345678 ### Response #### Success Response (200) - **Content-Type** (string) - application/hal+json; charset=utf-8; version=1 ``` -------------------------------- ### GET /cards Source: https://iinlist.com/docs Retrieve metadata for a payment card or token based on the provided IIN/BIN. ```APIDOC ## GET /cards ### Description Look up card metadata by providing the first 6-8 digits of a payment card number or token. ### Method GET ### Endpoint https://api.iinlist.com/cards ### Parameters #### Query Parameters - **iin** (string) - Required - The first 6-8 digits of the payment card number or token. ### Request Example curl https://api.iinlist.com/cards?iin=12345678 --header "X-API-Key: $API_KEY" ### Response #### Success Response (200) - **count** (integer) - Number of results found. - **_embedded** (object) - Contains the list of card resources. #### Response Example { "count": 1, "_embedded": { "cards": [ { "scheme": { "name": "Visa" }, "range": { "type": "account" }, "product": { "name": "Visa Classic", "segment": "consumer" }, "account": { "funding": "debit", "country": { "code": "DK" }, "currency": { "code": "DKK" } }, "issuer": { "name": "Foreningen Af Danske Kortudstedere F.M.B.A" }, "fast_funds": { "domestic": false, "cross_border": false } } ] } } ``` -------------------------------- ### GET /cards Source: https://iinlist.com/docs Retrieves card information based on a provided IIN or BIN number. ```APIDOC ## GET /cards ### Description A collection of card resources belonging to their own individual account range or token range. ### Method GET ### Endpoint https://api.iinlist.com/cards ### Parameters #### Query Parameters - **iin** or **bin** (string) - Required - 6-8 digits representing the card identifier. ### Request Headers - **X-API-Key** (string) - Required - **Accept** (string) - Recommended ### Response #### Success Response (200) - **count** (integer) - Number of cards returned. - **_embedded** (object) - Contains the list of card resources. #### Response Example { "count": 1, "_embedded": { "cards": [ { "scheme": { "name": "Visa" }, "range": { "type": "account" }, "product": { "name": "Visa Classic", "segment": "consumer" }, "account": { "funding": "debit", "country": { "code": "DK" }, "currency": { "code": "DKK" } }, "issuer": { "name": "Foreningen Af Danske Kortudstedere F.M.B.A" }, "fast_funds": { "domestic": false, "cross_border": false } } ] } } ``` -------------------------------- ### Access Base URL Source: https://iinlist.com/docs Entry point for exploring API resources. ```bash curl https://api.iinlist.com ``` -------------------------------- ### Navigate API Resources with HAL Source: https://iinlist.com/docs Pseudocode demonstrating how to traverse API resources by following links rather than hardcoding URLs. ```text root('api.iinlist.com').follow('cards').queryString('iin=12345678').get ``` -------------------------------- ### Look up IIN/BIN Source: https://iinlist.com/docs Retrieves card metadata for a specific IIN/BIN. Requires an API key in the X-API-Key header. ```bash curl https://api.iinlist.com/cards?iin=12345678 --header "X-API-Key: $API_KEY" ``` -------------------------------- ### Retrieve Root Resource Source: https://iinlist.com/docs Fetches the API root resource to discover available endpoints. ```bash curl https://api.iinlist.com \ --header "Accept: application/hal+json; charset=utf-8; version=1" ``` -------------------------------- ### Supported Media Type Source: https://iinlist.com/docs The media type used for content negotiation. ```text application/hal+json; charset=utf-8; version=1 ``` -------------------------------- ### Query Cards by IIN Source: https://iinlist.com/docs Retrieves card information using an IIN or BIN parameter. Requires an API key in the header. ```bash curl https://api.iinlist.com/cards?iin=12345678 --header "X-API-Key: $API_KEY" \ --header "Accept: application/hal+json; charset=utf-8; version=1" ``` -------------------------------- ### Request Accept Header Source: https://iinlist.com/docs Header used to specify preferred media type and version. ```http Accept: application/hal+json; charset=utf-8; version=1 ``` -------------------------------- ### CSV Field Definitions Source: https://iinlist.com/docs List of fields included in the IINlist CSV file export. ```text scheme.name, product.name, product.segment, account.funding, account.country.code, account.currency.code, account.range.low, account.range.high, issuer.name, fast_funds.domestic, fast_funds.cross_border, range.type ``` -------------------------------- ### Response Content-Type Header Source: https://iinlist.com/docs The default Content-Type header returned by the API. ```http Content-Type: application/hal+json; charset=utf-8; version=1 ``` -------------------------------- ### Secure API Key Input in Terminal Source: https://iinlist.com/docs Use this pattern to prompt for an API key in a masked field and unset it after the request to prevent exposure in terminal history. ```bash read -s API_KEY && curl --request GET \ --url https://api.iinlist.com/cards \ --header "X-API-Key: $API_KEY" \ && unset API_KEY ``` -------------------------------- ### Handle 401 Unauthorized Response Source: https://iinlist.com/docs Representation of an HTTP 401 error response from the API. ```http HTTP/2 401 Content-Type: application/hal+json; charset=utf-8; version=1 ... {} ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.