---
agentTools:
  projectIndex: https://docs.developer.yelp.com/llms.txt
---

# Update Order Status

**This API is only for specific food partners.**

This allows a status update to an order. This call returns a status code which indicates if the request was successful.

A notification will not be sent in the following scenarios:
* The order was made over 3 hours ago
* The same notification (same `yelp_order_id` and the `confirmation_type`) has already been sent
* An ETA is provided and the notification is being sent past the ETA
* An `order_confirmed` update is trying to be sent after a `deliver_in_progress` notification

[block:callout]
{
  "type": "info",
  "body": "This endpoint is part of the Checkout API, visit [Checkout API](https://docs.developer.yelp.com/docs/checkout-api) to learn more."
}
[/block]

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Checkout API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://partner-api.yelp.com/checkout"
    }
  ],
  "security": [
    {
      "basic": []
    }
  ],
  "components": {
    "securitySchemes": {
      "basic": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "paths": {
    "/orders/create/v3": {
      "post": {
        "tags": [
          "Checkout API"
        ],
        "summary": "Create Order",
        "operationId": "create_order",
        "description": "This creates a Yelp Checkout Order and is to be called after the user builds and submits his/her order on the iframe. This call returns a `yelp_order_id`.\n\nIn other words, the iframe POST goes to the Partner server, where the user's request can be processed however necessary by the Partner. Immediately following this, the Partner must POST to the above URL to communicate to Yelp the details of the Order. In return, Yelp will give the Partner a yelp_order_id.\n\nSee [Order](https://docs.developer.yelp.com/docs/resources#section-order) resource for more info.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "object",
                  "notification_url",
                  "opportunity_id"
                ],
                "properties": {
                  "order": {
                    "description": "See [Order Resource](https://docs.developer.yelp.com/docs/resources#section-order)",
                    "type": "object"
                  },
                  "notification_url": {
                    "description": "HTTPS URL to which Yelp shall POST OrderStatus updates - e.g. when charge processing is completed",
                    "type": "string"
                  },
                  "opportunity_id": {
                    "description": "token that Yelp passed to partner via iframe and when checking availability of business",
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully created an order.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "yelp_order_id": "e6efe441eb9aa321bab01bc28d9149ff"
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "yelp_order_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "This error is returned in any of the following scenarios:\n\n| Status  |\terror_code                     | error_message (example)\n| ------- | -------------------------------- | ------------------------------\n| 400     | UNREGISTERED_PARTNER_BUSINESS_ID | The partner business id specified is not mapped to a known Yelp business id\n",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "403": {
            "description": "This error is returned in any of the following scenarios:\n\n| Status  |\terror_code   | error_message (example)\n| ------- | -------------- | ------------------------------\n| 403     | UNAUTHORIZED   | Partner is not enabled for V3 API flow\n",
            "content": {
              "application/json": {
                "$ref": "#/paths/~1orders~1create~1v3/post/responses/400/content/application~1json"
              }
            }
          },
          "412": {
            "description": "This error is returned in any of the following scenarios:\n\n| Status  |\terror_code            | error_message (example)\n| ------- | ----------------------- | ------------------------------\n| 412     | CURRENCY_MISMATCH_ERROR | Currency mismatch with partner contract\n",
            "content": {
              "application/json": {
                "$ref": "#/paths/~1orders~1create~1v3/post/responses/400/content/application~1json"
              }
            }
          }
        }
      }
    },
    "/orders/{yelp_order_id}/update/v3": {
      "put": {
        "tags": [
          "Checkout API"
        ],
        "summary": "Update Order",
        "operationId": "update_order",
        "description": "Update an existing Yelp Checkout Order by passing a Order object as the Partner wishes it to be.\n\nFields that cannot be updated: `yelp_order_id`, `service`, `billing_type`, `partner_business_id`, `collection_type`. These must be included as part of the Order object, but should match those passed when the order was created.\n\nThis operation is asynchronous, in that only basic sanity checking is done at the time the update request is submitted to Yelp, and, barring failure of those, the operation immediately returns an HTTP 200 response that includes the `yelp_order_id` and an `order_request_id`, which is a unique identifier for this partner request. Once submitted, Yelp will attempt to process this update request, including re-examining transactions associated with the order. The final success or failure of the operation is then delivered to the Partner by POSTing an `OrderStatusChangeNotification` to the `notification_url` provided at order creation time. This notification will include the matching `order_request_id` given to the Partner when the request was submitted.\n\nA Yelp Checkout Order may be updated before and after charges are made. However, only one update request may be outstanding at a time. That is, a Partner cannot submit a second update request before an `OrderStatusChangeNotification` is received for the first.\n\nOn every update call, all transactions on the Order are re-examined and possibly cancelled or replaced by up-to-date transactions.\n\nSee [Order](https://docs.developer.yelp.com/docs/resources#section-order) resource for more info.\n",
        "parameters": [
          {
            "name": "yelp_order_id",
            "description": "ID of order that Yelp will try to update.",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "order": {
                    "description": "Current complete (not a diff) Order as it should be after updates. See [Order Resource](https://docs.developer.yelp.com/docs/resources#section-order)",
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully started the asynchronous process of updating an order.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "yelp_order_id": "e6efe441eb9aa321bab01bc28d9149ff",
                      "order_request_id": "abc123"
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "yelp_order_id": {
                      "type": "string"
                    },
                    "order_request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "$ref": "#/paths/~1orders~1create~1v3/post/responses/403"
          },
          "422": {
            "description": "This error is returned in any of the following scenarios:\n\n| Status  | error_code                      | error_message (example)\n| ------- | ------------------------------- | ------------------------------\n| 422     | INVALID_ORDER_OPERATION\t      | The order cannot be updated (either because it is cancelled or because another partner request is being processed)\n| 422\t    | COLLECTION_TYPE_MUST_BE_PREPAID |\tIf the collection_type is passed as something other than `prepaid`\n",
            "content": {
              "application/json": {
                "$ref": "#/paths/~1orders~1create~1v3/post/responses/400/content/application~1json"
              }
            }
          },
          "423": {
            "description": "This error is returned in any of the following scenarios:\n\n| Status  | error_code                      | error_message (example)\n| ------- | ------------------------------- | ------------------------------\n| 423     | ORDER_NOT_READY_FOR_OPERATION   |\tOrder is locked because another operation is in progress\n",
            "content": {
              "application/json": {
                "$ref": "#/paths/~1orders~1create~1v3/post/responses/400/content/application~1json"
              }
            }
          }
        }
      }
    },
    "/orders/{yelp_order_id}/confirmation_status/v3": {
      "post": {
        "tags": [
          "Checkout API"
        ],
        "summary": "Update Order Status",
        "operationId": "update_order_status",
        "description": "**This API is only for specific food partners.**\n\nThis allows a status update to an order. This call returns a status code which indicates if the request was successful.\n\nA notification will not be sent in the following scenarios:\n* The order was made over 3 hours ago\n* The same notification (same `yelp_order_id` and the `confirmation_type`) has already been sent\n* An ETA is provided and the notification is being sent past the ETA\n* An `order_confirmed` update is trying to be sent after a `deliver_in_progress` notification\n",
        "parameters": [
          {
            "$ref": "#/paths/~1orders~1{yelp_order_id}~1update~1v3/put/parameters/0"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "confirmation_type",
                  "eta_in_minutes"
                ],
                "properties": {
                  "confirmation_type": {
                    "description": "[ConfirmationType](https://docs.developer.yelp.com/docs/resources#confirmationtype-enum) enum. The state the order is being updated to.",
                    "type": "object"
                  },
                  "eta_in_minutes": {
                    "description": "The estimated time of arrival.",
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully updated the order status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                },
                "examples": {
                  "Result": {
                    "value": {}
                  }
                }
              }
            }
          },
          "403": {
            "description": "This error is returned in any of the following scenarios:\n\n| Status  |\terror_code          | error_message (example)\n| ------- | --------------------- | ------------------------------\n| 403     | ORDER_STATE_INVALID   | Order is in an invalid state to perform this operation.\n",
            "content": {
              "application/json": {
                "$ref": "#/paths/~1orders~1create~1v3/post/responses/400/content/application~1json"
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": false,
    "samples-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 99,
      "1": 192,
      "2": 9,
      "3": 217,
      "4": 242,
      "5": 85,
      "6": 55,
      "7": 7,
      "8": 215,
      "9": 154,
      "10": 176,
      "11": 80
    }
  }
}
```