Send New Order
You call vGrubshttps://sandbox.vgrubs.com/partner/orders/{partner-name}{partner-name} Your partner identifier, provisioned by vGrubs during onboarding. The webhook path is unique per partner.When a customer places an order on your platform, you push it to the vGrubs webhook endpoint. vGrubs defines this path and shares it with you during onboarding. It is unique per partner.
vGrubs responds with HTTP 200 OK to confirm receipt. If the request fails with a network error or a 5xx, retry with exponential backoff. A 400 means the payload is invalid: fix it instead of retrying.
status field in the order payload must always be new on the initial push.order.type the store lists in supported_order_types (returned by Get Fees, Get Merchant Timezone and Publish Menu). Virtual stores accept delivery only, so a pickup order for one is rejected.pickup orders, at physical stores, and only when cash is enabled for your account. Call Get Fees first and offer cash only when cash_pickup_allowed is true. Cash delivery orders are rejected.3600 = $36.00). Timestamps are ISO 8601. Phone numbers use E.164 format.Request body
Core order details.
The store the order belongs to.
Customer contact details.
Ordered items.
Delivery details for delivery orders.
Payment details.
Order totals. All values in cents (e.g. 3600 = $36.00).
Order lifecycle timestamps, ISO 8601.
Responses
Order received and accepted for processing.
Whether the order was received successfully.
Missing or invalid fields in the order payload, including an invalid payment.method, a paid flag that does not match it, a cash order that is not allowed, or an order.type the store does not support. Do not retry - fix the payload. Status updates of an order vGrubs already received are never rejected for these reasons.
Invalid or missing x-api-key header.
Validation errors
A 400 caused by the payment fields or the order type carries one of these in message. Several payment problems are listed together, one per line. Cash orders are checked against the cash rules first, so a cash pickup order for a virtual store gets a cash error, not the order type one.
| Message contains | Cause |
|---|---|
payment.method: is required, one of card, online, cash | payment.method is missing or empty |
payment.method: must be one of card, online, cash (received "...") | payment.method has an unknown value |
order.paid: must be false when payment.method is cash | A cash order sent with paid: true |
order.paid: must be true when payment.method is card (or online) | A card or online order sent with paid: false |
Cash orders are not enabled for this partner. | Cash is not enabled for your account |
Cash payment is allowed only for pickup orders. | A cash order of type delivery |
Cash payment is not allowed for store ID ... | The store is not a physical location |
Order type pickup is not supported for store ID ... | A new prepaid pickup order for a virtual store (order.type not in supported_order_types) |