{"info":{"_postman_id":"fd4d98ff-e9fe-49aa-8a13-7eba973d2e72","name":"Platform API 2.0 overview","description":"<html><head></head><body><h2 id=\"coniq-apis-home\"><a href=\"https://documenter.getpostman.com/view/4063684/RWaDWrYa\">Coniq APIs Home</a></h2>\n<h1 id=\"1-overview\">1. Overview</h1>\n<p>The Platform API provides programatic access to functionality in the platform.</p>\n<p>The following functionality is available in version 2.0:</p>\n<ul>\n<li><a href=\"https://documenter.getpostman.com/view/4580793/RWEgqyXx\">Customer</a></li>\n<li><a href=\"https://documenter.getpostman.com/view/4580793/RWEjnwt9\">Barcode</a></li>\n<li><a href=\"https://documenter.getpostman.com/view/10758010/UyxnEk7L\">Subscription</a></li>\n<li><a href=\"https://documenter.getpostman.com/view/4580793/RWEjqHeN\">Location</a></li>\n<li><a href=\"https://documenter.getpostman.com/view/4580793/RWEgqyY3\">Offer</a></li>\n<li><a href=\"https://documenter.getpostman.com/view/4580793/RWEiKdZd\">Linked Offer</a></li>\n<li><a href=\"https://documenter.getpostman.com/view/4580793/RWaNQmhm\">Tax Free</a></li>\n<li><a href=\"https://documenter.getpostman.com/view/4063684/RWgnWKpK\">Data</a></li>\n<li><a href=\"https://documenter.getpostman.com/view/4580793/RWEiJd7s\">Policy</a></li>\n<li><a href=\"https://documenter.getpostman.com/view/4063684/RWgp2zZy\">External Transactions</a></li>\n<li><a href=\"https://documenter.getpostman.com/view/4578591/SWEB2vTt\">Events</a></li>\n<li><a href=\"https://documenter.getpostman.com/view/10758010/2s93XyVj6C\">Communication</a></li>\n</ul>\n<hr>\n<h1 id=\"2-general\">2. General</h1>\n<h2 id=\"identification--authorization\">Identification / Authorization</h2>\n<p>To access the API, a valid API key is required. This API key is linked to the account in order to authorize access to data for a specific client. The API key is available through your account manager. It may be revoked or replaced if required.</p>\n<p>The API key is passed in an HTTP Authorization header and must be included in quotes.</p>\n<p>Authorization: ApiKey key=\"{api-key}\"</p>\n<h2 id=\"security\">Security</h2>\n<p>The API key is used for both authentication and authorization. This API allows the consumer of the services to manipulate sensitive data in the platform. It is the client's responsibility to protect the key in order to prevent data from being compromised. As such the key should not be used client-side where the key would be transmitted to a web browser. It is also not recommended to be included in a mobile app; a separate API is available for mobile app integration.</p>\n<p>Furthermore, all API requests must be submitted using HTTPS to prevent disclosure of the API key.</p>\n<h2 id=\"versioning\">Versioning</h2>\n<p>Each request must include a version number in the headers of the HTTP request. The API will return an error if no version number header is included.</p>\n<p>x-api-version: 2.0</p>\n<p>Requests</p>\n<p>Requests are made using a standard HTTP requests. When data is submitted in a url (including the query string) it must be url encoded properly to avoid issues. This is particularly important for email addresses with a plus (+) character as this represents a space in a url encoded string.</p>\n<p>Incorrect: ?email=name+plus@<a href=\"http://40example.com/\">example.com</a></p>\n<p>Correct: ?email=<a href=\"mailto:name+plus@example.com\">name+plus@example.com</a></p>\n<p>When data is included in the body of an HTTP request, it should be submitted in JSON format (unless otherwise specified) and the Content-Type header must be included in the request.</p>\n<p>Content-Type: application/json</p>\n<h2 id=\"responses\">Responses</h2>\n<p>Responses use the standard HTTP response codes to indicate success or failure. Successful responses will contain have a 2xx response code (typically 200 or 201) along with the relevant resource data in JSON format. For some calls, alternative formats may be returned as defined in this documentation.</p>\n<p>Errors are represented with the standard HTTP response codes (4xx, 5xx) along with an internal error code and message describing the error in more detail. Errors with 4xx codes indicate an error in the request. Errors with 5xx codes indicate an error on the server. For assistance with</p>\n<h2 id=\"data-types\">Data Types</h2>\n<p>The API primarily uses JSON and supports the native JSON data types of Number, String, Boolean, Array, Object and null. Resources are represented as Objects while collections of resources are represented as Arrays. An empty collection set is represented by an empty array whereas a non-existent object is represented by null.</p>\n<p>In addition to the native JSON types, the API makes use of several specific subtypes.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Type</th>\n<th>Native Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>integer</td>\n<td>number</td>\n<td>integer numeric values</td>\n</tr>\n<tr>\n<td>string</td>\n<td>string</td>\n<td>JSON native string; unless otherwise specified, strings are limited to a length of 255</td>\n</tr>\n<tr>\n<td>date</td>\n<td>string</td>\n<td>ISO 8601 formatted date; yyyy-mm-dd</td>\n</tr>\n<tr>\n<td>datetime</td>\n<td>string</td>\n<td>ISO 8601 formatted (omitting T) date/time; yyyy-mm-dd hh:mm:ss</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"endpoints\">Endpoints</h2>\n<p>There are two API endpoints available corresponding to two separate environments. The endpoint for the production environment is the endpoint that should be used for live integrations.</p>\n<p><a href=\"https://api.coniq.com/\">https://api.coniq.com/</a></p>\n<p>A sandbox environment is also available and can be used for development, testing and integration. The data is updated periodically based on the production environment. The same API key can be used in both environments.</p>\n<p><a href=\"https://api-stage.coniq.com/\">https://api-stage.coniq.com/</a></p>\n<h2 id=\"testing\">Testing</h2>\n<p>Testing can be performed either in the sandbox environment or in a separate account in the production environment. Each approach has advantages and disadvantages.</p>\n<p>When using the sandbox environment for testing, the same API keys and account are used as in production. The data is copied from time to time from production to the sandbox so that testing can be performed with the same offers, sign-up forms and other data established in production. However, this means that any changes made in the sandbox are not persistent and will be lost when the data is next updated. In addition, only API access is available in the sandbox; it is not possible to log in to the platform web interface in the sandbox environment.</p>\n<p>When using the production environment for testing, a separate account will be set up with its own API key. This allows web access to the platform and the data will be persistent. However, any offers, sign up forms or other data established in the live production account will need to be duplicated manually (or through the API) on the test production account.</p>\n<h2 id=\"tips\">Tips</h2>\n<p>Before integrating with the APIs in your application code, it can be helpful to confirm the API call works directly using a tool such as curl or the DEV HTTP Client for Chrome. This will uncover any issues related to the authentication of the API key, proxy server or firewall issues within a corporate network environment, missing headers in the request or similar issue. This will ensure that everything is working correctly with the API key before introducing the calls into your application code which may introduce layers to debug in the case of a problem.</p>\n<p>The DEV HTTP Client is available for free from the Chrome Web Store (<a href=\"https://chrome.google.com/webstore/detail/dev-http-client/aejoelaoggembcahagimdiliamlcdmfm?hl=en\">https://chrome.google.com/webstore/detail/dev-http-client/aejoelaoggembcahagimdiliamlcdmfm?hl=en</a>). It makes it easy to construct requests and evaluate the responses for ensuring the API calls are working correctly and debugging any issues. It is also possible to save requests that can be sent to our support team.</p>\n<p>Another approach is to use the command line program curl which can execute HTTP requests. The following is an example call to the Customer API to create a new customer using curl. This example can be used as a basis for constructing your own API call; you will need to replace the API key in this example with your own API key.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"1. Overview","slug":"1-overview"},{"content":"2. General","slug":"2-general"}],"owner":"4580793","collectionId":"fd4d98ff-e9fe-49aa-8a13-7eba973d2e72","publishedId":"RWEgqyXv","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"00A2E4"},"publishDate":"2018-07-23T14:09:50.000Z"},"item":[],"event":[{"listen":"prerequest","script":{"id":"aac95e5e-e1db-41ac-9cda-c2e5732cfc7d","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"d841c5df-9324-466a-8268-c4569ee86152","type":"text/javascript","exec":[""]}}]}