> ## Documentation Index
> Fetch the complete documentation index at: https://dev.smile.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Order updated

> Send this event to Smile any time an order is created or updated in your ecommerce system.

export const scope_0 = "event:write"

Send this event any time an order is created or updated. This would include when an order has been shipped, refunded, cancelled, etc.

All [order properties](/guides/deprecated/custom-platform/custom-backend-int/custom-order-events/custom-order-object) should be filled when sending this type of event. When sending orders for guest customers, specify the `customer` as `null`.

<Note>
  It's important that you send order events for both logged-in and guest orders, as Smile's system requires this data to accurately track referrals and other ROI and loyalty metrics.
</Note>

<Callout icon="key" iconType="regular">
  This endpoint requires the **{scope_0}** scope.
</Callout>

<Panel>
  <RequestExample>
    ```shell Update an order theme={null}
    curl --request POST \
      --url https://api.smile.io/v1/events/ \
      --header 'Content-Type: application/json' \
      --header 'Authorization: Bearer {token}' \
      --data '
    {
      "event": {
        "topic": "order/updated",
        "data": {
          "external_id": "100",
          "subtotal": 200,
          "grand_total": 230,
          "rewardable_total": 200,
          "external_created_at": "2015-11-19T21:19:30.559Z",
          "external_updated_at": "2015-12-03T11:17:35.159Z",
          "payment_status": "paid",
          "coupons": [
            {
              "code": "5off-j2n5jduwjttj"
            },
            {
              "code": "SUMMER_SHIPPING_16"
            }
          ],
          "customer": {
            "external_id": "100",
            "first_name": "Wayne",
            "last_name": "Rooney",
            "email": "wrooney@example.com",
            "external_created_at": "2015-11-19T21:19:30.559Z",
            "external_updated_at": "2015-11-19T21:19:30.559Z"
          }
        }
      }
    }'
    ```
  </RequestExample>

  <ResponseExample>
    ```json 202 theme={null}
    ```
  </ResponseExample>
</Panel>
