跳转到内容
Maple

Webhooks

Retrieves a single event from the ledger, including its `data.object`.

此内容尚不支持你的语言。

GEThttps://api.maple.inc/v1/events/{eventId}API key

Authorization

Send your API key as Authorization: Bearer <key>: mpk_test_… for test mode, mpk_live_… for live mode. Both use https://api.maple.inc/v1. See Authentication. The samples read the key from MAPLE_KEY and the base URL from MAPLE_BASE, as set up in the Quickstart.

Parameters

Responses

200 OK

Event

  • id string required

  • object string required

    Always event.

  • type string required

  • api_version string required

    The API version data.object was rendered in, a date (YYYY-MM-DD).

  • created integer required

  • livemode boolean required

  • data object required

  • data.object object required

  • data.object.object string

    Always order.

  • data.object.id string

  • data.object.livemode boolean

    True when the order belongs to the live environment; false for test-mode data.

  • data.object.created integer

  • data.object.updated integer

    When the order last changed (Unix seconds), including its payment and delivery. Of two copies of one order, from webhooks that arrived out of order, the one with the larger updated is newer; on a tie, read it again with GET /v1/orders/{orderId}.

  • data.object.status string

    One of pending, submitted, accepted, ready, in_delivery, fulfilled, rejected, canceled.

  • data.object.cancellation_reason string or null

    Who canceled the order (customer or restaurant) when status is canceled; null otherwise.

  • data.object.canceled_at integer or null

    When the order was canceled (Unix seconds); null unless status is canceled, and null for orders canceled before 2026-11-24.

  • data.object.rejection_reason string or null

    Why the order is rejected: validation_failed (your app answered its validation invalid, or did not answer), submission_failed (Maple could not hand the order to your app), denied (your app denied it), decision_timeout (no decision arrived in time) or expired (the order was too old to make by the time Maple could send it). Null otherwise, and null for orders rejected before 2026-11-24.

  • data.object.location_id string

    The location the order belongs to.

  • data.object.fulfillment_type string

    pickup (the customer collects the order) or delivery. One of pickup, delivery.

  • data.object.number string or null

    The short order number Maple gave the customer, the one they say at the counter (e.g. 1274). Not unique across locations or over time; use id to identify the order.

  • data.object.source string or null

    Where the customer placed the order: phone (Maple’s phone agent), web (the restaurant’s Maple ordering website), kiosk, or pos. Null for orders Maple did not classify.

  • data.object.notes string or null

    What the customer asked for on the whole order (special instructions); null when nothing. Item requests are on each line item’s notes, delivery instructions on delivery_address.notes.

  • data.object.ready_by integer

    When the order is due (Unix seconds): scheduled_for for a scheduled order, otherwise the time Maple gave the customer, the order time plus the prep time.

  • data.object.scheduled_for integer or null

    Customer-selected completion time (Unix seconds) for scheduled orders; null for ASAP orders. Prepare the order for this time, not on receipt.

  • data.object.delivery_address object or null

    The delivery address for delivery orders, including delivery instructions; null for pickup orders or when no stored address is available.

  • data.object.delivery_address.line1 string or null

  • data.object.delivery_address.line2 string or null

  • data.object.delivery_address.city string or null

  • data.object.delivery_address.state string or null

  • data.object.delivery_address.postal_code string or null

  • data.object.delivery_address.country string or null

  • data.object.delivery_address.notes string or null

  • data.object.customer object

  • data.object.customer.name string

  • data.object.customer.phone string or null

    Customer phone number in E.164 format (e.g. +14155552671); null when the customer provided none.

  • data.object.customer.phone_last_four string or null

    Last four digits of the customer phone number.

  • data.object.line_items object[]

  • data.object.line_items[].name string

  • data.object.line_items[].external_id string or null

  • data.object.line_items[].quantity number

  • data.object.line_items[].base_price_money object

  • data.object.line_items[].base_price_money.amount integer

  • data.object.line_items[].base_price_money.currency string

  • data.object.line_items[].tax_money object

  • data.object.line_items[].tax_money.amount integer

  • data.object.line_items[].tax_money.currency string

  • data.object.line_items[].notes string or null

  • data.object.line_items[].modifier_groups object[]

  • data.object.line_items[].modifier_groups[].name string

  • data.object.line_items[].modifier_groups[].external_id string or null

  • data.object.line_items[].modifier_groups[].options object[]

  • data.object.line_items[].modifier_groups[].options[].name string

  • data.object.line_items[].modifier_groups[].options[].external_id string or null

  • data.object.line_items[].modifier_groups[].options[].quantity integer

  • data.object.line_items[].modifier_groups[].options[].price_money object

  • data.object.line_items[].modifier_groups[].options[].modifier_groups object[]

  • data.object.totals object

    Each amount is { amount, currency }: amount in integer minor units (cents for USD). subtotal_money is the line items and their modifiers before discounts; discount_money is what discounts took off them; tax_money is the tax charged, after discounts; surcharge_money is Maple’s processing fee passed to the customer; service_charge_money is the restaurant’s own fees its POS adds to the check; tip_money is the tip for the restaurant. Two POS systems file the restaurant’s fees elsewhere: Toast counts its non-gratuity service charges in subtotal_money, and Chowbus fees are in surcharge_money. total_money is what the customer pays: the amount charged online, or for an in_store order the amount the restaurant should collect (Maple does not see what it took). It is subtotal - discount + tax + surcharge + service charge + tip + delivery fee + delivery tip.

  • data.object.totals.subtotal_money object

  • data.object.totals.subtotal_money.amount integer

  • data.object.totals.subtotal_money.currency string

  • data.object.totals.discount_money object

  • data.object.totals.discount_money.amount integer

  • data.object.totals.discount_money.currency string

  • data.object.totals.tax_money object

  • data.object.totals.tax_money.amount integer

  • data.object.totals.tax_money.currency string

  • data.object.totals.surcharge_money object

  • data.object.totals.surcharge_money.amount integer

  • data.object.totals.surcharge_money.currency string

  • data.object.totals.service_charge_money object

  • data.object.totals.service_charge_money.amount integer

  • data.object.totals.service_charge_money.currency string

  • data.object.totals.tip_money object

  • data.object.totals.tip_money.amount integer

  • data.object.totals.tip_money.currency string

  • data.object.totals.delivery_fee_money object

  • data.object.totals.delivery_fee_money.amount integer

  • data.object.totals.delivery_fee_money.currency string

  • data.object.totals.delivery_tip_money object

  • data.object.totals.delivery_tip_money.amount integer

  • data.object.totals.delivery_tip_money.currency string

  • data.object.totals.total_money object

  • data.object.totals.total_money.amount integer

  • data.object.totals.total_money.currency string

  • data.object.payment object

    How the customer pays. method: online (through a payment link or the ordering website) or in_store (at the restaurant, at pickup or delivery); null only when Maple recorded none. provider: the payment processor, null before a payment exists. payment_link_url: the link Maple sent the customer; null for in_store orders or before a link exists.

  • data.object.payment.method string or null

  • data.object.payment.provider string or null

  • data.object.payment.status string or null

    Where the customer’s payment stands: pending (not paid yet; an in_store order stays pending until your app marks it paid with POST /v1/orders/{orderId}/pay), paid, failed (the payment did not go through), voided (Maple canceled the payment before it settled), refunded or partially_refunded. Null only when Maple recorded none.

  • data.object.payment.payment_link_url string or null

  • data.object.order object

  • data.object.order.object string

    Always order.

  • data.object.order.id string

  • data.object.order.livemode boolean

    True when the order belongs to the live environment; false for test-mode data.

  • data.object.order.created integer

  • data.object.order.updated integer

    When the order last changed (Unix seconds), including its payment and delivery. Of two copies of one order, from webhooks that arrived out of order, the one with the larger updated is newer; on a tie, read it again with GET /v1/orders/{orderId}.

  • data.object.order.status string

    One of pending, submitted, accepted, ready, in_delivery, fulfilled, rejected, canceled.

  • data.object.order.cancellation_reason string or null

    Who canceled the order (customer or restaurant) when status is canceled; null otherwise.

  • data.object.order.canceled_at integer or null

    When the order was canceled (Unix seconds); null unless status is canceled, and null for orders canceled before 2026-11-24.

  • data.object.order.rejection_reason string or null

    Why the order is rejected: validation_failed (your app answered its validation invalid, or did not answer), submission_failed (Maple could not hand the order to your app), denied (your app denied it), decision_timeout (no decision arrived in time) or expired (the order was too old to make by the time Maple could send it). Null otherwise, and null for orders rejected before 2026-11-24.

  • data.object.order.location_id string

    The location the order belongs to.

  • data.object.order.fulfillment_type string

    pickup (the customer collects the order) or delivery. One of pickup, delivery.

  • data.object.order.number string or null

    The short order number Maple gave the customer, the one they say at the counter (e.g. 1274). Not unique across locations or over time; use id to identify the order.

  • data.object.order.source string or null

    Where the customer placed the order: phone (Maple’s phone agent), web (the restaurant’s Maple ordering website), kiosk, or pos. Null for orders Maple did not classify.

  • data.object.order.notes string or null

    What the customer asked for on the whole order (special instructions); null when nothing. Item requests are on each line item’s notes, delivery instructions on delivery_address.notes.

  • data.object.order.ready_by integer

    When the order is due (Unix seconds): scheduled_for for a scheduled order, otherwise the time Maple gave the customer, the order time plus the prep time.

  • data.object.order.scheduled_for integer or null

    Customer-selected completion time (Unix seconds) for scheduled orders; null for ASAP orders. Prepare the order for this time, not on receipt.

  • data.object.order.delivery_address object or null

    The delivery address for delivery orders, including delivery instructions; null for pickup orders or when no stored address is available.

  • data.object.order.delivery_address.line1 string or null

  • data.object.order.delivery_address.line2 string or null

  • data.object.order.delivery_address.city string or null

  • data.object.order.delivery_address.state string or null

  • data.object.order.delivery_address.postal_code string or null

  • data.object.order.delivery_address.country string or null

  • data.object.order.delivery_address.notes string or null

  • data.object.order.customer object

  • data.object.order.customer.name string

  • data.object.order.customer.phone string or null

    Customer phone number in E.164 format (e.g. +14155552671); null when the customer provided none.

  • data.object.order.customer.phone_last_four string or null

    Last four digits of the customer phone number.

  • data.object.order.line_items object[]

  • data.object.order.line_items[].name string

  • data.object.order.line_items[].external_id string or null

  • data.object.order.line_items[].quantity number

  • data.object.order.line_items[].base_price_money object

  • data.object.order.line_items[].base_price_money.amount integer

  • data.object.order.line_items[].base_price_money.currency string

  • data.object.order.line_items[].tax_money object

  • data.object.order.line_items[].tax_money.amount integer

  • data.object.order.line_items[].tax_money.currency string

  • data.object.order.line_items[].notes string or null

  • data.object.order.line_items[].modifier_groups object[]

  • data.object.order.line_items[].modifier_groups[].name string

  • data.object.order.line_items[].modifier_groups[].external_id string or null

  • data.object.order.line_items[].modifier_groups[].options object[]

  • data.object.order.totals object

    Each amount is { amount, currency }: amount in integer minor units (cents for USD). subtotal_money is the line items and their modifiers before discounts; discount_money is what discounts took off them; tax_money is the tax charged, after discounts; surcharge_money is Maple’s processing fee passed to the customer; service_charge_money is the restaurant’s own fees its POS adds to the check; tip_money is the tip for the restaurant. Two POS systems file the restaurant’s fees elsewhere: Toast counts its non-gratuity service charges in subtotal_money, and Chowbus fees are in surcharge_money. total_money is what the customer pays: the amount charged online, or for an in_store order the amount the restaurant should collect (Maple does not see what it took). It is subtotal - discount + tax + surcharge + service charge + tip + delivery fee + delivery tip.

  • data.object.order.totals.subtotal_money object

  • data.object.order.totals.subtotal_money.amount integer

  • data.object.order.totals.subtotal_money.currency string

  • data.object.order.totals.discount_money object

  • data.object.order.totals.discount_money.amount integer

  • data.object.order.totals.discount_money.currency string

  • data.object.order.totals.tax_money object

  • data.object.order.totals.tax_money.amount integer

  • data.object.order.totals.tax_money.currency string

  • data.object.order.totals.surcharge_money object

  • data.object.order.totals.surcharge_money.amount integer

  • data.object.order.totals.surcharge_money.currency string

  • data.object.order.totals.service_charge_money object

  • data.object.order.totals.service_charge_money.amount integer

  • data.object.order.totals.service_charge_money.currency string

  • data.object.order.totals.tip_money object

  • data.object.order.totals.tip_money.amount integer

  • data.object.order.totals.tip_money.currency string

  • data.object.order.totals.delivery_fee_money object

  • data.object.order.totals.delivery_fee_money.amount integer

  • data.object.order.totals.delivery_fee_money.currency string

  • data.object.order.totals.delivery_tip_money object

  • data.object.order.totals.delivery_tip_money.amount integer

  • data.object.order.totals.delivery_tip_money.currency string

  • data.object.order.totals.total_money object

  • data.object.order.totals.total_money.amount integer

  • data.object.order.totals.total_money.currency string

  • data.object.order.payment object

    How the customer pays. method: online (through a payment link or the ordering website) or in_store (at the restaurant, at pickup or delivery); null only when Maple recorded none. provider: the payment processor, null before a payment exists. payment_link_url: the link Maple sent the customer; null for in_store orders or before a link exists.

  • data.object.order.payment.method string or null

  • data.object.order.payment.provider string or null

  • data.object.order.payment.status string or null

    Where the customer’s payment stands: pending (not paid yet; an in_store order stays pending until your app marks it paid with POST /v1/orders/{orderId}/pay), paid, failed (the payment did not go through), voided (Maple canceled the payment before it settled), refunded or partially_refunded. Null only when Maple recorded none.

  • data.object.order.payment.payment_link_url string or null

  • data.object.expires_at integer or null

    When the request or result goes stale (Unix seconds); null for an invalid result.

  • data.object.partner_reference string or null

  • data.object.reason object or null

  • data.object.reason.code string

  • data.object.reason.explanation string or null

  • data.object.reason.item_external_ids string[] or null

  • data.object.warnings string[]

  • data.object.origin string

    One of install, staff, test.

  • data.object.scopes string[]

  • data.object.pending_scopes string[]

  • data.object.revoked_at integer or null

  • data.object.url string

    The HTTPS URL Maple sends events to.

  • data.object.api_version string

    The API version this endpoint’s events are rendered in, a date (YYYY-MM-DD). Fixed when the endpoint is created.

  • data.object.enabled_events string[]

    The event types Maple sends to url.

Errors

  • 400 Bad request Invalid request (invalid_request_error)

  • 401 Unauthorized Missing or invalid credential (authentication_error)

  • 403 Forbidden Not allowed (permission_error)

  • 404 Not found Not found (invalid_request_error)

  • 409 Conflict Conflicts with current state (invalid_request_error)

  • 429 Too many requests Rate limit reached (rate_limit_error)

  • 500 Server error Maple could not complete the request (api_error)

Every error body is one error object: branch on its type and code; message is for people, param names the field at fault, and doc_url links the code on Errors.

A 429 also sends Retry-After: Seconds to wait before retrying; also returned as error.retry_after in the body.