Sync Schedule
You call vGrubshttps://sandbox.vgrubs.com/partner/sync-schedule/{webhookPath}{webhookPath} Your webhook path segment - the partner identifier provisioned during onboarding.Asks vGrubs to send a store's current working hours and closing days to your integration again.
Use it after connecting a store, once the store is saved on your side, or any time you need a fresh copy of the schedule - for example a previous webhook failed, or the store was re-created on your side.
The endpoint is asynchronous. vGrubs responds right away and sends the schedule webhooks to your base URL right after the response.
x-api-key header, or with Authorization: Bearer <your API key>. Send one of the two.success: true means the request was accepted and the sync has started. It does not confirm that your endpoints received the webhooks.POST /partner/publish-menu/{webhookPath}) for the menu.Request body
Store ID, the same value used when connecting.
Responses
false when the request was handled successfully.
Result of the sync request.
null on success; the error message otherwise.
Invalid body, schedule sync disabled for your integration, or no store matching merchant_id. See the error messages below.
Missing or invalid API key, or wrong webhook path.
Webhooks you will receive
After responding, vGrubs calls your integration with your x-api-key. The payloads are identical to the ones vGrubs already sends when a store's schedule changes.
| Webhook | Sent when |
|---|---|
POST {your_base_url}/merchants/working-hours | Working hours sync is enabled for your integration and the store has working hours set. Contains the full business_hours and delivery_hours. |
POST {your_base_url}/merchants/closing-days | Closing days sync is enabled for your integration and the store has upcoming closing days (today or later, in the store's time zone). Sent with action: add. |
If there is nothing to send (no working hours, no upcoming closing days), no webhook is sent and the response is still 200.
Error messages
All errors use the same shape: { "error": true, "message": "..." }.
| Status | Message | Cause |
|---|---|---|
401 | Unauthorized | Missing or invalid API key, or wrong webhook path |
400 | merchant_id should not be empty | merchant_id is missing or empty |
400 | merchant_id must be a string | merchant_id is not a string |
400 | Schedule sync is not enabled for this provider. | Neither working hours sync nor closing days sync is enabled for your integration |
400 | Provided is not connected with storeId: {merchant_id}. | No store is connected with this merchant_id |
400 | Store with ID {merchant_id} is missing brand mapping. | The connection exists but is not linked to a store |