# Cart and Order Messages

## 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.

**GraphQL output types for Messages that represent a change or an action performed on a Cart, Order, Order Edit, or Recurring Order.**

Each type on this page implements [MessagePayload](/api/graphql/messages.md#messagepayload) and is returned in the `payload` field of a [Message](/api/graphql/messages.md#message). For when each Message is generated, see [Cart and Order Messages](/api/projects/messages/cart-order-messages.md).

## Cart Messages

### CartEstimatedDeliverySet

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

### CartFrozen

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

### CartLocked

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

### CartPurchaseOrderNumberSet

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

### CartUnfrozen

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

### CartUnlocked

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

### CartCreated

> This message is only returned for GraphQL.

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

## Order Messages

Order Messages also implement the [OrderMessagePayload](/api/graphql/messages-cart-order-messages.md#ordermessagepayload) interface.

### OrderMessagePayload

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

### globally

#### OrderCreated

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

#### OrderCreatedFromRecurringOrder

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

#### OrderImported

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

#### OrderEditApplied

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

#### OrderDeleted

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

#### PurchaseOrderNumberSet

> This type is equivalent to [OrderPurchaseOrderNumberSetMessage](/search.md?urn=ctp:api:type:OrderPurchaseOrderNumberSetMessage) in REST.

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

#### OrderCustomerSet

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

#### OrderCustomerEmailSet

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

#### OrderCustomerGroupSet

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

#### OrderLineItemAdded

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

#### OrderLineItemRemoved

> The GraphQL field `newShippingDetails` corresponds to the field `newShippingDetail` in [OrderLineItemRemovedMessage](/search.md?urn=ctp:api:type:OrderLineItemRemovedMessage) in REST.

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

#### OrderCustomLineItemAdded

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

#### OrderCustomLineItemRemoved

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

#### OrderDiscountCodeAdded

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

#### OrderDiscountCodeRemoved

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

#### OrderDiscountCodeStateSet

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

#### OrderPaymentAdded

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

#### OrderPaymentRemoved

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

#### OrderPaymentStateChanged

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

#### OrderBillingAddressSet

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

#### OrderShippingAddressSet

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

#### OrderEstimatedDeliverySet

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

#### OrderShippingInfoSet

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

#### OrderShippingRateInputSet

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

#### OrderShipmentStateChanged

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

#### DeliveryAdded

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

#### DeliveryRemoved

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

#### ReturnInfoAdded

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

#### ReturnInfoSet

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

#### OrderStateChanged

> The `orderId` field corresponds to the `resource` field of the Message in REST.

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

#### OrderStateTransition

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

#### OrderStoreSet

> The `oldStore` and `oldStoreRef` fields are only available in GraphQL.

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

#### OrderBusinessUnitSet &#x20;

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

#### OrderDiscountTypeCombinationSet

> This message is only returned for GraphQL.

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

#### OrderShippingContainerSet

> This message is only returned for GraphQL.

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

#### OrderShippingUpdated

> This message is only returned for GraphQL.

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

### on Line Item

#### OrderLineItemDistributionChannelSet

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

#### OrderLineItemDiscountSet

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

#### LineItemStateTransition

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

### on Custom Line Item

#### OrderCustomLineItemQuantityChanged

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

#### OrderCustomLineItemDiscountSet

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

#### CustomLineItemStateTransition

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

### on Delivery

#### DeliveryAddressSet

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

#### ParcelAddedToDelivery

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

#### ParcelRemovedFromDelivery

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

#### DeliveryItemsUpdated

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

#### DeliveryCustomFieldAdded

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

#### DeliveryCustomFieldChanged

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

#### DeliveryCustomFieldRemoved

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

#### DeliveryCustomTypeSet

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

#### DeliveryCustomTypeRemoved

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

### on Parcel

#### ParcelMeasurementsUpdated

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

#### ParcelTrackingDataUpdated

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

#### ParcelItemsUpdated

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

### on Return Item

#### OrderReturnShipmentStateChanged

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

### on Custom Fields and Types

#### OrderCustomFieldAdded

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

#### OrderCustomFieldChanged

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

#### OrderCustomFieldRemoved

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

#### OrderCustomTypeSet

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

#### OrderCustomTypeRemoved

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

## Recurring Order Messages

### RecurringOrderCreated

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

### RecurringOrderDeleted

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

### RecurringOrderStateChanged

> The GraphQL fields `recurringOrderState` and `oldRecurringOrderState` correspond to the fields `state` and `oldState` in [RecurringOrderStateChangedMessage](/search.md?urn=ctp:api:type:RecurringOrderStateChangedMessage) in REST.

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

### RecurringOrderFailed

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

### RecurringOrderStateTransition

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

### RecurringOrderStartsAtSet

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

### RecurringOrderExpiresAtSet

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

### RecurringOrderScheduleSet

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

### RecurringOrderKeySet

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

### RecurringOrderNowRequested

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

### on Custom Fields and Types

#### RecurringOrderCustomTypeSet

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

#### RecurringOrderCustomTypeRemoved

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

#### RecurringOrderCustomFieldAdded

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

#### RecurringOrderCustomFieldChanged

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

#### RecurringOrderCustomFieldRemoved

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

## Related pages

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