{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"d6236bdc-5149-47f3-bfc9-8e1078211614","name":"Customer API 2.0","description":"## [Coniq APIs Home](https://documenter.getpostman.com/view/4063684/RWaDWrYa) | [Platform API Home](https://documenter.getpostman.com/view/4580793/RWEgqyXv)\n\n# 1.0 Overview\n\nThis API allows clients to manage customer data programatically with the standard create, retrieve, update, delete methods.\n\nCustomers can also be added to the platform using the Open Sign-up API which provides JSON access to submit sign-up forms configured in the platform. This triggers business rules such as generating a barcode or sending an email as defined by the form\n\n# 2.0 General\n\nRefer to the main [Platform API 2.0](https://documenter.getpostman.com/view/4580793/RWEgqyXv) documentation for information about accessing the API including identification, authorization, security, requests, responses, versioning and testing.\n\n### Endpoints\n\nThere 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.\n\n**EU instance**  \n[https://api.coniq.com/](https://api.coniq.com/)\n\n**US instance**  \n[https://api.r02.coniq.com/](https://api.r02.coniq.com/)\n\nA 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.\n\n**EU instance**  \n[https://api-stage.coniq.com/](https://api-stage.coniq.com/)\n\n### Version\n\nThese Customer API methods are available in version 2.0 and require the appropriate x-api-version header.\n\nx-api-version: 2.0\n\n# 3.0 Resources\n\n### Customer\n\nThe following fields are present on a Customer resource. The fields marked as required must be included when creating a new Customer. The fields marked as generated are managed by the system and cannot be modified. The fields marked as optional may omitted and may not be returned in the response.\n\nThe standard field in version 2.0 are first_name and last_name. The aliases name and surname which were available in version 1.0 are no longer available in version 2.0\n\nThe fields allow_email, allow_phone, and allow_post default to false when a customer is created through the Customer API. It is the client's responsibility to set these appropriately when creating a new customer record. The default values may be different elsewhere in the platform. For example, when a customer record is created through a sign-up form, the customer will have agreed to the Terms and Conditions to receive communications and these values default to true.\n\n| Field | Optional | Type | Description |\n| --- | --- | --- | --- |\n| id | generated | integer | a unique identifier for the customer generated by the platform |\n| first_name | optional | string | customer's first name |\n| last_name | optional | string | customer's last name |\n| email | optional | string | customer's email address; the platform validates the format of the email address |\n| phone | optional | object | phone number of the customer composed of two strings for the country_code and number; ex`{ \"country_code\": \"44\", \"number\":\"7123456789\" }` |\n| address1 | optional | string | first line of the customer's address |\n| address2 | optional | string | second line of the customer's address |\n| city | optional | string | customer's city |\n| county | optional | string | customer's county |\n| postcode | optional | string | customer's postcode |\n| company | optional | string | customer's company |\n| country | optional | string | customer's country; the country picker on the platform's sign-up forms store the country using the ISO 3166-1 alpha-2 codes (ex GB, FR, US) but there is no requirement to use this format through the API |\n| date_of_birth | optional | date | customer's date of birth submitted in ISO format yyyy-mm-dd |\n| gender | optional | string | indicates selection with a single character; male is 'M', female is 'F', other is 'O', prefer not to say is 'U' |\n| external_id | optional | string | external identifier for the customer; this is a primary key for the customer in an external system which can be used to link customer records |\n| public_id | generated | uuid | The customer's public ID, used in Signup and CSA API calls |\n| allow_email | optional | boolean | customer can be contacted by email; default is false |\n| allow_phone | optional | boolean | customer can be contacted by phone; default is false |\n| allow_post | optional | boolean | customer can be contacted by post; default is false |\n| created_datetime_utc | generated | datetime | the date/time that the customer was last created in ISO format (yyyy-mm-ddThh:mm:ss); generated by the platform |\n| modified_datetime_utc | generated | datetime | the date/time that the customer record was last updated in ISO format (yyyy-mm-ddThh:mm:ss); generated by the platform |\n| preferred_location_group | optional | object | Preferred Location Group of the customer composed of an integer ID and string label`{ \"id\": 123456, \"label\":\"Shopping Centre #1\" }` |\n| preferred_language | optional | string | customer's preferred language submitted in ISO format (e.g. EN, ES, DE) |\n| accept_policies | optional | array | An array of policy ids, for each id given, the customer will be recorded as having accepted the current published version. N.B. each referenced policy must belong to the authenticated account Policies available for an account can be found in requests to the Policy API: [Policy API v1.0](http://confluence.codilink.com/display/DEV/Policy+API+v1.0) |\n| profiling_agreement | optional | boolean | customer can be profiled on using personal information |\n\nAlso besides the predefined standard fields, **Custom Fields** are supported. **Custom Field** are optional and are retrieved/submitted respecting the input type as defined in the field configuration:\n\n- **text**\n    \n- **number**\n    \n- **boolean**\n    \n- **date**\n    \n    - submitted in ISO format yyyy-mm-dd\n        \n- **choice**\n    \n    - submitted value must be one of the valid options as defined for the field\n        \n    - when retrieving the customer data deleted options are ignored\n        \n\nAll defined customer **Custom Fields** will be returned as part of the **GET** response. If there is no value saved for a customer, default value will be returned as defined:\n\n- non-existing or empty boolean would be false\n    \n- non-existing choice or choice that has been deleted would be the empty string (\"\")\n    \n- number would be an empty string (““)\n    \n- non-existing text is an empty string (\"\")\n    \n- non-existing date also empty string (\"\")\n    \n\n**Custom Fields** can be easily recognised in the **GET** method response data by the field name starting with a **\"cf_\"** prefix. Also **POST/PUT** methods would require same naming with the **\"cf_\"** prefix.\n\n# 4.0 Methods","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"4580793","collectionId":"d6236bdc-5149-47f3-bfc9-8e1078211614","publishedId":"RWEgqyXx","public":true,"publicUrl":"https://documenter-api.postman.tech/view/4580793/RWEgqyXx","privateUrl":"https://go.postman.co/documentation/4580793-d6236bdc-5149-47f3-bfc9-8e1078211614","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","version":"8.10.0","publishDate":"2018-11-15T10:56:36.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[{"name":"Stage","id":"3c936c86-7486-4c17-a149-792e14f775b7","owner":"4063684","values":[{"key":"platform-url","value":"https://platform-stage.coniq.com","enabled":true},{"key":"api-url","value":"https://api-stage.coniq.com","enabled":true},{"key":"platform-prod-url","value":"https://platform.coniq.com","enabled":true},{"key":"api-prod-url","value":"https://api.coniq.com","enabled":true},{"key":"platform-stage-url","value":"https://platform-stage.coniq.com","enabled":true},{"key":"api-stage-url","value":"https://api-stage.coniq.com","enabled":true},{"key":"signup-url","value":"https://poweredby-stage.coniq.com","enabled":true},{"key":"signup-stage-url","value":"https://poweredby-stage.coniq.com","enabled":true},{"key":"handset-url","value":"https://api.get2d.com","enabled":true},{"key":"handset-stage-url","value":"https://api-stage.get2d.com","enabled":true},{"key":"signup-hash","value":"0dlhgjk","enabled":true},{"key":"app-level-token","value":"","enabled":true,"type":"any"},{"key":"customer-access-token","value":"","enabled":true,"type":"any"},{"key":"customer-refresh-token","value":"","enabled":true,"type":"any"},{"key":"customer-bearer-token","value":"","enabled":true,"type":"any"},{"key":"bearer-token","value":"NDUxMWQ5MDhiNzFhYjZkMDgxOTZjN2RiMDk0NjkyYzU1ZTM5MzBlNWQ0ZjJmNmFhMTViNjRiMjg4MGY0NWY3YQ","enabled":true},{"key":"customer-public-id","value":"","enabled":true,"type":"any"}],"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":"Stage","value":"4063684-3c936c86-7486-4c17-a149-792e14f775b7"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/RWEgqyXx"}