{"info":{"_postman_id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","name":"DelyvaX SaaS","description":"<html><head></head><body><h2 id=\"endpoint\">Endpoint</h2>\n<p>The root endpoint for all requests is: <code>https://api.delyva.app/v1.0</code>.</p>\n<p>CDN Endpoint, if needed: <code>https://cdn.delyva.app</code></p>\n<h2 id=\"requests\">Requests</h2>\n<p>All <code>POST</code>, <code>PUT</code>, <code>PATCH</code> requests are JSON encoded and must have content type of <code>application/json</code>, or the API will return a <code>415 Unsupported Media Type</code> status code.</p>\n<h2 id=\"responses\">Responses</h2>\n<p>All response bodies are JSON encoded.</p>\n<p>Timestamps are formatted as ISO 8601 <code>YYYY-MM-DDTHH:MM:SSZ</code>.</p>\n<p>Unset fields will be represented as a <code>null</code> instead of not being present. If the field is an array, it will be represented as an empty array - ie <code>[]</code>.</p>\n<h3 id=\"all-valid-response-will-be-formatted-as-below\">All valid response will be formatted as below.</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    “data”:  &lt;response_data&gt;\n}\n\n</code></pre><h1 id=\"staging-demo-account\">Staging / Demo Account</h1>\n<ol>\n<li><p>Create an account at <a href=\"https://demo.delyva.app\">https://demo.delyva.app</a></p>\n</li>\n<li><p>API endpoint is same as production (<code>https://api.delyva.app/v1.0</code>)</p>\n</li>\n<li><p>When you're ready for production, just switch <code>companyId</code> and <code>customerId</code> with production details</p>\n</li>\n<li><p>If you need help with integration, please mail to <code>dev @ delyva. com</code></p>\n</li>\n</ol>\n<h1 id=\"idempotent-requests\">Idempotent requests</h1>\n<p>DelyvaX support idempotency, which allows you to safely retry API requests that might have failed due to connection issues, without causing duplication or conflicts.</p>\n<h2 id=\"idempotency-keys\">Idempotency keys</h2>\n<p>An idempotency key <strong><code>idempotency-key</code></strong> is a unique string identifier generated by your app. DelyvaX uses this identifier to recognize subsequent retries of the same request. When making a request, include an <code>idempotency-key</code> header with a unique ID of your choice.</p>\n<h2 id=\"example\">Example</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST /order HTTP/1.1\nHost: api.delyva.app\nContent-Type: application/json\nidempotency-key: 'your-unique-idempotency-key'\n{\n  \"customerId\": 123,\n  \"origin\": {}\n  \"destination\": {}\n  ...\n}\n\n</code></pre><h2 id=\"response-handling\">Response Handling</h2>\n<p>Responses associated with the same idempotency key will be cached for 24 hours. The cached response will be returned if the same key is reused within this period.</p>\n<h2 id=\"endpoint-that-accept-idempotency-keys\">Endpoint that accept idempotency keys</h2>\n<ul>\n<li>POST /order</li>\n</ul>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Staging / Demo Account","slug":"staging-demo-account"},{"content":"Idempotent requests","slug":"idempotent-requests"}],"owner":"489750","collectionId":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","publishedId":"SW15yGs1","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2024-09-17T07:04:11.000Z"},"item":[{"name":"Authentication","item":[{"name":"API Key","item":[{"name":"Create API key/token","id":"460d0f77-7a2b-45c9-bb11-a2962ab8aa9f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"name\": \"My App\"\n}"},"url":"{{API_ENDPOINT}}/v1.0/auth/personalAccessToken","description":"<p>If you insist on going the adventurous way, or maybe this is part of your development requirement. You can use this api to create a new api key.</p>\n<p>You can also create an API key by logging in to Customer Portal (just saying...)</p>\n","urlObject":{"path":["v1.0","auth","personalAccessToken"],"host":["{{API_ENDPOINT}}"],"query":[],"variable":[]}},"response":[{"id":"ccfed3d3-ccb0-4a2a-8263-e2881a5b1718","name":"Create token","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"name\": \"My Apps\"\n}","options":{"raw":{"language":"json"}}},"url":"{{API_ENDPOINT}}/auth/personalAccessToken"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"companyId\": \"c9b51032-112d-48ae-9fb6-7e03965c435f\",\n        \"userId\": \"a6fb1140-f49f-11e9-a840-ffaca7958d9b\",\n        \"name\": \"My Apps\",\n        \"token\": \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJhNmZiMTE0MC1mNDlmLTExZTktYTg0MC1mZmFjYTc5NThkOWIiLCJjb21wYW55SWQiOiJjOWI1MTAzMi0xMTJkLTQ4YWUtOWZiNi03ZTAzOTY1YzQzNWYiLCJ0eXBlIjoicGVyc29uYWwiLCJpYXQiOjE1NzI3MjE2NDcsImV4cCI6MTYzNTgzNjg0N30.pcicIakyWef_mjbdPg3FFde0xsApFb1XJGxSPSf7MdGw5rZ1D1VVqJUnuB6N-ei7zB8Z77Jys3abNit60AiA2oR-gEtiH2kv8xpep9gzLE2JmXGZobYOUrOjTvPUNFJrM8IQMm8ZiC3vomA3v37mN8IFXU1RGQ0hdPG0h_JOV8CzVmFeYHYUf-hrVqweBwqtpDMsk1NWdTAmobsvyn2JskOB0Z41CjOsm3i6BLkeoIkiQCQRRIq6F-vsp4fsQ7ObEHLGV7sWiHCQ4ztduJxpOzL0O6rguMCTIHEE9RDSyjRCkG_3SNNzI3YKxfkBqGqnbIVwX_unSgMbn0yTI2Hb6w\",\n        \"id\": 2\n    }\n}"}],"_postman_id":"460d0f77-7a2b-45c9-bb11-a2962ab8aa9f"},{"name":"Get all token","id":"ae9db34c-9ea2-423a-ba03-4aec75e6da01","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":""},"url":"{{API_ENDPOINT}}/v1.0/auth/personalAccessToken","urlObject":{"path":["v1.0","auth","personalAccessToken"],"host":["{{API_ENDPOINT}}"],"query":[],"variable":[]}},"response":[{"id":"b40f388e-c6b6-4dc5-af86-32460a567fa9","name":"Get all token","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"name\": \"My Apps\"\n}","options":{"raw":{"language":"json"}}},"url":"{{API_ENDPOINT}}/auth/personalAccessToken"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"DelyvaX"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Access-Control-Allow-Methods","value":"GET,POST,PUT,PATCH,DELETE,COPY,OPTIONS"},{"key":"Access-Control-Allow-Headers","value":"Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"847"},{"key":"ETag","value":"W/\"34f-qeGvUHRgaF5UdPQvgV6KvzU8CGg\""},{"key":"Date","value":"Sat, 02 Nov 2019 19:08:43 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": 2,\n        \"companyId\": \"c9b51032-112d-48ae-9fb6-7e03965c435f\",\n        \"userId\": \"a6fb1140-f49f-11e9-a840-ffaca7958d9b\",\n        \"name\": \"My Apps\",\n        \"token\": \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJhNmZiMTE0MC1mNDlmLTExZTktYTg0MC1mZmFjYTc5NThkOWIiLCJjb21wYW55SWQiOiJjOWI1MTAzMi0xMTJkLTQ4YWUtOWZiNi03ZTAzOTY1YzQzNWYiLCJ0eXBlIjoicGVyc29uYWwiLCJpYXQiOjE1NzI3MjE2NDcsImV4cCI6MTYzNTgzNjg0N30.pcicIakyWef_mjbdPg3FFde0xsApFb1XJGxSPSf7MdGw5rZ1D1VVqJUnuB6N-ei7zB8Z77Jys3abNit60AiA2oR-gEtiH2kv8xpep9gzLE2JmXGZobYOUrOjTvPUNFJrM8IQMm8ZiC3vomA3v37mN8IFXU1RGQ0hdPG0h_JOV8CzVmFeYHYUf-hrVqweBwqtpDMsk1NWdTAmobsvyn2JskOB0Z41CjOsm3i6BLkeoIkiQCQRRIq6F-vsp4fsQ7ObEHLGV7sWiHCQ4ztduJxpOzL0O6rguMCTIHEE9RDSyjRCkG_3SNNzI3YKxfkBqGqnbIVwX_unSgMbn0yTI2Hb6w\",\n        \"revoked\": false,\n        \"expireAt\": null,\n        \"createdAt\": \"2019-11-02T19:07:27.563Z\",\n        \"updatedAt\": \"2019-11-02T19:07:27.563Z\",\n        \"deletedAt\": null\n    }\n]"}],"_postman_id":"ae9db34c-9ea2-423a-ba03-4aec75e6da01"},{"name":"Revoke token","id":"53242a30-3d79-4467-aa9c-f8baec7c95d6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":""},"url":"{{API_ENDPOINT}}/v1.0/auth/personalAccessToken/2/revoke","urlObject":{"path":["v1.0","auth","personalAccessToken","2","revoke"],"host":["{{API_ENDPOINT}}"],"query":[],"variable":[]}},"response":[{"id":"0bd6f1c4-c8c3-4ad3-8b70-c791afcec63f","name":"Get all token","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"name\": \"My Apps\"\n}","options":{"raw":{"language":"json"}}},"url":"{{API_ENDPOINT}}/auth/personalAccessToken"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"DelyvaX"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Access-Control-Allow-Methods","value":"GET,POST,PUT,PATCH,DELETE,COPY,OPTIONS"},{"key":"Access-Control-Allow-Headers","value":"Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"847"},{"key":"ETag","value":"W/\"34f-qeGvUHRgaF5UdPQvgV6KvzU8CGg\""},{"key":"Date","value":"Sat, 02 Nov 2019 19:08:43 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": 2,\n        \"companyId\": \"c9b51032-112d-48ae-9fb6-7e03965c435f\",\n        \"userId\": \"a6fb1140-f49f-11e9-a840-ffaca7958d9b\",\n        \"name\": \"My Apps\",\n        \"token\": \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJhNmZiMTE0MC1mNDlmLTExZTktYTg0MC1mZmFjYTc5NThkOWIiLCJjb21wYW55SWQiOiJjOWI1MTAzMi0xMTJkLTQ4YWUtOWZiNi03ZTAzOTY1YzQzNWYiLCJ0eXBlIjoicGVyc29uYWwiLCJpYXQiOjE1NzI3MjE2NDcsImV4cCI6MTYzNTgzNjg0N30.pcicIakyWef_mjbdPg3FFde0xsApFb1XJGxSPSf7MdGw5rZ1D1VVqJUnuB6N-ei7zB8Z77Jys3abNit60AiA2oR-gEtiH2kv8xpep9gzLE2JmXGZobYOUrOjTvPUNFJrM8IQMm8ZiC3vomA3v37mN8IFXU1RGQ0hdPG0h_JOV8CzVmFeYHYUf-hrVqweBwqtpDMsk1NWdTAmobsvyn2JskOB0Z41CjOsm3i6BLkeoIkiQCQRRIq6F-vsp4fsQ7ObEHLGV7sWiHCQ4ztduJxpOzL0O6rguMCTIHEE9RDSyjRCkG_3SNNzI3YKxfkBqGqnbIVwX_unSgMbn0yTI2Hb6w\",\n        \"revoked\": false,\n        \"expireAt\": null,\n        \"createdAt\": \"2019-11-02T19:07:27.563Z\",\n        \"updatedAt\": \"2019-11-02T19:07:27.563Z\",\n        \"deletedAt\": null\n    }\n]"},{"id":"e181bf6a-ecd8-4248-a25e-c939b04a8c65","name":"Create token","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"name\": \"My Apps\"\n}","options":{"raw":{"language":"json"}}},"url":"{{API_ENDPOINT}}/auth/personalAccessToken"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"companyId\": \"c9b51032-112d-48ae-9fb6-7e03965c435f\",\n        \"userId\": \"a6fb1140-f49f-11e9-a840-ffaca7958d9b\",\n        \"name\": \"My Apps\",\n        \"token\": \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJhNmZiMTE0MC1mNDlmLTExZTktYTg0MC1mZmFjYTc5NThkOWIiLCJjb21wYW55SWQiOiJjOWI1MTAzMi0xMTJkLTQ4YWUtOWZiNi03ZTAzOTY1YzQzNWYiLCJ0eXBlIjoicGVyc29uYWwiLCJpYXQiOjE1NzI3MjE2NDcsImV4cCI6MTYzNTgzNjg0N30.pcicIakyWef_mjbdPg3FFde0xsApFb1XJGxSPSf7MdGw5rZ1D1VVqJUnuB6N-ei7zB8Z77Jys3abNit60AiA2oR-gEtiH2kv8xpep9gzLE2JmXGZobYOUrOjTvPUNFJrM8IQMm8ZiC3vomA3v37mN8IFXU1RGQ0hdPG0h_JOV8CzVmFeYHYUf-hrVqweBwqtpDMsk1NWdTAmobsvyn2JskOB0Z41CjOsm3i6BLkeoIkiQCQRRIq6F-vsp4fsQ7ObEHLGV7sWiHCQ4ztduJxpOzL0O6rguMCTIHEE9RDSyjRCkG_3SNNzI3YKxfkBqGqnbIVwX_unSgMbn0yTI2Hb6w\",\n        \"id\": 2\n    }\n}"}],"_postman_id":"53242a30-3d79-4467-aa9c-f8baec7c95d6"},{"name":"Get token by id","id":"db1ae776-a11b-40ce-bc08-e2ff97bff990","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":""},"url":"{{API_ENDPOINT}}/v1.0/auth/personalAccessToken/:id","urlObject":{"path":["v1.0","auth","personalAccessToken",":id"],"host":["{{API_ENDPOINT}}"],"query":[],"variable":[{"id":"e806ca2d-37de-45bf-bbb4-cc618e275a7d","type":"string","value":"1","key":"id"}]}},"response":[{"id":"4867f2ec-6043-4099-8f7b-da61a4d60831","name":"Get token by id","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"name\": \"My Apps\"\n}","options":{"raw":{"language":"json"}}},"url":"{{API_ENDPOINT}}/auth/personalAccessToken"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"DelyvaX"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Access-Control-Allow-Methods","value":"GET,POST,PUT,PATCH,DELETE,COPY,OPTIONS"},{"key":"Access-Control-Allow-Headers","value":"Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"847"},{"key":"ETag","value":"W/\"34f-qeGvUHRgaF5UdPQvgV6KvzU8CGg\""},{"key":"Date","value":"Sat, 02 Nov 2019 19:08:43 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 2,\n    \"companyId\": \"c9b51032-112d-48ae-9fb6-7e03965c435f\",\n    \"userId\": \"a6fb1140-f49f-11e9-a840-ffaca7958d9b\",\n    \"name\": \"My Apps\",\n    \"token\": \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJhNmZiMTE0MC1mNDlmLTExZTktYTg0MC1mZmFjYTc5NThkOWIiLCJjb21wYW55SWQiOiJjOWI1MTAzMi0xMTJkLTQ4YWUtOWZiNi03ZTAzOTY1YzQzNWYiLCJ0eXBlIjoicGVyc29uYWwiLCJpYXQiOjE1NzI3MjE2NDcsImV4cCI6MTYzNTgzNjg0N30.pcicIakyWef_mjbdPg3FFde0xsApFb1XJGxSPSf7MdGw5rZ1D1VVqJUnuB6N-ei7zB8Z77Jys3abNit60AiA2oR-gEtiH2kv8xpep9gzLE2JmXGZobYOUrOjTvPUNFJrM8IQMm8ZiC3vomA3v37mN8IFXU1RGQ0hdPG0h_JOV8CzVmFeYHYUf-hrVqweBwqtpDMsk1NWdTAmobsvyn2JskOB0Z41CjOsm3i6BLkeoIkiQCQRRIq6F-vsp4fsQ7ObEHLGV7sWiHCQ4ztduJxpOzL0O6rguMCTIHEE9RDSyjRCkG_3SNNzI3YKxfkBqGqnbIVwX_unSgMbn0yTI2Hb6w\",\n    \"revoked\": false,\n    \"expireAt\": null,\n    \"createdAt\": \"2019-11-02T19:07:27.563Z\",\n    \"updatedAt\": \"2019-11-02T19:07:27.563Z\",\n    \"deletedAt\": null\n}"}],"_postman_id":"db1ae776-a11b-40ce-bc08-e2ff97bff990"}],"id":"5abb0ab4-2cdd-4866-a8be-4daf81255e8e","description":"<h3 id=\"how-to-get-an-api-key\">How to get an API key</h3>\n<ol>\n<li>You can obtain API Key in Customer Portal.\nGo to \"Settings\" &gt; \"API Integrations\" &gt; \"Add new key\".</li>\n<li><strong>OR</strong> You can also generating it programmatically using <a href=\"#460d0f77-7a2b-45c9-bb11-a2962ab8aa9f\">Create API Key/Token</a> API.</li>\n</ol>\n<h3 id=\"how-to-authenticate\">How to authenticate?</h3>\n<p>To authenticate, send <code>X-Delyvax-Access-Token: &lt;access_token&gt;</code> header, where <code>&lt;access_token&gt;</code> is replaced with the api key.</p>\n","_postman_id":"5abb0ab4-2cdd-4866-a8be-4daf81255e8e","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{currentAccessToken}}"}]},"isInherited":true,"source":{"_postman_id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","name":"DelyvaX SaaS","type":"collection"}}},{"name":"JWT Token","item":[{"name":"Login User","event":[{"listen":"prerequest","script":{"id":"d8724573-6d1c-45f1-918a-58d9956a85bc","exec":["pm.environment.set(\"API_ENDPOINT\", \"https://api.delyva.app\");"],"type":"text/javascript"}}],"id":"c02650c0-950d-40af-8411-05959ee6b5c6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"companyCode\": \"delyva\",\n\t\"username\": \"mr.ridhuanhassan@gmail.com\",\n\t\"password\": \"password\"\n}"},"url":"{{API_ENDPOINT}}/v1.0/auth/login","description":"<ul>\n<li>companyCode - required</li>\n<li>username - required</li>\n<li>password - required</li>\n</ul>\n<p>If you're not sure what is your companyCode, you can get it from customer portal in \"API Integration\" tab.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{currentAccessToken}}"}]},"isInherited":true,"source":{"_postman_id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","name":"DelyvaX SaaS","type":"collection"}},"urlObject":{"path":["v1.0","auth","login"],"host":["{{API_ENDPOINT}}"],"query":[],"variable":[]}},"response":[{"id":"0f5c6e0a-ee8a-4e6a-b2c6-5f9ef7c42a72","name":"STAGING: Expected Result","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"companyCode\": \"delyva\",\r\n    \"username\": \"ridhuanhassan@delyva.com\",\r\n    \"password\": \"password\"\r\n}"},"url":"{{API_ENDPOINT}}/auth/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Access-Control-Allow-Headers","value":"Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With"},{"key":"Access-Control-Allow-Methods","value":"GET,POST,PUT,PATCH,DELETE,COPY,OPTIONS"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Encoding","value":"gzip"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Mon, 05 Aug 2019 08:42:01 GMT"},{"key":"Etag","value":"W/\"4e2-2UXwivebusP+PJLOnBzSfWwoiRM\""},{"key":"Vary","value":"Accept-Encoding"},{"key":"X-Powered-By","value":"DelyvaX"},{"key":"Content-Length","value":"864"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"accessToken\": \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJmNzM4NjBiMC1iNzRlLTExZTktOTQ2MS0xOTg1YzA5NThjMTciLCJjb21wYW55SWQiOiI1YjhkZmUzYy1hMTIxLTRlODgtYWQ1My0yMzkzNmQ1YjY5MTQiLCJyb2xlcyI6W10sInNjb3BlcyI6W10sImlhdCI6MTU2NDk5NDUyMSwiZXhwIjoxNTY0OTk1NDIxfQ.SGrsIq_-zDCUcnhREFhQGJk8xuik4xpY3ospgBM8cWQe94oTzWhYrF4u53lJPWl8paXDmaa9_rWN_6UVCID9qRKYXpRpl4O29IhyQ9D405wqaInRrVlqef7htwoK9YGjmDL9LK1xkzVCR_otPKYIRckgP65WRiS9w8o0wuuGglzQKrFPN055sYrlggygAy_hZ4V5qCwh2h5bG6RZsoc2iNMcqaewRMLbXL_gcRG0dPZh4kHVjnQqhbDNJdl14ZnHzw1MaRxG2AXgHwYP-lvZbNDQ6l7-sGNZH7-cw_ANqYNLH2ciyHNWBi-00iHvMZOhTdGjTPgAnfHDOPGydkyZgA\",\n        \"expireIn\": 900000,\n        \"expireAt\": \"2019-08-05T08:57:01.641Z\",\n        \"refreshToken\": \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJmNzM4NjBiMC1iNzRlLTExZTktOTQ2MS0xOTg1YzA5NThjMTciLCJjb21wYW55SWQiOiI1YjhkZmUzYy1hMTIxLTRlODgtYWQ1My0yMzkzNmQ1YjY5MTQiLCJpYXQiOjE1NjQ5OTQ1MjEsImV4cCI6MTU2NzU4NjUyMX0.SZtR7ok3CV1MSVdlFdYl5gBt9jzyjmL2uoxzTzElBb3_Vc7kfbcfiGE0ebtSWGQhR7ApFi5hwrIFcWQmGWkPYVO6I6Ltek8DDK8rWRheGiMN6dQ2ytsU8VahrobnM0oah-iuWnojCBCggupQTkJNQnzkW6KqK-RMjFLvFKzV5syVlySd5IIWf5OlWJkA9MhdNBhqRTksqn7KykHq5DRG7crDftTMBiaTDtqYvH5a7m7kyK2CzF44j-BlLix2Y-NtJ3xokkw2cOALRJI8epeOYdSS78C-sOdbzVtsCw7DGKCRRuKt6wJeKdAd24Ry73ZWGo7-pWsQsO1nE1hiQVPTTA\"\n    }\n}"},{"id":"1e9a9915-5e2e-48a0-ac69-849687e28d85","name":"User not exist","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"companyCode\": \"delyva\",\n\t\"username\": \"supersimple@gmail.com\",\n\t\"password\": \"password\"\n}"},"url":"{{API_ENDPOINT}}/auth/login"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx"},{"key":"Date","value":"Tue, 11 Jun 2019 03:52:43 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"44"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"matdespatch.app"},{"key":"ETag","value":"W/\"2c-CGmkX981SLZSDziUMPJ+aouVLIU\""},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, PUT, DELETE, OPTIONS"},{"key":"Access-Control-Allow-Headers","value":"Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"message\": \"User does not exists\"\n    }\n}"},{"id":"30a0d066-ea7f-4273-8107-236cc23abbe6","name":"Invalid Password","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"companyCode\": \"delyva\",\n\t\"username\": \"mr.ridhuanhassan@gmail.com\",\n\t\"password\": \"p4ssw0rd\"\n}"},"url":"{{API_ENDPOINT}}/auth/login"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx"},{"key":"Date","value":"Tue, 11 Jun 2019 03:53:26 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"40"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"matdespatch.app"},{"key":"ETag","value":"W/\"28-9/O1eR8XJINf+2dWpy8+h25mWNM\""},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, PUT, DELETE, OPTIONS"},{"key":"Access-Control-Allow-Headers","value":"Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"message\": \"Invalid password\"\n    }\n}"},{"id":"d30a2bdd-0bc1-47eb-8cb2-b179dc06a998","name":"Expected Result","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"companyCode\": \"delyva\",\n\t\"username\": \"mr.ridhuanhassan@gmail.com\",\n\t\"password\": \"password\"\n}"},"url":"{{API_ENDPOINT}}/auth/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx"},{"key":"Date","value":"Tue, 11 Jun 2019 03:51:12 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"722"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"matdespatch.app"},{"key":"ETag","value":"W/\"2d2-yUbKIYLAB4ugo2izphqPW8fp+ZE\""},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, PUT, DELETE, OPTIONS"},{"key":"Access-Control-Allow-Headers","value":"Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"accessToken\": \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI3YmFhOTVlMC04YmZiLTExZTktODhiYi02YjRkMmNlNmFlYzciLCJjb21wYW55SWQiOiJjOWI1MTAzMi0xMTJkLTQ4YWUtOWZiNi03ZTAzOTY1YzQzNWYiLCJyb2xlcyI6W10sImlhdCI6MTU2MDIyNTA3MiwiZXhwIjoxNTYwMjI1OTcyfQ.Kz-dGSoJK-YG7TULf8Kf6tKzPzQv4w0A3MBM2WSc4bVYH7daPKdxJbkfVuLnvLLKNGddFO-p5g3BiX9Mfo9MZg\",\n        \"expireIn\": 900000,\n        \"expireAt\": \"2019-06-11T04:06:12.229Z\",\n        \"refreshToken\": \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI3YmFhOTVlMC04YmZiLTExZTktODhiYi02YjRkMmNlNmFlYzciLCJjb21wYW55SWQiOiJjOWI1MTAzMi0xMTJkLTQ4YWUtOWZiNi03ZTAzOTY1YzQzNWYiLCJpYXQiOjE1NjAyMjUwNzIsImV4cCI6MTU2MjgxNzA3Mn0.JKpJb9i15a2z8VtVeDvYFcYt2k_ygoIAsCooOOnMB3G1A3eg4UEeNXnOf3rHuvJ7d_VDpnpYW2CHCMwdyg64wg\"\n    }\n}"}],"_postman_id":"c02650c0-950d-40af-8411-05959ee6b5c6"},{"name":"Renew JWT Token","event":[{"listen":"prerequest","script":{"id":"311ec6b0-591b-4ce5-8f24-e377a5cdcdd4","exec":["pm.environment.set(\"API_ENDPOINT\", \"https://staging-api.delyva.com\");"],"type":"text/javascript"}}],"id":"eb844bb7-a0c6-4c34-aef0-20427d3ec03d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":""},"url":"{{API_ENDPOINT}}/v1.0/auth/refreshToken","urlObject":{"path":["v1.0","auth","refreshToken"],"host":["{{API_ENDPOINT}}"],"query":[],"variable":[]}},"response":[{"id":"58a4be26-b2ff-4f8e-9265-828758a6df9d","name":"Expected Result","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"refreshToken\": \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI3YmFhOTVlMC04YmZiLTExZTktODhiYi02YjRkMmNlNmFlYzciLCJjb21wYW55SWQiOiJjOWI1MTAzMi0xMTJkLTQ4YWUtOWZiNi03ZTAzOTY1YzQzNWYiLCJpYXQiOjE1NjAyMjY3NDgsImV4cCI6MTU2MjgxODc0OH0.hf-qeRnzhvmqKl0FDi7DMh1P0rfSQ8LSdBBD_L8IcrqB0WVIahEBBGmo3nO3sICBTryqN6qkf9XdzNft_y3zTA\"\n}"},"url":"{{API_ENDPOINT}}/auth/refreshToken"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx"},{"key":"Date","value":"Tue, 11 Jun 2019 04:19:46 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"401"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"matdespatch.app"},{"key":"ETag","value":"W/\"191-2cDAR6JiTW9zRpl38uja4wcLLzM\""},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, PUT, DELETE, OPTIONS"},{"key":"Access-Control-Allow-Headers","value":"Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"accessToken\": \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI3YmFhOTVlMC04YmZiLTExZTktODhiYi02YjRkMmNlNmFlYzciLCJjb21wYW55SWQiOiJjOWI1MTAzMi0xMTJkLTQ4YWUtOWZiNi03ZTAzOTY1YzQzNWYiLCJyb2xlcyI6W10sImlhdCI6MTU2MDIyNjc4NiwiZXhwIjoxNTYwMjI3Njg2fQ.IFGs3Muvk2hO6m09-6YYSb7EtF8bKRBiLJqOlW-yv8VMumrqwEIeSs_7AHbCBmWSzIJeLyj3I0TQkWnxyRXsRw\",\n        \"expireIn\": 900000,\n        \"expireAt\": \"2019-06-11T04:34:46.685Z\"\n    }\n}"}],"_postman_id":"eb844bb7-a0c6-4c34-aef0-20427d3ec03d"},{"name":"Logout","event":[{"listen":"prerequest","script":{"id":"e4c8213e-f439-4592-904f-8d3a717f76b9","exec":["pm.environment.set(\"API_ENDPOINT\", \"https://staging-api.delyva.com\");"],"type":"text/javascript"}}],"id":"8c12a9cb-b402-4814-97be-e7ae28e97d81","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":""},"url":"{{API_ENDPOINT}}/v1.0/auth/logout","urlObject":{"path":["v1.0","auth","logout"],"host":["{{API_ENDPOINT}}"],"query":[],"variable":[]}},"response":[{"id":"6fff588a-a57c-4f01-8862-2855a92af373","name":"Expected Result","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"companyId\": \"c9b51032-112d-48ae-9fb6-7e03965c435f\",\n\t\"refreshToken\": \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI3YmFhOTVlMC04YmZiLTExZTktODhiYi02YjRkMmNlNmFlYzciLCJjb21wYW55SWQiOiJjOWI1MTAzMi0xMTJkLTQ4YWUtOWZiNi03ZTAzOTY1YzQzNWYiLCJpYXQiOjE1NjAyMjY3NDgsImV4cCI6MTU2MjgxODc0OH0.hf-qeRnzhvmqKl0FDi7DMh1P0rfSQ8LSdBBD_L8IcrqB0WVIahEBBGmo3nO3sICBTryqN6qkf9XdzNft_y3zTA\"\n}"},"url":"{{API_ENDPOINT}}/auth/logout"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx"},{"key":"Date","value":"Tue, 11 Jun 2019 04:20:41 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"534"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"matdespatch.app"},{"key":"ETag","value":"W/\"216-zYPvsW5L6MQP6ydsYoUAKdzsWfU\""},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, PUT, DELETE, OPTIONS"},{"key":"Access-Control-Allow-Headers","value":"Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"companyId\": \"c9b51032-112d-48ae-9fb6-7e03965c435f\",\n        \"userId\": \"7baa95e0-8bfb-11e9-88bb-6b4d2ce6aec7\",\n        \"token\": \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI3YmFhOTVlMC04YmZiLTExZTktODhiYi02YjRkMmNlNmFlYzciLCJjb21wYW55SWQiOiJjOWI1MTAzMi0xMTJkLTQ4YWUtOWZiNi03ZTAzOTY1YzQzNWYiLCJpYXQiOjE1NjAyMjY3NDgsImV4cCI6MTU2MjgxODc0OH0.hf-qeRnzhvmqKl0FDi7DMh1P0rfSQ8LSdBBD_L8IcrqB0WVIahEBBGmo3nO3sICBTryqN6qkf9XdzNft_y3zTA\",\n        \"type\": \"rt\",\n        \"blacklisted\": true,\n        \"id\": 8,\n        \"userAgent\": null,\n        \"createdAt\": \"2019-06-11T04:20:41.771Z\",\n        \"expiredAt\": null\n    }\n}"}],"_postman_id":"8c12a9cb-b402-4814-97be-e7ae28e97d81"}],"id":"be7efeff-79a4-499c-8c5e-60ee902c743d","description":"<h3 id=\"how-to-get-jwt-token\">How to get JWT Token?</h3>\n<ol>\n<li>Use <strong>Login User</strong> api to get the jwt token</li>\n<li>Please cache the token, and AVOID calling login user api each time.</li>\n<li>JWT token will expire in a very short time, you need to renew the token when it's expire or when nearly expire.</li>\n</ol>\n<h3 id=\"how-to-authenticate\">How to Authenticate?</h3>\n<p>To authenticate you should supply the JWT token in the Authorization HTTP header with the Bearer schema as follows:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Authorization: Bearer &lt;jwt_token&gt;\n</code></pre><p>You need to obtain new token once it expires, please only request new token when the token nearly expire or when it expire.</p>\n","_postman_id":"be7efeff-79a4-499c-8c5e-60ee902c743d","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{currentAccessToken}}"}]},"isInherited":true,"source":{"_postman_id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","name":"DelyvaX SaaS","type":"collection"}}},{"name":"Get company lists","event":[{"listen":"prerequest","script":{"id":"e4c8213e-f439-4592-904f-8d3a717f76b9","exec":[""],"type":"text/javascript"}}],"id":"2f53bdc6-17c0-4b21-b4c6-15ca82a14945","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"username\": \"suhaimi@delyva.com\"\n}"},"url":"{{API_ENDPOINT}}/v1.0/auth/getCompany","description":"<p>Use this API to get list of company that belongs to a user, by username. Username can be an <strong>email</strong> or <strong>mobile phone number</strong>.</p>\n","urlObject":{"path":["v1.0","auth","getCompany"],"host":["{{API_ENDPOINT}}"],"query":[],"variable":[]}},"response":[{"id":"1e1099a7-a103-48f4-b6d3-ac170941cd62","name":"Get list of company by username","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"username\": \"suhaimi@delyva.com\"\n}"},"url":"{{API_ENDPOINT}}/auth/getCompany"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"listOfCompanies\": [\n            {\n                \"id\": \"f6114bec-6b36-46c7-8fb2-e6a3afccb9a1\",\n                \"planId\": 1,\n                \"code\": \"suhaimi\",\n                \"name\": \"Suhaimi Express\",\n                \"regNo\": \"1183888-A\",\n                \"address1\": \"Early Risers Sdn. Bhd.\",\n                \"address2\": \"F-11-19, Block F, Pacific Palace\",\n                \"address3\": \"Ara Damansara\",\n                \"postcode\": \"47301\",\n                \"city\": \"Petaling Jaya\",\n                \"state\": \"Selangor\",\n                \"country\": \"MY\",\n                \"businessType\": \"Fleet Management\",\n                \"courierOperation\": \"Pickup Only\",\n                \"courierAgentType\": [\n                    \"Full-time Agent\",\n                    \"Crowdsource\"\n                ],\n                \"volume\": 500,\n                \"email\": \"suhaimi@delyva.com\",\n                \"phone\": \"6036419090\",\n                \"fax\": \"6039901919\",\n                \"websiteUrl\": \"https://www.delyva.com\",\n                \"nature\": \"\",\n                \"logo\": \"https://www.delyva.com/logo.png\",\n                \"icon\": \"https://www.delyva.com/icon.png\",\n                \"contactName\": \"Suhaimi Amir\",\n                \"contactEmail\": \"suhaimi@delyva.com\",\n                \"contactPhone\": \"60176712829\",\n                \"timeZone\": \"GMT+8\",\n                \"deleted\": false,\n                \"created_at\": \"2019-11-03T14:10:45.033Z\",\n                \"updated_at\": \"2019-11-03T14:10:45.033Z\",\n                \"fullAddress\": \"\\nEarlyRisersSdn.Bhd.,\\nF-11-19,BlockF,PacificPalace,\\nAraDamansara,\\n47301,\\nPetalingJaya,\\nSelangor,\\nMY,\\n\"\n            },\n            {\n                \"id\": \"4ec530fa-ebcf-40e4-adca-15e3c8e8fc8b\",\n                \"planId\": 1,\n                \"code\": \"delyva\",\n                \"name\": \"Delyva\",\n                \"regNo\": \"1183844-A\",\n                \"address1\": \"Early Risers Sdn. Bhd. 2\",\n                \"address2\": \"F-11-19, Block F, Pacific Palace\",\n                \"address3\": \"Ara Damansara\",\n                \"postcode\": \"47301\",\n                \"city\": \"Petaling Jaya\",\n                \"state\": \"Selangor\",\n                \"country\": \"MY\",\n                \"businessType\": \"Fleet Management\",\n                \"courierOperation\": \"Pickup Only\",\n                \"courierAgentType\": [\n                    \"Full-time Agent\",\n                    \"Crowdsource\"\n                ],\n                \"volume\": 500,\n                \"email\": \"hello@delyva.com\",\n                \"phone\": \"6036419090\",\n                \"fax\": \"6039901919\",\n                \"websiteUrl\": \"https://www.delyva.com\",\n                \"nature\": \"\",\n                \"logo\": \"https://www.delyva.com/logo.png\",\n                \"icon\": \"https://www.delyva.com/icon.png\",\n                \"contactName\": \"Ridhuan Hassan\",\n                \"contactEmail\": \"ridhuan@delyva.com\",\n                \"contactPhone\": \"60176712829\",\n                \"timeZone\": \"\",\n                \"deleted\": false,\n                \"created_at\": \"2019-09-24T05:20:43.315Z\",\n                \"updated_at\": \"2019-09-24T05:20:43.315Z\",\n                \"fullAddress\": \"\\nEarlyRisersSdn.Bhd.2,\\nF-11-19,BlockF,PacificPalace,\\nAraDamansara,\\n47301,\\nPetalingJaya,\\nSelangor,\\nMY,\\n\"\n            },\n            {\n                \"id\": \"2cab0b07-7a5d-4971-aeba-5ffac537a455\",\n                \"planId\": 1,\n                \"code\": \"matdespatch-my\",\n                \"name\": \"MatDespatch\",\n                \"regNo\": \"1111111-A\",\n                \"address1\": \"Early Risers Sdn. Bhd.\",\n                \"address2\": \"F-11-19, Block F, Pacific Palace\",\n                \"address3\": \"Ara Damansara\",\n                \"postcode\": \"47301\",\n                \"city\": \"Petaling Jaya\",\n                \"state\": \"Selangor\",\n                \"country\": \"MatDespatch\",\n                \"businessType\": \"test\",\n                \"courierOperation\": \"test\",\n                \"courierAgentType\": [],\n                \"volume\": 0,\n                \"email\": \"suhaimi@delyva.com\",\n                \"phone\": \"6036419090\",\n                \"fax\": \"6039901919\",\n                \"websiteUrl\": \"https://www.delyva.com\",\n                \"nature\": \"\",\n                \"logo\": \"https://www.delyva.com/logo.png\",\n                \"icon\": \"https://www.delyva.com/icon.png\",\n                \"contactName\": \"Suhaimi Amir\",\n                \"contactEmail\": \"suhaimi@delyva.com\",\n                \"contactPhone\": \"60137778595\",\n                \"timeZone\": \"GMT+8\",\n                \"deleted\": false,\n                \"created_at\": \"2019-11-06T02:21:55.160Z\",\n                \"updated_at\": \"2019-11-06T02:21:55.160Z\",\n                \"fullAddress\": \"\\nEarlyRisersSdn.Bhd.,\\nF-11-19,BlockF,PacificPalace,\\nAraDamansara,\\n47301,\\nPetalingJaya,\\nSelangor,\\nMatDespatch,\\n\"\n            }\n        ]\n    }\n}"}],"_postman_id":"2f53bdc6-17c0-4b21-b4c6-15ca82a14945"}],"id":"35b02d77-2394-42b0-847d-c43ada79b313","description":"<p>There's two type of authentication you can use. You can choose which one is suitable to your needs.</p>\n<ol>\n<li><p>API Key</p>\n</li>\n<li><p>JWT Token</p>\n</li>\n</ol>\n","event":[{"listen":"prerequest","script":{"id":"1141a754-4828-44d2-8507-64565e7eef91","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"b6fd0da2-7279-4824-8fc3-b109dbda4dfb","type":"text/javascript","exec":[""]}}],"_postman_id":"35b02d77-2394-42b0-847d-c43ada79b313","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{currentAccessToken}}"}]},"isInherited":true,"source":{"_postman_id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","name":"DelyvaX SaaS","type":"collection"}}},{"name":"Services","item":[{"name":"Price Quote","id":"80cd6a2a-7758-466c-a866-95ae56713469","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"customerId\": 123,\n\t\"origin\": {\n\t\t\"address1\": \"28 Jalan 5\",\n\t\t\"address2\": \"Taman Mesra\",\n\t\t\"city\": \"Kajang\",\n\t\t\"state\": \"Selangor\",\n\t\t\"postcode\": \"43000\",\n\t\t\"country\": \"MY\",\n\t\t\"coord\": {\n\t\t\t\"lat\": \"3.013478\", \n\t\t\t\"lon\": \"101.779682\"\n\t\t}\n\t},\n\t\"destination\": {\n\t\t\"address1\": \"F-11-19 Pacific Place\",\n\t\t\"address2\": \"Ara Damansara\",\n\t\t\"city\": \"Petaling Jaya\",\n\t\t\"state\": \"Selangor\",\n\t\t\"postcode\": \"47301\",\n\t\t\"country\": \"MY\",\n\t\t\"coord\": {\n\t\t\t\"lat\": \"3.11100853226846\",\n\t\t\t\"lon\": \"101.58726936290537\"\n\t\t}\n\t},\n\t\"weight\": {\n\t\t\"unit\": \"kg\",\n\t\t\"value\": 10\n\t},\n    \"dimension\": {\n        \"width\": 10,\n        \"height\": 11,\n        \"length\": 12,\n        \"unit\": \"cm\"\n    }\n}"},"url":"{{API_ENDPOINT}}/v1.0/service/instantQuote","description":"<h1 id=\"request\">Request</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>companyId</td>\n<td>uuid</td>\n<td>?</td>\n<td>Optional if jwt token sent</td>\n</tr>\n<tr>\n<td>waypoint</td>\n<td>array</td>\n<td>Y</td>\n<td>See: \"waypoint object\"</td>\n</tr>\n<tr>\n<td>origin</td>\n<td>object</td>\n<td>N</td>\n<td>Equivalent to <code>waypoint: [{ ...origin }]</code></td>\n</tr>\n<tr>\n<td>destination</td>\n<td>object</td>\n<td>N</td>\n<td>Equivalent to <code>waypoint: [{ ...destination }]</code></td>\n</tr>\n<tr>\n<td>customerId</td>\n<td>number</td>\n<td>Y</td>\n<td>Customer ID</td>\n</tr>\n<tr>\n<td>weight</td>\n<td>object</td>\n<td>N</td>\n<td>See: \"weight object\"</td>\n</tr>\n<tr>\n<td>dimension</td>\n<td>object</td>\n<td>N</td>\n<td>Equivalent to <code>waypoint: [{ dimension: {} }]</code></td>\n</tr>\n<tr>\n<td>orderId</td>\n<td>uuid</td>\n<td>N</td>\n<td>Instant quote for existing order</td>\n</tr>\n<tr>\n<td>distance</td>\n<td>object</td>\n<td>N</td>\n<td>See: \"distance object\"</td>\n</tr>\n<tr>\n<td>itemType</td>\n<td>string</td>\n<td>N</td>\n<td>Item type, eg: PARCEL</td>\n</tr>\n<tr>\n<td>itemTypeId</td>\n<td>number</td>\n<td>N</td>\n<td>Item type id</td>\n</tr>\n<tr>\n<td>serviceCode</td>\n<td>string</td>\n<td>N</td>\n<td>Service Code</td>\n</tr>\n<tr>\n<td>serviceCompanyCode</td>\n<td>string</td>\n<td>N</td>\n<td>Service Company Code</td>\n</tr>\n<tr>\n<td>vehicleType</td>\n<td>string</td>\n<td>N</td>\n<td>Not In Use</td>\n</tr>\n<tr>\n<td>promoCode</td>\n<td>string</td>\n<td>N</td>\n<td>Promo Code</td>\n</tr>\n<tr>\n<td>serviceAddon</td>\n<td>array</td>\n<td>N</td>\n<td>See: \"Service addon object\"</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"waypoint-object-origin--destination\">Waypoint Object (origin &amp; destination)</h3>\n<p>All field is optional but, at least one is <strong>required</strong>.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>scheduledAt</td>\n<td>string</td>\n<td>N</td>\n<td>ISO8601 Date, Expected waypoint date and time</td>\n</tr>\n<tr>\n<td>unitNo</td>\n<td>string</td>\n<td>N</td>\n<td>address unit/building name/number</td>\n</tr>\n<tr>\n<td>address1</td>\n<td>string</td>\n<td>N</td>\n<td>Address line 1</td>\n</tr>\n<tr>\n<td>address2</td>\n<td>string</td>\n<td>N</td>\n<td>Address line 2</td>\n</tr>\n<tr>\n<td>city</td>\n<td>string</td>\n<td>N</td>\n<td>City</td>\n</tr>\n<tr>\n<td>state</td>\n<td>string</td>\n<td>N</td>\n<td>State</td>\n</tr>\n<tr>\n<td>country</td>\n<td>string</td>\n<td>N</td>\n<td>ISO 3166-1 alpha-2, Country code</td>\n</tr>\n<tr>\n<td>coord</td>\n<td>object</td>\n<td>N</td>\n<td>WGS84, SRID 4326. <code>{ lat: xxx, lon: xxx }</code></td>\n</tr>\n<tr>\n<td>dimension</td>\n<td>object</td>\n<td>N</td>\n<td>See: \"Dimension object\"</td>\n</tr>\n<tr>\n<td>placeId</td>\n<td>number</td>\n<td>N</td>\n<td>DelyvaX Hub/Place Id</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"service-addon-object\">Service Addon object</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>number</td>\n<td>Y</td>\n<td>Addon ID</td>\n</tr>\n<tr>\n<td>value</td>\n<td>string</td>\n<td>?</td>\n<td>required if qty not set</td>\n</tr>\n<tr>\n<td>qty</td>\n<td>number</td>\n<td>?</td>\n<td>required if value not set</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"weight-object\">Weight Object</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>unit</td>\n<td>string</td>\n<td>Y</td>\n<td>Weight unit, eg: kg, g</td>\n</tr>\n<tr>\n<td>value</td>\n<td>float</td>\n<td>Y</td>\n<td>Weight value</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"dimension-object\">Dimension Object</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>unit</td>\n<td>string</td>\n<td>Y</td>\n<td>unit, eg: cm, m</td>\n</tr>\n<tr>\n<td>width</td>\n<td>float</td>\n<td>Y</td>\n<td>Width value</td>\n</tr>\n<tr>\n<td>length</td>\n<td>float</td>\n<td>Y</td>\n<td>Length value</td>\n</tr>\n<tr>\n<td>height</td>\n<td>float</td>\n<td>Y</td>\n<td>Height value</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"distance-object\">Distance Object</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>unit</td>\n<td>string</td>\n<td>Y</td>\n<td>Distance unit, eg: km, m</td>\n</tr>\n<tr>\n<td>value</td>\n<td>float</td>\n<td>Y</td>\n<td>Distance value</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h1 id=\"response\">Response</h1>\n<h3 id=\"standard-response\">Standard Response</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>error</td>\n<td><strong>Error</strong></td>\n<td>Single error message</td>\n</tr>\n<tr>\n<td>errors</td>\n<td>array (<strong>Error object</strong>)</td>\n<td>List of error messages (empty if OK).</td>\n</tr>\n<tr>\n<td>data</td>\n<td><strong>Data object</strong></td>\n<td>Success response payload</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"error\">Error</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>message</td>\n<td>string</td>\n<td>Human-readable error message.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"data\">Data</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>services</td>\n<td>array (<strong>ServiceQuote object</strong>)</td>\n<td>Available service quotes.</td>\n</tr>\n<tr>\n<td>waypoints</td>\n<td>array (<strong>Waypoint object</strong>)</td>\n<td>Waypoints used for the quote (origin → destination).</td>\n</tr>\n<tr>\n<td>distance</td>\n<td><strong>Distance object</strong></td>\n<td>Straight-line distance.</td>\n</tr>\n<tr>\n<td>mileage</td>\n<td><strong>Mileage object</strong></td>\n<td>Mileage distance.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"servicequote\">ServiceQuote</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>price</td>\n<td><strong>Money object</strong></td>\n<td>Total quoted price.</td>\n</tr>\n<tr>\n<td>weight</td>\n<td><strong>Weight object</strong></td>\n<td>Quoted chargeable weight (kg implied).</td>\n</tr>\n<tr>\n<td>distance</td>\n<td><strong>Distance object</strong></td>\n<td>Distance used for pricing.</td>\n</tr>\n<tr>\n<td>service</td>\n<td><strong>Service object</strong></td>\n<td>Service details.</td>\n</tr>\n<tr>\n<td>itemType</td>\n<td>array (string)</td>\n<td>Allowed item types. Enum: \"DOCUMENT\", \"PARCEL\".</td>\n</tr>\n<tr>\n<td>duration</td>\n<td>integer</td>\n<td>Estimated delivery duration in seconds.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"money\">Money</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>amount</td>\n<td>number</td>\n<td>Decimal amount.</td>\n</tr>\n<tr>\n<td>currency</td>\n<td>string(3)</td>\n<td>ISO 4217 code (e.g., \"MYR\").</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"weight\">Weight</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>value</td>\n<td>number</td>\n<td>Weight value.</td>\n</tr>\n<tr>\n<td>unit</td>\n<td>string</td>\n<td>Unit of weight (kg, g)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"distance\">Distance</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>value</td>\n<td>number</td>\n<td>Distance value.</td>\n</tr>\n<tr>\n<td>unit</td>\n<td>string</td>\n<td>Unit of measure (e.g., \"km\").</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"mileage\">Mileage</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>value</td>\n<td>number</td>\n<td>Mileage value.</td>\n</tr>\n<tr>\n<td>unit</td>\n<td>string</td>\n<td>Unit of measure (e.g., \"km\").</td>\n</tr>\n<tr>\n<td>accuracy</td>\n<td>integer</td>\n<td>2=Estimation, 3=High</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"service\">Service</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>integer</td>\n<td>Service ID.</td>\n</tr>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>Service name.</td>\n</tr>\n<tr>\n<td>code</td>\n<td>string</td>\n<td>Service code.</td>\n</tr>\n<tr>\n<td>custDescription</td>\n<td>string</td>\n<td>HTML-formatted customer description.</td>\n</tr>\n<tr>\n<td>collectCash</td>\n<td>integer</td>\n<td>Cash on Delivery. 1=Available, 0=No COD</td>\n</tr>\n<tr>\n<td>distanceType</td>\n<td>integer</td>\n<td>1=Straight Line, 2=Driving distance</td>\n</tr>\n<tr>\n<td>multiPcs</td>\n<td>boolean</td>\n<td>Supports multiple carton/pieces.</td>\n</tr>\n<tr>\n<td>multiPcsMaxWeight</td>\n<td>number</td>\n<td>Max total weight for multi-piece (kg).</td>\n</tr>\n<tr>\n<td>serviceCompany</td>\n<td><strong>ServiceCompany object</strong></td>\n<td>Carrier/company info.</td>\n</tr>\n<tr>\n<td>addon</td>\n<td>array (Addon)</td>\n<td>Optional available add-ons for the service.</td>\n</tr>\n<tr>\n<td>serviceType</td>\n<td>string</td>\n<td>Service type code.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"servicecompany\">ServiceCompany</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>integer</td>\n<td>Company ID.</td>\n</tr>\n<tr>\n<td>companyCode</td>\n<td>string</td>\n<td>Carrier Company code (e.g., \"NJVMY\").</td>\n</tr>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>Carrier company name.</td>\n</tr>\n<tr>\n<td>logo</td>\n<td>string</td>\n<td>Relative path/URL to logo. append with <a href=\"https://cdn.delyva.app\">https://cdn.delyva.app</a></td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"addon\">Addon</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>integer</td>\n<td>Add-on ID.</td>\n</tr>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>Add-on name.</td>\n</tr>\n<tr>\n<td>price</td>\n<td>number</td>\n<td>Add-on price.</td>\n</tr>\n<tr>\n<td>required</td>\n<td>array (<strong>AddonField object</strong>)</td>\n<td>Required fields to apply the add-on.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"addonfield\">AddonField</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>key</td>\n<td>string</td>\n<td>Field key (e.g., \"value\").</td>\n</tr>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>Human-readable label.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"waypoint\">Waypoint</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>address1</td>\n<td>string</td>\n<td>Address line.</td>\n</tr>\n<tr>\n<td>city</td>\n<td>string</td>\n<td>City.</td>\n</tr>\n<tr>\n<td>state</td>\n<td>string</td>\n<td>State/region.</td>\n</tr>\n<tr>\n<td>postcode</td>\n<td>string</td>\n<td>Postal code.</td>\n</tr>\n<tr>\n<td>country</td>\n<td>string(2)</td>\n<td>ISO 3166-1 alpha-2 (e.g., \"MY\").</td>\n</tr>\n<tr>\n<td>coord</td>\n<td><strong>Coordinate object</strong></td>\n<td>WGS84, SRID 4326. Latitude/longitude.</td>\n</tr>\n<tr>\n<td>scheduledAt</td>\n<td>string (ISO 8601)</td>\n<td>Scheduled datetime.</td>\n</tr>\n<tr>\n<td>id</td>\n<td>string</td>\n<td>Client-side temp ID or waypoint ID.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"coordinate\">Coordinate</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>lat</td>\n<td>number</td>\n<td>Latitude.</td>\n</tr>\n<tr>\n<td>lon</td>\n<td>number</td>\n<td>Longitude.</td>\n</tr>\n</tbody>\n</table>\n</div>","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{currentAccessToken}}"}]},"isInherited":true,"source":{"_postman_id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","name":"DelyvaX SaaS","type":"collection"}},"urlObject":{"path":["v1.0","service","instantQuote"],"host":["{{API_ENDPOINT}}"],"query":[],"variable":[]}},"response":[{"id":"4a5b07e0-b522-450b-a0ff-f1f75054b59c","name":"instant quote with address","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"customerId\": 123,\n    \"origin\": {\n        \"address1\": \"28 Jalan 5\",\n        \"address2\": \"Taman Mesra\",\n        \"city\": \"Kajang\",\n        \"state\": \"Selangor\",\n        \"postcode\": \"43000\",\n        \"country\": \"MY\",\n        \"coord\": {\n            \"lat\": \"3.013478\",\n            \"lon\": \"101.779682\"\n        }\n    },\n    \"destination\": {\n        \"address1\": \"F-11-19 Pacific Place\",\n        \"address2\": \"Ara Damansara\",\n        \"city\": \"Petaling Jaya\",\n        \"state\": \"Selangor\",\n        \"postcode\": \"47301\",\n        \"country\": \"MY\",\n        \"coord\": {\n            \"lat\": \"3.11100853226846\",\n            \"lon\": \"101.58726936290537\"\n        }\n    },\n    \"weight\": {\n        \"unit\": \"kg\",\n        \"value\": 10\n    },\n    \"dimension\": {\n        \"width\": 10,\n        \"height\": 11,\n        \"length\": 12,\n        \"unit\": \"cm\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{API_ENDPOINT}}/service/instantQuote"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"services\": [\n        {\n            \"price\": {\n                \"amount\": 10,\n                \"currency\": \"MYR\"\n            },\n            \"weight\": {\n                \"value\": 10,\n                \"unit\": \"kg\"\n            },\n            \"distance\": {\n                \"value\": 308.091,\n                \"unit\": \"km\"\n            },\n            \"commission\": {\n                \"amount\": 1,\n                \"currency\": \"MYR\"\n            },\n            \"revenue\": {\n                \"amount\": 9,\n                \"currency\": \"MYR\"\n            },\n            \"service\": {\n                \"id\": 1,\n                \"companyId\": \"9caa4e01-04ac-4434-a794-f6cdbda90704\",\n                \"serviceCompanyId\": null,\n                \"name\": \"Same Day Delivery\",\n                \"code\": \"SDD\",\n                \"serviceGroupId\": 1,\n                \"status\": 1,\n                \"custDescription\": \"hahaC\",\n                \"driverInstruction\": \"hahaD\",\n                \"operationType\": null,\n                \"paymentMethod\": \"debit\",\n                \"multiWaypoint\": false,\n                \"plugin\": null,\n                \"consignmentLabelGroupId\": 1,\n                \"consignmentId\": null\n            }\n        }\n    ],\n    \"origin\": {\n        \"address1\": \"28 Jalan 5\",\n        \"address2\": \"Taman Mesra\",\n        \"city\": \"Kajang\",\n        \"state\": \"Selangor\",\n        \"postcode\": \"43000\",\n        \"country\": \"MY\"\n    },\n    \"destination\": {\n        \"address1\": \"USM Penang\",\n        \"address2\": \"-\",\n        \"city\": \"Gelugor\",\n        \"state\": \"Penang\",\n        \"postcode\": \"11800\",\n        \"country\": \"MY\"\n    },\n    \"perf\": \"2080.09175 ms\"\n}"}],"_postman_id":"80cd6a2a-7758-466c-a866-95ae56713469"}],"id":"eaa01f94-b465-428b-b3b8-8d205687dd38","_postman_id":"eaa01f94-b465-428b-b3b8-8d205687dd38","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{currentAccessToken}}"}]},"isInherited":true,"source":{"_postman_id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","name":"DelyvaX SaaS","type":"collection"}}},{"name":"Create Order","item":[{"name":"Create Order","event":[{"listen":"prerequest","script":{"id":"a1a9be08-9f2f-4889-aab6-76bc617fe125","exec":["// pm.environment.set('API_ENDPOINT', 'https://staging-api.delyva.com');","pm.environment.set('API_ENDPOINT', 'localhost:3000');"],"type":"text/javascript"}}],"id":"36aa5c0c-f35b-4ca0-b348-28d2de9ae403","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"customerId\": \"123\",\n    \"process\": true,\n    \"serviceCode\": \"SERVICECODE_FROM_PRICE_QUOTE\",\n    \"origin\": {\n        \"scheduledAt\": \"2020-12-24T12:00:00+0800\",\n        \"inventory\": [\n            {\n                \"name\": \"Mee Kari\",\n                \"type\": \"PARCEL\",\n                \"price\": {\n                    \"amount\": \"10.50\",\n                    \"currency\": \"MYR\"\n                },\n                \"weight\": {\n                    \"value\": 1,\n                    \"unit\": \"kg\"\n                },\n                \"dimension\": {\n                    \"width\": 10,\n                    \"height\": 11,\n                    \"length\": 12,\n                    \"unit\": \"cm\"\n                },\n                \"quantity\": 1,\n                \"description\": \"\"\n            },\n            {\n                \"name\": \"Ayam Goreng\",\n                \"type\": \"PARCEL\",\n                \"price\": {\n                    \"amount\": \"8.00\",\n                    \"currency\": \"MYR\"\n                },\n                \"weight\": {\n                    \"value\": 500,\n                    \"unit\": \"g\"\n                },\n                \"dimension\": {\n                    \"width\": 10,\n                    \"height\": 11,\n                    \"length\": 12,\n                    \"unit\": \"cm\"\n                },\n                \"quantity\": 1,\n                \"description\": \"\"\n            }\n        ],\n        \"contact\": {\n            \"name\": \"Test Sender\",\n            \"email\": \"test@gmail.com\",\n            \"phone\": \"60124433300\",\n            \"unitNo\": \"\",\n            \"address1\": \"157, Jalan Ampang\",\n            \"address2\": \"\",\n            \"city\": \"Wilayah Persekutuan\",\n            \"state\": \"Kuala Lumpur\",\n            \"postcode\": \"55000\",\n            \"country\": \"MY\",\n            \"coord\": {\n                \"lat\": \"3.013478\",\n                \"lon\": \"101.779682\"\n            }\n        }\n    },\n    \"destination\": {\n        \"inventory\": [\n            {\n                \"name\": \"Mee Kari\",\n                \"type\": \"PARCEL\",\n                \"price\": {\n                    \"amount\": \"10.50\",\n                    \"currency\": \"MYR\"\n                },\n                \"weight\": {\n                    \"value\": 1,\n                    \"unit\": \"kg\"\n                },\n                \"dimension\": {\n                    \"width\": 10,\n                    \"height\": 11,\n                    \"length\": 12,\n                    \"unit\": \"cm\"\n                },\n                \"quantity\": 1,\n                \"description\": \"\"\n            },\n            {\n                \"name\": \"Ayam Goreng\",\n                \"type\": \"PARCEL\",\n                \"price\": {\n                    \"amount\": \"8.00\",\n                    \"currency\": \"MYR\"\n                },\n                \"weight\": {\n                    \"value\": 500,\n                    \"unit\": \"g\"\n                },\n                \"dimension\": {\n                    \"width\": 10,\n                    \"height\": 11,\n                    \"length\": 12,\n                    \"unit\": \"cm\"\n                },\n                \"quantity\": 1,\n                \"description\": \"\"\n            }],\n            \"contact\": {\n                \"name\": \"Mr Receiver\",\n                \"email\": \"test@gmail.com\",\n                \"phone\": \"60124433300\",\n                \"mobile\": \"60124433300\",\n                \"unitNo\": \"6-8\",\n                \"address1\": \"MRT Sungai Jernih (SBK33)\",\n                \"address2\": \"1, Kampung Sungai Kantan\",\n                \"city\": \"Kajang\",\n                \"state\": \"Selangor\",\n                \"postcode\": \"43000\",\n                \"country\": \"MY\",\n                \"coord\": {\n                    \"lat\": \"3.013478\",\n                    \"lon\": \"101.779682\"\n                }\n            }\n        }\n}"},"url":"{{API_ENDPOINT}}/v1.0/order","description":"<p>* Consignment number wont be returned immediately, new order will first get in queue, it'll usually be processed immediately or within few seconds on peak hour.<br />* You can then get the consignment number with <code>GET /order/:orderId</code> or via <strong>order.created</strong> <a href=\"##a207fce6-44cb-43f6-aa30-e3234aedcb3d\">webhook</a><br />* <code>order.process = false</code> will save the order as draft, you can then process the order later with <a href=\"#60cb1f5e-f560-49ac-a8f0-2eae4a057ed6\">Process Order API</a><br />* <code>order.poll = true</code> will wait for the order to finished processing before responding, but please take note that if the time taken to process the order exceed 5 seconds, it'll return current order status. Make sure to check the statusCode returned is 100 (created).</p>\n<h2 id=\"standard-create-order-workflow\">Standard create order workflow</h2>\n<img src=\"https://cdn.delyva.app/api-docs/delyvax_create_order_recommended.png\" />\n\n<h3 id=\"polled-create-order-workflow\">Polled create order workflow</h3>\n<img src=\"https://cdn.delyva.app/api-docs/delyvax_create_order_polled2.png\" />\n\n<h1 id=\"request\">Request</h1>\n<h2 id=\"create-order-object\">Create order object</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>customerId</td>\n<td>number</td>\n<td>Y</td>\n<td>Customer ID (<strong>not</strong> User ID)</td>\n</tr>\n<tr>\n<td>waypoint</td>\n<td>array</td>\n<td>Y</td>\n<td>[order waypoint object]  <br />  <br />See: \"order waypoint object\"</td>\n</tr>\n<tr>\n<td>origin</td>\n<td>object</td>\n<td>N</td>\n<td>Equivalent to <code>waypoint: [{ type: 'PICKUP', ...origin }]</code></td>\n</tr>\n<tr>\n<td>destination</td>\n<td>object</td>\n<td>N</td>\n<td>Equivalent to <code>waypoint: [{ type: 'DROPOFF', ...destination }]</code></td>\n</tr>\n<tr>\n<td>process</td>\n<td>boolean</td>\n<td>N</td>\n<td>false=save order as draft (default), true=process order</td>\n</tr>\n<tr>\n<td>poll</td>\n<td>boolean</td>\n<td>N</td>\n<td>false=return order data ASAP (default), true=will wait for order to finished processing (up to 5sec), then respond with latest order data</td>\n</tr>\n<tr>\n<td>serviceCode</td>\n<td>string</td>\n<td>Y</td>\n<td>Service code, from instant quote</td>\n</tr>\n<tr>\n<td>serviceAddon</td>\n<td>array</td>\n<td>N</td>\n<td>See \"Service addon object\"</td>\n</tr>\n<tr>\n<td>itemType</td>\n<td>string</td>\n<td>N</td>\n<td>Item type, eg: PARCEL. Default to PARCEL</td>\n</tr>\n<tr>\n<td>note</td>\n<td>string</td>\n<td>N</td>\n<td>Order note</td>\n</tr>\n<tr>\n<td>paymentMethodId</td>\n<td>number</td>\n<td>N</td>\n<td>Payment method ID</td>\n</tr>\n<tr>\n<td>billing</td>\n<td>object</td>\n<td>N</td>\n<td>billing object, billing details for order, will use customer details if blank</td>\n</tr>\n<tr>\n<td>promoCode</td>\n<td>string</td>\n<td>N</td>\n<td>Promotion code</td>\n</tr>\n<tr>\n<td>consignmentNo</td>\n<td>string</td>\n<td>N</td>\n<td>Tracking number, omit this field, will return after order created</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"order-waypoint-object\">Order waypoint object</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>inventory</td>\n<td>array</td>\n<td>Y</td>\n<td>See \"Order waypoint inventory object\"</td>\n</tr>\n<tr>\n<td>contact</td>\n<td>object</td>\n<td>Y</td>\n<td>See \"Order waypoint contact object\"</td>\n</tr>\n<tr>\n<td>type</td>\n<td>string</td>\n<td>Y</td>\n<td>waypoint type, valid type: - PICKUP - DROPOFF</td>\n</tr>\n<tr>\n<td>note</td>\n<td>strong</td>\n<td>N</td>\n<td>optional note to personnel at this waypoint</td>\n</tr>\n<tr>\n<td>scheduledAt</td>\n<td>string</td>\n<td>?</td>\n<td>ISO8601 Date or \"now\", Expected date and time at waypoint.</td>\n</tr>\n<tr>\n<td>placeId</td>\n<td>number</td>\n<td>N</td>\n<td>DelyvaX Hub/Place Id</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"order-waypoint-inventory-object\">Order waypoint inventory object</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>Y</td>\n<td>Inventory name</td>\n</tr>\n<tr>\n<td>type</td>\n<td>string</td>\n<td>Y</td>\n<td>Item type, eg: PARCEL, FOOD, from instant quote</td>\n</tr>\n<tr>\n<td>price</td>\n<td>object</td>\n<td>N</td>\n<td>intenvory price value,  <br />  <br />See: \"Inventory price object\"</td>\n</tr>\n<tr>\n<td>weight</td>\n<td>object</td>\n<td>Y</td>\n<td>Inventory weight  <br />  <br />See: \"Inventory weight object\"</td>\n</tr>\n<tr>\n<td>dimension</td>\n<td>object</td>\n<td>N</td>\n<td>See: \"Inventory dimension object\"</td>\n</tr>\n<tr>\n<td>quantity</td>\n<td>number</td>\n<td>N</td>\n<td>Inventory quantity, default to 1</td>\n</tr>\n<tr>\n<td>description</td>\n<td>string</td>\n<td>N</td>\n<td>Inventory description</td>\n</tr>\n<tr>\n<td>hsCode</td>\n<td>string</td>\n<td>N</td>\n<td><a href=\"https://en.wikipedia.org/wiki/Harmonized_System\">HS Code</a></td>\n</tr>\n<tr>\n<td>mpcId</td>\n<td>string</td>\n<td>N</td>\n<td>Pieces group id</td>\n</tr>\n<tr>\n<td>action</td>\n<td>(P,D,T)</td>\n<td>N</td>\n<td>Not in use</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"order-waypoint-contact-object\">Order waypoint contact object</h3>\n<p><em>coord</em> is <strong>required</strong> for on-demand courier (eg: Lalamove, GrabExpress)</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>Y</td>\n<td>Contact person name</td>\n</tr>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>N</td>\n<td>Only valid email is accepted</td>\n</tr>\n<tr>\n<td>phone</td>\n<td>string</td>\n<td>Y</td>\n<td>Phone number, preferrably mobile number</td>\n</tr>\n<tr>\n<td>unitNo</td>\n<td>string</td>\n<td>N</td>\n<td>Unit no/building name</td>\n</tr>\n<tr>\n<td>address1</td>\n<td>string</td>\n<td>Y</td>\n<td>Address line 1</td>\n</tr>\n<tr>\n<td>address2</td>\n<td>string</td>\n<td>N</td>\n<td>Address line 2</td>\n</tr>\n<tr>\n<td>city</td>\n<td>string</td>\n<td>N</td>\n<td>City</td>\n</tr>\n<tr>\n<td>state</td>\n<td>string</td>\n<td>N</td>\n<td>State</td>\n</tr>\n<tr>\n<td>country</td>\n<td>string</td>\n<td>N</td>\n<td>ISO 3166-1 alpha-2, Country code</td>\n</tr>\n<tr>\n<td>coord</td>\n<td>object</td>\n<td>N</td>\n<td>WGS84, SRID 4326. <code>{ lat: xxx, lon: xxx }</code></td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"inventory-weight-object\">Inventory Weight Object</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>unit</td>\n<td>string</td>\n<td>Y</td>\n<td>Weight unit, eg: kg, g</td>\n</tr>\n<tr>\n<td>value</td>\n<td>float</td>\n<td>Y</td>\n<td>Weight value</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"inventory-dimension-object\">Inventory Dimension Object</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>unit</td>\n<td>string</td>\n<td>Y</td>\n<td>unit, eg: cm, m</td>\n</tr>\n<tr>\n<td>width</td>\n<td>float</td>\n<td>Y</td>\n<td>Width value</td>\n</tr>\n<tr>\n<td>length</td>\n<td>float</td>\n<td>Y</td>\n<td>Length value</td>\n</tr>\n<tr>\n<td>height</td>\n<td>float</td>\n<td>Y</td>\n<td>Height value</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"inventory-price-object\">Inventory Price Object</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>amount</td>\n<td>float</td>\n<td>Y</td>\n<td>Currency amount</td>\n</tr>\n<tr>\n<td>currency</td>\n<td>string</td>\n<td>Y</td>\n<td>ISO 4217</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h1 id=\"response\">Response</h1>\n<h2 id=\"success-response\">Success Response</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>error</td>\n<td><strong>Error</strong></td>\n<td>Single error message</td>\n</tr>\n<tr>\n<td>errors</td>\n<td>array (<strong>Error</strong>)</td>\n<td>List of error messages (empty if OK).</td>\n</tr>\n<tr>\n<td>data</td>\n<td>object (<strong>Data</strong>)</td>\n<td>Main response payload</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"error\">Error</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>error</td>\n<td><code>{ message }</code></td>\n<td>Human-readable error message.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"data-standard-async-response\">Data (Standard Async Response)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>orderId</td>\n<td>string</td>\n<td>Delyva Order UUID. Please save this.</td>\n</tr>\n<tr>\n<td>status</td>\n<td>string Enum</td>\n<td>Order status (Deprecated, please use statusCode instead)</td>\n</tr>\n<tr>\n<td>statusCode</td>\n<td>integer</td>\n<td>Order status code</td>\n</tr>\n<tr>\n<td>invoiceId</td>\n<td>string</td>\n<td>Order invoice id</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"data-non-async-response--polltrue\">Data (Non-async Response | poll=true)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>string</td>\n<td>Order UUID. Please save this</td>\n</tr>\n<tr>\n<td>orderId</td>\n<td>string</td>\n<td>Order ID (same as id)</td>\n</tr>\n<tr>\n<td>nanoId</td>\n<td>string</td>\n<td>Short ID</td>\n</tr>\n<tr>\n<td>extId</td>\n<td>string</td>\n<td>External ID</td>\n</tr>\n<tr>\n<td>extId2</td>\n<td>string</td>\n<td>Secondary external ID</td>\n</tr>\n<tr>\n<td>consignmentNo</td>\n<td>string</td>\n<td>Carrier tracking number (use to track shipment)</td>\n</tr>\n<tr>\n<td>subConsignmentNo</td>\n<td>array (string)</td>\n<td>Sub-consignment numbers, for multi pieces</td>\n</tr>\n<tr>\n<td>statusCode</td>\n<td>integer</td>\n<td>Order status code (should be 100)</td>\n</tr>\n<tr>\n<td>companyId</td>\n<td>string</td>\n<td>Company UUID</td>\n</tr>\n<tr>\n<td>userId</td>\n<td>string</td>\n<td>User UUID</td>\n</tr>\n<tr>\n<td>customerId</td>\n<td>integer</td>\n<td>Customer ID</td>\n</tr>\n<tr>\n<td>serviceId</td>\n<td>integer</td>\n<td>Service ID</td>\n</tr>\n<tr>\n<td>serviceCode</td>\n<td>string</td>\n<td>Service code</td>\n</tr>\n<tr>\n<td>price</td>\n<td><strong>Money</strong></td>\n<td>Order price</td>\n</tr>\n<tr>\n<td>distance</td>\n<td><strong>Distance</strong></td>\n<td>Distance</td>\n</tr>\n<tr>\n<td>weight</td>\n<td><strong>Weight</strong></td>\n<td>Total weight</td>\n</tr>\n<tr>\n<td>cod</td>\n<td><strong>Money</strong></td>\n<td>Cash on delivery amount</td>\n</tr>\n<tr>\n<td>insurance</td>\n<td><strong>Money</strong></td>\n<td>Insurance amount</td>\n</tr>\n<tr>\n<td>paymentTerm</td>\n<td>string</td>\n<td>Payment term. Enum: \"credit\", \"debit\"</td>\n</tr>\n<tr>\n<td>itemType</td>\n<td>string</td>\n<td>Item type.</td>\n</tr>\n<tr>\n<td>itemTypeId</td>\n<td>integer</td>\n<td>Item type ID</td>\n</tr>\n<tr>\n<td>dimension</td>\n<td><strong>Dimension</strong></td>\n<td>Package dimensions</td>\n</tr>\n<tr>\n<td>status</td>\n<td>string</td>\n<td>Order status (Deprecated, please use statusCode instead)</td>\n</tr>\n<tr>\n<td>createdAt</td>\n<td>string (ISO 8601)</td>\n<td>Order creation datetime</td>\n</tr>\n<tr>\n<td>updatedAt</td>\n<td>string (ISO 8601)</td>\n<td>Last update datetime</td>\n</tr>\n<tr>\n<td>deletedAt</td>\n<td>string (ISO 8601)</td>\n<td>Deletion datetime</td>\n</tr>\n<tr>\n<td>promoCode</td>\n<td>string</td>\n<td>Applied promo code</td>\n</tr>\n<tr>\n<td>vehicleId</td>\n<td>integer</td>\n<td>Vehicle ID</td>\n</tr>\n<tr>\n<td>invoiceId</td>\n<td>string</td>\n<td>Invoice ID</td>\n</tr>\n<tr>\n<td>discountPrice</td>\n<td>string</td>\n<td>Discount amount</td>\n</tr>\n<tr>\n<td>discount</td>\n<td>string</td>\n<td>Discount percentage</td>\n</tr>\n<tr>\n<td>personnelId</td>\n<td>integer</td>\n<td>Personnel ID</td>\n</tr>\n<tr>\n<td>note</td>\n<td>string</td>\n<td>Order notes</td>\n</tr>\n<tr>\n<td>extIdType</td>\n<td>string</td>\n<td>External ID type</td>\n</tr>\n<tr>\n<td>serviceAddon</td>\n<td>array (<strong>ServiceAddon</strong>)</td>\n<td>Applied service add-ons</td>\n</tr>\n<tr>\n<td>rating</td>\n<td>integer</td>\n<td>Order rating</td>\n</tr>\n<tr>\n<td>ratingNote</td>\n<td>string</td>\n<td>Rating notes</td>\n</tr>\n<tr>\n<td>agentCommission</td>\n<td><strong>Money</strong></td>\n<td>Agent commission</td>\n</tr>\n<tr>\n<td>billing</td>\n<td><strong>BillingAddress</strong></td>\n<td>Billing address</td>\n</tr>\n<tr>\n<td>paymentMethodId</td>\n<td>integer</td>\n<td>Payment method ID</td>\n</tr>\n<tr>\n<td>cancelledReason</td>\n<td>string</td>\n<td>Cancellation reason</td>\n</tr>\n<tr>\n<td>source</td>\n<td>string</td>\n<td>Order source</td>\n</tr>\n<tr>\n<td>promoValue</td>\n<td>string</td>\n<td>Promo value</td>\n</tr>\n<tr>\n<td>metadata</td>\n<td>object</td>\n<td>Additional metadata</td>\n</tr>\n<tr>\n<td>personnel</td>\n<td>object</td>\n<td>Personnel details</td>\n</tr>\n<tr>\n<td>commodityId</td>\n<td>string</td>\n<td>Commodity ID</td>\n</tr>\n<tr>\n<td>pluginId</td>\n<td>integer</td>\n<td>Plugin ID</td>\n</tr>\n<tr>\n<td>surcharge</td>\n<td>string</td>\n<td>Surcharge amount</td>\n</tr>\n<tr>\n<td>requestPickup</td>\n<td>string</td>\n<td>Pickup request details</td>\n</tr>\n<tr>\n<td>extTrackUrl</td>\n<td>string</td>\n<td>External tracking URL</td>\n</tr>\n<tr>\n<td>ip</td>\n<td>string</td>\n<td>Client IP address address</td>\n</tr>\n<tr>\n<td>referenceNo</td>\n<td>string</td>\n<td>Reference number</td>\n</tr>\n<tr>\n<td>pickupManifestId</td>\n<td>integer</td>\n<td>Pickup manifest ID</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"dimension\">Dimension</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>unit</td>\n<td>string</td>\n<td>Unit of measure (e.g., \"cm\")</td>\n</tr>\n<tr>\n<td>width</td>\n<td>number</td>\n<td>Package width</td>\n</tr>\n<tr>\n<td>height</td>\n<td>number</td>\n<td>Package height</td>\n</tr>\n<tr>\n<td>length</td>\n<td>number</td>\n<td>Package length</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"serviceaddon\">ServiceAddon</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>integer</td>\n<td>Add-on ID</td>\n</tr>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>Add-on name</td>\n</tr>\n<tr>\n<td>price</td>\n<td><strong>Money</strong></td>\n<td>Add-on price</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"billingaddress\">BillingAddress</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>city</td>\n<td>string</td>\n<td>City</td>\n</tr>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>Contact name</td>\n</tr>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>Email address</td>\n</tr>\n<tr>\n<td>phone</td>\n<td>string</td>\n<td>Phone number</td>\n</tr>\n<tr>\n<td>state</td>\n<td>string</td>\n<td>State/region</td>\n</tr>\n<tr>\n<td>mobile</td>\n<td>string</td>\n<td>Mobile number</td>\n</tr>\n<tr>\n<td>unitNo</td>\n<td>string</td>\n<td>Unit number</td>\n</tr>\n<tr>\n<td>country</td>\n<td>string(2)</td>\n<td>ISO 3166-1 alpha-2 country code</td>\n</tr>\n<tr>\n<td>address1</td>\n<td>string</td>\n<td>Address line 1</td>\n</tr>\n<tr>\n<td>address2</td>\n<td>string</td>\n<td>Address line 2</td>\n</tr>\n<tr>\n<td>postcode</td>\n<td>string</td>\n<td>Postal code</td>\n</tr>\n</tbody>\n</table>\n</div>","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{currentAccessToken}}"}]},"isInherited":true,"source":{"_postman_id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","name":"DelyvaX SaaS","type":"collection"}},"urlObject":{"path":["v1.0","order"],"host":["{{API_ENDPOINT}}"],"query":[],"variable":[]}},"response":[{"id":"fb5fcb6f-e64a-4a6b-9b3d-412f69e16e99","name":"Create Order","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"customerId\": \"123\",\n    \"process\": true,\n    \"serviceCode\": \"SERVICECODE_FROM_PRICE_QUOTE\",\n    \"origin\": {\n        \"scheduledAt\": \"2020-12-24T12:00:00+0800\",\n        \"inventory\": [\n            {\n                \"name\": \"Mee Kari\",\n                \"type\": \"PARCEL\",\n                \"price\": {\n                    \"amount\": \"10.50\",\n                    \"currency\": \"MYR\"\n                },\n                \"weight\": {\n                    \"value\": 1,\n                    \"unit\": \"kg\"\n                },\n                \"dimension\": {\n                    \"width\": 10,\n                    \"height\": 11,\n                    \"length\": 12,\n                    \"unit\": \"cm\"\n                },\n                \"quantity\": 1,\n                \"description\": \"\"\n            },\n            {\n                \"name\": \"Ayam Goreng\",\n                \"type\": \"PARCEL\",\n                \"price\": {\n                    \"amount\": \"8.00\",\n                    \"currency\": \"MYR\"\n                },\n                \"weight\": {\n                    \"value\": 500,\n                    \"unit\": \"g\"\n                },\n                \"dimension\": {\n                    \"width\": 10,\n                    \"height\": 11,\n                    \"length\": 12,\n                    \"unit\": \"cm\"\n                },\n                \"quantity\": 1,\n                \"description\": \"\"\n            }\n        ],\n        \"contact\": {\n            \"name\": \"Test Sender\",\n            \"email\": \"test@gmail.com\",\n            \"phone\": \"60124433300\",\n            \"unitNo\": \"\",\n            \"address1\": \"157, Jalan Ampang\",\n            \"address2\": \"\",\n            \"city\": \"Wilayah Persekutuan\",\n            \"state\": \"Kuala Lumpur\",\n            \"postcode\": \"55000\",\n            \"country\": \"MY\",\n            \"coord\": {\n                \"lat\": \"3.013478\",\n                \"lon\": \"101.779682\"\n            }\n        }\n    },\n    \"destination\": {\n        \"inventory\": [\n            {\n                \"name\": \"Mee Kari\",\n                \"type\": \"PARCEL\",\n                \"price\": {\n                    \"amount\": \"10.50\",\n                    \"currency\": \"MYR\"\n                },\n                \"weight\": {\n                    \"value\": 1,\n                    \"unit\": \"kg\"\n                },\n                \"dimension\": {\n                    \"width\": 10,\n                    \"height\": 11,\n                    \"length\": 12,\n                    \"unit\": \"cm\"\n                },\n                \"quantity\": 1,\n                \"description\": \"\"\n            },\n            {\n                \"name\": \"Ayam Goreng\",\n                \"type\": \"PARCEL\",\n                \"price\": {\n                    \"amount\": \"8.00\",\n                    \"currency\": \"MYR\"\n                },\n                \"weight\": {\n                    \"value\": 500,\n                    \"unit\": \"g\"\n                },\n                \"dimension\": {\n                    \"width\": 10,\n                    \"height\": 11,\n                    \"length\": 12,\n                    \"unit\": \"cm\"\n                },\n                \"quantity\": 1,\n                \"description\": \"\"\n            }],\n            \"contact\": {\n                \"name\": \"Mr Receiver\",\n                \"email\": \"test@gmail.com\",\n                \"phone\": \"60124433300\",\n                \"mobile\": \"60124433300\",\n                \"unitNo\": \"6-8\",\n                \"address1\": \"MRT Sungai Jernih (SBK33)\",\n                \"address2\": \"1, Kampung Sungai Kantan\",\n                \"city\": \"Kajang\",\n                \"state\": \"Selangor\",\n                \"postcode\": \"43000\",\n                \"country\": \"MY\",\n                \"coord\": {\n                    \"lat\": \"3.013478\",\n                    \"lon\": \"101.779682\"\n                }\n            }\n        }\n}","options":{"raw":{"language":"json"}}},"url":"{{API_ENDPOINT}}/order"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Access-Control-Allow-Headers","value":"Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With"},{"key":"Access-Control-Allow-Methods","value":"GET,POST,PUT,PATCH,DELETE,COPY,OPTIONS"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Length","value":"113"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Fri, 18 Dec 2020 07:19:37 GMT"},{"key":"Etag","value":"W/\"71-p0DRnVLmEh75M92v/Dxcc2zW85s\""},{"key":"Vary","value":"Accept-Encoding"},{"key":"X-Delyvax-Api-Version","value":"1.0"},{"key":"X-Powered-By","value":"DelyvaX"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"orderId\": \"1c1d526f-1da3-4f4a-897f-93e82bdd3e3d\",\n        \"status\": \"processing\",\n        \"statusCode\": 0,\n        \"invoiceId\": null\n    }\n}"}],"_postman_id":"36aa5c0c-f35b-4ca0-b348-28d2de9ae403"},{"name":"Cancel Order","event":[{"listen":"prerequest","script":{"id":"f36d1cad-3d87-4927-830f-d930017c0cc5","exec":["// pm.environment.set('API_ENDPOINT', 'https://staging-api.delyva.com');",""],"type":"text/javascript"}}],"id":"fcdf8669-05f5-4e24-87b8-19834c91b45a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":""},"url":"{{API_ENDPOINT}}/v1.0/order/:orderId/cancel","description":"<p>This will cancel the order, and set order status code to 900.</p>\n<h2 id=\"cancellation-policy\">Cancellation Policy</h2>\n<ul>\n<li>Only when order status code is between <code>0</code> and <code>110</code>. </li>\n<li>Once order is assigned to personnel, and status changed to 200, you cannot cancel the order.</li>\n</ul>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{currentAccessToken}}"}]},"isInherited":true,"source":{"_postman_id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","name":"DelyvaX SaaS","type":"collection"}},"urlObject":{"path":["v1.0","order",":orderId","cancel"],"host":["{{API_ENDPOINT}}"],"query":[],"variable":[{"type":"string","value":"270bf29d-9574-474f-aae2-b351e5b511c0","key":"orderId"}]}},"response":[{"id":"529b436b-4d42-4642-992f-af3d4f9b97b3","name":"Cancel Order","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":""},"url":"{{API_ENDPOINT}}/order/270bf29d-9574-474f-aae2-b351e5b511c0/cancel"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": \"270bf29d-9574-474f-aae2-b351e5b511c0\",\n    \"companyId\": \"9caa4e01-04ac-4434-a794-f6cdbda90704\",\n    \"statusCode\": 900,\n    \"status\": \"cancelled\",\n    \"updatedAt\": \"2019-11-05T20:22:23.408Z\",\n    \"userId\": \"0beea380-fe48-11e9-9fa5-6977a8b97854\",\n    \"customerId\": 1,\n    \"serviceId\": 1,\n    \"price\": {\n        \"amount\": 4.3,\n        \"currency\": \"MYR\"\n    },\n    \"revenue\": {\n        \"amount\": 1,\n        \"currency\": \"MYR\"\n    },\n    \"commission\": {\n        \"amount\": 1,\n        \"currency\": \"MYR\"\n    },\n    \"distance\": {\n        \"unit\": \"mm\",\n        \"value\": 0\n    },\n    \"weight\": {\n        \"unit\": \"kg\",\n        \"value\": 1\n    },\n    \"cod\": null,\n    \"consignmentNo\": \"MM0000000015MY\",\n    \"paymentTerm\": \"credit\",\n    \"itemType\": \"PARCEL\",\n    \"itemTypeId\": null,\n    \"dimension\": null,\n    \"createdAt\": \"2019-11-05T02:27:12.997Z\",\n    \"deletedAt\": null,\n    \"serviceCode\": \"SDD\",\n    \"waypoint\": [\n        {\n            \"id\": \"wp_2E3xZ5rgqpSXfZFn2PF443\",\n            \"orderId\": \"270bf29d-9574-474f-aae2-b351e5b511c0\",\n            \"no\": 1,\n            \"inventory\": [\n                {\n                    \"name\": \"Pencil Box\",\n                    \"type\": \"parcel\",\n                    \"price\": {\n                        \"amount\": 10.5,\n                        \"currency\": \"MYR\"\n                    },\n                    \"weight\": {\n                        \"unit\": \"kg\",\n                        \"value\": 2\n                    },\n                    \"quantity\": 1,\n                    \"description\": \"Stationary\"\n                }\n            ],\n            \"contact\": {\n                \"city\": \"Setapak\",\n                \"name\": \"Test Sender\",\n                \"email\": \"test@gmail.com\",\n                \"phone\": \"60124433300\",\n                \"state\": \"Wilayah Persekutuan Kuala Lumpur\",\n                \"mobile\": \"60124433300\",\n                \"unitNo\": \"6-8\",\n                \"country\": \"Malaysia\",\n                \"address1\": \"Jalan 4/27a\",\n                \"address2\": \"Seksyen 2, Wangsa Maju\",\n                \"postcode\": \"53300\"\n            },\n            \"type\": \"DROPOFF\",\n            \"description\": null,\n            \"status\": \"pending\",\n            \"note\": null,\n            \"scheduledAt\": \"2019-11-12T08:23:57.000Z\",\n            \"createdAt\": \"2019-11-05T02:27:13.037Z\",\n            \"updatedAt\": \"2019-11-05T19:53:48.699Z\",\n            \"deletedAt\": null\n        },\n        {\n            \"id\": \"wp_3ioXRfaAqtjG9Mf99P7ZGF\",\n            \"orderId\": \"270bf29d-9574-474f-aae2-b351e5b511c0\",\n            \"no\": 1,\n            \"inventory\": [\n                {\n                    \"name\": \"Pencil Box\",\n                    \"type\": \"parcel\",\n                    \"price\": {\n                        \"amount\": 10.5,\n                        \"currency\": \"MYR\"\n                    },\n                    \"weight\": {\n                        \"unit\": \"kg\",\n                        \"value\": 1\n                    },\n                    \"quantity\": 1,\n                    \"description\": \"Stationary\"\n                }\n            ],\n            \"contact\": {\n                \"city\": \"Setapak\",\n                \"name\": \"Test Sender\",\n                \"email\": \"test@gmail.com\",\n                \"phone\": \"60124433300\",\n                \"state\": \"Wilayah Persekutuan Kuala Lumpur\",\n                \"mobile\": \"60124433300\",\n                \"unitNo\": \"6-8\",\n                \"country\": \"Malaysia\",\n                \"address1\": \"Jalan 4/27a\",\n                \"address2\": \"Seksyen 2, Wangsa Maju\",\n                \"postcode\": \"53300\"\n            },\n            \"type\": \"PICKUP\",\n            \"description\": null,\n            \"status\": \"pending\",\n            \"note\": null,\n            \"scheduledAt\": \"2019-11-11T08:23:57.000Z\",\n            \"createdAt\": \"2019-11-05T02:27:13.037Z\",\n            \"updatedAt\": \"2019-11-05T19:53:48.732Z\",\n            \"deletedAt\": null\n        }\n    ]\n}"}],"_postman_id":"fcdf8669-05f5-4e24-87b8-19834c91b45a"},{"name":"Print Label","event":[{"listen":"prerequest","script":{"id":"f36d1cad-3d87-4927-830f-d930017c0cc5","exec":["// pm.environment.set('API_ENDPOINT', 'https://staging-api.delyva.com');",""],"type":"text/javascript","packages":{}}}],"id":"ecfa14b6-ec03-4599-bc80-dc4ee672fab6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":""},"url":"{{API_ENDPOINT}}/v1.0/order/:orderId/label","urlObject":{"path":["v1.0","order",":orderId","label"],"host":["{{API_ENDPOINT}}"],"query":[],"variable":[{"type":"string","value":"270bf29d-9574-474f-aae2-b351e5b511c0","key":"orderId"}]}},"response":[],"_postman_id":"ecfa14b6-ec03-4599-bc80-dc4ee672fab6"},{"name":"Process/Confirm Order","event":[{"listen":"prerequest","script":{"id":"f36d1cad-3d87-4927-830f-d930017c0cc5","exec":["// pm.environment.set('API_ENDPOINT', 'https://staging-api.delyva.com');",""],"type":"text/javascript"}}],"id":"60cb1f5e-f560-49ac-a8f0-2eae4a057ed6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"serviceCode\": \"SDD\",\n\t\"originScheduledAt\": \"2019-11-11T08:23:57.000Z\",\n\t\"destinationScheduledAt\": \"2019-11-12T08:23:57.000Z\"\n}"},"url":"{{API_ENDPOINT}}/v1.0/order/:orderId/process","description":"<p>Use this API to processed draft order (order with statusCode 0).</p>\n<p>You can also use this to retry failed order (order with statusCode 99)</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{currentAccessToken}}"}]},"isInherited":true,"source":{"_postman_id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","name":"DelyvaX SaaS","type":"collection"}},"urlObject":{"path":["v1.0","order",":orderId","process"],"host":["{{API_ENDPOINT}}"],"query":[],"variable":[{"type":"string","value":"62b2a38b-1721-41eb-badb-f2bb2690ee19","key":"orderId"}]}},"response":[{"id":"dc6383fa-6d09-46f4-8928-d17e0521569a","name":"Process/Confirm Order","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"serviceCode\": \"SDD\",\n\t\"originScheduledAt\": \"2019-11-11T08:23:57.000Z\",\n\t\"destinationScheduledAt\": \"2019-11-12T08:23:57.000Z\"\n}"},"url":"{{API_ENDPOINT}}/order/270bf29d-9574-474f-aae2-b351e5b511c0/process"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"DelyvaX"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Access-Control-Allow-Methods","value":"GET,POST,PUT,PATCH,DELETE,COPY,OPTIONS"},{"key":"Access-Control-Allow-Headers","value":"Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"2136"},{"key":"ETag","value":"W/\"858-jx/OPz8z9E+l2MT/tYviVfLsSTM\""},{"key":"Date","value":"Tue, 05 Nov 2019 19:27:34 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"id\": \"270bf29d-9574-474f-aae2-b351e5b511c0\",\n        \"consignmentNo\": \"MM0000000006MY\",\n        \"companyId\": \"9caa4e01-04ac-4434-a794-f6cdbda90704\",\n        \"statusCode\": 100,\n        \"status\": \"created\",\n        \"updatedAt\": \"2019-11-05T19:27:34.018Z\",\n        \"userId\": \"0beea380-fe48-11e9-9fa5-6977a8b97854\",\n        \"customerId\": 1,\n        \"serviceId\": 1,\n        \"price\": {\n            \"amount\": 4.3,\n            \"currency\": \"MYR\"\n        },\n        \"revenue\": {\n            \"amount\": 1,\n            \"currency\": \"MYR\"\n        },\n        \"commission\": {\n            \"amount\": 1,\n            \"currency\": \"MYR\"\n        },\n        \"distance\": {\n            \"unit\": \"mm\",\n            \"value\": 0\n        },\n        \"weight\": {\n            \"unit\": \"kg\",\n            \"value\": 1\n        },\n        \"cod\": null,\n        \"paymentTerm\": \"credit\",\n        \"itemType\": \"PARCEL\",\n        \"itemTypeId\": null,\n        \"dimension\": null,\n        \"createdAt\": \"2019-11-05T02:27:12.997Z\",\n        \"deletedAt\": null,\n        \"serviceCode\": \"SDD\",\n        \"waypoint\": [\n            {\n                \"id\": \"wp_2E3xZ5rgqpSXfZFn2PF443\",\n                \"orderId\": \"270bf29d-9574-474f-aae2-b351e5b511c0\",\n                \"no\": 1,\n                \"inventory\": [\n                    {\n                        \"name\": \"Pencil Box\",\n                        \"type\": \"parcel\",\n                        \"price\": {\n                            \"amount\": 10.5,\n                            \"currency\": \"MYR\"\n                        },\n                        \"weight\": {\n                            \"unit\": \"kg\",\n                            \"value\": 2\n                        },\n                        \"quantity\": 1,\n                        \"description\": \"Stationary\"\n                    }\n                ],\n                \"contact\": {\n                    \"city\": \"Setapak\",\n                    \"name\": \"Test Sender\",\n                    \"email\": \"test@gmail.com\",\n                    \"phone\": \"60124433300\",\n                    \"state\": \"Wilayah Persekutuan Kuala Lumpur\",\n                    \"mobile\": \"60124433300\",\n                    \"unitNo\": \"6-8\",\n                    \"country\": \"Malaysia\",\n                    \"address1\": \"Jalan 4/27a\",\n                    \"address2\": \"Seksyen 2, Wangsa Maju\",\n                    \"postcode\": \"53300\"\n                },\n                \"type\": \"DROPOFF\",\n                \"description\": null,\n                \"status\": \"pending\",\n                \"note\": null,\n                \"scheduledAt\": \"2019-11-12T08:23:57.000Z\",\n                \"createdAt\": \"2019-11-05T02:27:13.037Z\",\n                \"updatedAt\": \"2019-11-05T19:27:32.484Z\",\n                \"deletedAt\": null\n            },\n            {\n                \"id\": \"wp_3ioXRfaAqtjG9Mf99P7ZGF\",\n                \"orderId\": \"270bf29d-9574-474f-aae2-b351e5b511c0\",\n                \"no\": 1,\n                \"inventory\": [\n                    {\n                        \"name\": \"Pencil Box\",\n                        \"type\": \"parcel\",\n                        \"price\": {\n                            \"amount\": 10.5,\n                            \"currency\": \"MYR\"\n                        },\n                        \"weight\": {\n                            \"unit\": \"kg\",\n                            \"value\": 1\n                        },\n                        \"quantity\": 1,\n                        \"description\": \"Stationary\"\n                    }\n                ],\n                \"contact\": {\n                    \"city\": \"Setapak\",\n                    \"name\": \"Test Sender\",\n                    \"email\": \"test@gmail.com\",\n                    \"phone\": \"60124433300\",\n                    \"state\": \"Wilayah Persekutuan Kuala Lumpur\",\n                    \"mobile\": \"60124433300\",\n                    \"unitNo\": \"6-8\",\n                    \"country\": \"Malaysia\",\n                    \"address1\": \"Jalan 4/27a\",\n                    \"address2\": \"Seksyen 2, Wangsa Maju\",\n                    \"postcode\": \"53300\"\n                },\n                \"type\": \"PICKUP\",\n                \"description\": null,\n                \"status\": \"pending\",\n                \"note\": null,\n                \"scheduledAt\": \"2019-11-11T08:23:57.000Z\",\n                \"createdAt\": \"2019-11-05T02:27:13.037Z\",\n                \"updatedAt\": \"2019-11-05T19:27:32.510Z\",\n                \"deletedAt\": null\n            }\n        ]\n    }\n}"}],"_postman_id":"60cb1f5e-f560-49ac-a8f0-2eae4a057ed6"},{"name":"Get Order Details","event":[{"listen":"prerequest","script":{"id":"9ac5107a-c665-4de7-a196-0058856ba68c","exec":["pm.environment.set('API_ENDPOINT', 'https://api.delyva.app');","// pm.environment.set('API_ENDPOINT', 'localhost:3000');"],"type":"text/javascript"}}],"id":"3c377e65-d121-4f18-b1b9-50573dce0876","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{API_ENDPOINT}}/order/:order_id","urlObject":{"path":["order",":order_id"],"host":["{{API_ENDPOINT}}"],"query":[],"variable":[{"type":"any","value":"","key":"order_id"}]}},"response":[{"id":"4b5145b9-ec79-47b9-ab08-5b408a2b501b","name":"Get Order Details","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{API_ENDPOINT}}/order/:order_id","host":["{{API_ENDPOINT}}"],"path":["order",":order_id"],"variable":[{"key":"order_id","value":"ca3ad567-4e50-4f7e-bb86-3732a1f1acfd"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Access-Control-Allow-Headers","value":"Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With"},{"key":"Access-Control-Allow-Methods","value":"GET,POST,PUT,PATCH,DELETE,COPY,OPTIONS"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Encoding","value":"gzip"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Fri, 30 Jul 2021 09:22:11 GMT"},{"key":"Etag","value":"W/\"c27-8JClaspLzoTxNHb5lFToIPj8FaE\""},{"key":"Vary","value":"Accept-Encoding"},{"key":"X-Delyvax-Api-Version","value":"1.0"},{"key":"X-Powered-By","value":"DelyvaX"},{"key":"Content-Length","value":"1147"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"id\": \"ca3ad567-4e50-4f7e-bb86-3732a1f1acfd\",\n        \"companyId\": \"9e0aed8a-5c67-42a4-82b6-e01bf7687f31\",\n        \"userId\": \"c2f29360-f62d-11ea-ba2e-99a2a4722cf9\",\n        \"customerId\": 414,\n        \"serviceId\": 297,\n        \"serviceCode\": \"TAXI-KV\",\n        \"price\": {\n            \"amount\": 4.33,\n            \"currency\": \"MYR\"\n        },\n        \"revenue\": {\n            \"amount\": 1.19,\n            \"currency\": \"MYR\"\n        },\n        \"commission\": {\n            \"amount\": 3.14,\n            \"currency\": \"MYR\"\n        },\n        \"distance\": {\n            \"unit\": \"km\",\n            \"value\": 2.42\n        },\n        \"weight\": {\n            \"unit\": \"kg\",\n            \"value\": 0.1\n        },\n        \"cod\": {\n            \"amount\": 0,\n            \"currency\": \"MYR\"\n        },\n        \"consignmentNo\": \"DM003675M\",\n        \"paymentTerm\": \"debit\",\n        \"itemType\": \"PARCEL\",\n        \"itemTypeId\": 14,\n        \"dimension\": {\n            \"unit\": \"cm\",\n            \"width\": 0,\n            \"height\": 0,\n            \"length\": 0\n        },\n        \"statusCode\": 110,\n        \"status\": \"ready\",\n        \"createdAt\": \"2021-05-04T23:28:21.705Z\",\n        \"updatedAt\": \"2021-05-06T13:59:27.793Z\",\n        \"deletedAt\": null,\n        \"failedReason\": \"\",\n        \"promoCode\": \"\",\n        \"vehicleId\": null,\n        \"invoiceId\": \"a8fbec6b-8ccf-47e1-ae40-30ad5fd68b25\",\n        \"discountPrice\": \"0.00\",\n        \"discount\": \"0.00\",\n        \"personnelId\": null,\n        \"note\": \"\",\n        \"extId\": \"\",\n        \"extIdType\": \"\",\n        \"serviceAddon\": [],\n        \"rating\": null,\n        \"ratingNote\": \"\",\n        \"agentCommission\": null,\n        \"billing\": {\n            \"city\": \"-\",\n            \"name\": \"-\",\n            \"email\": \"dev@delyva.com\",\n            \"phone\": \"60123456789\",\n            \"state\": \"Selangor\",\n            \"mobile\": \"\",\n            \"unitNo\": \"\",\n            \"country\": \"MY\",\n            \"address1\": \"-\",\n            \"address2\": \"-\",\n            \"postcode\": \"-\"\n        },\n        \"paymentMethodId\": 0,\n        \"cancelledReason\": null,\n        \"source\": \"web-customer-single\",\n        \"promoValue\": \"0.00\",\n        \"cron\": 0,\n        \"metadata\": {},\n        \"personnel\": null,\n        \"surcharge\": \"0.00\",\n        \"commodityId\": \"\",\n        \"pluginId\": null,\n        \"requestPickup\": false,\n        \"insurance\": null,\n        \"waypoint\": [\n            {\n                \"id\": \"wp_nE5tscYM1VMWVgMwGzUbhP\",\n                \"orderId\": \"ca3ad567-4e50-4f7e-bb86-3732a1f1acfd\",\n                \"no\": 1,\n                \"inventory\": [\n                    {\n                        \"name\": \"Parcel\",\n                        \"type\": \"PARCEL\",\n                        \"price\": {\n                            \"amount\": 0,\n                            \"currency\": \"MYR\"\n                        },\n                        \"action\": \"P\",\n                        \"weight\": {\n                            \"unit\": \"kg\",\n                            \"value\": 0.1\n                        },\n                        \"quantity\": 1,\n                        \"description\": \"-\"\n                    }\n                ],\n                \"contact\": {\n                    \"city\": \"Petaling Jaya\",\n                    \"name\": \"Ahmad\",\n                    \"coord\": {\n                        \"lat\": \"3.11283\",\n                        \"lon\": \"101.59857\"\n                    },\n                    \"phone\": \"60123456789\",\n                    \"state\": \"Selangor\",\n                    \"mobile\": \"60123456789\",\n                    \"country\": \"MY\",\n                    \"address1\": \"Ara Damansara\",\n                    \"postcode\": \"47301\",\n                    \"sortCode\": \"KV\"\n                },\n                \"type\": \"PICKUP\",\n                \"description\": \"-\",\n                \"status\": \"pending\",\n                \"note\": \"-\",\n                \"scheduledAt\": \"2021-05-04T23:28:21.723Z\",\n                \"createdAt\": \"2021-05-04T23:28:21.723Z\",\n                \"updatedAt\": \"2021-05-04T23:28:23.607Z\",\n                \"deletedAt\": null,\n                \"cash\": {\n                    \"amount\": 0,\n                    \"currency\": \"MYR\"\n                },\n                \"placeId\": null,\n                \"actualScheduledAt\": null,\n                \"startAt\": \"2021-05-04T16:00:21.723Z\",\n                \"actualStartAt\": null\n            },\n            {\n                \"id\": \"wp_rS2vgBusBQq9GLPztKUNmQ\",\n                \"orderId\": \"ca3ad567-4e50-4f7e-bb86-3732a1f1acfd\",\n                \"no\": 2,\n                \"inventory\": [\n                    {\n                        \"name\": \"Parcel\",\n                        \"type\": \"PARCEL\",\n                        \"price\": {\n                            \"amount\": 0,\n                            \"currency\": \"MYR\"\n                        },\n                        \"action\": \"D\",\n                        \"weight\": {\n                            \"unit\": \"kg\",\n                            \"value\": 0.1\n                        },\n                        \"quantity\": 1,\n                        \"description\": \"-\"\n                    }\n                ],\n                \"contact\": {\n                    \"city\": \"Petaling Jaya\",\n                    \"name\": \"Ali\",\n                    \"coord\": {\n                        \"lat\": \"3.1102867\",\n                        \"lon\": \"101.5857838\"\n                    },\n                    \"phone\": \"60123456789\",\n                    \"state\": \"Selangor\",\n                    \"mobile\": \"60123456789\",\n                    \"country\": \"MY\",\n                    \"address1\": \"Pacific Place, Ara Damansara\",\n                    \"postcode\": \"47301\",\n                    \"sortCode\": \"KV\"\n                },\n                \"type\": \"DROPOFF\",\n                \"description\": \"-\",\n                \"status\": \"pending\",\n                \"note\": \"-\",\n                \"scheduledAt\": \"2021-05-04T23:33:22.288Z\",\n                \"createdAt\": \"2021-05-04T23:28:21.723Z\",\n                \"updatedAt\": \"2021-05-04T23:28:23.607Z\",\n                \"deletedAt\": null,\n                \"cash\": {\n                    \"amount\": 0,\n                    \"currency\": \"MYR\"\n                },\n                \"placeId\": null,\n                \"actualScheduledAt\": null,\n                \"startAt\": \"2021-05-04T23:30:22.288Z\",\n                \"actualStartAt\": null\n            }\n        ],\n        \"paymentMethod\": \"Credit\"\n    }\n}"}],"_postman_id":"3c377e65-d121-4f18-b1b9-50573dce0876"},{"name":"Get list of payment method","event":[{"listen":"prerequest","script":{"id":"021d5fad-ff6d-49a0-bb15-77047423462d","exec":["// pm.environment.set(\"API_ENDPOINT\", \"https://staging-api.delyva.app\");","// pm.environment.set(\"API_ENDPOINT\", \"localhost:3000\");","// pm.environment.set(\"invoiceId\", \"50a7e23f-f62b-4bbd-8a99-ff0f930be54b\");"],"type":"text/javascript"}}],"id":"43cfb01c-85eb-4592-a741-09093bafa818","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{API_ENDPOINT}}/v1.0/order/paymentMethod","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{currentAccessToken}}"}]},"isInherited":true,"source":{"_postman_id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","name":"DelyvaX SaaS","type":"collection"}},"urlObject":{"path":["v1.0","order","paymentMethod"],"host":["{{API_ENDPOINT}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"43cfb01c-85eb-4592-a741-09093bafa818"}],"id":"f6a492da-8f82-42ce-9b34-3c27753755a3","description":"<p>Order status code</p>\n<p>You should atleast integrate status code in <strong>bold</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>0</td>\n<td>Draft</td>\n</tr>\n<tr>\n<td>10</td>\n<td>Payment pendin / processing</td>\n</tr>\n<tr>\n<td>11</td>\n<td>Unpaid order / Abandoned</td>\n</tr>\n<tr>\n<td><strong>99</strong></td>\n<td>Create order failed. Cust. account not charged</td>\n</tr>\n<tr>\n<td><strong>100</strong></td>\n<td>Order created. Cust. account charged</td>\n</tr>\n<tr>\n<td>110</td>\n<td>Order ready (Label printed)</td>\n</tr>\n<tr>\n<td><strong>200</strong></td>\n<td>Pending for collection / Assigned to driver</td>\n</tr>\n<tr>\n<td><strong>400</strong></td>\n<td>Pickup start</td>\n</tr>\n<tr>\n<td>450</td>\n<td>Arrived for pick-up</td>\n</tr>\n<tr>\n<td>475</td>\n<td>Pick-up failed</td>\n</tr>\n<tr>\n<td>500</td>\n<td>Pickup success / Collected (by courier)</td>\n</tr>\n<tr>\n<td>501</td>\n<td>On-hold</td>\n</tr>\n<tr>\n<td>555</td>\n<td>Hub check-in</td>\n</tr>\n<tr>\n<td>556</td>\n<td>Hub check-out</td>\n</tr>\n<tr>\n<td><strong>600</strong></td>\n<td>Delivery start</td>\n</tr>\n<tr>\n<td>625</td>\n<td>Arrived for deliver</td>\n</tr>\n<tr>\n<td>650</td>\n<td>Failed to deliver</td>\n</tr>\n<tr>\n<td>651</td>\n<td>Failed delivery - Lost/Damage</td>\n</tr>\n<tr>\n<td>661</td>\n<td>Returning to sender</td>\n</tr>\n<tr>\n<td>663</td>\n<td>Failed to return</td>\n</tr>\n<tr>\n<td><strong>700</strong></td>\n<td>Item Delivered / Collected (by recipient)</td>\n</tr>\n<tr>\n<td>701</td>\n<td>Item Returned</td>\n</tr>\n<tr>\n<td>654</td>\n<td>Failed - Driver cancel</td>\n</tr>\n<tr>\n<td><strong>655</strong></td>\n<td>Failed (generic/reason)</td>\n</tr>\n<tr>\n<td><strong>900</strong></td>\n<td>Order Cancelled</td>\n</tr>\n<tr>\n<td>1000</td>\n<td>Order completed</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"5d899b3d-f4f9-494d-a577-456f433648a5","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"0121cad3-c5a5-4f9d-9390-00152d30d3cb","type":"text/javascript","exec":[""]}}],"_postman_id":"f6a492da-8f82-42ce-9b34-3c27753755a3","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{currentAccessToken}}"}]},"isInherited":true,"source":{"_postman_id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","name":"DelyvaX SaaS","type":"collection"}}},{"name":"Tracking","item":[{"name":"Order history","event":[{"listen":"prerequest","script":{"id":"f36d1cad-3d87-4927-830f-d930017c0cc5","exec":["// pm.environment.set('API_ENDPOINT', 'https://staging-api.delyva.com');",""],"type":"text/javascript"}}],"id":"e37ca271-6e37-46db-9c2e-14ef0c97efdf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":""},"url":"{{API_ENDPOINT}}/v1.0/order/track/:consignmentNo?companyId=","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{currentAccessToken}}"}]},"isInherited":true,"source":{"_postman_id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","name":"DelyvaX SaaS","type":"collection"}},"urlObject":{"path":["v1.0","order","track",":consignmentNo"],"host":["{{API_ENDPOINT}}"],"query":[{"description":{"content":"<p>Required</p>\n","type":"text/plain"},"key":"companyId","value":""}],"variable":[{"description":{"content":"<p>Required</p>\n","type":"text/plain"},"type":"string","value":"","key":"consignmentNo"}]}},"response":[{"id":"e25eb835-91b6-4b42-96b0-282067f431b7","name":"200","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":""},"url":{"raw":"{{API_ENDPOINT}}/order/track/:consignmentNo?companyId=9e0aed8a-5c67-42a4-82b6-e01bf7687f31","host":["{{API_ENDPOINT}}"],"path":["order","track",":consignmentNo"],"query":[{"key":"companyId","value":"9e0aed8a-5c67-42a4-82b6-e01bf7687f31"}],"variable":[{"key":"consignmentNo","value":"DM000337M"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Access-Control-Allow-Headers","value":"Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With"},{"key":"Access-Control-Allow-Methods","value":"GET,POST,PUT,PATCH,DELETE,COPY,OPTIONS"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Encoding","value":"gzip"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Wed, 20 Jan 2021 02:13:39 GMT"},{"key":"Etag","value":"W/\"40d-w8Lk9nNKtnwR2pELwwjmcpYiCBI\""},{"key":"Vary","value":"Accept-Encoding"},{"key":"X-Delyvax-Api-Version","value":"1.0"},{"key":"X-Powered-By","value":"DelyvaX"},{"key":"Content-Length","value":"373"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": [\n        {\n            \"id\": 92497,\n            \"companyId\": \"9e0aed8a-5c67-42a4-82b6-e01bf7687f31\",\n            \"customerId\": 414,\n            \"orderId\": \"06660606-adcc-416e-b279-a57fd1fb987a\",\n            \"consignmentNo\": \"DM000337M\",\n            \"statusCode\": 400,\n            \"statusText\": null,\n            \"description\": \"In-transit by personnel\",\n            \"location\": \"-\",\n            \"createdAt\": \"2021-01-19T16:17:23.712Z\",\n            \"coord\": {\n                \"lon\": 101.7378658,\n                \"lat\": 3.1422749\n            }\n        },\n        {\n            \"id\": 92496,\n            \"companyId\": \"9e0aed8a-5c67-42a4-82b6-e01bf7687f31\",\n            \"customerId\": 414,\n            \"orderId\": \"06660606-adcc-416e-b279-a57fd1fb987a\",\n            \"consignmentNo\": \"DM000337M\",\n            \"statusCode\": 200,\n            \"statusText\": null,\n            \"description\": \"Pending collection by personnel\",\n            \"location\": \"-\",\n            \"createdAt\": \"2021-01-19T16:14:49.980Z\",\n            \"coord\": {\n                \"lon\": 101.7378658,\n                \"lat\": 3.1422749\n            }\n        },\n        {\n            \"id\": 92495,\n            \"companyId\": \"9e0aed8a-5c67-42a4-82b6-e01bf7687f31\",\n            \"customerId\": 414,\n            \"orderId\": \"06660606-adcc-416e-b279-a57fd1fb987a\",\n            \"consignmentNo\": \"DM000337M\",\n            \"statusCode\": 100,\n            \"statusText\": null,\n            \"description\": \"Record created\",\n            \"location\": \"-\",\n            \"createdAt\": \"2021-01-19T16:14:05.527Z\",\n            \"coord\": {\n                \"lon\": null,\n                \"lat\": null\n            }\n        }\n    ],\n    \"page\": 1,\n    \"limit\": 30,\n    \"rowTotal\": 3,\n    \"pageTotal\": 1\n}"}],"_postman_id":"e37ca271-6e37-46db-9c2e-14ef0c97efdf"},{"name":"ETA","event":[{"listen":"prerequest","script":{"id":"72e50fe1-df41-47ca-8e04-7ced553e8246","exec":["pm.environment.set('API_ENDPOINT', 'https://staging-api.delyva.app');","// pm.environment.set('API_ENDPOINT', 'localhost:3000');"],"type":"text/javascript"}}],"id":"896056bf-e580-438d-97cf-838899af7da5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"content-type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"companyId\": \"2cab0b07-7a5d-4971-aeba-5ffac537a455\",\n    \"consignmentNo\": \"000001913ASD\",\n    \"resultType\": \"latestFirst\"\n}"},"url":"{{API_ENDPOINT}}/v1.0/order/track","description":"<p><code>resultType=latestFirst</code> will return last status, old status is returned in <code>histories</code> attribute. </p>\n<p>Authentication is not required, but <strong>companyId</strong> is required. However companyId is <strong>optional</strong> if Bearer token is present.</p>\n<h2 id=\"estimated-time-arrival\">Estimated Time Arrival</h2>\n<p>This type of tracking will also return estimated time arrival when order is in statusCode <strong>400</strong> (in transit to pickup) or <strong>600</strong> (in transit for dropoff).</p>\n<p>If not applicable, <code>arrival</code> attribute will return as <code>null</code>.</p>\n<p>If estimation can't be calculated, distance and/or duration value will returned as <code>-1</code></p>\n<p><code>arrival.accuracy = 1</code> means, the estimation is the most accurate.</p>\n<p><code>arrival.accuracy = 0</code> means, the estimation is less accurate, due to many factor.</p>\n<h2 id=\"request-attributes\">Request Attributes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>companyId</td>\n<td>uuid</td>\n<td>N</td>\n<td>Required if no Authentication provided</td>\n</tr>\n<tr>\n<td>consignmentNo</td>\n<td>string</td>\n<td>Y</td>\n<td>consignment number</td>\n</tr>\n<tr>\n<td>resultType</td>\n<td>string</td>\n<td>Y</td>\n<td>always send <strong>latestFirst</strong></td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["v1.0","order","track"],"host":["{{API_ENDPOINT}}"],"query":[],"variable":[]}},"response":[{"id":"1f289a52-7fa9-4581-8b07-588d11837f21","name":"200","originalRequest":{"method":"POST","header":[{"key":"content-type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"companyId\": \"2cab0b07-7a5d-4971-aeba-5ffac537a455\",\n    \"consignmentNo\": \"000001913ASD\",\n    \"resultType\": \"latestFirst\"\n}"},"url":"{{API_ENDPOINT}}/v1.0/order/track"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Access-Control-Allow-Headers","value":"Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With"},{"key":"Access-Control-Allow-Methods","value":"GET,POST,PUT,PATCH,DELETE,COPY,OPTIONS"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Encoding","value":"gzip"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Mon, 28 Dec 2020 11:57:48 GMT"},{"key":"Etag","value":"W/\"59b-+UKMs1kXPead4u0UHa0y35uWS/k\""},{"key":"Vary","value":"Accept-Encoding"},{"key":"X-Delyvax-Api-Version","value":"1.0"},{"key":"X-Powered-By","value":"DelyvaX"},{"key":"Content-Length","value":"460"}],"cookie":[],"responseTime":null,"body":"{\n   \"data\":{\n      \"companyId\":\"2cab0b07-7a5d-4971-aeba-5ffac537a455\",\n      \"consignmentNo\":\"000001889ASD\",\n      \"statusCode\":600,\n      \"statusText\":\"In transit\",\n      \"description\":\"In-transit\",\n      \"coord\":{\n         \"lon\":101.7386138,\n         \"lat\":3.1413686\n      },\n      \"orderId\":\"3145da28-ceaf-46fd-a214-d1efc4eddf65\",\n      \"origin\":\"Subang Jaya, Selangor, MY\",\n      \"destination\":\"Kuala Lumpur, Wilayah Persekutuan Kuala Lumpur, MY\",\n      \"histories\":[\n         {\n            \"id\":3095,\n            \"companyId\":\"2cab0b07-7a5d-4971-aeba-5ffac537a455\",\n            \"customerId\":32,\n            \"orderId\":\"3145da28-ceaf-46fd-a214-d1efc4eddf65\",\n            \"consignmentNo\":\"000001889ASD\",\n            \"statusCode\":600,\n            \"statusText\":\"In transit\",\n            \"description\":\"In-transit\",\n            \"location\":\"-\",\n            \"createdAt\":\"2021-02-22T13:48:27.386Z\",\n            \"metadata\":{\n               \n            },\n            \"coord\":{\n               \"lon\":101.7386138,\n               \"lat\":3.1413686\n            }\n         },\n         {\n            \"id\":3094,\n            \"companyId\":\"2cab0b07-7a5d-4971-aeba-5ffac537a455\",\n            \"customerId\":32,\n            \"orderId\":\"3145da28-ceaf-46fd-a214-d1efc4eddf65\",\n            \"consignmentNo\":\"000001889ASD\",\n            \"statusCode\":500,\n            \"statusText\":\"Collected\",\n            \"description\":\"Collected by personnel\",\n            \"location\":\"-\",\n            \"createdAt\":\"2021-02-22T13:48:12.147Z\",\n            \"coord\":{\n               \"lon\":101.7386138,\n               \"lat\":3.1413686\n            }\n         },\n         {\n            \"id\":3093,\n            \"companyId\":\"2cab0b07-7a5d-4971-aeba-5ffac537a455\",\n            \"customerId\":32,\n            \"orderId\":\"3145da28-ceaf-46fd-a214-d1efc4eddf65\",\n            \"consignmentNo\":\"000001889ASD\",\n            \"statusCode\":450,\n            \"statusText\":\"Arrived for pick-up\",\n            \"description\":\"Personnel arrived for collection\",\n            \"location\":\"-\",\n            \"createdAt\":\"2021-02-22T13:47:25.388Z\",\n            \"coord\":{\n               \"lon\":101.7386138,\n               \"lat\":3.1413686\n            }\n         },\n         {\n            \"id\":3092,\n            \"companyId\":\"2cab0b07-7a5d-4971-aeba-5ffac537a455\",\n            \"customerId\":32,\n            \"orderId\":\"3145da28-ceaf-46fd-a214-d1efc4eddf65\",\n            \"consignmentNo\":\"000001889ASD\",\n            \"statusCode\":400,\n            \"statusText\":\"In transit for pick-up\",\n            \"description\":\"In-transit by personnel\",\n            \"location\":\"-\",\n            \"createdAt\":\"2021-02-22T13:47:06.636Z\",\n            \"coord\":{\n               \"lon\":101.7386138,\n               \"lat\":3.1413686\n            }\n         },\n         {\n            \"id\":2474,\n            \"companyId\":\"2cab0b07-7a5d-4971-aeba-5ffac537a455\",\n            \"customerId\":32,\n            \"orderId\":\"3145da28-ceaf-46fd-a214-d1efc4eddf65\",\n            \"consignmentNo\":\"000001889ASD\",\n            \"statusCode\":200,\n            \"statusText\":\"Pending for collection\",\n            \"description\":\"Pending collection by personnel\",\n            \"location\":\"-\",\n            \"createdAt\":\"2020-12-17T07:20:22.168Z\",\n            \"coord\":{\n               \"lon\":101.585503108799,\n               \"lat\":3.04290194150979\n            }\n         },\n         {\n            \"id\":2473,\n            \"companyId\":\"2cab0b07-7a5d-4971-aeba-5ffac537a455\",\n            \"customerId\":32,\n            \"orderId\":\"3145da28-ceaf-46fd-a214-d1efc4eddf65\",\n            \"consignmentNo\":\"000001889ASD\",\n            \"statusCode\":100,\n            \"statusText\":\"Record created\",\n            \"description\":null,\n            \"location\":\"-\",\n            \"createdAt\":\"2020-12-17T07:15:44.503Z\",\n            \"coord\":{\n               \"lon\":null,\n               \"lat\":null\n            }\n         }\n      ],\n      \"arrival\":{\n         \"distance\":{\n            \"value\":12407,\n            \"unit\":\"m\"\n         },\n         \"duration\":{\n            \"value\":1042,\n            \"unit\":\"s\"\n         },\n         \"accuracy\":0\n      },\n      \"invoiceId\":\"9f33d6a0-757d-460b-aad4-5ad1fe337ecd\",\n      \"originCoord\":{\n         \"lat\":3.042901941509791,\n         \"lon\":101.58550310879946\n      },\n      \"destinationCoord\":{\n         \"lat\":3.1176925,\n         \"lon\":101.6772474\n      },\n      \"personnel\":{\n         \"name\":\"Suhaimi Amir (Real)\",\n         \"phone\":\"60137777777\",\n         \"vehicleName\":\"Preve Gold\",\n         \"vehicleType\":\"CAR\",\n         \"vehicleRegNo\":\"WXB111\",\n         \"coord\":{\n            \"lon\":101.7386138,\n            \"lat\":3.1413686\n         }\n      }\n   }\n}"}],"_postman_id":"896056bf-e580-438d-97cf-838899af7da5"}],"id":"06c145d0-385c-4afe-a7bc-1f03cd7f1631","_postman_id":"06c145d0-385c-4afe-a7bc-1f03cd7f1631","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{currentAccessToken}}"}]},"isInherited":true,"source":{"_postman_id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","name":"DelyvaX SaaS","type":"collection"}}},{"name":"Billing","item":[{"name":"Print Invoice","event":[{"listen":"prerequest","script":{"id":"a13b4b2d-bbc7-401b-b76c-f4e839b947bd","exec":["// pm.environment.set(\"API_ENDPOINT\", \"https://staging-api.delyva.app\");","// pm.environment.set(\"API_ENDPOINT\", \"localhost:3000\");","// pm.environment.set(\"invoiceId\", \"50a7e23f-f62b-4bbd-8a99-ff0f930be54b\");"],"type":"text/javascript"}}],"id":"53e8a725-e535-4555-816c-0e6f281ed2bd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{API_ENDPOINT}}/v1.0/wallet/invoice/:id","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{currentAccessToken}}"}]},"isInherited":true,"source":{"_postman_id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","name":"DelyvaX SaaS","type":"collection"}},"urlObject":{"path":["v1.0","wallet","invoice",":id"],"host":["{{API_ENDPOINT}}"],"query":[],"variable":[{"id":"15af0f72-12c9-495f-83f8-4f94e89d8780","type":"string","value":"19628681-fec3-4f38-97f0-be678d2d37bc","key":"id"}]}},"response":[],"_postman_id":"53e8a725-e535-4555-816c-0e6f281ed2bd"},{"name":"Pay Invoice","event":[{"listen":"prerequest","script":{"id":"71de8203-d643-4325-99ce-efb84d4021f1","exec":["// pm.environment.set(\"API_ENDPOINT\", \"https://staging-api.delyva.app\");","// pm.environment.set(\"API_ENDPOINT\", \"localhost:3000\");",""],"type":"text/javascript"}}],"id":"937bafe0-55b5-4e5a-9f63-24cb7b17d392","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{API_ENDPOINT}}/v1.0/wallet/invoice/:invoiceId/payment/?doneUrl=https://redirect.user.to.here.after.payment/success","urlObject":{"path":["v1.0","wallet","invoice",":invoiceId","payment",""],"host":["{{API_ENDPOINT}}"],"query":[{"key":"doneUrl","value":"https://redirect.user.to.here.after.payment/success"}],"variable":[{"type":"string","value":"80a83460-748f-4635-9031-e7eaf5f6243d","key":"invoiceId"}]}},"response":[{"id":"ce236c42-54bf-4d5d-aab9-008c40ae0b83","name":"Success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"invoice\": {\n    \t\"invoiceTypeId\": \"1\",\n        \"anyId\": \"1\",\n        \"currency\": \"MYR\",\n        \"transactions\": [\n            {\n                \"id\": \"123\",\n                \"date\": \"2019-05-29\"\n            },\n            {\n                \"id\": \"1245\",\n                \"date\": \"2019-06-29\"\n            }\n        ],\n        \"status\": \"PAID\"\n    },\n    \"items\": [\n        {\n            \"name\": \"Ais Krim\",\n            \"qty\": 2,\n            \"price\": 25.9,\n            \"discount\": 0.1,\n            \"tax\": 0.06\n        },\n        {\n            \"name\": \"Kek\",\n            \"qty\": 3,\n            \"price\": 50.5,\n            \"discount\": 0.06,\n            \"tax\": 0.05\n        },\n        {\n            \"name\": \"Pisang\",\n            \"qty\": 3,\n            \"price\": 50.5,\n            \"discount\": 0.06,\n            \"tax\": 0.1\n        },\n        {\n            \"name\": \"Ayam Goreng\",\n            \"qty\": 3,\n            \"price\": 50.5,\n            \"discount\": 0.06,\n            \"tax\": 0.066\n        },\n        {\n            \"name\": \"Laksa\",\n            \"qty\": 3,\n            \"price\": 50.5,\n            \"discount\": 0.06,\n            \"tax\": 0.043\n        },\n        {\n            \"name\": \"Teh Ais\",\n            \"qty\": 5,\n            \"price\": 3,\n            \"discount\": 0.01,\n            \"tax\": 0.2\n        }\n    ]\n}"},"url":"{{API_ENDPOINT}}/wallet/invoice"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"DelyvaX"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Access-Control-Allow-Methods","value":"GET,POST,PUT,PATCH,DELETE,COPY,OPTIONS"},{"key":"Access-Control-Allow-Headers","value":"Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"2095"},{"key":"ETag","value":"W/\"82f-XdnknKyS7wtZ4gA3paz2apsgJ5k\""},{"key":"Date","value":"Mon, 22 Jul 2019 07:22:38 GMT"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"invoiceTypeId\": 1,\n        \"anyId\": 1,\n        \"currency\": \"MYR\",\n        \"transactions\": [\n            {\n                \"id\": \"123\",\n                \"date\": \"2019-05-29\"\n            },\n            {\n                \"id\": \"1245\",\n                \"date\": \"2019-06-29\"\n            }\n        ],\n        \"status\": \"PAID\",\n        \"companyId\": \"456911db-0d76-447f-9b0c-b40a451592c0\",\n        \"userId\": \"67c07a70-ac41-11e9-b15e-d913ecc038fa\",\n        \"date\": \"2019-07-22T07:22:38.757Z\",\n        \"dueAt\": \"2019-07-28T07:22:38.757Z\",\n        \"invoiceNo\": 2,\n        \"items\": [\n            {\n                \"id\": 1,\n                \"invoiceId\": \"3b229935-54bb-4a4d-854d-d907dd33a6fd\",\n                \"name\": \"Ais Krim\",\n                \"qty\": 2,\n                \"price\": \"25.90\",\n                \"tax\": \"0.06\",\n                \"discount\": \"0.10\",\n                \"date\": \"2019-07-22T07:22:38.760Z\",\n                \"deleted\": false,\n                \"created_at\": \"2019-07-22T07:22:38.760Z\",\n                \"updated_at\": \"2019-07-22T07:22:38.760Z\"\n            },\n            {\n                \"id\": 2,\n                \"invoiceId\": \"3b229935-54bb-4a4d-854d-d907dd33a6fd\",\n                \"name\": \"Kek\",\n                \"qty\": 3,\n                \"price\": \"50.50\",\n                \"tax\": \"0.05\",\n                \"discount\": \"0.06\",\n                \"date\": \"2019-07-22T07:22:38.760Z\",\n                \"deleted\": false,\n                \"created_at\": \"2019-07-22T07:22:38.760Z\",\n                \"updated_at\": \"2019-07-22T07:22:38.760Z\"\n            },\n            {\n                \"id\": 3,\n                \"invoiceId\": \"3b229935-54bb-4a4d-854d-d907dd33a6fd\",\n                \"name\": \"Pisang\",\n                \"qty\": 3,\n                \"price\": \"50.50\",\n                \"tax\": \"0.10\",\n                \"discount\": \"0.06\",\n                \"date\": \"2019-07-22T07:22:38.760Z\",\n                \"deleted\": false,\n                \"created_at\": \"2019-07-22T07:22:38.760Z\",\n                \"updated_at\": \"2019-07-22T07:22:38.760Z\"\n            },\n            {\n                \"id\": 4,\n                \"invoiceId\": \"3b229935-54bb-4a4d-854d-d907dd33a6fd\",\n                \"name\": \"Ayam Goreng\",\n                \"qty\": 3,\n                \"price\": \"50.50\",\n                \"tax\": \"0.07\",\n                \"discount\": \"0.06\",\n                \"date\": \"2019-07-22T07:22:38.760Z\",\n                \"deleted\": false,\n                \"created_at\": \"2019-07-22T07:22:38.760Z\",\n                \"updated_at\": \"2019-07-22T07:22:38.760Z\"\n            },\n            {\n                \"id\": 5,\n                \"invoiceId\": \"3b229935-54bb-4a4d-854d-d907dd33a6fd\",\n                \"name\": \"Laksa\",\n                \"qty\": 3,\n                \"price\": \"50.50\",\n                \"tax\": \"0.04\",\n                \"discount\": \"0.06\",\n                \"date\": \"2019-07-22T07:22:38.760Z\",\n                \"deleted\": false,\n                \"created_at\": \"2019-07-22T07:22:38.760Z\",\n                \"updated_at\": \"2019-07-22T07:22:38.760Z\"\n            },\n            {\n                \"id\": 6,\n                \"invoiceId\": \"3b229935-54bb-4a4d-854d-d907dd33a6fd\",\n                \"name\": \"Teh Ais\",\n                \"qty\": 5,\n                \"price\": \"3.00\",\n                \"tax\": \"0.20\",\n                \"discount\": \"0.01\",\n                \"date\": \"2019-07-22T07:22:38.760Z\",\n                \"deleted\": false,\n                \"created_at\": \"2019-07-22T07:22:38.760Z\",\n                \"updated_at\": \"2019-07-22T07:22:38.760Z\"\n            }\n        ],\n        \"id\": \"3b229935-54bb-4a4d-854d-d907dd33a6fd\",\n        \"totalPrice\": \"0.00\",\n        \"totalPaid\": \"0.00\",\n        \"deleted\": false,\n        \"created_at\": \"2019-07-22T07:22:38.760Z\",\n        \"updated_at\": \"2019-07-22T07:22:38.760Z\"\n    }\n}"}],"_postman_id":"937bafe0-55b5-4e5a-9f63-24cb7b17d392"}],"id":"17c2999c-698e-4a91-bf4e-ea103b689a13","_postman_id":"17c2999c-698e-4a91-bf4e-ea103b689a13","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{currentAccessToken}}"}]},"isInherited":true,"source":{"_postman_id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","name":"DelyvaX SaaS","type":"collection"}}},{"name":"Webhook","item":[{"name":"Subscribe to webhook","id":"276a0848-0ec0-4857-a732-762117aa402b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"event\": \"order_tracking.update\",\n\t\"url\": \"https://staging-api.delyva.app/webhook/test\"\n}"},"url":"{{API_ENDPOINT}}/v1.0/webhook","description":"<p>Attributes</p>\n<ul>\n<li>event</li>\n<li>url</li>\n</ul>\n","urlObject":{"path":["v1.0","webhook"],"host":["{{API_ENDPOINT}}"],"query":[],"variable":[]}},"response":[{"id":"4b4c2f71-7c54-40cb-b059-cb440cd898a9","name":"Create Webhook","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"event\": \"order_tracking.update\",\n\t\"url\": \"https://staging-api.delyva.app/webhook/test\"\n}","options":{"raw":{"language":"json"}}},"url":"{{API_ENDPOINT}}/webhook"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"event\": \"order_tracking.update\",\n        \"url\": \"https://staging-api.delyva.app/webhook/test\",\n        \"userId\": \"33aee880-003c-11ea-b96b-d53dda460f07\",\n        \"companyId\": \"2cab0b07-7a5d-4971-aeba-5ffac537a455\",\n        \"id\": 1,\n        \"customerId\": null,\n        \"status\": 1,\n        \"createdAt\": \"2020-01-16T18:07:33.858Z\",\n        \"updatedAt\": \"2020-01-16T18:07:33.858Z\",\n        \"deletedAt\": null\n    }\n}"}],"_postman_id":"276a0848-0ec0-4857-a732-762117aa402b"},{"name":"List of Subscribed webhook","id":"a315ac60-fe32-4c22-a01d-bbbb2f164ea3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"url":"{{API_ENDPOINT}}/v1.0/webhook","urlObject":{"path":["v1.0","webhook"],"host":["{{API_ENDPOINT}}"],"query":[],"variable":[]}},"response":[{"id":"66fb968a-fe70-4202-9de1-a9ceccc62535","name":"List of Webhook","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"event\": \"order_tracking.update\",\n\t\"url\": \"https://staging-api.delyva.app/webhook/test\"\n}"},"url":"{{API_ENDPOINT}}/webhook"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": [\n        {\n            \"id\": 1,\n            \"companyId\": \"2cab0b07-7a5d-4971-aeba-5ffac537a455\",\n            \"userId\": \"33aee880-003c-11ea-b96b-d53dda460f07\",\n            \"customerId\": null,\n            \"event\": \"order_tracking.update\",\n            \"url\": \"https://staging-api.delyva.app/webhook/test\",\n            \"status\": 1,\n            \"createdAt\": \"2020-01-16T18:07:33.858Z\",\n            \"updatedAt\": \"2020-01-16T18:07:33.858Z\"\n        }\n    ],\n    \"page\": 1,\n    \"limit\": 30,\n    \"rowTotal\": 1,\n    \"pageTotal\": 1\n}"}],"_postman_id":"a315ac60-fe32-4c22-a01d-bbbb2f164ea3"},{"name":"Get specific subscription","id":"5e8010c5-69a0-4e5c-90d5-9f3464c84fbf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"url":"{{API_ENDPOINT}}/v1.0/webhook/1?retrieve=queue","urlObject":{"path":["v1.0","webhook","1"],"host":["{{API_ENDPOINT}}"],"query":[{"key":"retrieve","value":"queue"}],"variable":[]}},"response":[{"id":"8cf148e5-98f0-4a52-8b99-9646028b5efe","name":"Get specific webhook","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"event\": \"order_tracking.update\",\n\t\"url\": \"https://staging-api.delyva.app/webhook/test\"\n}"},"url":{"raw":"{{API_ENDPOINT}}/webhook/1?retrieve=queue","host":["{{API_ENDPOINT}}"],"path":["webhook","1"],"query":[{"key":"retrieve","value":"queue"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"id\": 1,\n        \"companyId\": \"2cab0b07-7a5d-4971-aeba-5ffac537a455\",\n        \"userId\": \"33aee880-003c-11ea-b96b-d53dda460f07\",\n        \"customerId\": null,\n        \"event\": \"order_tracking.update\",\n        \"url\": \"https://staging-api.delyva.app/webhook/test\",\n        \"status\": 1,\n        \"createdAt\": \"2020-01-16T18:07:33.858Z\",\n        \"updatedAt\": \"2020-01-16T18:07:33.858Z\",\n        \"queue\": null\n    }\n}"}],"_postman_id":"5e8010c5-69a0-4e5c-90d5-9f3464c84fbf"},{"name":"Update webhook","id":"3777c0f2-0c24-45de-91a5-579cf8968d3d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PATCH","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"event\": \"order.created\",\n\t\"url\": \"https://staging-api.delyva.app/webhook/test\"\n}"},"url":"{{API_ENDPOINT}}/v1.0/webhook/1","description":"<p>Attributes</p>\n<ul>\n<li>event</li>\n<li>url</li>\n</ul>\n","urlObject":{"path":["v1.0","webhook","1"],"host":["{{API_ENDPOINT}}"],"query":[],"variable":[]}},"response":[{"id":"a25becd2-8a62-4a0d-ac6d-1e3709235fa7","name":"Update webhook","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"event\": \"order.created\",\n\t\"url\": \"https://staging-api.delyva.app/webhook/test\"\n}"},"url":"{{API_ENDPOINT}}/webhook/1"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Access-Control-Allow-Headers","value":"Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With"},{"key":"Access-Control-Allow-Methods","value":"GET,POST,PUT,PATCH,DELETE,COPY,OPTIONS"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Length","value":"316"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Thu, 16 Jan 2020 20:21:39 GMT"},{"key":"Etag","value":"W/\"13c-mYxJtRPEufv/vkEpGVOPj98gCAE\""},{"key":"Vary","value":"Accept-Encoding"},{"key":"X-Delyvax-Api-Version","value":"1.0"},{"key":"X-Powered-By","value":"DelyvaX"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"id\": 1,\n        \"companyId\": \"2cab0b07-7a5d-4971-aeba-5ffac537a455\",\n        \"userId\": \"33aee880-003c-11ea-b96b-d53dda460f07\",\n        \"customerId\": null,\n        \"event\": \"order.created\",\n        \"url\": \"https://staging-api.delyva.app/webhook/test\",\n        \"status\": 1,\n        \"createdAt\": \"2020-01-16T18:07:33.858Z\",\n        \"updatedAt\": \"2020-01-16T20:21:39.010Z\",\n        \"deletedAt\": null\n    }\n}"}],"_postman_id":"3777c0f2-0c24-45de-91a5-579cf8968d3d"}],"id":"a207fce6-44cb-43f6-aa30-e3234aedcb3d","description":"<p>You can use webhook subscriptions to receive notifications about particular events. After you've subscribed to a webhook, you can let your app execute code immediately after specific events occur, instead of having to make API calls periodically to check their status. For example, you can rely on webhooks to trigger an action in your app when order tracking has been updated, or when an order details is updated. By using webhooks subscriptions you can make fewer API calls overall, which makes sure that your apps are more efficient and update quickly.</p>\n<h1 id=\"how-it-works\">How it works?</h1>\n<p>After you configure a webhook subscription, the events that you specified will trigger a webhook notification each time they occur. This notification contains a JSON payload, and HTTP headers that provide context. For example, the <strong>order.created</strong> webhook includes the following headers:</p>\n<ul>\n<li><p>X-Delyvax-Event: <code>order.created</code></p>\n</li>\n<li><p>X-Delyvax-Hmac-Sha256: <code>0eGwdG9HEY/jFARUIr0BlYxhrp2dFRb5T3+ceQ3YUso=</code></p>\n</li>\n</ul>\n<p>Your application needs to respond with <code>200 (Success)</code> code within 30 seconds or it will assume the request has failed and will retry POSTing again several times an hour. DelyvaX will stop trying after 10 failed attempts.</p>\n<h1 id=\"verifying-webhook\">Verifying webhook</h1>\n<p>Webhooks created are verified by calculating a digital signature. Each webhook request includes a base64-encoded <strong>X-Delyvax-Hmac-SHA256</strong> header, which is generated using the user's api secret (user.apiSecret) along with the data sent in the request.</p>\n<p>To verify that the request came from DelyvaX, compute the HMAC digest according to the following algorithm and compare it to the value in the <strong>X-Delyvax-Hmac-SHA256 header</strong>. If they match, then you can be sure that the webhook was sent from DelyvaX.</p>\n<h2 id=\"example-expressjs\">Example (Express.js)</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-javascript\">router.post('/test', (req, res) =&gt; {\n  const apiSecret = '2fa0a5f9-c4f4-45b4-ac54-aa1cccfb8822';\n  const crypto = require('crypto');\n  const hash = crypto\n    .createHmac('sha256', apiSecret)\n    .update(JSON.stringify(req.body), 'utf8', 'hex')\n    .digest('base64');\n  const isVerified = (hash === req.headers['x-delyva-hmac-sha256']);\n  console.log(`Webhook verified: ${isVerified}`);\n  res.status(200).send('OK');\n});\n\n</code></pre>\n<h1 id=\"list-of-supported-webhook\">List of supported webhook</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Event</th>\n<th>Descriptions</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>order.created</td>\n<td>Order successfully created. (statusCode = 100)</td>\n</tr>\n<tr>\n<td>order.failed</td>\n<td>Order failed to create.</td>\n</tr>\n<tr>\n<td>order.updated</td>\n<td>Order details have updated.</td>\n</tr>\n<tr>\n<td>order_tracking.update</td>\n<td>There is a new tracking activity.</td>\n</tr>\n<tr>\n<td>order_tracking.change</td>\n<td>Same as <code>order_tracking.update</code> event, but only triggered when <code>statusCode</code> changed.</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"08476c1a-b7aa-4247-8066-416a04254fa0","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"9394f3c4-fe2b-4ce5-93d0-2a8ba98446f1","type":"text/javascript","exec":[""]}}],"_postman_id":"a207fce6-44cb-43f6-aa30-e3234aedcb3d","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{currentAccessToken}}"}]},"isInherited":true,"source":{"_postman_id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","name":"DelyvaX SaaS","type":"collection"}}},{"name":"Customer","item":[{"name":"Get customer details","id":"20d8148c-f170-4861-9a78-20bcd774f807","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"{{API_ENDPOINT}}/v1.0/customer","urlObject":{"path":["v1.0","customer"],"host":["{{API_ENDPOINT}}"],"query":[],"variable":[]}},"response":[{"id":"4eefa38f-f624-42f5-8e70-ac6c5c0638f9","name":"Get customer details","originalRequest":{"method":"GET","header":[],"url":"{{API_ENDPOINT}}/customer"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"id\": 111,\n        \"companyId\": \"2cab0b07-7a5d-4971-aeba-5ffac537a456\",\n        \"userId\": \"0766fbb0-514e-11ea-b59f-07ebdc3669bb\",\n        \"address1\": null,\n        \"address2\": \"\",\n        \"postcode\": null,\n        \"city\": null,\n        \"state\": null,\n        \"country\": null,\n        \"includedServices\": null,\n        \"excludedServices\": null,\n        \"availableServices\": null,\n        \"status\": 1,\n        \"deleted\": false,\n        \"created_at\": \"2020-02-17T06:35:55.944Z\",\n        \"updated_at\": \"2020-02-17T06:35:55.944Z\",\n        \"selectedServices\": null,\n        \"name\": null,\n        \"email\": null,\n        \"phone\": null,\n        \"billing\": {\n            \"maxCredit\": 2000,\n            \"paymentTerm\": \"credit\",\n            \"billingSendEmail\": true\n        },\n        \"dob\": null,\n        \"industry\": null,\n        \"type\": null,\n        \"identityNo\": null,\n        \"websiteUrl\": null,\n        \"commission\": \"0\",\n        \"maxDiscount\": \"0\",\n        \"ref\": null,\n        \"customerBankDetails\": [],\n        \"walletBalance\": 0\n    }\n}"}],"_postman_id":"20d8148c-f170-4861-9a78-20bcd774f807"}],"id":"de5eccb5-f421-45ab-81ea-2f8d3e15c323","_postman_id":"de5eccb5-f421-45ab-81ea-2f8d3e15c323","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{currentAccessToken}}"}]},"isInherited":true,"source":{"_postman_id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","name":"DelyvaX SaaS","type":"collection"}}},{"name":"Demo","item":[{"name":"0. Get Customer Details","event":[{"listen":"prerequest","script":{"id":"ca483e45-32bf-4091-b095-bf588ceb454b","exec":["pm.environment.set(\"API_ENDPOINT\", \"https://api.delyva.app\");","//pm.environment.set(\"API_ENDPOINT\", \"localhost:3000\");",""],"type":"text/javascript"}}],"id":"5f80f3c0-f91c-48db-95a5-ee173a7bf954","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"{{API_ENDPOINT}}/customer","urlObject":{"path":["customer"],"host":["{{API_ENDPOINT}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"5f80f3c0-f91c-48db-95a5-ee173a7bf954"},{"name":"1. Get Price Quote","event":[{"listen":"prerequest","script":{"id":"6c08fe7a-5f74-47b6-bcc9-959d60d1aed0","exec":["pm.environment.set(\"API_ENDPOINT\", \"https://api.delyva.app\");","// pm.environment.set(\"API_ENDPOINT\", \"localhost:3000\");"],"type":"text/javascript"}}],"id":"39f74178-9d67-4143-be45-9ef5e5be9c55","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"customerId\": 123,\n    \"weight\": {\n        \"unit\": \"kg\",\n        \"value\": 1\n    },\n    \"serviceCode\": \"NDD\",\n    \"waypoint\": [\n        {\n            \"type\": \"PICKUP\",\n            \"address1\": \"157, Jalan Ampang\",\n            \"address2\": \"\",\n            \"city\": \"Wilayah Persekutuan\",\n            \"state\": \"Kuala Lumpur\",\n            \"postcode\": \"55000\",\n            \"country\": \"MY\",\n            \"scheduledAt\": \"2020-12-24T12:00:00+0800\"\n        },\n        {\n            \"type\": \"DROPOFF\",\n            \"address1\": \"MRT Sungai Jernih (SBK33)\",\n            \"address2\": \"1, Kampung Sungai Kantan\",\n            \"city\": \"Kajang\",\n            \"state\": \"Selangor\",\n            \"postcode\": \"43000\",\n            \"country\": \"MY\",\n            \"scheduledAt\": \"2020-12-24T13:00:00+0800\"\n        }\n    ]\n}"},"url":"{{API_ENDPOINT}}/service/instantQuote/:orderId?","urlObject":{"path":["service","instantQuote",":orderId"],"host":["{{API_ENDPOINT}}"],"query":[{"key":"","value":null}],"variable":[{"type":"string","value":"","key":"orderId"}]}},"response":[{"id":"2e44c55e-dd96-4163-8369-0bc9ece30f7b","name":"Get Price Quote","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"customerId\": 123,\n    \"weight\": {\n        \"unit\": \"kg\",\n        \"value\": 1\n    },\n    \"serviceCode\": \"NDD\",\n    \"waypoint\": [\n        {\n            \"type\": \"PICKUP\",\n            \"address1\": \"157, Jalan Ampang\",\n            \"address2\": \"\",\n            \"city\": \"Wilayah Persekutuan\",\n            \"state\": \"Kuala Lumpur\",\n            \"postcode\": \"55000\",\n            \"country\": \"MY\"\n        },\n        {\n            \"type\": \"DROPOFF\",\n            \"address1\": \"MRT Sungai Jernih (SBK33)\",\n            \"address2\": \"1, Kampung Sungai Kantan\",\n            \"city\": \"Kajang\",\n            \"state\": \"Selangor\",\n            \"postcode\": \"43000\",\n            \"country\": \"MY\"\n        }\n    ]\n}"},"url":"{{API_ENDPOINT}}/service/instantQuote"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Access-Control-Allow-Headers","value":"Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With"},{"key":"Access-Control-Allow-Methods","value":"GET,POST,PUT,PATCH,DELETE,COPY,OPTIONS"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Encoding","value":"gzip"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Fri, 18 Dec 2020 07:08:46 GMT"},{"key":"Etag","value":"W/\"878-MBVmkdu8V3TUegSauHdldG3L7YM\""},{"key":"Vary","value":"Accept-Encoding"},{"key":"X-Delyvax-Api-Version","value":"1.0"},{"key":"X-Powered-By","value":"DelyvaX"},{"key":"Content-Length","value":"915"}],"cookie":[],"responseTime":null,"body":"{\n    \"errors\": [],\n    \"data\": {\n        \"services\": [\n            {\n                \"price\": {\n                    \"amount\": 24.18,\n                    \"currency\": \"MYR\"\n                },\n                \"weight\": {\n                    \"value\": 1,\n                    \"unit\": \"kg\"\n                },\n                \"distance\": {\n                    \"value\": 19.18,\n                    \"unit\": \"km\"\n                },\n                \"commission\": {\n                    \"amount\": 8.1,\n                    \"currency\": \"MYR\",\n                    \"S\": 8.09748\n                },\n                \"agentCommission\": {\n                    \"amount\": 8.1,\n                    \"currency\": \"MYR\",\n                    \"S\": 8.09748\n                },\n                \"service\": {\n                    \"id\": 286,\n                    \"name\": \"NEXT DAY\",\n                    \"code\": \"NDD\",\n                    \"custDescription\": \"Next day\",\n                    \"driverInstruction\": \"Next day delivery\",\n                    \"isPublished\": 1,\n                    \"timeSlot\": [],\n                    \"taskFlag\": {\n                        \"origin\": {\n                            \"useDefault\": true,\n                            \"autoCheckin\": 0,\n                            \"confirmCash\": false,\n                            \"confirmScan\": false,\n                            \"autoCheckout\": 0,\n                            \"confirmFeedback\": false,\n                            \"allowEditPayment\": false,\n                            \"approveInventory\": true,\n                            \"confirmSignature\": true,\n                            \"allowEditInventory\": false,\n                            \"allowEditOriginalQuantity\": false\n                        },\n                        \"destination\": {\n                            \"useDefault\": true,\n                            \"autoCheckin\": 0,\n                            \"confirmCash\": false,\n                            \"confirmScan\": false,\n                            \"autoCheckout\": 0,\n                            \"confirmFeedback\": false,\n                            \"allowEditPayment\": false,\n                            \"approveInventory\": true,\n                            \"confirmSignature\": true,\n                            \"allowEditInventory\": false,\n                            \"allowEditOriginalQuantity\": false\n                        }\n                    },\n                    \"collectCash\": 1,\n                    \"minOrderValue\": \"0.00\",\n                    \"distanceType\": 1,\n                    \"serviceCompany\": {\n                        \"id\": 16,\n                        \"companyCode\": \"DX\",\n                        \"name\": \"DelyvaX\",\n                        \"logo\": \"servicecompany/16_1597199878761_15.png\"\n                    },\n                    \"assignment\": [\n                        {\n                            \"id\": 370,\n                            \"routeTo\": \"FLEET\"\n                        }\n                    ],\n                    \"addon\": [\n                        {\n                            \"id\": -1,\n                            \"name\": \"Collect Cash on Delivery\",\n                            \"price\": 0,\n                            \"required\": [\n                                {\n                                    \"key\": \"value\",\n                                    \"name\": \"Amount to collect\"\n                                }\n                            ]\n                        }\n                    ]\n                },\n                \"itemType\": [\n                    \"PACKAGE\"\n                ],\n                \"details\": [\n                    {\n                        \"name\": \"DISTANCE 7km (MYR7/7km)\",\n                        \"type\": \"price\",\n                        \"qty\": 7,\n                        \"unit\": \"km\",\n                        \"price\": 7,\n                        \"commission\": 5,\n                        \"agentCommission\": 5,\n                        \"revenue\": 2\n                    },\n                    {\n                        \"name\": \"WEIGHT 1kg (MYR5/5kg)\",\n                        \"type\": \"price\",\n                        \"qty\": 1,\n                        \"unit\": \"kg\",\n                        \"price\": 5,\n                        \"commission\": 3,\n                        \"agentCommission\": 3,\n                        \"revenue\": 2\n                    },\n                    {\n                        \"name\": \"DISTANCE 12.184999999999999km (MYR1/1km)\",\n                        \"type\": \"price\",\n                        \"qty\": 12.184999999999999,\n                        \"unit\": \"km\",\n                        \"price\": 12.184999999999999,\n                        \"commission\": 0.09747999999999912,\n                        \"agentCommission\": 0.09747999999999912,\n                        \"revenue\": 12.08752\n                    }\n                ]\n            }\n        ],\n        \"waypoints\": [\n            {\n                \"address1\": \"157, Jalan Ampang\",\n                \"city\": \"Wilayah Persekutuan\",\n                \"state\": \"Kuala Lumpur\",\n                \"postcode\": \"55000\",\n                \"country\": \"MY\",\n                \"id\": \"tmp_qkuy8\",\n                \"sortCode\": \"KV\"\n            },\n            {\n                \"address1\": \"MRT Sungai Jernih (SBK33)\",\n                \"address2\": \"1, Kampung Sungai Kantan\",\n                \"city\": \"Kajang\",\n                \"state\": \"Selangor\",\n                \"postcode\": \"43000\",\n                \"country\": \"MY\",\n                \"id\": \"tmp_pndbgh\",\n                \"sortCode\": \"KV\"\n            }\n        ],\n        \"perf\": \"515.89986 ms\"\n    }\n}"}],"_postman_id":"39f74178-9d67-4143-be45-9ef5e5be9c55"},{"name":"2. Create Order","event":[{"listen":"prerequest","script":{"id":"a1a9be08-9f2f-4889-aab6-76bc617fe125","exec":["pm.environment.set('API_ENDPOINT', 'https://api.delyva.app');","// pm.environment.set('API_ENDPOINT', 'localhost:3000');"],"type":"text/javascript"}}],"id":"ff791373-b239-460d-9fc1-ae689b331d24","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"customerId\": \"414\",\n    \"process\": true,\n    \"serviceCode\": \"NDD\",\n    \"waypoint\": [{\n        \"type\": \"PICKUP\",\n        \"scheduledAt\": \"2020-12-24T12:00:00+0800\",\n        \"inventory\": [\n            {\n                \"name\": \"Mee Kari\",\n                \"type\": \"PARCEL\",\n                \"price\": {\n                    \"amount\": \"10.50\",\n                    \"currency\": \"MYR\"\n                },\n                \"weight\": {\n                    \"value\": 1,\n                    \"unit\": \"kg\"\n                },\n                \"quantity\": 1,\n                \"description\": \"\"\n            },\n            {\n                \"name\": \"Ayam Goreng\",\n                \"type\": \"PARCEL\",\n                \"price\": {\n                    \"amount\": \"8.00\",\n                    \"currency\": \"MYR\"\n                },\n                \"weight\": {\n                    \"value\": 500,\n                    \"unit\": \"g\"\n                },\n                \"quantity\": 1,\n                \"description\": \"\"\n            }\n        ],\n        \"contact\": {\n            \"name\": \"Test Sender\",\n            \"email\": \"test@gmail.com\",\n            \"phone\": \"60124433300\",\n            \"unitNo\": \"\",\n            \"address1\": \"157, Jalan Ampang\",\n            \"address2\": \"\",\n            \"city\": \"Wilayah Persekutuan\",\n            \"state\": \"Kuala Lumpur\",\n            \"postcode\": \"55000\",\n            \"country\": \"MY\"\n        }\n    },\n    {\n        \"type\": \"DROPOFF\",\n        \"scheduledAt\": \"2020-12-24T13:00:00+0800\",\n        \"inventory\": [\n            {\n                \"name\": \"Mee Kari\",\n                \"type\": \"PARCEL\",\n                \"price\": {\n                    \"amount\": \"10.50\",\n                    \"currency\": \"MYR\"\n                },\n                \"weight\": {\n                    \"value\": 1,\n                    \"unit\": \"kg\"\n                },\n                \"quantity\": 1,\n                \"description\": \"\"\n            },\n            {\n                \"name\": \"Ayam Goreng\",\n                \"type\": \"PARCEL\",\n                \"price\": {\n                    \"amount\": \"8.00\",\n                    \"currency\": \"MYR\"\n                },\n                \"weight\": {\n                    \"value\": 500,\n                    \"unit\": \"g\"\n                },\n                \"quantity\": 1,\n                \"description\": \"\"\n            }\n        ],\n        \"contact\": {\n            \"name\": \"Mr Receiver\",\n            \"email\": \"test@gmail.com\",\n            \"phone\": \"60124433300\",\n            \"mobile\": \"60124433300\",\n            \"unitNo\": \"6-8\",\n            \"address1\": \"MRT Sungai Jernih (SBK33)\",\n            \"address2\": \"1, Kampung Sungai Kantan\",\n            \"city\": \"Kajang\",\n            \"state\": \"Selangor\",\n            \"postcode\": \"43000\",\n            \"country\": \"MY\"\n        }\n    }]\n}"},"url":"{{API_ENDPOINT}}/order","description":"<ul>\n<li>Tracking number wont be returned immediately, new order will first get in queue, it'll usually be processed immediately or within few seconds on peak hour.</li>\n<li>You can then get the tracking number with <code>GET /order/:orderId</code> or via <strong>order.created</strong> webhook</li>\n</ul>\n<p><img src=\"https://cdn.delyva.app/api-docs/create-order.png\" alt /></p>\n","urlObject":{"path":["order"],"host":["{{API_ENDPOINT}}"],"query":[],"variable":[]}},"response":[{"id":"59ea0c7c-3f99-4e73-a82c-56e9aba62231","name":"2. Create Order","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"customerId\": \"414\",\n    \"process\": true,\n    \"serviceCode\": \"NDD\",\n    \"waypoint\": [{\n        \"type\": \"PICKUP\",\n        \"scheduledAt\": \"2020-12-24T12:00:00+0800\",\n        \"inventory\": [\n            {\n                \"name\": \"Mee Kari\",\n                \"type\": \"PARCEL\",\n                \"price\": {\n                    \"amount\": \"10.50\",\n                    \"currency\": \"MYR\"\n                },\n                \"weight\": {\n                    \"value\": 1,\n                    \"unit\": \"kg\"\n                },\n                \"quantity\": 1,\n                \"description\": \"\"\n            },\n            {\n                \"name\": \"Ayam Goreng\",\n                \"type\": \"PARCEL\",\n                \"price\": {\n                    \"amount\": \"8.00\",\n                    \"currency\": \"MYR\"\n                },\n                \"weight\": {\n                    \"value\": 500,\n                    \"unit\": \"g\"\n                },\n                \"quantity\": 1,\n                \"description\": \"\"\n            }\n        ],\n        \"contact\": {\n            \"name\": \"Test Sender\",\n            \"email\": \"test@gmail.com\",\n            \"phone\": \"60124433300\",\n            \"unitNo\": \"\",\n            \"address1\": \"157, Jalan Ampang\",\n            \"address2\": \"\",\n            \"city\": \"Wilayah Persekutuan\",\n            \"state\": \"Kuala Lumpur\",\n            \"postcode\": \"55000\",\n            \"country\": \"MY\"\n        }\n    },\n    {\n        \"type\": \"DROPOFF\",\n        \"scheduledAt\": \"2020-12-24T13:00:00+0800\",\n        \"inventory\": [\n            {\n                \"name\": \"Mee Kari\",\n                \"type\": \"PARCEL\",\n                \"price\": {\n                    \"amount\": \"10.50\",\n                    \"currency\": \"MYR\"\n                },\n                \"weight\": {\n                    \"value\": 1,\n                    \"unit\": \"kg\"\n                },\n                \"quantity\": 1,\n                \"description\": \"\"\n            },\n            {\n                \"name\": \"Ayam Goreng\",\n                \"type\": \"PARCEL\",\n                \"price\": {\n                    \"amount\": \"8.00\",\n                    \"currency\": \"MYR\"\n                },\n                \"weight\": {\n                    \"value\": 500,\n                    \"unit\": \"g\"\n                },\n                \"quantity\": 1,\n                \"description\": \"\"\n            }\n        ],\n        \"contact\": {\n            \"name\": \"Mr Lapar\",\n            \"email\": \"test@gmail.com\",\n            \"phone\": \"60124433300\",\n            \"mobile\": \"60124433300\",\n            \"unitNo\": \"6-8\",\n            \"address1\": \"MRT Sungai Jernih (SBK33)\",\n            \"address2\": \"1, Kampung Sungai Kantan\",\n            \"city\": \"Kajang\",\n            \"state\": \"Selangor\",\n            \"postcode\": \"43000\",\n            \"country\": \"MY\"\n        }\n    }]\n}"},"url":"{{API_ENDPOINT}}/order"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Access-Control-Allow-Headers","value":"Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With"},{"key":"Access-Control-Allow-Methods","value":"GET,POST,PUT,PATCH,DELETE,COPY,OPTIONS"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Length","value":"113"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Fri, 18 Dec 2020 07:19:37 GMT"},{"key":"Etag","value":"W/\"71-p0DRnVLmEh75M92v/Dxcc2zW85s\""},{"key":"Vary","value":"Accept-Encoding"},{"key":"X-Delyvax-Api-Version","value":"1.0"},{"key":"X-Powered-By","value":"DelyvaX"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"orderId\": \"1c1d526f-1da3-4f4a-897f-93e82bdd3e3d\",\n        \"status\": \"processing\",\n        \"statusCode\": 0,\n        \"invoiceId\": null\n    }\n}"}],"_postman_id":"ff791373-b239-460d-9fc1-ae689b331d24"},{"name":"3. Get Order Details","event":[{"listen":"prerequest","script":{"id":"a1a9be08-9f2f-4889-aab6-76bc617fe125","exec":["pm.environment.set('API_ENDPOINT', 'https://api.delyva.app');","// pm.environment.set('API_ENDPOINT', 'localhost:3000');"],"type":"text/javascript"}}],"id":"cc45ab42-fe9b-4611-bafe-958a7b3a7cfe","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{API_ENDPOINT}}/order/1c1d526f-1da3-4f4a-897f-93e82bdd3e3d","urlObject":{"path":["order","1c1d526f-1da3-4f4a-897f-93e82bdd3e3d"],"host":["{{API_ENDPOINT}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"cc45ab42-fe9b-4611-bafe-958a7b3a7cfe"}],"id":"4149e577-9285-4853-9450-c97781a95b6c","_postman_id":"4149e577-9285-4853-9450-c97781a95b6c","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{currentAccessToken}}"}]},"isInherited":true,"source":{"_postman_id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","name":"DelyvaX SaaS","type":"collection"}}},{"name":"MS 2781:2023","item":[],"id":"45c30045-dd78-4261-ae82-ca81f1f61cf5","description":"<h2 id=\"introduction\">Introduction</h2>\n<p>This API implements MS 2781:2023, the Malaysian Standard for logistics dataset in e-commerce transactions and last mile delivery. The standard aims to:</p>\n<ul>\n<li><p>Improve logistics efficiency to enhance buyers' online shopping experience</p>\n</li>\n<li><p>Improve accuracy and exchange of data transmission to reduce delivery order errors</p>\n</li>\n<li><p>Serve as a technical reference to ease system integration</p>\n</li>\n</ul>\n<p>The API facilitates data exchange between e-commerce platforms and Logistics Service Providers (LSP), implementing the base dataset requirements for:</p>\n<ul>\n<li><p>Sender information</p>\n</li>\n<li><p>Receiver information</p>\n</li>\n<li><p>Parcel details</p>\n</li>\n<li><p>Delivery service information</p>\n</li>\n<li><p>Delivery status</p>\n</li>\n</ul>\n<h2 id=\"create-delivery-order\">Create Delivery Order</h2>\n<p><strong>Endpoint:</strong> <code>/order/ms2781/create</code> (POST)</p>\n<h3 id=\"request-fields\">Request Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field Name</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>orderNumber</td>\n<td>string</td>\n<td>Yes</td>\n<td>Order reference number (max 64 chars)</td>\n</tr>\n<tr>\n<td>sender</td>\n<td>object</td>\n<td>Yes</td>\n<td>Sender information (see Sender Object)</td>\n</tr>\n<tr>\n<td>receiver</td>\n<td>object</td>\n<td>Yes</td>\n<td>Receiver information (see Receiver Object)</td>\n</tr>\n<tr>\n<td>parcel</td>\n<td>object</td>\n<td>No</td>\n<td>Parcel details (see Parcel Object)</td>\n</tr>\n<tr>\n<td>inventory</td>\n<td>array</td>\n<td>No</td>\n<td>Array of inventory items (see Inventory Item)</td>\n</tr>\n<tr>\n<td>deliveryService</td>\n<td>object</td>\n<td>No</td>\n<td>Delivery service details (see Delivery Service)</td>\n</tr>\n<tr>\n<td>customerId</td>\n<td>number</td>\n<td>Yes</td>\n<td>Customer identifier</td>\n</tr>\n<tr>\n<td>isDraft</td>\n<td>boolean</td>\n<td>No</td>\n<td>Create draft order (default: false)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"senderreceiver-object\">Sender/Receiver Object</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field Name</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>contactName</td>\n<td>string</td>\n<td>Yes</td>\n<td>Name of contact person (max 128 chars)</td>\n</tr>\n<tr>\n<td>contactNumber</td>\n<td>string</td>\n<td>Yes</td>\n<td>Contact number (max 25 chars)</td>\n</tr>\n<tr>\n<td>contactEmail</td>\n<td>string</td>\n<td>No</td>\n<td>Email address (max 64 chars)</td>\n</tr>\n<tr>\n<td>companyName</td>\n<td>string</td>\n<td>No</td>\n<td>Company name (max 128 chars)</td>\n</tr>\n<tr>\n<td>location</td>\n<td>object</td>\n<td>Yes</td>\n<td>Address details (see Location Object)</td>\n</tr>\n<tr>\n<td>note</td>\n<td>string</td>\n<td>No</td>\n<td>Additional notes</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"location-object\">Location Object</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field Name</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>address</td>\n<td>string</td>\n<td>Yes</td>\n<td>Primary address line (max 255 chars)</td>\n</tr>\n<tr>\n<td>address2</td>\n<td>string</td>\n<td>No</td>\n<td>Secondary address line (max 255 chars)</td>\n</tr>\n<tr>\n<td>address3</td>\n<td>string</td>\n<td>No</td>\n<td>Tertiary address line (max 255 chars)</td>\n</tr>\n<tr>\n<td>postcode</td>\n<td>string</td>\n<td>Yes</td>\n<td>Postal code (max 10 chars)</td>\n</tr>\n<tr>\n<td>city</td>\n<td>string</td>\n<td>Yes</td>\n<td>City name (max 35 chars)</td>\n</tr>\n<tr>\n<td>state</td>\n<td>string</td>\n<td>No</td>\n<td>State or province (max 35 chars)</td>\n</tr>\n<tr>\n<td>country</td>\n<td>string</td>\n<td>Yes</td>\n<td>Two-letter country code (uppercase)</td>\n</tr>\n<tr>\n<td>coordinates</td>\n<td>object</td>\n<td>No</td>\n<td>Location coordinates (both lon and lat required if provided)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"parcel-object\">Parcel Object</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field Name</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>quantity</td>\n<td>number</td>\n<td>No</td>\n<td>Quantity of parcels (max 9999999999)</td>\n</tr>\n<tr>\n<td>orderRemarks</td>\n<td>string</td>\n<td>No</td>\n<td>Package remarks (max 512 chars)</td>\n</tr>\n<tr>\n<td>weight</td>\n<td>object</td>\n<td>Yes</td>\n<td>Weight information (unit and parcelWeight)</td>\n</tr>\n<tr>\n<td>dimension</td>\n<td>object</td>\n<td>No</td>\n<td>Dimension information (unit, width, length, height)</td>\n</tr>\n<tr>\n<td>itemValue</td>\n<td>object</td>\n<td>No</td>\n<td>Item value (amount and currency)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"inventory-item\">Inventory Item</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field Name</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>Yes</td>\n<td>Item name</td>\n</tr>\n<tr>\n<td>price</td>\n<td>object</td>\n<td>No</td>\n<td>Price details (amount and currency)</td>\n</tr>\n<tr>\n<td>weight</td>\n<td>object</td>\n<td>Yes</td>\n<td>Weight details (value and unit)</td>\n</tr>\n<tr>\n<td>quantity</td>\n<td>number</td>\n<td>No</td>\n<td>Quantity (integer, default: 1)</td>\n</tr>\n<tr>\n<td>hsCode</td>\n<td>string</td>\n<td>No</td>\n<td>HS Code</td>\n</tr>\n<tr>\n<td>description</td>\n<td>string</td>\n<td>No</td>\n<td>Item description (default: '-')</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"delivery-service\">Delivery Service</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field Name</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>serviceType</td>\n<td>string</td>\n<td>Yes</td>\n<td>Delyva service code (max 45 chars)</td>\n</tr>\n<tr>\n<td>pickupDateTime</td>\n<td>string</td>\n<td>No</td>\n<td>Pickup datetime (YYYY-MM-DD HH:mm:ss)</td>\n</tr>\n<tr>\n<td>requestDateTime</td>\n<td>string</td>\n<td>No</td>\n<td>Requested delivery datetime (YYYY-MM-DD HH:mm:ss)</td>\n</tr>\n<tr>\n<td>cod</td>\n<td>object</td>\n<td>No</td>\n<td>COD value (amount and currency)</td>\n</tr>\n<tr>\n<td>insurance</td>\n<td>object</td>\n<td>No</td>\n<td>Insurance value (amount and currency)</td>\n</tr>\n<tr>\n<td>itemType</td>\n<td>string</td>\n<td>No</td>\n<td>Type of item</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"cancel-delivery-order\">Cancel Delivery Order</h2>\n<p><strong>Endpoint:</strong> <code>/order/ms2781/cancel</code> (POST)</p>\n<h3 id=\"request-fields-1\">Request Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field Name</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>orderId</td>\n<td>string</td>\n<td>No*</td>\n<td>Delyva order ID (*Required if trackingNumber not provided)</td>\n</tr>\n<tr>\n<td>trackingNumber</td>\n<td>string</td>\n<td>No*</td>\n<td>Tracking number (max 35 chars, *Required if orderId not provided)</td>\n</tr>\n<tr>\n<td>reason</td>\n<td>string</td>\n<td>No</td>\n<td>Reason for cancellation (max 512 chars)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"notes\">Notes</h3>\n<ul>\n<li><p>For weight units: 'kg', 'g', 'mg' (default: 'kg')</p>\n</li>\n<li><p>For dimension units: 'm', 'cm'</p>\n</li>\n<li><p>For currency: 3-letter code (default: 'MYR')</p>\n</li>\n<li><p>All decimal numbers use 2 decimal places unless specified otherwise</p>\n</li>\n<li><p>Dates format: \"YYYY-MM-DD HH:mm:ss\"</p>\n</li>\n<li><p>Country codes: 2 letters, uppercase</p>\n</li>\n</ul>\n<h2 id=\"example-payloads\">Example Payloads</h2>\n<h3 id=\"create-delivery-order-request\">Create Delivery Order Request</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"orderNumber\": \"ORDER123456\",\n  \"sender\": {\n    \"contactName\": \"John Doe\",\n    \"contactNumber\": \"+60123456789\",\n    \"contactEmail\": \"john@example.com\",\n    \"companyName\": \"ABC Company\",\n    \"location\": {\n      \"address\": \"123 Jalan Example\",\n      \"address2\": \"Taman Example\",\n      \"postcode\": \"50000\",\n      \"city\": \"Kuala Lumpur\",\n      \"state\": \"Wilayah Persekutuan\",\n      \"country\": \"MY\",\n      \"coordinates\": {\n        \"lon\": \"101.6869\",\n        \"lat\": \"3.1390\"\n      }\n    }\n  },\n  \"receiver\": {\n    \"contactName\": \"Jane Smith\",\n    \"contactNumber\": \"+60198765432\",\n    \"contactEmail\": \"jane@example.com\",\n    \"location\": {\n      \"address\": \"456 Jalan Sample\",\n      \"postcode\": \"80100\",\n      \"city\": \"Johor Bahru\",\n      \"state\": \"Johor\",\n      \"country\": \"MY\"\n    }\n  },\n  \"parcel\": {\n    \"quantity\": 1,\n    \"orderRemarks\": \"Handle with care\",\n    \"weight\": {\n      \"unit\": \"kg\",\n      \"parcelWeight\": 2.0\n    },\n    \"dimension\": {\n      \"unit\": \"cm\",\n      \"width\": 30.5,\n      \"length\": 40.5,\n      \"height\": 20.0\n    },\n    \"itemValue\": {\n      \"amount\": 189.70,\n      \"currency\": \"MYR\"\n    }\n  },\n  \"inventory\": [\n    {\n      \"name\": \"Premium T-Shirt\",\n      \"price\": {\n        \"amount\": 49.90,\n        \"currency\": \"MYR\"\n      },\n      \"weight\": {\n        \"value\": 0.25,\n        \"unit\": \"kg\"\n      },\n      \"quantity\": 2,\n      \"description\": \"Cotton T-Shirt Size M\",\n      \"hsCode\": \"610910\"\n    },\n    {\n      \"name\": \"Casual Pants\",\n      \"price\": {\n        \"amount\": 89.90,\n        \"currency\": \"MYR\"\n      },\n      \"weight\": {\n        \"value\": 1.5,\n        \"unit\": \"kg\"\n      },\n      \"quantity\": 1,\n      \"description\": \"Khaki Pants Size 32\",\n      \"hsCode\": \"620342\"\n    }\n  ],\n  \"deliveryService\": {\n    \"serviceType\": \"EXPRESS\",\n    \"pickupDateTime\": \"2024-12-21 10:00:00\",\n    \"cod\": {\n      \"amount\": 239.70,\n      \"currency\": \"MYR\"\n    },\n    \"insurance\": {\n      \"amount\": 10.00,\n      \"currency\": \"MYR\"\n    },\n    \"itemType\": \"PARCEL\"\n  },\n  \"customerId\": 12345,\n  \"isDraft\": false\n}\n\n</code></pre>\n<h3 id=\"create-delivery-order-response\">Create Delivery Order Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"orderNumber\": \"ORDER123456\",\n    \"deliveryService\": {\n        \"status\": \"created\",\n        \"statusCode\": 100,\n        \"createdDateTime\": \"2024-12-16 15:59:33\",\n        \"trackingNumber\": \"TN987654321\",\n        \"orderId\": \"9b96ffe3-62d6-4eb8-a38d-4d464d398168\",\n        \"deliveryCost\": {\n            \"amount\": 10.75,\n            \"currency\": \"MYR\"\n        }\n    }\n}\n\n</code></pre>\n<h3 id=\"cancel-delivery-order-request\">Cancel Delivery Order Request</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"trackingNumber\": \"TN987654321\",\n  \"reason\": \"Customer requested cancellation due to wrong size ordered\"\n}\n\n</code></pre>\n<h3 id=\"cancel-delivery-order-response\">Cancel Delivery Order Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"orderId\": \"9b96ffe3-62d6-4eb8-a38d-4d464d398168\",\n    \"trackingNumber\": \"TN987654321\",\n    \"status\": \"cancelled\"\n}\n\n</code></pre>\n","_postman_id":"45c30045-dd78-4261-ae82-ca81f1f61cf5","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{currentAccessToken}}"}]},"isInherited":true,"source":{"_postman_id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","id":"99a0cf93-6205-4ef8-9e5a-f2e8dfba10f2","name":"DelyvaX SaaS","type":"collection"}}},{"name":"Encrypted Payload","item":[],"id":"b6699665-3839-43bd-9722-3b0c6165a7bd","description":"<h1 id=\"encrypted-payload-integration-guide\">Encrypted Payload Integration Guide</h1>\n<hr />\n<h2 id=\"overview\">Overview</h2>\n<p>This guide explains how to send encrypted payloads to the DelyvaX API using hybrid RSA + AES encryption. This feature allows you to protect sensitive data (e.g., phone numbers, addresses) before transmission.</p>\n<h2 id=\"step-1-get-public-key\">Step 1: Get Public Key</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">GET https://api.delyva.app/v1.0/encryption/public-key\n\n</code></pre>\n<p>Response:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"publicKey\": \"-----BEGIN PUBLIC KEY-----\\nMIIBI...\\n-----END PUBLIC KEY-----\",\n  \"algorithm\": \"RSA-OAEP + AES-256-GCM\",\n  \"usage\": { ... }\n}\n\n</code></pre>\n<p><strong>Save this public key</strong>. You can cache it and refresh periodically (e.g., daily).</p>\n<hr />\n<h2 id=\"step-2-encrypt-your-payload\">Step 2: Encrypt Your Payload</h2>\n<h3 id=\"encryption-steps\">Encryption Steps:</h3>\n<ol>\n<li><p>Generate a random 256-bit AES key</p>\n</li>\n<li><p>Generate a random 128-bit IV (initialization vector)</p>\n</li>\n<li><p>Encrypt your JSON payload using AES-256-GCM</p>\n</li>\n<li><p>Encrypt the AES key using RSA-OAEP with DelyvaX's public key</p>\n</li>\n<li><p>Send all components to the DelyvaX API</p>\n</li>\n</ol>\n<h3 id=\"nodejs-example\">Node.js Example</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-javascript\">const crypto = require('crypto');\nfunction encryptPayload(payload, publicKey) {\n  // 1. Generate random AES key and IV\n  const aesKey = crypto.randomBytes(32); // 256 bits\n  const iv = crypto.randomBytes(16);     // 128 bits\n  // 2. Encrypt payload with AES-256-GCM\n  const cipher = crypto.createCipheriv('aes-256-gcm', aesKey, iv);\n  const jsonString = JSON.stringify(payload);\n  const encrypted = Buffer.concat([\n    cipher.update(jsonString, 'utf8'),\n    cipher.final(),\n  ]);\n  const authTag = cipher.getAuthTag();\n  // 3. Encrypt AES key with RSA public key\n  const encryptedKey = crypto.publicEncrypt(\n    {\n      key: publicKey,\n      padding: crypto.constants.RSA_PKCS1_OAEP_PADDING,\n      oaepHash: 'sha256',\n    },\n    aesKey\n  );\n  // 4. Return encrypted components\n  return {\n    encryptedKey: encryptedKey.toString('base64'),\n    encryptedPayload: encrypted.toString('base64'),\n    iv: iv.toString('base64'),\n    authTag: authTag.toString('base64'),\n  };\n}\n// Usage\nconst payload = { phone: '0123456789', orderId: 'ORD-123' };\nconst encrypted = encryptPayload(payload, publicKey);\n// Send to DelyvaX API\nfetch('https://api.delyva.app/v1.0/order', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify(encrypted),\n});\n\n</code></pre>\n<h3 id=\"python-example\">Python Example</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-python\">import json\nimport base64\nimport os\nfrom cryptography.hazmat.primitives import serialization, hashes\nfrom cryptography.hazmat.primitives.asymmetric import padding\nfrom cryptography.hazmat.primitives.ciphers.aead import AESGCM\ndef encrypt_payload(payload: dict, public_key_pem: str) -&gt; dict:\n    # Load public key\n    public_key = serialization.load_pem_public_key(public_key_pem.encode())\n    # 1. Generate random AES key and IV\n    aes_key = os.urandom(32)  # 256 bits\n    iv = os.urandom(16)       # 128 bits (use 12 bytes for GCM standard)\n    # 2. Encrypt payload with AES-256-GCM\n    aesgcm = AESGCM(aes_key)\n    json_bytes = json.dumps(payload).encode('utf-8')\n    # Note: AESGCM in cryptography library uses 12-byte nonce by default\n    iv_12 = os.urandom(12)\n    ciphertext_with_tag = aesgcm.encrypt(iv_12, json_bytes, None)\n    # Split ciphertext and auth tag (last 16 bytes)\n    ciphertext = ciphertext_with_tag[:-16]\n    auth_tag = ciphertext_with_tag[-16:]\n    # 3. Encrypt AES key with RSA-OAEP\n    encrypted_key = public_key.encrypt(\n        aes_key,\n        padding.OAEP(\n            mgf=padding.MGF1(algorithm=hashes.SHA256()),\n            algorithm=hashes.SHA256(),\n            label=None\n        )\n    )\n    return {\n        'encryptedKey': base64.b64encode(encrypted_key).decode(),\n        'encryptedPayload': base64.b64encode(ciphertext).decode(),\n        'iv': base64.b64encode(iv_12).decode(),\n        'authTag': base64.b64encode(auth_tag).decode(),\n    }\n\n</code></pre>\n<h3 id=\"php-example\">PHP Example</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-php\">function encryptPayload(array $payload, string $publicKey): array {\n    // 1. Generate random AES key and IV\n    $aesKey = openssl_random_pseudo_bytes(32);\n    $iv = openssl_random_pseudo_bytes(16);\n    // 2. Encrypt payload with AES-256-GCM\n    $jsonString = json_encode($payload);\n    $encrypted = openssl_encrypt(\n        $jsonString,\n        'aes-256-gcm',\n        $aesKey,\n        OPENSSL_RAW_DATA,\n        $iv,\n        $authTag\n    );\n    // 3. Encrypt AES key with RSA-OAEP\n    openssl_public_encrypt($aesKey, $encryptedKey, $publicKey, OPENSSL_PKCS1_OAEP_PADDING);\n    return [\n        'encryptedKey' =&gt; base64_encode($encryptedKey),\n        'encryptedPayload' =&gt; base64_encode($encrypted),\n        'iv' =&gt; base64_encode($iv),\n        'authTag' =&gt; base64_encode($authTag),\n    ];\n}\n\n</code></pre>\n<hr />\n<h2 id=\"step-3-send-encrypted-request\">Step 3: Send Encrypted Request</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">POST /v1.0/order\nContent-Type: application/json\n{\n  \"encryptedKey\": \"base64-encoded-rsa-encrypted-aes-key\",\n  \"encryptedPayload\": \"base64-encoded-aes-encrypted-json\",\n  \"iv\": \"base64-encoded-iv\",\n  \"authTag\": \"base64-encoded-auth-tag\"\n}\n\n</code></pre>\n<p>DelyvaX will:</p>\n<ol>\n<li><p>Decrypt the AES key using its RSA private key</p>\n</li>\n<li><p>Decrypt the payload using the AES key</p>\n</li>\n<li><p>Process your request normally</p>\n</li>\n</ol>\n<hr />\n<h2 id=\"non-encrypted-requests\">Non-Encrypted Requests</h2>\n<p>Encryption is <strong>optional</strong>. You can still send normal JSON requests:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">POST /v1.0/order\nContent-Type: application/json\n{\n  \"phone\": \"0123456789\",\n  \"orderId\": \"ORD-123\"\n}\n\n</code></pre>\n<hr />\n<h2 id=\"encryption-specifications\">Encryption Specifications</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Component</th>\n<th>Algorithm</th>\n<th>Details</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Symmetric</td>\n<td>AES-256-GCM</td>\n<td>256-bit key, 128-bit IV</td>\n</tr>\n<tr>\n<td>Asymmetric</td>\n<td>RSA-OAEP</td>\n<td>SHA-256 hash, 4096-bit key</td>\n</tr>\n<tr>\n<td>Encoding</td>\n<td>Base64</td>\n<td>All binary data is base64 encoded</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"troubleshooting\">Troubleshooting</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Error</th>\n<th>Cause</th>\n<th>Solution</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>missing required fields</code></td>\n<td>Incomplete encrypted payload</td>\n<td>Ensure all 4 fields are present</td>\n</tr>\n<tr>\n<td><code>Decryption failed</code></td>\n<td>Wrong public key or corrupted data</td>\n<td>Refresh public key, verify encoding</td>\n</tr>\n<tr>\n<td><code>not valid JSON</code></td>\n<td>Original payload wasn't valid JSON</td>\n<td>Check payload before encryption</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"support\">Support</h2>\n<p>For integration support, contact us at:</p>\n<ul>\n<li>Email: <a href=\"https://mailto:dev@delyva.com\">dev@delyva.com</a></li>\n</ul>\n","auth":{"type":"noauth","isInherited":false},"event":[{"listen":"prerequest","script":{"id":"b0b4505b-7292-4ea2-8ae6-3be98210c90d","type":"text/javascript","packages":{},"requests":{},"exec":[""]}},{"listen":"test","script":{"id":"86b6c863-f382-4900-a7e4-7cc3c76b7ae8","type":"text/javascript","packages":{},"requests":{},"exec":[""]}}],"_postman_id":"b6699665-3839-43bd-9722-3b0c6165a7bd"}],"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{currentAccessToken}}"}]}},"event":[{"listen":"prerequest","script":{"id":"5fe3c87b-b642-435d-8f35-b4777d2e9b0f","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"a7b95a29-3bc4-4036-b403-118393e5c902","type":"text/javascript","exec":[""]}}]}