# Order

## GraphQL partial SDLs

This is a graphql reference page. In the llms.txt variant, those components link to the shared partial SDL key list instead of trying to resolve inline GraphQL reference content.

Fetch all available partial SDL keys first:

```text
GET https://docs.commercetools.com/apis/rest/content/by-id?id=ctp:gql-il:returnTypesList
```

Then fetch the one or more relevant partial SDL with a key from that list by calling the same endpoint with a schema ID:

```text
GET https://docs.commercetools.com/apis/rest/content/by-id?id=ctp:gql-il:schema:<key>
```

The response body is a JSON object keyed by the requested content ID. For example, the key-list request returns a `ctp:gql-il:returnTypesList` field and a schema request returns a `ctp:gql-il:schema:<key>` field.

**Queries and mutations to read Orders, place Orders from the Cart, and manage returns and cancellations.**

### Queries

#### Query Orders

[fetch SDL for query orders](#graphql-partial-sdls).

#### Get Order by ID

[fetch SDL for query order](#graphql-partial-sdls).

### Checkout and place Order

#### Checkout

[fetch SDL for mutation checkout](#graphql-partial-sdls).

#### Guest checkout

[fetch SDL for mutation guestCheckout](#graphql-partial-sdls).

#### Place Order

[fetch SDL for mutation placeOrder](#graphql-partial-sdls).

### Post-purchase

#### Reorder

[fetch SDL for mutation reorder](#graphql-partial-sdls).

#### Request return

[fetch SDL for mutation requestReturn](#graphql-partial-sdls).

#### Cancel Order

[fetch SDL for mutation cancelOrder](#graphql-partial-sdls).

### Output types

#### Order

[fetch SDL for type Order](#graphql-partial-sdls).

#### Order Line

[fetch SDL for type OrderLine](#graphql-partial-sdls).

#### Order Workflow State

[fetch SDL for type OrderWorkflowState](#graphql-partial-sdls).

#### Return

[fetch SDL for type Return](#graphql-partial-sdls).

#### Return Line

[fetch SDL for type ReturnLine](#graphql-partial-sdls).

#### Delivery

[fetch SDL for type Delivery](#graphql-partial-sdls).

#### Delivery Line

[fetch SDL for type DeliveryLine](#graphql-partial-sdls).

#### Parcel

[fetch SDL for type Parcel](#graphql-partial-sdls).

#### Order List Item

[fetch SDL for type OrderListItem](#graphql-partial-sdls).

#### Order Connection

[fetch SDL for type OrderConnection](#graphql-partial-sdls).

#### Order Edge

[fetch SDL for type OrderEdge](#graphql-partial-sdls).

#### Order Approval

[fetch SDL for type OrderApproval](#graphql-partial-sdls).

#### Unavailable Line

[fetch SDL for type UnavailableLine](#graphql-partial-sdls).

#### Order State

[fetch SDL for type OrderState](#graphql-partial-sdls).

#### Shipment State

[fetch SDL for type ShipmentState](#graphql-partial-sdls).

#### Payment State

[fetch SDL for type PaymentState](#graphql-partial-sdls).

#### Order Origin

[fetch SDL for type OrderOrigin](#graphql-partial-sdls).

#### Order Action

[fetch SDL for type OrderAction](#graphql-partial-sdls).

#### Return Shipment State

[fetch SDL for type ReturnShipmentState](#graphql-partial-sdls).

#### Return Payment State

[fetch SDL for type ReturnPaymentState](#graphql-partial-sdls).

#### Order Sort Field

[fetch SDL for type OrderSortField](#graphql-partial-sdls).

#### Reorder Target

[fetch SDL for type ReorderTarget](#graphql-partial-sdls).

#### Unavailable Reason

[fetch SDL for type UnavailableReason](#graphql-partial-sdls).

#### Checkout Result

[fetch SDL for type CheckoutResult](#graphql-partial-sdls).

#### Guest Checkout Result

[fetch SDL for type GuestCheckoutResult](#graphql-partial-sdls).

#### Place Order Result

[fetch SDL for type PlaceOrderResult](#graphql-partial-sdls).

#### Reorder Result

[fetch SDL for type ReorderResult](#graphql-partial-sdls).

#### Return Result

[fetch SDL for type ReturnResult](#graphql-partial-sdls).

#### Order Result

[fetch SDL for type OrderResult](#graphql-partial-sdls).

### Input types

#### Order Filter

[fetch SDL for type OrderFilter](#graphql-partial-sdls).

#### Order Sort

[fetch SDL for type OrderSort](#graphql-partial-sdls).

#### Checkout Input

[fetch SDL for type CheckoutInput](#graphql-partial-sdls).

#### Guest Checkout Input

[fetch SDL for type GuestCheckoutInput](#graphql-partial-sdls).

#### Place Order Input

[fetch SDL for type PlaceOrderInput](#graphql-partial-sdls).

#### Payment Input

[fetch SDL for type PaymentInput](#graphql-partial-sdls).

#### Request Return Input

[fetch SDL for type RequestReturnInput](#graphql-partial-sdls).

#### Return Line Input

[fetch SDL for type ReturnLineInput](#graphql-partial-sdls).

## Related pages

- [Area overview page with navigation](/commerce-integration-layer.md)
- [Previous page: Cart](/commerce-integration-layer/experience/cart.md)
- [Next page: Account](/commerce-integration-layer/experience/account.md)
- [Search documentation and API specs](/search.md)