{"info":{"_postman_id":"e2f9dd1f-f7a5-43f0-8d68-3498c672603b","name":"ShokolatApi-V3","description":"<html><head></head><body><h1 id=\"api-error-codes\">API Error Codes</h1>\n<p>All error responses follow this structure:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": false,\n  \"message\": \"Error message.\",\n  \"error_code\": 1000\n}\n\n</code></pre>\n<p>Validation errors may include a <code>details</code> field:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": false,\n  \"message\": \"Validation failed.\",\n  \"error_code\": 1100,\n  \"details\": {\n    \"mobile\": [\"The mobile field is required.\"]\n  }\n}\n\n</code></pre>\n<hr>\n<h2 id=\"error-code-ranges\">Error Code Ranges</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Range</th>\n<th>Category</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1000–1099</td>\n<td>Auth</td>\n</tr>\n<tr>\n<td>1100–1199</td>\n<td>Validation</td>\n</tr>\n<tr>\n<td>1200–1299</td>\n<td>Resource</td>\n</tr>\n<tr>\n<td>1300–1399</td>\n<td>Business Logic</td>\n</tr>\n<tr>\n<td>9000+</td>\n<td>Server Error</td>\n</tr>\n</tbody>\n</table>\n</div><hr>\n<h2 id=\"error-codes\">Error Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Message</th>\n<th>HTTP</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1000</td>\n<td>Unauthenticated.</td>\n<td>401</td>\n</tr>\n<tr>\n<td>1001</td>\n<td>Token has expired.</td>\n<td>401</td>\n</tr>\n<tr>\n<td>1002</td>\n<td>Token is invalid.</td>\n<td>401</td>\n</tr>\n<tr>\n<td>1003</td>\n<td>Access denied.</td>\n<td>403</td>\n</tr>\n<tr>\n<td>1100</td>\n<td>Validation failed.</td>\n<td>422</td>\n</tr>\n<tr>\n<td>1101</td>\n<td>Required field is missing.</td>\n<td>422</td>\n</tr>\n<tr>\n<td>1102</td>\n<td>Invalid format.</td>\n<td>422</td>\n</tr>\n<tr>\n<td>1103</td>\n<td>Invalid value.</td>\n<td>422</td>\n</tr>\n<tr>\n<td>1200</td>\n<td>Resource not found.</td>\n<td>400</td>\n</tr>\n<tr>\n<td>1201</td>\n<td>Already exists.</td>\n<td>409</td>\n</tr>\n<tr>\n<td>1300</td>\n<td>Insufficient store wallet balance.</td>\n<td>400</td>\n</tr>\n<tr>\n<td>1301</td>\n<td>Limit reached.</td>\n<td>400</td>\n</tr>\n<tr>\n<td>1302</td>\n<td>Already used.</td>\n<td>400</td>\n</tr>\n<tr>\n<td>1303</td>\n<td>Expired.</td>\n<td>400</td>\n</tr>\n<tr>\n<td>1304</td>\n<td>Inactive.</td>\n<td>400</td>\n</tr>\n<tr>\n<td>1305</td>\n<td>Invalid PIN.</td>\n<td>400</td>\n</tr>\n<tr>\n<td>1306</td>\n<td>Card is not active.</td>\n<td>400</td>\n</tr>\n<tr>\n<td>1307</td>\n<td>Customer credit is not enough.</td>\n<td>400</td>\n</tr>\n<tr>\n<td>1308</td>\n<td>Customer not found.</td>\n<td>400</td>\n</tr>\n<tr>\n<td>9000</td>\n<td>An unexpected error occurred.</td>\n<td>500</td>\n</tr>\n</tbody>\n</table>\n</div></body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"API Error Codes","slug":"api-error-codes"}],"owner":"13315703","collectionId":"e2f9dd1f-f7a5-43f0-8d68-3498c672603b","publishedId":"UVknsbBj","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-02-22T20:33:27.000Z"},"item":[{"name":"Customers","item":[{"name":"Customer Group","item":[{"name":"PullCustomerGroups","id":"7dd3414a-9d80-4f9d-97de-14d4aedba486","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://my.shokolat.app/api/webhook/v3/pull_customer_groups?token=","description":"<h2 id=\"pull-customer-groups\">Pull customer groups</h2>\n<p>This API return all customers groups.</p>\n<h4 id=\"parameters\">Parameters:</h4>\n<p><code>token</code> : This parameter is <strong>mandatory.</strong> you can get it from shokolat panel in this link: <a href=\"https://my.shokolat.app/store/services/listResponse:id\">https://my.shokolat.app/store/services/list</a></p>\n<h4 id=\"response\">Response:</h4>\n<p><code>id</code> : group id</p>\n<p><code>name</code> : group name</p>\n<p><code>is_starting_group</code> : <code>boolean</code> If the group is the default group the value is : 1 and else the value is 0</p>\n<p><strong>Example response on success:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"success\": true,\n    \"result\": [\n        {\n            \"id\": 1,\n            \"name\": \"گروه برنزی\",\n            \"is_starting_group\": 1\n        },\n        {\n            \"id\": 2,\n            \"name\": \"طلایی\",\n            \"is_starting_group\": 0\n        }\n    ]\n}\n\n</code></pre>\n<p><strong>Example response on failure:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"success\": false,\n    \"message\": \"token is not valid\"\n}\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","webhook","v3","pull_customer_groups"],"host":["my","shokolat","app"],"query":[{"description":{"content":"<p>token is mandatory</p>\n","type":"text/plain"},"key":"token","value":""}],"variable":[]}},"response":[],"_postman_id":"7dd3414a-9d80-4f9d-97de-14d4aedba486"}],"id":"ef3c8fed-6d00-4bc0-b793-34390e162291","_postman_id":"ef3c8fed-6d00-4bc0-b793-34390e162291","description":""},{"name":"Customers","item":[{"name":"PushCustomers","id":"b57cffa1-bb64-423e-ab5a-5d762596d732","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"token\": \"\",\n    \"data\": [\n        {\n            \"mobile\": \"09000000000\",\n            \"email\": \"\",\n            \"group_id\": \"\",\n            \"name\": \"test\",\n            \"family\": \"\",\n            \"gender\": \"\",\n            \"national_code\": \"\",\n            \"address\": \"\",\n            \"city\": \"\",\n            \"province\": \"\",\n            \"birthday\": \"\",\n            \"tags\": [],\n            \"referralCode\": \"\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"https://my.shokolat.app/api/webhook/v3/push_customers","description":"<h2 id=\"push-customers\">Push customers</h2>\n<p>You can send a list of customers to this API .Shokolat will registering the customers and return <code>customer_id</code> .</p>\n<p>We recommend that save the <code>customer_id</code> in your customers table for later use.</p>\n<p>Also you can use this API for registering one customer.</p>\n<h3 id=\"parameters\">Parameters:</h3>\n<hr />\n<p><strong>Important note:</strong></p>\n<p>At least , one of the <code>mobile</code> or <code>email</code> is necessary and mandatory.</p>\n<p>If you set only <code>email</code> parameter , the <code>mobile</code> value will register by <code>09000000000</code> value.</p>\n<hr />\n<p><code>token</code>: mandatory , shokolat token</p>\n<p><code>data</code> : you must set your parameters in <code>data</code> array.</p>\n<p><code>mobile</code> : must be 11 digits. sample: 09123456789</p>\n<p><code>email</code> : valid email. sample : <a href=\"https://mailto:info@shokolat.app\">info@shokolat.app</a></p>\n<p><code>group_id</code> : optional . If you want to register the customer in a group, you can set <code>group_id</code>. shokolat will register customer in default group if this parameter was not set.</p>\n<p><code>name</code> : optional</p>\n<p><code>family</code> : optional</p>\n<p><code>gender</code> : optional. only give \"male\" or \"female\" value.</p>\n<p><code>national_code</code> : optional . numeric</p>\n<p><code>address</code> : optional</p>\n<p><code>city</code> : optional</p>\n<p><code>province</code> : optional</p>\n<p><code>birthday</code> : optional. must be Jalalian date with this format: <code>YYYY-mm-dd</code> sample: 1364-12-22</p>\n<p><code>tags</code>: optional . customer tag ids in array.sample: <code>[1,2,9]</code></p>\n<p>note: You can get the list of tags from <code>PullCustomersTags</code> API and.</p>\n<p><strong>Sample request:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"token\" : \"\",\n    \"data\" : [\n        {\n            \"mobile\" : \"09122566137\",\n            \"email\" : \"almaitco@gmail.com\",\n            \"group_id\" : \"1\",\n            \"name\" : \"مهران\",\n            \"family\" : \"سعادت\",\n            \"gender\" : \"male\",\n            \"national_code\" : \"1234567890\",\n            \"address\" : \"خیابان میرزای شیرازی\",\n            \"city\" : \"تهران\",\n            \"province\" : \"تهران\",\n            \"birthday\" : \"1364-12-22\",\n            \"tags\" : [1,2,9]\n        },\n    ]\n}\n\n</code></pre>\n<p><strong>Sample response on success:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"success\": true,\n    \"result\": {\n        \"registered_customers\": [\n            {\n                \"mobile\": \"09123456789\",\n                \"email\": \"almaitco@gmail.com\",\n                \"customer_id\": 45\n            }\n        ],\n        \"not_registered_customers\": [\n            {\n                \"mobile\": \"09654\",\n                \"email\": \"abc@hjk\"\n            }\n        ],\n        \"exists_customers\": [\n            {\n                \"mobile\": \"09122566137\",\n                \"customer_id\": 21\n            }\n        ]\n    }\n}\n\n</code></pre>\n<p><code>registered_customer</code> :</p>\n<p>This array contains successfully registered customers.</p>\n<p><code>customer_id</code> : customer id in shokolat.</p>\n<p><code>not_registered_customers</code> :</p>\n<p>This array contains unsuccessful register customer.</p>\n<p>If registration process contains error or parameters was incorrect, the data will show in this array.</p>\n<p><code>exists_customers</code> :</p>\n<p>This array contains exists customers of your list.</p>\n<p>If any customer exists by <code>mobile</code> or <code>email</code> , shokolat will not register it again and return the list of exists customers.</p>\n","urlObject":{"protocol":"https","path":["api","webhook","v3","push_customers"],"host":["my","shokolat","app"],"query":[],"variable":[]}},"response":[],"_postman_id":"b57cffa1-bb64-423e-ab5a-5d762596d732"},{"name":"PullCustomers","id":"8c97be3e-bc2f-4708-a9d4-8258b0bcaa89","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://my.shokolat.app/api/webhook/v3/pull_customers?token=&group_id=&page","description":"<h2 id=\"pull-customers\">Pull customers</h2>\n<p>This API return all customers.</p>\n<p>Also you can get a group's customers by set <code>group_id</code> parameter.</p>\n<p>Each page contains 50 records and you can access to other pages by set <code>page</code> parameter.</p>\n<h4 id=\"parameters\">Parameters:</h4>\n<p><code>token</code> : Mandatory</p>\n<p><code>group_id</code> : Optional</p>\n<p><code>page</code> : Optional - page number</p>\n<h4 id=\"response\">Response:</h4>\n<p>Response sample on success:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"success\": true,\n    \"result\": [\n        {\n            \"customer_id\": 1,\n            \"group_id\": 1,\n            \"group_name\" : \"طلایی\",\n            \"name\": \"مهران\",\n            \"family\": \"سعادت\",\n            \"mobile\": \"09122566137\",\n            \"email\": almaitco@gmail.com,\n            \"national_code\": null,\n            \"gender\": \"male\",\n            \"birthday\": \"1364-12-22\",\n            \"address\": null,\n            \"province\": \"تهران\",\n            \"city\": \"تهران\",\n            \"credit_in_store\": \"4972000\",\n            \"customerCards\": [\n                \"68864008783995933\",\n                \"7884845257646094\",\n                \"32741703244636346\"\n            ]\n        },\n    ],\n    \"totalCustomers\": 150,\n    \"currentPage\": 1,\n    \"hasMorePages\": true\n}\n\n</code></pre>\n<p><strong>Response sample on failure:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"success\": false,\n    \"message\": \"group_id not found\"\n}\n\n</code></pre>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"success\": false,\n    \"message\": \"token is not valid\"\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","webhook","v3","pull_customers"],"host":["my","shokolat","app"],"query":[{"description":{"content":"<p>token is mandatory</p>\n","type":"text/plain"},"key":"token","value":""},{"description":{"content":"<p>Optional</p>\n","type":"text/plain"},"key":"group_id","value":""},{"description":{"content":"<p>Optional- page number</p>\n","type":"text/plain"},"key":"page","value":null}],"variable":[]}},"response":[],"_postman_id":"8c97be3e-bc2f-4708-a9d4-8258b0bcaa89"},{"name":"PutCustomers","id":"09489c4a-1c88-4e8f-b68f-7aee3da2344f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"token\": \"\",\n    \"data\": [\n        {\n            \"customer_id\": \"\",\n            \"mobile\": \"\",\n            \"cardNumber\": \"\",\n            \"email\": \"\",\n            \"change_list\": [\n                {\n                    \"name\": \"\",\n                    \"family\": \"\",\n                    \"mobile\": \"\",\n                    \"email\": \"\",\n                    \"city\": \"\",\n                    \"province\": \"\",\n                    \"address\": \"\",\n                    \"phone\": \"\",\n                    \"national_code\": \"\",\n                    \"description\": \"\",\n                    \"group_id\": \"\"\n                }\n            ]\n        },\n        {\n            \"customer_id\": \"\",\n            \"change_list\": [\n                {\n                    \"name\": \"\",\n                    \"family\": \"\",\n                    \"mobile\": \"\",\n                    \"email\": \"\",\n                    \"city\": \"\",\n                    \"province\": \"\",\n                    \"address\": \"\",\n                    \"phone\": \"\",\n                    \"national_code\": \"\",\n                    \"description\": \"\"\n                }\n            ]\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"https://my.shokolat.app/api/webhook/v3/put_customers","description":"<h2 id=\"put-customers\">Put Customers</h2>\n<p>You can update customers info by this Api.</p>\n<p>This Api can use for one or many customers at same time.</p>\n<p>You can use at least one of `mobile` , `email` , `customer_id` to find a customer and making change for it.</p>\n<p>The order of priority of the parameters is as follows:</p>\n<ol>\n<li><p><code>customer_id</code></p>\n</li>\n<li><p><code>mobile</code></p>\n</li>\n<li><p><code>cardNumber</code></p>\n</li>\n<li><p><code>email</code></p>\n</li>\n</ol>\n<p><code>change_list</code> array : you must put the parameters that need to be changed in this array.</p>\n<p>Note: You don't have to enter all the parameters and you can set only the parameters that need to be changed.</p>\n<h3 id=\"request-sample\">Request sample:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"token\" : \"\",\n    \"data\" : [\n        {\n            \"customer_id\" : \"\",\n            \"mobile\" : \"\",\n            \"email\" : \"\",\n            \"change_list\" : [\n                {\n                \"name\" : \"\",\n                \"family\" : \"\",\n                \"mobile\" : \"\",\n                \"email\" : \"\",\n                \"city\" : \"\",\n                \"province\" : \"\",\n                \"address\" : \"\",\n                \"phone\" : \"\",\n                \"national_code\" : \"\",\n                \"description\" : \"\",\n                \"group_id\": \"\"\n                }\n            ]\n        },\n        {\n            \"customer_id\" : \"\",\n            \"change_list\" : [\n                {\n                \"name\" : \"\",\n                \"family\" : \"\"\n                }\n            ]\n        }\n    ]\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","webhook","v3","put_customers"],"host":["my","shokolat","app"],"query":[],"variable":[]}},"response":[],"_postman_id":"09489c4a-1c88-4e8f-b68f-7aee3da2344f"},{"name":"DeleteCustomers","id":"083f1811-f729-4dab-9bd8-d1df5251c8bc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\n    \"token\": \"\",\n    \"data\": [\n        {\n            \"customer_id\": [\n                1,\n                65\n            ],\n            \"mobile\": [\n                \"09122566137\",\n                \"09305547040\"\n            ],\n            \"email\": [\n                \"mehran@saadat.org\",\n                \"sample@test.com\"\n            ]\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"https://my.shokolat.app/api/webhook/v3/delete_customers","description":"<h2 id=\"delete-customers\">Delete customers</h2>\n<p>You can delete one or some customers by this API.</p>\n<p><code>data array</code> : customers arrays must place in this array.</p>\n<p><code>customer_id</code> array : delete customers by customer_id.</p>\n<p><code>mobile</code> array : delete customers by mobile no.</p>\n<p><code>email</code> array : delete customers by email address.</p>\n<h3 id=\"request-sample\">Request sample:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"token\": \"\",\n    \"data\": [\n        {\n            \"customer_id\": [\n                1,\n                65\n            ],\n            \"mobile\": [\n                \"09122566137\",\n                \"09305547040\"\n            ],\n            \"email\": [\n                \"mehran@saadat.org\",\n                \"sample@test.com\"\n            ]\n        }\n    ]\n}\n\n</code></pre>\n<h3 id=\"response-sample\">Response sample:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"successful_deleted\": [\n        {\n            \"mobile\": \"09122566137\"\n        }\n    ],\n    \"errors\": [\n        {\n            \"customer_id\": 1,\n            \"error\": \"customer not found\"\n        },\n        {\n            \"mobile\": \"0912365\",\n            \"error\": \"mobile format not correct\"\n        },\n        {\n            \"mobile\": \"09122566117\",\n            \"error\": \"customer not found\"\n        },\n        {\n            \"email\": \"mehran@saadat.org\",\n            \"error\": \"customer not found\"\n        },\n        {\n            \"mobile\": \"chgh@fgh\",\n            \"error\": \"email format not correct\"\n        }\n    ]\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","webhook","v3","delete_customers"],"host":["my","shokolat","app"],"query":[],"variable":[]}},"response":[],"_postman_id":"083f1811-f729-4dab-9bd8-d1df5251c8bc"},{"name":"CustomerInfo","id":"739c44db-a396-4e79-a584-bb380eb8f271","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://my.shokolat.app/api/webhook/v3/customer_info?token","description":"<h2 id=\"customer-info\">Customer info</h2>\n<p>You can get full details of a customer by this API.</p>\n<p>Plus the customer profile details , you can get the credits and points of the customer.</p>\n<h4 id=\"parameters\">Parameters:</h4>\n<p><code>token</code> : This parameter is mandatory.</p>\n<p>At least one of these parameters is required:</p>\n<p><code>customer_id</code> : optional - shokolat customer_id</p>\n<p><code>mobile</code> : optional - sample 09123456789</p>\n<p><code>email</code> : optional - <a href=\"mailto:sample@shokolat.app\">sample@shokolat.app</a></p>\n<p><code>card_number</code> : optional</p>\n<h3 id=\"sample-response\">Sample Response:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"success\": true,\n    \"result\": {\n        \"name\": \"مهران\",\n        \"family\": \"سعادت\",\n        \"mobile\": \"09122566137\",\n        \"email\": \"mehran@saadat.org\",\n        \"group_id\": null,\n        \"group_name\": null,\n        \"birthday\": \"1364-12-22\",\n        \"gender\": \"male\",\n        \"national_code\": \"1234567890\",\n        \"registration_code\": null,\n        \"address\": \"خیابان میرزای شیرازی\",\n        \"city\": \"تهران\",\n        \"province\": \"تهران\",\n        \"points\": 26,\n        \"points_can_use\": 26,\n        \"credit_in_store\": \"100,000\",\n        \"credit_in_this_branch\": \"6,000\"\n    }\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","webhook","v3","customer_info"],"host":["my","shokolat","app"],"query":[{"description":{"content":"<p>token is mandatory</p>\n","type":"text/plain"},"key":"token","value":null},{"disabled":true,"key":"customer_id","value":""},{"disabled":true,"description":{"content":"<p>09123456789</p>\n","type":"text/plain"},"key":"mobile","value":""},{"disabled":true,"description":{"content":"<p><a href=\"mailto:sample@test.com\">sample@test.com</a></p>\n","type":"text/plain"},"key":"email","value":""},{"disabled":true,"description":{"content":"<p>card number</p>\n","type":"text/plain"},"key":"card_number","value":""}],"variable":[]}},"response":[],"_postman_id":"739c44db-a396-4e79-a584-bb380eb8f271"}],"id":"f45157fd-46a3-4771-8995-abdf73a7f7b6","_postman_id":"f45157fd-46a3-4771-8995-abdf73a7f7b6","description":""},{"name":"Tags","item":[{"name":"PullCustomersTags","id":"cc804219-9aab-4d70-9761-434759cc9790","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://my.shokolat.app/api/webhook/v3/customers/tags/pull?token","urlObject":{"protocol":"https","path":["api","webhook","v3","customers","tags","pull"],"host":["my","shokolat","app"],"query":[{"key":"token","value":null}],"variable":[]}},"response":[],"_postman_id":"cc804219-9aab-4d70-9761-434759cc9790"}],"id":"3d3bd290-42e3-468c-bba6-7e08b99e28e5","_postman_id":"3d3bd290-42e3-468c-bba6-7e08b99e28e5","description":""},{"name":"Cards","item":[{"name":"PullCustomerCards","id":"7384da14-c673-40da-8973-0fb964e7243d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"my.shokolat.app/api/webhook/v3/customer/cards/pull?token=&customerId=&mobile=","urlObject":{"path":["api","webhook","v3","customer","cards","pull"],"host":["my","shokolat","app"],"query":[{"key":"token","value":""},{"key":"customerId","value":""},{"key":"mobile","value":""}],"variable":[]}},"response":[],"_postman_id":"7384da14-c673-40da-8973-0fb964e7243d"},{"name":"PushCustomerCard","id":"4447329c-395f-4e98-be03-b98078059970","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"token\": \"\",\n    \"data\": {\n        \"customerId\": \"\",\n        \"mobile\": \"09122566137\",\n        \"cardNumber\": \"123456789\",\n        \"password\": \"1111\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"my.shokolat.app/api/webhook/v3/customer/card/push","urlObject":{"path":["api","webhook","v3","customer","card","push"],"host":["my","shokolat","app"],"query":[],"variable":[]}},"response":[],"_postman_id":"4447329c-395f-4e98-be03-b98078059970"},{"name":"ChangeCardPassword","id":"a7ca02fa-cdcd-48e0-baee-6558f71f103e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"token\": \"\",\n    \"data\": {\n        \"customerId\": \"\",\n        \"mobile\": \"09122566137\",\n        \"cardNumber\": \"123456789\",\n        \"oldPassword\": \"1111\",\n        \"newPassword\": \"2222\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"my.shokolat.app/api/webhook/v3/customer/card/change_password","urlObject":{"path":["api","webhook","v3","customer","card","change_password"],"host":["my","shokolat","app"],"query":[],"variable":[]}},"response":[],"_postman_id":"a7ca02fa-cdcd-48e0-baee-6558f71f103e"},{"name":"DeleteCustomerCard","id":"f92f97aa-94df-4829-9466-971d42ff2468","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\n    \"token\": \"\",\n    \"data\": {\n        \"cardNumber\": \"123456789\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"my.shokolat.app/api/webhook/v3/customer/card/delete","urlObject":{"path":["api","webhook","v3","customer","card","delete"],"host":["my","shokolat","app"],"query":[],"variable":[]}},"response":[],"_postman_id":"f92f97aa-94df-4829-9466-971d42ff2468"}],"id":"e0a5b785-2129-4b59-a015-571a473ee769","_postman_id":"e0a5b785-2129-4b59-a015-571a473ee769","description":""}],"id":"8b5dfa55-a604-48ff-b82b-e4e7c904ce58","_postman_id":"8b5dfa55-a604-48ff-b82b-e4e7c904ce58","description":""},{"name":"Products","item":[{"name":"Product Group","item":[{"name":"PullProductGroups","id":"ce8ae376-57be-4ec0-affe-e80512464326","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://my.shokolat.app/api/webhook/v3/products/groups/pull?token","description":"<h2 id=\"pull-product-groups\">Pull product groups</h2>\n<p>This API return all product groups.</p>\n<p>parameters:</p>\n<p><code>token</code> : mandatory</p>\n<h3 id=\"response-sample\">Response Sample:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"success\": true,\n    \"result\": [\n        {\n            \"product_group_id\": 1,\n            \"product_group_name\": \"گروه محصولات 5\"\n        },\n        {\n            \"product_group_id\": 2,\n            \"product_group_name\": \"گروه محصولات 8\"\n        },\n        {\n            \"product_group_id\": 3,\n            \"product_group_name\": \"گروه محصولات 5\"\n        },\n        {\n            \"product_group_id\": 4,\n            \"product_group_name\": \"گروه محصولات 1\"\n        },\n        {\n            \"product_group_id\": 5,\n            \"product_group_name\": \"گروه محصولات 9\"\n        },\n        {\n            \"product_group_id\": 6,\n            \"product_group_name\": \"گروه محصولات 7\"\n        },\n        {\n            \"product_group_id\": 7,\n            \"product_group_name\": \"گروه محصولات 1\"\n        },\n        {\n            \"product_group_id\": 8,\n            \"product_group_name\": \"گروه محصولات 7\"\n        },\n        {\n            \"product_group_id\": 9,\n            \"product_group_name\": \"گروه محصولات 6\"\n        },\n        {\n            \"product_group_id\": 10,\n            \"product_group_name\": \"گروه محصولات 10\"\n        }\n    ]\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","webhook","v3","products","groups","pull"],"host":["my","shokolat","app"],"query":[{"key":"token","value":null}],"variable":[]}},"response":[],"_postman_id":"ce8ae376-57be-4ec0-affe-e80512464326"},{"name":"PushProductGroups","id":"c6121f07-14ef-44f4-b722-0a056c41cb2e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"token\" : \"\",\n    \"data\" : [\n        {\n            \"product_group_name\" : \"\"\n        },\n        {\n            \"product_group_name\" : \"\"\n        }\n    ]\n}"},"url":"https://my.shokolat.app/api/webhook/v3/products/groups/push","description":"<h2 id=\"push-product-groups\">Push product groups</h2>\n<p>parameters:</p>\n<p>token:</p>\n<p>data: [ \"product_group_name\" : \" \"]</p>\n<h3 id=\"sample-request\">Sample Request</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"token\" : \"\",\n    \"data\" : [\n        {\n            \"product_group_name\" : \"طلایی\"\n        },\n        {\n            \"product_group_name\" : \"Bronze 123\"\n        }\n    ]\n}\n\n</code></pre>\n<h3 id=\"sample-response\">Sample Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"success\": true,\n    \"result\": [\n        {\n            \"product_group_name\": \"طلایی\",\n            \"product_group_id\": 11\n        },\n        {\n            \"product_group_name\": \"Bronze 123\",\n            \"product_group_id\": 12\n        }\n    ]\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","webhook","v3","products","groups","push"],"host":["my","shokolat","app"],"query":[],"variable":[]}},"response":[],"_postman_id":"c6121f07-14ef-44f4-b722-0a056c41cb2e"},{"name":"PutProductGroup","id":"f04ecae5-c4b1-43c6-9f2c-c6aa0212dc1b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"token\" : \"\",\n    \"data\" : [\n        {\n            \"product_group_id\" : \"\",\n            \"product_group_name\" : \"\"\n        }\n    ]\n}"},"url":"https://my.shokolat.app/api/webhook/v3/products/group/put","description":"<h2 id=\"put-product-group\">Put product group</h2>\n<p>This API will update a product group.</p>\n<p>You can update only the name of product group.</p>\n<p>Parameters:</p>\n<p><code>token</code></p>\n<p><code>data</code>: <code>[product_group_id, product_group_name]</code></p>\n","urlObject":{"protocol":"https","path":["api","webhook","v3","products","group","put"],"host":["my","shokolat","app"],"query":[],"variable":[]}},"response":[],"_postman_id":"f04ecae5-c4b1-43c6-9f2c-c6aa0212dc1b"}],"id":"2eeb501c-68d6-4c0c-b8aa-eded68a1ddf5","_postman_id":"2eeb501c-68d6-4c0c-b8aa-eded68a1ddf5","description":""},{"name":"Products","item":[{"name":"PullProducts","id":"451e9907-5268-4576-9b48-c16b0ba6611f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://my.shokolat.app/api/webhook/v3/products/pull?token","description":"<h2 id=\"pull-products\">Pull products</h2>\n<p>This API return the list of all products in a branch with full details.</p>\n<p>Parameter:</p>\n<p><code>token</code></p>\n<h3 id=\"sample-response\">sample response:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"success\": true,\n    \"result\": [\n        {\n            \"product_id\": 1,\n            \"name\": \"محصول 5\",\n            \"price\": 7580985,\n            \"barcode\": \"1234567890\",\n            \"description\": \",bjgjvh\",\n            \"stock_count\": 10,\n            \"product_groups_id\": [\n                [\n                    1\n                ]\n            ]\n        },\n        {\n            \"product_id\": 4,\n            \"name\": \"محصول 2\",\n            \"price\": 5111581,\n            \"barcode\": \"2319\",\n            \"description\": null,\n            \"stock_count\": -4,\n            \"product_groups_id\": [\n                [\n                    2\n                ]\n            ]\n        },\n        {\n            \"product_id\": 5,\n            \"name\": \"محصول 6\",\n            \"price\": 4287163,\n            \"barcode\": null,\n            \"description\": null,\n            \"stock_count\": 0,\n            \"product_groups_id\": [\n                [\n                    8\n                ]\n            ]\n        },\n        {\n            \"product_id\": 6,\n            \"name\": \"محصول 3\",\n            \"price\": 7747202,\n            \"barcode\": null,\n            \"description\": null,\n            \"stock_count\": -3,\n            \"product_groups_id\": [\n                [\n                    5\n                ],\n                [\n                    7\n                ]\n            ]\n        },\n        {\n            \"product_id\": 7,\n            \"name\": \"محصول 1\",\n            \"price\": 6214046,\n            \"barcode\": null,\n            \"description\": null,\n            \"stock_count\": 0,\n            \"product_groups_id\": [\n                [\n                    2\n                ],\n                [\n                    3\n                ]\n            ]\n        },\n        {\n            \"product_id\": 8,\n            \"name\": \"محصول 6\",\n            \"price\": 5296723,\n            \"barcode\": null,\n            \"description\": null,\n            \"stock_count\": 154,\n            \"product_groups_id\": [\n                [\n                    8\n                ]\n            ]\n        },\n        {\n            \"product_id\": 9,\n            \"name\": \"محصول 7\",\n            \"price\": 5222673,\n            \"barcode\": null,\n            \"description\": null,\n            \"stock_count\": -3,\n            \"product_groups_id\": []\n        },\n        {\n            \"product_id\": 10,\n            \"name\": \"محصول 4\",\n            \"price\": 5484608,\n            \"barcode\": null,\n            \"description\": null,\n            \"stock_count\": -1,\n            \"product_groups_id\": [\n                [\n                    9\n                ]\n            ]\n        }\n    ]\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","webhook","v3","products","pull"],"host":["my","shokolat","app"],"query":[{"description":{"content":"<p>mandatory</p>\n","type":"text/plain"},"key":"token","value":null}],"variable":[]}},"response":[],"_postman_id":"451e9907-5268-4576-9b48-c16b0ba6611f"},{"name":"PushProducts","id":"65d2613f-2a50-427e-9a42-7c384da0f067","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"token\" : \"\",\n    \"data\" : [\n        {\n            \"product_group_id\" : \"\",\n            \"name\" : \"\",\n            \"barcode\" : \"\",\n            \"price\" : \"\",\n            \"description\" : \"\",\n            \"stock_count\" : \"\"\n        }\n    ]\n\n}","options":{"raw":{"language":"json"}}},"url":"https://my.shokolat.app/api/webhook/v3/products/push","description":"<p>Sample request:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"token\" : \"4545fghhf456\",\n    \"data\" : [\n        {\n            \"product_group_id\" : \"1\",\n            \"name\" : \"پاور بانک\",\n            \"barcode\" : \"12365498\",\n            \"price\" : \"15000\",\n            \"description\" : \"پاور بانک با ظرفیت 10000 \",\n            \"stock_count\" : \"15\"\n        },\n        {\n            \"product_group_id\" : \"1\",\n            \"name\" : \"کیف زنانه\",\n            \"barcode\" : \"6666\",\n            \"price\" : \"258000\",\n            \"description\" : \"کیف زنانه مدل چرمی\",\n            \"stock_count\" : \"10\"\n        }\n    ]\n}\n\n</code></pre>\n<p>Sample Response:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"successfully_registered\": [\n        {\n            \"product_id\": 16,\n            \"product_group_id\": 1,\n            \"name\": \"کیف زنانه\",\n            \"barcode\": \"6666\",\n            \"stock_count\": \"10\",\n            \"description\": \"کیف زنانه مدل چرمی\"\n        }\n    ],\n    \"errors\": [\n        {\n            \"success\": false,\n            \"barcode\": \"12365498\",\n            \"message\": \"barcode is registered by another product\"\n        }\n    ]\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","webhook","v3","products","push"],"host":["my","shokolat","app"],"query":[],"variable":[]}},"response":[],"_postman_id":"65d2613f-2a50-427e-9a42-7c384da0f067"},{"name":"PutProducts","id":"e1e64572-30cf-4331-8fd7-e5d3372e5ed1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"token\" : \"\",\n    \"data\" : [\n        {\n            \"product_id\" : \"\",\n            \"name\" : \"\",\n            \"group_id\" : \"\",\n            \"price\" : \"\",\n            \"barcode\" : \"\",\n            \"status\" : \"\",\n            \"stock_count\" : \"\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"https://my.shokolat.app/api/webhook/v3/products/put","urlObject":{"protocol":"https","path":["api","webhook","v3","products","put"],"host":["my","shokolat","app"],"query":[],"variable":[]}},"response":[],"_postman_id":"e1e64572-30cf-4331-8fd7-e5d3372e5ed1"}],"id":"5a347e7e-a816-464b-9d53-7f7e21d8285b","_postman_id":"5a347e7e-a816-464b-9d53-7f7e21d8285b","description":""}],"id":"3633b2a3-3482-4db4-9c8c-337bdc2ced96","_postman_id":"3633b2a3-3482-4db4-9c8c-337bdc2ced96","description":""},{"name":"Invoices","item":[{"name":"ProcessInvoiceQuick","id":"6c8bc19a-5768-458f-8fd8-3d9dfc561314","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"token\": \"\",\n    \"data\": {\n        \"customerId\": \"\",\n        \"mobile\": \"09122566137\",\n        \"invoiceDate\": \"1403/04/14 20:10\",\n        \"amount\": \"1000\",\n        \"payByCreditAmount\": \"200\",\n        \"cardNumber\": \"123456\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"my.shokolat.app/api/webhook/v3/invoices/process/quick","description":"<p>By this API you can get the amount of discount and etc before save the invoice.</p>\n<p>For Example, you need to know that the customer how much discount will give for entire invoice before saving the invoice.</p>\n<p>Parameters:</p>\n<ul>\n<li><p><code>token</code></p>\n</li>\n<li><p><code>customerId</code> -&gt; if mobile is null , this parametes is mandatory</p>\n</li>\n<li><p><code>mobile</code> -&gt; if customerId is null , this parameter is mandatory</p>\n</li>\n<li><p><code>invoiceDate</code> -&gt; optional (if be null , current date-time will be apply)</p>\n</li>\n<li><p><code>amount</code> -&gt; mandatory</p>\n</li>\n<li><p><code>payByCreditAmount</code> -&gt; Optional (If you know how much the customer want to pay by credit, you cand set this parameters for advanced Loyalty plan proceess.)</p>\n</li>\n<li><p><code>cardNumber</code> -&gt; Optional. You can use <code>cardNumber</code> instead of <code>customerId</code> or <code>mobile</code>. if this parameter was set, you don't need to set <code>cardNumber</code> or <code>customerId</code></p>\n</li>\n</ul>\n<p>Response:</p>\n<ul>\n<li><p><code>discount</code> -&gt; amount of discount for this invoice</p>\n</li>\n<li><p><code>creditCanUse</code> -&gt; amount of customer's credits that can use to pay this invoice</p>\n</li>\n<li><p><code>cashBack</code> -&gt; amount of gift credit that add to customer's wallet for this invoice</p>\n</li>\n<li><p><code>earnPoints</code> -&gt; amount of points that customer can earn for this invoice</p>\n</li>\n<li><p><code>payableAmount</code> -&gt; Final amount to pay.</p>\n</li>\n<li><p><code>acceptedCreditToPayThisBuy</code> -&gt; If you set the payByCreditAmount, we process all conditions for paying by credit and return you accepted credit to pay as this parameter.</p>\n</li>\n</ul>\n<p>sample of response:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": true,\n    \"result\": {\n        \"discount\": 100,\n        \"creditCanUse\": 890000,\n        \"cashBack\": 90,\n        \"earnPoints\": 10,\n        \"payableAmount\": 700,\n        \"acceptedCreditToPayThisBuy\": 200\n    }\n}\n\n</code></pre>\n","urlObject":{"path":["api","webhook","v3","invoices","process","quick"],"host":["my","shokolat","app"],"query":[],"variable":[]}},"response":[{"id":"52f0284c-f17c-4a38-bcca-6d0a04c83a87","name":"ProcessInvoiceQuick","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"token\": \"\",\n    \"data\": {\n        \"customerId\": \"\",\n        \"mobile\": \"09122566137\",\n        \"invoiceDate\": \"1402/05/10 12:10\",\n        \"amount\": \"2000\"\n    }\n}"},"url":"https://my.shokolat.app/api/webhook/v3/invoices/process/quick"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 30 Jul 2023 17:59:59 GMT"},{"key":"Server","value":"Apache"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-RateLimit-Limit","value":"500"},{"key":"X-RateLimit-Remaining","value":"498"},{"key":"Content-Encoding","value":"gzip"},{"key":"Vary","value":"Accept-Encoding"},{"key":"Keep-Alive","value":"timeout=1000, max=1000"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true,\n    \"result\": {\n        \"discount\": 200,\n        \"creditCanUse\": 9424148,\n        \"cashBack\": 100,\n        \"earnPoints\": 0\n    }\n}"}],"_postman_id":"6c8bc19a-5768-458f-8fd8-3d9dfc561314"},{"name":"pushInvoiceQuick","id":"1eb63f82-2516-4d26-84dd-0e385a21120d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"token\": \"\",\n    \"data\": {\n        \"customerId\": \"\",\n        \"mobile\": \"\",\n        \"invoiceDate\": \"\",\n        \"sum\": \"\",\n        \"payByCreditAmount\": \"\",\n        \"description\": \"\",\n        \"cardNumber\": \"\",\n        \"cardPin\": \"\",\n        \"invoiceNumber\": \"\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"my.shokolat.app/api/webhook/v3/invoices/push/quick","description":"<p>By this API you can send quick invoice to the shokolat and shokolat will process the invoice and give points,gift credit and discount.</p>\n<p>Quick invoice have not any productId and only work with the <code>sum</code> .</p>\n<p>Afrer calling the api , discount will calculate by system and and save in the invoice.</p>\n<p>We highly recommend you to use <code>ProcessInvoiceQuick</code> and get all of discount and credits of customer for the invoice befor using this API.</p>\n<p><strong>Parameters</strong>:</p>\n<ul>\n<li><p><code>customerId</code> : one of customerId or mobile is mandatory</p>\n</li>\n<li><p><code>mobile</code> : one of customerId ,mobile or cardNumber is mandatory</p>\n</li>\n<li><p><code>invoiceDate</code> : Optional .format: <code>1402/05/15 12:13</code> . If this parameter be null , the curent date time will be apply.</p>\n</li>\n<li><p><code>sum</code> : mandatory . It's the sum of invoice before discount and pay by credit.</p>\n</li>\n<li><p><code>payByCreditAmount</code> : must be 0 or amount of credit to pay invoice.</p>\n</li>\n<li><p><code>description</code> : Optional.</p>\n</li>\n<li><p><code>cardNumber</code> : Optional</p>\n</li>\n<li><p><code>cardPin</code> : Optional (If you use cardNumber and payByCreditAmount is &gt; 0 , you must set the card pin for credit withdraw transaction)</p>\n</li>\n<li><p><code>invoiceNumber</code> : Optional. You can set your local invoice/order number</p>\n</li>\n</ul>\n<p><strong>sample of response:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"success\": true,\n    \"result\": {\n        \"invoiceId\": 21,\n        \"discount\": 1000,\n        \"payedByCredit\": 500,\n        \"payableAmount\": 2000,\n        \"giftCreditAmount\": 0,\n        \"giftCreditExpireDate\": null,\n        \"points\": 0\n    }\n}\n\n</code></pre>\n<p><strong>Response fields:</strong></p>\n<ul>\n<li><p><code>discount</code> : Amount of discount for invoice</p>\n</li>\n<li><p><code>payedByCredit</code> : amount of credit that used for paying the invoice</p>\n</li>\n<li><p><code>payableAmount</code> : amount of invoice that custopmer must pay.</p>\n</li>\n<li><p><code>giftCreditAmount</code>: Gift credit for use on next buy.</p>\n</li>\n<li><p><code>giftCreditExpireDate</code> : The expire date of gift credit.</p>\n</li>\n<li><p><code>points</code> : the amount of points that customer gived for this invoice.</p>\n</li>\n</ul>\n","urlObject":{"path":["api","webhook","v3","invoices","push","quick"],"host":["my","shokolat","app"],"query":[],"variable":[]}},"response":[],"_postman_id":"1eb63f82-2516-4d26-84dd-0e385a21120d"}],"id":"946bedec-46cc-447f-8e67-2a61a5520be2","_postman_id":"946bedec-46cc-447f-8e67-2a61a5520be2","description":""},{"name":"Credit","item":[{"name":"pullCustomerCreditDetails","id":"140666da-ae5a-4687-8708-d46faf5835c7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://my.shokolat.app/api/webhook/v3/customer/credit/details?token&customerId","description":"<p>This api return all customer's credits in store with full details such as: <code>creditExpireDate</code> and <code>branchCanUse</code></p>\n<p>Request Parameters:</p>\n<p><code>token</code></p>\n<p><code>customerId</code></p>\n<p><code>customerMobile</code></p>\n<p><code>customerCard</code></p>\n<p><strong>Note</strong>: You can request by one of customer parametrs.For example if you set <code>customerMobile</code> , no need to set other parametrs except token.</p>\n<p>token is mandatory</p>\n<p>Sample response:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"success\": true,\n    \"result\": {\n        \"totalCreditInStore\": \"36,624,000\",\n        \"creditDetails\": [\n            {\n                \"creditAmount\": 36590000,\n                \"creditExpireDate\": \"2023-10-25 23:59:59\",\n                \"branchIdCanUse\": [\n                    \"شعبه مرکزی\",\n                    \"شعبه تهران\"\n                ],\n                \"description\": \"افزایش اعتبار دستی در فروشگاه بیدینگ شعبه ی شعبه مرکزی\"\n            },\n            {\n                \"creditAmount\": 34000,\n                \"creditExpireDate\": \"2023-10-21 23:59:59\",\n                \"branchIdCanUse\": [\n                    \"شعبه مرکزی\"\n                ],\n                \"description\": \"اعتبار هدیه بابت خرید\"\n            }\n        ]\n    }\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","webhook","v3","customer","credit","details"],"host":["my","shokolat","app"],"query":[{"description":{"content":"<p>Shokolat token</p>\n","type":"text/plain"},"key":"token","value":null},{"description":{"content":"<p>optional</p>\n","type":"text/plain"},"key":"customerId","value":null},{"disabled":true,"description":{"content":"<p>optional</p>\n","type":"text/plain"},"key":"customerMobile","value":null},{"disabled":true,"description":{"content":"<p>optional</p>\n","type":"text/plain"},"key":"customerCard","value":null}],"variable":[]}},"response":[],"_postman_id":"140666da-ae5a-4687-8708-d46faf5835c7"},{"name":"PullCustomerCreditTransactions","id":"13d66b73-8cec-4fa5-a132-4f8a41be6476","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://my.shokolat.app/api/webhook/v3/transactions/pull/?token=&customerId=&customerMobile=","description":"<p>Pull credit transactions for a customer.</p>\n<p><strong>Parameters</strong>:</p>\n<p><code>token</code> : shokolat token</p>\n<p><code>customerId</code> : customer id in shokolat</p>\n<p><code>customerMobile</code>: customer's mobile. sample: 09122566137</p>\n<p><strong>Note</strong>: you can use one of <code>customerId</code> or <code>customerMobile</code></p>\n<p>Response:</p>\n<p><code>increase</code> : 0 or 1 (0 for decreament and 1 for increment)</p>\n<p><code>credit</code> : amount of credit</p>\n<p><code>branch_name</code>: In which branch was credit increased or decreased?</p>\n<p><strong>sample result:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"success\": true,\n    \"result\": [\n        {\n            \"increase\": 0,\n            \"credit\": 2000,\n            \"branch_name\": \"شعبه مرکزی\",\n            \"description\": \"کاهش اعتبار بابت فاکتور شماره 15\",\n            \"dateTime\": 1402-05-16 01:05\n        },\n        {\n            \"increase\": 1,\n            \"credit\": 1200000,\n            \"branch_name\": \"شعبه مرکزی\",\n            \"description\": \"افزایش اعتبار بابت هدیه خرید\",\n            \"dateTime\": 1402-05-10 01:10\n        }\n    ]\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","webhook","v3","transactions","pull",""],"host":["my","shokolat","app"],"query":[{"key":"token","value":""},{"key":"customerId","value":""},{"key":"customerMobile","value":""}],"variable":[]}},"response":[],"_postman_id":"13d66b73-8cec-4fa5-a132-4f8a41be6476"},{"name":"creditDeposit","id":"d312cc91-75f0-4453-9652-a8fa8d37fe57","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"token\": \"\",\n    \"data\": {\n        \"customerId\": \"\",\n        \"mobile\": \"09122566137\",\n        \"creditAmount\": \"3000\",\n        \"expireDate\": \"1402-12-20\",\n        \"branchCanUse\": [\n            1,\n            2\n        ],\n        \"description\": \"افزایش اعتبار بابت جشنواره زمستان\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://my.shokolat.app/api/webhook/v3/customer/credit/deposit","description":"<p>Credit deposit for customer</p>\n<p>parameters:</p>\n<p><code>token</code>: shokolat token</p>\n<p><code>data</code> array: you must provide parameters in data array</p>\n<p><code>customerId</code>: customer id</p>\n<p><code>mobile</code>: customer mobile</p>\n<p><strong>Note</strong>: Only one of the customerId or mobile should be set.</p>\n<p><code>creditAmount</code>: the amount of credit that you want to deposit for customer</p>\n<p><code>expireDate</code>: the expire date of the credit. The date must be in shamsi and this format: YYYY-mm_dd</p>\n<p><code>branchCanUse</code>: ID of the branches where credit can be used. You can get the list of you store's branches by <code>pullBranchList</code> api. sample:<code>\"branchCanUse\": [1,2]</code></p>\n<p><code>description</code>: Optional description.</p>\n","urlObject":{"protocol":"https","path":["api","webhook","v3","customer","credit","deposit"],"host":["my","shokolat","app"],"query":[],"variable":[]}},"response":[],"_postman_id":"d312cc91-75f0-4453-9652-a8fa8d37fe57"}],"id":"06eaf9b5-cd2a-44a6-9164-a564f3e05844","_postman_id":"06eaf9b5-cd2a-44a6-9164-a564f3e05844","description":""},{"name":"Store","item":[{"name":"pullBranchList","id":"bb44ff2e-10e8-46de-ac8f-553d7ea29613","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://my.shokolat.app/api/webhook/v3/store/branch/pull?token=","description":"<p>Branch list</p>\n<p>This Api return the list of store's branches id and name.</p>\n<p>sample response:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"success\": true,\n    \"result\": [\n        {\n            \"branchId\": 1,\n            \"branchName\": \"شعبه مرکزی\"\n        },\n        {\n            \"branchId\": 2,\n            \"branchName\": \"شعبه تهران\"\n        }\n    ]\n}\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","webhook","v3","store","branch","pull"],"host":["my","shokolat","app"],"query":[{"key":"token","value":""}],"variable":[]}},"response":[],"_postman_id":"bb44ff2e-10e8-46de-ac8f-553d7ea29613"}],"id":"bf461703-b35f-407b-a3dd-31121eaddd15","_postman_id":"bf461703-b35f-407b-a3dd-31121eaddd15","description":""}]}