All Release Notes
Orders mutations available in the GraphQL schema
21 January 2019
Enhancement
GraphQLOrders
You can now update orders using the GraphQL schema.
- [GraphQL API] Added the following types to the GraphQL schema:
AddOrderDelivery
,AddOrderItemShippingAddress
,AddOrderParcelToDelivery
,AddOrderPayment
,AddOrderReturnInfo
,ChangeOrderPaymentState
,ChangeOrderShipmentState
,ChangeOrderState
,DeliveryItemDraftType
,ImportOrderCustomLineItemState
,ImportOrderLineItemState
,ItemShippingDetailsDraftType
,ItemStateDraftType
,OrderCartCommand
,OrderMyCartCommand
,OrderUpdateAction
,ParcelMeasurementsDraftType
,RemoveOrderDelivery
,RemoveOrderItemShippingAddress
,RemoveOrderParcelFromDelivery
,RemoveOrderPayment
,ReturnItemDraftType
,SetOrderBillingAddress
,SetOrderCustomField
,SetOrderCustomLineItemCustomField
,SetOrderCustomLineItemCustomType
,SetOrderCustomLineItemShippingDetails
,SetOrderCustomType
,SetOrderCustomerEmail
,SetOrderCustomerId
,SetOrderDeliveryAddress
,SetOrderDeliveryItems
,SetOrderLineItemCustomField
,SetOrderLineItemCustomType
,SetOrderLineItemShippingDetails
,SetOrderLocale
,SetOrderNumber
,SetOrderParcelItems
,SetOrderParcelMeasurements
,SetOrderParcelTrackingData
,SetOrderReturnPaymentState
,SetOrderReturnShipmentState
,SetOrderShippingAddress
,ShippingTargetDraftType
,TrackingDataDraftType
,TransitionOrderCustomLineItemState
,TransitionOrderLineItemState
,TransitionOrderState
,UpdateOrderItemShippingAddress
,UpdateOrderSyncInfo
. - [GraphQL API] Changed the
Mutation
type:- Added the
updateOrder
field to theMutation
type. - Added the
createOrderFromCart
field to theMutation
type. - Added the
createMyOrderFromCart
to theMutation
type. - Added the
deleteOrder
field to theMutation
type.
- Added the
Introduced the following changes to the GraphQL schema (in SDL format):
extend type Mutation {createMyOrderFromCart(draft: OrderMyCartCommand!): OrdercreateOrderFromCart(draft: OrderCartCommand!): OrderdeleteOrder(version: Long!, personalDataErasure: Boolean = false,"Queries with specified ID"id: String, orderNumber: String): OrderupdateOrder(version: Long!, actions: [OrderUpdateAction!]!,"Queries with specified ID"id: String, orderNumber: String): Order}input AddOrderDelivery {items: [DeliveryItemDraftType!] = []parcels: [DeliveryItemDraftType!] = []address: AddressInput}input AddOrderItemShippingAddress {address: AddressInput!}input AddOrderParcelToDelivery {deliveryId: String!measurements: ParcelMeasurementsDraftTypetrackingData: TrackingDataDraftTypeitems: [DeliveryItemDraftType!] = []}input AddOrderPayment {payment: ResourceIdentifierInput!}input AddOrderReturnInfo {items: [ReturnItemDraftType!]!returnDate: DateTimereturnTrackingId: String}input ChangeOrderPaymentState {paymentState: PaymentState!}input ChangeOrderShipmentState {shipmentState: ShipmentState!}input ChangeOrderState {orderState: OrderState!}input DeliveryItemDraftType {id: String!quantity: Long!}input ImportOrderCustomLineItemState {customLineItemId: String!state: [ItemStateDraftType!]!}input ImportOrderLineItemState {lineItemId: String!state: [ItemStateDraftType!]!}input ItemShippingDetailsDraftType {targets: [ShippingTargetDraftType!]!}input ItemStateDraftType {quantity: Long!state: ReferenceInput!}input OrderCartCommand {id: String!version: Long!paymentState: PaymentStateorderState: OrderStatestate: ReferenceInputshipmentState: ShipmentStateorderNumber: String}input OrderMyCartCommand {id: String!version: Long!}input OrderUpdateAction {addDelivery: AddOrderDeliveryaddItemShippingAddress: AddOrderItemShippingAddressaddParcelToDelivery: AddOrderParcelToDeliveryaddPayment: AddOrderPaymentaddReturnInfo: AddOrderReturnInfochangeOrderState: ChangeOrderStatechangePaymentState: ChangeOrderPaymentStatechangeShipmentState: ChangeOrderShipmentStateimportCustomLineItemState: ImportOrderCustomLineItemStateimportLineItemState: ImportOrderLineItemStateremoveDelivery: RemoveOrderDeliveryremoveItemShippingAddress: RemoveOrderItemShippingAddressremoveParcelFromDelivery: RemoveOrderParcelFromDeliveryremovePayment: RemoveOrderPaymentsetBillingAddress: SetOrderBillingAddresssetCustomField: SetOrderCustomFieldsetCustomLineItemCustomField: SetOrderCustomLineItemCustomFieldsetCustomLineItemCustomType: SetOrderCustomLineItemCustomTypesetCustomLineItemShippingDetails: SetOrderCustomLineItemShippingDetailssetCustomType: SetOrderCustomTypesetCustomerEmail: SetOrderCustomerEmailsetCustomerId: SetOrderCustomerIdsetDeliveryAddress: SetOrderDeliveryAddresssetDeliveryItems: SetOrderDeliveryItemssetLineItemCustomField: SetOrderLineItemCustomFieldsetLineItemCustomType: SetOrderLineItemCustomTypesetLineItemShippingDetails: SetOrderLineItemShippingDetailssetLocale: SetOrderLocalesetOrderNumber: SetOrderNumbersetParcelItems: SetOrderParcelItemssetParcelMeasurements: SetOrderParcelMeasurementssetParcelTrackingData: SetOrderParcelTrackingDatasetReturnPaymentState: SetOrderReturnPaymentStatesetReturnShipmentState: SetOrderReturnShipmentStatesetShippingAddress: SetOrderShippingAddresstransitionCustomLineItemState: TransitionOrderCustomLineItemStatetransitionLineItemState: TransitionOrderLineItemStatetransitionState: TransitionOrderStateupdateItemShippingAddress: UpdateOrderItemShippingAddressupdateSyncInfo: UpdateOrderSyncInfo}input ParcelMeasurementsDraftType {heightInMillimeter: IntlengthInMillimeter: IntwidthInMillimeter: IntweightInGram: Int}input RemoveOrderDelivery {deliveryId: String!}input RemoveOrderItemShippingAddress {addressKey: String!}input RemoveOrderParcelFromDelivery {parcelId: String!}input RemoveOrderPayment {payment: ResourceIdentifierInput!}input ReturnItemDraftType {quantity: Long!lineItemId: StringcustomLineItemId: Stringcomment: StringshipmentState: ReturnShipmentState!}input SetOrderBillingAddress {address: AddressInput}input SetOrderCustomField {name: String!value: String}input SetOrderCustomLineItemCustomField {customLineItemId: String!name: String!value: String}input SetOrderCustomLineItemCustomType {customLineItemId: String!fields: [CustomFieldInput!]type: ResourceIdentifierInputtypeKey: StringtypeId: String}input SetOrderCustomLineItemShippingDetails {customLineItemId: String!shippingDetails: ItemShippingDetailsDraftType}input SetOrderCustomType {fields: [CustomFieldInput!]type: ResourceIdentifierInputtypeKey: StringtypeId: String}input SetOrderCustomerEmail {email: String}input SetOrderCustomerId {customerId: String}input SetOrderDeliveryAddress {deliveryId: String!address: AddressInput}input SetOrderDeliveryItems {deliveryId: String!items: [DeliveryItemDraftType!]!}input SetOrderLineItemCustomField {lineItemId: String!name: String!value: String}input SetOrderLineItemCustomType {lineItemId: String!fields: [CustomFieldInput!]type: ResourceIdentifierInputtypeKey: StringtypeId: String}input SetOrderLineItemShippingDetails {lineItemId: String!shippingDetails: ItemShippingDetailsDraftType}input SetOrderLocale {locale: Locale}input SetOrderNumber {orderNumber: String}input SetOrderParcelItems {parcelId: String!items: [DeliveryItemDraftType!]!}input SetOrderParcelMeasurements {parcelId: String!measurements: ParcelMeasurementsDraftType}input SetOrderParcelTrackingData {parcelId: String!trackingData: TrackingDataDraftType}input SetOrderReturnPaymentState {returnItemId: String!paymentState: ReturnPaymentState!}input SetOrderReturnShipmentState {returnItemId: String!shipmentState: ReturnShipmentState!}input SetOrderShippingAddress {address: AddressInput}input ShippingTargetDraftType {addressKey: String!quantity: Long!}input TrackingDataDraftType {trackingId: Stringcarrier: Stringprovider: StringproviderTransaction: StringisReturn: Boolean = false}input TransitionOrderCustomLineItemState {customLineItemId: String!quantity: Long!fromState: ResourceIdentifierInput!toState: ResourceIdentifierInput!actualTransitionDate: DateTime}input TransitionOrderLineItemState {lineItemId: String!quantity: Long!fromState: ResourceIdentifierInput!toState: ResourceIdentifierInput!actualTransitionDate: DateTime}input TransitionOrderState {state: ResourceIdentifierInput!force: Boolean = false}input UpdateOrderItemShippingAddress {address: AddressInput!}input UpdateOrderSyncInfo {channel: ResourceIdentifierInput!syncedAt: DateTimeexternalId: String}