# Order Edits

## 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-sphere: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-sphere: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-sphere:returnTypesList` field and a schema request returns a `ctp:gql-sphere:schema:<key>` field.

**Queries and mutations for managing Order Edits in the platform.**

## Queries

### Query Order Edits

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

### Get Order Edit

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

## Mutations

### Create Order Edit

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

### Update Order Edit

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

### Delete Order Edit

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

### Apply Order Edit

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

## Output types

### OrderEdit

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

### Order Edit Query Result

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

## Input types

### OrderEditDraft

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

### OrderEditUpdateAction

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

### Update actions

#### Add StagedAction

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

#### Set Comment

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

#### Set CustomField

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

#### Set Custom Type

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

#### Set Key

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

#### Set StagedActions

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

### StagedOrderUpdateAction

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

### Staged Order update actions

#### on Order

##### Set Order Number

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

##### Set Purchase Order Number

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

##### Set Business Unit &#x20;

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

##### Set Customer ID

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

##### Set Customer Email

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

##### Set Customer Group

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

##### Add LineItem

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

##### Remove LineItem

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

##### Add CustomLineItem

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

##### Remove CustomLineItem

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

##### Add Shopping List

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

##### Set Order Total Tax

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

##### Change TaxMode

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

##### Change Price RoundingMode

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

##### Change Tax RoundingMode

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

##### Change TaxCalculationMode

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

##### Add DiscountCode

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

##### Remove DiscountCode

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

##### Set DirectDiscounts

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

##### Set DirectDiscountsIgnoreCartDiscounts

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

##### Add Payment

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

##### Remove Payment

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

##### Change PaymentState

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

##### Set Billing Address

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

##### Set Shipping Address

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

##### Add ItemShippingAddress

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

##### Remove ItemShippingAddress

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

##### Update ItemShippingAddress

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

##### Set ShippingAddress and ShippingMethod

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

##### Set ShippingAddress and Custom ShippingMethod

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

##### Set ShippingMethod

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

##### Set Custom ShippingMethod

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

##### Set ShippingRateInput

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

##### Add Delivery

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

##### Remove Delivery

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

##### Change ShipmentState

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

##### Add ReturnInfo

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

##### Set ReturnInfo

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

##### Set ReturnShipmentState

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

##### Set ReturnPaymentState

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

##### Change OrderState

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

##### Transition State

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

##### Update SyncInfo

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

##### Set Locale

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

##### Set Country

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

##### Set Store

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

##### Set Estimated Delivery

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

##### Set Custom Type

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

##### Set CustomField

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

#### on Line Item

##### Change LineItem Quantity

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

##### Set LineItem TaxRate

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

##### Set LineItem TaxAmount

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

##### Set LineItem Price

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

##### Set LineItem TotalPrice

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

##### Set LineItem DistributionChannel

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

##### Set LineItem ShippingDetails

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

##### Set LineItem Custom Type

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

##### Set LineItem CustomField

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

##### Transition LineItem State

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

##### Import LineItem State

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

#### on Custom Line Item

##### Change CustomLineItem Quantity

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

##### Set CustomLineItem TaxRate

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

##### Set CustomLineItem TaxAmount

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

##### Change CustomLineItem Money

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

##### Set CustomLineItem ShippingDetails

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

##### Set CustomLineItem Custom Type

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

##### Set CustomLineItem CustomField

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

##### Transition CustomLineItem State

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

##### Import CustomLineItem State

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

#### on Billing Address

##### Set Billing Address Custom Type

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

##### Set Billing Address CustomField

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

#### on Shipping Address

##### Set Shipping Address Custom Type

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

##### Set Shipping Address CustomField

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

#### on ItemShipping Address

##### Set ItemShipping Address Custom Type

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

##### Set ItemShipping Address CustomField

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

#### on Shipping Method

##### Set ShippingMethod TaxAmount

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

##### Set ShippingMethod TaxRate

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

#### on Shipping

##### Set Shipping Custom Type

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

##### Set Shipping CustomField

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

#### on Delivery

##### Set Delivery Address

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

##### Add Parcel to Delivery

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

##### Remove Parcel from Delivery

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

##### Set Delivery Items

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

##### Set Delivery Custom Type

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

##### Set Delivery CustomField

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

#### on Delivery Address

##### Set Delivery Address Custom Type

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

##### Set Delivery Address CustomField

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

#### on Parcel

##### Set Parcel Measurements

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

##### Set Parcel Tracking Data

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

##### Set Parcel Items

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

##### Set Parcel Custom Type

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

##### Set Parcel CustomField

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

#### on ReturnItem

##### Set ReturnItem Custom Type

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

##### Set ReturnItem CustomField

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

## Related pages

- [Area overview page with navigation](/api.md)
- [Previous page: REST](/api/projects/order-edits.md)
- [Search documentation and API specs](/search.md)