{"info":{"_postman_id":"95ef3586-cf69-56e8-746d-bba80fb22dc1","name":"Zerosix API","description":"<html><head></head><body><p>Zerosix API exposes the daily business features: creating contacts and cards, recording visits, using vouchers...</p>\n<p>Using the API <strong>requires to be an identified partner.</strong></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"2563096","collectionId":"95ef3586-cf69-56e8-746d-bba80fb22dc1","publishedId":"716cF9h","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2017-10-09T11:54:36.000Z"},"item":[{"name":"Root API","event":[{"listen":"prerequest","script":{"id":"f521f5b4-25f5-440e-aaee-d9debafb6a8a","exec":["pm.environment.set(\"cf_id\", \"d197ebff78eae447fa26052edbba6a17.access\");","pm.environment.set(\"cf_secret\", \"e574c62768911d48f19d9a15367a871aed73b2265048060d6a05837a8257cdb3\");","pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript","packages":{}}}],"id":"4c57d31b-49b0-d163-e5b1-2b65a266f1c4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Token {{token}}","description":"<p>Note that the API Key is specific to each Point Of Sale.</p>\n"},{"key":"User-Agent","value":"Software/Version","description":"<p>Mandatory, to be authorized by the Firewall.</p>\n","type":"text"},{"key":"User-Id","value":"ID/Username","description":"<p>Optional, this is the user of your software at the moment the API call is made.</p>\n","type":"text"}],"url":"{{url}}","description":"<p>Add the following headers to every call you make to our API.</p>\n<p>headers</p>\n","urlObject":{"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"4c57d31b-49b0-d163-e5b1-2b65a266f1c4"},{"name":"Member Details","id":"1f12346a-2b3a-4e4e-9e19-934a9fc0445f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Token {{token}}"},{"key":"User-Agent","value":"Software/Version","type":"text"}],"url":"{{url}}/members/+33612345678","description":"<p>With this endpoint you can identify a Member of the Loyalty Program by either his mobile number or any ID recognized by ZEROSIX as the card ID.</p>\n<p>{{mobile}} can be in local format (ie 0612345678) or in international format (ie +33612345678 or 0033612345678).</p>\n<p>If the Member exists in ZEROSIX database the API will return:</p>\n<ul>\n<li><p>The Card object</p>\n</li>\n<li><p>A Member summary (name, balance, status)</p>\n</li>\n<li><p>The vouchers the member is authorized to use</p>\n</li>\n</ul>\n<p>Another useful feature of this endpoint is that if ZEROSIX cannot find the Member it can be automatically created if the configuration of the Store is on \"auto create\".</p>\n","urlObject":{"path":["members","+33612345678"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"107a076c-84d4-4b47-bac8-f81d9f8167f4","name":"Member Details","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Token {{token}}"}],"url":"{{url}}/members/0612345678/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"card_url\": \"https://api.zerosix.com/cards/xxxx/\",\n    \"card\": {\n        \"url\": \"https://api.zerosix.com/cards/xxxx/\",\n        \"id\": \"xxxx\",\n        \"reference\": \"xxxx\",\n        \"creation_date\": \"2024-12-09T15:11:57+01:00\",\n        \"owner_info\": \"J. Doe / Programme Etudiant\",\n        \"dashboard_url\": \"https://pro.zerosix.com/xxx/clients/xxxx#/customer/xxxx\",\n        \"points_balance\": \"0.00\",\n        \"points_total\": \"0.0\",\n        \"statutory_info\": null,\n        \"contact\": {\n            \"url\": \"https://api.zerosix.com/contacts/xxxx/\",\n            \"mobile\": \"+336xxxxxxxx\",\n            \"first_name\": \"John\",\n            \"last_name\": \"Doe\",\n            \"email\": null,\n            \"card\": \"https://api.zerosix.com/cards/xxxx/\"\n        },\n        \"available_vouchers\": [\n            {\n                \"url\": \"https://api.zerosix.com/vouchers/xxxx/\",\n                \"name\": \"Code promo test 5€\",\n                \"value\": \"5.00\",\n                \"unit\": \"Euros\",\n                \"unit_display\": \"€\",\n                \"code\": \"xxxx\",\n                \"expiration_date\": \"2025-12-10T23:59:59\",\n                \"external_id\": null,\n                \"external_ids\": [],\n                \"minimum_amount\": null\n            }\n        ],\n        \"program_info\": {\n            \"program_type\": \"CYCLE\",\n            \"program_description\": \"\",\n            \"dashboard_url\": \"https://pro.zerosix.com/xxxx/clients/xxxx#/customer/xxxx\",\n            \"program_name\": \"Programme Etudiant\",\n            \"program_id\": \"xxxx\"\n        },\n        \"has_available_menu_rewards\": false,\n        \"customer_screen_url\": null,\n        \"sponsor_code\": \"xxxx\",\n        \"latent_points_balance\": \"0\",\n        \"terms_accepted\": true\n    },\n    \"member_summary\": \"John Doe\\nProgramme de fidélité : Programme Etudiant\\nSolde : 0 point\"\n}"}],"_postman_id":"1f12346a-2b3a-4e4e-9e19-934a9fc0445f"},{"name":"Contact Create","event":[{"listen":"test","script":{"id":"51a92aea-3971-40b9-86e5-f9c4821429f0","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"83da1b91-77c1-498b-a691-2bbe6625f32d","exec":[""],"type":"text/javascript","packages":{}}}],"id":"77038623-e69f-b5c5-4727-e4d84faeb9cf","request":{"method":"POST","header":[{"key":"Authorization","value":"Token {{token}}"},{"key":"Content-Type","value":"application/json"},{"key":"User-Agent","value":"Software/Version","type":"text"}],"body":{"mode":"raw","raw":""},"url":"{{url}}/contacts/","description":"<p>Create a new <strong>Contact</strong>, parameters are :</p>\n<ul>\n<li><p><code>mobile : string</code> : The contact mobile number as a <code>string</code>, in national or international format.</p>\n</li>\n<li><p><code>first_name : {string, null}</code> : The contact first name, or <code>null</code> if unknown.</p>\n</li>\n<li><p><code>last_name : {string, null}</code> : The contact last name, or <code>null</code> if unknown.</p>\n</li>\n<li><p><code>birth_date : {string, null}</code> : The contact birth date in ISO8601 format, or <code>null</code> if unknown.</p>\n</li>\n<li><p><code>address1 : {string, null}</code> : The contact primary address.</p>\n</li>\n<li><p><code>address2 : {string, null}</code> : The contact additional address.</p>\n</li>\n<li><p><code>zipcode : {string, null}</code> : The contact zipcode, or <code>null</code> if unknown.</p>\n</li>\n<li><p><code>city : {string, null}</code> : The contact city, or <code>null</code> if unknown.</p>\n</li>\n<li><p><code>country : {string, null}</code> : The contact country, or <code>null</code> if unknown.</p>\n</li>\n<li><p><code>email : {string, null}</code> : The contact email, or <code>null</code> if unknown.</p>\n</li>\n<li><p><code>opt_out : bool</code> : True if the contact did opt out of commercial messages.</p>\n</li>\n<li><p><code>create_card : {bool, null}</code> : If true, create a loyalty card for this contact.</p>\n</li>\n<li><p><code>terms_accepted : {bool, null}</code> : If true, accepts loyalty terms</p>\n</li>\n<li><p><code>reference : {string, null}</code> : This value will be used as card reference instead of autogenerated value.</p>\n</li>\n<li><p><code>custom_fields : List</code>: CustomField name-value available on the account (custom_fields are created by Zerosix)</p>\n</li>\n</ul>\n<p>If a contact already exists with the same mobile number, the request will fail with a <code>409 Conflict</code> error.</p>\n<p>If you want to implement our sponsor feature you can add the \"sponsor_card_reference\" to your api call. Then when you are creating a card (so when create_card is true) for a client who is sponsored, provide the card reference of the sponsor as value for this key. Check the provided example on the right.</p>\n","urlObject":{"path":["contacts",""],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"2f4f10ef-d507-0c8f-3306-a8dc5f4633b5","name":"Contact Create with a card","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Token {{token}}"},{"key":"Content-Type","value":"application/json","type":"text"},{"key":"User-Agent","value":"Software/Version","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"mobile\": \"0700000008\",\n\t\"create_card\": \"true\"\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/contacts/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Allow","value":"GET, POST, OPTIONS","description":""},{"key":"Connection","value":"keep-alive","description":""},{"key":"Content-Type","value":"application/json","description":""},{"key":"Date","value":"Fri, 23 Feb 2018 15:03:27 GMT","description":""},{"key":"Location","value":"https://api.zerosix.com/contacts/873629/","description":""},{"key":"Server","value":"Apache","description":""},{"key":"Vary","value":"Host","description":""},{"key":"X-Frame-Options","value":"SAMEORIGIN","description":""},{"key":"transfer-encoding","value":"chunked","description":""}],"cookie":[],"responseTime":"615","body":"{\n    \"url\": \"https://api.zerosix.com/contacts/{{contact_id}}/\",\n    \"mobile\": \"+33700000008\",\n    \"first_name\": null,\n    \"last_name\": null,\n    \"birth_date\": null,\n    \"gender\": null,\n    \"address1\": null,\n    \"address2\": null,\n    \"zipcode\": null,\n    \"city\": null,\n    \"country\": \"France\",\n    \"email\": null,\n    \"opt_out\": false,\n    \"allow_email\": false,\n    \"allow_pdf\": false,\n    \"card\": {\n        \"url\": \"https://api.zerosix.com/cards/{{card_id}}/\",\n        \"reference\": \"{{card_id}}\",\n        \"points_balance\": 0\n    },\n    \"available_vouchers\": [],\n    \"dashboard_url\": \"https://{{your-sub-domain}}.zerosix.com/pro/clients/fiche/{{card_id}}/\",\n    \"custom_fields\": []\n}"},{"id":"32471604-ea08-97b9-f494-60cd69317946","name":"Contact Create with sponsor","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Token {{token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"mobile\": \"0700000003\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"create_card\": \"true\",\n    \"sponsor_card_reference\": \"12345\"\n}"},"url":"{{url}}/contacts/"},"status":"OK","code":200,"_postman_previewlanguage":"","header":[],"cookie":[],"responseTime":"0","body":"{\n    \"url\": \"https://api.zerosix.com/contacts/{{contact_id}}/\",\n    \"mobile\": \"+33700000003\",\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"birth_date\": null,\n    \"gender\": null,\n    \"address1\": null,\n    \"address2\": null,\n    \"zipcode\": null,\n    \"city\": null,\n    \"country\": \"France\",\n    \"email\": null,\n    \"opt_out\": false,\n    \"allow_email\": false,\n    \"allow_pdf\": false,\n    \"card\": {\n        \"url\": \"https://api.zerosix.com/cards/{{card_id}}/\",\n        \"reference\": \"{{card_id}}\",\n        \"points_balance\": 0\n    },\n    \"available_vouchers\": [],\n    \"dashboard_url\": \"https://{{your-sub-domain}}.zerosix.com/pro/clients/fiche/{{card_id}}/\",\n    \"custom_fields\": [] // The parrainage field does not appear here because it is attached to the Card object, not the Contact object\n}"},{"id":"4cbc92bb-6a1c-493c-a62f-1791b4d559a8","name":"Contact Create with personalized card number","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Token {{token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"mobile\": \"0700000003\",\n\t\"first_name\": \"John\",\n\t\"last_name\": \"Doe\",\n\t\"create_card\": \"true\",\n\t\"reference\": \"123456789\"\n}"},"url":"{{url}}/contacts/"},"status":"OK","code":200,"_postman_previewlanguage":"","header":[],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"77038623-e69f-b5c5-4727-e4d84faeb9cf"},{"name":"Contact Update","id":"faea246b-46d1-adf9-27b4-360cd16149e0","request":{"method":"PUT","header":[{"key":"Authorization","value":"Token {{token}}"},{"key":"Content-Type","value":"application/json"},{"key":"User-Agent","value":"Software/Version","type":"text"}],"body":{"mode":"raw","raw":""},"url":"{{url}}/contacts/{{contact_id}}/","description":"<p>Update a <strong>Contact</strong>, parameters are the same as when creating a new contact.</p>\n","urlObject":{"path":["contacts","{{contact_id}}",""],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"1eaa2576-2483-4db1-bb20-ab4a22d9ecfc","name":"Contact Update","originalRequest":{"method":"PUT","header":[{"key":"Authorization","value":"Token {{token}}"},{"key":"Content-Type","value":"application/json","type":"text"},{"key":"User-Agent","value":"Software/Version","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"mobile\": \"0700000008\",\n    \"first_name\": \"Jane\",\n    \"last_name\": \"Doe\"\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/contacts/{{contact_id}}/"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"url\": \"https://api.zerosix.com/contacts/{{contact_id}}/\",\n    \"mobile\": \"+33700000008\",\n    \"first_name\": \"Jane\",\n    \"last_name\": \"Doe\",\n    \"birth_date\": null,\n    \"gender\": null,\n    \"address1\": null,\n    \"address2\": null,\n    \"zipcode\": null,\n    \"city\": null,\n    \"country\": \"France\",\n    \"email\": null,\n    \"opt_out\": false,\n    \"allow_email\": false,\n    \"allow_pdf\": false,\n    \"card\": {\n        \"url\": \"https://api.zerosix.com/cards/{{card_id}}/\",\n        \"reference\": \"{{card_id}}\",\n        \"points_balance\": 0\n    },\n    \"available_vouchers\": [],\n    \"dashboard_url\": \"https://{{your-sub-domain}}.zerosix.com/pro/clients/fiche/{{card_id}}/\",\n    \"custom_fields\": []\n}"}],"_postman_id":"faea246b-46d1-adf9-27b4-360cd16149e0"},{"name":"Visit Create","id":"d92f1515-184c-4a37-47fa-5670671f5ded","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Token {{token}}"},{"key":"Content-Type","value":"application/json"},{"key":"User-Agent","value":"Software/Version","type":"text"}],"body":{"mode":"raw","raw":""},"url":"{{url}}/visits/","description":"<p>Create a new <strong>Visit</strong>, parameters are :</p>\n<ul>\n<li><p><code>card : string</code> : The url of the loyalty card with which this visit is recorded.</p>\n</li>\n<li><p><code>reference : string</code> : The unique reference of the visit (useful to prevent duplication)</p>\n</li>\n<li><p><code>date : {string, null}</code> : Date in the form “YYYY-MM-DD HH:MM:SS” on which the visit was closed. If this date is not provided, ZEROSIX will assign the date and time of receipt of the visit.</p>\n</li>\n<li><p><code>price : {string, null}</code> : The amount spent during the visit as a non-negative decimal string, or <code>null</code> if unknown. Note that most sites are not configured to allow <code>null</code> prices.</p>\n</li>\n<li><p><code>cashback_withdraw_value: {string, null}</code> : The amount to be withdrawed from the cashback as a non-negative decimal string, or <code>null</code> if not applicable.</p>\n</li>\n<li><p><code>used_vouchers : List</code> : The list of vouchers urls to use during this visit. Each voucher must be owned by the same contact as the one owning the card. The <strong>Contact</strong> and <strong>Card</strong> objects have an <code>available_vouchers</code> member listing the vouchers you can use here.</p>\n</li>\n<li><p><code>details: {json, null}</code> : a JSON field used to provide details of the visit. The json file is in the form of {\"items\": [{reference\": \"product_id\", \"name\": \"Your product name\", \"description\": \"Your product description\", \"category\": \"category_id\", \"unit_price\": \"17\", \"quantity\": \"1\", \"total_price\": \"17\"}]}</p>\n</li>\n<li><p><code>comment : {string, null}</code> : An optional comment for the visit.</p>\n</li>\n</ul>\n<p>If a voucher in value or percentage is used, then the amount deducted must be passed on to the sum of the items in the sale. There are two ways to achieve this:</p>\n<ol>\n<li><p>Add an additional item at the negative price corresponding to that of the voucher</p>\n</li>\n<li><p>Distribute the value deducted from the voucher in proportion to the price of each item.</p>\n</li>\n</ol>\n","urlObject":{"path":["visits",""],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"0f533e28-e156-24d4-6fe7-403880559a1b","name":"Visit using vouchers","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Token {{token}}"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"card\":\"https://api.zerosix.com/cards/{{card_id}}/\",\n    \"reference\": \"123456789\",\n    \"date\": \"2025-03-03 17:23:00\",\n\t\"price\": \"5.00\",\n    \"details\": {\n        \"items\": [\n            {\n                \"reference\": \"ABC\",\n                \"name\": \"Product Name\",\n                \"category\": \"XYZ\",\n                \"unit_price\": \"10.00\",\n                \"quantity\": \"1\",\n                \"total_price\": \"10.00\"\n            },\n            {\n                \"name\": \"Voucher 5€\",\n                \"unit_price\": \"-5\",\n                \"quantity\": \"1\",\n                \"total_price\": \"-5\"\n            }\n        ]\n    },\n\t\"used_vouchers\": [\n        \"https://api.zerosix.com/vouchers/{{voucher_code}}/\"\n        ]\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/visits/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":"0","body":"{\n    \"url\": \"https://api.zerosix.com/visits/{{visit_id}}/\",\n    \"card\": {\n        \"url\": \"https://api.zerosix.com/cards/{{card_id}}/\",\n        \"reference\": \"{{card_id}}\",\n        \"points_balance\": 179\n    },\n    \"date\": \"2025-03-03 17:23:00\",\n    \"price\": \"5.00\",\n    \"details\": {\n        \"items\": [\n            {\n                \"reference\": \"ABC\",\n                \"name\": \"Product Name\",\n                \"category\": \"XYZ\",\n                \"unit_price\": \"10.00\",\n                \"quantity\": \"1\",\n                \"total_price\": \"10.00\"\n            },\n            {\n                \"name\": \"Voucher 5€\",\n                \"unit_price\": \"-5\",\n                \"quantity\": \"1\",\n                \"total_price\": \"-5\"\n            }\n        ]\n    },\n    \"comment\": null,\n    \"used_vouchers\": [\n        {\n            \"url\": \"https://api.zerosix.com/vouchers/{{voucher_code}}/\",\n            \"name\": \"Voucher 5€\",\n            \"value\": 5,\n            \"unit\": \"Euros\",\n            \"code\": \"{{voucher_code}}\",\n            \"expiration_date\": \"2025-07-21T13:39:38Z\"\n        }\n    ],\n    \"cashback_withdraw_value\": null,\n    \"message\": \"Merci pour votre fidélité. \\r\\nNouveau solde : 179\\r\\n\"\n}"}],"_postman_id":"d92f1515-184c-4a37-47fa-5670671f5ded"},{"name":"Visit Delete","id":"8e8e903c-0746-ec60-c567-f07a004f0cf0","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Token {{token}}"},{"key":"Content-Type","value":"application/json"},{"key":"User-Agent","value":"Software/Version","type":"text"}],"body":{"mode":"raw","raw":""},"url":"{{url}}/visits/{{visit_id}}/","description":"<p>Delete the visit with the provided ID.</p>\n<p>A call to this method will cancel the visit and the corresponding account movements (if applicable) and the granted rewards (if applicable).</p>\n<p>To delete only a selection of items in a Visit created with the \"details\" object, add in the querystring the attribute \"line_number\" followed by the list of line_number(s)\nFor instance : /visits/{{visit_id}}/?line_number={{line_number}}, {{line_number}}</p>\n","urlObject":{"path":["visits","{{visit_id}}",""],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"8e8e903c-0746-ec60-c567-f07a004f0cf0"},{"name":"Store Informations","id":"c2546dbe-e99e-4a22-b80b-9004eec3418d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Token {{token}}"}],"url":"{{url}}/store-informations/","description":"<p>This endpoint is used to retrieve some descriptive information about the Store and the Loyalty Program.</p>\n<ul>\n<li>Name of the Store</li>\n<li>Webapp's url</li>\n<li>Currency</li>\n<li>Loyalty program type</li>\n<li>Earn rules</li>\n<li>Rewards</li>\n</ul>\n","urlObject":{"path":["store-informations",""],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"c2546dbe-e99e-4a22-b80b-9004eec3418d"}],"event":[{"listen":"prerequest","script":{"id":"2881dcdb-3996-4518-9fd8-009d322a7ed2","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"2e367341-14ee-4204-b327-be6e7dbacee6","type":"text/javascript","exec":[""]}}]}