### Submit Tip API Request Example (cURL) Source: https://github.com/johntheyoung/grab-express-llm-docs/blob/main/grab-express.md Example cURL command to submit a tip for a delivery request, demonstrating the required headers and JSON body payload. This command uses a placeholder for the bearer token. ```curl curl -X POST \ https://partner-api.grab.com/grab-express/v1/deliveries/tip/submit \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d'{ "deliveryID": "IN-2-00D2B1CBMWBO7JND48J5", "amount": 100 }' ``` -------------------------------- ### Partner Webhook Response Example Source: https://github.com/johntheyoung/grab-express-llm-docs/blob/main/grab-express.md Example of the expected JSON response from the partner's webhook endpoint, typically an empty object indicating successful processing of the webhook notification. ```json { // response from partner side } ``` -------------------------------- ### GrabExpress Delivery API Response Example Source: https://github.com/johntheyoung/grab-express-llm-docs/blob/main/grab-express.md An example JSON payload representing a typical successful response from the GrabExpress delivery API, detailing delivery information, quote, sender, recipient, and status. ```JSON { "deliveryID": "IN-2-0BTPB1C1G8IL6W72ZHK8", "merchantOrderID": "1ac1fa2f-880a-43d3-8476-7cc6e99e40f6", "paymentMethod": "CASHLESS", "quote": { "service": { "id": 0, "type": "INSTANT", "name": "GrabExpress" }, "currency": { "code": "SGD", "symbol": "S$", "exponent": 2 }, "amount": 11, "estimatedTimeline": { "pickup": "2020-04-01T04:21:29Z", "dropoff": "2020-04-01T04:41:40Z" }, "distance": 10428, "origin": { "address": "1 IJK View, Singapore 018936", "coordinates": { "latitude": 1.2345678, "longitude": 3.4567890 } }, "destination": { "address": "1 ABC St, Singapore 078881", "coordinates": { "latitude": 1.2345876, "longitude": 3.4567098 } }, "packages": [ { "name": "Fish Burger", "description": "Fish Burger with mayonnaise sauce", "quantity": 2, "price": 5, "dimensions": {} }, { "name": "Truffle Fries", "description": "Thin cut deep-fried potatoes topped with truffle oil", "quantity": 2, "price": 4, "dimensions": {} } ] }, "sender": { "firstName": "Jewel Changi Branch", "companyName": "Shake Shack", "email": "ssburger@gmail.com", "phone": "0124355834", "smsEnabled": true }, "recipient": { "firstName": "John", "lastName": "Tan", "email": "john@gmail.com", "phone": "91526655", "smsEnabled": true }, "status": "ALLOCATING", "trackingURL": "", "courier": null, "timeline": null, "schedule": { "pickupTimeFrom" : "2021-04-11T12:37:28+08:00", "pickupTimeTo" : "2021-04-11T13:37:28+08:00" }, "cashOnDelivery": null, "invoiceNo": "", "pickupPin": "2354", "advanceInfo": null } ``` -------------------------------- ### Grab Express API: Submit Tip Endpoint Reference Source: https://github.com/johntheyoung/grab-express-llm-docs/blob/main/grab-express.md Comprehensive API documentation for the Grab Express Submit Tip endpoint, including its purpose, URL, usage rules, request parameters (headers and body), and example response structures. ```APIDOC Submit Tip API: Purpose: Allows partner to tip a delivery request. Endpoint URL: POST v1/deliveries/tip/submit Testing URL: https://partner-api.grab.com/grab-express-sandbox/v1/deliveries/tip/submit Production URL: https://partner-api.grab.com/grab-express/v1/deliveries/tip/submit Rules/Limitations: - Tipping for Multi-stop Delivery trip is not supported - Only successfully completed orders can be tipped - The Tipping window is open for 48hrs starting from delivery complete status. - Tips can only be given once for the associated order. - Tips can not be canceled and refunded once tips have been disbursed to the driver. Request Header Parameters: - Content-Type (string, required): The content type of the request body. You must use application/json for this header because GrabFood doesn't support other formats currently. - Authorization (string, required): Header required for authorization purpose. If you have the access_token, include the bearer token in the Authorization header along with the Bearer authentication scheme. For example, `Authorization: Bearer {access_token}`. Request Body Parameters: - deliveryID (string, required): A delivery’s unique identifier generated by Grab Grab’s Tracking Number i.e. `IN-2-00D2B1CBMWBO7JND48J5`. - amount (float64, required): Tip amount. i.e. `20000`. Response Header Parameters: - Content-Type (string): application/json - X-Grabkit-Grab-Requestid (string): Used for debugging. Please mention this value while raising any issues. ``` ```json { "status": "success", "reason": "" } ``` ```json { "target": "", "reason": "invalid_argument", "message": "not a valid amount" } ``` -------------------------------- ### Example OAuth 2.0 Access Token Response Source: https://github.com/johntheyoung/grab-express-llm-docs/blob/main/grab-express.md An example JSON response received upon successfully obtaining an OAuth 2.0 access token from the GrabExpress authentication endpoint. It includes the access token, token type, and its expiration time. ```json { "access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6Il9kZWZhdWx0IiwidHlwIjoiSldUIn0.eyJhdWQiOiI1NWRkNzEyZTViNWY0MDQyYTEzZjVkZTM0ZjM4NmVjMSIsImV4cCI6MTU2MDMwMDgzMSwiaWF0IjoxNTU5Njk2MDMxLCJpc3MiOiJodHRwczovL2lkcC5ncmFiLmNvbSIsImp0aSI6InFJZDB6Wmh1UkhxX0F4STZPdncwekEiLCJuYmYiOjE1NTk2OTU4NTEsInBpZCI6IjIwM2E5MmFmLTJmN2ItNDNjZS1hNTVmLTc5NGE4ZWQzZWE2NyIsInBzdCI6MSwic2NwIjoiW1wiYzE2MWM0NTdlZGVlNGExYmI4YTQwMzZmMDM5ZTYzZDZcIl0iLCJzdWIiOiJUV09fTEVHR0VEX09BVVRIIiwic3ZjIjoiIiwidGtfdHlwZSI6ImFjY2VzcyJ9.DEpeDobxey2YIEiAYWJ4zB5chCwGwc7Fojb8GEjnn4bORqb8-vDD5zQ-X7BRPRxAUv0MVam4q2annB4z4tEBNYYv1PW-w9UiJ-224kR8QJ1lWOsN9ZKibSWRMS6Mt9LN3r0_VSTDQB_X0QzMOOV00EeloMTbf6TKJ-3YQwDuD8GJeK1aNaLFmfcQC6avvyGcfO2VFnDDnLbDLmJ-oYQXn9Xb7SX_GDsnWUukxaOriQFW7PW0JVSvrAmq3lV5C1aioDI_qJD0MV065MJJT9xOVPIf_Myq5R6AHTF5Gon6ga3eA8fAYNpQ9Qbmq2jH-aFYBMcx27fL2-4vIhBCHKnhww", "token_type": "Bearer", "expires_in": 604799 } ``` -------------------------------- ### Get Delivery Quotes Response with Valid Promo Code Source: https://github.com/johntheyoung/grab-express-llm-docs/blob/main/grab-express.md An example JSON response body from the 'Get Delivery Quotes' endpoint, illustrating the `discountInfo` object when a valid promo code has been successfully applied, showing `"success": true` and the `amount` of discount. ```JSON { ..., "discountInfo": { "success": true, "amount": 1, "errorMsg": "" }, ... } ``` -------------------------------- ### GrabExpress API Promo Codes for Testing Source: https://github.com/johntheyoung/grab-express-llm-docs/blob/main/grab-express.md Lists specific promo codes available for testing purposes in a non-production environment, along with their respective descriptions, such as 'VALIDPROMO', 'OODRPROMO' (expired/not started), and 'FULLPROMO' (fully redeemed). ```APIDOC | Code | Description | | --- | --- | | VALIDPROMO | A valid promo code. | | OODRPROMO | Out of date range promo code. In other words, the promo code has expired OR has not started. | | FULLPROMO | Fully redeemed promo code. | ``` -------------------------------- ### GrabExpress Order Response Parameters Source: https://github.com/johntheyoung/grab-express-llm-docs/blob/main/grab-express.md This section details the various parameters returned in the response body of a GrabExpress order API call, including their types, descriptions, and any specific notes or examples. ```APIDOC Response Parameters: merchantOrderId: string - An order’s unique identifier. OrderID represents object(s) being delivered i.e. `GE-00001` paymentMethod: string - Delivery fee payment method i.e. `CASHLESS` advanceInfo: object - Always null quote: object - JSON Object containing quote info service: object - Delivery service i.e. { "id": 0, "type": "INSTANT", "name": "GrabExpress" } id: integer - Service id i.e. `0` type: string - Service type i.e. `INSTANT` name: name - Service name i.e. `GrabExpress` currency: object - JSON Object containing code, symbol and exponent for a given currency i.e. { "code": "SGD", "symbol": "S$", "exponent": 2 } code: string - Currency code i.e. `IDR`, `MYR`, `PHP`, `SGD`, `THB`, `VND` symbol: string - Currency symbol i.e. `Rp`, `RM`, `₱`, `S$`, `฿`, `₫` exponent: integer - Log base 10 of no. of times we have to multiply major unit to get minor unit. i.e. `0`, `2` origin[]: array - JSON Array to hold origin information i.e. address, keywords, coordinates, etc. of the location. address: string - Address street name keywords: string - Building name / Shop name cityCode: string - Airport code of the city of the order. i.e. `SIN` for Singapore. coordinates: object - JSON Object holding origin geolocation i.e. { "latitude": 1.2345678, "longitude": 3.4567890 } Note: 1. `latitude`, `longitude` supplied must be precise. i.e. At least 6 digits after the decimal point should be available for both values. Partner can even supply 7-8 digits after the decimal point if feasible. Note: 2. Multi-city orders are not permitted except for some exception cities. Hence, origin and destination coordinates should be in the same city unless Grab's business team specifically specifies otherwise. latitude: float64 - Latitude coordinates of the origin address i.e. `1.2345678` longitude: float64 - Longitude coordinates of the origin address i.e. `3.4567890` extra: string - Any additional info firstName: string - Sender’s first name lastName: string - Sender’s last name title: string - Sender’s salutation companyName: string - Sender’s company name email: string - Email must be properly formatted. Note: Either email or phone MUST be available phone: string - Phone number must start with country code without +. (E.164 standard) [https://www.twilio.com/docs/glossary/what-e164]. Note: Either email or phone MUST be available smsEnabled: bool - When SMS is enabled, SMS will be sent to sender to notify them upon successful allocation, pickup and dropoff instruction: string - This sender instructions will be displayed on the driver’s app when the driver is picking up. Note: Maximum limit is 1000 characters destination[]: array - JSON Object to hold destination information i.e. address, keywords, coordinates, etc. of the location. address: string - Address street name keywords: string - Building name / Shop name cityCode: string - Airport code of the city of the order. i.e. `SIN` for Singapore. coordinates: object - JSON Object holding destination geolocation i.e. { "latitude": 1.2345876, "longitude": 3.4567098 } Note: `latitude`, `longitude` supplied must be precise. i.e. At least 6 digits after the decimal point should be available for both values. Partner can even supply 7-8 digits after the decimal point if feasible. latitude: float64 - Latitude coordinates of the destination address i.e. `1.2345876` longitude: float64 - Longitude coordinates of the destination address i.e. `3.4567098` extra: string - Any additional info. Note: This field is not shown anywhere in the driver, pax app currently. It is just kept for extensibility purposes, i.e. For adding some new info in future. firstName: string - Recipient’s first name lastName: string - Recipient’s last name title: string - Recipient’s salutation companyName: string - Recipient’s company name ``` -------------------------------- ### Curl Example: Requesting Grab Express Delivery Quotes Source: https://github.com/johntheyoung/grab-express-llm-docs/blob/main/grab-express.md This curl command demonstrates a complete example of how to send a POST request to the Grab Express delivery quotes API. It includes the necessary `Content-Type` and `Authorization` headers, along with a detailed JSON request body specifying service type, vehicle type, package details, and origin/destination coordinates. ```curl curl -X POST \ https://partner-api.grab.com/grab-express-sandbox/v1/deliveries/quotes \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -H 'cache-control: no-cache' \ -d '{ "serviceType": "INSTANT", "vehicleType": "BIKE", "codType": "REGULAR", "packages": [ { "name": "Fish Burger", "description": "Fish Burger with mayonnaise sauce", "quantity": 2, "price": 5, "dimensions": { "height": 0, "width": 0, "depth": 0, "weight": 0 } }, { "name": "Truffle Fries", "description": "Thin cut deep-fried potatoes topped with truffle oil", "quantity": 2, "price": 4, "dimensions": { "height": 0, "width": 0, "depth": 0, "weight": 0 } } ], "origin": { "address": "1 IJK View, Singapore 018936", "keywords": "PQR Tower", "cityCode": "SIN", "coordinates": { "latitude": 1.2345678, "longitude": 3.4567890 } }, "destination": { "address": "1 ABC St, Singapore 078881", "keywords": "XYZ Tower", "cityCode": "SIN", "coordinates": { "latitude": 1.2345876, "longitude": 3.4567098 } } }' ``` -------------------------------- ### Get Delivery Quotes Request with Valid Promo Code Source: https://github.com/johntheyoung/grab-express-llm-docs/blob/main/grab-express.md An example JSON request body for the 'Get Delivery Quotes' endpoint, demonstrating how to include a valid promo code (`VALIDPROMO`) within the request payload. ```JSON { ..., "promoCode": "VALIDPROMO", ... } ``` -------------------------------- ### Example GrabExpress Delivery API Response Source: https://github.com/johntheyoung/grab-express-llm-docs/blob/main/grab-express.md This JSON shows a sample successful response for a GrabExpress delivery. It includes details like delivery ID, merchant order ID, payment method, quote details (service, currency, amount, distance, origin, destination, packages), sender and recipient information, status, tracking URL, timeline, cash on delivery details, invoice number, pickup PIN, and advance info. ```json { "deliveryID": "IN-2-00D2B1CBMWBO7JND48J5", "merchantOrderID": "053e68b3-bcbf-4493-b270-afac9c923169", "paymentMethod": "CASH", "quote": { "service": { "id": 0, "type": "INSTANT", "name": "GrabExpress" }, "currency": { "code": "VND", "symbol": "₫", "exponent": 0 }, "amount": 29000, "estimatedTimeline": null, "distance": 5672, "origin": { "address": "1 IJK View, Singapore 018936", "keywords": "PQR Tower", "coordinates": { "latitude": 1.2345678, "longitude": 3.4567890 } }, "destination": { "address": "1 ABC St, Singapore 078881", "keywords": "XYZ Tower", "coordinates": { "latitude": 1.2345876, "longitude": 3.4567098 } }, "packages": [ { "name": "Bún bò Huế - Bát nhỏ", "description": "Bát nhỏ. Nước trong nhé Quán", "quantity": 2, "price": 28000, "dimensions": { "weight": 1 }, "currency": { "code": "VND", "symbol": "₫", "exponent": 0 } }, { "name": "Bún bò Huế - Bát lớn", "description": "Bát lớn. Nước trong nha, nhiều hành", "quantity": 1, "price": 36000, "dimensions": { "weight": 1 }, "currency": { "code": "VND", "symbol": "₫", "exponent": 0 } } ] }, "sender": { "firstName": "Nguyễn Anh Nguyên", "phone": "0901232468", "smsEnabled": true, "instruction": "Đến bấm chuông \n\n--- # TIỀN CẦN ỨNG CHO NHÀ HÀNG: 86,250\n" }, "recipient": { "firstName": "Nguyễn Anh Nguyên", "phone": "0901232468", "smsEnabled": true, "instruction": "Chó dữ \n\n--- THU HỘ TỪ NGƯỜI MUA: 121,000\n" }, "status": "COMPLETED", "trackingURL": "", "courier": null, "timeline": { "create": "2020-04-03T05:26:36Z", "allocate": "2020-04-03T05:33:03Z", "pickup": "2020-04-03T07:22:40Z", "dropoff": "2020-04-03T09:48:52Z", "completed": "2020-04-03T09:58:52Z" }, "schedule": null, "cashOnDelivery": { "enable": true, "amount": 121000 }, "invoiceNo": "053e68b3-bcbf-4493-b270-afac9c923169", "pickupPin": "9092", "advanceInfo": { "failedReason": "6|Could not find driver" } } ``` -------------------------------- ### Example GrabExpress Multi-Stop Quote Response Source: https://github.com/johntheyoung/grab-express-llm-docs/blob/main/grab-express.md This JSON snippet demonstrates a typical successful response from the GrabExpress API for a multi-stop quote. It includes details such as service type, currency, origin and multiple destination points with their respective addresses, coordinates, amounts, estimated timelines, and package information. ```json { "quotes": [ { "service": { "id": 3, "type": "MULTI_STOP", "name": "GrabExpress" }, "currency": { "code": "IDR", "symbol": "Rp", "exponent": 2 }, "origin": [ { "address": "1 IJK View, Singapore 018936", "keywords": "", "coordinates": { "latitude": 1.2345678, "longitude": 3.4567890 }, "cityCode": "" } ], "destination": [ { "address": "1 ABC St, Singapore 078881", "keywords": "", "coordinates": { "latitude": 1.2345876, "longitude": 3.4567098 }, "amount": 47850, "estimatedTimeline": { "pickup": "2021-06-24T11:32:11Z", "dropoff": "2021-06-24T12:19:24Z" }, "packages": [ { "name": "pkg 1", "description": "pkg 1", "quantity": 1, "price": 0, "invoiceNo": "1235", "dimensions": { "height": 10, "width": 10, "depth": 10, "weight": 10 } } ], "cityCode": "" }, { "address": "1 BCD St, Singapore 078882", "keywords": "", "coordinates": { "latitude": 1.2345768, "longitude": 3.4567980 }, "amount": 47850, "estimatedTimeline": { "pickup": "2021-06-24T11:32:11Z", "dropoff": "2021-06-24T12:19:24Z" }, "packages": [ { "name": "pkg 1", "description": "pkg 1", "quantity": 1, "price": 1000, "invoiceNo": "1234", "dimensions": { "height": 10, "width": 10, "depth": 10, "weight": 10 } } ], "cityCode": "" } ], "distance": 21748 } ] } ``` -------------------------------- ### Grab Express API Sample Response Body Source: https://github.com/johntheyoung/grab-express-llm-docs/blob/main/grab-express.md An example JSON structure representing a successful response from the Grab Express API. It includes details such as service quotes, currency, amounts, estimated timelines, origin and destination addresses with coordinates, and package information. ```JSON { "quotes": [ { "service": { "id": 0, "type": "INSTANT", "name": "GrabExpress" }, "currency": { "code": "SGD", "symbol": "S$", "exponent": 2 }, "amount": 11, "estimatedTimeline": { "pickup": "2020-04-01T07:35:05Z", "dropoff": "2020-04-01T07:55:28Z" }, "distance": 10449 } ], "origin": { "address": "1 IJK View, Singapore 018936", "cityCode": "SIN", "coordinates": { "latitude": 1.2345678, "longitude": 3.4567890 } }, "destination": { "address": "1 ABC St, Singapore 078881", "cityCode": "SIN", "coordinates": { "latitude": 1.2345876, "longitude": 3.4567098 } }, "packages": [ { "name": "Fish Burger", "description": "Fish Burger with mayonnaise sauce", "quantity": 2, "price": 5, "dimensions": {} }, { "name": "Truffle Fries", "description": "Thin cut deep-fried potatoes topped with truffle oil", "quantity": 2, "price": 4, "dimensions": {} } ] } ``` -------------------------------- ### Send Tracking Webhook Request to Partner Source: https://github.com/johntheyoung/grab-express-llm-docs/blob/main/grab-express.md Example cURL command to send a tracking webhook request to the partner's endpoint. This includes authentication headers and a detailed JSON payload with delivery, merchant, timestamp, status, and driver information, demonstrating a typical state change notification. ```curl curl -X POST \ https://{{api-endpoint}}/ \ -H 'Content-Type: application/json' \ -H 'Authorization-Id: ' \ -H 'Authorization: ' \ -H 'cache-control: no-cache' \ -d '{ "deliveryID": "IN-2-00D2CEBYCRQDKR48JYY0", "merchantOrderID": "G252059999", "timestamp": 1543305706, "status": "FAILED", "trackURL": "https://example.com/tracking", "pickupPin": "4510", "failedReason": "5|Canceled by Grab Operator", "sender": { "name": "Best Merchant", "address": "1 IJK View, Singapore 018936", "relationship": "Office colleague" }, "recipient": { "name": "Hermin", "address": "1 ABC St, Singapore 078881", "relationship": "Office colleague" }, "driver": { "name": "Johanan", "phone": "6288822666888", "licensePlate": "A 3333 SYY", "photoURL": "https://somephotourl.com/sgdfb6gfd87", "currentLat": 1.2345678, "currentLng": 3.4567890 } }' ``` -------------------------------- ### Create Multi-Stop Delivery Request (cURL) Source: https://github.com/johntheyoung/grab-express-llm-docs/blob/main/grab-express.md Example cURL command to create a multi-stop delivery order. It specifies origin, multiple destinations with package details, and payment method. Important notes: 'serviceType' must be 'MULTI_STOP' and 'highValue' is 'true' by default. Remember to replace '' with your actual OAuth token. ```curl curl -X POST \ https://partner-api.grab.com/grabfood-sandbox/partner/express/v1/deliveries \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -H 'cache-control: no-cache' \ -d '{ "merchantOrderID" : "MSD-2021-05-10-005", "serviceType" : "MULTI_STOP", "vehicleType": "BIKE", "codType": "REGULAR", "paymentMethod" : "CASHLESS", "origin" : [ { "address": "1 IJK View, Singapore 018936", "coordinates": { "latitude": 1.2345678, "longitude": 3.4567890 }, "firstName": "Jon", "lastName": "Bon", "email": "ijk@gmail.com", "phone": "6595160778" } ], "destination" : [ { "address": "1 ABC St, Singapore 078881", "coordinates": { "latitude": 1.2345876, "longitude": 3.4567098 }, "firstName": "Son", "lastName": "Bon", "email": "abc@gmail.com", "phone": "6596150778", "packages": [ { "name": "pkg 1", "quantity": 1, "description": "pkg 1", "price": 0, "invoiceNo": "1235", "dimensions": { "height": 10, "width": 10, "depth": 10, "weight": 100 } } ] }, { "address": "1 BCD St, Singapore 078882", "coordinates": { "latitude": 1.2345768, "longitude": 3.4567980 }, "firstName": "Mon", "lastName": "Bon", "email": "bcd@gmail.com", "phone": "6596150778", "packages": [ { "name": "pkg 1", "quantity": 1, "description": "pkg 1", "price": 1000.000, "invoiceNo": "1234", "dimensions": { "height": 10, "width": 10, "depth": 10, "weight": 10 } } ] } ], "routeOptimized": true }' ``` -------------------------------- ### GrabExpress Multi-Stop Delivery Quote Response Example Source: https://github.com/johntheyoung/grab-express-llm-docs/blob/main/grab-express.md This JSON snippet illustrates a typical successful response from the GrabExpress API for a multi-stop delivery quote. It includes comprehensive details about the merchant order, payment method, service type, currency, origin and multiple destination addresses with coordinates, contact information, package specifics, estimated timelines, and delivery status. ```json { "merchantOrderID": "MSD-2021-05-10-003", "paymentMethod": "CASHLESS", "advanceInfo": "", "quote": { "service": { "id": 3, "type": "MULTI_STOP", "name": "GrabExpress" }, "currency": { "code": "IDR", "symbol": "Rp", "exponent": 2 }, "origin": [ { "address": "1 IJK View, Singapore 018936", "keywords": "", "coordinates": { "latitude": 1.2345678, "longitude": 3.4567890 }, "extra": "", "firstName": "Jon", "lastName": "Bon", "title": "", "companyName": "", "email": "ijk@gmail.com", "phone": "6595160778", "smsEnabled": false, "instruction": "", "cityCode": "" } ], "destination": [ { "address": "1 ABC St, Singapore 078882", "keywords": "", "coordinates": { "latitude": 1.2345876, "longitude": 3.4567098 }, "extra": "", "firstName": "Son", "lastName": "Bon", "title": "", "companyName": "", "email": "abc@gmail.com", "phone": "6596150778", "smsEnabled": false, "instruction": "", "amount": 43500, "estimatedTimeline": { "pickup": "2021-05-09T17:10:09Z", "dropoff": "2021-05-09T17:57:30Z" }, "deliveryID": "MS-3-0FESB7PJX5ESFQJQB5X2", "status": "ALLOCATING", "packages": [ { "name": "pkg 1", "description": "pkg 1", "quantity": 1, "price": 0, "invoiceNo": "1235", "dimensions": { "height": 10, "width": 10, "depth": 10, "weight": 10 } } ], "cityCode": "", "pickupPin": "7732" }, { "address": "1 BCD St, Singapore 078882", "keywords": "", "coordinates": { "latitude": 1.2345768, "longitude": 3.4567980 }, "extra": "", "firstName": "Mon", "lastName": "Bon", "title": "", "companyName": "", "email": "bcd@gmail.com", "phone": "6591650778", "smsEnabled": false, "instruction": "", "amount": 43500, "estimatedTimeline": { "pickup": "2021-05-09T17:10:09Z", "dropoff": "2021-05-09T17:57:30Z" }, "deliveryID": "MS-3-0FESB7PJX5ESFQJQB6X2", "status": "ALLOCATING", "packages": [ { "name": "pkg 1", "description": "pkg 1", "quantity": 1, "price": 1000, "invoiceNo": "1234", "dimensions": { "height": 10, "width": 10, "depth": 10, "weight": 10 } } ], "cityCode": "", "pickupPin": "7001" } ], "distance": 21748 } } ``` -------------------------------- ### GrabExpress API: Get Multi Stop Delivery Quotes Endpoint Source: https://github.com/johntheyoung/grab-express-llm-docs/blob/main/grab-express.md This API allows partners to estimate delivery fees for multi-stop orders, enabling batching of up to 50 drop-offs into a single trip. It provides the endpoint URL for both staging and production environments, along with a brief explanation of its purpose. ```APIDOC Endpoint URL: POST grabfood/partner/express/v1/deliveries/quotes Before you run this API endpoint: 1. For testing, use staging URL - https://partner-api.grab.com/grabfood-sandbox/partner/express/v1/deliveries/quotes 2. For production, use production URL - https://partner-api.grab.com/grabfood/partner/express/v1/deliveries/quotes ``` -------------------------------- ### Retrieve Grab Express Delivery Details using cURL Source: https://github.com/johntheyoung/grab-express-llm-docs/blob/main/grab-express.md This snippet demonstrates how to make a GET request to retrieve the details of a specific Grab Express delivery using cURL. It shows the sandbox URL and highlights the use of OAuth tokens for authorization, which should replace the placeholder. ```curl curl -X GET https://partner-api.grab.com/grab-express-sandbox/v1/deliveries/IN-2-00D2B1CBMWBO7JND48J5 -H 'Content-Type: application/json' -H 'Authorization: Bearer ' -H 'cache-control: no-cache' ``` -------------------------------- ### Get Delivery Quotes Request with Invalid Promo Code Source: https://github.com/johntheyoung/grab-express-llm-docs/blob/main/grab-express.md An example JSON request body for the 'Get Delivery Quotes' endpoint, demonstrating the inclusion of an invalid promo code (`FULLPROMO`) within the request payload. ```JSON { ..., "promoCode": "FULLPROMO", ... } ``` -------------------------------- ### GrabExpress API Access and Testing Procedures Source: https://github.com/johntheyoung/grab-express-llm-docs/blob/main/grab-express.md Instructions on how to gain access and test GrabExpress API endpoints in both Sandbox and Production environments, including country/city specific configurations. ```APIDOC Sandbox: - All the countries can be tested on Sandbox. - Please note: You need to select the country under the `configurations` tab before you start using any of these APIs. - No additional access is required. Production: - The configurations and access to the APIs are provided at a country/city level. - So please specify to your GrabExpress Business PIC on which country and city you want to get access to. ``` -------------------------------- ### Get Delivery Quotes Response with Invalid Promo Code Source: https://github.com/johntheyoung/grab-express-llm-docs/blob/main/grab-express.md An example JSON response body from the 'Get Delivery Quotes' endpoint, illustrating the `discountInfo` object when an invalid promo code has been used, showing `"success": false`, `amount: 0`, and an `errorMsg` indicating the failure (e.g., "offer is invalid"). This highlights the need to check `discountInfo` for promo code application status. ```JSON { ..., "discountInfo": { "success": false, "amount": 0, "errorMsg": "offer is invalid" }, ... } ``` -------------------------------- ### GrabExpress Delivery Service Supported Configurations Source: https://github.com/johntheyoung/grab-express-llm-docs/blob/main/grab-express.md This section lists the various configurable parameters for GrabExpress delivery services, including service types, pricing, pickup/drop-off windows, payment options, and physical limits like weight, dimensions, and distance. It highlights areas where partners can align with the GrabExpress business team for customization. ```APIDOC Configurations | Definitions --- | --- Service Type | - `INSTANT` - `SAME_DAY` - `BULK` Price | It's based on negotiation with the business team. Pickup Window | Time window for the driver to pickup the delivery. Payment Types | - `CASH` - `CASHLESS` Maximum Weight Limit | You can align with the GrabExpress business team on the weight limit. Maximum Dimensions | You can align with the GrabExpress business team on the dimensions. Drop Window | Time window for the driver to drop-off the delivery. Distance Limit | By default maximum distance is set at 35 kms. You can align with the GrabExpress business team on the Distance limit. Batching Allowed or Not | This will decide whether your delivery is batched with orders. Allocation Window | Time window for GrabExpress to find a driver from the time of delivery request creation For scheduled deliveries, the time window would start after the scheduled time ``` -------------------------------- ### GrabExpress API Endpoints Overview Source: https://github.com/johntheyoung/grab-express-llm-docs/blob/main/grab-express.md A comprehensive list of GrabExpress API endpoints and the Tracking Webhook, detailing their purpose, HTTP method, and the party responsible for providing the endpoint. ```APIDOC API: Get Delivery Quotes Details: Get Delivery Quotes before you place an order Format: POST /grab-express/v1/deliveries/quotes Endpoint Provided by Grab: Yes Endpoint provided by Partner: API Defined by: GrabExpress API: Create Delivery Request Details: Once you get the quotes, use this API to place a booking request Format: POST /grab-express/v1/deliveries Endpoint Provided by Grab: Yes Endpoint provided by Partner: API Defined by: GrabExpress API: Get Multi Stop Delivery Quotes Details: Get Delivery Quotes for single origin, multiple destination before you place an order Format: POST /grabfood/partner/express/v1/deliveries/quotes Endpoint Provided by Grab: Yes Endpoint provided by Partner: API Defined by: GrabExpress API: Create Multi Stop Delivery Request Details: Use this API to place a single origin, multiple destination booking request Format: POST /grabfood/partner/express/v1/deliveries Endpoint Provided by Grab: Yes Endpoint provided by Partner: API Defined by: GrabExpress API: Get Delivery Details Details: Get information about an in-progress delivery Format: GET /grab-express/v1/deliveries/{deliveryID} Endpoint Provided by Grab: Yes Endpoint provided by Partner: API Defined by: GrabExpress API: Cancel Delivery Request Details: Allows partner to cancel a delivery request Format: DELETE /grab-express/v1/deliveries/{deliveryID} Endpoint Provided by Grab: Yes Endpoint provided by Partner: API Defined by: GrabExpress API: Cancel Delivery by Merchant Order ID Request Details: Allows partner to cancel all deliveries related to a Merchant Order ID Format: DELETE /grab-express/v1/merchant/deliveries/{merchantOrderID} Endpoint Provided by Grab: Yes Endpoint provided by Partner: API Defined by: GrabExpress API: Tracking Webhook Details: Receive a notification along with order/driver details when there is a change in the order status Format: POST [consumer specified endpoint] Endpoint Provided by Grab: Endpoint provided by Partner: Yes API Defined by: GrabExpress API: Submit Tip Details: Allows partner to tip a delivery request Format: POST /grab-express/v1/deliveries/tip/submit Endpoint Provided by Grab: Yes Endpoint provided by Partner: API Defined by: GrabExpress ``` -------------------------------- ### Grab Express Available Service Types and Conditions Source: https://github.com/johntheyoung/grab-express-llm-docs/blob/main/grab-express.md Details the supported GrabExpress service types (INSTANT, SAME_DAY, BULK, MULTI_STOP) and their specific conditions, including allocation, pickup, and dropoff windows for Same Day Delivery. ```APIDOC Service Types Available: INSTANT: Conditions: When the delivery is requested, we will immediately try to find a driver for you. SAME_DAY: Conditions: Same Day Delivery is an affordable on demand delivery service. Express partner can pay a lower fare, and enjoy convenient door-to-door delivery on the same day. Allocation Window: 1 hour (maximum time allowed from order receipt for driver allocation) Pickup Window: 3 hours (maximum time allowed from order receipt for driver to complete parcel collection) Dropoff Window: 6 hours (maximum time allowed from order receipt for parcel delivery to recipient) BULK: Conditions: Use this Service Type when you want to deliver a bulk order. All the Bulk orders are allocated instantly by following the configurations set up for instant deliveries. MULTI_STOP: Conditions: Use this Service Type when you want to delivery items to be picked up from the same origin, but get delivered to multiple destinations. ``` -------------------------------- ### Get Multi-Stop Delivery Quotes using cURL Source: https://github.com/johntheyoung/grab-express-llm-docs/blob/main/grab-express.md This cURL command demonstrates how to send a POST request to the Grab Express API to get quotes for multi-stop deliveries. It includes origin, multiple destinations with packages, and specifies `MULTI_STOP` service type. Remember to replace the placeholder for the OAuth token. ```curl curl -X POST \ https://partner-api.grab.com/grabfood-sandbox/partner/express/v1/deliveries/quotes \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -H 'cache-control: no-cache' \ -d '{ "serviceType" : "MULTI_STOP", "vehicleType": "BIKE", "codType": "REGULAR", "origin" : [\ {\ "address": "1 IJK View, Singapore 018936",\ "coordinates": {\ "latitude": 1.2345678,\ "longitude": 3.4567890\ }\ }\ ], "destination" : [\ {\ "address": "1 ABC St, Singapore 078881",\ "coordinates": {\ "latitude": 1.2345876,\ "longitude": 3.4567098\ },\n "packages": [\ {\ "name": "pkg 1",\ "quantity": 1,\ "description": "pkg 1",\ "price": 0,\ "invoiceNo": "1235",\ "dimensions": {\ "height": 10,\ "width": 10,\ "depth": 10,\ "weight": 10\ }\ }\ ]\ },\n {\ "address": "1 BCD St, Singapore 078882",\ "coordinates": {\ "latitude": 1.2345768,\ "longitude": 3.4567980\ },\n "packages": [\ {\ "name": "pkg 1",\ "quantity": 1,\ "description": "pkg 1",\ "price": 1000.000,\ "invoiceNo": "1234",\ "dimensions": {\ "height": 10,\ "width": 10,\ "depth": 10,\ "weight": 10\ }\ }\ ]\ }\ ], "routeOptimized": true }' ```