{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"a3dea688-15b8-40a1-bd29-1a05345c26f9","name":"Darwin API","description":"The Darwin API is a RESTful API that allows third party vendors and customers to connect and consume data from the Darwin system as well as to push data into the Darwin system.\n\n# Getting Started\n\nTo begin using Darwin RESTful API, complete the following steps:\n\n1. Get your credentials and API keys\n    \n2. Authenticate and get your tokens\n    \n3. Create your Authentication Header\n    \n4. Craft a Call\n    \n5. Create your sandbox\n    \n6. Test your Calls\n    \n\n# Step 1: Get your credentials and API Keys\n\nTo begin integrating with Darwin RESTful API, you first need to have your API authentication Credentials (`{{client_id}}` and `{{client_secret}}`). These will give you access to use the Darwin RESTful API. These are issued for each 3rd party vendor / integrator on each client\n\nThen you need to be get a `{{username}}`, `{{password}}` and `{{api_key}}`. These are also issued for each 3rd party vendor / integrator on each client. These will give you access and authorize you to pull and push data into that specific client (identified by the `{{api_key}}`).\n\n- **client_id** and **client_secret**: Issued for each 3rd party vendor / integrator on each client you want to connect to. Allows you to get access to the Darwin RESTful API\n    \n- **username** and **password**: Issued for each 3rd party vendor / integrator on each client you want to connect to. Authorizes you to pull and push data into a specific client\n    \n- **api_key**: Issued for each 3rd party vendor / integrator on each client you want to connect to. Identifies the client to which you will get connected to pull and push data.\n    \n\nYou need to contact the manager of the client to whose data you would like to connect to get issued all these API authentication credentials and Keys\n\n# Step 2. Authenticate and get your tokens\n\nOnce you get all the API Authentication credentials and keys, you get a `{{token}}` and a `{{refresh_token}}`\n\nIn order to get these tokens, you need to make an HTTP Request to our `login` resource. You will need the `{{client_id}}`, `{{client_secret}}`, `{{api_key}}`, `{{username}}` and `{{password}}` to craft the request.\n\nIf successfully done, the request response will give you the `{{token}}` and the `{{refreshToken}}`\n\n- **token**: Use this value to make any other request to any other resource in the Darwin RESTful API. This token will be valid for 24 hours.\n    \n- **refreshToken**: Get this value and save it in a secure place. You will need this in order to renew your `{{token}}` when it expires. For this, you will simply need to call the `Refresh-token` resource in the Darwin RESTful API. This will generate a new token in replacement of the expired one and it will also issue you a new `{{refreshToken}}` token to replace the previous one. You will always need to use the updated `{{refreshToken}}` in order to successfully call the `Refresh-token` resource.\n    \n\n# Step 3. Create your Authentication Header\n\nDarwin RESTful API relies on Basic access authentication over HTTPS using the `{{username}}` and `{{token}}` as the username and password values. These unique values are combined with a colon and then encoded using the RFC2045-MIME variant of Base64. The encoded string is then added to the HTTP `Authorization` header. For example, if you have the following API credentials and token value:\n\n- **username**: [test@mail.com](https://mailto:test@mail.com)\n    \n- **token**: 315c7649520edde96c5cbad59a5b265f\n    \n\nThe value of the `Authorization` header field would look like the following:\n\n```\ndGVzdEBtYWlsLmNvbTozMTVjNzY0OTUyMGVkZGU5NmM1Y2JhZDU5YTViMjY1Zg==\n\n ```\n\nSeveral different online tools can help you create your `Authorization` header, such as Postman. You can also add Base64 encoding to HMAC requests to automatically convert the API Access ID and API Secure Key values into the encoded ASCII string. To do so, use the following code:\n\n```\nConvert.ToBase64String(Encoding.Default.GetBytes(`{{username}}` + \":\" + `{{token}}`)).Trim()\n\n ```\n\n**NOTE:** This authorization header is required to be sent for all Darwin API RESTful resources except `login` and `refresh-token`\n\n# Step 4. Craft a Call\n\nThe following sections detail everything you'll need to create a request call. The API Reference section lists and explains all the resources you can use and provides samples of common requests and responses.\n\n## API Base URI\n\nThe base URL to use for all the API resources is:\n\n| base_url | Environment |\n| --- | --- |\n| api.darwin.cloud | Production |\n| api.darwin.cloud | Sandbox |\n\n**NOTE:** To get access to the sandbox, please request the client a different set of API authentication credentials\n\n# Step 5. Create your Sandbox\n\nTo starting practising and getting used to how the Darwin RESTful API works, you can now create your Sandbox environment in which you will be able to make as many calls as you need to any of the Darwin API resources without touching anything on the production environment.\n\nTo create and manage your Sandbox, you need to make an HTTP Request to our `sandbox` resources. You will need a `{{token}}` to do it. You will receive in response a `{{SandboxGUID}}` value that you can later use to query The sandbox status and check if it is ready to use. You can also use this `{{SandboxID}}` to drop a sandbox and then recreate another one.\n\nPlease refer to the **`Sandbox`** section of this document to learn about these resources.\n\n# Step 6. Test your Calls\n\nTo help you gain a greater understanding of how Darwin RESTful API works, we've built a [Postman collection](https://www.getpostman.com/collections/4d76764f22815bf88441) of sample REST requests that you can use to test each resource.\n\n**NOTE:** While we've included sample body parameters in this collection of request calls, you'll still need to add the URLs and Authentication Headers described in Step above.\n\n# Credentials Expiration Period\n\nBe aware that all credentials (`{{username}}` and `{{password}}`) have an expiration of 42 days. After that period of time, the credentails are not longer valid and you will not be able to do a request to the `login` resource.\n\nHowever, if your credentials have expired but your `{{token}}` has not yet expired, you will still be able to use this `{{token}}` to access any Darwin RESTful API resource. This will work up to the `{{token}}` expiration date.\n\nIn summary, if you have a `{{token}}` that is not yet expired, you can use it to access any Darwin API RESTful resource until the expiration date, without the need to request a new `{{token}}` to the `login` resource every time you connect to the Darwin RESTful API.\n\n# Refresh Tokens\n\nIf your `{{token}}` has already expired, the best way to get a new `{{token}}` is using the `Refresh-token` you were provided when you first got your `{{token}}.`In the response of the `login` resource you should have given a `{{token}}` and a `Refresh-token`. Use the `Refresh-token` to get issued a new updated not-expired `{{token}}` so that you can continue using the Darwin RESTful API resources.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"3591617","team":1879621,"collectionId":"a3dea688-15b8-40a1-bd29-1a05345c26f9","publishedId":"TzRU9mSp","public":true,"publicUrl":"https://darwinAPIDoc.transactionplan.com","privateUrl":"https://go.postman.co/documentation/3591617-a3dea688-15b8-40a1-bd29-1a05345c26f9","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.10.1","publishDate":"2025-08-04T15:03:07.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":null,"logoDark":null}},"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/79c5ff3bd2c17fd08119524ba4f130d865485f43d7149e34b21a412ec87e97aa","favicon":"https://transactionplan.com/favicon.ico"},"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://darwinapidoc.transactionplan.com/view/metadata/TzRU9mSp"}