{"_id":"5b1e979b92efb200034fa48e","__v":17,"api":{"url":"","auth":"required","params":[],"results":{"codes":[]},"settings":""},"category":"5b1e979b92efb200034fa3ef","isReference":false,"link_external":false,"version":"5b1e979b92efb200034fa493","body":"Amber Engine provides an API for retrieving product data. To inquire about access, contact [sales@amberengine.com](mailto:sales@amberengine.com).\n\nThe API is located at: `api.amberengine.com`\n\nThe API supports [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS), enabling requests to originate from client-side interfaces. All requests to the API must use [SSL/TLS](https://developer.mozilla.org/en-US/docs/Web/Security/Transport_Layer_Security) to ensure that your credentials and product data are transmitted securely. Non-secure requests will be denied.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"API Status Codes\"\n}\n[/block]\nThis API uses conventional [HTTP Status Codes](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) to indicate the success or failure of an API call. Any successful API call will result in a 200 HTTP status code.\n[block:api-header]\n{\n  \"title\": \"Common HTTP Status Codes\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Code\",\n    \"h-1\": \"Name\",\n    \"0-0\": \"200\",\n    \"0-1\": \"Ok\",\n    \"2-0\": \"401\",\n    \"2-1\": \"Unauthorized\",\n    \"3-0\": \"403\",\n    \"3-1\": \"Access Forbidden\",\n    \"4-0\": \"404\",\n    \"4-1\": \"Not Found\",\n    \"5-0\": \"405\",\n    \"5-1\": \"Method Not Allowed\",\n    \"6-0\": \"406\",\n    \"6-1\": \"Not Acceptable\",\n    \"7-0\": \"410\",\n    \"7-1\": \"Gone\",\n    \"8-0\": \"415\",\n    \"8-1\": \"Unsupported Media Type\",\n    \"9-0\": \"440\",\n    \"9-1\": \"Authentication Timeout\",\n    \"10-0\": \"500\",\n    \"10-1\": \"API malfunction\",\n    \"11-0\": \"501\",\n    \"11-1\": \"Not Implemented\",\n    \"1-0\": \"400\",\n    \"1-1\": \"Bad Request\"\n  },\n  \"cols\": 2,\n  \"rows\": 12,\n  \"sidebar\": true\n}\n[/block]\n\nThe API uses [HTTP Basic Auth](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#Basic_authentication_scheme) over SSL/TLS to authenticate client requests. Credentials are provided by Amber Engine. Please contact  [sales@amberengine.com](mailto:sales@amberengine.com) to inquire about access.\n\nTo authenticate requests, you include your username and password in the `Authorization` header as defined by the  [HTTP Basic Auth client-side protocol](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#Basic_authentication_scheme).\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -u bob:hunter2 https://api.amberengine.com/products\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"import requests\\nfrom requests.auth import HTTPBasicAuth\\n\\nauth = HTTPBasicAuth(\\\"bob\\\", \\\"hunter2\\\")\\nresponse = requests.get(\\\"https://api.amberengine.com\\\", auth=auth)\\n\\nprint(response.text)\",\n      \"language\": \"python\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Auth Example\",\n  \"body\": \"We're using the username `bob` and password `hunter2` for authentication examples throughout the rest of this documentation.\\n\\nYour username and password will be different.\"\n}\n[/block]","createdAt":"2016-05-17T15:26:38.848Z","project":"571e47385536c12000f51b34","slug":"errors","title":"Getting Started","type":"basic","excerpt":"Introduction to the API","githubsync":"","hidden":false,"order":0,"parentDoc":null,"updates":[],"link_url":"","sync_unique":"","user":"5730dae3b16ed73200ddd25c","next":{"description":"","pages":[]},"childrenPages":[]}

Getting Started

Introduction to the API

Amber Engine provides an API for retrieving product data. To inquire about access, contact [sales@amberengine.com](mailto:sales@amberengine.com). The API is located at: `api.amberengine.com` The API supports [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS), enabling requests to originate from client-side interfaces. All requests to the API must use [SSL/TLS](https://developer.mozilla.org/en-US/docs/Web/Security/Transport_Layer_Security) to ensure that your credentials and product data are transmitted securely. Non-secure requests will be denied. [block:api-header] { "type": "basic", "title": "API Status Codes" } [/block] This API uses conventional [HTTP Status Codes](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) to indicate the success or failure of an API call. Any successful API call will result in a 200 HTTP status code. [block:api-header] { "title": "Common HTTP Status Codes", "sidebar": true } [/block] [block:parameters] { "data": { "h-0": "Code", "h-1": "Name", "0-0": "200", "0-1": "Ok", "2-0": "401", "2-1": "Unauthorized", "3-0": "403", "3-1": "Access Forbidden", "4-0": "404", "4-1": "Not Found", "5-0": "405", "5-1": "Method Not Allowed", "6-0": "406", "6-1": "Not Acceptable", "7-0": "410", "7-1": "Gone", "8-0": "415", "8-1": "Unsupported Media Type", "9-0": "440", "9-1": "Authentication Timeout", "10-0": "500", "10-1": "API malfunction", "11-0": "501", "11-1": "Not Implemented", "1-0": "400", "1-1": "Bad Request" }, "cols": 2, "rows": 12, "sidebar": true } [/block] The API uses [HTTP Basic Auth](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#Basic_authentication_scheme) over SSL/TLS to authenticate client requests. Credentials are provided by Amber Engine. Please contact [sales@amberengine.com](mailto:sales@amberengine.com) to inquire about access. To authenticate requests, you include your username and password in the `Authorization` header as defined by the [HTTP Basic Auth client-side protocol](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#Basic_authentication_scheme). [block:code] { "codes": [ { "code": "curl -u bob:hunter2 https://api.amberengine.com/products", "language": "curl" }, { "code": "import requests\nfrom requests.auth import HTTPBasicAuth\n\nauth = HTTPBasicAuth(\"bob\", \"hunter2\")\nresponse = requests.get(\"https://api.amberengine.com\", auth=auth)\n\nprint(response.text)", "language": "python" } ] } [/block] [block:callout] { "type": "info", "title": "Auth Example", "body": "We're using the username `bob` and password `hunter2` for authentication examples throughout the rest of this documentation.\n\nYour username and password will be different." } [/block]
Amber Engine provides an API for retrieving product data. To inquire about access, contact [sales@amberengine.com](mailto:sales@amberengine.com). The API is located at: `api.amberengine.com` The API supports [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS), enabling requests to originate from client-side interfaces. All requests to the API must use [SSL/TLS](https://developer.mozilla.org/en-US/docs/Web/Security/Transport_Layer_Security) to ensure that your credentials and product data are transmitted securely. Non-secure requests will be denied. [block:api-header] { "type": "basic", "title": "API Status Codes" } [/block] This API uses conventional [HTTP Status Codes](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) to indicate the success or failure of an API call. Any successful API call will result in a 200 HTTP status code. [block:api-header] { "title": "Common HTTP Status Codes", "sidebar": true } [/block] [block:parameters] { "data": { "h-0": "Code", "h-1": "Name", "0-0": "200", "0-1": "Ok", "2-0": "401", "2-1": "Unauthorized", "3-0": "403", "3-1": "Access Forbidden", "4-0": "404", "4-1": "Not Found", "5-0": "405", "5-1": "Method Not Allowed", "6-0": "406", "6-1": "Not Acceptable", "7-0": "410", "7-1": "Gone", "8-0": "415", "8-1": "Unsupported Media Type", "9-0": "440", "9-1": "Authentication Timeout", "10-0": "500", "10-1": "API malfunction", "11-0": "501", "11-1": "Not Implemented", "1-0": "400", "1-1": "Bad Request" }, "cols": 2, "rows": 12, "sidebar": true } [/block] The API uses [HTTP Basic Auth](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#Basic_authentication_scheme) over SSL/TLS to authenticate client requests. Credentials are provided by Amber Engine. Please contact [sales@amberengine.com](mailto:sales@amberengine.com) to inquire about access. To authenticate requests, you include your username and password in the `Authorization` header as defined by the [HTTP Basic Auth client-side protocol](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#Basic_authentication_scheme). [block:code] { "codes": [ { "code": "curl -u bob:hunter2 https://api.amberengine.com/products", "language": "curl" }, { "code": "import requests\nfrom requests.auth import HTTPBasicAuth\n\nauth = HTTPBasicAuth(\"bob\", \"hunter2\")\nresponse = requests.get(\"https://api.amberengine.com\", auth=auth)\n\nprint(response.text)", "language": "python" } ] } [/block] [block:callout] { "type": "info", "title": "Auth Example", "body": "We're using the username `bob` and password `hunter2` for authentication examples throughout the rest of this documentation.\n\nYour username and password will be different." } [/block]
{"_id":"5b1eb8669410c700033dbb5c","project":"571e47385536c12000f51b34","version":"5b1e979b92efb200034fa493","category":"5b1eb3c70b0bd20003cebe0f","user":"5b1e92190b0bd20003ceba27","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-06-11T17:59:02.462Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"method":"get","examples":{"codes":[{"language":"curl","code":"curl -u bob:hunter2 https://api.amberengine.com/"},{"language":"python","code":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nauth = HTTPBasicAuth(\"bob\", \"hunter2\")\nresponse = requests.get(\"https://api.amberengine.com\", auth=auth)\n\nprint(response.text)"}]},"results":{"codes":[{"status":200,"language":"text","code":"awaiting requests","name":""},{"status":400,"language":"html","code":"<html>\n  <head>\n    <title>Bad Request</title>\n  </head>\n  <body>\n    <h1><p>Bad Request</p></h1>\n\n  </body>\n</html>","name":""},{"status":500,"language":"html","code":"<html>\n  <head>\n    <title>Internal Server Error</title>\n  </head>\n  <body>\n    <h1><p>Internal Server Error</p></h1>\n\n  </body>\n</html>"}]},"settings":"","auth":"optional","params":[],"url":"/"},"isReference":false,"order":0,"body":"The health check route will always return a `200` HTTP status code if the Amber Engine API is operating normally. Any other status code indicates there is a service disruption.","excerpt":"Public route for keepalive checks.","slug":"health-check","type":"get","title":"Health Check","__v":0,"parentDoc":null,"childrenPages":[]}

getHealth Check

Public route for keepalive checks.

The health check route will always return a `200` HTTP status code if the Amber Engine API is operating normally. Any other status code indicates there is a service disruption.

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



The health check route will always return a `200` HTTP status code if the Amber Engine API is operating normally. Any other status code indicates there is a service disruption.
{"_id":"5b1ed7620b0bd20003cec341","project":"571e47385536c12000f51b34","version":"5b1e979b92efb200034fa493","category":"5b1eb3c70b0bd20003cebe0f","user":"5730dae3b16ed73200ddd25c","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-06-11T20:11:14.422Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"method":"get","examples":{"codes":[]},"results":{"codes":[{"status":302,"language":"html","code":"<html>\n <head>\n  <title>302 Found</title>\n </head>\n <body>\n  <h1>302 Found</h1>\n  The resource was found at https://amberengine.readme.io/docs; you should be redirected automatically.\n\n\n </body>"}]},"settings":"","auth":"required","params":[],"url":"/docs"},"isReference":false,"order":1,"body":"Responds with a 302 redirect, sending clients to the documentation site at [amberengine.readme.io](amberengine.readme.io).","excerpt":"","slug":"documentation","type":"get","title":"Documentation","__v":0,"parentDoc":null,"childrenPages":[]}

getDocumentation


Responds with a 302 redirect, sending clients to the documentation site at [amberengine.readme.io](amberengine.readme.io).

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Responds with a 302 redirect, sending clients to the documentation site at [amberengine.readme.io](amberengine.readme.io).
{"_id":"5b1eb632e90e5c0003676ecc","project":"571e47385536c12000f51b34","version":"5b1e979b92efb200034fa493","category":"5b1eb3c70b0bd20003cebe0f","user":"5b1e92190b0bd20003ceba27","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-06-11T17:49:38.685Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"method":"get","examples":{"codes":[{"language":"curl","code":"curl -u bob:hunter2 https://api.amberengine.com/products?limit=2&offeset=1"},{"language":"python","code":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nauth = HTTPBasicAuth(\"bob\", \"hunter2\")\nresponse = requests.get(\"https://api.amberengine.com/products?limit=2&offeset=1\", auth=auth)\n\nprint(response.text)"}]},"results":{"codes":[{"status":200,"language":"json","code":"[{\n  \"_unique_id\": \"PRD_2\",\n  \"sku\": \"2\"\n}, {\n  \"_unique_id\": \"PRD_3\",\n  \"sku\": \"3\"\n}]","name":""},{"status":400,"language":"html","code":"<html>\n  <head>\n    <title>Bad Request</title>\n  </head>\n  <body>\n    <h1><p>Bad Request</p></h1>\n\n  </body>\n</html>","name":""},{"status":500,"language":"html","code":"<html>\n  <head>\n    <title>Internal Server Error</title>\n  </head>\n  <body>\n    <h1><p>Internal Server Error</p></h1>\n\n  </body>\n</html>"}]},"settings":"","auth":"required","params":[{"_id":"5b1eb632e90e5c0003676ecf","ref":"","in":"query","required":false,"desc":"Optional maximum number of products per request.","default":"100","type":"int","name":"limit"},{"_id":"5b1eb632e90e5c0003676ece","ref":"","in":"query","required":false,"desc":"Optional zero-indexed displacement from the start of the query result.","default":"0","type":"int","name":"offset"}],"url":"/products"},"isReference":false,"order":2,"body":"Return a JSON list of product information made available to your account. You may provide a `limit` and `offset` to iterate over the available products.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Product Data Scheme\",\n  \"body\": \"The JSON response shown is an example only. The JSON you receive may be different.\",\n  \"sidebar\": true\n}\n[/block]","excerpt":"List available products","slug":"products","type":"get","title":"List Products","__v":14,"parentDoc":null,"childrenPages":[]}

getList Products

List available products

Query Params

limit:
integer100
Optional maximum number of products per request.
offset:
integer0
Optional zero-indexed displacement from the start of the query result.
Return a JSON list of product information made available to your account. You may provide a `limit` and `offset` to iterate over the available products. [block:callout] { "type": "info", "title": "Product Data Scheme", "body": "The JSON response shown is an example only. The JSON you receive may be different.", "sidebar": true } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Return a JSON list of product information made available to your account. You may provide a `limit` and `offset` to iterate over the available products. [block:callout] { "type": "info", "title": "Product Data Scheme", "body": "The JSON response shown is an example only. The JSON you receive may be different.", "sidebar": true } [/block]
{"_id":"5b1eb697e90e5c0003676ef2","project":"571e47385536c12000f51b34","version":"5b1e979b92efb200034fa493","category":"5b1eb3c70b0bd20003cebe0f","user":"5b1e92190b0bd20003ceba27","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-06-11T17:51:19.940Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[{"status":200,"language":"json","code":"[{\n  \"_unique_id\": \"PRD_5\",\n  \"sku\": \"5\"\n}, {\n  \"_unique_id\": \"PRD_4\",\n  \"sku\": \"4\"\n}, {\n  \"_unique_id\": \"PRD_3\",\n  \"sku\": \"3\"\n}, {\n  \"_unique_id\": \"PRD_2\",\n  \"sku\": \"2\"\n}, {\n  \"_unique_id\": \"PRD_1\",\n  \"sku\": \"1\"\n}]","name":""},{"status":400,"language":"html","code":"<html>\n  <head>\n    <title>Bad Request</title>\n  </head>\n  <body>\n    <h1><p>Bad Request</p></h1>\n\n  </body>\n</html>","name":""},{"code":"<html>\n  <head>\n    <title>Internal Server Error</title>\n  </head>\n  <body>\n    <h1><p>Internal Server Error</p></h1>\n\n  </body>\n</html>","language":"html","status":500}]},"examples":{"codes":[{"code":"curl -X POST -d '{\"sort\": [{\"sku\": \"desc\"}]}' -u \"bob:hunter2\" https://api.amberengine.com/products --header \"Content-Type: application/text+json\"","language":"curl"},{"code":"import requests\nfrom requests.auth import HTTPBasicAuth\n\nauth = HTTPBasicAuth(\"bob\", \"hunter2\")\nsorting = {\"sort\": [{\"sku\": \"desc\"}]}\n\nresponse = requests.post(\n    \"https://api.amberengine.com/products\",\n    json=sorting,\n    auth=auth,\n)\nprint(response.text)","language":"python"}]},"method":"post","auth":"required","params":[{"_id":"5b1eb632e90e5c0003676ecf","ref":"","in":"query","required":false,"desc":"Optional maximum number of products per request.","default":"100","type":"int","name":"limit"},{"_id":"5b1eb632e90e5c0003676ece","ref":"","in":"query","required":false,"desc":"Optional zero-indexed displacement from the start of the query result.","default":"0","type":"int","name":"offset"},{"_id":"5b1eb7c80b0bd20003cebe96","ref":"","in":"body","required":true,"desc":"A list of JSON objects, where each object contains one key/value pair. The key is the field namespace and the value is either \"asc\" or \"desc\".","default":"","type":"string","name":"sort"},{"_id":"5b1eb7c80b0bd20003cebe95","ref":"","in":"header","required":false,"desc":"Must request \"application/json\".","default":"","type":"string","name":"Content-Type"}],"url":"/products"},"isReference":false,"order":3,"body":"Return a JSON list of product information made available to your account. You may provide a `limit` and `offset` to iterate over the available products. The products will be sorted using the keys you provided.\n\nMultiple sorting keys are supported, and will be applied in the order they are provided in the request.","excerpt":"Sort available products","slug":"sort-products","type":"post","title":"Sort Products","__v":12,"parentDoc":null,"childrenPages":[]}

postSort Products

Sort available products

Query Params

limit:
integer100
Optional maximum number of products per request.
offset:
integer0
Optional zero-indexed displacement from the start of the query result.

Body Params

sort:
required
string
A list of JSON objects, where each object contains one key/value pair. The key is the field namespace and the value is either "asc" or "desc".

Headers

Content-Type:
string
Must request "application/json".
Return a JSON list of product information made available to your account. You may provide a `limit` and `offset` to iterate over the available products. The products will be sorted using the keys you provided. Multiple sorting keys are supported, and will be applied in the order they are provided in the request.

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Return a JSON list of product information made available to your account. You may provide a `limit` and `offset` to iterate over the available products. The products will be sorted using the keys you provided. Multiple sorting keys are supported, and will be applied in the order they are provided in the request.