{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"bdd7f568-4742-4d87-b1fb-59b689bf0073","name":"Turis API - Public","description":"Welcome to Turis API. Here are some pre-made requests for you to explore the API using Postman.\n\n## API Keys\n\nYou'll need your API keys, so if you don't have them, please go to your **Turis account** and generate a new API client on ...turis.app/oauth-clients page (or via Tools -> API Clients).\n\nThere is a **public key** (client_id) and a **private key** (client_secret) for your account.  \nThink of your private key like a password:\n\n\\* Store it securely  \n\\* Don't share it with anyone outside of your organisation  \n\\* Don't put it in any code on your website or in a Url that someone could find\n\nWith these values you can generate your private **access token**. This access token is specific to your account and acts as a password for a user, so do not share this access token. It may be revoked by the user at any time by request.\n\n## Setup\n\nNote: You'll need to create an environment in Postman.  \nSelect your environment, and enter your account's api keys in the CURRENT VALUE fields to set the environment variables:\n\n\\* **client_id** - your client ID from ...turis.app/oauth-clients page (or via Tools -> API Clients)  \n\\* **client_secret** - your client secret from ...turis.app/oauth-clients page (or via Tools -> API Clients)  \n\\* **tenant** - your account name excluding subdomains (e.g. test, not test.turis.app)\n\nNote: You need to run **/oauth/token** POST request before any other request to acquire your access token and set it for all next API cals automatically.\n\nNote: The calls have dependencies. A Retailer must be created before a Buyer and GET/UPDATE/DELETE calls will only work after an item is created with a POST request.\n\n## Webhooks\n\nYou can use webhook subscriptions to receive notifications about particular events in your shop.  \nTo subscribe to particular events that are fired in your shop use **/subscriptions** endpoint. After you've subscribed to a webhook (**event**), your app can execute code immediately after specific events occur in the shop.\n\nAvailable webhook events:\n\n\\* _buyer.created_  \n\\* _buyer.updated_  \n\\* _buyer.deleted_  \n\\* _company.created_  \n\\* _company.updated_  \n\\* _company.deleted_  \n\\* _product.created_  \n\\* _product.updated_  \n\\* _product.deleted_  \n\\* _order.created_  \n\\* _order.updated_  \n\\* _order.deleted_\n\n\\* order_lines.updated\n\nWhen subscribing to these events you need to provide a publicly accessible URL (**endpoint**) that HTTP requests can be sent to. To secure your data and your endpoint use HTTPS and pass a token (**state**) in every new subscription to make sure the request you receive was sent by Turis. Optionally, you can limit the IPs that can send data to your endpoint if you operate a firewall in front of your endpoint.\n\nAn example of data received by your endpoint:\n\n``` json\n{\n    \"subscription_id\": 6,\n    \"state\": \"gUYiYzABjgfW61QNVRSE\",\n    \"event\": \"product.deleted\",\n    \"resource_id\": 51\n}\n\n ```\n\nNote: Webhooks data does not contain a resource metadata. To retrieve it you can query the API for the metadata using **resource_id**","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"16452985","collectionId":"bdd7f568-4742-4d87-b1fb-59b689bf0073","publishedId":"TzkyP1Er","public":true,"publicUrl":"https://documenter-api.postman.tech/view/16452985/TzkyP1Er","privateUrl":"https://go.postman.co/documentation/16452985-bdd7f568-4742-4d87-b1fb-59b689bf0073","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.10.1","publishDate":"2022-08-05T12:04:26.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[{"name":"Turis production","id":"4b0e7265-4857-4db5-b490-3ae2a9ca3f1c","owner":"13291079","values":[{"key":"client_id","value":"2","enabled":true},{"key":"client_secret","value":"","enabled":true},{"key":"tenant","value":"api-testing","enabled":true},{"key":"base_url","value":"turis.app","enabled":true},{"key":"api_prefix","value":"api/public/v1","enabled":true},{"key":"schema","value":"https://","enabled":true},{"key":"token","value":"","enabled":true,"type":"default"},{"key":"algolia_apiKey","value":"","enabled":true,"type":"default"},{"key":"algolia_indexName","value":"","enabled":true,"type":"default"},{"key":"algolia_applicationID","value":"","enabled":true,"type":"default"}],"published":true}],"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"},{"label":"Turis production","value":"13291079-4b0e7265-4857-4db5-b490-3ae2a9ca3f1c"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/TzkyP1Er"}