---
title: "New Webhook Event (DSP –> Stream via Webhook)"
method: POST
path: "/order/{partner_id}"
---

# New Webhook Event (DSP –> Stream via Webhook)

`POST /order/{partner_id}`

You will have to call this endpoint from your system. This is how you will notify Stream about events that happen in your system.

## Path parameters

- `partner_id` string, required

## Request body

- union
  - StreamWebhookNewOrderEvent
    - `type` string, required
    - `order` NewOrder, required
      - `id` string, required — The ID of the order in your system.
      - `customers` Customer[], required — The customers for this order. If there is a single customer, this would be an array with a single element
        - `id` string, required — A unique id of the customer within the order
        - `name` string, required — The full name of the customer
        - `email` string, required
        - `phone` string, required — The customer phone number in E.164 format (e.g. '+14155552671')
        - `masked_phone_code` string — If you use a phone number masking service, this is the code to reach the customer.
      - `customer` Customer
        - `id` string, required — A unique id of the customer within the order
        - `name` string, required — The full name of the customer
        - `email` string, required
        - `phone` string, required — The customer phone number in E.164 format (e.g. '+14155552671')
        - `masked_phone_code` string — If you use a phone number masking service, this is the code to reach the customer.
      - `items` OrderItem[], required — The items that the customer ordered.
        - `id` string, required — The ID of the **variation** on Stream (not the Item ID)
        - `item_id` string — The Parent ID of the **Item** on Stream
        - `category_id` string — The ID of the item's **Category** on Stream
        - `name` string, required
        - `quantity` number, required
        - `price` number, required — The price of the item in cents
        - `modifiers` OrderModifier[], required — The modifiers that the customer selected for this item.
          - `id` string, required — The ID of the modifier on Stream
          - `modifier_group_id` string — The Parent Group ID of the modifier on Stream
          - `name` string, required
          - `quantity` number, required
          - `price` number, required — The price of the modifier in cents
          - `currency` string, required — We use lower-cased ISO 4127 alphabetic currency codes (https://www.iso.org/iso-4217-currency-codes.html)
          - `modifiers` OrderModifier[], required — Nested modifier selections
        - `currency` string, required — We use lower-cased [ISO 4127 alphabetic currency codes](https://www.iso.org/iso-4217-currency-codes.html)
        - `special_instructions` string — Item level special instructions, i.e customer modifications
        - `customer_id` string — Assignee of this item within a group order, must map to one of `customers.id`. Can be ommited if customer has a single customer.
      - `subtotal` number, required — The subtotal of the order in cents (excluding taxes).
      - `customer_facing_id` string, required — This is usually a shortened ID for the customer or merchant to troubleshoot their order
      - `fulfillment_type` 'curbside' | 'delivery' | 'dine_in' | 'merchant_managed_delivery' | 'pickup' | 'stream_managed_delivery' | 'drive_thru' | 'kiosk', required — The fulfillment type of the order.
      - `tax` number, required — The tax amount of the order in cents.
      - `tax_withheld` number, required — If the DSP withholds tax on behalf of the merchant they should send the amount here
      - `driver_tip` number — Tip amount that should be provided to the driver, only on merchant_managed_delivery
      - `store_tip` number — Tip amount that should be provided to the store, only on pickup or dine_in
      - `service_charge` number — Miscellaneous charge that is not taxes or tips. Ex: card fee
      - `delivery_fee` number — The delivery fee of the order in cents, only on merchant_managed_delivery
      - `delivery_fee_taxes` number — The tax amount applicable to the delivery fee in cents, only on merchant_managed_delivery
      - `discounts` Discount[] — A list of discounts that should be applied to the order. Optional
        - `id` string, required — The ID of the discount applied to the order
        - `amount` number, required — The amount of the discount in cents
        - `item_id` string — If the item is an item-level discount, this is the `id` of the item from the `items` list that the discount applies to.
      - `estimated_ready_at_ms` number — If you have an estimate of when the order will be ready for pickup, provide it here in epoch milliseconds. If omitted or an invalid epoch time is passed, this will default to 30 min added to the time of the order
      - `should_include_utensils` boolean — Indicates if utensils and napkins are required to be included with the order. If not provided, this will default to true.
      - `delivery_address` Address
        - `address_line_1` string, required
        - `address_line_2` string
        - `city` string, required
        - `state` string, required
        - `postal_code` string, required
        - `country` string, required
      - `special_instructions` string — Order level special instructions
      - `fulfillment_instructions` string — Driver level fulfillment instructions
      - `is_future_order` boolean — Set to `true` when the order is not to be prepared ASAP.
      - `unpaid` boolean — Describes the payment state of the order. May only be true for drive_thru orders.
      - `brand` string — Allows for a brand to be specified for the order. If not provided, the partner slug will be used.
      - `status` 'scheduled' — The incoming status of the order. Scheduled will queue the order on our end.
    - `location_id` string, required — The ID of the location that this event is for.
  - StreamWebhookCancelOrderEvent
    - `type` string, required
    - `order_id` string, required — A canceled Order ID. This property should only exist if this is a cancel order event.
    - `location_id` string, required — The ID of the location that this event is for.
    - `cancel_source` 'customer' | 'restaurant' | 'driver' | 'dsp' | 'stream' | 'unknown' — Who initiated the cancelation. Accepted values: customer, restaurant, driver, dsp.
    - `cancel_reason` 'customer_requested' | 'customer_no_show' | 'customer_changed_mind' | 'merchant_requested' | 'item_out_of_stock' | 'store_closed' | 'kitchen_too_busy' | 'menu_issue' | 'driver_unavailable' | 'delivery_address_issue' | 'delivery_failed' | 'pos_rejected' | 'pos_error' | 'payment_failed' | 'duplicate_order' | 'order_validation_failed' | 'fraud_suspected' | 'weather_conditions' | 'other' | 'unknown' | 'reason_not_provided' — The reason for the cancelation. Can be a free-text string or one of the normalized values: customer_requested, customer_no_show, item_out_of_stock, store_closed, store_too_busy, driver_unavailable, delivery_failed, pos_rejected, payment_failed, duplicate_order, other.
  - StreamWebhookStoreStatusUpdateEvent
    - `type` string, required
    - `status_update` StatusUpdate, required
      - `status` 'online' | 'paused', required — The new status for the location
      - `start_time` number — When this status started applying. Optional. Timestamp as milliseconds since epoch
      - `end_time` number — When this status will stop applying. Optional, if ommited, assumed to be indefinite. Timestamp as milliseconds since epoch
    - `location_id` string, required — The ID of the location that this event is for.
  - StreamWebhookDeliveryStatusUpdateEvent
    - `type` string, required
    - `delivery_status` 'pending' | 'pending_driver_confirmation' | 'enroute_to_pickup' | 'arrived_at_pickup' | 'enroute_to_dropoff' | 'arrived_at_dropoff' | 'completed' | 'failed_to_assign_driver' | 'failed_to_deliver' | 'failed_to_pickup' | 'failed' | 'merchant_canceled' | 'enroute_to_return' | 'arrived_at_return' | 'returned', required — The delivery status for the given order
    - `order_id` string, required — The DSP Order ID that this event is for.
    - `location_id` string, required — The DSP Location ID that this event is for.
    - `driver_details` DeliveryDriverDetails
      - `source` string, required
      - `name` string, required
      - `phone` object, required
        - `number` string
        - `code` string
      - `picture_url` string
      - `vehicle_info` object, required
        - `make` string
        - `model` string
        - `color` string
        - `license_plate` string
        - `is_autonomous` boolean
      - `handoff_instructions` string — Instructions for the merchant to handoff the order to the driver
      - `passcode` string — Passcode for the merchant to authorize the driver / robot

## Response `201`

---

[API](https://skmtc.net/meet-jenna/apis/become-a-stream-dsp.md) · [All operations](https://skmtc.net/meet-jenna/apis/become-a-stream-dsp/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/meet-jenna/become-a-stream-dsp/versions/a5d965f37379/schema)
