{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"0545276d-7b0c-4763-9194-e3b4c9b40897","name":"RetailOS Integration guide","description":"**This documentation is designed to help third parties perform integrations with RetailOS.**\n\n# RetailOS REST API interface\n\n# 1. Introduction\nIn order to perform inbound integrations, RetailOS exposes a public API for external services to push updates to. This API generally aims to follow REST principles in order to have a consistent interface. With this in mind, it could also be polled for updates for outbound intgrations, as an alternative to the webhooks (see below).\n\n---\n\n# 2. Quick start\nIn order to get started with interacting with the RetailOS public API, you will require the following information from Red Ant:\n- **Swagger interactive UI URL:** URL with endpoint definitions\n- **Authentication API key header:** e.g. `Authorization: API_KEY <your api key here>`\n\nYou will then be able to interact with RetailOS resources. View the [RetailOS SwaggerUI interface](https://digital-store-api-qa.redant.cloud/v2/public/docs)\n\n---\n\n# 3. Transfer protocol and infrastructure\n- **HTTPS:** RetailOS APIs are designed to accept HTTPS connections.\n\n---\n\n\n# 4. Authentication and security\n- **API Key**: An Authorization header will be required in the request containing the API key provided by RedAnt.\n- **IP Whitelisting**: RetailOS can whitelist a set of IP addresses in order to ensure only expected services are communicating with the API\n\n---\n\n# 5. Upserts\nIt is advised to use an idempotent mechanism to push updates to RetailOS. for this reason, most resources in the public API will have a PUT method which behaves as an upsert. The record will be validated to ensure it has the nessasary fields required to create, but will update an existing record, should the external id match.\n\nFor this reason, it is advisable to send full objects to the PUT endpoint with the external id correctly set (in the URL) and the API will update or create.\n\nOther HTTP methods will behave conventionally (POST/PUT).\n\n\n---\n\n# 6. Endpoint implementation\nThe following are assumed expectations when making a request to any of the RetailOS public endpoints.\n\n## Content type\nRetailOS uses JSON as the content type in it's APIs. The following request headers are assumed:\n```\nContent-Type: application/json\nAccept: application/json\n```\n\n## HTTP request body\nRetailOS expects a JSON object as a request body with the fields that match the resource entity model (defined in the Swagger docs). For example, a customer JSON subset request body will be expected to have a shape similar to:\n```json\n{\n    \"externalCustomerId\": \"example-customer-id\",\n    \"title\": \"Mr\",\n    \"gender\": \"Female\",\n    \"firstName\": \"Example\",\n    \"lastName\": \"Customer\",\n    \"telephone\": \"+44 8800000000\",\n    \"email\": \"email@example.com\",\n    \"dob\": \"01/01/1904\",\n    \"generalMarketing\": false,\n    \"thirdPartyMarketing\": false,\n    \"address\": {\n        \"city\": \"\",\n        \"county\": \"\",\n        \"country\": \"\",\n        \"address1\": \"\",\n        \"address2\": \"\",\n        \"postCode\": \"\"\n    }\n}\n```\n\nPlease see the up to date resource object model definitions at the [RetailOS SwaggerUI interface](https://digital-store-api-qa.redant.cloud/v2/public/docs)\n\n## HTTP response body\nRetailOS aims to have a consistent shape for HTTP responses in order to aid implementation. Every response will be a JSON object with the result under the property `result` and errors under `error`\n\nExample successful response\n```json\n{\n  \"error\": null,\n  \"result\": [\n    {\n      \"id\": \"e92ae5e1-8a9e-4b3e-9c67-d1dfb08f19a2\",\n      \"queueName\": \"scv:customer:upsert\",\n      \"status\": \"queued\",\n      \"createdAt\": \"2020-03-19T10:14:23.707Z\",\n      \"$$ref\": \"#/components/schemas/JobQueueMeta/example\"\n    }\n  ]\n}\n```\n\nExample unsuccessful response\n```json\n{\n  \"error\": {\n    \"code\": \"UNAUTHORIZED\",\n    \"message\": \"Request unauthorized\",\n    \"details\": {}\n  },\n  \"result\": null\n}\n```\n\nPlease see the up to date resource object model definitions at the [ RetailOS SwaggerUI interface](https://digital-store-api-qa.redant.cloud/v2/public/docs)\n\n\n## HTTP response status codes\nRetailOS will use the HTTP status codes to determine whether an integration was successful/unsuccessful\n- `2xx` responses are considered successful requests\n- `4xx` responses are considered bad requests\n- `5xx` responses should not occur. Contact Red Ant for any 5xx requests.\n- `404` responses will be returned when a resource is not found, or a route is not found. The response body error message will need to be parsed.\n\n## HTTP response headers\nRetailOS will set the following response headers in order to aid debugging.\n- `X-Ra-Request-Id` Request unique identifier in order to help trace errors\n- `X-Ra-Request-Timestamp` ISO timestamp the request was processed on the server\n- `X-Ra-Server-Version` Server version number\n\n---\n\n# 7. Examples\n\nExample endpoint implementation for singular customer updates (Node.js + Express)\n\nAn example of a cURL request querying **customer** records:\n\n```sh\ncurl --verbose 'http://localhost/v2/public/customers?limit=3&sort=-updatedAt&fields=id,externalCustomerId,firstName,lastName,email,createdAt,updatedAt' \\\n--header 'Authorization: API_KEY <api key>' \\\n--header 'Content-Type: application/json'\n\n# * TCP_NODELAY set\n# * Connected to localhost (127.0.0.1) port 80 (#0)\n# > GET /v2/public/customers?limit=3&sort=-updatedAt&fields=id,externalCustomerId,firstName,lastName,email,createdAt,updatedAt HTTP/1.1\n# > Host: localhost\n# > User-Agent: curl/7.64.1\n# > Accept: */*\n# > Authorization: API_KEY <api key>\n# > Content-Type: application/json\n# > \n# < HTTP/1.1 200 OK\n# < Access-Control-Allow-Origin: *\n# < X-Ra-Request-Id: a1dba900-4d6f-4cd5-aea9-db8a3e07d3f5\n# < X-Ra-Server-Version: 2.11.29\n# < X-Ra-Request-Timestamp: 2020-03-31T14:40:51.050Z\n# < Content-Type: application/json; charset=utf-8\n# < Content-Length: 966\n# < \n# { [966 bytes data]\n# 100   966  100   966    0     0   7430      0 --:--:-- --:--:-- --:--:--  7430\n# * Connection #0 to host localhost left intact\n# * Closing connection 0\n\n{\n  \"statusCode\": 200,\n  \"statusMessage\": \"OK\",\n  \"userMessage\": \"Customers\",\n  \"error\": null,\n  \"meta\": {\n    \"requestId\": \"a1dba900-4d6f-4cd5-aea9-db8a3e07d3f5\",\n    \"requestTimestamp\": \"2020-03-31T14:40:51.050Z\"\n  },\n  \"action\": \"CUSTOMER_GET_ALL\",\n  \"result\": {\n    \"count\": 16819,\n    \"rows\": [\n      {\n        \"id\": \"e876d808-805b-4d6f-9566-63aa0ad0ec86\",\n        \"externalCustomerId\": \"john.d@example.com\",\n        \"firstName\": \"John\",\n        \"lastName\": \"Doe\",\n        \"email\": \"john.d@example.com\",\n        \"createdAt\": \"2020-01-06T17:31:54.276Z\",\n        \"updatedAt\": \"2020-02-19T12:00:20.570Z\"\n      },\n      {\n        \"id\": \"89b7637a-a354-464c-9ed4-71124076b2df\",\n        \"externalCustomerId\": \"analytic@email.com\",\n        \"firstName\": \"analytics\",\n        \"lastName\": \"test\",\n        \"email\": \"analytic@email.com\",\n        \"createdAt\": \"2020-02-03T10:01:44.086Z\",\n        \"updatedAt\": \"2020-02-18T12:49:15.702Z\"\n      },\n      {\n        \"id\": \"b451606f-62fe-4775-8b4e-b9c39a739b67\",\n        \"externalCustomerId\": \"james.dean@example.com\",\n        \"firstName\": \"James\",\n        \"lastName\": \"Dean\",\n        \"email\": \"james.dean@example.com\",\n        \"createdAt\": \"2019-05-23T15:51:59.785Z\",\n        \"updatedAt\": \"2020-02-17T15:09:06.395Z\"\n      }\n    ]\n  }\n}\n```\n\nexample cURL request fetching a customer by id:\n\n```sh\ncurl --verbose 'http://localhost/v2/public/customers/e876d808-805b-4d6f-9566-63aa0ad0ec86' \\\n--header 'Authorization: API_KEY <api key>' \\\n--header 'Content-Type: application/json'\n\n# * TCP_NODELAY set\n# * Connected to localhost (127.0.0.1) port 80 (#0)\n# > GET /v2/public/customers/e876d808-805b-4d6f-9566-63aa0ad0ec86 HTTP/1.1\n# > Host: localhost\n# > User-Agent: curl/7.64.1\n# > Accept: */*\n# > Authorization: API_KEY <api key>\n# > Content-Type: application/json\n# > \n# < HTTP/1.1 200 OK\n# < Access-Control-Allow-Origin: *\n# < X-Ra-Request-Id: c9912e0e-9e04-4183-9ba0-6c5f13a4832a\n# < X-Ra-Server-Version: 2.11.29\n# < X-Ra-Request-Timestamp: 2020-03-31T14:44:56.370Z\n# < Content-Type: application/json; charset=utf-8\n# < Content-Length: 1434\n# < \n# { [1434 bytes data]\n# 100  1434  100  1434    0     0  13922      0 --:--:-- --:--:-- --:--:-- 13922\n# * Connection #0 to host localhost left intact\n# * Closing connection 0\n\n{\n  \"statusCode\": 200,\n  \"statusMessage\": \"OK\",\n  \"userMessage\": \"Customer\",\n  \"error\": null,\n  \"meta\": {\n    \"requestId\": \"6868b28f-fb51-48b3-a42a-f3b9c49c2c92\",\n    \"requestTimestamp\": \"2020-03-31T14:45:15.444Z\"\n  },\n  \"action\": \"CUSTOMER_GET_ONE\",\n  \"result\": {\n    \"id\": \"e876d808-805b-4d6f-9566-63aa0ad0ec86\",\n    \"externalCustomerId\": \"john.d@example.com\",\n    \"title\": \"Mr\",\n    \"gender\": \"Male\",\n    \"firstName\": \"John\",\n    \"lastName\": \"Doe\",\n    \"telephone\": null,\n    \"email\": \"john.d@example.com\",\n    \"dob\": \"09/06/1990\",\n    \"generalMarketing\": true,\n    \"thirdPartyMarketing\": true,\n    \"storeMarketing\": true,\n    \"smsMarketing\": true,\n    \"emailMarketing\": true,\n    \"postMarketing\": false,\n    \"address\": {\n      \"city\": \"London\",\n      \"country\": \"United Kingdom\",\n      \"address1\": \"240 Blackfriars Road\",\n      \"postCode\": \"SE1 8NW\"\n    },\n    \"details\": {},\n    \"reporting\": {},\n    \"anonymised\": false,\n    \"registeredById\": \"94b790a6-585b-44a5-85a2-a0caf2132d2c\",\n    \"registeredAtId\": \"2a2f1c27-ef75-491d-bddc-c1244af087c9\",\n    \"territoryId\": \"0703cb4a-244b-434a-8742-cc0bc12e79dd\",\n    \"regionId\": null\n  }\n}\n```\n\n---\n\n# RetailOS Outbound integrations (Webhooks)\n\n# 1. Introduction\nIn order to perform outbound integrations, RetailOS can push updates to external systems using webhooks. This mechanism operates in an *asynchronous manner* i.e. they will trigger the external URL at some point in the future after a change has been made in RetailOS. This allows RetailOS to use a configurable retry policy, should the external system go offline. The webhooks are set up per resource. i.e. a webhook can be set up for *customer* updates, and another can separately be set up for *order* updates.\n\n---\n\n# 2. Quick start\nIn order to get started with consuming updates from RetailOS, supply the following information to Red Ant:\n- **HTTPS PUT URL:** e.g. `https://your-service.com/v1/retailos/customer/{externalCustomerId}`\n- **Resource name:** e.g. `customer`\n- **Authentication API key header:** e.g. `Authorization: API_KEY <your api key here>`\n\nRetailOS will then be configured to push changes singularly in an *upsert* manner (see below) to the supplied URL.\n\n---\n\n# 3. Transfer protocol and infrastructure\n- **HTTPS:** RetailOS is desgined to use HTTPS as the transfer protocol for pushing updates to external systems\n\n---\n\n# 4. Authentication and security\n- **API Key**: An Authorization header can be set for an API key to authenticate the request from RetailOS to external systems\n- **MTLS**: Mutual TLS can be used to enhance security for RetailOS outbound requests. This would involve RetailOS signing outbound HTTPS requests with a certificate/key which is issued by the external service.\n\n---\n\n# 5. Upserts\nRetailOS is designed to use an idempotent mechanism for pushing updates to external systems. When a new record is created or an existing record is updated, the **entire object** will be sent to the external system's endpoint. This has the following benefits:\n- The external system can decide whether they need to create or update the record in their system(s)\n- The integration is repeatable without risk of duplicating data\n- A single API contract between RetailOS and the external system.\n\n**PUT request**\n\nThe HTTP request could be a PUT request with the \"external\" id of the object and the body containing the entire object. This method requires both RetailOS and the external system to share a unique identifier. \n\ne.g for a *customer upsert*, the `externalCustomerId` field will be used as the customer id:\n\n```javascript\n// PUT http://localhost:8080/v1/retailos/customer/example-customer-id\n{\n  \"customer\": {\n    ...customerFields,\n    \"externalCustomerId\": \"example-customer-id\"\n  }\n}\n```\n\n**Determine whether a record was created or updated in RetailOS**\n\nThe endpoint implementation could compare the `createdAt` and `updatedAt` dates to determine whether the record was created or updated\n\ne.g for a *customer create/update*:\n\n```javascript\n// Created customer (matched timestamps)\n{\n  \"customer\": {\n    ...customerFields,\n    \"createdAt\": \"2020-01-24T11:15:35.854Z\",\n    \"updatedAt\": \"2020-01-24T11:15:35.854Z\"\n  }\n}\n```\n\n```javascript\n// Updated customer (mismatched timestamps)\n{\n  \"customer\": {\n    ...customerFields,\n    \"createdAt\": \"2020-01-24T11:15:35.854Z\",\n    \"updatedAt\": \"2020-03-11T14:20:11.666Z\"\n  }\n}\n```\n\nIf a shared external unique identifier can be maintained, an *UPSERT* implementation of the external system's endpoint is highly recommended.\n\n---\n\n# 6. Retry policies\nRetry policy: Should the request fail, a retry policy can be configured to re-attempt successfully triggering the webhook URL with the following parameters:\n- **retryLimit**: Maximum number of retries before considering the request failed.\n- **retryDelay**: Number of seconds to wait before re-attempting the request to the external system URL\n- **retryBackoff**: Use exponential backoff for the retry delay (double retryDelay after each failure)\n\nAny specific requirements the retry policy should be forwarded to your contact, otherwise the standard RetailOS retry policy will be set.\n\n---\n\n# 7. External system endpoint implementation\nThe following are assumed expectations of any URLs that RetailOS pushes data to:\n\n## Content type\nRetailOS will send JSON data in all of it's requests and expect JSON format in response. The following request headers will be sent:\n```\nContent-Type: application/json\nAccept: application/json\n```\n\n## HTTP request body\nRetailOS will send JSON data with an object property as the resource name, and the value as an object of the resource data. For example, a customer JSON request body will have a shape similar to:\n```json\n{\n    \"customer\": {\n        \"id\": \"8348b38e-8fd0-4a24-b6db-45189bb9587f\",\n        \"externalCustomerId\": \"example-customer-id\",\n        \"title\": \"Mr\",\n        \"gender\": \"Female\",\n        \"firstName\": \"Example\",\n        \"lastName\": \"Customer\",\n        \"telephone\": \"+44 8800000000\",\n        \"email\": \"89b7ae5e-351e-4ac1-9646-65c060d3bdb2@example.com\",\n        \"dob\": \"01/01/1904\",\n        \"generalMarketing\": false,\n        \"thirdPartyMarketing\": false,\n        \"storeMarketing\": false,\n        \"smsMarketing\": false,\n        \"emailMarketing\": false,\n        \"postMarketing\": false,\n        \"address\": {\n            \"city\": \"\",\n            \"county\": \"\",\n            \"country\": \"\",\n            \"address1\": \"\",\n            \"address2\": \"\",\n            \"postCode\": \"\"\n        },\n        \"details\": {},\n        \"reporting\": {},\n        \"anonymised\": false,\n        \"registeredById\": \"012b6188-8d14-404e-b76a-8463abf420cf\",\n        \"registeredAtId\": \"04a32e42-a27f-40c5-a173-29d7658266f7\",\n        \"territoryId\": \"be35c9e2-a24e-4958-9bf6-7421996f3359\",\n        \"createdAt\": \"2020-03-25T13:41:30.709Z\",\n        \"updatedAt\": \"2020-03-25T13:41:30.709Z\"\n    }\n}\n```\n\nPlease see the up to date resource object model definitions at the [RetailOS SwaggerUI interface](https://digital-store-api-qa.redant.cloud/v2/public/docs)\n\n## HTTP response body\nRetailOS will save the HTTP response (in JSON format) therefore it is advisable to respond with as much information as possible for unsuccessful requests to aid any debugging. Successful responses could also return any useful metadata, if applicable.\n\nExample successful response\n```json\n{\n  \"customerId\": \"example-customer-id\",\n  \"error\" null\n}\n```\n\nExample unsuccessful response\n```json\n{\n  \"customerId\": \"example-customer-id\",\n  \"error\": {\n    \"code\": \"VALIDATION_ERROR\",\n    \"message\": \"Validation error\",\n    \"details\": [\n      \"Customer email is invalid\"\n    ]\n  }\n}\n```\n\nPlease see the up to date resource object model definitions at the [ RetailOS SwaggerUI interface](https://digital-store-api-qa.redant.cloud/v2/public/docs)\n\n\n## HTTP response status codes\nRetailOS will use the HTTP status codes to determine whether an integration was successful/unsuccessful\n- `2xx` responses are considered successful integrations\n- `4xx and 5xx` responses are considered unsuccessful integrations\n\n---\n\n# 8. Failed requests and error reporting:\n- Requests that have exhausted the maximum number of retries are considered failed\n- Failed requests can be reqeuued for a given integration. This can be useful in a situation where the external service is unavailable for a period of time greater than the timespan of the retry policy. e.g. if an integration is retried 5 out of 5 times over an hour and is marked as failed, and the service comes back online the next day, the requeueing mechanism can be used to trigger the failed requests.\n- An error report can be configured to be sent out as an email for a given frequency (e.g. daily). This will show the number of errors, plus a link to a file containing more details of the errors.\n\n---\n\n# 9, Batch updates\nRetailOS will push updates singularly, as described in this guide. Batch updates can be configured as an alternative.\n- Request body: Plural of the resource with an array of objects: e.g. `{\"custmers\": [{...}, {...}]}`\n- Response body: To be agreed upon implementation for results per record, must be parseable by RetailOS\n- Batch size: Maximum number of records per batch request, configurable\n\nPlease consult your contact for more information.\n\n---\n\n# 10. RetailOS technical implementation\nThese webhooks are implemented as jobs in a job queue. This is to allow for job granularity, implementation customisation and traceability. Upon requesting your contact, the following steps will be carried out:\n- Add the webhook to the RetailOS internal job queue for the *resource* to receive updates for\n- Configure as a singular update or batch update\n- Add the URL with any changes (HTTP method/auth) to the webhook\n- Set the retry/requeue policies as requested\n- Configure the error reporting and requeue logic as requested\n\n---\n\n# 11. Examples\n\nExample endpoint implementation for singular customer updates (Node.js + Express)\n\n```javascript\nconst express = require('express')\nconst bodyParser = require('body-parser')\n\nconst app = express()\n\n/**\n * Middleware to check req.headers['Authrorization'] for `API_KEY <key>`\n * or use a cloud-based service such as AWS API Gateway for your inbound traffic\n * to authenticate.\n */\n\napp.put('/v1/retailos/customer/:id', (req, res, next) => {\n  const customerId = req.params.id\n  const { customer } = req.body\n\n  // Your business logic here\n  lib.processCustomerUpsert(customerId, customer)\n    .then(() => {\n      // Send a 2xx response for success\n      res.status(200).json({ customerId })\n    })\n    .catch(error => {\n      // Send a 4xx or 5xx response for failures with the error in\n      // the body so RetailOS can store the errors eg validation errors\n      if (error.code === 'VALIDATION_ERROR') {\n        res.status(400).send({\n          error: {\n            code: 'VALIDATION_ERROR',\n            message: error.message,\n            details: error.validationErrors\n          }\n        })\n      } else {\n        // Not a known error, so forward it to the\n        // error handler\n        next(error)\n      }\n    })\n})\n\napp.listen(8080, (err) => {\n  if (err) { throw err }\n\n  console.log('Express server is listening on port 8080')\n})\n```\n\n\nAn example of a cURL request analogous to the webhook request for pushing **customer** updates singularly to the example endpoint:\n\n```bash\ncurl --verbose --location --request PUT 'http://localhost:8080/v1/retailos/customer/example-customer-id' \\\n--header 'Authorization: API_KEY <your api key here>' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"customer\": {\n        \"id\": \"8348b38e-8fd0-4a24-b6db-45189bb9587f\",\n        \"externalCustomerId\": \"example-customer-id\",\n        \"title\": \"Mr\",\n        \"gender\": \"Female\",\n        \"firstName\": \"Example\",\n        \"lastName\": \"Customer\",\n        \"telephone\": \"+44 8800000000\",\n        \"email\": \"89b7ae5e-351e-4ac1-9646-65c060d3bdb2@example.com\",\n        \"dob\": \"01/01/1904\",\n        \"generalMarketing\": false,\n        \"thirdPartyMarketing\": false,\n        \"storeMarketing\": false,\n        \"smsMarketing\": false,\n        \"emailMarketing\": false,\n        \"postMarketing\": false,\n        \"address\": {\n            \"city\": \"\",\n            \"county\": \"\",\n            \"country\": \"\",\n            \"address1\": \"\",\n            \"address2\": \"\",\n            \"postCode\": \"\"\n        },\n        \"details\": {},\n        \"reporting\": {},\n        \"anonymised\": false,\n        \"registeredById\": \"012b6188-8d14-404e-b76a-8463abf420cf\",\n        \"registeredAtId\": \"04a32e42-a27f-40c5-a173-29d7658266f7\",\n        \"territoryId\": \"be35c9e2-a24e-4958-9bf6-7421996f3359\",\n        \"registeredBy\": {\n            \"id\": \"012b6188-8d14-404e-b76a-8463abf420cf\",\n            \"externalUserId\": \"example-user-id\",\n            \"title\": \"-\",\n            \"gender\": \"Unknown\",\n            \"firstName\": \"Example\",\n            \"lastName\": \"User\",\n            \"username\": \"26825\",\n            \"email\": \"unknown@unknown.com\",\n            \"dob\": null,\n            \"telephone\": null,\n            \"accountLocked\": false,\n            \"accountDeactivated\": false,\n            \"reporting\": {},\n            \"salesTarget\": null,\n            \"lastNotificationReadDate\": null,\n            \"lastLoginDate\": \"2019-07-15T00:00:00.000Z\",\n            \"details\": {},\n            \"updatedAt\": \"2019-02-21T09:53:12.651Z\",\n            \"currentDepartmentId\": null,\n            \"currentStoreId\": null\n        },\n        \"registeredAt\": {\n            \"id\": \"04a32e42-a27f-40c5-a173-29d7658266f7\",\n            \"externalStoreId\": \"example-store-id\",\n            \"name\": \"Example store name\",\n            \"catalogue\": \"UK Domestic\",\n            \"images\": [],\n            \"reporting\": {},\n            \"salesTarget\": [],\n            \"details\": {},\n            \"clientId\": null,\n            \"regionId\": \"cb86c2c6-8a02-4618-9807-74eeedf95a97\"\n        },\n        \"territory\": {\n            \"id\": \"be35c9e2-a24e-4958-9bf6-7421996f3359\",\n            \"name\": \"UK\",\n            \"details\": {}\n        },\n        \"createdAt\": \"2020-03-25T13:41:30.709Z\",\n        \"updatedAt\": \"2020-03-25T13:41:30.709Z\"\n    }\n}'\n\n# *   Trying ::1...\n# * TCP_NODELAY set\n# * Connected to localhost (::1) port 8080 (#0)\n# > PUT v1//retailos/customer/example-customer-id HTTP/1.1\n# > Host: localhost:8080\n# > User-Agent: curl/7.64.1\n# > Accept: */*\n# > Authorization: API_KEY <your api key here>\n# > Content-Type: application/json\n# > Content-Length: 2529\n# > Expect: 100-continue\n# >\n# < HTTP/1.1 100 Continue\n# * We are completely uploaded and fine\n# < HTTP/1.1 200 OK\n# < X-Powered-By: Express\n# < Content-Type: application/json; charset=utf-8\n# < Content-Length: 51\n# < ETag: W/\"33-4eTEoJMoZWZtTyjKlNvKfLxtzFI\"\n# < Date: Thu, 26 Mar 2020 11:07:11 GMT\n# < Connection: keep-alive\n# <\n# * Connection #0 to host localhost left intact\n# {\"customerId\":\"example-customer-id\",\"success\":true}* Closing connection 0\n\n```","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"1822051","team":129542,"collectionId":"0545276d-7b0c-4763-9194-e3b4c9b40897","publishedId":"SzYbwcGu","public":true,"publicUrl":"https://retailos-integration-docs.redant.cloud","privateUrl":"https://go.postman.co/documentation/1822051-0545276d-7b0c-4763-9194-e3b4c9b40897","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","version":"8.10.1","publishDate":"2020-04-03T13:33:15.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/7ae76f9c1adc6f225b26c2d033276c190a3fecfbe7a7fcc65e75d5bff5e8ec50","favicon":"https://redant.cloud/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://retailos-integration-docs.redant.cloud/view/metadata/SzYbwcGu"}