Queries and mutations for managing Orders in the platform.
Queries
Query Orders
Get Order
Mutations
Create Order from Cart
| Arguments | |
|---|---|
draft | |
storeKey | The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions. |
asAssociate | Create/modify entity as an associate in business-unit. |
Create Order from Quote
| Arguments | |
|---|---|
draft | |
storeKey | The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions. |
asAssociate | Create/modify entity as an associate in business-unit. |
Update Order
| Arguments | |
|---|---|
versionLong | |
actionsArray of OrderUpdateAction | |
storeKey | The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions. |
asAssociate | Create/modify entity as an associate in business-unit. |
idString | Queries with specified ID |
orderNumberString | |
Delete Order
Output types
Order
customerIdString | id of the Customer that the Order belongs to. |
customer | |
customerEmailString | Email address of the Customer that the Order belongs to. |
anonymousIdString | Anonymous session associated with the Order. |
lineItemsArray of LineItem | Line Items that are part of the Order. |
customLineItemsArray of CustomLineItem | Custom Line Items that are part of the Order. |
totalPrice | Sum of the
totalPrice field of all LineItems and CustomLineItems, and if available, the price field of ShippingInfo.
If a discount applies on totalPrice, this field holds the discounted value. |
taxedPrice |
If a discount applies on totalPrice, this field holds the proportionally discounted value. |
discountOnTotalPrice | Discounts that apply on the total price of the Order. |
shippingAddress | Shipping address associated with the Order.
Determines eligible ShippingMethod rates and Tax Rates of Line Items. |
billingAddress | Billing address associated with the Order. |
inventoryMode | Indicates how stock quantities are tracked for Line Items in the Order. Can beNone, TrackOnly, ReserveOnOrder, or ReserveOnCart |
taxMode | Indicates how Tax Rates are set. Can beDisabled, External, ExternalAmount, or Platform |
priceRoundingMode | Indicates how the total prices on LineItems and CustomLineItems are rounded when calculated. Can be HalfDown, HalfEven, or HalfUp |
taxRoundingMode | Indicates how monetary values are rounded when calculating taxes for Can be taxedPrice.HalfDown, HalfEven, or HalfUp |
taxCalculationMode | Indicates how taxes are calculated when calculating taxes for Can be taxedPrice.LineItemLevel, or UnitPriceLevel |
customerGroup | Reference to the Customer Group of the Customer that the Order belongs to.
Used for Line Item price selection. |
customerGroupRef | Reference to the Customer Group of the Customer that the Order belongs to.
Used for Line Item price selection. |
country | Used for Line Item price selection. |
shippingKeyString | |
shippingInfo | Shipping-related information for Single ShippingMode.
Automatically set when a Shipping Method is set. |
discountCodesArray of DiscountCodeInfo | Discount Codes added to the Order. If directDiscountsIgnoreCartDiscounts is true, an Order that has directDiscounts cannot have discountCodes. |
directDiscountsArray of DirectDiscount | Direct Discounts added to the Order. If directDiscountsIgnoreCartDiscounts is true, an Order that has discountCodes cannot have directDiscounts. |
refusedGiftsArray of CartDiscount | |
refusedGiftsRefsArray of Reference | |
paymentInfo | Payment information related to the Order. |
locale | Languages of the Order.
Can only contain languages supported by the Project. |
shippingRateInput | Input used to select a ShippingRatePriceTier.
The data type of this field depends on the
shippingRateInputType.type configured in the Project:
|
origin | Indicates the origin of the Cart from which the Order was created. Can beCustomer, Merchant, Quote, or RecurringOrder |
storeRef | Reference to a Store the Order belongs to. |
store | Reference to a Store the Order belongs to. |
itemShippingAddressesArray of Address | Additional shipping addresses of the Order as specified by LineItems using the shippingDetails field.
Eligible Shipping Methods or applicable Tax Rates are determined by the address in shippingAddress, and not itemShippingAddresses. |
businessUnit | |
businessUnitRef | |
shippingArray of Shipping | Shipping-related information for Multiple ShippingMode.
Updated automatically each time a new Shipping Method is added. |
taxedShippingPrice | Sum of the
taxedPrice field of ShippingInfo across all Shipping Methods.If a discount applies on totalPrice, this field holds the proportionally discounted value. |
shippingMode | Indicates whether there can be one or multiple Shipping Methods. Can beMultiple, or Single |
shippingCustomFields | Custom Fields of the Shipping Method for Single ShippingMode. |
placement | Can be InStore, or Online |
discountTypeCombination | Indicates if a combination of discount types can apply on an Order. |
completedAt | User-defined date and time (UTC) of the Order.
Present only on an Order created using Order Import. |
orderNumberString | User-defined identifier of the Order that is unique across a Project. |
orderState | Current status of the Order. Can beCancelled, Complete, Confirmed, or Open |
stateRef | State of the Order.
This reference can point to a State in a custom workflow. |
state | State of the Order.
This reference can point to a State in a custom workflow. |
shipmentState | Shipment status of the Order. Can beBackorder, Canceled, Delayed, Delivered, Partial, Pending, Ready, or Shipped |
paymentState | Payment status of the Order. Can beBalanceDue, CreditOwed, Failed, Paid, or Pending |
syncInfoArray of SyncInfo | Contains synchronization activity information of the Order (like export or import).
Can only be set with Update SyncInfo update action. |
returnInfoArray of ReturnInfo | Contains information regarding the returns associated with the Order. |
purchaseOrderNumberString | User-defined identifier of a purchase Order. It is typically set by the Buyer and can be used with Quotes to track the purchase Order during the quote and order flow. |
directDiscountsIgnoreCartDiscountsBoolean |
|
lastMessageSequenceNumberDEPRECATEDLong | An internal field that should not be used in customer logic Internal-only field. |
cartRef | Reference to the Cart for an Order created from Cart.
The referenced Cart will have the Ordered CartState. |
cartCart | Reference to the Cart for an Order created from Cart.
The referenced Cart will have the Ordered CartState. |
quoteRef | Reference to the Quote for an Order created from Quote. |
quote | Reference to the Quote for an Order created from Quote. |
recurringOrderRef | Reference to the RecurringOrder that generated this Order. |
recurringOrder | Reference to the RecurringOrder that generated this Order. |
custom | Custom Fields of the Order. |
idString | Unique identifier of the Order. |
versionLong | Current version of the Order. |
createdAt | Date and time (UTC) the Order was initially created. |
lastModifiedAt | Date and time (UTC) the Order was last updated. |
createdBy | IDs and references that created the Order. |
lastModifiedBy | IDs and references that last modified the Order. |
LineItem
A line item is a snapshot of a product variant at the time it was added to the cart.
Since a product variant may change at any time, the ProductVariant data is copied into the field variant. The relation to the Product is kept but the line item will not automatically update if the product variant changes. On the cart, the line item can be updated manually. The productSlug refers to the current version of the product. It can be used to link to the product. If the product has been deleted, the line item remains but refers to a non-existent product and the productSlug is left empty.
Please also note that creating an order is impossible if the product or product variant a line item relates to has been deleted.
idString | Unique identifier of the LineItem. |
keyString | User-defined identifier of the LineItem. Unique among LineItems in the Cart or Order. |
productIdString | id of the Product the Line Item is based on. |
productKeyString | key of the Product.This field is only present on:
Present on resources created or updated after 3 December 2021. |
nameString | Name of the Product. |
nameAllLocalesArray of LocalizedString | Name of the Product. |
productSlugString | slug of the current version of the Product. Updated automatically if the slug changes. Empty if the Product has been deleted.
The productSlug field of LineItem is not expanded when using Reference Expansion. |
productSlugAllLocalesArray of LocalizedString | slug of the current version of the Product. Updated automatically if the slug changes. Empty if the Product has been deleted.
The productSlug field of LineItem is not expanded when using Reference Expansion. |
productType | Product Type of the Product. |
productTypeRef | Reference to the product type of the line item, carrying the snapshot version captured when the line item was added. |
variant | Holds the data of the Product Variant added to the Cart. The data is saved at the time the Product Variant is added to the Cart and is not updated automatically when Product Variant data changes.
Must be updated using the Recalculate update action. |
price | Price of a Line Item selected from the Product Variant according to the Product priceMode. If the priceMode is Embedded ProductPriceMode and the variant field hasn't been updated, the price may not correspond to a price in variant.prices. |
taxedPrice | Automatically set after taxRate is set. |
totalPrice | Total price of this Line Item equalling
price multiplied by quantity. If the Line Item is discounted, the total price is the discountedPricePerQuantity multiplied by quantity.
Includes taxes if the TaxRate includedInPrice is true.If ExternalPrice LineItemPriceMode is used with high-precision money, then the total price is rounded by using the HalfEven rounding mode. |
quantityLong | |
addedAt | Date and time (UTC) the Line Item was added to the Cart. |
lastModifiedAt | Date and time (UTC) the Line Item was last updated. |
stateArray of ItemState | Tracks specific quantities of the Line Item within a given State. When a Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Line Items are managed on the Order. |
taxRate |
|
supplyChannel | Identifies Inventory entries that are reserved. The referenced Channel has the InventorySupply ChannelRoleEnum. |
supplyChannelRef | Identifies Inventory entries that are reserved. The referenced Channel has the InventorySupply ChannelRoleEnum. |
distributionChannel | |
distributionChannelRef | |
discountedPricePerQuantityArray of DiscountedLineItemPriceForQuantity | Discounted price of a single quantity of the Line Item. |
lineItemMode | Indicates how the Line Item is added to the Cart. Can beGiftLineItem, or Standard |
priceMode | Indicates how the Price for the Line Item is set. Can beExternalPrice, ExternalTotal, or Platform |
custom | Custom Fields of the Line Item. |
inventoryMode | Inventory mode specific to this Line Item only, and valid for the entire Can be quantity of the Line Item.
Only present if the inventory mode is different from the inventoryMode specified on the Cart.None, TrackOnly, ReserveOnOrder, or ReserveOnCart |
reservation | Reference to the successful Reservation associated with this Line Item. This field is only populated when using the ReserveOnCart mode. |
reservationRef | Reference to the successful Reservation associated with this Line Item. This field is only populated when using the ReserveOnCart mode. |
shippingDetails | Container for Line Item-specific addresses. |
perMethodTaxRateArray of MethodTaxRate | Tax Rate per Shipping Method for a Cart with Multiple ShippingMode. For a Cart with Platform TaxMode it is automatically set after the Shipping Method is added.
For a Cart with External TaxMode, the Tax Rate must be set with ExternalTaxRateDraft. |
taxedPricePortionsArray of MethodTaxedPrice | Total taxed prices based on the quantity of Line Item assigned to each Shipping Method. Only applicable for Carts with Multiple ShippingMode.
Automatically set after perMethodTaxRate is set. |
recurrenceInfo | Recurring Order and frequency data. |
VersionedReference
typeIdString | |
idString | |
versionLong |
ProductVariant
Classic.
When the Project has the Modular catalog model, use the Variants API instead.idInt | A unique, sequential identifier of the Product Variant within the Product. |
keyString | User-defined identifier of the ProductVariant. Unique among ProductVariants in the same Product. This is different from Product key. |
skuString | User-defined SKU of the Product Variant. Unique across all ProductVariants in a Project. |
pricesArray of ProductPrice | If the Product is projected by Store, this field only contains Embedded Prices that are valid for that Store.
Cannot contain two Embedded Prices with the same scopes (currency, country, Customer Group, Channel, validFrom and validUntil). |
price | Returns a single price based on the price selection rules. |
allRecurrencePricesArray of ProductPrice | Returns all recurrence prices based on the price selection rules. |
imagesArray of Image | Images of the Product Variant. |
assetsArray of Asset | Media assets of the Product Variant. |
availability | Set if the Product Variant is tracked by Inventory.
Can be used as an optimization to reduce calls to the Inventory service.
May not contain the latest Inventory State (it is eventually consistent). |
attributesRawArray of RawProductAttribute | This field contains raw attributes data |
ProductPrice
idString | |
value | |
keyString | |
country | |
customerGroup | |
customerGroupRef | |
channel | |
channelRef | |
validFrom | |
validUntil | |
discounted | |
tiersArray of ProductPriceTier | |
custom | |
recurrencePolicy | |
recurrencePolicyRef |
DiscountedProductPriceValue
value | |
discountRef | |
discount |
ProductPriceTier
minimumQuantityInt | |
value |
ProductVariantAvailabilityWithChannels
noChannel | |
channels |
ProductVariantAvailability
Product variant availability
isOnStockBoolean | Whether the Product Variant is in stock, based on an InventoryEntry that has no assigned supply Channel.
This value reflects global or default availability; it does not aggregate the channel-specific availabilities found in the channels field. |
restockableInDaysInt | Number of days to restock a Product Variant once it is out of stock. |
availableQuantityLong | Number of items of the Product Variant that are in stock. |
versionLong | Current version of the InventoryEntry. |
idString | Unique identifier of the InventoryEntry. |
ProductVariantAvailabilitiesResult
Product variant availabilities
limitInt | |
offsetInt | |
totalInt | |
resultsArray of ProductVariantAvailabilityWithChannel |
ProductVariantAvailabilityWithChannel
channelRef | |
channel | |
availability |
RawProductAttribute
attributeDefinition | |
nameString | |
valueJson | |
attributesRawArray of RawProductAttribute | BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta |
referencedResource | |
referencedResourceSetArray of ReferenceExpandable |
AttributeDefinition
type | Describes the Type of the Attribute. |
nameString | User-defined name of the Attribute that is unique within the Project. |
labelString | Human-readable label for the Attribute. |
isRequiredBoolean | Whether the Attribute must have a value on a ProductVariant. |
attributeConstraint | Specifies how Attributes are validated across all variants of a Product. Can beNone, Unique, CombinationUnique, or SameForAll |
level | Specifies whether the Attribute is defined at the Product or Variant level. Can beVariant, or Product |
inputTipString | Provides additional Attribute information to aid content managers configure Product details. |
inputHint | Provides a visual representation directive for values of this Attribute (only relevant for AttributeTextType and AttributeLocalizableTextType). Can be SingleLine, or MultiLine |
isSearchableBoolean | Whether the Attribute's values are available in the Product Search or the Product Projection Search API for use in full-text search queries, filters, and facets.
However, if an Attribute's
level is set as Product, then Product Projection Search does not support the Attribute.
To use the Attribute in search, filters, or facets, set isSearchable to true for all AttributeDefinitions with the same name across different ProductTypes.
If the isSearchable values are different, the Attribute isn't available for search, filters, or facets.The exact features that are available with this flag depend on the specific AttributeType.
The maximum size of a searchable field is restricted by the Field content size limit.
This constraint is enforced at both Product creation and Product update.
If the length of the input exceeds the maximum size, an InvalidField error is returned. |
savedToLineItemBoolean | Whether the Attribute value is copied onto the LineItem when the Product is added to a Cart.
When
false, the Attribute value is excluded from the Line Item variant. Line Items already in a Cart are not immediately affected by a change to this value. Existing Line Items are updated the next time their Product data is refreshed, such as when a Recalculate update action is performed with updateProductData set to true, or on a Cart update that triggers an API Extension. Replicating a Cart creates a new Cart that contains the current Product data; it does not update the original Cart.When savedToLineItem is false, LineItem predicates that reference this Attribute, such as those in Cart Discounts and Shipping Methods, evaluate as if the Attribute is not set. |
labelAllLocalesArray of LocalizedString | Human-readable label for the Attribute. |
inputTipAllLocalesArray of LocalizedString | Provides additional Attribute information to aid content managers configure Product details. |
AttributeDefinitionType
AttributeConstraint
None- No constraints are applied to the attribute
Unique- Attribute value should be different in each variant
CombinationUnique- A set of attributes, that have this constraint, should have different combinations in each variant
SameForAll- Attribute value should be the same in all variants
Level
Variant- The attribute can be used on the variant level
Product- The attribute can be used on the product level
TaxedItemPrice
totalNet | Total net amount of the Line Item or Custom Line Item. |
totalGross | Total gross amount of the Line Item or Custom Line Item. |
taxPortionsArray of TaxPortion | Taxable portions added to the total net price. Calculated from the TaxRates. |
totalTax | Total tax applicable for the Line Item or Custom Line Item.
Automatically calculated as the difference between the totalGross and totalNet values. |
TaxPortion
Represents the portions that sum up to the totalGross field of a TaxedPrice. The portions are calculated from the TaxRates. If a tax rate has SubRates, they are used and can be identified by name. Tax portions from line items that have the same rate and name will be accumulated to the same tax portion.
rateFloat | A number in the range 0-1. |
amount | Money value of the tax portion. |
nameString | Name of the tax portion. |
ItemState
TaxRate
nameString | Name of the TaxRate. |
amountFloat | Tax rate. If subrates are used, the amount is the sum of all rates in subRates. |
includedInPriceBoolean | Whether tax is included in Embedded Prices or Standalone Prices, and the taxedPrice is present on LineItems. In this case, the totalNet price on TaxedPrice includes the TaxRate. |
country | Country in which the tax rate is applied in ISO 3166-1 alpha-2 format. |
stateString | State within the country, such as Texas in the United States.
The value is case-sensitive and must use the same casing as the
state value in the Cart shippingAddress.A TaxRate whose state is omitted does not act as a wildcard: it only matches a Cart whose shippingAddress also has no state value. To apply the same rate across states, either define an individual TaxRate for each state, or use the region field or a Custom Field on the shipping address as described in Address matching. |
idString | Present if the TaxRate is part of a TaxCategory.
Absent for external TaxRates in LineItem, CustomLineItem, and ShippingInfo. |
keyString | User-defined identifier of the TaxRate. Unique within the TaxCategory containing it.
Present when set using TaxRateDraft. Not available for external TaxRates created using ExternalTaxRateDraft. |
subRatesArray of SubRate | Used when the total tax is a combination of multiple taxes (for example, local, state/provincial, and/or federal taxes). The total of all subrates must equal the TaxRate amount.
These subrates are used to calculate the taxPortions field of a Cart or Order and the taxedPrice field of LineItems, CustomLineItems, and ShippingInfos. |
taxRoundingTarget | Determines which of the net price and the tax amount the
taxRoundingMode of the Cart or Order is applied to, when this TaxRate is included in the price. Ignored if includedInPrice is false.Always returned by the API. Can be omitted when a TaxRate is supplied as input, such as in OrderImportDraft, and then defaults to Can be Net.Net, or Tax |
SubRate
nameString | Name of the SubRate. |
amountFloat |
TaxRoundingTarget
Net- Default. `taxRoundingMode` is applied to the net price and the tax amount is the exact remainder. E.g. at 20% on `1.23`, the net rounds to `1.02` and the tax is `0.21`.
Tax- `taxRoundingMode` is applied to the tax amount and the net price is the exact remainder. E.g. at 20% on `1.23`, the tax rounds to `0.20` and the net is `1.03`. Has no effect when the rate is not included in the price.
DiscountedLineItemPriceForQuantity
quantityLong | Quantity of Line Items or Custom Line Items in the Cart. |
discountedPrice | Discounted price of the Line Item or Custom Line Item. When multiple Cart Discounts apply to the same Line Item, the discounts are applied sequentially in the order determined by their sortOrder values (higher values are applied first). The price rounding mode specified by the Cart's priceRoundingMode field is applied after each individual discount is calculated, not after all discounts have been applied cumulatively. This means that rounding occurs at each step of the discount calculation process. |
DiscountedLineItemPrice
value | Money value of the discounted Line Item or Custom Line Item. When multiple discounts from includedDiscounts apply, they are applied sequentially based on the sortOrder of their associated Cart Discounts (discounts with higher sortOrder values are applied first). The Cart's priceRoundingMode field (RoundingMode) is applied after each discount calculation, so rounding occurs after each discount step rather than only once on the final cumulative amount. |
includedDiscountsArray of DiscountedLineItemPortion | Discount applicable on the Line Item or Custom Line Item. |
DiscountedLineItemPortion
discount | A CartDiscountReference or DirectDiscountReference of the applicable discount on the Line Item. |
discountRef | A CartDiscountReference or DirectDiscountReference of the applicable discount on the Line Item. |
discountedAmount | Money value of the applicable discount. When a Cart Discount with CartDiscountPatternTarget is used:
|
LineItemMode
GiftLineItem- The line item was added automatically, because a discount has added a free gift to the cart. The quantity can not be increased, and it won’t be merged when the same product variant is added. If the gift is removed, an entry is added to the "refusedGifts" array and the discount won’t be applied again to the cart. The price can not be changed externally. All other updates, such as the ones related to custom fields, can be used.
Standard- The line item was added during cart creation or with the update action addLineItem. Its quantity can be changed without restrictions.
LineItemPriceMode
ExternalPrice- The line item price was set externally. Cart discounts can apply to line items with this price mode. All update actions that change the quantity of a line item with this price mode require the externalPrice field to be given.
ExternalTotal- The line item price with the total was set externally.
Platform- The price is selected form the product variant. This is the default mode.
InventoryMode
None- No inventory checks or modifications when adding items or ordering. Default for a new cart.
TrackOnly- Orders decrement the available quantity on the matching inventory entry; ordering fails only when no inventory entry exists for a line item.
ReserveOnOrder- Line items are reserved only for the duration of the ordering transaction; creating an order fails when an unavailable line item exists.
ReserveOnCart- Items are reserved when added to the cart. Not supported by this service.
ItemShippingDetails
targetsArray of ItemShippingTarget | Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped. |
validBoolean | Whether the quantity of Line Items or Custom Line Items is equal to the sum of sub-quantities defined in targets.
Ordering a Cart when the value is false returns an InvalidItemShippingDetails error. |
ItemShippingTarget
itemShippingAddresses) and the quantity shipped to the address.If multiple shipping addresses are present for a Line Item or Custom Line Item, sub-quantities must be specified. An array of addresses and sub-quantities is stored per Line Item or Custom Line Item.
addressKeyString | Key of the address in the Cart itemShippingAddresses.
Duplicate address keys are not allowed. |
quantityLong | Quantity of Line Items or Custom Line Items shipped to the address with the specified
addressKey.If a quantity is updated to 0 when defining ItemShippingDetailsDraft, the targets are removed from a Line Item or Custom Line Item in the resulting ItemShippingDetails. |
shippingMethodKeyString | User-defined unique identifier of the Shipping Method in a Cart with
Multiple ShippingMode.It connects Line Item or Custom Line Item quantities with individual Shipping Methods. Required when the Cart has Multiple ShippingMode. Omitting this field in that case returns an InvalidOperation error. |
MethodTaxRate
shippingMethodKeyString | User-defined unique identifier of the Shipping Method in a Cart with Multiple ShippingMode. |
taxRate | Tax Rate for the Shipping Method. |
MethodTaxedPrice
shippingMethodKeyString | |
taxedPrice | Total taxed price based on the quantity of the Line Item or Custom Line Item assigned to the Shipping Method identified by shippingMethodKey. |
LineItemRecurrenceInfo
The RecurrenceInfo returned in a LineItem
recurrencePolicy | |
recurrencePolicyRef | |
expiresAt | |
priceSelectionMode | Can be Dynamic, or Fixed |
RecurrencePolicyRef
typeIdString | |
idString |
CustomLineItem
A custom line item is a generic item that can be added to the cart but is not bound to a product. You can use it for discounts (negative money), vouchers, complex cart rules, additional services or fees. You control the lifecycle of this item.
idString | Unique identifier of the Custom Line Item. |
keyString | User-defined identifier of the Custom Line Item. Unique among Custom Line Items in the Cart or Order. |
nameString | Name of the Custom Line Item. |
nameAllLocalesArray of LocalizedString | Name of the Custom Line Item. |
money | Money value of the Custom Line Item. |
totalPrice | Total price of the Custom Line Item (
money multiplied by quantity).
If the Custom Line Item is discounted, the total price is discountedPricePerQuantity multiplied by quantity. |
slugString | User-defined identifier used in a deep-link URL for the Custom Line Item.
It matches the pattern [a-zA-Z0-9_-]{2,256}. |
quantityLong | |
stateArray of ItemState | Tracks specific quantities of the Custom Line Item within a given State. When a Custom Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Custom Line Items are managed on the Order. |
taxCategory | Used to select a Tax Rate when a Cart has the Platform TaxMode. |
taxCategoryRef | Used to select a Tax Rate when a Cart has the Platform TaxMode. |
taxRate |
|
taxedPrice | Automatically set after the taxRate is set. |
taxedPricePortionsArray of MethodTaxedPrice | Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method. Only applicable for Carts with Multiple ShippingMode.
Automatically set after perMethodTaxRate is set. |
perMethodTaxRateArray of MethodTaxRate | Tax Rate per Shipping Method for a Cart with Multiple ShippingMode. For a Cart with Platform TaxMode it is automatically set after the Shipping Method is added.
For a Cart with External TaxMode, the Tax Rate must be set with ExternalTaxRateDraft. |
discountedPricePerQuantityArray of DiscountedLineItemPriceForQuantity | Discounted price of a single quantity of the Custom Line Item. |
custom | Custom Fields of the Custom Line Item. |
shippingDetails | Container for Custom Line Item-specific addresses. |
priceMode | Indicates whether Cart Discounts with a matching CartDiscountCustomLineItemsTarget, MultiBuyCustomLineItemsTarget, or CartDiscountPatternTarget are applied to the Custom Line Item. Can be External, or Standard |
recurrenceInfo | Recurring Order and frequency data. |
CustomLineItemPriceMode
External- Cart discounts are deactivated for the custom line items with this price mode.
Standard- This is the default mode.
CustomLineItemRecurrenceInfo
The RecurrenceInfo returned in a CustomLineItem
recurrencePolicy | |
recurrencePolicyRef | |
expiresAt |
TaxedPrice
totalNet | Total net price of the Cart or Order. |
totalGross | Total gross price of the Cart or Order. |
taxPortionsArray of TaxPortion | Taxable portions added to the total net price. Calculated from the TaxRates. |
totalTax | Total tax applicable for the Cart or Order. Automatically calculated as the difference between the totalGross and totalNet values. |
DiscountOnTotalPrice
discountedAmount | Money value of the discount on the total price of the Cart or Order. |
includedDiscountsArray of DiscountedTotalPricePortion | Discounts that impact the total price of the Cart or Order. |
discountedNetAmount | Money value of the discount on the total net price of the Cart or Order. The same percentage of discount applies as on the discountedAmount.
Present only when taxedPrice of the Cart or Order exists. |
discountedGrossAmount | Money value of the discount on the total gross price of the Cart or Order. The same percentage of discount applies as on the discountedAmount.
Present only when taxedPrice of the Cart or Order exists. |
DiscountedTotalPricePortion
discount | |
discountRef | |
discountedAmount | Money value of the discount. |
TaxMode
Disabled- No taxes are added to the cart.
External- The tax rates are set externally per ExternalTaxRateDraft. A cart with this tax mode can only be ordered if all line items, all custom line items and the shipping method have an external tax rate set. The totalNet and totalGross as well as the taxPortions fields are calculated according to the taxRoundingMode.
ExternalAmount- The tax amounts and the tax rates as well as the tax portions are set externally per ExternalTaxAmountDraft. A cart with this tax mode can only be ordered if the cart itself and all line items, all custom line items and the shipping method have an external tax amount and rate set
Platform- The tax rates are selected from the TaxCategories based on the cart shipping address. The totalNet and totalGross as well as the taxPortions fields are calculated according to the taxRoundingMode.
RoundingMode
HalfDown- [Round half down](https://en.wikipedia.org/wiki/Rounding#Round_half_down)
HalfEven- [Round half to even](https://en.wikipedia.org/wiki/Rounding#Round_half_to_even). Default rounding mode as used in IEEE 754 computing functions and operators.
HalfUp- [Round half up](https://en.wikipedia.org/wiki/Rounding#Round_half_up)
TaxCalculationMode
LineItemLevel- Default. This calculation mode calculates the taxes after the unit price is multiplied with the quantity. E.g. `($1.08 * 3 = $3.24) * 1.19 = $3.8556 -> $3.86 rounded`
UnitPriceLevel- This calculation mode calculates the taxes on the unit price before multiplying with the quantity. E.g. `($1.08 * 1.19 = $1.2852 -> $1.29 rounded) * 3 = $3.87`
ShippingInfo
shippingMethodNameString | Name of the Shipping Method. |
price | Determined based on the ShippingRate and its tiered prices, and either the sum of LineItem prices or the shippingRateInput field. |
shippingRate | Used to determine the price. |
taxRate | |
deliveriesArray of Delivery | Information on how items are delivered to customers. |
discountedPrice | Discounted price of the Shipping Method. |
shippingMethodState | Indicates whether the ShippingMethod referenced in this ShippingInfo is allowed for the Cart. Can be DoesNotMatchCart, or MatchesCart |
estimatedDelivery | Estimated time window during which the shipment is expected to be delivered.
This value is removed if the Cart's shippingAddress changes. |
messageString | |
shippingMethod | Not set if a custom Shipping Method is used. |
shippingMethodRef | Not set if a custom Shipping Method is used. |
taxCategory | Used to select a Tax Rate when a Cart has the Platform TaxMode. |
taxCategoryRef | Used to select a Tax Rate when a Cart has the Platform TaxMode. |
taxedPrice | Automatically set after the taxRate is set. |
Delivery
Contains information on how items are shipped to Customers, for example, a delivery note.
idString | Unique identifier of the Delivery. |
keyString | User-defined identifier of the Delivery. Unique among Deliveries in the Order. |
createdAt | Date and time (UTC) the Delivery was created. |
itemsArray of DeliveryItem | Line Items or Custom Line Items that are delivered. |
parcelsArray of Parcel | Information regarding the appearance, content, and shipment of a Parcel. |
address | Address to which Parcels are delivered. |
custom | Custom Fields of the Delivery. |
DeliveryItem
idString | |
quantityLong | Quantity of Line Items or Custom Line Items delivered. |
Parcel
Information regarding the appearance, content, and shipment of a Parcel.
idString | Unique identifier of the Parcel. |
keyString | User-defined unique identifier of the Parcel. |
createdAt | Date and time (UTC) the Parcel was created. |
measurements | Information about the dimensions of the Parcel. |
trackingData | Shipment tracking information of the Parcel. |
itemsArray of DeliveryItem | Line Items or Custom Line Items delivered in this Parcel. |
custom | Custom Fields of the Parcel. |
ParcelMeasurements
heightInMillimeterInt | Height of the Parcel. |
lengthInMillimeterInt | Length of the Parcel. |
widthInMillimeterInt | Width of the Parcel. |
weightInGramInt | Weight of the Parcel. |
TrackingData
Information that helps track a Parcel.
trackingIdString | Identifier to track the Parcel. |
carrierString | Name of the carrier that delivers the Parcel. |
providerString | Name of the provider that serves as facade to several carriers. |
providerTransactionString | Transaction identifier with the provider. |
isReturnBoolean | Whether the Parcel is being returned. If false, the Parcel is being delivered to the customer. |
ShippingMethodState
DoesNotMatchCart- The ShippingMethod predicate does not match the cart. Ordering this cart will fail with error ShippingMethodDoesNotMatchCart
MatchesCart- Either there is no predicate defined for the ShippingMethod or the given predicate matches the cart
EstimatedDelivery
Estimated time window during which a shipment is expected to be delivered. The window is anchored to the selected Shipping Method and the shipping destination.
DiscountCodeInfo
discountCodeRef | Discount Code associated with the Cart or Order. |
state | Indicates the state of the Discount Code applied to the Cart or Order. Can beApplicationStoppedByGroupBestDeal, ApplicationStoppedByPreviousDiscount, DoesNotMatchCart, MatchesCart, MaxApplicationReached, NotActive, or NotValid |
discountCode | Discount Code associated with the Cart or Order. |
DiscountCodeState
ApplicationStoppedByGroupBestDealApplicationStoppedByPreviousDiscount- The discount code is active and none of the discounts were applied because the discount application was stopped by one discount that has the StackingMode of StopAfterThisDiscount defined
DoesNotMatchCart- The discount code is active and it contains at least one active and valid CartDiscount. But its cart predicate does not match the cart or none of the contained active discount’s cart predicates match the cart
MatchesCart- The discount code is active and it contains at least one active and valid CartDiscount. The discount code cartPredicate matches the cart and at least one of the contained active discount’s cart predicates matches the cart.
MaxApplicationReached- maxApplications or maxApplicationsPerCustomer for discountCode has been reached.
NotActive- The discount code is not active or it does not contain any active cart discounts.
NotValid- The discount code is not valid or it does not contain any valid cart discounts. Validity is determined based on the validFrom and validUntil dates
DirectDiscount
idString | Unique identifier of the Direct Discount. |
value | Effect of the Discount on the Cart. |
target | Segment of the Cart that is discounted. Absent if the value is giftLineItem. |
participateInBestDealSelectionBoolean |
|
CartDiscountValue
typeString |
CartDiscountTarget
typeString |
ShippingRateInput
typeString |
CartOrigin
Customer- The cart was created by the customer. This is the default value
Merchant- The cart was created by the merchant on behalf of the customer
Quote- The cart was created by our platform and belongs to a Quote.
RecurringOrder- The cart was created by the merchant as a recurring order.
Shipping
shippingKeyString | User-defined unique identifier of the Shipping in a Cart with Multiple ShippingMode. |
shippingInfo | Automatically set when the Shipping Method is added. |
shippingAddress | Determines the shipping rates and Tax Rates of associated Line Items. |
shippingRateInput | Used as an input to select a ShippingRatePriceTier.
The data type of this field depends on the
shippingRateInputType.type configured in the Project:
|
shippingCustomFields | Custom Fields of Shipping with Multiple ShippingMode. |
ShippingMode
Multiple- Allows multiple shipping methods for the cart with their respective shipping addresses
Single- Allows only one shipping method and shipping address for the cart
Placement
InStore- The Order or Cart is placed in-store.
Online- The Order or Cart is placed online.
DiscountTypeCombination
typeString |
OrderState
CancelledCompleteConfirmedOpen
ShipmentState
BackorderCanceledDelayedDeliveredPartialPendingReadyShipped
PaymentState
BalanceDueCreditOwedFailedPaidPending
SyncInfo
Stores information about order synchronization activities (like export or import).
ReturnInfo
Stores information about returns connected to this order.
itemsArray of ReturnItem | Information on the Line Items or Custom Line Items returned. |
returnTrackingIdString | User-defined identifier to track the return. |
returnDate | Date and time (UTC) the return is initiated. |
ReturnItem
typeString | |
idString | |
keyString | |
quantityLong | |
commentString | |
shipmentState | Can be Advised, BackInStock, Returned, or Unusable |
paymentState | Can be Initial, NonRefundable, NotRefunded, or Refunded |
custom | |
lastModifiedAt | |
createdAt |
ReturnShipmentState
AdvisedBackInStockReturnedUnusable
ReturnPaymentState
InitialNonRefundableNotRefundedRefunded
Order Query Result
Input types
OrderCartCommand
idString | |
cart | |
versionLong | |
purchaseOrderNumberString | |
paymentState | Can be BalanceDue, CreditOwed, Failed, Paid, or Pending |
orderState | Can be Cancelled, Complete, Confirmed, or Open |
state | |
shipmentState | Can be Backorder, Canceled, Delayed, Delivered, Partial, Pending, Ready, or Shipped |
orderNumberString | |
custom |
PaymentState
BalanceDueCreditOwedFailedPaidPending
OrderState
CancelledCompleteConfirmedOpen
ShipmentState
BackorderCanceledDelayedDeliveredPartialPendingReadyShipped
OrderQuoteCommand
quote | |
versionLong | |
quoteStateToAcceptedBoolean | Default: false |
paymentState | Can be BalanceDue, CreditOwed, Failed, Paid, or Pending |
orderState | Can be Cancelled, Complete, Confirmed, or Open |
state | |
shipmentState | Can be Backorder, Canceled, Delayed, Delivered, Partial, Pending, Ready, or Shipped |
orderNumberString | |
custom |
PaymentState
BalanceDueCreditOwedFailedPaidPending
OrderState
CancelledCompleteConfirmedOpen
ShipmentState
BackorderCanceledDelayedDeliveredPartialPendingReadyShipped
OrderUpdateAction
addDelivery | |
addItemShippingAddress | |
addParcelToDelivery | |
addPayment | |
addReturnInfo | |
changeOrderState | |
changePaymentState | |
changeShipmentState | |
importCustomLineItemState | |
importLineItemState | |
removeDelivery | |
removeItemShippingAddress | |
removeParcelFromDelivery | |
removePayment | |
setBillingAddress | |
setBillingAddressCustomField | |
setBillingAddressCustomType | |
setCustomField | |
setCustomLineItemCustomField | |
setCustomLineItemCustomType | |
setCustomLineItemShippingDetails | |
setCustomType | |
setCustomerEmail | |
setCustomerId | |
setDeliveryAddress | |
setDeliveryAddressCustomField | |
setDeliveryAddressCustomType | |
setDeliveryCustomField | |
setDeliveryCustomType | |
setDeliveryItems | |
setItemShippingAddressCustomField | |
setItemShippingAddressCustomType | |
setLineItemCustomField | |
setLineItemCustomType | |
setLineItemShippingDetails | |
setLocale | |
setBusinessUnit | |
setOrderNumber | |
setParcelCustomField | |
setParcelCustomType | |
setParcelItems | |
setParcelMeasurements | |
setParcelTrackingData | |
setPurchaseOrderNumber | |
setReturnInfo | |
setReturnItemCustomField | |
setReturnItemCustomType | |
setReturnPaymentState | |
setReturnShipmentState | |
setShippingAddress | |
setShippingAddressCustomField | |
setShippingAddressCustomType | |
setShippingCustomField | |
setShippingCustomType | |
setStore | |
transitionCustomLineItemState | |
transitionLineItemState | |
transitionState | |
updateItemShippingAddress | |
updateSyncInfo |
Update actions
on Order
Set Order Number
orderNumberString |
Set Purchase Order Number
purchaseOrderNumberString | Value to set. If omitted, any existing value is removed. |
Set Business Unit B2B B2X
businessUnit does not recalculate prices or discounts on the Order.businessUnit | New Business Unit to assign to the Order. If omitted, any existing value is removed. If the referenced Business Unit does not exist, a ReferencedResourceNotFound error is returned. |
Set Customer ID
customerId does not recalculate prices or discounts on the Order.
If the Customer belongs to a Customer Group, customerGroup on the Order is updated automatically.customerIdString | id of an existing Customer.
If omitted, any existing value is removed. |
Set Customer Email
customerEmail on the Order, but it does not change the Customer email on the Cart the Order has been created from.emailString | Value to set. If omitted, any existing value is removed. |
Add Payment
payment | Payment to add to the PaymentInfo.
Must not be assigned to another Order or active Cart already. |
Remove Payment
payment | Payment to remove from the PaymentInfo. |
Change PaymentState
paymentState | New payment status of the Order. Can beBalanceDue, CreditOwed, Failed, Paid, or Pending |
PaymentState
BalanceDueCreditOwedFailedPaidPending
Set Billing Address
billingAddress on the Order, but it does not change the billing address on the referenced Cart from which the Order is created.address | Value to set. It replaces the entire address, including Custom Fields if
custom is not included. To preserve Custom Fields, include the custom object in the request.If omitted, any existing value is removed. |
Set Shipping Address
shippingAddress on the Order, but it does not change the shipping address on the referenced Cart from which the Order is created.
Also, it does not recalculate the Cart as taxes may not fit to the shipping address anymore.address | Value to set. It replaces the entire address, including Custom Fields if
custom is not included. To preserve Custom Fields, include the custom object in the request.If omitted, any existing value is removed. |
Add ItemShippingAddress
itemShippingAddresses of an Order. Use this action when shipping is defined per item. For example, when shipping items to multiple addresses or when using different Shipping Methods, even if all items share the same address.address | Address to append to itemShippingAddresses.
The new Address must have a key that is unique across this Order. |
Remove ItemShippingAddress
addressKey first using the Set LineItemShippingDetails update action, before you remove the obsolete address.addressKeyString | key of the Address to remove from itemShippingAddresses. |
Update ItemShippingAddress
itemShippingAddresses by keeping the Address key.address | The new Address with the same key as the Address it will replace. |
Add Delivery
shippingInfo (for shippingMode = Single), or its shipping (for shippingMode = Multiple) exists.deliveryKeyString | key of an existing Delivery. |
itemsArray of DeliveryItemDraftType | Line Items or Custom Line Items to be included in the Delivery. Default:[] |
parcelsArray of ParcelDataDraftType | Parcels of the Delivery. If provided, this update action produces the Parcel Added To Delivery Message. Default: [] |
address | Address the parcels should be delivered to. |
custom | Custom Fields for the Delivery. |
shippingKeyString |
DeliveryItemDraftType
idString | |
quantityLong |
ParcelDataDraftType
keyString | |
measurements | |
trackingData | |
itemsArray of DeliveryItemDraftType | Default: [] |
custom |
ParcelMeasurementsDraftType
heightInMillimeterInt | |
lengthInMillimeterInt | |
widthInMillimeterInt | |
weightInGramInt |
TrackingDataDraftType
trackingIdString | |
carrierString | |
providerString | |
providerTransactionString | |
isReturnBoolean | Default: false |
Remove Delivery
Change ShipmentState
shipmentState | New shipment status of the Order. Can beBackorder, Canceled, Delayed, Delivered, Partial, Pending, Ready, or Shipped |
ShipmentState
BackorderCanceledDelayedDeliveredPartialPendingReadyShipped
Add ReturnInfo
itemsArray of ReturnItemDraftType | Items to be returned. Must not be empty. |
returnDate | Value to set. If not set, it defaults to the current date and time. |
returnTrackingIdString | Value to set. |
ReturnItemDraftType
keyString | |
quantityLong | |
lineItemIdString | |
customLineItemIdString | |
commentString | |
shipmentState | Can be Advised, BackInStock, Returned, or Unusable |
custom |
ReturnShipmentState
AdvisedBackInStockReturnedUnusable
Set ReturnInfo
itemsArray of ReturnInfoDraftType | Value to set. If omitted, any existing value is removed. Default:[] |
ReturnInfoDraftType
itemsArray of ReturnItemDraftType | |
returnDate | |
returnTrackingIdString |
ReturnItemDraftType
keyString | |
quantityLong | |
lineItemIdString | |
customLineItemIdString | |
commentString | |
shipmentState | Can be Advised, BackInStock, Returned, or Unusable |
custom |
ReturnShipmentState
AdvisedBackInStockReturnedUnusable
Set ReturnShipmentState
returnItemIdString | |
returnItemKeyString | |
shipmentState | New shipment state of the ReturnItem.
This update action can only transition Return Items from the Can be Returned state to BackInStock or Unusable. The initial Advised and Returned states can only be set at creation time on ReturnItemDraft.Advised, BackInStock, Returned, or Unusable |
ReturnShipmentState
AdvisedBackInStockReturnedUnusable
Set ReturnPaymentState
returnItemIdString | |
returnItemKeyString | |
paymentState | New Payment status of the ReturnItem. Can be Initial, NonRefundable, NotRefunded, or Refunded |
ReturnPaymentState
InitialNonRefundableNotRefundedRefunded
Change OrderState
orderState | Can be Cancelled, Complete, Confirmed, or Open |
OrderState
CancelledCompleteConfirmedOpen
Transition State
transitions, there must be a direct transition to the new State.
If transitions is not set, no validation is performed.state | Value to set. If there is no State yet, the new State must be an initial State. |
forceBoolean | Whether to turn off validation. Default:false |
Update SyncInfo
channel | The synchronization destination to set. Must not be empty.
The referenced Channel must have the Channel Role OrderExport or OrderImport.
Otherwise this update action returns an InvalidInput error. |
syncedAt | If not set, it defaults to the current date and time. |
externalIdString | Set this to identify an external order instance, file, or other resource. |
Set Locale
Set Store
400 error if store references the same Store the Order is currently assigned to, including if you try to remove the value when no Store is currently assigned.store | Value to set. If omitted, any existing value is removed. If store references the same Store the Order is currently assigned to or if you try to remove the value when no Store is currently assigned, a 400 error is returned. |
Set Custom Type
fieldsArray of CustomFieldInput | |
type | |
typeKeyString | |
typeIdString |
Set CustomField
nameString | Name of the Custom Field. |
valueString | If value is absent or null, this field will be removed if it exists.
Removing a field that does not exist returns an InvalidOperation error.
If value is provided, it is set for the field defined by name. |
on LineItem
Set LineItem ShippingDetails
lineItemIdString | |
shippingDetails | Value to set. If omitted, the existing value is removed. |
lineItemKeyString |
ItemShippingDetailsDraftType
targetsArray of ShippingTargetDraftType | Default: [] |
shippingTargetsArray of ShippingMethodTargetDraftType | Default: [] |
itemShippingAddressTargetsArray of ItemShippingAddressTargetDraftType | Default: [] |
ShippingTargetDraftType
quantityLong | |
addressKeyString | |
shippingMethodKeyString |
ShippingMethodTargetDraftType
quantityLong | |
shippingMethodKeyString |
ItemShippingAddressTargetDraftType
quantityLong | |
addressKeyString |
Set LineItem Custom Type
lineItemIdString | |
fieldsArray of CustomFieldInput | |
type | |
typeKeyString | |
typeIdString | |
lineItemKeyString |
Set LineItem CustomField
lineItemIdString | |
nameString | Name of the Custom Field. |
valueString | If value is absent or null, this field will be removed if it exists.
Removing a field that does not exist returns an InvalidOperation error.
If value is provided, it is set for the field defined by name. |
lineItemKeyString |
Transition LineItem State
Import LineItem State
quantity in the ItemStates must match the sum of all Line Items states' quantities.lineItemIdString | |
lineItemKeyString | |
stateArray of ItemStateDraftType | New status of the Line Items. |
ItemStateDraftType
quantityLong | |
state |
on Custom LineItem
Set CustomLineItem ShippingDetails
customLineItemIdString | |
customLineItemKeyString | |
shippingDetails | Value to set. If omitted, any existing value is removed. |
ItemShippingDetailsDraftType
targetsArray of ShippingTargetDraftType | Default: [] |
shippingTargetsArray of ShippingMethodTargetDraftType | Default: [] |
itemShippingAddressTargetsArray of ItemShippingAddressTargetDraftType | Default: [] |
ShippingTargetDraftType
quantityLong | |
addressKeyString | |
shippingMethodKeyString |
ShippingMethodTargetDraftType
quantityLong | |
shippingMethodKeyString |
ItemShippingAddressTargetDraftType
quantityLong | |
addressKeyString |
Transition CustomLineItem State
customLineItemIdString | |
customLineItemKeyString | |
quantityLong | Quantity of Custom Line Items that should transition State. |
fromState | State the Custom Line Item should transition from. |
toState | State the Custom Line Item should transition to. |
actualTransitionDate | Date and time (UTC) to perform the State transition. |
Import CustomLineItem State
quantity in the ItemStates must match the sum of all Custom Line Item states' quantities.customLineItemIdString | |
customLineItemKeyString | |
stateArray of ItemStateDraftType | New status of the Custom Line Items. |
ItemStateDraftType
quantityLong | |
state |
Set CustomLineItem Custom Type
customLineItemIdString | |
customLineItemKeyString | |
fieldsArray of CustomFieldInput | |
type | |
typeKeyString | |
typeIdString |
Set CustomLineItem CustomField
customLineItemIdString | |
customLineItemKeyString | |
nameString | Name of the Custom Field. |
valueString | If value is absent or null, this field will be removed if it exists.
Removing a field that does not exist returns an InvalidOperation error.
If value is provided, it is set for the field defined by name. |
on Billing Address
Set Billing Address Custom Type
fieldsArray of CustomFieldInput | |
type | |
typeKeyString | |
typeIdString |
Set Billing Address CustomField
nameString | Name of the Custom Field. |
valueString | If value is absent or null, this field will be removed if it exists.
Removing a field that does not exist returns an InvalidOperation error.
If value is provided, it is set for the field defined by name. |
on Shipping Address
Set Shipping Address Custom Type
fieldsArray of CustomFieldInput | |
type | |
typeKeyString | |
typeIdString |
Set Shipping Address CustomField
nameString | Name of the Custom Field. |
valueString | If value is absent or null, this field will be removed if it exists.
Removing a field that does not exist returns an InvalidOperation error.
If value is provided, it is set for the field defined by name. |
on ItemShipping Address
Set ItemShipping Address Custom Type
addressKeyString | |
fieldsArray of CustomFieldInput | |
type | |
typeKeyString | |
typeIdString |
Set ItemShipping Address CustomField
addressKeyString | |
nameString | Name of the Custom Field. |
valueString | If value is absent or null, this field will be removed if it exists.
Removing a field that does not exist returns an InvalidOperation error.
If value is provided, it is set for the field defined by name. |
on Shipping
Set Shipping Custom Type
shippingKeyString | |
fieldsArray of CustomFieldInput | |
type | |
typeKeyString | |
typeIdString |
Set Shipping CustomField
shippingKeyString | The shippingKey of the Shipping to customize. Used to specify which Shipping Method to customize
on a Order with Multiple ShippingMode.
Leave this empty to customize the one and only ShippingMethod on a Single ShippingMode Order. |
nameString | Name of the Custom Field. |
valueString | If value is absent or null, this field will be removed if it exists.
Trying to remove a field that does not exist will fail with an InvalidOperation error.
If value is provided, it is set for the field defined by name. |
on Delivery
Set Delivery Address
deliveryIdString | id of an existing Delivery.Either deliveryId or deliveryKey must be provided. |
deliveryKeyString | key of an existing Delivery.Either deliveryId or deliveryKey must be provided. |
address | Value to set. It replaces the entire address, including Custom Fields if
custom is not included. To preserve Custom Fields, include the custom object in the request.If omitted, any existing value is removed. |
Add Parcel to Delivery
deliveryIdString | id of an existing Delivery.Either deliveryId or deliveryKey must be provided. |
deliveryKeyString | key of an existing Delivery.Either deliveryId or deliveryKey must be provided. |
parcelKeyString | key of an existing Parcel. |
measurements | Value to set. |
trackingData | Value to set. |
itemsArray of DeliveryItemDraftType | Value to set. Default:[] |
custom | Custom Fields for the Parcel. |
ParcelMeasurementsDraftType
heightInMillimeterInt | |
lengthInMillimeterInt | |
widthInMillimeterInt | |
weightInGramInt |
TrackingDataDraftType
trackingIdString | |
carrierString | |
providerString | |
providerTransactionString | |
isReturnBoolean | Default: false |
DeliveryItemDraftType
idString | |
quantityLong |
Remove Parcel from Delivery
Set Delivery Items
deliveryIdString | id of an existing Delivery.Either deliveryId or deliveryKey must be provided. |
deliveryKeyString | key of an existing Delivery.Either deliveryId or deliveryKey must be provided. |
itemsArray of DeliveryItemDraftType | Value to set. Set to an empty array to remove any existing value. |
DeliveryItemDraftType
idString | |
quantityLong |
Set Delivery Custom Type
fieldsArray of CustomFieldInput | |
type | |
typeKeyString | |
typeIdString | |
deliveryIdString | |
deliveryKeyString |
Set Delivery CustomField
nameString | Name of the Custom Field. |
valueString | If value is absent or null, this field will be removed if it exists.
Removing a field that does not exist returns an InvalidOperation error.
If value is provided, it is set for the field defined by name. |
deliveryIdString | id of an existing Delivery.Either deliveryId or deliveryKey must be provided. |
deliveryKeyString | key of an existing Delivery.Either deliveryId or deliveryKey must be provided. |
on Parcel
Set Parcel Measurements
ParcelMeasurementsDraftType
heightInMillimeterInt | |
lengthInMillimeterInt | |
widthInMillimeterInt | |
weightInGramInt |
Set Parcel Tracking Data
TrackingDataDraftType
trackingIdString | |
carrierString | |
providerString | |
providerTransactionString | |
isReturnBoolean | Default: false |
Set Parcel Items
parcelIdString | id of an existing Parcel.Either parcelId or parcelKey must be provided. |
parcelKeyString | key of an existing Parcel.Either parcelId or parcelKey must be provided. |
itemsArray of DeliveryItemDraftType | Value to set. Set to an empty array to remove any existing value. |
DeliveryItemDraftType
idString | |
quantityLong |
Set Parcel Custom Type
fieldsArray of CustomFieldInput | |
type | |
typeKeyString | |
typeIdString | |
parcelIdString | |
parcelKeyString |
Set Parcel CustomField
nameString | Name of the Custom Field. |
valueString | If value is absent or null, this field will be removed if it exists.
Removing a field that does not exist returns an InvalidOperation error.
If value is provided, it is set for the field defined by name. |
parcelIdString | id of an existing Parcel.Either parcelId or parcelKey must be provided. |
parcelKeyString | key of an existing Parcel.Either parcelId or parcelKey must be provided. |
on Delivery Address
Set Delivery Address Custom Type
deliveryIdString | |
deliveryKeyString | |
fieldsArray of CustomFieldInput | |
type | |
typeKeyString | |
typeIdString |
Set Delivery Address CustomField
deliveryIdString | id of an existing Delivery.Either deliveryId or deliveryKey must be provided. |
deliveryKeyString | key of an existing Delivery.Either deliveryId or deliveryKey must be provided. |
nameString | Name of the Custom Field. |
valueString | If value is absent or null, this field will be removed if it exists.
Removing a field that does not exist returns an InvalidOperation error.
If value is provided, it is set for the field defined by name. |
on ReturnItem
Set ReturnItem Custom Type
fieldsArray of CustomFieldInput | |
type | |
typeKeyString | |
typeIdString | |
returnItemIdString | |
returnItemKeyString |
Set ReturnItem CustomField
nameString | Name of the Custom Field. |
valueString | If value is absent or null, this field will be removed if it exists.
Removing a field that does not exist returns an InvalidOperation error.
If value is provided, it is set for the field defined by name. |
returnItemIdString | |
returnItemKeyString |