Quick start
From a quote to a delivered order: two calls and a webhook.
These calls go to the sandbox. Replace vgdp_your_api_key with your key.
1. Get quotes (optional)
See which fleets can take the delivery and what each one costs, tip not included.
Request
curl --request POST \--url 'https://sandbox.vgrubs.com/delivery-partner/v1/quotes' \--header 'content-type: application/json' \--header 'x-api-key: vgdp_your_api_key' \--data '{"pickup": {"externalId": "store-1042","name": "Joe Pizza","phone": "+12125551111","instructions": "Counter by the door","address": {"street": "W 43rd St","streetNumber": "560","city": "New York","state": "NY","zipCode": "10036","latitude": 40.7603,"longitude": -73.9937}},"dropoff": {"street": "Main St","streetNumber": "1","unitNumber": "4B","city": "New York","state": "NY","zipCode": "10001","latitude": 40.7506,"longitude": -73.9935},"customer": {"name": "Jane Doe","phoneNumber": "2125550000"},"notes": "Ring the bell","tip": 300,"subTotal": 3800,"total": 4200}'
Response
{"data": [{"provider": "grubhub","price": 805,"pickupMinutes": 12,"dropoffMinutes": 38,"distanceMiles": 2.5}]}
2. Create the delivery
Send the same body with your order id in externalId. Leave provider out and we pick the fleet, or pass one from the quotes.
Request
curl --request POST \--url 'https://sandbox.vgrubs.com/delivery-partner/v1/deliveries' \--header 'content-type: application/json' \--header 'x-api-key: vgdp_your_api_key' \--data '{"externalId": "order-778812","pickup": {"externalId": "store-1042","name": "Joe Pizza","phone": "+12125551111","instructions": "Counter by the door","address": {"street": "W 43rd St","streetNumber": "560","city": "New York","state": "NY","zipCode": "10036","latitude": 40.7603,"longitude": -73.9937}},"dropoff": {"street": "Main St","streetNumber": "1","unitNumber": "4B","city": "New York","state": "NY","zipCode": "10001","latitude": 40.7506,"longitude": -73.9935},"customer": {"name": "Jane Doe","phoneNumber": "2125550000"},"notes": "Ring the bell","tip": 300,"subTotal": 3800,"total": 4200}'
The answer is the delivery. Keep its id: the other calls take it. Sending the same externalId again returns the same delivery, so a retry is safe.
Response
{"id": 900,"externalId": "order-778812","status": "pending_assign","provider": "grubhub","pickupLocation": {"externalId": "store-1042","name": "Joe Pizza"},"driver": null,"trackingUrl": "https://track.vgrubs.com/AbC123xYz0","pickupEta": "2026-11-24T17:38:00.000Z","dropoffEta": "2026-11-24T18:02:00.000Z","tip": 300,"vDriveFee": 30,"vGrubsFee": 0,"deliveryFee": 775,"amount": 1105,"settled": false,"cancellationReason": null,"createdAt": "2026-11-24T17:20:11.000Z","updatedAt": "2026-11-24T17:20:11.000Z"}
3. Follow it
We send every change of the delivery to your webhook URL: verify the signature, answer 2xx quickly and handle the update in the background. See Webhooks.
Webhook body
{"event": "delivery.updated","data": {"id": 900,"externalId": "order-778812","status": "pending_assign","provider": "grubhub","pickupLocation": {"externalId": "store-1042","name": "Joe Pizza"},"driver": null,"trackingUrl": "https://track.vgrubs.com/AbC123xYz0","pickupEta": "2026-11-24T17:38:00.000Z","dropoffEta": "2026-11-24T18:02:00.000Z","tip": 300,"vDriveFee": 30,"vGrubsFee": 0,"deliveryFee": 775,"amount": 1105,"settled": false,"cancellationReason": null,"createdAt": "2026-11-24T17:20:11.000Z","updatedAt": "2026-11-24T17:20:11.000Z"}}
Only completed and cancelled are final. If you miss a webhook, Get delivery has the latest state.
Your webhook URL is set up by vGrubs: send it to your vGrubs contact and you get the webhook secret that signs our requests.