{"info":{"_postman_id":"6d738f8a-f4d4-3573-4e5e-2956e061ee41","name":"McDonald's POS code validation API","description":"<html><head></head><body><p>v2.3.0</p>\n<h2 id=\"security\">Security</h2>\n<p>This API is IP restricted. Client IP address must be provided to Creata for white-listing.</p>\n<p>In addition to an IP white-list, basic HTTPS authentication is implemented using your <code>client_id</code> and <code>client_secret</code>.</p>\n<h2 id=\"document-parameters\">Document Parameters</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>parameter</th>\n<th>description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>{{url}}</code></td>\n<td>The base url for the API endpoints.</td>\n</tr>\n<tr>\n<td><code>{{client_id}}</code></td>\n<td>The client ID issued by Creata.</td>\n</tr>\n<tr>\n<td><code>{{client_secret}}</code></td>\n<td>The client secret issued by Creata.</td>\n</tr>\n<tr>\n<td><code>{{code}}</code></td>\n<td>The POS or contingency code. Can be a string or an array of strings. For GET requests send a urlencoded comma delimited string of codes. For POST requests send a JSON array of strings.</td>\n</tr>\n<tr>\n<td><code>{{customer_id}}</code></td>\n<td>A unique customer identifier (up to 32 chars)</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"request-headers\">Request Headers</h2>\n<p>Basic <code>authorization</code> header must be included in <em>ALL</em> requests.</p>\n<p>Authorization header should be composed of your <code>{{client_id}}</code> and <code>{{client_secret}}</code>.</p>\n<p>The <code>content-type</code> for all <em>POST</em> requests must be <code>multipart/form-data</code> or <code>application/json</code></p>\n<h2 id=\"response\">Response</h2>\n<p>Response bodies will be <code>application/json</code>.\nPlease see a list of sample requests and responses to the right of each endpoint. Programming language selection is available on the top right of this page.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>parameter</th>\n<th>description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>code</code></td>\n<td>The code that was processed</td>\n</tr>\n<tr>\n<td><code>valid</code></td>\n<td>A boolean value indicating if the code was valid. This will not be passed if the system was unable to determine if the code was valid.</td>\n</tr>\n<tr>\n<td><code>success</code></td>\n<td>A boolean indicating the status of the requested operation. (POST operations only)</td>\n</tr>\n<tr>\n<td><code>error</code></td>\n<td>A dictionary detailing the error that occured. Omitted if no error occured.</td>\n</tr>\n<tr>\n<td><code>message</code></td>\n<td>Within <code>error</code> dictionary. A user friendly description of the error.</td>\n</tr>\n<tr>\n<td><code>error_code</code></td>\n<td>Within <code>error</code> dictionary. The error code associated with the encountered error.</td>\n</tr>\n<tr>\n<td><code>customer_id</code></td>\n<td>The customer id that was passed when the code was invalidated. This is not returned if no customer id was passed during invalidation.</td>\n</tr>\n<tr>\n<td><code>transaction</code></td>\n<td>Dictionary of transaction information. Only returned for valid POS codes.</td>\n</tr>\n<tr>\n<td><code>store_id</code></td>\n<td>Within <code>transaction</code> dictionary. The store id where the transaction was processed.</td>\n</tr>\n<tr>\n<td><code>date</code></td>\n<td>Within <code>transaction</code> dictionary. The date of the transaction in YYYY-MM-DD format.</td>\n</tr>\n<tr>\n<td><code>time</code></td>\n<td>Within <code>transaction</code> dictionary. The time of the transaction in HH:MM:SS 24 hour format.</td>\n</tr>\n<tr>\n<td><code>dollar_value</code></td>\n<td>Within <code>transaction</code> dictionary. The two least significant integer digits of the total transaction value.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"error-codes\">Error codes</h2>\n<p><code>4xxx</code> Client errors</p>\n<p><code>5xxx</code> Server errors</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>error_code</th>\n<th>description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>4001</td>\n<td>The code is not valid</td>\n</tr>\n<tr>\n<td>4002</td>\n<td>The code has already been used.</td>\n</tr>\n<tr>\n<td>4003</td>\n<td>You are not authorized to use the resource.</td>\n</tr>\n<tr>\n<td>4004</td>\n<td>No code was revcieved in the request.</td>\n</tr>\n<tr>\n<td>4005</td>\n<td>The code has expired.</td>\n</tr>\n<tr>\n<td>4006</td>\n<td>The code is not yet active.</td>\n</tr>\n<tr>\n<td>4007</td>\n<td>The code was not generated within the promotion period.</td>\n</tr>\n<tr>\n<td>4008</td>\n<td>The code has been used by this customer.</td>\n</tr>\n<tr>\n<td>4009</td>\n<td>The code has already been used by another customer.</td>\n</tr>\n<tr>\n<td>4010</td>\n<td>The customer_id is too long (max 32).</td>\n</tr>\n<tr>\n<td>4011</td>\n<td>customer_id is required</td>\n</tr>\n<tr>\n<td>4012</td>\n<td>customer_id cannot be blank</td>\n</tr>\n<tr>\n<td>4013</td>\n<td>first_name is required</td>\n</tr>\n<tr>\n<td>4014</td>\n<td>last_name is required</td>\n</tr>\n<tr>\n<td>4015</td>\n<td>email is required</td>\n</tr>\n<tr>\n<td>4016</td>\n<td>address is required</td>\n</tr>\n<tr>\n<td>4017</td>\n<td>suburb is required</td>\n</tr>\n<tr>\n<td>4018</td>\n<td>state is required</td>\n</tr>\n<tr>\n<td>4019</td>\n<td>postcode is required</td>\n</tr>\n<tr>\n<td>4020</td>\n<td>promo_state is required</td>\n</tr>\n<tr>\n<td>4030</td>\n<td>reCaptcha is required</td>\n</tr>\n<tr>\n<td>4031</td>\n<td>reCaptcha is invalid</td>\n</tr>\n<tr>\n<td>5000</td>\n<td>An unknown error has occured.</td>\n</tr>\n<tr>\n<td>5001</td>\n<td>An error occured while validating for contingency.</td>\n</tr>\n<tr>\n<td>5002</td>\n<td>Application configuration error, notify maintainer.</td>\n</tr>\n</tbody>\n</table>\n</div></body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"2596811","collectionId":"6d738f8a-f4d4-3573-4e5e-2956e061ee41","publishedId":"6tf1Mys","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2018-02-02T04:57:34.000Z"},"item":[{"name":"/validate","id":"734939b2-4f87-d298-1b66-e71cbb727545","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{client_id}}"},{"key":"password","value":"{{client_secret}}"}],"advancedConfig":[{"key":"showPassword","value":"<show-password>"}]},"isInherited":false},"method":"GET","header":[],"url":"{{url}}/validate?code={{code}}&customer_id={{customer_id}}","description":"<h1 id=\"validation-endpoint\">Validation Endpoint</h1>\n<p>This endpoint can be used to validate POS codes.</p>\n<p><strong>Parameters:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>code</td>\n<td>(required) The POS or contingency code to be validated</td>\n</tr>\n<tr>\n<td>customer_id</td>\n<td>(required) The customer ID associated with the code entry (max 32)</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["validate"],"host":["{{url}}"],"query":[{"key":"code","value":"{{code}}"},{"key":"customer_id","value":"{{customer_id}}"},{"disabled":true,"description":{"content":"<p>Only required if recaptcha is active</p>\n","type":"text/plain"},"key":"g-recaptcha-response","value":"{{g-recaptcha-response}}"}],"variable":[]}},"response":[{"id":"0d7f0a98-7636-ad60-e4d7-4af485f69327","name":"Used","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Basic aWQ6c2VjcmV0"}],"body":{"mode":"formdata","formdata":[]},"url":{"raw":"{{url}}/validate?code={{code}}","host":["{{url}}"],"path":["validate"],"query":[{"key":"code","value":"{{code}}"}]}},"status":"OK","code":200,"_postman_previewlanguage":"","header":[],"cookie":[],"responseTime":"0","body":"{\n\t\"code\": \"EXAMPLECODE\",\n\t\"valid\": false,\n\t\"error\": {\n\t\t\"message\": \"This code has already been used.\",\n\t\t\"error_code\": 2\n\t}\n}"},{"id":"4664cf52-468b-7bee-98fd-a34b9468452f","name":"Used by this customer","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Basic dGVzdDp0ZXN0"}],"body":{"mode":"formdata","formdata":[]},"url":{"raw":"{{url}}/validate?code={{code}}&customer_id={{customer_id}}","host":["{{url}}"],"path":["validate"],"query":[{"key":"code","value":"{{code}}"},{"key":"customer_id","value":"{{customer_id}}"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Connection","value":"Keep-Alive","name":"Connection","description":""},{"key":"Content-Length","value":"89","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":""},{"key":"Date","value":"Fri, 02 Feb 2018 01:15:08 GMT","name":"Date","description":""},{"key":"Keep-Alive","value":"timeout=5, max=99","name":"Keep-Alive","description":""},{"key":"Server","value":"Apache/2.4.27 (Amazon) mod_wsgi/3.5 Python/3.6.2","name":"Server","description":""}],"cookie":[],"responseTime":"22","body":"{\n    \"code\": \"EXAMPLECODE\",\n    \"customer_id\": \"CUSTOMERID\",\n    \"valid\": false,\n    \"error\": {\n        \"message\": \"The code has already been used by this customer.\",\n        \"error_code\": 4008\n    }\n}"},{"id":"46d81d5f-6562-a6fa-e84d-d92b66209444","name":"Used by another customer","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Basic dGVzdDp0ZXN0"}],"body":{"mode":"formdata","formdata":[]},"url":{"raw":"{{url}}/validate?code={{code}}&customer_id={{customer_id}}","host":["{{url}}"],"path":["validate"],"query":[{"key":"code","value":"{{code}}"},{"key":"customer_id","value":"{{customer_id}}"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Connection","value":"Keep-Alive","name":"Connection","description":""},{"key":"Content-Length","value":"89","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":""},{"key":"Date","value":"Fri, 02 Feb 2018 01:15:08 GMT","name":"Date","description":""},{"key":"Keep-Alive","value":"timeout=5, max=99","name":"Keep-Alive","description":""},{"key":"Server","value":"Apache/2.4.27 (Amazon) mod_wsgi/3.5 Python/3.6.2","name":"Server","description":""}],"cookie":[],"responseTime":"22","body":"{\n    \"code\": \"EXAMPLECODE\",\n    \"customer_id\": \"CUSTOMERID\",\n    \"valid\": false,\n    \"error\": {\n        \"message\": \"The code has already been used by another customer.\",\n        \"error_code\": 4009\n    }\n}"},{"id":"5a88cdad-06ed-18c1-29f6-828600cd883e","name":"Code Required","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Basic aWQ6c2VjcmV0"}],"body":{"mode":"formdata","formdata":[]},"url":"{{url}}/validate"},"status":"Not Acceptable","code":406,"_postman_previewlanguage":"","header":[],"cookie":[],"responseTime":"0","body":"{\n\t\"code\": null,\n\t\"success\": false,\n\t\"error\": {\n\t\t\"message\": \"No code recieved.\",\n\t\t\"error_code\": 4\n\t}\n}"},{"id":"a93b2638-601d-9c2f-1e53-786897d5b086","name":"Unknown Error","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Basic aWQ6c2VjcmV0"}],"body":{"mode":"formdata","formdata":[]},"url":{"raw":"{{url}}/validate?code={{code}}","host":["{{url}}"],"path":["validate"],"query":[{"key":"code","value":"{{code}}"}]}},"status":"OK","code":200,"_postman_previewlanguage":"","header":[],"cookie":[],"responseTime":"0","body":"{\n\t\"code\": \"EXAMPLECODE\",\n\t\"error\": {\n\t\t\"message\": \"An unknown error occured.\",\n\t\t\"error_code\": 99\n\t}\n}"},{"id":"b02f3c77-690e-0ffb-8dd0-3abce1a182d7","name":"Invalid","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Basic aWQ6c2VjcmV0"}],"body":{"mode":"formdata","formdata":[]},"url":{"raw":"{{url}}/validate?code={{code}}","host":["{{url}}"],"path":["validate"],"query":[{"key":"code","value":"{{code}}"}]}},"status":"OK","code":200,"_postman_previewlanguage":"","header":[],"cookie":[],"responseTime":"0","body":"{\n\t\"code\": \"EXAMPLECODE\",\n\t\"valid\": false,\n\t\"error\": {\n\t\t\"message\": \"This code is invalid.\",\n\t\t\"error_code\": 1\n\t}\n}"},{"id":"c3b251af-b5ed-a515-c1a1-05dbea39ccc2","name":"Not Authorized","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Basic aWQ6c2VjcmV0"}],"body":{"mode":"formdata","formdata":[]},"url":{"raw":"{{url}}/validate?code={{code}}","host":["{{url}}"],"path":["validate"],"query":[{"key":"code","value":"{{code}}"}]}},"status":"OK","code":200,"_postman_previewlanguage":"","header":[],"cookie":[],"responseTime":"0","body":"{\n\t\"code\": \"EXAMPLECODE\",\n\t\"success\": false,\n\t\"error\": {\n\t\t\"message\": \"Not Authorized.\",\n\t\t\"error_code\": 3\n\t}\n}"},{"id":"d6367e84-c87e-4140-9707-b69672f34c70","name":"Valid","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Basic aWQ6c2VjcmV0"}],"body":{"mode":"formdata","formdata":[]},"url":{"raw":"{{url}}/validate?code={{code}}","host":["{{url}}"],"path":["validate"],"query":[{"key":"code","value":"{{code}}"}]}},"status":"OK","code":200,"_postman_previewlanguage":"","header":[],"cookie":[],"responseTime":"0","body":"{\n\t\"code\": \"EXAMPLECODE\",\n\t\"valid\": true\n}"},{"id":"e9dee684-76bb-261a-8757-555f176233a7","name":"Validate a list of codes","originalRequest":{"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":{"raw":"{{url}}/validate?code={{code}},{{code}},{{code}}&customer_id={{customer_id}}","host":["{{url}}"],"path":["validate"],"query":[{"key":"code","value":"{{code}},{{code}},{{code}}"},{"key":"customer_id","value":"{{customer_id}}"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":"0","body":"[\n    {\n        \"code\": \"CODE1\",\n        \"valid\": true\n    },\n    {\n        \"code\": \"JLLBVVLQZPVJSHPQTQ\",\n        \"valid\": false,\n        \"error\": {\n            \"message\": \"The code has been used by this customer.\",\n            \"error_code\": 4008\n        },\n        \"customer_id\": \"0412345678\",\n        \"transaction\": {\n            \"store_id\": 1307,\n            \"country_id\": 95,\n            \"date\": \"2018-11-14\",\n            \"time\": \"17:58:26\",\n            \"dollar_value\": 25\n        }\n    },\n    {\n        \"code\": \"JLLBVVLQZPDKJASQTQ\",\n        \"valid\": true,\n        \"transaction\": {\n            \"store_id\": 1307,\n            \"country_id\": 95,\n            \"date\": \"2018-11-14\",\n            \"time\": \"5:43:42\",\n            \"dollar_value\": 10\n        }\n    }\n]"}],"_postman_id":"734939b2-4f87-d298-1b66-e71cbb727545"},{"name":"/invalidate","id":"babedacb-c5ab-5bea-477e-79768541a6b6","request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{client_id}}"},{"key":"password","value":"{{client_secret}}"}],"advancedConfig":[{"key":"saveHelperData","value":"<save-helper-data>"},{"key":"showPassword","value":"<show-password>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"formdata","formdata":[{"key":"code","value":"{{code}}","type":"text"},{"key":"customer_id","value":"{{customer_id}}","type":"text"},{"key":"first_name","value":"{{first_name}}","type":"text"},{"key":"last_name","value":"{{last_name}}","type":"text"},{"key":"email","value":"{{email}}","type":"text"},{"key":"address","value":"{{address}}","type":"text"},{"key":"suburb","value":"{{suburb}}","type":"text"},{"key":"state","value":"{{state}}","type":"text"},{"key":"postcode","value":"{{postcode}}","type":"text"}]},"url":"{{url}}/invalidate?g-recaptcha-response={{g-recaptcha-response}}","description":"<h1 id=\"invalidation-endpoint\">Invalidation Endpoint</h1>\n<p>This endpoint can be used to invalidate a POS code and restrict it from being valid for any future calls.</p>\n<p><strong>Parameters:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>code</td>\n<td>(required) The POS or contingency code to be validated</td>\n</tr>\n<tr>\n<td>customer_id</td>\n<td>(required) The customer ID associated with the code entry (max 32)</td>\n</tr>\n<tr>\n<td>first_name</td>\n<td>(optional) Customer's first name</td>\n</tr>\n<tr>\n<td>last_name</td>\n<td>(optional) Customer's last name</td>\n</tr>\n<tr>\n<td>email</td>\n<td>(optional) Customer's email address</td>\n</tr>\n<tr>\n<td>address</td>\n<td>(optional) Customer's street address</td>\n</tr>\n<tr>\n<td>suburb</td>\n<td>(optional) Customer's suburb</td>\n</tr>\n<tr>\n<td>state</td>\n<td>(optional) Customer's state</td>\n</tr>\n<tr>\n<td>postcode</td>\n<td>(optional) Customer's postcode</td>\n</tr>\n<tr>\n<td>promo_state</td>\n<td>(optional) Customer's team state selection for state of origin</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["invalidate"],"host":["{{url}}"],"query":[{"description":{"content":"<p>Only required if recaptcha is active</p>\n","type":"text/plain"},"key":"g-recaptcha-response","value":"{{g-recaptcha-response}}"}],"variable":[]}},"response":[{"id":"0353c59e-5aee-ef3a-5067-3308d47b5a59","name":"Used","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Basic aWQ6c2VjcmV0"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"code\": \"{{code}}\",\n\t\"customer_id\": \"{{customer_id}}\"\n}"},"url":"{{url}}/invalidate"},"status":"OK","code":200,"_postman_previewlanguage":"","header":[],"cookie":[],"responseTime":"0","body":"{\n\t\"code\": \"EXAMPLECODE\",\n\t\"success\": false,\n\t\"error\":{\n\t\t\"message\": \"This code has already been used.\",\n\t\t\"error_code\": 2\n\t}\n}"},{"id":"1ea44ad9-3301-4915-be61-1c79ab37ac9a","name":"/invalidate","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"formdata","formdata":[{"key":"code","value":"{{code}}","type":"text"},{"key":"customer_id","value":"{{customer_id}}","type":"text"},{"key":"first_name","value":"{{first_name}}","type":"text","disabled":true},{"key":"last_name","value":"{{last_name}}","type":"text","disabled":true},{"key":"email","value":"{{email}}","type":"text","disabled":true},{"key":"address","value":"{{address}}","type":"text","disabled":true},{"key":"suburb","value":"{{suburb}}","type":"text","disabled":true},{"key":"state","value":"{{state}}","type":"text","disabled":true},{"key":"postcode","value":"{{postcode}}","type":"text","disabled":true}]},"url":{"raw":"{{url}}/invalidate?g-recaptcha-response={{g-recaptcha-response}}","host":["{{url}}"],"path":["invalidate"],"query":[{"key":"g-recaptcha-response","value":"{{g-recaptcha-response}}","description":"Only required if recaptcha is active"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 24 Nov 2020 17:56:42 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"63"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"nginx"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Content-Security-Policy","value":"default-src 'self'"},{"key":"X-Content-Security-Policy","value":"default-src 'self'"},{"key":"Strict-Transport-Security","value":"max-age=31556926; includeSubDomains"},{"key":"Referrer-Policy","value":"strict-origin-when-cross-origin"},{"key":"Access-Control-Allow-Origin","value":"*"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": \"EXAMPLECODE\",\n    \"success\": true,\n    \"winner\": true\n}"},{"id":"250e4e28-d487-37f4-42c7-61ef4d4f7ab6","name":"Invalidate a list of codes","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"code\": [\n\t\t\"{{code}}\",\n\t\t\"{{code2}}\"\n\t\t],\n\t\"customer_id\": \"{{customer_id}}\"\n}"},"url":"{{url}}/invalidate"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Length","value":"385","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":""},{"key":"Date","value":"Fri, 09 Feb 2018 01:21:33 GMT","name":"Date","description":""},{"key":"Server","value":"Werkzeug/0.12.2 Python/3.6.2","name":"Server","description":""}],"cookie":[],"responseTime":"42","body":"[\n    {\n        \"code\": \"JLLBVVLQZPSIUGPQTQ\",\n        \"success\": false,\n        \"error\": {\n            \"message\": \"The code has been used by this customer.\",\n            \"error_code\": 4008\n        },\n        \"customer_id\": \"1234567890\",\n        \"transaction\": {\n            \"store_id\": 1201,\n            \"country_id\": 93,\n            \"date\": \"2018-11-12\",\n            \"time\": \"20:00:00\",\n            \"dollar_value\": 2\n        }\n    },\n    {\n        \"code\": \"VSDLBVVLSDFQZPSIUG\",\n        \"success\": false,\n        \"error\": {\n            \"message\": \"The code is not valid.\",\n            \"error_code\": 4001\n        }\n    }\n]"},{"id":"49ed4540-e51c-2196-6f70-b033d9c76629","name":"Invalid","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Basic aWQ6c2VjcmV0"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"code\": \"{{code}}\",\n\t\"customer_id\": \"{{customer_id}}\"\n}"},"url":"{{url}}/invalidate"},"status":"OK","code":200,"_postman_previewlanguage":"","header":[],"cookie":[],"responseTime":"0","body":"{\n\t\"code\": \"EXAMPLECODE\",\n\t\"success\": false,\n\t\"error\": {\n\t\t\"message\": \"This code is invalid.\",\n\t\t\"error_code\": 1\n\t}\n}"},{"id":"55a73ca1-342d-25cd-d5e1-6cc4f74b3297","name":"Not Authorized","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Basic aWQ6c2VjcmV0"},{"key":"Content-Type","name":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"code\": \"{{code}}\",\n\t\"customer_id\": \"{{customer_id}}\"\n}"},"url":"{{url}}/invalidate"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"","header":[],"cookie":[],"responseTime":"0","body":"{\n\t\"code\": \"EXAMPLECODE\",\n\t\"success\": false,\n\t\"error\": {\n\t\t\"message\": \"Not Authorized.\",\n\t\t\"error_code\": 3\n\t}\n}"},{"id":"88eba806-7052-11a6-9ffd-4fdb40f742af","name":"Success","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Basic aWQ6c2VjcmV0"},{"key":"Content-Type","name":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"code\": \"{{code}}\",\n\t\"customer_id\": \"{{customer_id}}\"\n}"},"url":"{{url}}/consume"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":"0","body":"{\n\t\"code\": \"EXAMPLECODE\",\n\t\"success\": true,\n}"},{"id":"8b24a6ac-8ed7-5be4-038a-073cfcfa5f9b","name":"Code Required","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Basic aWQ6c2VjcmV0"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"customer_id\": \"{{customer_id}}\"\n}"},"url":"{{url}}/invalidate"},"status":"OK","code":200,"_postman_previewlanguage":"","header":[],"cookie":[],"responseTime":"0","body":"{\n\t\"code\": null,\n\t\"success\": false,\n\t\"error\": {\n\t\t\"message\": \"No code recieved.\",\n\t\t\"error_code\": 4\n\t}\n}"},{"id":"9828c414-a505-7395-310b-51196db717da","name":"Unknown Error","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Basic aWQ6c2VjcmV0"},{"key":"Content-Type","name":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"code\": \"{{code}}\",\n\t\"customer_id\": \"{{customer_id}}\"\n}"},"url":"{{url}}/invalidate"},"status":"OK","code":200,"_postman_previewlanguage":"","header":[],"cookie":[],"responseTime":"0","body":"{\n\t\"code\": \"EXAMPLECODE\",\n\t\"error\": {\n\t\t\"message\": \"An unknown error occured.\",\n\t\t\"error_code\": 99\n\t}\n}"}],"_postman_id":"babedacb-c5ab-5bea-477e-79768541a6b6"},{"name":"/ocr","id":"12f99622-2004-421e-91d4-8d4197d6508b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{client_id}}"},{"key":"password","value":"{{client_secret}}"}],"advancedConfig":[{"key":"saveHelperData","value":"<save-helper-data>"},{"key":"showPassword","value":"<show-password>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"formdata","formdata":[{"key":"image","type":"file","src":"/Users/gbabic/Production/Workspace/LearningOCR/img/d.jpg"}]},"url":"{{url}}/ocr?g-recaptcha-response={{g-recaptcha-response}}","description":"<h1 id=\"ocr-endpoint\">OCR Endpoint</h1>\n<p>This endpoint can be used to extract a POS code from a photograph of a McDonalds receipt.</p>\n<p><strong>Parameters:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>image</td>\n<td>(required) Image file of the McDonalds receipt</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["ocr"],"host":["{{url}}"],"query":[{"key":"g-recaptcha-response","value":"{{g-recaptcha-response}}"}],"variable":[]}},"response":[{"id":"ca628ed4-342b-4d54-bc68-13a4665f0e3d","name":"invalid code detected","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"formdata","formdata":[{"key":"image","type":"file","value":null}]},"url":{"raw":"{{url}}/ocr?g-recaptcha-response={{g-recaptcha-response}}","host":["{{url}}"],"path":["ocr"],"query":[{"key":"g-recaptcha-response","value":"{{g-recaptcha-response}}"}]}},"status":"BAD REQUEST","code":400,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.14.2"},{"key":"Date","value":"Wed, 09 Sep 2020 08:28:44 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"102"},{"key":"Connection","value":"keep-alive"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Content-Security-Policy","value":"default-src 'self'"},{"key":"X-Content-Security-Policy","value":"default-src 'self'"},{"key":"Referrer-Policy","value":"strict-origin-when-cross-origin"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Vary","value":"Cookie"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": \"JLUJROKLFEWGUWPUFZK\",\n    \"error\": {\n        \"message\": \"Detected code is invalid.\",\n        \"error_code\": 4034\n    }\n}"}],"_postman_id":"12f99622-2004-421e-91d4-8d4197d6508b"},{"name":"/health","id":"1388d33a-a4c4-914d-93dd-059e8c77a29c","request":{"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"{{url}}/health","description":"<p>Simple application health check</p>\n","urlObject":{"path":["health"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"1388d33a-a4c4-914d-93dd-059e8c77a29c"},{"name":"/instantwin","id":"741575b0-40fe-4bc1-b504-fc72498cc256","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{client_id}}"},{"key":"password","value":"{{client_secret}}"}],"advancedConfig":[{"key":"showPassword","value":"<show-password>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"code","value":"{{code}}","description":"<p>(required) The POS or contingency code to be validated</p>\n","type":"text"},{"key":"customer_id","value":"{{customer_id}}","description":"<p>(required) The customer ID associated with the code entry (max 32)</p>\n","type":"text"}]},"url":"{{url}}/instantwin","description":"<p>This endpoint can be used to invalidate a POS code, restrict it from being valid for any future calls and make an instant winning decision whether the request is a winner or not. </p>\n<p>This endpoint is prepared specifically for McD NZ Spin to Win promotion.</p>\n<p><strong>Parameters:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>code</td>\n<td>(required) The POS or contingency code to be validated</td>\n</tr>\n<tr>\n<td>customer_id</td>\n<td>(required) The customer ID associated with the code entry (max 32)</td>\n</tr>\n<tr>\n<td>first_name</td>\n<td>(optional) Customer's first name</td>\n</tr>\n<tr>\n<td>last_name</td>\n<td>(optional) Customer's last name</td>\n</tr>\n<tr>\n<td>email</td>\n<td>(optional) Customer's email address</td>\n</tr>\n<tr>\n<td>address</td>\n<td>(optional) Customer's street address</td>\n</tr>\n<tr>\n<td>suburb</td>\n<td>(optional) Customer's suburb</td>\n</tr>\n<tr>\n<td>state</td>\n<td>(optional) Customer's state</td>\n</tr>\n<tr>\n<td>postcode</td>\n<td>(optional) Customer's postcode</td>\n</tr>\n<tr>\n<td>promo_state</td>\n<td>(optional) Customer's team state selection for state of origin</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["instantwin"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"17393636-bac1-401b-ac4f-88f0224c8046","name":"/instantwin","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"code","value":"{{code}}","description":"(required) The POS or contingency code to be validated","type":"text"},{"key":"customer_id","value":"{{customer_id}}","description":"(required) The customer ID associated with the code entry (max 32)","type":"text"}]},"url":"{{url}}/instantwin"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 24 Nov 2020 18:02:08 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"64"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"nginx"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Content-Security-Policy","value":"default-src 'self'"},{"key":"X-Content-Security-Policy","value":"default-src 'self'"},{"key":"Strict-Transport-Security","value":"max-age=31556926; includeSubDomains"},{"key":"Referrer-Policy","value":"strict-origin-when-cross-origin"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Vary","value":"Cookie"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": \"EXAMPLECODE\",\n    \"success\": true,\n    \"winner\": false\n}"}],"_postman_id":"741575b0-40fe-4bc1-b504-fc72498cc256"}],"event":[{"listen":"prerequest","script":{"id":"4c6ac0d3-5612-4d2b-bdda-350d61f2622a","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"f3341264-79cd-4b49-8a75-d7361afcbbd4","type":"text/javascript","exec":[""]}}]}