19 January 2022
OrdersExtensibilityGraphQL
You can now extend the LineItemReturnItem as well as the CustomLineItemReturnItem object on the Order resource with Custom Fields. With these you can, for example, add the courier name or their shipment IDs to the return items of the Orders.
Changes:
- [API] Added
custom
field to LineItemReturnItem and CustomLineItemReturnItem. - [API] Added
custom
field to ReturnItemDraft. - [API] Added Set ReturnItem Custom Type and Set ReturnItem CustomField update actions to Orders and Order Edits.
- [GraphQL API] Added the following types to the GraphQL schema:
SetOrderReturnItemCustomField
,SetOrderReturnItemCustomType
SetStagedOrderReturnItemCustomField
,SetStagedOrderReturnItemCustomFieldOutput
,SetStagedOrderReturnItemCustomType
,SetStagedOrderReturnItemCustomTypeOutput
. - [GraphQL API] Changed the
CustomLineItemReturnItem
type:- Added the
custom
field to theCustomLineItemReturnItem
type.
- Added the
- [GraphQL API] Changed the
ReturnItem
type:- Added the
custom
field to theReturnItem
type.
- Added the
- [GraphQL API] Changed the
StagedOrderUpdateAction
type:- Input field
setReturnItemCustomField
was added toStagedOrderUpdateAction
type - Input field
setReturnItemCustomType
was added toStagedOrderUpdateAction
type
- Input field
- [GraphQL API] Changed the
ReturnItemDraftType
type:- Input field
custom
was added toReturnItemDraftType
type
- Input field
- [GraphQL API] Changed the
ReturnItemDraftTypeOutput
type:- Added the
custom
field to theReturnItemDraftTypeOutput
type.
- Added the
- [GraphQL API] Changed the
OrderUpdateAction
type:- Input field
setReturnItemCustomField
was added toOrderUpdateAction
type - Input field
setReturnItemCustomType
was added toOrderUpdateAction
type
- Input field
- [GraphQL API] Changed the
LineItemReturnItem
type:- Added the
custom
field to theLineItemReturnItem
type.
- Added the
The following changes were introduced in terms of GraphQL SDL:
extend type CustomLineItemReturnItem {
custom: CustomFieldsType
}
extend interface ReturnItem {
custom: CustomFieldsType
}
extend type ReturnItemDraftTypeOutput {
custom: CustomFieldsCommand
}
extend type LineItemReturnItem {
custom: CustomFieldsType
}
extend input StagedOrderUpdateAction {
setReturnItemCustomField: SetStagedOrderReturnItemCustomField
setReturnItemCustomType: SetStagedOrderReturnItemCustomType
}
extend input ReturnItemDraftType {
custom: CustomFieldsDraft
}
extend input OrderUpdateAction {
setReturnItemCustomField: SetOrderReturnItemCustomField
setReturnItemCustomType: SetOrderReturnItemCustomType
}
input SetOrderReturnItemCustomField {
name: String!
value: String
returnItemId: String!
}
input SetOrderReturnItemCustomType {
fields: [CustomFieldInput!]
type: ResourceIdentifierInput
typeKey: String
typeId: String
returnItemId: String!
}
input SetStagedOrderReturnItemCustomField {
name: String!
value: String
returnItemId: String!
}
type SetStagedOrderReturnItemCustomFieldOutput implements StagedOrderUpdateActionOutput {
type: String!
name: String!
value: Json
returnItemId: String!
}
input SetStagedOrderReturnItemCustomType {
fields: [CustomFieldInput!]
type: ResourceIdentifierInput
typeKey: String
typeId: String
returnItemId: String!
}
type SetStagedOrderReturnItemCustomTypeOutput implements StagedOrderUpdateActionOutput {
type: String!
custom: CustomFieldsCommand!
returnItemId: String!
}