{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"6823b9b7-866b-49d0-b7d8-839c653417e7","name":"X for Developers","description":"Hello and welcome to X for Developers! Here you'll find everything that you need to integrate with us and book your orders. We provide APIs for order creation, status management, and visibility of the whole order lifecycle until fulfillment.\n\n# What We Will Be Providing\n\n---\n\n### Slack Channel & Support\n\nA Slack Channel will be provided as our medium of communication.  \nInquiries, concerns, and other discussions related to this document and the processes it involves may be raised in the given channel, such as error-handling, process flow clarifications, etc.\n\n<a href=\"null\"></a>\n\nKeys\n\nWe will be providing you with a pair of API and Secret keys once you sign up for our services. The API key should be passed as the subject (sub) attribute of the JWT payload while the secret key is used to create the token signature. Never share your secret key and make sure that it would not be exposed at any time.\n\n# Authorization\n\n---\n\nSome of the resources defined in this document are secured using [JSON Web Tokens (JWT)](https://). JWT is an [industry standard](https://) for authorization and exchanging claims between two parties.\n\nBasic JSON Web Tokens are made up of three parts separated by dots, which are:\n\n- Header\n- Payload\n- Signature\n    \n\nIn turn, a JWT ends up looking like the following:\n\n```\naaaaa.bbbbb.ccccc\n\n ```\n\nThe following subsections briefly explain these three parts.\n\n### Header\n\nThe header is the first part of the token where the token type (typ) and hashing algorithm (alg) used to generate the signature are defined. Only `HMAC SHA256` is supported at the moment.\n\n###### JSON Header\n\n``` json\n{\n\"alg\": \"HS256\",\n\"typ\": \"JWT\"\n}\n\n ```\n\nThis header is then encoded using `Base64Url`.\n\nThe following result is normally the header when dealing with our API:\n\n###### Base64 Encoded Header (URL-safe)\n\n```\neyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9\n\n ```\n\n### Payload\n\nThe payload is the second part of the token where the claims are defined. The following claims should always be present on the payload:\n\n- **iat** - Unix timestamp of when the token was created\n- **jti** - unique nonce value. Requests with a repeated jti value will be rejected.\n- **sub** - [your API key](https://)\n    \n\n###### JSON Payload\n\n``` json\n{\n\"iat\": 1463702400,\n\"jti\": \"abe953c8-3621-414b-99e9-a01d9461b129\",\n\"sub\": \"2af9713592\"\n}\n\n ```\n\nLike the header, this is then encoded using `Base64Url`.\n\n###### Sample Generated Base64 Encoded Payload (URL-safe)\n\n```\neyJpYXQiOjE0NjM3MDI0MDAsImp0aSI6ImFiZTk1M2M4LTM2MjEtNDE0Yi05OWU5LWEwMWQ5NDYxYjEyOSIsInN1YiI6IjJhZjk3MTM1OTIifQ\n\n ```\n\n### Signature\n\nThe last part to be generated is the signature.  \nTo generate this, concatenate the base64 encoded header and payload with a dot and generate the hash using HMAC SHA256.\n\n###### For clarity, the process is as follows:\n\n``` js\nsignature = base64EncodeURL( hmac_sha256( base64EncodeURL(header) + '.' + base64EncodeURL(payload), SECRET_KEY ) )\n\n ```\n\n###### For the purpose of comparison and checking, the produced signature for our previous header and payload examples is:\n\n```\n// when SECRET_KEY = 'itsasecret'\nAXXvB0EgZWWTBQZsImnq_M6bHsEbw7H8k7tU_cYZz98\n\n ```\n\n### Resulting JWT\n\nThe token is then built by concatenating dots in between the produced header, payload, and signature.\n\nIt should appear as follows:\n\n```\n(header).(payload).(signature)\n\n ```\n\n###### Substituting the header, payload, and signature placeholders with their actual values, we finally have our JWT:\n\n```\neyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE0NjM3MDI0MDAsImp0aSI6ImFiZTk1M2M4LTM2MjEtNDE0Yi05OWU5LWEwMWQ5NDYxYjEyOSIsInN1YiI6IjJhZjk3MTM1OTIifQ.AXXvB0EgZWWTBQZsImnq_M6bHsEbw7H8k7tU_cYZz98\n\n ```\n\n### Sending the JWT\n\nThe token should be sent as a part of your HTTP Request Header.\n\n###### Use the Authorization Bearer schema, as seen below:\n\n``` http\nAuthorization: Bearer {token}\n\n ```\n\n###### Sample Header, using the JWT we generated in the previous example:\n\n``` http\nPOST /v1/orders HTTP/1.1\nHost: api.lbcx.ph\nAuthorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE0NjM3MDI0MDAsImp0aSI6ImFiZTk1M2M4LTM2MjEtNDE0Yi05OWU5LWEwMWQ5NDYxYjEyOSIsInN1YiI6IjJhZjk3MTM1OTIifQ.3ZbAieutFTwQ0RXidGRCDO_hkSqZNydNz3fcwj3WAbA\n\n ```\n\n### Additional Information\n\nFor more clarity on the subject of JWT, you can read the [Official JWT documentation](https://) to get a better idea regarding the token-generating process. You can also download their [3rd party libraries and SDKs](https://) to use in your APIs.\n\n# Responses (Success, Errors)\n\n---\n\nStandard HTTP status codes are returned on every response. `200` means that the request was successful, `4xx` indicates failure, and `500` means that something went wrong on our side. The error message and details are sent back as a JSON-encoded string in the response body. Here's a list of status codes that F3 uses:\n\n<table><tbody><tr><th><b>Status</b></th><th><b>Message</b></th><th><b>Description</b></th></tr><tr><td><div>200</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>OK</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>Success</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>400</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>Bad Request</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>We didn't understand your request. Please make sure that you're sending a valid JSON payload in the request body.</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>401</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>Unauthorized</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>The token is not valid or may have already expired. It could also be that you don't have sufficient privileges to access the resource.</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>404</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>Not Found</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>The entity that you're looking for does not exist.</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>413</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>Request Entity Too Large</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>You have exceeded the maximum allowable upload size of 1MB.</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>422</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>Unprocessable Entity</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>Some of the parameters failed validation.</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>429</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>Too Many Requests</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>Your account has been temporarily suspended because you have exceeded the allowable number of requests.</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>500</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>Internal Server Error</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>Something went wrong. We're looking into it.</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td></tr></tbody></table>\n\n###### Sample Successful Response\n\n``` http\n    HTTP/1.1 200 OK\n    Content-Type: application/json\n\n ```\n\n``` json\n  {\n    \"id\": 21,\n    \"currency\": \"PHP\",\n    \"reference_id\": \"7336180193817RYKP\",\n    \"tracking_number\": \"0000-0021-ZTMR\",\n    \"payment_method\": \"cod\",\n    \"status\": \"pending\",\n    \"email\": \"johndoe@email.com\",\n    \"contact_number\": \"+639172274819\",\n    \"total\": \"3103.25\",\n    \"paid\": 0,\n    \"metadata\": {\n    \"key_1\": \"value_1\",\n    \"key_2\": \"value_2\"\n    },\n    \"preferred_pickup_time\": \"morning\",\n    \"preferred_delivery_time\": \"3pm - 5pm\",\n    \"pickup_address\": {\n    \"name\": \"John Doe\",\n    \"phone_number\": \"5713429\",\n    \"mobile_number\": \"+639197421753\",\n    \"line_1\": \"8F U825 Building A\",\n    \"line_2\": \"711 Nulla St.\",\n    \"city\": \"Makati\",\n    \"state\": \"NCR\",\n    \"postal_code\": \"1200\",\n    \"remarks\": \"Optional notes / remarks go here.\"\n    },\n    \"delivery_address\": {\n    \"name\": \"Jane Doe\",\n    \"phone_number\": \"6358972\",\n    \"mobile_number\": \"+63907117421\",\n    \"line_1\": \"3F U311 Bldg. C\",\n    \"line_2\": \"Jade St.\",\n    \"city\": \"Taguig\",\n    \"state\": \"NCR\",\n    \"postal_code\": \"1600\",\n    \"remarks\": \"Optional notes / remarks go here.\"\n    },\n    \"charge\": {\n    \"status\": \"pending\",\n    \"payment_method\": \"cod\",\n    \"total_amount\": 3103.25,\n    \"tendered_amount\": 0,\n    \"change_amount\": 0,\n    \"remarks\": null\n    },\n    \"items\": [\n      {\n        \"type\": \"product\",\n        \"description\": \"Red Shirt\",\n        \"amount\": \"1250.00\",\n        \"quantity\": 1,\n        \"metadata\": {\n          \"size\": \"medium\",\n          \"color\": \"red\"\n        }\n      },\n      {\n        \"type\": \"product\",\n        \"description\": \"Blue Shirt\",\n        \"amount\": \"700.00\",\n        \"quantity\": 2,\n        \"metadata\": {\n          \"size\": \"medium\",\n          \"color\": \"blue\"\n        }\n      },\n      {\n        \"type\": \"tax\",\n        \"description\": \"Tax\",\n        \"amount\": \"132.50\",\n        \"quantity\": 1,\n        \"metadata\": null\n      },\n      {\n        \"type\": \"shipping\",\n        \"description\": \"Expedited Shipping\",\n        \"amount\": \"250.00\",\n        \"quantity\": 1,\n        \"metadata\": null\n      },\n      {\n        \"type\": \"fee\",\n        \"description\": \"Handling Fee\",\n        \"amount\": \"20.00\",\n        \"quantity\": 1,\n        \"metadata\": null\n      },\n      {\n        \"type\": \"fee\",\n        \"description\": \"Gift Wrapping Fee\",\n        \"amount\": \"50.75\",\n        \"quantity\": 1,\n        \"metadata\": null\n      }\n    ]\n  }\n\n ```\n\n###### Sample Error Response (422)\n\n``` http\n    HTTP/1.1 422 Unprocessable Entity\n    Content-Type: application/json\n\n ```\n\n``` json\n  {\n    \"status\": 422,\n    \"message\": \"Unprocessable Entity\",\n    \"description\": \"The given data failed to pass validation.\",\n    \"parameters\": {\n      \"payment_method\": [\n        \"The selected payment method is invalid.\"\n      ]\n    }\n  }\n\n ```\n\n# Pagination\n\n---\n\nAll API resources that return lists or bulk data support pagination and share the same parameters.  \nAll of these parameters are optional and have default values.  \nPagination data is returned on both the header and response body for convenience.\n\n<table><tbody><tr><th><b>Name</b></th><th><b>Type</b></th><th><b>Description</b></th><th><b>Required?</b></th><th><b>Default Value</b></th></tr><tr><td><div>page</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>integer</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>Page Number</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>optional</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>1</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>per_page</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>integer</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>Count per Page</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>optional</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>25</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td></tr></tbody></table>\n\n###### Sample Response with Pagination\n\n``` http\n    HTTP/1.1 200 OK\n    Content-Type: application/json\n    Link: <https://api.lbcx.ph/v1/orders?page=2>; rel=\"next\"\n    X-Pagination-Current-Page: 1\n    X-Pagination-Page-Count: 8\n    X-Pagination-Per-Page: 25\n    X-Pagination-Total-Count: 192\n    X-Powered-By: PHP/5.6.2\n\n ```\n\n``` json\n  {\n    \"total\": 192,\n    \"per_page\": 25,\n    \"current_page\": 1,\n    \"last_page\": 8,\n    \"next_page_url\": \"https://api.lbcx.ph/v1/orders?page=2\",\n    \"prev_page_url\": null,\n    \"from\": 1,\n    \"to\": 25,\n    \"data\": [\n      {\n        \"id\": 1,\n        \"currency\": \"PHP\",\n        \"reference_id\": \"7336180193817RYKP\",\n        \"tracking_number\": \"0000-0001-BSWF\",\n        \"payment_method\": \"cod\",\n        \"status\": \"pending\",\n        \"email\": \"johndoe@email.com\",\n        \"contact_number\": \"+639172274819\",\n        \"total\": \"3103.25\",\n        \"paid\": 0,\n        \"metadata\": {\n          \"key_1\": \"value_1\",\n          \"key_2\": \"value_2\"\n        },\n        \"preferred_pickup_time\": \"morning\",\n        \"preferred_delivery_time\": \"3pm - 5pm\"\n      },\n      {\n        \"id\": 2,\n        \"currency\": \"PHP\",\n        \"reference_id\": \"7336180193817RYKP\",\n        \"tracking_number\": \"0000-0002-SRFT\",\n        \"payment_method\": \"cod\",\n        \"status\": \"pending\",\n        \"email\": \"johndoe@email.com\",\n        \"contact_number\": \"+639172274819\",\n        \"total\": \"3103.25\",\n        \"paid\": 0,\n        \"metadata\": {\n          \"key_1\": \"value_1\",\n          \"key_2\": \"value_2\"\n        },\n        \"preferred_pickup_time\": \"morning\",\n        \"preferred_delivery_time\": \"3pm - 5pm\"\n      },\n      {\n        \"id\": 3,\n        \"currency\": \"PHP\",\n        \"reference_id\": \"7336180193817RYKP\",\n        \"tracking_number\": \"0000-0003-QMVL\",\n        \"payment_method\": \"cod\",\n        \"status\": \"pending\",\n        \"email\": \"johndoe@email.com\",\n        \"contact_number\": \"+639172274819\",\n        \"total\": \"3103.25\",\n        \"paid\": 0,\n        \"metadata\": {\n          \"key_1\": \"value_1\",\n          \"key_2\": \"value_2\"\n        },\n        \"preferred_pickup_time\": \"morning\",\n        \"preferred_delivery_time\": \"3pm - 5pm\"\n      },\n      {\n        \"id\": 4,\n        \"currency\": \"PHP\",\n        \"reference_id\": \"7336180193817RYKP\",\n        \"tracking_number\": \"0000-0004-VLSN\",\n        \"payment_method\": \"cod\",\n        \"status\": \"pending\",\n        \"email\": \"johndoe@email.com\",\n        \"contact_number\": \"+639172274819\",\n        \"total\": \"3103.25\",\n        \"paid\": 0,\n        \"metadata\": {\n          \"key_1\": \"value_1\",\n          \"key_2\": \"value_2\"\n        },\n        \"preferred_pickup_time\": \"morning\",\n        \"preferred_delivery_time\": \"3pm - 5pm\"\n      },\n      {\n        \"id\": 5,\n        \"currency\": \"PHP\",\n        \"reference_id\": \"7336180193817RYKP\",\n        \"tracking_number\": \"0000-0005-NQYS\",\n        \"payment_method\": \"cod\",\n        \"status\": \"pending\",\n        \"email\": \"johndoe@email.com\",\n        \"contact_number\": \"+639172274819\",\n        \"total\": \"3103.25\",\n        \"paid\": 0,\n        \"metadata\": {\n          \"key_1\": \"value_1\",\n          \"key_2\": \"value_2\"\n        },\n        \"preferred_pickup_time\": \"morning\",\n        \"preferred_delivery_time\": \"3pm - 5pm\"\n      },\n      {\n        \"id\": 6,\n        \"currency\": \"PHP\",\n        \"reference_id\": \"7336180193817RYKP\",\n        \"tracking_number\": \"0000-0006-ACZM\",\n        \"payment_method\": \"cod\",\n        \"status\": \"pending\",\n        \"email\": \"johndoe@email.com\",\n        \"contact_number\": \"+639172274819\",\n        \"total\": \"3103.25\",\n        \"paid\": 0,\n        \"metadata\": {\n          \"key_1\": \"value_1\",\n          \"key_2\": \"value_2\"\n        },\n        \"preferred_pickup_time\": \"morning\",\n        \"preferred_delivery_time\": \"3pm - 5pm\"\n      },\n      {\n        \"id\": 7,\n        \"currency\": \"PHP\",\n        \"reference_id\": \"7336180193817RYKP\",\n        \"tracking_number\": \"0000-0007-MAGY\",\n        \"payment_method\": \"cod\",\n        \"status\": \"pending\",\n        \"email\": \"johndoe@email.com\",\n        \"contact_number\": \"+639172274819\",\n        \"total\": \"3103.25\",\n        \"paid\": 0,\n        \"metadata\": {\n          \"key_1\": \"value_1\",\n          \"key_2\": \"value_2\"\n        },\n        \"preferred_pickup_time\": \"morning\",\n        \"preferred_delivery_time\": \"3pm - 5pm\"\n      },\n      {\n        \"id\": 8,\n        \"currency\": \"PHP\",\n        \"reference_id\": \"7336180193817RYKP\",\n        \"tracking_number\": \"0000-0008-KQNS\",\n        \"payment_method\": \"cod\",\n        \"status\": \"pending\",\n        \"email\": \"johndoe@email.com\",\n        \"contact_number\": \"+639172274819\",\n        \"total\": \"3103.25\",\n        \"paid\": 0,\n        \"metadata\": {\n          \"key_1\": \"value_1\",\n          \"key_2\": \"value_2\"\n        },\n        \"preferred_pickup_time\": \"morning\",\n        \"preferred_delivery_time\": \"3pm - 5pm\"\n      },\n      {\n        \"id\": 9,\n        \"currency\": \"PHP\",\n        \"reference_id\": \"7336180193817RYKP\",\n        \"tracking_number\": \"0000-0009-VDYH\",\n        \"payment_method\": \"cod\",\n        \"status\": \"pending\",\n        \"email\": \"johndoe@email.com\",\n        \"contact_number\": \"+639172274819\",\n        \"total\": \"3103.25\",\n        \"paid\": 0,\n        \"metadata\": {\n          \"key_1\": \"value_1\",\n          \"key_2\": \"value_2\"\n        },\n        \"preferred_pickup_time\": \"morning\",\n        \"preferred_delivery_time\": \"3pm - 5pm\"\n      },\n      {\n        \"id\": 10,\n        \"currency\": \"PHP\",\n        \"reference_id\": \"7336180193817RYKP\",\n        \"tracking_number\": \"0000-0010-JQXZ\",\n        \"payment_method\": \"cod\",\n        \"status\": \"pending\",\n        \"email\": \"johndoe@email.com\",\n        \"contact_number\": \"+639172274819\",\n        \"total\": \"3103.25\",\n        \"paid\": 0,\n        \"metadata\": {\n          \"key_1\": \"value_1\",\n          \"key_2\": \"value_2\"\n        },\n        \"preferred_pickup_time\": \"morning\",\n        \"preferred_delivery_time\": \"3pm - 5pm\"\n      },\n      {\n        \"id\": 11,\n        \"currency\": \"PHP\",\n        \"reference_id\": \"7336180193817RYKP\",\n        \"tracking_number\": \"0000-0011-ATHR\",\n        \"payment_method\": \"cod\",\n        \"status\": \"pending\",\n        \"email\": \"johndoe@email.com\",\n        \"contact_number\": \"+639172274819\",\n        \"total\": \"3103.25\",\n        \"paid\": 0,\n        \"metadata\": {\n          \"key_1\": \"value_1\",\n          \"key_2\": \"value_2\"\n        },\n        \"preferred_pickup_time\": \"morning\",\n        \"preferred_delivery_time\": \"3pm - 5pm\"\n      },\n      {\n        \"id\": 12,\n        \"currency\": \"PHP\",\n        \"reference_id\": \"7336180193817RYKP\",\n        \"tracking_number\": \"0000-0012-WCFM\",\n        \"payment_method\": \"cod\",\n        \"status\": \"pending\",\n        \"email\": \"johndoe@email.com\",\n        \"contact_number\": \"+639172274819\",\n        \"total\": \"3103.25\",\n        \"paid\": 0,\n        \"metadata\": {\n          \"key_1\": \"value_1\",\n          \"key_2\": \"value_2\"\n        },\n        \"preferred_pickup_time\": \"morning\",\n        \"preferred_delivery_time\": \"3pm - 5pm\"\n      },\n      {\n        \"id\": 13,\n        \"currency\": \"PHP\",\n        \"reference_id\": \"7336180193817RYKP\",\n        \"tracking_number\": \"0000-0013-ERTC\",\n        \"payment_method\": \"cod\",\n        \"status\": \"pending\",\n        \"email\": \"johndoe@email.com\",\n        \"contact_number\": \"+639172274819\",\n        \"total\": \"3103.25\",\n        \"paid\": 0,\n        \"metadata\": {\n          \"key_1\": \"value_1\",\n          \"key_2\": \"value_2\"\n        },\n        \"preferred_pickup_time\": \"morning\",\n        \"preferred_delivery_time\": \"3pm - 5pm\"\n      },\n      {\n        \"id\": 14,\n        \"currency\": \"PHP\",\n        \"reference_id\": \"7336180193817RYKP\",\n        \"tracking_number\": \"0000-0014-VLKU\",\n        \"payment_method\": \"cod\",\n        \"status\": \"pending\",\n        \"email\": \"johndoe@email.com\",\n        \"contact_number\": \"+639172274819\",\n        \"total\": \"3103.25\",\n        \"paid\": 0,\n        \"metadata\": {\n          \"key_1\": \"value_1\",\n          \"key_2\": \"value_2\"\n        },\n        \"preferred_pickup_time\": \"morning\",\n        \"preferred_delivery_time\": \"3pm - 5pm\"\n      },\n      {\n        \"id\": 15,\n        \"currency\": \"PHP\",\n        \"reference_id\": \"7336180193817RYKP\",\n        \"tracking_number\": \"0000-0015-TRXY\",\n        \"payment_method\": \"cod\",\n        \"status\": \"pending\",\n        \"email\": \"johndoe@email.com\",\n        \"contact_number\": \"+639172274819\",\n        \"total\": \"3103.25\",\n        \"paid\": 0,\n        \"metadata\": {\n          \"key_1\": \"value_1\",\n          \"key_2\": \"value_2\"\n        },\n        \"preferred_pickup_time\": \"morning\",\n        \"preferred_delivery_time\": \"3pm - 5pm\"\n      },\n      {\n        \"id\": 16,\n        \"currency\": \"PHP\",\n        \"reference_id\": \"7336180193817RYKP\",\n        \"tracking_number\": \"0000-0016-VHLD\",\n        \"payment_method\": \"cod\",\n        \"status\": \"pending\",\n        \"email\": \"johndoe@email.com\",\n        \"contact_number\": \"+639172274819\",\n        \"total\": \"3103.25\",\n        \"paid\": 0,\n        \"metadata\": {\n          \"key_1\": \"value_1\",\n          \"key_2\": \"value_2\"\n        },\n        \"preferred_pickup_time\": \"morning\",\n        \"preferred_delivery_time\": \"3pm - 5pm\"\n      },\n      {\n        \"id\": 17,\n        \"currency\": \"PHP\",\n        \"reference_id\": \"7336180193817RYKP\",\n        \"tracking_number\": \"0000-0017-WXHS\",\n        \"payment_method\": \"cod\",\n        \"status\": \"pending\",\n        \"email\": \"johndoe@email.com\",\n        \"contact_number\": \"+639172274819\",\n        \"total\": \"3103.25\",\n        \"paid\": 0,\n        \"metadata\": {\n          \"key_1\": \"value_1\",\n          \"key_2\": \"value_2\"\n        },\n        \"preferred_pickup_time\": \"morning\",\n        \"preferred_delivery_time\": \"3pm - 5pm\"\n      },\n      {\n        \"id\": 18,\n        \"currency\": \"PHP\",\n        \"reference_id\": \"7336180193817RYKP\",\n        \"tracking_number\": \"0000-0018-EKSQ\",\n        \"payment_method\": \"cod\",\n        \"status\": \"pending\",\n        \"email\": \"johndoe@email.com\",\n        \"contact_number\": \"+639172274819\",\n        \"total\": \"3103.25\",\n        \"paid\": 0,\n        \"metadata\": {\n          \"key_1\": \"value_1\",\n          \"key_2\": \"value_2\"\n        },\n        \"preferred_pickup_time\": \"morning\",\n        \"preferred_delivery_time\": \"3pm - 5pm\"\n      },\n      {\n        \"id\": 19,\n        \"currency\": \"PHP\",\n        \"reference_id\": \"7336180193817RYKP\",\n        \"tracking_number\": \"0000-0019-SYCA\",\n        \"payment_method\": \"cod\",\n        \"status\": \"pending\",\n        \"email\": \"johndoe@email.com\",\n        \"contact_number\": \"+639172274819\",\n        \"total\": \"3103.25\",\n        \"paid\": 0,\n        \"metadata\": {\n          \"key_1\": \"value_1\",\n          \"key_2\": \"value_2\"\n        },\n        \"preferred_pickup_time\": \"morning\",\n        \"preferred_delivery_time\": \"3pm - 5pm\"\n      },\n      {\n        \"id\": 20,\n        \"currency\": \"PHP\",\n        \"reference_id\": \"7336180193817RYKP\",\n        \"tracking_number\": \"0000-0020-WZGL\",\n        \"payment_method\": \"cod\",\n        \"status\": \"pending\",\n        \"email\": \"johndoe@email.com\",\n        \"contact_number\": \"+639172274819\",\n        \"total\": \"3103.25\",\n        \"paid\": 0,\n        \"metadata\": {\n          \"key_1\": \"value_1\",\n          \"key_2\": \"value_2\"\n        },\n        \"preferred_pickup_time\": \"morning\",\n        \"preferred_delivery_time\": \"3pm - 5pm\"\n      },\n      {\n        \"id\": 28,\n        \"currency\": \"PHP\",\n        \"reference_id\": \"7336180193817RYKP\",\n        \"tracking_number\": \"0000-0028-TWMB\",\n        \"payment_method\": \"cod\",\n        \"status\": \"pending\",\n        \"email\": \"johndoe@email.com\",\n        \"contact_number\": \"+639172274819\",\n        \"total\": \"3103.25\",\n        \"paid\": 0,\n        \"metadata\": {\n          \"key_1\": \"value_1\",\n          \"key_2\": \"value_2\"\n        },\n        \"preferred_pickup_time\": \"morning\",\n        \"preferred_delivery_time\": \"3pm - 5pm\"\n      },\n      {\n        \"id\": 21,\n        \"currency\": \"PHP\",\n        \"reference_id\": \"7336180193817RYKP\",\n        \"tracking_number\": \"0000-0021-ZTMR\",\n        \"payment_method\": \"cod\",\n        \"status\": \"pending\",\n        \"email\": \"johndoe@email.com\",\n        \"contact_number\": \"+639172274819\",\n        \"total\": \"3103.25\",\n        \"paid\": 0,\n        \"metadata\": {\n          \"key_1\": \"value_1\",\n          \"key_2\": \"value_2\"\n        },\n        \"preferred_pickup_time\": \"morning\",\n        \"preferred_delivery_time\": \"3pm - 5pm\"\n      },\n      {\n        \"id\": 22,\n        \"currency\": \"PHP\",\n        \"reference_id\": \"7336180193817RYKP\",\n        \"tracking_number\": \"0000-0022-RSBY\",\n        \"payment_method\": \"cod\",\n        \"status\": \"pending\",\n        \"email\": \"johndoe@email.com\",\n        \"contact_number\": \"+639172274819\",\n        \"total\": \"3103.25\",\n        \"paid\": 0,\n        \"metadata\": {\n          \"key_1\": \"value_1\",\n          \"key_2\": \"value_2\"\n        },\n        \"preferred_pickup_time\": \"morning\",\n        \"preferred_delivery_time\": \"3pm - 5pm\"\n      },\n      {\n        \"id\": 23,\n        \"currency\": \"PHP\",\n        \"reference_id\": \"7336180193817RYKP\",\n        \"tracking_number\": \"0000-0023-NDEH\",\n        \"payment_method\": \"cod\",\n        \"status\": \"pending\",\n        \"email\": \"johndoe@email.com\",\n        \"contact_number\": \"+639172274819\",\n        \"total\": \"3103.25\",\n        \"paid\": 0,\n        \"metadata\": {\n          \"key_1\": \"value_1\",\n          \"key_2\": \"value_2\"\n        },\n        \"preferred_pickup_time\": \"morning\",\n        \"preferred_delivery_time\": \"3pm - 5pm\"\n      },\n      {\n        \"id\": 24,\n        \"currency\": \"PHP\",\n        \"reference_id\": \"7336180193817RYKP\",\n        \"tracking_number\": \"0000-0024-PXYM\",\n        \"payment_method\": \"cod\",\n        \"status\": \"pending\",\n        \"email\": \"johndoe@email.com\",\n        \"contact_number\": \"+639172274819\",\n        \"total\": \"3103.25\",\n        \"paid\": 0,\n        \"metadata\": {\n          \"key_1\": \"value_1\",\n          \"key_2\": \"value_2\"\n        },\n        \"preferred_pickup_time\": \"morning\",\n        \"preferred_delivery_time\": \"3pm - 5pm\"\n      }\n    ]\n  }\n\n ```\n\n# Webhooks\n\n---\n\nA webhook is an HTTP callback that you define to process incoming events or status updates from our API.  \nWe currently support both **HTTP** and **HTTPS** URLs but we advise you to use HTTPS as much as possible to ensure security. An alternate security measure you can do is to append a token to the URL in order to make it “unguessable” to the public.  \nWe only send JSON data to your webhook URL via HTTP POST and expect a **200 HTTP status code** in the response. Anything other than a 200 status code will be treated as failure and the request will be retried at a later time.  \nThere is currently no user interface for setting the webhook URL so please send us an email or message us on your designated slack channel if you need to have it changed.\n\n## **Multiple Events per Tracking Number**\n\nThe webhook payload may contain multiple events associated with the same tracking number. This can occur when there are updates to the shipment status or other relevant information during the delivery process.\n\nClients can distinguish between these events using the following approaches:\n\n1. **Event ID**: Each event is assigned a unique incremental `event_id`. Events for the same tracking number will have different `event_id` values, allowing you to identify and sort them accordingly.\n2. **Event Timestamp**: The `status_updated_at` field represents the timestamp when the event occurred. Events for the same tracking number will have different `status_updated_at` values, enabling you to order them chronologically.\n    \n\nIt is recommended to process the events in the order they are received or based on the `status_updated_at` field to ensure accurate tracking of the shipment's progress. Clients can ignore outdated events and consider only the latest event from the payload for the most up-to-date shipment status.\n\n**Special Handling for End States**\n\nThere is a possibility that `status_updated_at` dates for events representing end states (e.g., delivered, cancelled, or returned) may be erroneous. To account for this, clients should accept all end state events, regardless of any date issues, and consider them as valid updates for the shipment status.\n\n## Format\n\nEvery JSON payload sent to your webhook will have the following attributes:\n\n<table><tbody><tr><th>Name</th><th>Type</th><th>Description</th><th>Required?</th><th>Default Value</th></tr><tr><td><div>`event`</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>string</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>type of event</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>yes</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>`status_update`</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>`timestamp`</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>integer</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>Date and time in unix time when the data was sent to the webhook.</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>yes</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>N/A</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>`data`</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>json array</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>Array of events; historical data.</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>yes</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td><td><div>N/A</div><div contenteditable=\"false\"><div><div><div></div></div></div><div></div></div></td></tr></tbody></table>\n\n###### Sample Payload\n\n``` http\n    POST /your/webhook HTTP/1.1\n    Content-Type: application/json\n\n ```\n\n``` json\n  {\n    \"event\": \"status_update\",\n    \"timestamp\": 1512551041,\n    \"data\": [{\n        \"event_id\": 35862967,\n        \"tracking_number\": \"0495-0754-VZXJ\",\n        \"reference_id\": \"17120514285DPEK.42ecdce0-d185-4356-a30f-d33ea14cff05\",\n        \"created_at\": \"2017-12-06 16:41:31.898782+08\",\n        \"status_updated_at\": \"2017-12-06 16:41:21+08\",\n        \"status\": \"picked_up\",\n        \"remarks\": \"Package successfully picked up\",\n        \"fees\": {\n          \"shipping_fee\": 100,\n          \"insurance_fee\": 9,\n          \"transaction_fee\": 27\n        },\n        \"party\": {\n          \"id\": 6,\n          \"external_id\": null\n        },\n        \"parent\": {\n          \"id\": null,\n          \"tracking_number\": null,\n          \"reference_id\": null\n        }\n      },\n      {\n        \"event_id\": 35862969,\n        \"tracking_number\": \"0476-8835-FHUL\",\n        \"reference_id\": \"17120110305AQXW.db11da3c-15f9-4a79-a605-2aa59600790f\",\n        \"created_at\": \"2017-12-06 16:41:31.939001+08\",\n        \"status_updated_at\": \"2017-12-06 16:04:06+08\",\n        \"status\": \"in_transit\",\n        \"remarks\": \"FORWARDED TO PUERTO PRINCESA DELIVERY HUB\",\n        \"fees\": {\n          \"shipping_fee\": 100,\n          \"insurance_fee\": 5,\n          \"transaction_fee\": 20\n        },\n        \"party\": {\n          \"id\": 6,\n          \"external_id\": null\n        },\n        \"parent\": {\n          \"id\": null,\n          \"tracking_number\": null,\n          \"reference_id\": null\n        }\n      },\n      {\n        \"event_id\": 35862972,\n        \"tracking_number\": \"0479-8119-CWAX\",\n        \"reference_id\": \"17120109493993N.88b7c455-cf29-404c-a91f-a398278ad1fd\",\n        \"created_at\": \"2017-12-06 16:41:32.475252+08\",\n        \"status_updated_at\": \"2017-12-06 16:20:19+08\",\n        \"status\": \"in_transit\",\n        \"remarks\": \"RECEIVED AT SOUTH LUZON AREA\",\n        \"fees\": {\n          \"shipping_fee\": 100,\n          \"insurance_fee\": 6.1,\n          \"transaction_fee\": 20\n        },\n        \"party\": {\n          \"id\": 6,\n          \"external_id\": null\n        },\n        \"parent\": {\n          \"id\": null,\n          \"tracking_number\": null,\n          \"reference_id\": null\n        }\n      },\n      {\n        \"event_id\": 35862977,\n        \"tracking_number\": \"0481-9668-HAJN\",\n        \"reference_id\": \"17120113387HYRH.3623ee76-ee52-44a0-b890-f2bdc661078e\",\n        \"created_at\": \"2017-12-06 16:41:33.064148+08\",\n        \"status_updated_at\": \"2017-12-06 16:37:43+08\",\n        \"status\": \"in_transit\",\n        \"remarks\": \"RECEIVED AT SOUTH LUZON AREA\",\n        \"fees\": {\n          \"shipping_fee\": 100,\n          \"insurance_fee\": 5.52,\n          \"transaction_fee\": 20\n        },\n        \"party\": {\n          \"id\": 6,\n          \"external_id\": null\n        },\n        \"parent\": {\n          \"id\": null,\n          \"tracking_number\": null,\n          \"reference_id\": null\n        }\n      },\n      {\n        \"event_id\": 35862981,\n        \"tracking_number\": \"0492-6744-JFQD\",\n        \"reference_id\": \"17120411264R1YD.8b95ac0c-4466-4053-bd03-ce1c9723b8fc\",\n        \"created_at\": \"2017-12-06 16:41:33.193278+08\",\n        \"status_updated_at\": \"2017-12-06 16:41:22+08\"\n      }\n    ]\n  }\n\n ```\n\n## Retries\n\nOur system has a retry protocol whenever we get an error response from the client (i.e. a non-200 HTTP status code).  \nOur retry phases are as follows:\n\n1. Retry the failed message every 5 minutes for a maximum of 5 times.\n2. If the status update still fails after the 5th retry, its contents go to our dead letter queue (DLQ) for manual investigation.\n3. We (QuadX) report the failure to the client.\n    \n\n<p><img src=\"https://www.quadx.xyz/wp-content/themes/quad-x/assets/img/footergreen.png\"></p>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"12850780","collectionId":"6823b9b7-866b-49d0-b7d8-839c653417e7","publishedId":"TVKJyvMn","public":true,"publicUrl":"https://docs.quadx.xyz","privateUrl":"https://go.postman.co/documentation/12850780-6823b9b7-866b-49d0-b7d8-839c653417e7","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.11.6","publishDate":"2021-01-13T15:01:20.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/768118b36f06c94b0306958b980558e6915839447e859fe16906e29d683976f0","favicon":"https://quadx.xyz/favicon.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://docs.quadx.xyz/view/metadata/TVKJyvMn"}