{"info":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"9107702","collectionId":"5ea60f44-0233-47d3-a951-6933553972b4","publishedId":"2sBXiokpgB","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-04-02T08:43:08.000Z"},"item":[{"name":"api","item":[{"name":"v1","item":[{"name":"orders.php","item":[{"name":"Create Order","id":"aca09027-9020-4fe9-8ec3-cbd0d408e7fb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n  \"customer_id\": 1,\r\n  \"name\": \"Nik\", //Optional with customer_id\r\n  \"phone\": \"0193913193\", //Optional with customer_id\r\n  \"address\": \"No 1, Jalan 2\", //Optional\r\n  \"postcode\": \"47810\", //Optional\r\n  \"acc\": \"Sales\",\r\n  \"date\": \"2026-04-01\", //Optional\r\n  \"type\": \"S.O.\", //Optional\r\n  \"isdo\": false, //Optional\r\n  \"delivery\": \"No\", //Yes or No\r\n  \"reference\": \"\",\r\n  \"comments\": \"\",\r\n  \"tags\": \"tag1, tag2, tag3\",\r\n  \"promocode\": \"\",\r\n  \"apply_rounding\": true,\r\n  \"discper\": 0,\r\n  \"items\": [\r\n    {\r\n      \"qty\": 1,\r\n      \"priceid\": 60,\r\n      \"type\": \"Baju Melayu 2 pcs\", //Optional with priceid\r\n      \"category\": \"Dry Clean\", //Optional with priceid\r\n      \"price\": 20, //Total per item line, not unit price. Optional with priceid, or to overwrite default\r\n      \"taxpercent\": 0,\r\n      \"note\": \"Biru\"\r\n    },\r\n    {\r\n      \"qty\": 2,\r\n      \"priceid\": 63,\r\n      \"type\": \"Baju Kurung 2 pcs\", //Optional with priceid\r\n      \"category\": \"Dry Clean\", //Optional with priceid\r\n      \"price\": 40, //Total per item line, not unit price. Optional with priceid, or to overwrite default\r\n      \"taxpercent\": 0,\r\n      \"note\": \"Hitam\"\r\n    }\r\n  ]\r\n}","options":{"raw":{"language":"json"}}},"url":"/api/v1/orders.php","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}},"urlObject":{"path":["api","v1","orders.php"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"9900668f-78bf-43e5-86c9-fa67f4e2f873","name":"Create Order Using Price Ids","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"X-API-Key","value":"<API Key>","description":"Added as a part of security scheme: apikey"}],"body":{"mode":"raw","raw":"{\n  \"customer_id\": 0,\n  \"name\": \"Nik\",\n  \"phone\": \"0193913193\",\n  \"address\": \"No 1, Jalan 2\",\n  \"postcode\": \"47810\",\n  \"acc\": \"Sales\",\n  \"type\": \"S.O.\",\n  \"isdo\": false,\n  \"delivery\": \"No\",\n  \"reference\": \"\",\n  \"comments\": \"\",\n  \"tags\": \"tag1, tag2, tag3\",\n  \"promocode\": \"\",\n  \"apply_rounding\": true,\n  \"discper\": 0,\n  \"items\": [\n    {\n      \"qty\": 1,\n      \"priceid\": 60,\n      \"taxpercent\": 0,\n      \"note\": \"Biru\"\n    },\n    {\n      \"qty\": 5,\n      \"priceid\": 63,\n      \"price\": 20,\n      \"taxpercent\": 0,\n      \"note\": \"Hitam\"\n    }\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"/api/v1/orders.php"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx"},{"key":"Date","value":"Fri, 03 Apr 2026 07:53:04 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"PHP/8.2.30"},{"key":"X-Powered-By","value":"PleskLin"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"Referrer-Policy","value":"strict-origin-when-cross-origin"},{"key":"Permissions-Policy","value":"geolocation=(self), microphone=(self), camera=(self)"},{"key":"Cache-Control","value":"max-age=2592000"},{"key":"Expires","value":"Sun, 03 May 2026 07:53:04 GMT"},{"key":"Content-Encoding","value":"br"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"id\": 1421,\n    \"bilid\": \"6FAA110EC1E7\",\n    \"sumprice\": 36,\n    \"tax\": 0,\n    \"rounding\": 0,\n    \"items\": [\n        {\n            \"id\": \"3696\",\n            \"type\": \"2 Piece Baju Melayu\",\n            \"category\": \"Dry Clean\",\n            \"qty\": 1,\n            \"price\": 16\n        },\n        {\n            \"id\": \"3697\",\n            \"type\": \"2 Piece Baju Kurung\",\n            \"category\": \"Dry Clean\",\n            \"qty\": 5,\n            \"price\": 20\n        }\n    ]\n}"},{"id":"c3862954-d1b6-4437-8de7-312124f9b9c9","name":"Create Order","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n  \"customer_id\": 1,\r\n  \"name\": \"Nik\", //Optional with customer_id\r\n  \"phone\": \"0193913193\", //Optional with customer_id\r\n  \"address\": \"No 1, Jalan 2\", //Optional\r\n  \"postcode\": \"47810\", //Optional\r\n  \"acc\": \"Sales\",\r\n  \"date\": \"2026-04-01\", //Optional\r\n  \"type\": \"S.O.\", //Optional\r\n  \"isdo\": false, //Optional\r\n  \"delivery\": \"No\", //Yes or No\r\n  \"reference\": \"\",\r\n  \"comments\": \"\",\r\n  \"tags\": \"tag1, tag2, tag3\",\r\n  \"promocode\": \"\",\r\n  \"apply_rounding\": true,\r\n  \"discper\": 0,\r\n  \"items\": [\r\n    {\r\n      \"qty\": 1,\r\n      \"priceid\": 60,\r\n      \"type\": \"Baju Melayu 2 pcs\", //Optional with priceid\r\n      \"category\": \"Dry Clean\", //Optional with priceid\r\n      \"price\": 20, //Total per item line, not unit price. Optional with priceid, or to overwrite default\r\n      \"taxpercent\": 0,\r\n      \"note\": \"Biru\"\r\n    },\r\n    {\r\n      \"qty\": 2,\r\n      \"priceid\": 63,\r\n      \"type\": \"Baju Kurung 2 pcs\", //Optional with priceid\r\n      \"category\": \"Dry Clean\", //Optional with priceid\r\n      \"price\": 40, //Total per item line, not unit price. Optional with priceid, or to overwrite default\r\n      \"taxpercent\": 0,\r\n      \"note\": \"Hitam\"\r\n    }\r\n  ]\r\n}","options":{"raw":{"language":"json"}}},"url":"/api/v1/orders.php"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Server","value":"nginx"},{"key":"Date","value":"Fri, 03 Apr 2026 07:00:21 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"PHP/8.2.30"},{"key":"X-Powered-By","value":"PleskLin"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"Referrer-Policy","value":"strict-origin-when-cross-origin"},{"key":"Permissions-Policy","value":"geolocation=(self), microphone=(self), camera=(self)"},{"key":"Cache-Control","value":"max-age=2592000"},{"key":"Expires","value":"Sun, 03 May 2026 07:00:20 GMT"},{"key":"Content-Encoding","value":"br"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"id\": 1418,\n    \"bilid\": \"7F916D68940C\",\n    \"sumprice\": 60,\n    \"tax\": 0,\n    \"rounding\": 0,\n    \"items\": [\n        {\n            \"id\": \"3690\",\n            \"type\": \"Baju Melayu 2 pcs\",\n            \"category\": \"Dry Clean\",\n            \"qty\": 1,\n            \"price\": 20\n        },\n        {\n            \"id\": \"3691\",\n            \"type\": \"Baju Kurung 2 pcs\",\n            \"category\": \"Dry Clean\",\n            \"qty\": 2,\n            \"price\": 40\n        }\n    ]\n}"}],"_postman_id":"aca09027-9020-4fe9-8ec3-cbd0d408e7fb"},{"name":"Update Order","id":"b4eef75b-278e-4025-9122-162d5a592867","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n  \"bilid\": \"M679FUY\", //Mandatory\r\n  \"status\": \"Done\", //Either: Received, Done, Delivered or Pending\r\n  \"date\": \"2026-04-03\", \r\n  \"name\": \"Nik Shafie\",\r\n  \"phone\": \"01234567890\",\r\n  \"address\": \"No 1, Street 2, \",\r\n  \"postcode\": \"12345\",\r\n  \"customer_id\": 3,\r\n  \"accept\": \"John\", //the staff (username) attending the order\r\n  \"promoter\": \"Ahmad\",  //the staff (username) promoting the order\r\n  \"comments\": \"No comments\" //any note\r\n}\r\n//All fields are optional, except for the bilid","options":{"raw":{"language":"json"}}},"url":"/api/v1/orders.php","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}},"urlObject":{"path":["api","v1","orders.php"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"d2501691-36fc-40e7-ba08-f4053ef78cf5","name":"Update Order Status","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"},{"key":"X-API-Key","value":"<API Key>","description":"Added as a part of security scheme: apikey"}],"body":{"mode":"raw","raw":"{\n  \"bilid\": \"7F916D68940C\",\n  \"status\": \"Done\"\n}","options":{"raw":{"language":"json"}}},"url":"/api/v1/orders.php"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx"},{"key":"Date","value":"Fri, 03 Apr 2026 07:54:17 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"PHP/8.2.30"},{"key":"X-Powered-By","value":"PleskLin"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"Referrer-Policy","value":"strict-origin-when-cross-origin"},{"key":"Permissions-Policy","value":"geolocation=(self), microphone=(self), camera=(self)"},{"key":"Cache-Control","value":"max-age=2592000"},{"key":"Expires","value":"Sun, 03 May 2026 07:54:17 GMT"},{"key":"Content-Encoding","value":"br"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"bilid\": \"7F916D68940C\",\n    \"status\": \"Done\"\n}"}],"_postman_id":"b4eef75b-278e-4025-9122-162d5a592867"},{"name":"Void Order","id":"03b883f0-8ef8-47f4-bb2c-a0391b9b1c5f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n  \"bilid\": \"M679FUY\"\r\n}","options":{"raw":{"language":"json"}}},"url":"/api/v1/orders.php?bilid=string","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}},"urlObject":{"path":["api","v1","orders.php"],"host":[""],"query":[{"key":"bilid","value":"string"}],"variable":[]}},"response":[{"id":"6d549bb1-b7d5-4dc2-8aad-9637a66424ef","name":"Void An Order","originalRequest":{"method":"DELETE","header":[{"key":"Content-Type","value":"application/json"},{"key":"X-API-Key","value":"<API Key>","description":"Added as a part of security scheme: apikey"}],"body":{"mode":"raw","raw":"{\n  \"bilid\": \"76B8962ADFD5\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"/api/v1/orders.php?bilid=76B8962ADFD5","host":[""],"path":["api","v1","orders.php"],"query":[{"key":"bilid","value":"76B8962ADFD5"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx"},{"key":"Date","value":"Fri, 03 Apr 2026 07:13:37 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"PHP/8.2.30"},{"key":"X-Powered-By","value":"PleskLin"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"Referrer-Policy","value":"strict-origin-when-cross-origin"},{"key":"Permissions-Policy","value":"geolocation=(self), microphone=(self), camera=(self)"},{"key":"Cache-Control","value":"max-age=2592000"},{"key":"Expires","value":"Sun, 03 May 2026 07:13:37 GMT"},{"key":"Content-Encoding","value":"br"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"bilid\": \"76B8962ADFD5\",\n    \"status\": \"Void\"\n}"}],"_postman_id":"03b883f0-8ef8-47f4-bb2c-a0391b9b1c5f"},{"name":"Retrieve Single Order","id":"72b278bc-0c7b-4ac3-973e-33e4b99b9858","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/api/v1/orders.php?bilid=","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}},"urlObject":{"path":["api","v1","orders.php"],"host":[""],"query":[{"description":{"content":"<p>Unique Identifier of an Order</p>\n","type":"text/plain"},"key":"bilid","value":""}],"variable":[]}},"response":[{"id":"ff63c606-6d03-4022-9888-ba4a00b4ddca","name":"Retrieve Single Order","originalRequest":{"method":"GET","header":[],"url":{"raw":"/api/v1/orders.php?bilid=0C0B18019DC7","host":[""],"path":["api","v1","orders.php"],"query":[{"key":"bilid","value":"0C0B18019DC7","description":"Unique Identifier of an Order"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx"},{"key":"Date","value":"Fri, 03 Apr 2026 07:14:56 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"PHP/8.2.30"},{"key":"X-Powered-By","value":"PleskLin"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"Referrer-Policy","value":"strict-origin-when-cross-origin"},{"key":"Permissions-Policy","value":"geolocation=(self), microphone=(self), camera=(self)"},{"key":"Cache-Control","value":"max-age=2592000"},{"key":"Expires","value":"Sun, 03 May 2026 07:14:56 GMT"},{"key":"Content-Encoding","value":"br"}],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\n    \"bilid\": \"0C0B18019DC7\",\n    \"id\": 1420,\n    \"name\": \"Nik\",\n    \"phone\": \"0193913193\",\n    \"date\": \"2026-04-03 15:05:20\",\n    \"status\": \"Done\",\n    \"sumprice\": \"36.0000\",\n    \"tax\": \"0.0000\",\n    \"rounding\": \"0\",\n    \"branch\": \"2\",\n    \"profileid\": \"0\",\n    \"accept\": \"Test POSTMAN\",\n    \"staff\": \"\",\n    \"runner\": \"\",\n    \"discper\": \"0\",\n    \"discnum\": \"\",\n    \"reference\": \"\",\n    \"delivery\": \"No\",\n    \"deliveryaddress\": \"No 1, Jalan 2\",\n    \"deliverypostcode\": \"47810\",\n    \"deliverydate\": \"2026-04-05\",\n    \"deliverytime\": \"15:02:43\",\n    \"type\": \"\",\n    \"account\": null,\n    \"comments\": \"\",\n    \"tags\": \"tag1, tag2, tag3\",\n    \"promocode\": \"\",\n    \"pickupdate\": \"2026-04-03\",\n    \"pickuptime\": \"15:02:43\",\n    \"invoiceid\": \"\",\n    \"due\": \"36.0000\",\n    \"charge\": \"36.0000\",\n    \"items\": [\n        {\n            \"id\": 3694,\n            \"category\": \"Dry Clean\",\n            \"type\": \"2 Piece Baju Melayu\",\n            \"size\": \"1.000\",\n            \"price\": \"16.0000\",\n            \"note\": \"Biru\",\n            \"comments\": \"\",\n            \"staff\": \"\",\n            \"datesend\": \"2026-04-05 15:02:43\",\n            \"subitem\": \"\",\n            \"shelf\": \"\",\n            \"subitemchangeable\": \"\",\n            \"subitembaseuprice\": \"\",\n            \"image\": null,\n            \"tags\": null,\n            \"date\": \"2026-04-03 15:02:43\",\n            \"taxpercent\": 0,\n            \"billorder\": 3694,\n            \"subitems\": []\n        },\n        {\n            \"id\": 3695,\n            \"category\": \"Dry Clean\",\n            \"type\": \"2 Piece Baju Kurung\",\n            \"size\": \"5.000\",\n            \"price\": \"20.0000\",\n            \"note\": \"Hitam\",\n            \"comments\": \"\",\n            \"staff\": \"\",\n            \"datesend\": \"2026-04-05 15:02:43\",\n            \"subitem\": \"\",\n            \"shelf\": \"\",\n            \"subitemchangeable\": \"\",\n            \"subitembaseuprice\": \"\",\n            \"image\": null,\n            \"tags\": null,\n            \"date\": \"2026-04-03 15:02:43\",\n            \"taxpercent\": 0,\n            \"billorder\": 3695,\n            \"subitems\": []\n        }\n    ],\n    \"jobsdone\": [],\n    \"subscriptions\": []\n}"}],"_postman_id":"72b278bc-0c7b-4ac3-973e-33e4b99b9858"},{"name":"Retrieve Orders","id":"9eb7fad8-1305-4ed8-99a6-41bea5304572","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/api/v1/orders.php?status&unpaid&type&profileid&page&limit&date_from&date_to","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}},"urlObject":{"path":["api","v1","orders.php"],"host":[""],"query":[{"description":{"content":"<p>Optional. Either: 'received', 'done', 'delivered', 'pending', 'voided', 'undelivered', 'unvoided', 'done or delivered', 'all'</p>\n","type":"text/plain"},"key":"status","value":null},{"description":{"content":"<p>Optional</p>\n","type":"text/plain"},"key":"unpaid","value":null},{"description":{"content":"<p>Optional</p>\n","type":"text/plain"},"key":"type","value":null},{"description":{"content":"<p>Optional</p>\n","type":"text/plain"},"key":"profileid","value":null},{"description":{"content":"<p>Default to 1</p>\n","type":"text/plain"},"key":"page","value":null},{"description":{"content":"<p>Page size</p>\n","type":"text/plain"},"key":"limit","value":null},{"description":{"content":"<p>Optional. Format: YYYY-MM-DD</p>\n","type":"text/plain"},"key":"date_from","value":null},{"description":{"content":"<p>Optional. Format: YYYY-MM-DD</p>\n","type":"text/plain"},"key":"date_to","value":null}],"variable":[]}},"response":[{"id":"8bd604cf-1a63-4ebc-8923-34f2c2c43149","name":"Retrieve Orders","originalRequest":{"method":"GET","header":[],"url":{"raw":"/api/v1/orders.php?status=all&date_from=2026-01-01","host":[""],"path":["api","v1","orders.php"],"query":[{"key":"status","value":"all","description":"Optional. Either: 'received', 'done', 'delivered', 'pending', 'voided', 'undelivered', 'unvoided', 'done or delivered', 'all'"},{"key":"unpaid","value":null,"description":"Optional","disabled":true},{"key":"type","value":null,"description":"Optional","disabled":true},{"key":"profileid","value":null,"description":"Optional","disabled":true},{"key":"page","value":null,"description":"Default to 1","disabled":true},{"key":"limit","value":null,"description":"Page size","disabled":true},{"key":"date_from","value":"2026-01-01","description":"Optional. Format: YYYY-MM-DD"},{"key":"date_to","value":null,"description":"Optional. Format: YYYY-MM-DD","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx"},{"key":"Date","value":"Fri, 03 Apr 2026 07:15:35 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"PHP/8.2.30"},{"key":"X-Powered-By","value":"PleskLin"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"Referrer-Policy","value":"strict-origin-when-cross-origin"},{"key":"Permissions-Policy","value":"geolocation=(self), microphone=(self), camera=(self)"},{"key":"Cache-Control","value":"max-age=2592000"},{"key":"Expires","value":"Sun, 03 May 2026 07:15:35 GMT"},{"key":"Content-Encoding","value":"br"}],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\n    \"data\": [\n        {\n            \"id\": 1420,\n            \"bilid\": \"0C0B18019DC7\",\n            \"name\": \"Nik\",\n            \"phone\": \"0193913193\",\n            \"date\": \"2026-04-03 15:05:20\",\n            \"status\": \"Done\",\n            \"due\": \"36.0000\",\n            \"charge\": \"36.0000\",\n            \"delivery\": \"No\",\n            \"deliveryaddress\": \"No 1, Jalan 2\",\n            \"deliverypostcode\": \"47810\",\n            \"deliverydate\": \"2026-04-05\",\n            \"deliverytime\": \"15:02:43\",\n            \"profileid\": \"0\",\n            \"reference\": \"\",\n            \"discper\": \"0\",\n            \"type\": \"\",\n            \"accept\": \"Test POSTMAN\",\n            \"staff\": \"\",\n            \"promocode\": \"\",\n            \"account\": null,\n            \"tags\": \"tag1, tag2, tag3\",\n            \"pickupdate\": \"2026-04-03\",\n            \"branch\": \"2\",\n            \"branchinitial\": \"\",\n            \"business\": null\n        },\n        {\n            \"id\": 1419,\n            \"bilid\": \"76B8962ADFD5\",\n            \"name\": \"Nik\",\n            \"phone\": \"0193913193\",\n            \"date\": \"2026-04-03 15:02:19\",\n            \"status\": \"Void\",\n            \"due\": \"0.0000\",\n            \"charge\": \"0.0000\",\n            \"delivery\": \"No\",\n            \"deliveryaddress\": \"No 1, Jalan 2\",\n            \"deliverypostcode\": \"47810\",\n            \"deliverydate\": \"2026-04-05\",\n            \"deliverytime\": \"15:02:19\",\n            \"profileid\": \"0\",\n            \"reference\": \"\",\n            \"discper\": \"0\",\n            \"type\": \"S.O.\",\n            \"accept\": \"Test POSTMAN\",\n            \"staff\": \"\",\n            \"promocode\": \"\",\n            \"account\": null,\n            \"tags\": \"tag1, tag2, tag3\",\n            \"pickupdate\": null,\n            \"branch\": \"2\",\n            \"branchinitial\": \"\",\n            \"business\": null\n        },\n        {\n            \"id\": 1418,\n            \"bilid\": \"7F916D68940C\",\n            \"name\": \"Nik\",\n            \"phone\": \"0193913193\",\n            \"date\": \"2026-04-01\",\n            \"status\": \"Received\",\n            \"due\": \"60.0000\",\n            \"charge\": \"60.0000\",\n            \"delivery\": \"No\",\n            \"deliveryaddress\": \"No 1, Jalan 2\",\n            \"deliverypostcode\": \"47810\",\n            \"deliverydate\": \"2026-04-05\",\n            \"deliverytime\": \"15:00:21\",\n            \"profileid\": \"1\",\n            \"reference\": \"\",\n            \"discper\": \"0\",\n            \"type\": \"S.O.\",\n            \"accept\": \"Test POSTMAN\",\n            \"staff\": \"\",\n            \"promocode\": \"\",\n            \"account\": null,\n            \"tags\": \"tag1, tag2, tag3\",\n            \"pickupdate\": null,\n            \"branch\": \"2\",\n            \"branchinitial\": \"\",\n            \"business\": \"Mac 25 Enterprise 12\"\n        }\n    ],\n    \"total\": 3,\n    \"page\": 1,\n    \"limit\": 50,\n    \"pages\": 1\n}"}],"_postman_id":"9eb7fad8-1305-4ed8-99a6-41bea5304572"}],"id":"823c3521-9a10-4849-a4b5-75312f4cdb65","_postman_id":"823c3521-9a10-4849-a4b5-75312f4cdb65","description":"","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}}},{"name":"payments.php","item":[{"name":"Record Payment","id":"0c1e449f-aed3-4f43-8c38-1c3c225610e1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n  \"bilid\": \"M679FUY\", //Mandatory\r\n  \"amount\": 204, //Mandatory. Extras will be saved as credit to the profile, if the profile has an id\r\n  \"method\": \"Cash\"\r\n}","options":{"raw":{"language":"json"}}},"url":"/api/v1/payments.php","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}},"urlObject":{"path":["api","v1","payments.php"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"8e12346f-6133-41ac-8dec-269e0ceaeacd","name":"Cash Payment","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"X-API-Key","value":"<API Key>","description":"Added as a part of security scheme: apikey"}],"body":{"mode":"raw","raw":"{\n  \"bilid\": \"0C0B18019DC7\",\n  \"amount\": 36,\n  \"method\": \"Cash\"\n}","options":{"raw":{"language":"json"}}},"url":"/api/v1/payments.php"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx"},{"key":"Date","value":"Fri, 03 Apr 2026 07:17:48 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"PHP/8.2.30"},{"key":"X-Powered-By","value":"PleskLin"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"Referrer-Policy","value":"strict-origin-when-cross-origin"},{"key":"Permissions-Policy","value":"geolocation=(self), microphone=(self), camera=(self)"},{"key":"Cache-Control","value":"max-age=2592000"},{"key":"Expires","value":"Sun, 03 May 2026 07:17:48 GMT"},{"key":"Content-Encoding","value":"br"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"bilid\": \"0C0B18019DC7\",\n    \"paid_amount\": 36,\n    \"method\": \"Cash\",\n    \"balance_due\": 0,\n    \"is_paid\": true,\n    \"credited_overshoot\": 0\n}"}],"_postman_id":"0c1e449f-aed3-4f43-8c38-1c3c225610e1"},{"name":"Order Payment","id":"56fb0102-a208-4019-8f0d-82f7f4b11fd8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/api/v1/payments.php?bilid=M679FUY","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}},"urlObject":{"path":["api","v1","payments.php"],"host":[""],"query":[{"key":"bilid","value":"M679FUY"}],"variable":[]}},"response":[{"id":"31cb16e4-cff0-4d5e-909a-31f3d34fc7fa","name":"Get Payments on an Order","originalRequest":{"method":"GET","header":[],"url":{"raw":"/api/v1/payments.php?bilid=0C0B18019DC7","host":[""],"path":["api","v1","payments.php"],"query":[{"key":"bilid","value":"0C0B18019DC7"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx"},{"key":"Date","value":"Fri, 03 Apr 2026 07:19:28 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"PHP/8.2.30"},{"key":"X-Powered-By","value":"PleskLin"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"Referrer-Policy","value":"strict-origin-when-cross-origin"},{"key":"Permissions-Policy","value":"geolocation=(self), microphone=(self), camera=(self)"},{"key":"Cache-Control","value":"max-age=2592000"},{"key":"Expires","value":"Sun, 03 May 2026 07:19:28 GMT"},{"key":"Content-Encoding","value":"br"}],"cookie":[],"responseTime":null,"body":"{\n    \"bilid\": \"0C0B18019DC7\",\n    \"total_charged\": 36,\n    \"total_paid\": 36,\n    \"balance_due\": 0,\n    \"is_paid\": true,\n    \"payments\": [\n        {\n            \"date\": \"2026-04-03 15:17:48\",\n            \"description\": \"1420\",\n            \"amount\": \"36.0000\",\n            \"method\": \"Cash\",\n            \"docid\": \"\"\n        }\n    ]\n}"}],"_postman_id":"56fb0102-a208-4019-8f0d-82f7f4b11fd8"},{"name":"Debtors Aging","id":"e9098e83-de39-4fc1-a55f-ce296e53c010","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/api/v1/payments.php?query=debtors_aging&date_to=","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}},"urlObject":{"path":["api","v1","payments.php"],"host":[""],"query":[{"key":"query","value":"debtors_aging"},{"description":{"content":"<p>Optional. YYYY-MM-DD</p>\n","type":"text/plain"},"key":"date_to","value":""}],"variable":[]}},"response":[{"id":"201e16a5-dfb8-4905-90b5-16923b2b07ce","name":"Get Debtors Aging","originalRequest":{"method":"GET","header":[],"url":{"raw":"/api/v1/payments.php?query=debtors_aging&date_to=2026-04-30","host":[""],"path":["api","v1","payments.php"],"query":[{"key":"query","value":"debtors_aging"},{"key":"date_to","value":"2026-04-30","description":"Optional. YYYY-MM-DD"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx"},{"key":"Date","value":"Fri, 03 Apr 2026 07:20:15 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"PHP/8.2.30"},{"key":"X-Powered-By","value":"PleskLin"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"Referrer-Policy","value":"strict-origin-when-cross-origin"},{"key":"Permissions-Policy","value":"geolocation=(self), microphone=(self), camera=(self)"},{"key":"Cache-Control","value":"max-age=2592000"},{"key":"Expires","value":"Sun, 03 May 2026 07:20:15 GMT"},{"key":"Content-Encoding","value":"br"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"date_to\": \"2026-04-30\",\n    \"debtors\": [\n        {\n            \"profileid\": 1,\n            \"name\": \"Nik Hazwan\",\n            \"business\": \"Mac 25 Enterprise 12\",\n            \"lastpaydate\": \"2025-12-22 13:02:21\",\n            \"aging\": {\n                \"current\": 0,\n                \"1_month\": 0,\n                \"2_months\": 0,\n                \"3_months\": 0,\n                \"4_months\": 0,\n                \"5_months_plus\": -2.445\n            },\n            \"total_balance\": -2.45\n        }\n    ]\n}"}],"_postman_id":"e9098e83-de39-4fc1-a55f-ce296e53c010"}],"id":"98d4258f-e9d9-4362-8c9a-f4e433fc1dea","_postman_id":"98d4258f-e9d9-4362-8c9a-f4e433fc1dea","description":"","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}}},{"name":"price.php","item":[{"name":"List Active Prices / Items","id":"cf183c86-f77f-4fb0-abd5-4bc368a3d712","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"/api/v1/price.php?search=&category=&page=1&limit=50","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}},"urlObject":{"path":["api","v1","price.php"],"host":[""],"query":[{"description":{"content":"<p>Optional</p>\n","type":"text/plain"},"key":"search","value":""},{"description":{"content":"<p>Optional</p>\n","type":"text/plain"},"key":"category","value":""},{"description":{"content":"<p>Optional</p>\n","type":"text/plain"},"key":"page","value":"1"},{"description":{"content":"<p>Optional</p>\n","type":"text/plain"},"key":"limit","value":"50"}],"variable":[]}},"response":[{"id":"b517c113-bd5f-4bdb-b917-b1b6b30a8d5d","name":"List Active Prices / Items","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":{"raw":"/api/v1/price.php?search=&category=&page=1&limit=50","host":[""],"path":["api","v1","price.php"],"query":[{"key":"search","value":"","description":"Optional"},{"key":"category","value":"","description":"Optional"},{"key":"page","value":"1","description":"Optional"},{"key":"limit","value":"50","description":"Optional"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx"},{"key":"Date","value":"Fri, 03 Apr 2026 07:59:31 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"PHP/8.2.30"},{"key":"X-Powered-By","value":"PleskLin"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"Referrer-Policy","value":"strict-origin-when-cross-origin"},{"key":"Permissions-Policy","value":"geolocation=(self), microphone=(self), camera=(self)"},{"key":"Cache-Control","value":"max-age=2592000"},{"key":"Expires","value":"Sun, 03 May 2026 07:59:31 GMT"},{"key":"Content-Encoding","value":"br"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": [\n        {\n            \"id\": 6324,\n            \"type\": \"Stamp Pad size 4 (pc)\",\n            \"category\": \"Alat Tulis\",\n            \"price\": \"5.00\",\n            \"taxpercent\": \"0\",\n            \"period\": 0,\n            \"account\": \"Sales\",\n            \"identifier\": \"9557368047860\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 6325,\n            \"type\": \"Stamp Pad size 4 (pc)\",\n            \"category\": \"Alat Tulis\",\n            \"price\": \"5.00\",\n            \"taxpercent\": \"0\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"9557368047860\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 6326,\n            \"type\": \"Stamp Pad size 4 (pc)\",\n            \"category\": \"Alat Tulis\",\n            \"price\": \"5.00\",\n            \"taxpercent\": \"0\",\n            \"period\": 0,\n            \"account\": \"Sales\",\n            \"identifier\": \"a\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 6499,\n            \"type\": \"Jeans\",\n            \"category\": \"Alteration\",\n            \"price\": \"5.00\",\n            \"taxpercent\": \"0\",\n            \"period\": 2,\n            \"account\": \"Jahit\",\n            \"identifier\": \"\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 6474,\n            \"type\": \"Aluminium 2x1inch (kaki)\",\n            \"category\": \"Aluminium\",\n            \"price\": \"5.00\",\n            \"taxpercent\": \"0\",\n            \"period\": 0,\n            \"account\": \"Sales\",\n            \"identifier\": \"aluminium2x1inch\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 6486,\n            \"type\": \"Aluminium 2x1inch (kaki)\",\n            \"category\": \"Aluminium\",\n            \"price\": \"5.00\",\n            \"taxpercent\": \"0\",\n            \"period\": 0,\n            \"account\": \"Test Sales Account\",\n            \"identifier\": \"aluminium2x1inch\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 35,\n            \"type\": \"Dry Clean (sf)\",\n            \"category\": \"Carpets\",\n            \"price\": \"4.00\",\n            \"taxpercent\": \"0\",\n            \"period\": 1,\n            \"account\": \"Sales\",\n            \"identifier\": \"\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 32,\n            \"type\": \"HandMade Or Silk (sf)\",\n            \"category\": \"Carpets\",\n            \"price\": \"2.50\",\n            \"taxpercent\": \"0\",\n            \"period\": 1,\n            \"account\": \"Sales\",\n            \"identifier\": \"\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 34,\n            \"type\": \"Machine Made\",\n            \"category\": \"Carpets\",\n            \"price\": \"0.00\",\n            \"taxpercent\": \"0\",\n            \"period\": 1,\n            \"account\": \"Sales\",\n            \"identifier\": \"\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 33,\n            \"type\": \"Machine Made(sf)\",\n            \"category\": \"Carpets\",\n            \"price\": \"2.00\",\n            \"taxpercent\": \"0\",\n            \"period\": 1,\n            \"account\": \"Sales\",\n            \"identifier\": \"\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 6476,\n            \"type\": \"Mug Merah 200ml (pc)\",\n            \"category\": \"Cawan\",\n            \"price\": \"3.00\",\n            \"taxpercent\": \"0\",\n            \"period\": 0,\n            \"account\": \"Sales\",\n            \"identifier\": \"MugMerah200ml\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 6485,\n            \"type\": \"Mug Merah 200ml (pc)\",\n            \"category\": \"Cawan\",\n            \"price\": \"3.00\",\n            \"taxpercent\": \"0\",\n            \"period\": 0,\n            \"account\": \"Test Sales Account\",\n            \"identifier\": \"MugMerah200ml\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 351,\n            \"type\": \"ALOE VERA 99% LIPSTICK\",\n            \"category\": \"COSMETIC PRODUCT\",\n            \"price\": \"5.30\",\n            \"taxpercent\": \"\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"6970505530231\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 352,\n            \"type\": \"ALOE VERA MOISTURIZING LIP STICK 1 PCS\",\n            \"category\": \"COSMETIC PRODUCT\",\n            \"price\": \"4.90\",\n            \"taxpercent\": \"\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"11581\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 1494,\n            \"type\": \"DERMAL THERAPY HAND BALM 50G\",\n            \"category\": \"COSMETIC PRODUCT\",\n            \"price\": \"17.90\",\n            \"taxpercent\": \"\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"9329224000551\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 1496,\n            \"type\": \"DERMAL THERAPY LIP BALM 10G\",\n            \"category\": \"COSMETIC PRODUCT\",\n            \"price\": \"13.70\",\n            \"taxpercent\": \"\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"9329224000773\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 1497,\n            \"type\": \"DERMAL THERAPY LIPBALM SPF50 10G\",\n            \"category\": \"COSMETIC PRODUCT\",\n            \"price\": \"19.20\",\n            \"taxpercent\": \"\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"9329224001466\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 2039,\n            \"type\": \"FAIR & LOVELY\",\n            \"category\": \"COSMETIC PRODUCT\",\n            \"price\": \"8.40\",\n            \"taxpercent\": \"\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"9556126647236\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 4582,\n            \"type\": \"POLYLAB PETROLEUM JELLY 100GM\",\n            \"category\": \"COSMETIC PRODUCT\",\n            \"price\": \"6.90\",\n            \"taxpercent\": \"\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"9555018402618\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 4915,\n            \"type\": \"SAFI BAL OXYWHITE CC CR SPF25PA++ 20G\",\n            \"category\": \"COSMETIC PRODUCT\",\n            \"price\": \"21.30\",\n            \"taxpercent\": \"\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"9555052710991\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 4917,\n            \"type\": \"SAFI BAL OXYWHITE MOIST CR SPF 20 45G\",\n            \"category\": \"COSMETIC PRODUCT\",\n            \"price\": \"20.90\",\n            \"taxpercent\": \"\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"9555052708721\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 6312,\n            \"type\": \"RM200 worth of credit\",\n            \"category\": \"Credits\",\n            \"price\": \"190.00\",\n            \"taxpercent\": \"0\",\n            \"period\": 0,\n            \"account\": \"Sales\",\n            \"identifier\": \"\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 6310,\n            \"type\": \"Dry Clean (Per Section)\",\n            \"category\": \"Curtain Cleaning Estimation\",\n            \"price\": \"0.00\",\n            \"taxpercent\": \"0\",\n            \"period\": 3,\n            \"account\": \"Sales\",\n            \"identifier\": \"\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 94,\n            \"type\": \"UphaLyte Oral Rehydration Salts\",\n            \"category\": \"Dehydration\",\n            \"price\": \"0.90\",\n            \"taxpercent\": \"0\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"9557046001030\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 6292,\n            \"type\": \"Cheras\",\n            \"category\": \"Delivery\",\n            \"price\": \"30.00\",\n            \"taxpercent\": \"0\",\n            \"period\": 0,\n            \"account\": \"Sales\",\n            \"identifier\": \"\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 6293,\n            \"type\": \"Kuala Lumpur\",\n            \"category\": \"Delivery\",\n            \"price\": \"25.00\",\n            \"taxpercent\": \"0\",\n            \"period\": 0,\n            \"account\": \"Sales\",\n            \"identifier\": \"\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 6294,\n            \"type\": \"Petaling Jaya\",\n            \"category\": \"Delivery\",\n            \"price\": \"25.00\",\n            \"taxpercent\": \"0\",\n            \"period\": 0,\n            \"account\": \"Sales\",\n            \"identifier\": \"\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 6319,\n            \"type\": \"Sabah Sarawak\",\n            \"category\": \"Delivery\",\n            \"price\": \"0.00\",\n            \"taxpercent\": \"0\",\n            \"period\": 0,\n            \"account\": \"Sales\",\n            \"identifier\": \"\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 6316,\n            \"type\": \"Semenanjung Malaysia\",\n            \"category\": \"Delivery\",\n            \"price\": \"0.00\",\n            \"taxpercent\": \"0\",\n            \"period\": 0,\n            \"account\": \"Sales\",\n            \"identifier\": \"\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 6302,\n            \"type\": \"Gift\",\n            \"category\": \"Discount\",\n            \"price\": \"-1.00\",\n            \"taxpercent\": \"0\",\n            \"period\": 0,\n            \"account\": \"Sales\",\n            \"identifier\": \"\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 6513,\n            \"type\": \"Dress Cantik Green L (pc)\",\n            \"category\": \"Dress\",\n            \"price\": \"100.00\",\n            \"taxpercent\": \"0\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"DressCantikGreen\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 6514,\n            \"type\": \"Dress Cantik Green M (pc)\",\n            \"category\": \"Dress\",\n            \"price\": \"100.00\",\n            \"taxpercent\": \"0\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"DressCantikGreenM\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 6515,\n            \"type\": \"Dress Cantik Green S (pc)\",\n            \"category\": \"Dress\",\n            \"price\": \"100.00\",\n            \"taxpercent\": \"0\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"DressCantikGreenS\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 6301,\n            \"type\": \"Summer Dress (M) (pc)\",\n            \"category\": \"Dress\",\n            \"price\": \"30.00\",\n            \"taxpercent\": \"0\",\n            \"period\": 0,\n            \"account\": \"Sales\",\n            \"identifier\": \"b\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 163,\n            \"type\": \"3M MICROPORE 1 IN X 10YD\",\n            \"category\": \"DRESSING PRODUCT\",\n            \"price\": \"4.10\",\n            \"taxpercent\": \"\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"11621\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 165,\n            \"type\": \"3M MICROPORE 1 IN X 10YD X 12\",\n            \"category\": \"DRESSING PRODUCT\",\n            \"price\": \"45.90\",\n            \"taxpercent\": \"\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"116211\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 168,\n            \"type\": \"3M MICROPORE 1/2 IN X 10YD\",\n            \"category\": \"DRESSING PRODUCT\",\n            \"price\": \"2.00\",\n            \"taxpercent\": \"\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"11620\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 169,\n            \"type\": \"3M MICROPORE 1/2 IN X 10YD X 24\",\n            \"category\": \"DRESSING PRODUCT\",\n            \"price\": \"45.90\",\n            \"taxpercent\": \"\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"116201\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 171,\n            \"type\": \"3M MICROPORE 2 IN X 10 YD\",\n            \"category\": \"DRESSING PRODUCT\",\n            \"price\": \"8.20\",\n            \"taxpercent\": \"\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"11622\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 174,\n            \"type\": \"3M MICROPORE 2 IN X 10 YD X 6\",\n            \"category\": \"DRESSING PRODUCT\",\n            \"price\": \"45.90\",\n            \"taxpercent\": \"\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"116221\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 176,\n            \"type\": \"3M MICROPORE 3 IN X 10 YD\",\n            \"category\": \"DRESSING PRODUCT\",\n            \"price\": \"12.20\",\n            \"taxpercent\": \"\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"11623\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 177,\n            \"type\": \"3M MICROPORE 3 IN X 10 YD X 4\",\n            \"category\": \"DRESSING PRODUCT\",\n            \"price\": \"45.90\",\n            \"taxpercent\": \"\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"116231\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 182,\n            \"type\": \"3M NEXCARE FABRIC DRESSING 6CMX1M\",\n            \"category\": \"DRESSING PRODUCT\",\n            \"price\": \"10.50\",\n            \"taxpercent\": \"\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"8850304084495\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 183,\n            \"type\": \"3M NEXCARE GENTLE PAPER DRESSING 6CMX1M\",\n            \"category\": \"DRESSING PRODUCT\",\n            \"price\": \"10.50\",\n            \"taxpercent\": \"\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"8850304102632\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 184,\n            \"type\": \"3M NEXCARE SOFT CLOTH DRESSING 6CMX1M\",\n            \"category\": \"DRESSING PRODUCT\",\n            \"price\": \"10.50\",\n            \"taxpercent\": \"\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"8850304015437\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 186,\n            \"type\": \"3M NEXCARE TEGADERM+PAD TRANS DRESSING 5S (2 3/8 IN X 4 IN)\",\n            \"category\": \"DRESSING PRODUCT\",\n            \"price\": \"15.40\",\n            \"taxpercent\": \"\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"51131835580\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 187,\n            \"type\": \"3M T/PORE WHITE DRESSING TAPE 1'S\",\n            \"category\": \"DRESSING PRODUCT\",\n            \"price\": \"6.60\",\n            \"taxpercent\": \"\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"123241\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 188,\n            \"type\": \"3M T/PORE WHITE DRESSING TAPE 1/2x10YD\",\n            \"category\": \"DRESSING PRODUCT\",\n            \"price\": \"2.90\",\n            \"taxpercent\": \"\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"123231\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 189,\n            \"type\": \"3M T/PORE WHITE DRESSING TAPE 1/2x10YD 20'S\",\n            \"category\": \"DRESSING PRODUCT\",\n            \"price\": \"37.90\",\n            \"taxpercent\": \"\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"2520488\",\n            \"ispackage\": 0\n        },\n        {\n            \"id\": 190,\n            \"type\": \"3M T/PORE WHITE DRESSING TAPE 1x10YD 12'S\",\n            \"category\": \"DRESSING PRODUCT\",\n            \"price\": \"0.00\",\n            \"taxpercent\": \"\",\n            \"period\": 0,\n            \"account\": \"Farmasi\",\n            \"identifier\": \"2520548\",\n            \"ispackage\": 0\n        }\n    ],\n    \"total\": 6356,\n    \"page\": 1,\n    \"limit\": 50,\n    \"pages\": 128\n}"}],"_postman_id":"cf183c86-f77f-4fb0-abd5-4bc368a3d712"},{"name":"Single Item Details","id":"0819b0b0-bdb7-484c-96ef-56dcd0df2389","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"/api/v1/price.php?id=","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}},"urlObject":{"path":["api","v1","price.php"],"host":[""],"query":[{"description":{"content":"<p>Price or Item ID</p>\n","type":"text/plain"},"key":"id","value":""}],"variable":[]}},"response":[{"id":"bbfe0e44-4181-42fa-8584-7b92918e1750","name":"Item Details","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":{"raw":"/api/v1/price.php?id=187&search=&category=&page=1&limit=50","host":[""],"path":["api","v1","price.php"],"query":[{"key":"id","value":"187"},{"key":"search","value":""},{"key":"category","value":""},{"key":"page","value":"1"},{"key":"limit","value":"50"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx"},{"key":"Date","value":"Fri, 03 Apr 2026 08:00:29 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"PHP/8.2.30"},{"key":"X-Powered-By","value":"PleskLin"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"Referrer-Policy","value":"strict-origin-when-cross-origin"},{"key":"Permissions-Policy","value":"geolocation=(self), microphone=(self), camera=(self)"},{"key":"Cache-Control","value":"max-age=2592000"},{"key":"Expires","value":"Sun, 03 May 2026 08:00:29 GMT"},{"key":"Content-Encoding","value":"br"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 187,\n    \"account\": \"Farmasi\",\n    \"category\": \"DRESSING PRODUCT\",\n    \"type\": \"3M T/PORE WHITE DRESSING TAPE 1'S\",\n    \"price\": \"6.60\",\n    \"period\": 0,\n    \"timestamp\": \"2025-10-28 13:49:52\",\n    \"featured\": \"\",\n    \"taxpercent\": \"\",\n    \"ispackage\": 0,\n    \"oncealife\": \"\",\n    \"discpercent\": \"\",\n    \"discstart\": \"0000-00-00\",\n    \"discend\": \"0000-00-00\",\n    \"maxuserlevel\": \"2\",\n    \"imageid\": \"\",\n    \"colorcode\": \"#ffffff\",\n    \"points\": \"\",\n    \"identifier\": \"123241\",\n    \"comments\": \"\",\n    \"variationgroup\": \"\",\n    \"variationname\": \"\",\n    \"html\": \"\",\n    \"available\": \"1\",\n    \"minorder\": \"0\",\n    \"commissionpercent\": \"0\",\n    \"weightkg\": \"0\",\n    \"integrationid\": \"\",\n    \"position\": 32000,\n    \"tags\": null,\n    \"isrental\": \"\",\n    \"mintime\": 0,\n    \"enforceassignment\": \"No\",\n    \"einv_classification\": \"022\",\n    \"einv_taxcode\": \"06\",\n    \"selections\": [],\n    \"addons\": [],\n    \"ranges\": [],\n    \"subscription\": null\n}"}],"_postman_id":"0819b0b0-bdb7-484c-96ef-56dcd0df2389"},{"name":"Create Price Item","id":"1dab2877-7478-4e08-9a69-895e852e4129","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n  \"account\": \"Sales\", //Mandatory\r\n  \"category\": \"Dry Cleaning\", //Mandatory\r\n  \"type\": \"Baju Melayu\", //Mandatory\r\n  \"price\": 25.00, //Mandatory\r\n  \"period\": 3.0, //Mandatory. Service period in days, or Item Lead Days\r\n  \"colorcode\": \"#FF5733\", //Mandatory\r\n  \"taxpercent\": 6.0,\r\n  \"identifier\": \"SKU-BM-001\",\r\n  \"comments\": \"Handle with care, silk material\",\r\n  \"weightkg\": 0.5,\r\n  \"tags\": \"premium,traditional\",\r\n  \"ispackage\": 0,\r\n  \"selections\": [\r\n    {\r\n      \"question\": \"Choose Fragrance\",\r\n      \"multi\": 0,\r\n      \"options\": [\r\n        {\"name\": \"Lavender\", \"price\": 0},\r\n        {\"name\": \"Lemon\", \"price\": 0}\r\n      ]\r\n    },\r\n    {\r\n      \"question\": \"Packaging Type\",\r\n      \"multi\": 0,\r\n      \"options\": [\r\n        {\"name\": \"Hanger\", \"price\": 0},\r\n        {\"name\": \"Folded\", \"price\": 2.0}\r\n      ]\r\n    }\r\n  ],\r\n  \"addons\": [\r\n    {\r\n      \"option\": \"Stain Removal\",\r\n      \"value\": 5.50\r\n    }\r\n  ],\r\n  \"ranges\": [\r\n    {\r\n      \"startrange\": 1.0,\r\n      \"endrange\": 5.0,\r\n      \"price\": 0,\r\n      \"priceperunit\": 20,\r\n      \"period\": 2.0\r\n    },\r\n    {\r\n      \"startrange\": 6.0,\r\n      \"endrange\": 10.0,\r\n      \"price\": 0,\r\n      \"priceperunit\": 18,\r\n      \"period\": 2.0\r\n    }\r\n  ]\r\n}","options":{"raw":{"language":"json"}}},"url":"/api/v1/price.php","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}},"urlObject":{"path":["api","v1","price.php"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"70663549-90dc-4026-a135-64b554bee39f","name":"Create Price Item","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n  \"account\": \"Sales\", //Mandatory\r\n  \"category\": \"Dry Cleaning\", //Mandatory\r\n  \"type\": \"Baju Melayu\", //Mandatory\r\n  \"price\": 25.00, //Mandatory\r\n  \"period\": 3.0, //Mandatory. Service period in days, or Item Lead Days\r\n  \"colorcode\": \"#FF5733\", //Mandatory\r\n  \"taxpercent\": 6.0,\r\n  \"identifier\": \"SKU-BM-001\",\r\n  \"comments\": \"Handle with care, silk material\",\r\n  \"weightkg\": 0.5,\r\n  \"tags\": \"premium,traditional\",\r\n  \"ispackage\": 0,\r\n  \"selections\": [\r\n    {\r\n      \"question\": \"Choose Fragrance\",\r\n      \"multi\": 0,\r\n      \"options\": [\r\n        {\"name\": \"Lavender\", \"price\": 0},\r\n        {\"name\": \"Lemon\", \"price\": 0}\r\n      ]\r\n    },\r\n    {\r\n      \"question\": \"Packaging Type\",\r\n      \"multi\": 0,\r\n      \"options\": [\r\n        {\"name\": \"Hanger\", \"price\": 0},\r\n        {\"name\": \"Folded\", \"price\": 2.0}\r\n      ]\r\n    }\r\n  ],\r\n  \"addons\": [\r\n    {\r\n      \"option\": \"Stain Removal\",\r\n      \"value\": 5.50\r\n    }\r\n  ],\r\n  \"ranges\": [\r\n    {\r\n      \"startrange\": 1.0,\r\n      \"endrange\": 5.0,\r\n      \"price\": 0,\r\n      \"priceperunit\": 20,\r\n      \"period\": 2.0\r\n    },\r\n    {\r\n      \"startrange\": 6.0,\r\n      \"endrange\": 10.0,\r\n      \"price\": 0,\r\n      \"priceperunit\": 18,\r\n      \"period\": 2.0\r\n    }\r\n  ]\r\n}","options":{"raw":{"language":"json"}}},"url":"/api/v1/price.php"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"1dab2877-7478-4e08-9a69-895e852e4129"},{"name":"Update Price Item","id":"2ccb90ff-9e44-4edc-9ce4-f96ce7750455","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n  \"id\": 123, // Required: The primary key of the price item to update.\r\n  \r\n  // --- Core Fields (Optional: Only include what you want to change) ---\r\n  \"type\": \"Baju Kurung 2 pcs\", // Updates the label/name of the service.\r\n  \"category\": \"Dry Cleaning\",\r\n  \"price\": 45.00, // Updated price value.\r\n  \"taxpercent\": 6.0, // Updates tax calculation.\r\n  \"identifier\": \"SKU-UPDATE-001\", // CRITICAL: Updates core table AND wipes/replaces 'goodprice' table entry.\r\n  \"ispackage\": 1, // 0 for single item, 1 for package.\r\n\r\n  // --- Relationship Arrays (Wipe-and-Replace Logic) ---\r\n  \r\n  // If 'selections' is sent, ALL previous selection types (1, 2, and 3) are deleted and replaced.\r\n  \"selections\": [\r\n    {\r\n      \"question\": \"Fabric Type\",\r\n      \"multi\": 0, // 0 for radio, 1 for checkbox.\r\n      \"options\": [\r\n        {\"name\": \"Silk\", \"price\": 5.0},\r\n        {\"name\": \"Cotton\", \"price\": 0.0}\r\n      ]\r\n    }\r\n  ],\r\n\r\n  // If 'addons' is sent, ALL previous 'addon' types for this ID are deleted first.\r\n  \"addons\": [\r\n    {\r\n      \"option\": \"Starch\",\r\n      \"value\": 2.0\r\n    }\r\n  ],\r\n\r\n  // If 'ranges' is sent, ALL previous price ranges for this serviceid are deleted first.\r\n  \"ranges\": [\r\n    {\r\n      \"startrange\": 1.0,\r\n      \"endrange\": 10.0,\r\n      \"price\": 40.0,\r\n      \"priceperunit\": 0,\r\n      \"period\": 1.0\r\n    }\r\n  ],\r\n\r\n  // --- Subscription Logic ---\r\n  // If you send an empty object {}, it triggers: DELETE FROM subscriptiontype.\r\n  // If you send data, it attempts an UPDATE; if no row exists, it performs an INSERT.\r\n  \"subscription\": {\r\n    \"period\": 30.0,\r\n    \"type\": \"Monthly\",\r\n    \"value\": 150.0,\r\n    \"automatic\": \"yes\"\r\n  },\r\n\r\n  // If 'rentalslots' is sent, ALL previous slots are deleted and replaced.\r\n  \"rentalslots\": [\r\n    {\r\n      \"day\": 1, // 1=Monday, 7=Sunday.\r\n      \"start_time\": \"08:00:00\",\r\n      \"end_time\": \"12:00:00\"\r\n    }\r\n  ]\r\n}","options":{"raw":{"language":"json"}}},"url":"/api/v1/price.php","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}},"urlObject":{"path":["api","v1","price.php"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"580bb453-e530-42d7-b2c8-9e8e5a0edd44","name":"Update Price Item","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n  \"id\": 187,\r\n  \"price\": 7.00\r\n}","options":{"raw":{"language":"json"}}},"url":"/api/v1/price.php"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx"},{"key":"Date","value":"Fri, 03 Apr 2026 08:01:12 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"PHP/8.2.30"},{"key":"X-Powered-By","value":"PleskLin"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"Referrer-Policy","value":"strict-origin-when-cross-origin"},{"key":"Permissions-Policy","value":"geolocation=(self), microphone=(self), camera=(self)"},{"key":"Cache-Control","value":"max-age=2592000"},{"key":"Expires","value":"Sun, 03 May 2026 08:01:12 GMT"},{"key":"Content-Encoding","value":"br"}],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\n    \"success\": true,\n    \"id\": 187\n}"}],"_postman_id":"2ccb90ff-9e44-4edc-9ce4-f96ce7750455"},{"name":"Delete Price Item","id":"4357a3ba-2338-4d77-a6c1-c5a5c3d0bbfb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"/api/v1/price.php?id=1947","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}},"urlObject":{"path":["api","v1","price.php"],"host":[""],"query":[{"key":"id","value":"1947"}],"variable":[]}},"response":[{"id":"ceb144de-e869-48ad-9fd0-ad9bb188ff18","name":"Delete an Item From Price List","originalRequest":{"method":"DELETE","header":[{"key":"Content-Type","value":"application/json"},{"key":"X-API-Key","value":"<API Key>","description":"Added as a part of security scheme: apikey"}],"body":{"mode":"raw","raw":"{\n  \"id\": 6525\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"/api/v1/price.php?id=6525","host":[""],"path":["api","v1","price.php"],"query":[{"key":"id","value":"6525"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx"},{"key":"Date","value":"Fri, 03 Apr 2026 08:09:49 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"PHP/8.2.30"},{"key":"X-Powered-By","value":"PleskLin"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"Referrer-Policy","value":"strict-origin-when-cross-origin"},{"key":"Permissions-Policy","value":"geolocation=(self), microphone=(self), camera=(self)"},{"key":"Cache-Control","value":"max-age=2592000"},{"key":"Expires","value":"Sun, 03 May 2026 08:09:49 GMT"},{"key":"Content-Encoding","value":"br"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"id\": 6525,\n    \"deleted\": true\n}"}],"_postman_id":"4357a3ba-2338-4d77-a6c1-c5a5c3d0bbfb"}],"id":"c9616fc0-85de-4ea1-98fc-608b83e29e98","_postman_id":"c9616fc0-85de-4ea1-98fc-608b83e29e98","description":"","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}}},{"name":"customers.php","item":[{"name":"Get Details of a Customer","id":"39cdcdfe-07d3-48d7-92a3-4c1ddd6c0e50","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"/api/v1/customers.php?id=1947","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}},"urlObject":{"path":["api","v1","customers.php"],"host":[""],"query":[{"key":"id","value":"1947"}],"variable":[]}},"response":[{"id":"e2ffd5a5-0b3e-4336-959b-6fa67be17957","name":"Get Details of a Customer","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":{"raw":"/api/v1/customers.php?id=128","host":[""],"path":["api","v1","customers.php"],"query":[{"key":"id","value":"128"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx"},{"key":"Date","value":"Fri, 03 Apr 2026 08:10:26 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"PHP/8.2.30"},{"key":"X-Powered-By","value":"PleskLin"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"Referrer-Policy","value":"strict-origin-when-cross-origin"},{"key":"Permissions-Policy","value":"geolocation=(self), microphone=(self), camera=(self)"},{"key":"Cache-Control","value":"max-age=2592000"},{"key":"Expires","value":"Sun, 03 May 2026 08:10:25 GMT"},{"key":"Content-Encoding","value":"br"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 1,\n    \"name\": \"Nik Hazwan\",\n    \"phone\": \"0193913193\",\n    \"email\": \"nichshazwan@gmail.com\",\n    \"address\": \"No 50G, Jalan PJU5/20D\",\n    \"poscode\": \"47810\",\n    \"account\": \"Sales\",\n    \"ic\": \"870912115521\",\n    \"membershipnumber\": \"QWERTY\",\n    \"points\": \"204719\",\n    \"pointsvalid\": \"2027-04-01\",\n    \"membership\": \"2030-08-31\",\n    \"percentdisc\": \"0\",\n    \"business\": \"Mac 25 Enterprise 12\",\n    \"username\": \"Nik Mohd Hazwan Nik Kamaruddin1\",\n    \"blocked\": \"\",\n    \"branch\": \"1\",\n    \"tags\": \"\",\n    \"birthmonthday\": \"0912\",\n    \"autowhatsapp\": 1,\n    \"introducer\": \"\",\n    \"TIN\": \"\",\n    \"id_type\": \"\",\n    \"statecode\": \"\",\n    \"countrycode\": \"\",\n    \"cityname\": \"\",\n    \"defaultOrderType\": \"\",\n    \"timestamp\": \"2026-04-01 11:48:47\",\n    \"addresses\": [\n        {\n            \"id\": 33,\n            \"shortname\": \"Nik\",\n            \"contactperson\": \"Nik\",\n            \"phone\": \"0193913193\",\n            \"address\": \"No 1, Jalan 2\",\n            \"poscode\": \"47810\",\n            \"email\": \"\",\n            \"account\": \"\",\n            \"tags\": \"\",\n            \"type\": \"\",\n            \"timestamp\": \"2026-04-03 14:54:24\"\n        },\n        {\n            \"id\": 32,\n            \"shortname\": \"Zahra\",\n            \"contactperson\": \"Zahra\",\n            \"phone\": \"0193913193\",\n            \"address\": \"Kota Damansara\",\n            \"poscode\": \"47810\",\n            \"email\": \"\",\n            \"account\": \"\",\n            \"tags\": \"\",\n            \"type\": \"\",\n            \"timestamp\": \"2024-01-14 12:29:52\"\n        },\n        {\n            \"id\": 31,\n            \"shortname\": \"Nik Hazwan\",\n            \"contactperson\": \"Nik Hazwan\",\n            \"phone\": \"0193913193\",\n            \"address\": \"No 50G, Jalan PJU5/20D\",\n            \"poscode\": \"47810\",\n            \"email\": \"nichshazwan@gmail.com\",\n            \"account\": \"\",\n            \"tags\": \"\",\n            \"type\": \"new\",\n            \"timestamp\": \"2026-04-01 11:48:47\"\n        },\n        {\n            \"id\": 30,\n            \"shortname\": \"Nik Kota Bharu &\",\n            \"contactperson\": \"Aini\",\n            \"phone\": \"0129116636\",\n            \"address\": \"Ini Alah alamat\\r\\nKota Bharo\",\n            \"poscode\": \"22000\",\n            \"email\": \"\",\n            \"account\": \"\",\n            \"tags\": \"\",\n            \"type\": \"\",\n            \"timestamp\": \"2024-01-14 12:29:52\"\n        },\n        {\n            \"id\": 29,\n            \"shortname\": \"Nik Johor Bharu\",\n            \"contactperson\": \"Aini2\",\n            \"phone\": \"01291166365\",\n            \"address\": \"Ini Alah alamat\\r\\nJohor Bharo\",\n            \"poscode\": \"87361\",\n            \"email\": \"\",\n            \"account\": \"\",\n            \"tags\": \"\",\n            \"type\": \"\",\n            \"timestamp\": \"2024-01-14 12:29:52\"\n        }\n    ],\n    \"outstanding\": 7994.05,\n    \"vouchervalue\": 2,\n    \"vouchercount\": 1,\n    \"voucherexpiry\": \"2026-05-31\"\n}"}],"_postman_id":"39cdcdfe-07d3-48d7-92a3-4c1ddd6c0e50"},{"name":"Get Additional Saved Address for a Customer","id":"21a82911-ad19-4615-be36-3355df297c80","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"/api/v1/customers.php?addresses_for=1947","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}},"urlObject":{"path":["api","v1","customers.php"],"host":[""],"query":[{"description":{"content":"<p>the customer id</p>\n","type":"text/plain"},"key":"addresses_for","value":"1947"}],"variable":[]}},"response":[{"id":"1d41f094-372f-4228-8d1a-28d32031b7f2","name":"Get Additional Saved Address for a Customer","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":{"raw":"/api/v1/customers.php?addresses_for=1","host":[""],"path":["api","v1","customers.php"],"query":[{"key":"addresses_for","value":"1","description":"the customer id"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx"},{"key":"Date","value":"Fri, 03 Apr 2026 08:10:50 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"PHP/8.2.30"},{"key":"X-Powered-By","value":"PleskLin"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"Referrer-Policy","value":"strict-origin-when-cross-origin"},{"key":"Permissions-Policy","value":"geolocation=(self), microphone=(self), camera=(self)"},{"key":"Cache-Control","value":"max-age=2592000"},{"key":"Expires","value":"Sun, 03 May 2026 08:10:50 GMT"},{"key":"Content-Encoding","value":"br"}],"cookie":[],"responseTime":null,"body":"{\n    \"profileid\": 1,\n    \"addresses\": [\n        {\n            \"id\": 33,\n            \"shortname\": \"Nik\",\n            \"contactperson\": \"Nik\",\n            \"phone\": \"0193913193\",\n            \"address\": \"No 1, Jalan 2\",\n            \"poscode\": \"47810\",\n            \"email\": \"\",\n            \"account\": \"\",\n            \"tags\": \"\",\n            \"type\": \"\",\n            \"timestamp\": \"2026-04-03 14:54:24\"\n        },\n        {\n            \"id\": 32,\n            \"shortname\": \"Zahra\",\n            \"contactperson\": \"Zahra\",\n            \"phone\": \"0193913193\",\n            \"address\": \"Kota Damansara\",\n            \"poscode\": \"47810\",\n            \"email\": \"\",\n            \"account\": \"\",\n            \"tags\": \"\",\n            \"type\": \"\",\n            \"timestamp\": \"2024-01-14 12:29:52\"\n        },\n        {\n            \"id\": 31,\n            \"shortname\": \"Nik Hazwan\",\n            \"contactperson\": \"Nik Hazwan\",\n            \"phone\": \"0193913193\",\n            \"address\": \"No 50G, Jalan PJU5/20D\",\n            \"poscode\": \"47810\",\n            \"email\": \"nichshazwan@gmail.com\",\n            \"account\": \"\",\n            \"tags\": \"\",\n            \"type\": \"new\",\n            \"timestamp\": \"2026-04-01 11:48:47\"\n        },\n        {\n            \"id\": 30,\n            \"shortname\": \"Nik Kota Bharu &\",\n            \"contactperson\": \"Aini\",\n            \"phone\": \"0129116636\",\n            \"address\": \"Ini Alah alamat\\r\\nKota Bharo\",\n            \"poscode\": \"22000\",\n            \"email\": \"\",\n            \"account\": \"\",\n            \"tags\": \"\",\n            \"type\": \"\",\n            \"timestamp\": \"2024-01-14 12:29:52\"\n        },\n        {\n            \"id\": 29,\n            \"shortname\": \"Nik Johor Bharu\",\n            \"contactperson\": \"Aini2\",\n            \"phone\": \"01291166365\",\n            \"address\": \"Ini Alah alamat\\r\\nJohor Bharo\",\n            \"poscode\": \"87361\",\n            \"email\": \"\",\n            \"account\": \"\",\n            \"tags\": \"\",\n            \"type\": \"\",\n            \"timestamp\": \"2024-01-14 12:29:52\"\n        }\n    ]\n}"}],"_postman_id":"21a82911-ad19-4615-be36-3355df297c80"},{"name":"List Customers / Details","id":"26543324-6808-430f-af87-48aeff166f9a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"/api/v1/customers.php?search=string&tags=string&blocked=string&page=1&limit=50","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}},"urlObject":{"path":["api","v1","customers.php"],"host":[""],"query":[{"description":{"content":"<p>General search on name, phone, email, ic, membership number, and business name.</p>\n","type":"text/plain"},"key":"search","value":"string"},{"key":"tags","value":"string"},{"description":{"content":"<p>\"order\" or \"blockoncreditlimit\"</p>\n","type":"text/plain"},"key":"blocked","value":"string"},{"key":"page","value":"1"},{"key":"limit","value":"50"}],"variable":[]}},"response":[{"id":"178f763f-9e1f-436f-8692-ae3000e1beb4","name":"Customer Search","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":{"raw":"/api/v1/customers.php?search=019391","host":[""],"path":["api","v1","customers.php"],"query":[{"key":"search","value":"019391"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx"},{"key":"Date","value":"Fri, 03 Apr 2026 08:18:04 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"PHP/8.2.30"},{"key":"X-Powered-By","value":"PleskLin"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"Referrer-Policy","value":"strict-origin-when-cross-origin"},{"key":"Permissions-Policy","value":"geolocation=(self), microphone=(self), camera=(self)"},{"key":"Cache-Control","value":"max-age=2592000"},{"key":"Expires","value":"Sun, 03 May 2026 08:18:04 GMT"},{"key":"Content-Encoding","value":"br"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": [\n        {\n            \"id\": 123,\n            \"name\": \"Jamilah kasim\",\n            \"phone\": \"0193913193\",\n            \"email\": \"\",\n            \"address\": \"\",\n            \"poscode\": \"\",\n            \"account\": \"Sales\",\n            \"ic\": \"\",\n            \"membershipnumber\": \"\",\n            \"points\": \"2319\",\n            \"pointsvalid\": \"2025-07-23\",\n            \"membership\": \"\",\n            \"percentdisc\": \"0\",\n            \"business\": \"\",\n            \"blocked\": \"\",\n            \"branch\": \"1\",\n            \"tags\": \"\",\n            \"birthmonthday\": \"\",\n            \"timestamp\": \"2025-07-15 07:31:41\"\n        },\n        {\n            \"id\": 91,\n            \"name\": \"Customer & (Nama) Pelik\",\n            \"phone\": \"0193913193\",\n            \"email\": \"\",\n            \"address\": \"\",\n            \"poscode\": \"\",\n            \"account\": \"Sales\",\n            \"ic\": \"\",\n            \"membershipnumber\": \"\",\n            \"points\": \"0\",\n            \"pointsvalid\": \"0000-00-00\",\n            \"membership\": \"\",\n            \"percentdisc\": \"0\",\n            \"business\": \"\",\n            \"blocked\": \"\",\n            \"branch\": \"1\",\n            \"tags\": \"\",\n            \"birthmonthday\": \"\",\n            \"timestamp\": \"2025-07-15 07:31:41\"\n        },\n        {\n            \"id\": 55,\n            \"name\": \"Qurratun\",\n            \"phone\": \"0193913145\",\n            \"email\": \"systemmailer25@gmail.com\",\n            \"address\": \"No 50G, Jalan PJU5/20D\",\n            \"poscode\": null,\n            \"account\": null,\n            \"ic\": null,\n            \"membershipnumber\": \"\",\n            \"points\": \"1100\",\n            \"pointsvalid\": \"2023-07-18\",\n            \"membership\": null,\n            \"percentdisc\": null,\n            \"business\": null,\n            \"blocked\": \"\",\n            \"branch\": \"1\",\n            \"tags\": \"\",\n            \"birthmonthday\": \"\",\n            \"timestamp\": \"2025-07-15 07:31:41\"\n        },\n        {\n            \"id\": 50,\n            \"name\": \"Nik Mohd Hazwan Nik Kamaruddin\",\n            \"phone\": \"60193913193\",\n            \"email\": \"nichshazwan@gmail.com\",\n            \"address\": \"\",\n            \"poscode\": \"\",\n            \"account\": \"Farmasi\",\n            \"ic\": \"\",\n            \"membershipnumber\": \"\",\n            \"points\": \"20\",\n            \"pointsvalid\": \"2026-01-07\",\n            \"membership\": \"\",\n            \"percentdisc\": \"\",\n            \"business\": \"\",\n            \"blocked\": \"\",\n            \"branch\": \"1\",\n            \"tags\": \"\",\n            \"birthmonthday\": \"\",\n            \"timestamp\": \"2025-07-15 07:31:41\"\n        },\n        {\n            \"id\": 15,\n            \"name\": \"Khairuddin &\",\n            \"phone\": \"0193913193\",\n            \"email\": \"khairud@qdrugs.com\",\n            \"address\": \"Kota Masar, Negeri Sembilan\",\n            \"poscode\": \"\",\n            \"account\": \"\",\n            \"ic\": \"\",\n            \"membershipnumber\": \"\",\n            \"points\": \"84\",\n            \"pointsvalid\": \"2025-09-04\",\n            \"membership\": \"2025-08-30\",\n            \"percentdisc\": \"20\",\n            \"business\": \"Q Drugs\",\n            \"blocked\": \"\",\n            \"branch\": \"1\",\n            \"tags\": \"\",\n            \"birthmonthday\": \"\",\n            \"timestamp\": \"2026-04-01 11:23:31\"\n        },\n        {\n            \"id\": 1,\n            \"name\": \"Nik Hazwan\",\n            \"phone\": \"0193913193\",\n            \"email\": \"nichshazwan@gmail.com\",\n            \"address\": \"No 50G, Jalan PJU5/20D\",\n            \"poscode\": \"47810\",\n            \"account\": \"Sales\",\n            \"ic\": \"870912115521\",\n            \"membershipnumber\": \"QWERTY\",\n            \"points\": \"204719\",\n            \"pointsvalid\": \"2027-04-01\",\n            \"membership\": \"2030-08-31\",\n            \"percentdisc\": \"0\",\n            \"business\": \"Mac 25 Enterprise 12\",\n            \"blocked\": \"\",\n            \"branch\": \"1\",\n            \"tags\": \"\",\n            \"birthmonthday\": \"0912\",\n            \"timestamp\": \"2026-04-01 11:48:47\"\n        }\n    ],\n    \"total\": 6,\n    \"page\": 1,\n    \"limit\": 50,\n    \"pages\": 1,\n    \"sql\": \"SELECT id, name, phone, email, address, poscode, account, ic, membershipnumber,\\n        points, pointsvalid, membership, percentdisc, business, blocked, branch, tags, birthmonthday, timestamp\\n        FROM profile WHERE 1 AND (name LIKE ? OR phone LIKE ? OR email LIKE ? OR ic LIKE ? OR membershipnumber LIKE ? OR business LIKE ?) ORDER BY id DESC LIMIT 50 OFFSET 0\",\n    \"params\": [\n        \"%019391%\",\n        \"%019391%\",\n        \"%019391%\",\n        \"%019391%\",\n        \"%019391%\",\n        \"%019391%\"\n    ]\n}"}],"_postman_id":"26543324-6808-430f-af87-48aeff166f9a"},{"name":"Create / Upsert Customer","id":"e3d441ce-8774-433e-881f-d60603b27f9d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"Ahmad Bin Ismail\", // Trimmed server-side.\r\n  \"phone\": \"+6012-345 6789\", // Logic: Server strips all non-numeric characters to \"60123456789\". Server checks if phone number already exists, and update the profile if so.\r\n  \"email\": \"ahmad.ismail@email.com\",\r\n  \"address\": \"No. 25, Jalan Sultan Ismail, Bukit Bintang\",\r\n  \"postcode\": \"50250\", // Priority key for postal code.\r\n  \"account\": \"Sales\", // General account classification.\r\n  \"branch\": \"KL-01\",   // Used only if the server-side $branch variable is empty.\r\n  \"ic\": \"870101-14-5555\", // Identification Card number.\r\n  \"membershipnumber\": \"W25-99821\",\r\n  \"business\": \"Ismail & Sons Enterprise\", // Business Name\r\n  \"tags\": \"VIP, Wholesale\",\r\n  \"percentdisc\": 10.5, // Cast to float; represents the percentage discount (e.g., 10.5%).\r\n  \"membership\": \"Platinum\",\r\n  \"birthmonthday\": \"09-17\", // Stored as a string (likely MM-DD or DD-MM).\r\n  \"autowhatsapp\": \"1\", // Logic: Not cast, usually treated as \"1\" or \"0\" for notifications.\r\n  \"TIN\": \"C2580102030\", // Tax Identification Number (Required for e-Invoicing).\r\n  \"id_type\": \"NRIC\", // Type of ID (e.g., NRIC, PASSPORT, BRN).\r\n  \"statecode\": \"14\", // LHDN/State numeric code (e.g., 14 for Kuala Lumpur).\r\n  \"countrycode\": \"MYS\", // ISO Country Code.\r\n  \"cityname\": \"Kuala Lumpur\"\r\n}\r\n\r\n//All parameters are optional except for name, and phone number","options":{"raw":{"language":"json"}}},"url":"/api/v1/customers.php","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}},"urlObject":{"path":["api","v1","customers.php"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"9877f3df-51d9-4e13-8439-57ac64ac8509","name":"Basic Customer Creation","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"Ahmad Bin Ismail\", \r\n  \"phone\": \"+6012-345 6789\", \r\n  \"email\": \"ahmad.ismail@email.com\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"/api/v1/customers.php"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx"},{"key":"Date","value":"Fri, 03 Apr 2026 08:19:40 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"PHP/8.2.30"},{"key":"X-Powered-By","value":"PleskLin"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"Referrer-Policy","value":"strict-origin-when-cross-origin"},{"key":"Permissions-Policy","value":"geolocation=(self), microphone=(self), camera=(self)"},{"key":"Cache-Control","value":"max-age=2592000"},{"key":"Expires","value":"Sun, 03 May 2026 08:19:40 GMT"},{"key":"Content-Encoding","value":"br"}],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\n    \"success\": true,\n    \"id\": 128,\n    \"upserted\": \"created\"\n}"}],"_postman_id":"e3d441ce-8774-433e-881f-d60603b27f9d"},{"name":"Create Additional Address","id":"e652328d-4f4c-4ada-b32d-135c6e67241f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n  \"action\": \"add_address\", // Required: Must match exactly to trigger this block.\r\n  \"profileid\": 1001,       // Required: The ID of the existing customer profile.\r\n  \r\n  // --- Address Details ---\r\n  \"name\": \"HQ Office\",     // Required: Acts as 'shortname'. Fallback is 'shortname'.\r\n  \"shortname\": \"HQ Office\", // Fallback for 'name' if 'name' is missing.\r\n  \"contactperson\": \"Nik\",  // Optional: Defaults to the 'name' value if omitted.\r\n  \"phone\": \"012-345 6789\", // Logic: Cleaned to digits only (\"0123456789\") server-side.\r\n  \"address\": \"Level 25, Menara Tech, 50450 KL\", \r\n  \"postcode\": \"50450\",     // Priority key for postal code.\r\n  \r\n  // --- Metadata & Categorization ---\r\n  \"email\": \"hq@business.com\",\r\n  \"account\": \"Corporate\",  // Associated pricing account type for this specific address.\r\n  \"tags\": \"billing, primary\", // Comma-separated tags for filtering.\r\n  \"type\": \"Work\"           // Label for the address type (e.g., Home, Work, Billing).\r\n}","options":{"raw":{"language":"json"}}},"url":"/api/v1/customers.php","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}},"urlObject":{"path":["api","v1","customers.php"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"b20ed5d6-ad6c-4517-a902-173e707f21f9","name":"Create Additional Address","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n  \"action\": \"add_address\", // Required: Must match exactly to trigger this block.\r\n  \"profileid\": 1001,       // Required: The ID of the existing customer profile.\r\n  \r\n  // --- Address Details ---\r\n  \"name\": \"HQ Office\",     // Required: Acts as 'shortname'. Fallback is 'shortname'.\r\n  \"shortname\": \"HQ Office\", // Fallback for 'name' if 'name' is missing.\r\n  \"contactperson\": \"Nik\",  // Optional: Defaults to the 'name' value if omitted.\r\n  \"phone\": \"012-345 6789\", // Logic: Cleaned to digits only (\"0123456789\") server-side.\r\n  \"address\": \"Level 25, Menara Tech, 50450 KL\", \r\n  \"postcode\": \"50450\",     // Priority key for postal code.\r\n  \r\n  // --- Metadata & Categorization ---\r\n  \"email\": \"hq@business.com\",\r\n  \"account\": \"Corporate\",  // Associated pricing account type for this specific address.\r\n  \"tags\": \"billing, primary\", // Comma-separated tags for filtering.\r\n  \"type\": \"Work\"           // Label for the address type (e.g., Home, Work, Billing).\r\n}","options":{"raw":{"language":"json"}}},"url":"/api/v1/customers.php"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"e652328d-4f4c-4ada-b32d-135c6e67241f"},{"name":"Update Customer","id":"85ba24b7-3aab-4329-83ed-7fe3b17f4e97","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n  \"id\": 1001, // Required: The ID of the customer to update.\r\n\r\n  // --- Identity & Contact ---\r\n  \"name\": \"Nik Hazwan\", \r\n  \"phone\": \"+6012-345 6789\", // Will be cleaned to \"60123456789\" by the server.\r\n  \"email\": \"nik@works25.com\",\r\n  \"ic\": \"870101-14-5555\",\r\n  \"id_type\": \"NRIC\", // Options typically: NRIC, PASSPORT, BRN.\r\n\r\n  // --- Address & e-Invoicing ---\r\n  \"address\": \"No. 25, Jalan Technology\",\r\n  \"postcode\": \"47810\", // Priority key: if both 'postcode' and 'poscode' are sent, this is used.\r\n  \"cityname\": \"Petaling Jaya\",\r\n  \"statecode\": \"10\",   // LHDN State Code (e.g., 10 for Selangor).\r\n  \"countrycode\": \"MYS\", \r\n  \"TIN\": \"C2580102030\", // Tax Identification Number.\r\n\r\n  // --- Business & Membership ---\r\n  \"business\": \"Works25 Tech\",\r\n  \"membershipnumber\": \"W25-VIP-001\",\r\n  \"membership\": \"2026-12-31\", // Date of membership expiry\r\n  \"percentdisc\": 15.0, // Floating point discount percentage.\r\n  \"birthmonthday\": \"0917\",\r\n  \"introducer\": \"Agent_007\",\r\n  \"tags\": \"priority,corporate\",\r\n\r\n  // --- System & Preferences ---\r\n  \"account\": \"Credit\",\r\n  \"branch\": 1,\r\n  \"autowhatsapp\": 1, // Enable/Disable automated WhatsApp notifications.\r\n  \"blocked\": \"order\" // \"order\" or \"blockoncreditlimit\"\r\n}","options":{"raw":{"language":"json"}}},"url":"/api/v1/customers.php","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}},"urlObject":{"path":["api","v1","customers.php"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"f26128da-3e4c-4ae6-9db5-c98f96a550f2","name":"Update Customer","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n  \"id\": 128, // Required: The ID of the customer to update.\r\n\r\n  // --- Identity & Contact ---\r\n  \"phone\": \"+6013-345 6789\", // Will be cleaned to \"60123456789\" by the server.\r\n  \"email\": \"nik@works25.com\",\r\n  \"ic\": \"870101-14-5555\",\r\n  \"id_type\": \"NRIC\", // Options typically: NRIC, PASSPORT, BRN.\r\n\r\n  // --- Address & e-Invoicing ---\r\n  \"address\": \"No. 25, Jalan Technology\",\r\n  \"postcode\": \"47810\", // Priority key: if both 'postcode' and 'poscode' are sent, this is used.\r\n  \"cityname\": \"Petaling Jaya\",\r\n  \"statecode\": \"10\",   // LHDN State Code (e.g., 10 for Selangor).\r\n  \"countrycode\": \"MYS\", \r\n  \"TIN\": \"C2580102030\", // Tax Identification Number.\r\n  \"business\": \"Works25 Tech\",\r\n  \"percentdisc\": 15.0 // Floating point discount percentage.\r\n\r\n}","options":{"raw":{"language":"json"}}},"url":"/api/v1/customers.php"},"_postman_previewlanguage":"","header":[],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":""}],"_postman_id":"85ba24b7-3aab-4329-83ed-7fe3b17f4e97"},{"name":"Block Customer","id":"4ec42ee9-0e77-4d6a-b650-4adb2eb55529","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"/api/v1/customers.php?id=1947","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}},"urlObject":{"path":["api","v1","customers.php"],"host":[""],"query":[{"key":"id","value":"1947"}],"variable":[]}},"response":[{"id":"e257f156-0bf3-4fc3-9616-f65988bb03e2","name":"Block a Customer from new order","originalRequest":{"method":"DELETE","header":[{"key":"Content-Type","value":"application/json"},{"key":"X-API-Key","value":"<API Key>","description":"Added as a part of security scheme: apikey"}],"body":{"mode":"raw","raw":"{\n  \"id\": 8584\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"/api/v1/customers.php?id=128","host":[""],"path":["api","v1","customers.php"],"query":[{"key":"id","value":"128"}]}},"status":"OK","code":200,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"4ec42ee9-0e77-4d6a-b650-4adb2eb55529"}],"id":"411b627d-d0d9-4284-ba46-1329f308592b","_postman_id":"411b627d-d0d9-4284-ba46-1329f308592b","description":"","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}}},{"name":"jobs.php","item":[{"name":"Retrieve Jobs at a Station","id":"245acd95-b1ed-44c1-a612-273d83b2a2ae","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"/api/v1/jobs.php?query=station&category=Dry Clean&item=Baju Melayu&process=Keringkan&period=current&status=Received&sort=desc","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}},"urlObject":{"path":["api","v1","jobs.php"],"host":[""],"query":[{"key":"query","value":"station"},{"key":"category","value":"Dry Clean"},{"key":"item","value":"Baju Melayu"},{"key":"process","value":"Keringkan"},{"description":{"content":"<p>Order Date: current, todaysbill, todaysdue, future</p>\n","type":"text/plain"},"key":"period","value":"current"},{"description":{"content":"<p>Order Status: ReceivedorDone, Done, Received</p>\n","type":"text/plain"},"key":"status","value":"Received"},{"description":{"content":"<p>desc or asc</p>\n","type":"text/plain"},"key":"sort","value":"desc"}],"variable":[]}},"response":[{"id":"7fdb03f7-7027-4f83-bd08-85fba8fecce1","name":"Retrieve Jobs at a Station","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":{"raw":"/api/v1/jobs.php?query=station&category=Dry Clean&period=current&status=Received&sort=desc","host":[""],"path":["api","v1","jobs.php"],"query":[{"key":"query","value":"station","description":"Mandatory"},{"key":"category","value":"Dry Clean"},{"key":"item","value":"Baju Melayu","disabled":true},{"key":"process","value":"Keringkan","disabled":true},{"key":"period","value":"current","description":"Order Date: current, todaysbill, todaysdue, future"},{"key":"status","value":"Received","description":"Order Status: ReceivedorDone, Done, Received"},{"key":"sort","value":"desc","description":"desc or asc"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx"},{"key":"Date","value":"Fri, 03 Apr 2026 08:24:38 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"PHP/8.2.30"},{"key":"X-Powered-By","value":"PleskLin"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"Referrer-Policy","value":"strict-origin-when-cross-origin"},{"key":"Permissions-Policy","value":"geolocation=(self), microphone=(self), camera=(self)"},{"key":"Cache-Control","value":"max-age=2592000"},{"key":"Expires","value":"Sun, 03 May 2026 08:24:38 GMT"},{"key":"Content-Encoding","value":"br"}],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\n    \"count\": 2,\n    \"data\": [\n        {\n            \"delivery\": \"No\",\n            \"reference\": \"\",\n            \"bilid\": \"6FAA110EC1E7\",\n            \"billnumber\": 1421,\n            \"jobnumber\": 3696,\n            \"date\": \"2026-04-03 15:53:04\",\n            \"type\": \"2 Piece Baju Melayu\",\n            \"category\": \"Dry Clean\",\n            \"size\": \"1.000\",\n            \"datesend\": \"2026-04-05 15:53:04\",\n            \"name\": \"Nik\",\n            \"phone\": \"0193913193\",\n            \"shelf\": \"\",\n            \"status\": \"Received\",\n            \"branch\": \"2\",\n            \"note\": \"Biru\",\n            \"deliverydate\": \"2026-04-05\",\n            \"deliverytime\": \"15:53:04\",\n            \"profileid\": \"0\"\n        },\n        {\n            \"delivery\": \"No\",\n            \"reference\": \"\",\n            \"bilid\": \"6FAA110EC1E7\",\n            \"billnumber\": 1421,\n            \"jobnumber\": 3697,\n            \"date\": \"2026-04-03 15:53:04\",\n            \"type\": \"2 Piece Baju Kurung\",\n            \"category\": \"Dry Clean\",\n            \"size\": \"5.000\",\n            \"datesend\": \"2026-04-05 15:53:04\",\n            \"name\": \"Nik\",\n            \"phone\": \"0193913193\",\n            \"shelf\": \"\",\n            \"status\": \"Received\",\n            \"branch\": \"2\",\n            \"note\": \"Hitam\",\n            \"deliverydate\": \"2026-04-05\",\n            \"deliverytime\": \"15:53:04\",\n            \"profileid\": \"0\"\n        }\n    ]\n}"}],"_postman_id":"245acd95-b1ed-44c1-a612-273d83b2a2ae"},{"name":"Retrieve images of an Order","id":"583ebf22-bdb7-4ad5-a62b-3a50e3614e3d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"/api/v1/jobs.php?query=images&bilid=M679FUY","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}},"urlObject":{"path":["api","v1","jobs.php"],"host":[""],"query":[{"description":{"content":"<p>images</p>\n","type":"text/plain"},"key":"query","value":"images"},{"description":{"content":"<p>the order unique identifier</p>\n","type":"text/plain"},"key":"bilid","value":"M679FUY"}],"variable":[]}},"response":[{"id":"9d3d656b-c675-4c8d-a42a-56cea2e3cf0d","name":"Retrieve images of an Order","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":{"raw":"/api/v1/jobs.php?query=images&bilid=M679FUY","host":[""],"path":["api","v1","jobs.php"],"query":[{"key":"query","value":"images","description":"images"},{"key":"bilid","value":"M679FUY","description":"the order unique identifier"}]}},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"583ebf22-bdb7-4ad5-a62b-3a50e3614e3d"},{"name":"Upload Image to job","id":"dc3d8987-aec9-4573-a8f5-495580259a2c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n  \"orderlist_id\": 450, // Required: The specific job/item ID from the orderlist table.\r\n  \"imageurl\": \"https://storage.works25.com/uploads/orders/img_8821.jpg\", // Required: The link to the hosted image.\r\n  \"note\": \"Customer mentioned slight discoloration on the left sleeve.\", // Optional: Description or staff notes.\r\n  \"igroup\": \"UIHG78\", // Optional: Unique identifier for the image group. Create your own, or leave blank.\r\n  \"fromgallery\": 0 // Optional: 0 for direct camera capture, 1 for upload from device gallery.\r\n}","options":{"raw":{"language":"json"}}},"url":"/api/v1/jobs.php?query=images","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}},"urlObject":{"path":["api","v1","jobs.php"],"host":[""],"query":[{"key":"query","value":"images"}],"variable":[]}},"response":[{"id":"a2d61c2b-f40d-4fdb-9336-f64cc4febc00","name":"Upload Image to job","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n  \"orderlist_id\": 450, // Required: The specific job/item ID from the orderlist table.\r\n  \"imageurl\": \"https://storage.works25.com/uploads/orders/img_8821.jpg\", // Required: The link to the hosted image.\r\n  \"note\": \"Customer mentioned slight discoloration on the left sleeve.\", // Optional: Description or staff notes.\r\n  \"igroup\": \"UIHG78\", // Optional: Unique identifier for the image group. Create your own, or leave blank.\r\n  \"fromgallery\": 0 // Optional: 0 for direct camera capture, 1 for upload from device gallery.\r\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"/api/v1/jobs.php?query=images","host":[""],"path":["api","v1","jobs.php"],"query":[{"key":"query","value":"images"}]}},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"dc3d8987-aec9-4573-a8f5-495580259a2c"},{"name":"Change Job current process or location","id":"ea8e1f72-351a-4d06-b1d5-19cf0411422b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n  \"orderlist_id\": 5566,   // Required: The unique ID of the specific job item.\r\n  \"status\": \"Returned\",   // The current process or location of the item or job.\r\n  \"staff\": \"Nik Hazwan\",  // Optional: The staff member (username) performing the task.\r\n  \"note\": \"Slight ink stain, customer requested re-wash.\", // Optional: Updates item notes.\r\n  \r\n  // --- Return & Refund Specifics ---\r\n  \"amount\": 1.0,          // Used if 'status' is 'Returned'. If < original size, creates a split/clone.\r\n  \"percent\": 100.0        // Refund percentage (default 100). Impacts transaction calculations.\r\n}","options":{"raw":{"language":"json"}}},"url":"/api/v1/jobs.php","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}},"urlObject":{"path":["api","v1","jobs.php"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"9722a1b4-7dd0-4aaf-be6e-911dc1d23064","name":"Record A Returned Item","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n  \"orderlist_id\": 5566,   // Required: The unique ID of the specific job item.\r\n  \"status\": \"Returned\",   // The current process or location of the item or job.\r\n  \"staff\": \"Nik Hazwan\",  // Optional: The staff member (username) performing the task.\r\n  \"note\": \"Slight ink stain, customer requested re-wash.\", // Optional: Updates item notes.\r\n  \r\n  // --- Return & Refund Specifics ---\r\n  \"amount\": 1.0,          // Used if 'status' is 'Returned'. If < original size, creates a split/clone.\r\n  \"percent\": 100.0        // Refund percentage (default 100). Impacts transaction calculations.\r\n}\r\n\r\n// Should be used only if the bill status is Delivered","options":{"raw":{"language":"json"}}},"url":"/api/v1/jobs.php"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null},{"id":"b1881661-4929-43f8-bbdc-98cb9dc4bcc4","name":"Update Item or Job Status","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n  \"orderlist_id\": 5566, // Mandatory\r\n  \"status\": \"Drying\", // Mandatory\r\n  \"staff\": \"Staff_A\" // Optional\r\n}","options":{"raw":{"language":"json"}}},"url":"/api/v1/jobs.php"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"ea8e1f72-351a-4d06-b1d5-19cf0411422b"},{"name":"Delete Captured Image","id":"6a84c182-e9c6-418a-847c-c6a13b4782d4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"/api/v1/jobs.php?query=images&imageid=1947","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}},"urlObject":{"path":["api","v1","jobs.php"],"host":[""],"query":[{"key":"query","value":"images"},{"key":"imageid","value":"1947"}],"variable":[]}},"response":[{"id":"d2267c1e-99c6-4e4f-b9f6-adf86a569837","name":"Delete an Image","originalRequest":{"method":"DELETE","header":[{"key":"Content-Type","value":"application/json"},{"key":"X-API-Key","value":"<API Key>","description":"Added as a part of security scheme: apikey"}],"body":{"mode":"raw","raw":"{\n  \"imageid\": 3228\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"/api/v1/jobs.php?query=images&imageid=1947","host":[""],"path":["api","v1","jobs.php"],"query":[{"key":"query","value":"images"},{"key":"imageid","value":"1947"}]}},"status":"OK","code":200,"_postman_previewlanguage":"text","header":[],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"6a84c182-e9c6-418a-847c-c6a13b4782d4"}],"id":"1f5f3da0-24e6-4fa9-984f-a73da7713f08","_postman_id":"1f5f3da0-24e6-4fa9-984f-a73da7713f08","description":"","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}}}],"id":"b357455d-038b-46c2-ae7c-36082a5d1aa7","description":"<h1 id=\"works25-api-specification-v1\">Works25 API Specification (v1)</h1>\n<p>This document outlines the exposed REST endpoints for the Works25 POS System. The API is designed to proxy native web engine behaviors securely, guaranteeing identical validation sequences for schedules, stock controls, and ledger translations.</p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>Every request must be authenticated via headers using a system-issued API Key. IP-restrictions and request logging are actively enforced:</p>\n<p><code>X-API-Key:</code></p>\n<p>Get API Key from Settings &gt; Integration &gt; API Keys</p>\n<p><em>(Alternative:</em> <code>_Authorization: Bearer_</code> <em>is also supported)</em></p>\n<hr />\n<h2 id=\"orders-apiv1ordersphp\">Orders (<code>/api/v1/orders.php</code>)</h2>\n<h3 id=\"create-order\">Create Order</h3>\n<p><strong><code>POST /api/v1/orders.php</code></strong></p>\n<p>Creates a complete order. This API executes as a pure proxy to the internal web engines—packages will automatically unroll into sub-components, recurring parameters dynamically clone records into the future, and customer details will intelligently merge or initialize.</p>\n<p><em>(Note: Payment is strictly separated from order creation and must be posted on the Checkout endpoint).</em></p>\n<h4 id=\"1-main-json-payload\">1. Main JSON Payload</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Requirement</th>\n<th>Default</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>customer_id</code></td>\n<td>integer</td>\n<td>Optional</td>\n<td><code>0</code> (Guest)</td>\n<td>Links to <code>profile.id</code>. The API natively compares supplied <code>name</code>, <code>phone</code>, <code>address</code>, and <code>postcode</code> payloads against the registered profile. Any mismatch instantly generates a preserved <code>profileaddress</code> alias.</td>\n</tr>\n<tr>\n<td><code>name</code></td>\n<td>string</td>\n<td>Conditional</td>\n<td><code>\"\"</code></td>\n<td>Consumer / Ordering Party name. <em>(Required if constructing a new</em> <code>_profileaddress_</code> <em>without a master profile)</em></td>\n</tr>\n<tr>\n<td><code>phone</code></td>\n<td>string</td>\n<td>Optional</td>\n<td><code>\"\"</code></td>\n<td>Consumer / Ordering Party contact.</td>\n</tr>\n<tr>\n<td><code>address</code></td>\n<td>string</td>\n<td>Optional</td>\n<td><code>\"\"</code></td>\n<td>Primary billing / delivery string.</td>\n</tr>\n<tr>\n<td><code>postcode</code></td>\n<td>string</td>\n<td>Optional</td>\n<td><code>\"\"</code></td>\n<td>Delivery area code natively parsed for routing.</td>\n</tr>\n<tr>\n<td><code>acc</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Auto-Evaluated</td>\n<td>Revenue Catalog Account. If totally omitted, the API iterates through <code>$items[0]</code> to safely resolve a generalized pricing branch / customer-linked target <code>$account</code> constraint.</td>\n</tr>\n<tr>\n<td><code>date</code></td>\n<td>string</td>\n<td>Optional</td>\n<td><code>Now</code></td>\n<td>Expected syntax <code>Y-m-d H:i:s</code>. Overrides the baseline checkout timestamp.</td>\n</tr>\n<tr>\n<td><code>type</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>System Default</td>\n<td>Set explicitly to <code>\"D.O.\"</code> or <code>\"S.O.\"</code> to categorize as a pro-forma or draft order. Doing so actively prevents Account Receivable <code>transaction</code> ledgers from being generated upfront.</td>\n</tr>\n<tr>\n<td><code>isdo</code></td>\n<td>boolean</td>\n<td>Optional</td>\n<td><code>false</code></td>\n<td>Native shorthand equivalent to explicitly establishing <code>type</code> as <code>\"D.O.\"</code>.</td>\n</tr>\n<tr>\n<td><code>delivery</code></td>\n<td>string</td>\n<td>Optional</td>\n<td><code>\"No\"</code></td>\n<td>Shipping/Handling classification map (\"<code>Yes</code>\" or \"<code>No</code>\"). Stored into native <code>.delivery</code> field on the record block.</td>\n</tr>\n<tr>\n<td><code>reference</code></td>\n<td>string</td>\n<td>Optional</td>\n<td><code>\"\"</code></td>\n<td>Used to store external links, transaction references, or external database ID maps.</td>\n</tr>\n<tr>\n<td><code>comments</code></td>\n<td>string</td>\n<td>Optional</td>\n<td><code>\"\"</code></td>\n<td>Comments Or Notes. Prints natively beneath internal receipts and billings.</td>\n</tr>\n<tr>\n<td><code>tags</code></td>\n<td>string</td>\n<td>Optional</td>\n<td><code>\"\"</code></td>\n<td>Order routing classification tags globally accessible.</td>\n</tr>\n<tr>\n<td><code>promocode</code></td>\n<td>string</td>\n<td>Optional</td>\n<td><code>\"\"</code></td>\n<td>Marketing metric link tracking parameters.</td>\n</tr>\n<tr>\n<td><code>apply_rounding</code></td>\n<td>boolean</td>\n<td>Optional</td>\n<td><code>true</code></td>\n<td>Enables native 5-cent rounding mathematics evaluated onto the invoice final block.</td>\n</tr>\n<tr>\n<td><code>discper</code></td>\n<td>float</td>\n<td>Optional</td>\n<td><code>0</code></td>\n<td>Global cart percentage discount. Providing <code>0</code> natively polls the backend <code>profile</code> metrics for generalized member percentages.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"2-repeating-scheduled-orders-recurring-billing\">2. Repeating Scheduled Orders (Recurring Billing)</h4>\n<p>Passing the <code>recur</code> structure natively replicates the order outwards recursively across the database spanning parallel clones for <code>dueandcharges</code>, <code>orderlists</code>, <code>jobsdone</code>, <code>subscriptions</code> arrays identically mirroring system scheduling logic.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Requirement</th>\n<th>Example</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>recur</code></td>\n<td>string</td>\n<td>Optional</td>\n<td><code>\"monthly\"</code></td>\n<td>Core repeating interval schedule <code>daily</code>, <code>weekly</code>, <code>monthly</code>, <code>yearly</code></td>\n</tr>\n<tr>\n<td><code>recurcount</code></td>\n<td>integer</td>\n<td>Conditional</td>\n<td><code>6</code></td>\n<td>Amount of copies generated iteratively into the future. <em>(Required if</em> <code>_recur_</code> <em>is provided)</em></td>\n</tr>\n<tr>\n<td><code>recurfrom</code></td>\n<td>date</td>\n<td>Optional</td>\n<td><code>\"YYYY-MM-DD\"</code></td>\n<td>Baseline start date resolving sequences</td>\n</tr>\n<tr>\n<td><code>recurevery</code></td>\n<td>integer</td>\n<td>Optional</td>\n<td><code>1</code></td>\n<td>Step interval parameter modifier (e.g., Every <em>2</em> Weeks)</td>\n</tr>\n<tr>\n<td><code>monthStep</code></td>\n<td>string</td>\n<td>Optional</td>\n<td><code>\"first\"</code></td>\n<td>Resolvable text scheduling modifiers (<code>first</code>, <code>last</code>)</td>\n</tr>\n<tr>\n<td><code>weekDay</code></td>\n<td>string</td>\n<td>Optional</td>\n<td><code>\"Monday\"</code></td>\n<td>Text scheduling offset target</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"3-inserting-items-items\">3. Inserting Items: <code>items[]</code></h4>\n<p>The items array accepts highly granular component bounds perfectly aligning to the web store's configuration constraints (e.g., <code>oncealife</code>, <code>goodmove</code> proxy evaluation, Package Extraction hooks).</p>\n<p><strong>Basic Item Example:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"priceid\": 12,\n  \"qty\": 2.5,\n  \"startDateTime\": \"2026-03-25T14:00\",\n  \"assignedstaff\": [\"John\", \"Jane\"]\n}\n\n</code></pre>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Requirement</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>qty</code> / <code>size</code></td>\n<td>float</td>\n<td><strong>Mandatory</strong></td>\n<td>The quantity mapping for calculation multipliers. Must be <code>&gt; 0</code>.</td>\n</tr>\n<tr>\n<td><code>priceid</code></td>\n<td>integer</td>\n<td>Conditional</td>\n<td>Item Catalog Identifier bridging constraints (period, bounds, discount rates, points, subscriptions, subitem structures) dynamically inherited directly from <code>price</code> table. <em>(Required unless bypassing system catalog via generic payload overrides)</em></td>\n</tr>\n<tr>\n<td><code>type</code></td>\n<td>string</td>\n<td>Conditional</td>\n<td>Overrides the categorized classification structure natively inherited. <em>(Mandatory if bypassing</em> <code>_priceid_</code><em>)</em></td>\n</tr>\n<tr>\n<td><code>category</code></td>\n<td>string</td>\n<td>Conditional</td>\n<td>Overrides the categorized taxonomy structure. <em>(Mandatory if bypassing</em> <code>_priceid_</code><em>)</em></td>\n</tr>\n<tr>\n<td><code>price</code></td>\n<td>float</td>\n<td>Conditional</td>\n<td>Total price for the item line. Not unit price. Overrides the baseline selling cost string calculation dynamically. <em>(Mandatory if bypassing</em> <code>_priceid_</code><em>)</em></td>\n</tr>\n<tr>\n<td><code>taxpercent</code></td>\n<td>float</td>\n<td>Optional</td>\n<td>Explicitly maps tax allocations, in %.</td>\n</tr>\n<tr>\n<td><code>note</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Descriptive instruction. Also evaluates into <code>\"useNoteAsIdentifier\"</code> natively over subscriptions tracking.</td>\n</tr>\n<tr>\n<td><code>useNoteAsIdentifier</code></td>\n<td>boolean</td>\n<td>Optional</td>\n<td>Actively casts the <code>$note</code> payload as the <code>subscriptions</code> identifier alias mapped to subscriptions generated from <code>priceid</code> mapping traits.</td>\n</tr>\n<tr>\n<td><code>startDateTime</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Initializes a native <code>rentalbooking</code> transaction blocking out resource booking bounds explicitly resolving starting points. <code>(Y-m-d H:i)</code></td>\n</tr>\n<tr>\n<td><code>endDateTime</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Finishes the bounds initialization on <code>rentalbooking</code> records. Closes workflow endpoints within <code>jobsdone</code>. <code>(Y-m-d H:i)</code></td>\n</tr>\n<tr>\n<td><code>pickupdatetime</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Hard override mapping explicitly the sequence boundary for item delivery dispatch target bypassing native business-hours <code>datesend</code> calculations. <code>(Y-m-d H:i)</code></td>\n</tr>\n<tr>\n<td><code>assignedstaff</code></td>\n<td>array</td>\n<td>Optional</td>\n<td>Generates internal allocations mapping explicitly linked workers / operators down into the <code>jobsdone</code> queue corresponding precisely to the mapped shelf / active process.</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Example Standard API Delivery Order</strong></p>\n<p>This example bypasses transaction creation as it categorizes functionally as a drafted D.O. while enforcing a subscription parameter binding utilizing the <code>$note</code>.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"customer_id\": 2045,\n    \"phone\": \"0123456789\",\n    \"name\": \"Jane Tester\",\n    \"type\": \"D.O.\",\n    \"isdo\": true,\n    \"apply_rounding\": true,\n    \"items\": [\n        {\n            \"priceid\": 240,\n            \"qty\": 1,\n            \"note\": \"JaneT-Sub-Mar\",\n            \"useNoteAsIdentifier\": true,\n            \"assignedstaff\": [\"AgentSmith\"]\n        }\n    ]\n}\n\n</code></pre>\n<h4 id=\"json-response-handlers\">JSON Response Handlers</h4>\n<p>If verification succeeds bypassing <code>oncealife</code> bounds, system pricing parameters, and business schedules, it evaluates identically formatted database returns.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"success\": true,\n    \"id\": 105992,\n    \"bilid\": \"O_D1B3X91S\",\n    \"sumprice\": 105.00,\n    \"tax\": 2.10,\n    \"rounding\": 0.05,\n    \"items\": [\n        {\n            \"id\": 1284,\n            \"type\": \"Rental\",\n            \"category\": \"Equipment\",\n            \"qty\": 1,\n            \"price\": 105.00,\n            \"taxpercent\": 2\n        }\n    ]\n}\n\n</code></pre>\n<h3 id=\"get-orders-list\">Get Orders (List)</h3>\n<p><strong><code>GET /api/v1/orders.php</code></strong></p>\n<p>Returns a paginated list of orders mirroring the internal status dashboard query. Joins <code>dueandcharge</code>, <code>company</code>, and <code>profile</code> tables for enriched data.</p>\n<h4 id=\"query-parameters\">Query Parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Requirement</th>\n<th>Default</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>date_from</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>—</td>\n<td>Filter start date <code>(YYYY-MM-DD)</code>.</td>\n</tr>\n<tr>\n<td><code>date_to</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>—</td>\n<td>Filter end date <code>(YYYY-MM-DD)</code>. Automatically appends <code>23:59:59</code>.</td>\n</tr>\n<tr>\n<td><code>status</code></td>\n<td>string</td>\n<td>Optional</td>\n<td><code>all</code></td>\n<td><code>received</code>, <code>done</code>, <code>delivered</code>, <code>pending</code>, <code>voided</code>, <code>undelivered</code>, <code>unvoided</code>, <code>done or delivered</code>, <code>all</code>.</td>\n</tr>\n<tr>\n<td><code>unpaid</code></td>\n<td>string</td>\n<td>Optional</td>\n<td><code>all</code></td>\n<td><code>due</code> (outstanding &gt; 0.01), <code>paid</code> (outstanding ≤ 0.01), or omit for all.</td>\n</tr>\n<tr>\n<td><code>type</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>—</td>\n<td><code>D.O.</code>, <code>S.O.</code>, or <code>Invoice</code> or <code>\"\"</code> for general orders.</td>\n</tr>\n<tr>\n<td><code>profileid</code></td>\n<td>integer</td>\n<td>Optional</td>\n<td>—</td>\n<td>Filter by customer profile ID.</td>\n</tr>\n<tr>\n<td><code>page</code></td>\n<td>integer</td>\n<td>Optional</td>\n<td><code>1</code></td>\n<td>Page number for pagination.</td>\n</tr>\n<tr>\n<td><code>limit</code></td>\n<td>integer</td>\n<td>Optional</td>\n<td><code>50</code></td>\n<td>Records per page (max <code>200</code>).</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"response\">Response</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": [\n        {\n            \"id\": 105992,\n            \"bilid\": \"O_D1B3X91S\",\n            \"name\": \"Jane Tester\",\n            \"phone\": \"60123456789\",\n            \"date\": \"2026-03-29 10:00:00\",\n            \"status\": \"Received\",\n            \"due\": 105.00,\n            \"charge\": 105.00,\n            \"delivery\": \"Yes\",\n            \"deliveryaddress\": \"123 Main St\",\n            \"deliverypostcode\": \"50000\",\n            \"deliverydate\": \"\",\n            \"deliverytime\": \"\",\n            \"profileid\": 2045,\n            \"reference\": \"\",\n            \"discper\": 0,\n            \"type\": \"\",\n            \"accept\": \"admin\",\n            \"staff\": \"\",\n            \"promocode\": \"\",\n            \"account\": \"Sales\",\n            \"tags\": \"\",\n            \"pickupdate\": \"\",\n            \"branch\": \"1\",\n            \"branchinitial\": \"HQ\",\n            \"business\": \"\"\n        }\n    ],\n    \"total\": 1284,\n    \"page\": 1,\n    \"limit\": 50,\n    \"pages\": 26\n}\n\n</code></pre>\n<hr />\n<h3 id=\"get-order-detail\">Get Order Detail</h3>\n<p><strong><code>GET /api/v1/orders.php?bilid=</code></strong></p>\n<p>Returns a single order with full record fields, nested line items (with package subitems), jobsdone assignments, and subscriptions.</p>\n<h4 id=\"query-parameters-1\">Query Parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Requirement</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>bilid</code></td>\n<td>string</td>\n<td><strong>Mandatory</strong></td>\n<td>The unique system bill identifier.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"response-structure\">Response Structure</h4>\n<p>The response includes all <code>record</code> fields plus:</p>\n<ul>\n<li><p><code>due</code> / <code>charge</code> — from <code>dueandcharge</code> table</p>\n</li>\n<li><p><code>items[]</code> — line items ordered by <code>billorder</code>, each with a nested <code>subitems[]</code> array for package components</p>\n</li>\n<li><p><code>jobsdone[]</code> — staff process assignments with commission values</p>\n</li>\n<li><p><code>subscriptions[]</code> — active subscription mappings linked to this order</p>\n</li>\n</ul>\n<h4 id=\"response-example\">Response Example</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"bilid\": \"O_D1B3X91S\",\n    \"id\": 105992,\n    \"name\": \"Jane Tester\",\n    \"phone\": \"60123456789\",\n    \"date\": \"2026-03-29 10:00:00\",\n    \"status\": \"Received\",\n    \"sumprice\": 105.00,\n    \"tax\": 2.10,\n    \"rounding\": 0.05,\n    \"due\": 105.00,\n    \"charge\": 105.00,\n    \"delivery\": \"Yes\",\n    \"deliveryaddress\": \"123 Main St\",\n    \"deliverypostcode\": \"50000\",\n    \"items\": [\n        {\n            \"id\": 1284,\n            \"category\": \"Equipment\",\n            \"type\": \"Rental\",\n            \"size\": 1,\n            \"price\": 105.00,\n            \"note\": \"\",\n            \"shelf\": \"\",\n            \"subitems\": []\n        }\n    ],\n    \"jobsdone\": [\n        { \"orderid\": 1284, \"process\": \"Clean\", \"staff\": \"John\", \"commission\": 5.25, \"timestamp\": \"2026-03-29 10:05:00\" }\n    ],\n    \"subscriptions\": []\n}\n\n</code></pre>\n<h3 id=\"update-order\">Update Order</h3>\n<p><strong><code>PATCH /api/v1/orders.php</code></strong></p>\n<p>This endpoint acts as the central hub for safely editing an active order. Unlike raw database queries, modifying an order via this system perfectly duplicates the POS interface behavior.</p>\n<h4 id=\"payload-structure\">Payload Structure</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Requirement</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>bilid</code></td>\n<td>string</td>\n<td><strong>Mandatory</strong></td>\n<td>The unique system bill identifier assigned upon creation.</td>\n</tr>\n<tr>\n<td><code>status</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>State modifier. System natively protects constraints validating the forward sequence dynamically: <code>Received -&gt; Pending / Done</code>, <code>Pending -&gt; Done / Delivered</code>, <code>Done -&gt; Delivered</code>. Reversing sequences yields an error.</td>\n</tr>\n<tr>\n<td><code>date</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Overwrites the core global mapping sequence <code>(Y-m-d H:i:s)</code>. Modifies cascading traits (<code>transactions.date</code> / <code>subscriptions.date</code>). Enforces <code>locktransactionsbefore</code> check securely.</td>\n</tr>\n<tr>\n<td><code>accept</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Updates the administrative attendant identity mapped onto <code>record.accept</code>.</td>\n</tr>\n<tr>\n<td><code>promoter</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Updates the designated commission target mapped tracking staff string securely parsing locally onto <code>record.staff</code>.</td>\n</tr>\n<tr>\n<td><code>comments</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Edits the POS thermal printing note.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"native-state-hooks-fired-dynamically\">Native State Hooks Fired Dynamically</h4>\n<ol>\n<li><p><strong>Inventory Costs Commitments:</strong> Reaching <code>Done</code> or <code>Delivered</code> triggers the API to evaluate real-time <code>cost</code> margins resolving components actively off generic <code>Orderlist</code> staging grids placing them definitively as <code>\"Sales\"</code> lock increments affecting aggregate inventory natively!</p>\n</li>\n<li><p><strong>S.O. Consolidations:</strong> Pushing a draft Sales Order (<code>type = S.O.</code>) to <code>Done/Delivered</code> explicitly formulates total mathematical sums securely dropping its drafted <code>.type</code> string extracting definitive Accounts Receivable ledger rows dynamically mapping taxes into the system dynamically.</p>\n</li>\n<li><p><strong>Jobsdone Commissions:</strong> Empty sub-targets automatically split base bounds resolving fractions dynamically securely allocating staff balances upon transition to <code>Done</code> or <code>Delivered</code>.</p>\n</li>\n</ol>\n<h4 id=\"headless-notifications-arrays-fired\">Headless Notifications Arrays Fired</h4>\n<p>To safely mimic POS native behavior natively out of webhook interactions, updating the <code>$status</code> triggers direct integration arrays seamlessly:</p>\n<ul>\n<li><p><strong><code>Pending</code>****:</strong> Pings your Web Push systems mapping <code>\"Pending Orders\"</code>.</p>\n</li>\n<li><p><strong><code>Pending / Received / Done / Delivered</code>****:</strong> Matches your <code>company</code> templates parsing <code>[NAME]</code> and <code>[BILL-LINK]</code>, pushing customized cURL messages across the active <code>Wsapme</code> (WhatsApp) gateway integration natively targeted at the <code>profile</code> strings.</p>\n</li>\n<li><p><strong><code>Done</code>****:</strong> Validates individual customer Push Notification <code>endpoints</code>, natively pinging external App bounds confirming the target is explicitly scheduled for delivery or pickup logic!</p>\n</li>\n</ul>\n<hr />\n<h3 id=\"void-order\">Void Order</h3>\n<p><strong><code>DELETE /api/v1/orders.php</code></strong></p>\n<p>Soft-deletes an order by setting its status to <code>Void</code>. This endpoint does <strong>not</strong> physically remove the record — it mirrors the internal void cascade used by the POS system.</p>\n<h4 id=\"payload--query\">Payload / Query</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Requirement</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>bilid</code></td>\n<td>string</td>\n<td><strong>Mandatory</strong></td>\n<td>Can be sent in JSON body or as a query parameter.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"pre-validation-guards\">Pre-Validation Guards</h4>\n<p>The API will reject the void request (<code>400 Bad Request</code>) if any of the following conditions are true:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Condition</th>\n<th>Error Message</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Order status is <code>Done</code> or <code>Delivered</code></td>\n<td>Only Received or Pending orders can be voided.</td>\n</tr>\n<tr>\n<td>Order has an <code>einv_uuid</code></td>\n<td>Cannot void an order that has an issued e-invoice.</td>\n</tr>\n<tr>\n<td>Order date ≤ <code>locktransactionsbefore</code></td>\n<td>Order date is on or before the lock date. Cannot void.</td>\n</tr>\n<tr>\n<td>Transactions are <code>checked='OK'</code> or date &lt; lock date</td>\n<td>Order has checked or locked transactions. Cannot void.</td>\n</tr>\n<tr>\n<td>Order is already <code>Void</code></td>\n<td>Order is already voided.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"void-cascade-effects\">Void Cascade Effects</h4>\n<p>Upon successful validation, the following operations execute (mirroring <code>admin/takingorder/api.php</code>):</p>\n<ol>\n<li><p>All <code>transaction</code> rows with <code>toacc</code> of <code>Receivable</code>, <code>Discount Voucher</code>, or <code>Points</code> are zeroed out.</p>\n</li>\n<li><p><code>record.status</code> is set to <code>Void</code>.</p>\n</li>\n<li><p><code>subscriptions.status</code> is set to <code>Void</code>.</p>\n</li>\n<li><p>If the order was linked to an invoice (<code>invoiceid</code>), the parent invoice is marked <code>Recalculate</code>.</p>\n</li>\n<li><p>All <code>orderlist</code> items are deleted (except <code>category = 'Administrative'</code>).</p>\n</li>\n<li><p>All <code>jobsdone</code> entries are deleted.</p>\n</li>\n<li><p>Uncommitted <code>goodmove</code> placeholders are deleted.</p>\n</li>\n<li><p>A <code>pushtotopic(\"orders\")</code> notification is fired.</p>\n</li>\n</ol>\n<h4 id=\"response-1\">Response</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{ \"success\": true, \"bilid\": \"O_D1B3X91S\", \"status\": \"Void\" }\n\n</code></pre>\n<hr />\n<h2 id=\"checkout--payments-apiv1checkoutphp\">Checkout &amp; Payments (<code>/api/v1/checkout.php</code>)</h2>\n<p><em>(Documentation forthcoming. Handles final consolidation logic and fiscal transaction ledger generation upon full capture).</em></p>\n<hr />\n<h2 id=\"payments--debtors-apiv1paymentsphp\">Payments &amp; Debtors (<code>/api/v1/payments.php</code>)</h2>\n<p>Manages the recording of independent payments against orders and the retrieval of complex centralized debtor reporting metrics mimicking core POS interactions.</p>\n<blockquote>\n<p>[!TIP] </p>\n</blockquote>\n<p><strong>Credit Overshoots:</strong> Rather than distributing explicit manual credit notes on excess payment, the system dynamically registers mathematical overshoots (where paid amount &gt; outstanding due) natively against the <code>Receivable</code> ledger tracking. These negative receivables inherently serve as valid Credits on the client profile automatically.</p>\n<h3 id=\"record-a-payment\">Record a Payment</h3>\n<p><strong><code>POST /api/v1/payments.php</code></strong></p>\n<p>Validates and accurately logs a partial or full payment transaction against an order.</p>\n<h4 id=\"payload-options\">Payload Options:</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Requirement</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>bilid</code></td>\n<td>string</td>\n<td><strong>Mandatory</strong></td>\n<td>The system order identifier.</td>\n</tr>\n<tr>\n<td><code>amount</code></td>\n<td>float</td>\n<td><strong>Mandatory</strong></td>\n<td>Absolute payment amount. Submitting an amount greater than the <code>balance_due</code> will safely map the remainder as Credits natively.</td>\n</tr>\n<tr>\n<td><code>method</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Tender method (e.g., <code>Cash</code>, <code>Maybank</code>, or <code>Credits</code>). Default: <code>Cash</code>.</td>\n</tr>\n<tr>\n<td><code>paymentreference</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>External reference, receipt numbers, or gateway codes.</td>\n</tr>\n</tbody>\n</table>\n</div><ul>\n<li><p><em>If</em> the parameter <code>method: \"Credits\"</code> is explicitly used, the backend calculates the amount algorithmically across existing valid explicit <code>creditnote</code> records tied to the user.</p>\n</li>\n<li><p>Upon reducing the order due balance <code>&lt;= 0</code>, the endpoint intelligently simulates the core UI behavior by firing a background <code>renewsubscription</code> CURL dispatch to finalize internal status/workflow dependencies effortlessly.</p>\n</li>\n</ul>\n<h4 id=\"response-output\">Response Output:</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"success\": true,\n  \"bilid\": \"O_D1B3X91S\",\n  \"paid_amount\": 100.00,\n  \"method\": \"Cash\",\n  \"balance_due\": 0,\n  \"is_paid\": true,\n  \"credited_overshoot\": 50.00\n}\n\n</code></pre>\n<hr />\n<h3 id=\"list-payments-map\">List Payments Map</h3>\n<p><strong><code>GET /api/v1/payments.php?bilid=</code></strong></p>\n<p>Returns the exact total charged, previously paid, resolving remaining balances mapped with chronological transactional arrays.</p>\n<hr />\n<h3 id=\"debtors-aging-report\">Debtors Aging Report</h3>\n<p><strong><code>GET /api/v1/payments.php?query=debtors_aging</code></strong></p>\n<p>Emulates the complex 5-month aging array algorithm originally accessible under <code>/admin/report/report_debtors.php</code>.</p>\n<h4 id=\"query-parameters-2\">Query Parameters</h4>\n<ul>\n<li><code>dateto</code>: Date limit for calculating reporting depth arrays (Default: <code>YYYY-MM-DD</code> today).</li>\n</ul>\n<h4 id=\"grouping-logic-schema-nested-node-responses\">Grouping Logic Schema (Nested Node Responses)</h4>\n<ul>\n<li><p>Evaluates strict active balances sorting the highest <code>total_balance</code> debtor to lowest.</p>\n</li>\n<li><p>Each profile array resolves <code>current</code>, <code>1_month</code>, <code>2_months</code>, <code>3_months</code>, <code>4_months</code>, and <code>5_months_plus</code> bucketized sums.</p>\n</li>\n</ul>\n<hr />\n<h2 id=\"catalog-pricing-apiv1pricephp\">Catalog Pricing (<code>/api/v1/price.php</code>)</h2>\n<p>Full CRUD interactions for point-of-sale catalog items (<code>price</code>), including complex relationships with variant selections, addons, tiered ranges, and recurring billing.</p>\n<h3 id=\"list-active-prices\">List Active Prices</h3>\n<p><strong><code>GET /api/v1/price.php</code></strong></p>\n<p>Paginated listing of non-archived catalog items.</p>\n<h4 id=\"query-parameters-3\">Query Parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Default</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>search</code></td>\n<td>string</td>\n<td>—</td>\n<td>Fuzzy search by <code>type</code>, <code>category</code>, or <code>identifier</code>.</td>\n</tr>\n<tr>\n<td><code>category</code></td>\n<td>string</td>\n<td>—</td>\n<td>Exact match filter for <code>category</code>.</td>\n</tr>\n<tr>\n<td><code>page</code></td>\n<td>integer</td>\n<td><code>1</code></td>\n<td>Page number.</td>\n</tr>\n<tr>\n<td><code>limit</code></td>\n<td>integer</td>\n<td><code>50</code></td>\n<td>Results per page (max 200).</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"get-item-detail\">Get Item Detail</h3>\n<p><strong><code>GET /api/v1/price.php?id=</code></strong></p>\n<p>Returns the core item details alongside fully resolved nested arrays for configurations.</p>\n<h4 id=\"response-structure-1\">Response Structure</h4>\n<ul>\n<li><p>Base <code>price</code> columns (<code>category</code>, <code>type</code>, <code>price</code>, <code>taxpercent</code>, <code>account</code>, <code>identifier</code>, <code>ispackage</code>, etc.)</p>\n</li>\n<li><p><code>selections[]</code>: Up to 3 objects representing choice modifiers (combines <code>pricecustom</code> and <code>pricecustomoptions</code>).</p>\n</li>\n<li><p><code>addons[]</code>: Array of optional item add-ons (<code>question</code>/<code>unitvalue</code> mapped to <code>option</code>/<code>value</code>).</p>\n</li>\n<li><p><code>ranges[]</code>: Wholesale or tiered volume pricing thresholds.</p>\n</li>\n<li><p><code>subscription</code>: An object (if configured) defining recurring billing rules (<code>type</code>, <code>period</code>, <code>value</code>, <code>automatic</code>).</p>\n</li>\n<li><p><code>rentalslots[]</code>: Operating day/time constraints.</p>\n</li>\n</ul>\n<hr />\n<h3 id=\"create-item\">Create Item</h3>\n<p><strong><code>POST /api/v1/price.php</code></strong></p>\n<p>Creates a new core item and seamlessly builds related tables based on provided arrays.</p>\n<h4 id=\"payload-schema-core\">Payload Schema (Core)</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Requirement</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>category</code></td>\n<td>string</td>\n<td><strong>Mandatory</strong></td>\n<td>Item category name.</td>\n</tr>\n<tr>\n<td><code>type</code></td>\n<td>string</td>\n<td><strong>Mandatory</strong></td>\n<td>Item name.</td>\n</tr>\n<tr>\n<td><code>price</code></td>\n<td>float</td>\n<td>Optional</td>\n<td>Base price (Default: 0).</td>\n</tr>\n<tr>\n<td><code>account</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Revenue GL account.</td>\n</tr>\n<tr>\n<td><code>identifier</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Barcode or SKU (syncs to <code>goodprice</code> automatically).</td>\n</tr>\n<tr>\n<td><code>taxpercent</code></td>\n<td>float</td>\n<td>Optional</td>\n<td>Specific tax rate for the item.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"payload-schema-nested-relationships\">Payload Schema (Nested Relationships)</h4>\n<p>Provide these arrays to automatically build constraints. All are optional.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"category\": \"Food\",\n  \"type\": \"Signature Burger\",\n  \"price\": 15.50,\n  \"selections\": [\n     {\n       \"question\": \"Choose Drink\",\n       \"multi\": 0,\n       \"options\": [\n          {\"option\": \"Coke\", \"value\": 0, \"operation\": \"Add\"},\n          {\"option\": \"Juice\", \"value\": 2.50, \"operation\": \"Add\"}\n       ]\n     }\n  ],\n  \"addons\": [\n     {\"option\": \"Extra Cheese\", \"value\": 3.00}\n  ],\n  \"ranges\": [\n     {\"startrange\": 10, \"endrange\": 50, \"price\": 14.00, \"priceperunit\": 14.00, \"period\": 0}\n  ],\n  \"subscription\": {\n     \"type\": \"Months\",\n     \"period\": 1,\n     \"value\": 25.00,\n     \"automatic\": \"Yes\"\n  },\n  \"rentalslots\": [\n     {\"day\": 8, \"start_time\": \"10:00:00\", \"end_time\": \"12:00:00\"}\n  ]\n}\n\n</code></pre>\n<hr />\n<h3 id=\"update-item\">Update Item</h3>\n<p><strong><code>PATCH /api/v1/price.php</code></strong></p>\n<p>Modifies an item. For base fields, only the provided keys are written to the database.</p>\n<blockquote>\n<p>[!WARNING] </p>\n</blockquote>\n<p><strong>Wipe and Replace Strategy:</strong> For nested relationships (<code>selections</code>, <code>addons</code>, <code>ranges</code>, <code>subscription</code>, <code>rentalslots</code>), the system ensures rigid state adherence by performing a complete wipe-and-replace. <strong>If you send the array, all existing entries of that type will be deleted and replaced with the new array.</strong> If the key is omitted from the JSON entirely, the existing rules are untouched.</p>\n<h4 id=\"payload\">Payload</h4>\n<p>Must contain <code>id</code> (integer). Accepts all fields described in the <code>POST</code> payload.</p>\n<hr />\n<h3 id=\"physically-delete-item\">Physically Delete Item</h3>\n<p><strong><code>DELETE /api/v1/price.php</code></strong></p>\n<p>Performs a raw physical cascading delete, wiping the item from <code>price</code> and all associated tables (<code>packages</code>, <code>goodprice</code>, <code>pricecustom</code>, <code>pricecustomoptions</code>, <code>pricerange</code>, <code>subscriptiontype</code>, <code>rentalslots</code>, <code>jobsprocess</code>).</p>\n<h4 id=\"payload-1\">Payload</h4>\n<p>Must contain <code>id</code> (integer) either in JSON body or <code>?id=</code> query string.</p>\n<hr />\n<h2 id=\"customers-apiv1customersphp\">Customers (<code>/api/v1/customers.php</code>)</h2>\n<h3 id=\"list-customers\">List Customers</h3>\n<p><strong><code>GET /api/v1/customers.php</code></strong></p>\n<p>Paginated customer listing with search and filter support.</p>\n<h4 id=\"query-parameters-4\">Query Parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Requirement</th>\n<th>Default</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>search</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>—</td>\n<td>Fuzzy match across <code>name</code>, <code>phone</code>, <code>email</code>, <code>ic</code>, <code>membershipnumber</code>, <code>business</code>.</td>\n</tr>\n<tr>\n<td><code>tags</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>—</td>\n<td>Filter by tag (CSV-compatible REGEXP match).</td>\n</tr>\n<tr>\n<td><code>blocked</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>—</td>\n<td>Filter: <code>Yes</code> or empty string.</td>\n</tr>\n<tr>\n<td><code>page</code></td>\n<td>integer</td>\n<td>Optional</td>\n<td><code>1</code></td>\n<td>Page number.</td>\n</tr>\n<tr>\n<td><code>limit</code></td>\n<td>integer</td>\n<td>Optional</td>\n<td><code>50</code></td>\n<td>Records per page (max <code>200</code>).</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"get-customer-detail\">Get Customer Detail</h3>\n<p><strong><code>GET /api/v1/customers.php?id=</code></strong></p>\n<p>Returns full profile including alternative addresses, outstanding balance, and active vouchers.</p>\n<h4 id=\"response-includes\">Response Includes</h4>\n<ul>\n<li><p>All <code>profile</code> fields (name, phone, email, address, IC, TIN, membership, points, etc.)</p>\n</li>\n<li><p><code>addresses[]</code> — from <code>profileaddress</code> table</p>\n</li>\n<li><p><code>outstanding</code> — calculated receivable debt</p>\n</li>\n<li><p><code>vouchervalue</code> / <code>vouchercount</code> / <code>voucherexpiry</code> — active voucher aggregation</p>\n</li>\n</ul>\n<hr />\n<h3 id=\"create--upsert-customer\">Create / Upsert Customer</h3>\n<p><strong><code>POST /api/v1/customers.php</code></strong></p>\n<p>Creates a new customer or updates an existing one matched by <code>phone</code>.</p>\n<h4 id=\"payload-2\">Payload</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Requirement</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>name</code></td>\n<td>string</td>\n<td><strong>Mandatory</strong></td>\n<td>Customer name.</td>\n</tr>\n<tr>\n<td><code>phone</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Sanitized to numerics. Used as upsert match key.</td>\n</tr>\n<tr>\n<td><code>email</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Email address.</td>\n</tr>\n<tr>\n<td><code>address</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Primary address.</td>\n</tr>\n<tr>\n<td><code>postcode</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Postal code (also accepts <code>poscode</code>).</td>\n</tr>\n<tr>\n<td><code>account</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Revenue account link.</td>\n</tr>\n<tr>\n<td><code>ic</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Identity card / passport number.</td>\n</tr>\n<tr>\n<td><code>membershipnumber</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Membership ID.</td>\n</tr>\n<tr>\n<td><code>business</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Business/company name.</td>\n</tr>\n<tr>\n<td><code>tags</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Comma-separated tags.</td>\n</tr>\n<tr>\n<td><code>percentdisc</code></td>\n<td>float</td>\n<td>Optional</td>\n<td>Default discount percentage.</td>\n</tr>\n<tr>\n<td><code>membership</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Membership tier.</td>\n</tr>\n<tr>\n<td><code>birthmonthday</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Birthday (MM-DD format).</td>\n</tr>\n<tr>\n<td><code>autowhatsapp</code></td>\n<td>tinyInt</td>\n<td>Optional</td>\n<td>WhatsApp auto-send preference. 1 or 0</td>\n</tr>\n<tr>\n<td><code>TIN</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Tax Identification Number (e-invoice).</td>\n</tr>\n<tr>\n<td><code>id_type</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>ID type for e-invoice (<code>NRIC</code>, <code>BRN</code>, etc.).</td>\n</tr>\n<tr>\n<td><code>statecode</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>State code for e-invoice.</td>\n</tr>\n<tr>\n<td><code>countrycode</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Country code for e-invoice.</td>\n</tr>\n<tr>\n<td><code>cityname</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>City name for e-invoice.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"response-2\">Response</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{ \"success\": true, \"id\": 2045, \"upserted\": \"created\" }\n\n</code></pre>\n<hr />\n<h3 id=\"update-customer\">Update Customer</h3>\n<p><strong><code>PATCH /api/v1/customers.php</code></strong></p>\n<p>Updates specific fields on an existing customer. Only provided fields are modified.</p>\n<h4 id=\"payload-3\">Payload</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Requirement</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>id</code></td>\n<td>integer</td>\n<td><strong>Mandatory</strong></td>\n<td>The profile ID to update.</td>\n</tr>\n<tr>\n<td><em>any</em></td>\n<td></td>\n<td>Optional</td>\n<td>Any field from the POST payload above.</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"block-customer\">Block Customer</h3>\n<p><strong><code>DELETE /api/v1/customers.php</code></strong></p>\n<p>Soft-blocks a customer by setting <code>blocked = 'Yes'</code>. Does not delete the record.</p>\n<h4 id=\"payload--query-1\">Payload / Query</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Requirement</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>id</code></td>\n<td>integer</td>\n<td><strong>Mandatory</strong></td>\n<td>Can be sent in JSON body or query parameter.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"response-3\">Response</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{ \"success\": true, \"id\": 2045, \"blocked\": \"Yes\" }\n\n</code></pre>\n<hr />\n<h2 id=\"jobs--queues-apiv1jobsphp\">Jobs &amp; Queues (<code>/api/v1/jobs.php</code>)</h2>\n<h3 id=\"list-jobs-by-station\">List Jobs by Station</h3>\n<p><strong><code>GET /api/v1/jobs.php?query=station</code></strong></p>\n<p>Retrieves a paginated/filtered list of orderlist jobs natively matched against active queue parameters.</p>\n<h4 id=\"query-parameters-5\">Query Parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Default</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>category</code></td>\n<td>string</td>\n<td><code>allcategories</code></td>\n<td>Filter by exact category (e.g. <code>Printing</code>).</td>\n</tr>\n<tr>\n<td><code>process</code></td>\n<td>string</td>\n<td><code>allprocesses</code></td>\n<td>Filter by exact process/shelf (e.g. <code>Bindery</code>).</td>\n</tr>\n<tr>\n<td><code>item</code></td>\n<td>string</td>\n<td><code>allitems</code></td>\n<td>Filter by item type.</td>\n</tr>\n<tr>\n<td><code>period</code></td>\n<td>string</td>\n<td><code>all</code></td>\n<td><code>current</code>, <code>todaysbill</code>, <code>todaysdue</code>, <code>future</code>, <code>all</code>.</td>\n</tr>\n<tr>\n<td><code>status</code></td>\n<td>string</td>\n<td><code>Received</code></td>\n<td>Filters overarching bill state: <code>ReceivedorDone</code>, <code>Done</code>, <code>Received</code>.</td>\n</tr>\n<tr>\n<td><code>sort</code></td>\n<td>string</td>\n<td><code>desc</code></td>\n<td><code>asc</code> or <code>desc</code> targeting date ordering.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"response-4\">Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n \"count\": 1,\n \"data\": [\n {\n \"delivery\": \"No\",\n \"reference\": \"\",\n \"bilid\": \"O_D1B3X91S\",\n \"jobnumber\": 431,\n \"date\": \"2026-03-31 10:00:00\",\n \"type\": \"Flyer\",\n \"category\": \"Printing\",\n \"size\": 500,\n \"name\": \"John Doe\",\n \"shelf\": \"Design\",\n \"status\": \"Received\"\n }\n ]\n}\n\n</code></pre>\n<hr />\n<h3 id=\"update-job-status-process-migration\">Update Job Status (Process Migration)</h3>\n<p><strong><code>PATCH /api/v1/jobs.php</code></strong></p>\n<p>Acts as the operational core mimicking exactly UI process advancement. Natively handles standard queue transitions, auto-staff assignments, explicit <code>Returned</code> logic blocks (auto-generating destructive inventory reversals and fractional quantity splitting mechanisms automatically), automatic <code>Goods Sold</code> insertions, and calculates flat or % based dynamic <code>jobsprocess</code> commission metrics writing directly to the <code>jobsdone</code> indices globally.</p>\n<h4 id=\"payload-4\">Payload</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Requirement</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>orderlist_id</code></td>\n<td>integer</td>\n<td><strong>Mandatory</strong></td>\n<td>Target job identifier (<code>orderlist.id</code>).</td>\n</tr>\n<tr>\n<td><code>status</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>New process/station classification target.</td>\n</tr>\n<tr>\n<td><code>staff</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Assigned executor. Required parameter bounds if <code>jobsprocess</code> commissions are triggered explicitly.</td>\n</tr>\n<tr>\n<td><code>note</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Overrides the operational note natively log-recorded.</td>\n</tr>\n<tr>\n<td><code>amount</code></td>\n<td>float</td>\n<td>Optional</td>\n<td>Explicit partial unit identifier explicitly consumed when handling <code>Returned</code> flows exclusively parsing fractional reductions natively.</td>\n</tr>\n</tbody>\n</table>\n</div><blockquote>\n<p>[!NOTE] </p>\n</blockquote>\n<p><strong>Auto-Resolution Binding:</strong> Any process update natively validates the sibling states of all jobs under the parent <code>bilid</code>. If $0$ jobs remain marked inside standard <code>Process</code> shelves (<code>Pending</code>, <code>QC</code>, <code>-</code>), the API automatically cascades the encompassing <code>record.status</code> dynamically to <code>Done</code> echoing <code>checkshelfifdone()</code> functionality flawlessly.</p>\n<hr />\n<h3 id=\"retrieve-order-capture-assets\">Retrieve Order Capture Assets</h3>\n<p><strong><code>GET /api/v1/jobs.php?query=images&amp;bilid=</code></strong></p>\n<p>Aggregates mapped metadata and URL resolutions explicitly tied exclusively to <code>orderimages</code> associations bounding directly against exact <code>orderlistid</code> grouping blocks.</p>\n<h4 id=\"response-5\">Response</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"bilid\": \"O_D1B3X91S\",\n  \"images\": {\n    \"431\": [\n      {\n        \"orderlistid\": 431,\n        \"imageurl\": \"https://img.host.com/123\",\n        \"date\": \"2026-03-31 11:00:00\",\n        \"staff\": \"admin\",\n        \"igroup\": \"Artwork\",\n        \"process\": \"Design\"\n      }\n    ]\n  }\n}\n\n</code></pre>\n<hr />\n<h3 id=\"store-order-capture-assets\">Store Order Capture Assets</h3>\n<p><strong><code>POST /api/v1/jobs.php?query=images</code></strong></p>\n<p>Inserts new image metadata logs pointing to remote image resources stored externally, mapping directly to <code>orderlist</code> entries.</p>\n<h4 id=\"payload-5\">Payload</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Requirement</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>orderlist_id</code></td>\n<td>integer</td>\n<td><strong>Mandatory</strong></td>\n<td>The target job index to attach the capture to.</td>\n</tr>\n<tr>\n<td><code>imageurl</code></td>\n<td>string</td>\n<td><strong>Mandatory</strong></td>\n<td>Fully qualified URL of the artifact storage location.</td>\n</tr>\n<tr>\n<td><code>note</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Optional context string.</td>\n</tr>\n<tr>\n<td><code>igroup</code></td>\n<td>string</td>\n<td>Optional</td>\n<td>Defined categorical boundary (e.g. <code>Artwork</code>, <code>Result</code>).</td>\n</tr>\n<tr>\n<td><code>fromgallery</code></td>\n<td>integer</td>\n<td>Optional</td>\n<td>Value <code>1</code> if uploaded from desktop via storage prompt or <code>0</code> (Capture).</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"response-6\">Response</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"success\": true,\n  \"imageid\": 9923,\n  \"bilid\": \"O_D1B3X91S\"\n}\n\n</code></pre>\n<hr />\n<h3 id=\"delete-order-capture-assets\">Delete Order Capture Assets</h3>\n<p><strong><code>DELETE /api/v1/jobs.php?query=images</code></strong></p>\n<p>Orchestrates a physical remote deletion against cloud infrastructure (imagedelivery.net / files.works25.com) prior to dissolving the database binding. Images tagged <code>dontdelete = 1</code> are dynamically shielded and will deny execution.</p>\n<h4 id=\"payload-6\">Payload</h4>\n<p>Accepts <code>imageid</code> payload parameter either dynamically mapped within JSON or injected via <code>$GET</code> string constraints.</p>\n<h4 id=\"response-7\">Response</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"success\": true,\n  \"deletedimageid\": 9923,\n  \"domain\": \"imagedelivery.net\",\n  \"remoteid\": \"cloudflare-remote-token-110\",\n  \"url\": \"https://imagedelivery.net/account/cloudflare-remote-token-110\"\n}\n\n</code></pre>\n","_postman_id":"b357455d-038b-46c2-ae7c-36082a5d1aa7","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}}}],"id":"c372b318-c17b-4759-865a-082176bf99f0","_postman_id":"c372b318-c17b-4759-865a-082176bf99f0","description":"","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]},"isInherited":true,"source":{"_postman_id":"5ea60f44-0233-47d3-a951-6933553972b4","id":"5ea60f44-0233-47d3-a951-6933553972b4","name":"Works25 API","type":"collection"}}}],"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-Key"},{"key":"value","value":""}]}},"event":[{"listen":"prerequest","script":{"id":"f3024129-3f02-467e-bea4-676180fda6c1","type":"text/javascript","packages":{},"requests":{},"exec":[""]}},{"listen":"test","script":{"id":"ae928daa-0d55-4228-8a6d-8e1944b69659","type":"text/javascript","packages":{},"requests":{},"exec":[""]}}],"variable":[{"key":"baseUrl","value":""},{"key":"apiKey","value":""}]}