{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"3a927ccb-1739-4a68-856d-a02253948d5d","name":"Public KYC Documentation","description":"Welcome to Creditro A/S API documentation.\n\n# Quickstart\n\nThe Creditro API is REST based, which is easy to work with and familiar to developers.  \nTo use the API, you need to create an account on our platform.\n\nYou will find our API at the following URL: [https://api.creditro.com](https://)\n\n#### 1\\. Obtaining an API token\n\nWhen you have an account you can acquire an API token from the [API tokens page](https://app.creditro.com/admin-center/integration/api). Click “Create token” at the top right corner of the page, give it a name and click “Generate”. Then you will see your token in appear in the list and you can copy it with the \"Copy\" button.\n\n#### **2\\. Set up authentication**\n\nRefer to the [Authentication &amp; API Token section](https://)\n\n#### 3\\. Acquire your “customerId”\n\nThe “customerId” is your account’s unique identifier and it is encoded in your API token. There are two ways you can go about this:\n\n- You can find it by using the “[jsonwebtoken](https://)\" npm package, which allows you to get the content of a JWT token without needing the secret key that it was signed with, using jwt.decode(). And then every time you need the key you would extract it from your API token.\n    \n- You can go to [jwt.io](https://), paste in your API token in the “Encoded” field in the debugger and you will see the decoded content of your token on the right side. Your “customerId” is the “customer” property in the payload.\n    \n\n#### 4\\. Get a list of your KYC cases\n\nIn order to fetch a list of your KYC cases you would need to call the [“Get KYC cases by customerId” endpoint](https://). Example:\n\n``` javascript\nconst jwt = require('jsonwebtoken');\nconst token = process.env.CREDITRO_API_TOKEN;\nconst customerId = jwt.decode(token).customer;\nconst kycCasesResponse = await axios.post(`process.env.CREDITRO_PUBLIC_API_URL/${customerId}`, {\n    headers: { 'Authorization': `Bearer ${token}` },\n});\nconst kycCases = kycCasesResponse.data.items;\n\n ```\n\n# Authentication & API Token usage\n\nCreditro uses token-based authentication. This means that you use a token on every request to authorize yourself.\n\nAfter [obtaining an access token](https://), you append it on every request using the following header: ``“Authorization: `Bearer ${apiToken}`”`` in order to successfully authenticate.\n\nWhere `apiToken` should be replaced with the token you just generated.\n\nCore resources on the left show API and description of all available endpoints\n\nYou can get more information about JWT [here](https://).\n\n# Best practice\n\nBe sure to read the entire documentation for the endpoints you are using, this will make sure that you have a complete overview of all the possibilities of the endpoint\n\n**Always check the status code**  \nMake sure you understand the HTTP Status code specification, how we apply it here at Creditro, and what some of the common issues is with the specific statuscodes\n\n| STATUSCODE | HTTP STATUS MEANING | COMMON MISTAKE |\n| --- | --- | --- |\n| 200 | OK | Everything is fine |\n| 201 | Created | Everything is fine, and here is an empty body |\n| 400 | Bad request | This oftens occurs when the required fields are not supplied in the API call. E.g not having a contact on a Invoice when trying to book it, or not suppling the newest timestamp |\n| 401 | Unauthorized | Something is wrong with your token, often it has expired |\n| 403 | Forbidden | You do not have access to the requested resource. We also use this statuscode when the requested organization doesnt have a valid Pro subscription |\n| 429 | Rate limited | You have exceeded the maximum amount of calls for a given timeperiod, wait a couple of minutes and continue |\n| 500 | Server error | This means that something is wrong on our end, and if it doesn't resolve within a couple of days please reach out to us |\n\n**Have a maximum retry policy**  \nAlways implement a maximum of retires, depending on the returned statuscode\n\nE.g: if we return 400, check the error response and update your integration to include the correct data. We reserve the right to disable credentials if itegrations misuse our API  \nE.g: if we return 500 for a range of requests, please pause these requests for some time before trying again\n\n**Try to limit your daily request count**  \nYou should always try to reduce the amount of daily requests to a minimum, we supply our API as a free to use service, we therefore require integrations to use it as efficient as possible.\n\nAlways make sure that you have read the entire documentation for a specific endpoint, we may meantion good solutions and how to use the endpoints correctly.\n\n# Throttling\n\nThere are no hard limit on the number of API requests per day but we enforce a fair use limit and requests will be rate-limited if too many calls are made within a short period of time. Rate limiting is considered on a per client basis.\n\nIf you hit the rate limit, this is the body of the HTTP 429 message that you will see: API calls quota exceeded! (...)\n\nWe constantly monitor the usage of our API to ensure that it is used as efficient as possible. If we detect that the API can be used more efficient or that the API resources are being exhausted by a single client integration and it is evaluated by Creditro to hurt the general service of the API to other customers, Creditro can decide to revoke the access for single clients. Creditro will always strive to solve such issues in dialog with the integrating partner before any counter measures are taken.\n\n# Batch jobs\n\nPlease contact us, if you need to run large jobs with more then 1000 companies, so we can find the right solution.\n\n# Character set and encoding\n\nThe web services listed use UTF-8 encoding.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"3407036","collectionId":"3a927ccb-1739-4a68-856d-a02253948d5d","publishedId":"TzJrBJnX","public":true,"publicUrl":"https://documenter-api.postman.tech/view/3407036/TzJrBJnX","privateUrl":"https://go.postman.co/documentation/3407036-3a927ccb-1739-4a68-856d-a02253948d5d","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.10.1","publishDate":"2021-04-15T17:03:16.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/768118b36f06c94b0306958b980558e6915839447e859fe16906e29d683976f0","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/TzJrBJnX"}