{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"b7ea56c3-4e50-4781-8864-aa33c6fb7818","name":"Salesdock API","description":"## **Introduction**\n\nThe Salesdock API allows you to interact with an account in Salesdock. The API is RESTful and uses JSON to transport information.\n\nThe main use case for interacting with a Salsedock account through the API is to help in automated creation and retrieval of sales. Other than Sales, the API can also be used in interacting with other modules on Salesdock including Leads, Forms, Relations etc.\n\nThis documentation aims to provide comprehensive information on how developers can use the Salesdock API to build CRUD operations to manipulate information on Salesdock.\n\n---\n\n# API Basics\n\nEach API resource that you use will have a clearly defined path structure. This documentation contains a reference for each resource in the API.\n\nBefore you can use these resources, below is the basic structure of an API resource:\n\n## API Path\n\nThe Salesdock API path has the following structure:\n\n`https://app.salesdock.nl/api/testomgeving/v1/user/{{resource_path}}`\n\n\\* [https://app.salesdock.nl](https://app.salesdock.nl) - The production URL is [https://app.salesdock.nl](https://app.salesdock.nl) and for development purpose you can use the staging URL at [https://app-staging.salesdock.nl](https://app-staging.salesdock.nl).  \n\\* testomgeving - This is your account domain name.  \n\\* v1 - Version number of the API. Current version is 'v1'.  \n\\* user - The scope can either be 'user' or 'account'. This is explained in more detail in the \"Scope\" section below. For some specific resources, the scope is not needed and this is mentioned in the documentation in corresponding places.  \n\\* {{resource_path}} - This indicates the path of the resource you want to access. Each resource path and its details are defined in this documentation under the 'RESOURCES' section. Examples of resource paths are: /products to retrieve all products or /products/3465 to retrieve details of a specific product.\n\n## Requests\n\nThere are different approaches for making requests to our API. The command line tool cURL is easy and fast for testing our API. When you want to integrate the API into your own software, you can choose to use a general purpose REST library based on your application language. The documentation of each resource shows specific ways in which you can make request for each resource.\n\nA REST API uses HTTP methods to determine which action to perform on the resource. GET, POST, PUT and DELETE are some of the common methods used in the Salesdock API resources. The type of method is also indicated in the resource documentation.\n\nAn eg. cURL call to get list of products would be:\n\n`curl --location --request GET 'https://app.salesdock.nl/api/demo/v1/user/products' --header 'Authorization: Bearer ****' --header 'Accept: application/json'`\n\n## Response\n\nEach API request always returns an HTTP code as response. By looking at the code you can know the outcome of the API. Following response codes are returned by the Salesdock API:\n\n| Code | Reason | Description |\n| --- | --- | --- |\n| 200 | OK | Request was successful |\n| 201 | Created | Record was created |\n| 400 | Bad request | Request contains errors |\n| 401 | Unauthorized | Wrong API token |\n| 403 | Forbidden | No access to account/API token not whitelisted |\n| 404 | Not found | Entity not found |\n| 405 | Method Not Allowed | This endpoint is not available in this API |\n| 429 / 1015 | Too many requests | Throttling limit reached (see next section) |\n| 500 | Internal Error | Salesdock needs to fix this |\n\nThe structure of the API response generally follows the following template:\n\n``` json\n{\n \"success\": boolean, // Could be true or false, depending on if the API call was successful or not\n  \"data\": array // Response data\n  \"message\": \"\" // Success or failure messages\n}\n\n ```\n\n**Pagination**\n\nSome API resources, return the data paginated. This is true for resources that might have a lot of information to return. The number of records per page is by default 20, although this can be configured in the Salesdock application. A sample structure of a paginated response is as follows:\n\n``` json\n{\n \"success\": boolean, // Could be true or false, depending on if the API call was successful or not\n  \"data\": {\n    \"current_page\": int, // Current page number\n    \"data\": array, // This will contain all the returned data\n    \"first_page_url\": string, // URL to the first page\"\n    \"from\": int, // First record in this page\n    \"last_page\": int, // Last page number\n    \"last_page_url\": URL to the last page,\n    \"next_page_url\": null|int, URL to next page\n    \"path\": string, // Resource path\n    \"per_page\": int, Records shown per page\n    \"prev_page_url\": null,\n    \"to\": int, // Last record in this page\n    \"total\": int // Number of total records\n  }\n  \"message\": \"\" // Success or failure messages\n}\n\n ```\n\nSome endpoints, support cursor pagination. This helps in retrieving results faster but will not show the total number of results in the response. The sample response of the respective endpoints will show if it supports cursor pagination or not. There is a difference in the response structure as shown below. In this case, the developers need to use next_page_url and prev_page_url to traverse between next and previous pages.\n\n``` json\n{\n    \"success\": true,\n    \"data\": {\n        \"path\": \"\", // API URL path\n        \"per_page\": int, // number of results per page\n        \"next_cursor\": null|string, // token for next page\n        \"next_page_url\": null|string, // API url for next page\n        \"prev_cursor\": null|string, // token for previous page\n        \"prev_page_url\": null|string, // API url for previous page\n        \"data\": array // Response data\n    },\n    \"message\": \"\" // Response message\n}\n\n ```\n\n## Throttling (Rate limiting)\n\nTo prevent abuse of the Salesdock API, requests are throttled so that there is a limit to the number of requests that you can do. You can request the API at most 120 times every minute.\n\nThe throttling is based on the source IP and user. So only 120 requests can be requested per minute from one IP or by one API user.\n\nThe API will respond with a 429 or 1015; if you try to exceed this limit.\n\n---\n\n# Authentication\n\nIn order to access the Salesdock API, you have to be an authenticated user. Salesdock uses HTTP authentication via Bearer (token) authorization.\n\n## Generating an API token\n\nYour account admin can generate and provide you with the API token that you can use. Each API token is linked to a Salesdock user. Sometimes API tokens are IP specific and can only be accessed from the IP address(es) that were specified while creating the API token.\n\n## Authorization\n\nOnce you have an API token, it can be passed in the header of the request to authenticate your request:\n\n'Authorization: Bearer _\\*\\\\_'\n\n## Scope\n\nThere are 2 scopes for the API with different access privileges:\n\n\\* {{account}} - Account scope gives you access to information across the account.  \n\\* {{user}} - User scope gives you access for information that is only specific to the user.\n\nDepending on the role of the user in the Salesdock application, you can use the above scopes in the API calls.\n\n---\n\n# Changelog\n\nThis section contains details about historical changes to the Salesdock API.\n\n## 22-05-2026\n\n- Added customer_classification support in Create Energy NL business sales\n    \n\n## 28-05-2025\n\n- Endpoints to fetch statuses list for leads and forms\n    \n\n## 08-05-2025\n\n- New endpoint to fetch Lead results by period\n    \n\n## 02-05-2025\n\n- New endpoint to fetch Lead results by lead id\n    \n\n## 27-02-2025\n\n- Team information added to Get sale endpoint\n    \n\n## 29-10-2024\n\n- Multi-products sections information added to Get flow endpoint for default flows\n    \n\n## 14-10-2024\n\n- Update lead endpoints accepts relation_id\n    \n\n## 10-10-2024\n\n- Period search parameters added for Get products endpoint\n    \n\n## 26-09-2024\n\n- Leads history added to Get leads and Get lead enpoints\n    \n\n## 12-07-2024\n\n- Get sale endpoint changes to include products and totals\n    \n\n## 04-07-2024\n\n- Get agreement endpoint\n    \n\n## 14-06-2024\n\n- Changes in Get tasks and Get task endpoint to provide more information\n    \n- Added labels to Create Lead APIs\n    \n\n## 31-05-2024\n\n- New endpoint to fetch townships\n    \n- Changes to create lead form endpoint\n    \n\n## 22-04-2024\n\n- Extra fields and lead questions added to Get leads API response\n    \n\n## 09-04-2024\n\n- Update sale proposal for telecom sales\n    \n- Update finalized sales for default and telecom sales\n    \n\n## 29-03-2024\n\n- New endpoint to create optin for a sale\n    \n\n## 04-12-2023\n\n- Update sale proposal end pooint for default sales\n    \n\n## 24-10-2023\n\n- Product question rules as JSON\n    \n\n## 05-10-2023\n\n- New API endpoints to update lead as reseller and admin users\n    \n\n## 18-09-2023\n\n- New API endpoint to create, update and delete task\n    \n\n## 17-07-2023\n\n- New API endpoint to retrieve products of an organisation.\n    \n\n## 20-06-2023\n\n- New API endpoint to fetch lead forms\n    \n- New API endpoint to fetch lead form elements\n    \n\n## 02-06-2023\n\n- New API endpoint to fetch lead activities\n    \n- New API endpoint to fetch lead sources\n    \n\n## 25-04-2023\n\n- New API endpoint to update relation\n    \n\n## 13-03-2023\n\n- Get sale API response updated to include more information\n    \n\n## 27-02-2023\n\n- New API endpoint to update status of lead\n    \n- Changes in get product calculation endpoint to support multiple EAN codes.\n    \n\n## 13-01-2023\n\n\\* New API endpoint to fetch sale ids of form instance\n\n## 05-12-2022\n\n\\* New API endpoint to fetch tasks\n\n\\* New API endpoints to get task\n\n## 21-10-2022\n\n\\* New API endpoint to fetch Lead form PDF\n\n## 13-10-2022\n\n\\* New API endpoint to get form instances based on Sale ID\n\n## 20-08-2022\n\n\\* New API endpoint to retrieve products of a sale\n\n## 26-08-2022\n\n\\* New API endpoint to retrieve product questions answers of a sale  \n\\* Added sale extra fields to the get sale API endpoint\n\n## 09-08-2022\n\n\\* New API endpoint to create solar panel sale\n\n## 06-06-2022\n\n\\* New API endpoint to connect organisations to product  \n\\* New API endpoint to connect product to oraganisations\n\n## 03-06-2022\n\n\\* New API endpoints to create, update and delete organisations\n\n## 02-06-2022\n\n\\* New API endpoints to create, update and delete products\n\n## 19-05-2022\n\n\\* New API endpoints to view, create, update and delete suppliers\n\n## 13-05-2022\n\n\\* Changes in create concept transaction to support source_version and source_metadata  \n\\* New endpoint to get sales of concept transaction  \n\\* New endpoint to get view URL of sale\n\n## 10-02-2022\n\n\\* New API endpoint to create relation\n\n## 17-01-2022\n\n\\* New API endpoint to fetch list of agreements\n\n## 12-01-2022\n\n\\* New API endpoint to fetch list of leads\n\n## 21-12-2021\n\n\\* New API endpoint to fetch Belgium energy products with tariff and cost specifications.\n\n## 20-12-2021\n\n\\* New API endpoint to update energy product\n\n## 03-11-2021\n\n\\* New API endpoints for fetching and creating form instances  \n\\* New API endpoint for fetching list of relations.\n\n## 30-07-2021\n\n\\* New API endpoints added to get sales contracts\n\n## 07-05-2021\n\n\\* New endpoints to create leads and fetch leads\n\n## 16-04-2021\n\n\\* End point to get organisations and users\n\n## 26-03-2021\n\n\\* New endpoints for commissions added\n\n## 27-01-2021\n\n\\* API throttling changed to 60 calls per minute\n\n## 25-01-2021\n\n\\* external_reference added to create sale end-points\n\n## 17-11-2020\n\n\\* New API endpoint to update the status of a sale.\n\n\\* New API endpoint to get list of sale statuses.\n\n## 21-09-2020\n\n\\* New API endpoint to get energy usage estimate.  \n\\* New API endpoint to get products with energy tariffs and calculations.\n\n## 17-08-2020\n\n\\* User and organisation details added to create sale end points.  \n\\* New end point to get sales by different export templates.\n\n## 24-07-2020\n\n\\* New endpoint added for getting energy sales.\n\n## 25-06-2020\n\n\\* Parameters added in get sales call.  \n\\* Details on how to create completed/uncompleted offers and orders explained.\n\n## 09-04-2020\n\n\\* Get sales response changed.\n\n## 26-03-2020\n\n\\* Create concept transactions and lead APIs added.\n\n## 19-02-2020\n\n\\* Agreements validation in Create sales API.\n\n## 06-02-2020\n\n\\* First version of the API made public.\n\n---\n\n# Resources\n\nThe supported resources in the Salesdock API along with sample requests and responses can be seen in this section.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"10508713","team":746386,"collectionId":"b7ea56c3-4e50-4781-8864-aa33c6fb7818","publishedId":"SzKbMFge","public":true,"publicUrl":"https://developer.salesdock.nl","privateUrl":"https://go.postman.co/documentation/10508713-b7ea56c3-4e50-4781-8864-aa33c6fb7818","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.11.4","publishDate":"2021-02-04T16:11:28.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/bae558962812a0b602629fea3e321fc4f5b6c5292ada61ad4c26c5dffd5e49c2","favicon":"https://salesdock.nl/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://developer.salesdock.nl/view/metadata/SzKbMFge"}