# Retrieve an order

Retrieve a single order by its ID.

Endpoint: GET /orders/{orderId}
Version: 1.0.0
Security: OAuth2

## Path parameters:

  - `orderId` (string, required)
    ID of the order to retrieve.

## Response 200 fields (application/json):

  - `id` (string)
    Order ID. Unique identifier prefixed with `ord_`.
    Example: ord_01h1s5z6vf2mm1mz3hevnn9va7

  - `object` (string)
    Entity name.

  - `customerName` (string, required)
    Name of the customer who placed the order.
Must start and end with a letter, and can contain letters, spaces, hyphens, and apostrophes (e.g., "John Doe", "Mary-Jane", "O'Brien").

  - `status` (string)
    Order status.
    Enum: "placed", "preparing", "completed", "canceled"

  - `totalPrice` (integer)
    Total order price in cents.

  - `createdAt` (string)
    Created date.

  - `updatedAt` (string)
    Updated date.

  - `orderItems` (array, required)
    List of items to include in the order.

  - `orderItems.menuItemId` (string, required)
    ID of the menu item to add to the order.

  - `orderItems.quantity` (integer, required)
    Quantity of the menu item.

  - `orderItems.discount` (integer)
    Discount amount in cents (absolute value).

  - `orderItems.comment` (string)
    Optional comment for the order item (e.g., "No sugar").

## Response 400 fields (application/problem+json):

  - `type` (string, required)
    URI reference that identifies the problem type.

  - `title` (string, required)
    Short summary of the problem type.

  - `status` (integer, required)
    HTTP status code generated by the origin server for this occurrence of the problem.

  - `instance` (string)
    URI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type.
Can be used to locate the root of this problem in the source code.
    Example: /some/uri-reference#specific-occurrence-context

## Response 401 fields (application/problem+json):

  - `type` (string, required)
    URI reference that identifies the problem type.

  - `title` (string, required)
    Short summary of the problem type.

  - `status` (integer, required)
    HTTP status code generated by the origin server for this occurrence of the problem.

  - `instance` (string)
    URI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type.
Can be used to locate the root of this problem in the source code.
    Example: /some/uri-reference#specific-occurrence-context

## Response 403 fields (application/problem+json):

  - `type` (string, required)
    URI reference that identifies the problem type.

  - `title` (string, required)
    Short summary of the problem type.

  - `status` (integer, required)
    HTTP status code generated by the origin server for this occurrence of the problem.

  - `instance` (string)
    URI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type.
Can be used to locate the root of this problem in the source code.
    Example: /some/uri-reference#specific-occurrence-context

## Response 404 fields (application/problem+json):

  - `type` (string, required)
    URI reference that identifies the problem type.

  - `title` (string, required)
    Short summary of the problem type.

  - `status` (integer, required)
    HTTP status code generated by the origin server for this occurrence of the problem.

  - `instance` (string)
    URI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type.
Can be used to locate the root of this problem in the source code.
    Example: /some/uri-reference#specific-occurrence-context

## Response 500 fields (application/problem+json):

  - `type` (string, required)
    URI reference that identifies the problem type.

  - `title` (string, required)
    Short summary of the problem type.

  - `status` (integer, required)
    HTTP status code generated by the origin server for this occurrence of the problem.

  - `instance` (string)
    URI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type.
Can be used to locate the root of this problem in the source code.
    Example: /some/uri-reference#specific-occurrence-context

