Order Edits allow you to make financial changes to the purchase agreement after the Order has been placed.
Order Edits are entities which can hold one or more proposed financial changes to an Order. Before being applied, the Order Edit can be previewed to understand how the changes will affect an Order.
Representations
Representations are JSON objects submitted or received as payload to API requests or responses.
OrderEdit
id ​String​ | Unique identifier of the Order Edit. |
version ​Int​ | Current version of the Order Edit. |
key ​String​ | User-defined unique identifier of the Order Edit. MinLength:Â2 ​MaxLength: 256 ​Pattern: ^[A-Za-z0-9_-]+$ ​ |
resource ​ | Reference to the Order updated with this edit. |
stagedActions ​Array of StagedOrderUpdateAction​ | Update actions applied to the Order referenced by resource . |
result ​ | For applied edits, it's a summary of the changes on the Order. For unapplied edits, it's a preview of the changes. |
comment ​String​ | User-defined information regarding the Order Edit. |
custom ​CustomFields​ | Custom Fields of the Order Edit. |
createdAt ​DateTime​ | Date and time (UTC) the Order Edit was initially created. |
createdBy ​BETACreatedBy​ | IDs and references that created the OrderEdit. |
lastModifiedAt ​DateTime​ | Date and time (UTC) the Order Edit was last updated. |
lastModifiedBy ​BETA | IDs and references that last modified the OrderEdit. |
OrderEditDraft
key ​String​ | User-defined unique identifier for the Order Edit. MinLength:Â2 ​MaxLength: 256 ​Pattern: ^[A-Za-z0-9_-]+$ ​ |
resource ​ | Reference to the Order updated with this edit. |
stagedActions ​Array of StagedOrderUpdateAction​ | Update actions to apply to the Order referenced in resource .
Cannot be updated if the edit has been applied. |
comment ​String​ | User-defined description regarding the Order Edit. |
dryRun ​Boolean​ | Set to
true if you want to preview the edited Order first without persisting it (dry run).
A dry run allows checking for potential errors when trying to apply the stagedActions .Order API Extensions, if any, are also called in dry runs. |
custom ​ | Custom Fields for the Order Edit. |
OrderEditPagedQueryResponse
limit ​Int​ | Number of results requested. Default: 20 ​Minimum: 0 ​Maximum: 500 ​ |
offset ​Int​ | Number of elements skipped. Default: 0 ​Maximum: 10000 ​ |
count ​Int​ | Actual number of results returned. |
total ​Int​ | Total number of results matching the query.
This number is an estimation that is not strongly consistent.
This field is returned by default.
For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false .
When the results are filtered with a Query Predicate, total is subject to a limit. |
results ​Array of OrderEdit​ | OrderEdits matching the query. |
OrderEditResult
result
field cannot be queried when the state is PreviewSuccess or PreviewFailure as these results are dynamically generated.OrderEdit NotProcessed
Indicates that the edit has not been applied or processed in any way.
type ​String​ | "NotProcessed" This field is queryable. |
OrderEdit PreviewSuccess
stagedActions
on the current version of the related Order, not from the Order version at the time the OrderEdit was created. Therefore, it cannot be queried.type ​String​ | "PreviewSuccess" |
preview ​StagedOrder​ | A preview of the edited Order as it will be after all stagedActions (incl. optional Order API Extensions) are applied. |
messagePayloads ​Array of MessagePayload​ | Messages that will be generated if the edit is applied. |
resource
field, a race condition can occur if the Order is updated after the preview is calculated but before resource
is expanded. In that case, the preview is based on an older version of the Order.messagePayloads
contains an OrderEditApplied Message with a different Order version than the expanded Order in excerptBeforeEdit
.OrderEdit PreviewFailure
stagedActions
to the Order. The data is calculated on the fly and is not queryable.type ​String​ | "PreviewFailure" |
errors ​Array of ErrorObject​ | Errors returned. |
OrderEdit Applied
stagedActions
to the Order.type ​String​ | "Applied" This field is queryable. |
appliedAt ​DateTime​ | Date and time (UTC) the Order was edited. |
excerptBeforeEdit ​OrderExcerpt​ | Prices of the Order before the edit. |
excerptAfterEdit ​OrderExcerpt​ | Prices of the Order after the edit. |
OrderExcerpt
Excerpt of the Order extracting the total and the taxed price.
version ​Int​ | Current version of the Order. |
totalPrice ​TypedMoney​ | Total price of the Order. |
taxedPrice ​TaxedPrice​ | Taxed price of the Order. |
OrderMessagePayload
Get OrderEdit
Get OrderEdit by ID
id
.view_order_edits:{projectKey}
region String ​ | Region in which the Project is hosted. |
projectKey String ​ | key of the Project. |
id String ​ | id of the OrderEdit. |
expand | The parameter can be passed multiple times. |
application/json
curl --get https://api.{region}.commercetools.com/{projectKey}/orders/edits/{id} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}"
{
"id": "df20c5ea-b114-4aab-b330-740b0e9f3099",
"version": 1,
"resource": {
"typeId": "order",
"id": "ed454f4e-c43a-485f-a86f-046c691b1363"
},
"key": "order-edit-key",
"createdAt": "2018-10-04T15:22:31.639Z",
"lastModifiedAt": "2018-10-04T15:22:31.639Z",
"stagedActions": [
{
"action": "setCustomerEmail",
"email": "user@localhost"
}
],
"result": {
"preview": {
"type": "Order",
"id": "ed454f4e-c43a-485f-a86f-046c691b1363",
"version": 3,
"customerId": "bf5d96ce-4704-45b2-8842-d409dd34cdfc",
"customerEmail": "user@localhost",
"createdAt": "2018-05-15T12:40:17.301Z",
"lastModifiedAt": "2018-05-15T12:40:17.301Z",
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3336,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.19,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "19% MwSt"
}
]
},
"country": "DE",
"orderState": "Open",
"syncInfo": [],
"returnInfo": [],
"refusedGifts": [],
"shippingInfo": {
"shippingMethodName": "DHL",
"price": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 570,
"fractionDigits": 2
},
"shippingRate": {
"price": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 570,
"fractionDigits": 2
},
"tiers": []
},
"taxRate": {
"name": "19% MwSt",
"amount": 0.19,
"includedInPrice": true,
"country": "DE",
"id": "rrsT1Jbw",
"subRates": []
},
"taxCategory": {
"typeId": "tax-category",
"id": "fdeb9625-10f8-476c-a549-5d5c6d1bd412"
},
"deliveries": [],
"shippingMethod": {
"typeId": "shipping-method",
"id": "d18b3f77-92de-4893-b6e3-b5c9c8c1eb96"
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 479,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 570,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.1,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "Bla"
}
]
},
"shippingMethodState": "MatchesCart"
},
"taxMode": "Platform",
"inventoryMode": "None",
"taxRoundingMode": "HalfEven",
"taxCalculationMode": "LineItemLevel",
"origin": "Customer",
"lineItems": [
{
"id": "31099128-dba8-40a7-bb6c-d12857149ff8",
"productId": "d6d0c517-572e-4d26-b80e-ffce825334a4",
"name": {
"en": "GIRLS CREW"
},
"productType": {
"typeId": "product-type",
"id": "6dc75271-b0e5-4ae9-9158-faa1fff65f7b",
"version": 2
},
"productSlug": {
"en": "girls-crew1522841378290"
},
"variant": {
"id": 1,
"sku": "sku_GIRLS_CREW_variant1_1522841378290",
"prices": [
{
"value": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
},
"id": "b5595b13-bbb8-44ab-a2e2-89c18edf1b22"
}
],
"images": [
{
"url": "https://www.commercetools.com/cli/data/253234387_1.jpg",
"dimensions": {
"w": 1400,
"h": 1400
}
}
],
"attributes": [],
"assets": []
},
"price": {
"value": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
},
"id": "b5595b13-bbb8-44ab-a2e2-89c18edf1b22"
},
"quantity": 1,
"discountedPricePerQuantity": [],
"taxRate": {
"name": "19% MwSt",
"amount": 0.19,
"includedInPrice": true,
"country": "DE",
"id": "rrsT1Jbw",
"subRates": []
},
"state": [
{
"quantity": 1,
"state": {
"typeId": "state",
"id": "60a64e06-b4e8-4205-a0f3-94bc203e2d6d"
}
}
],
"priceMode": "Platform",
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 2857,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.1,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "Bla"
}
]
},
"lineItemMode": "Standard",
"perMethodTaxRate": [],
"taxedPricePortions": []
}
],
"customLineItems": [],
"transactionFee": true,
"discountCodes": [],
"cart": {
"typeId": "cart",
"id": "6c97e772-9769-4419-8adc-501c7c5b6088"
},
"shippingAddress": {
"id": "51RkSh-E",
"salutation": "Mr",
"firstName": "user",
"lastName": "lastname",
"streetName": "streetname",
"streetNumber": "2",
"postalCode": "101256",
"city": "Berlin",
"country": "DE",
"building": "34",
"pOBox": "12344",
"email": "user@example.com"
},
"billingAddress": {
"id": "51RkSh-E",
"salutation": "Mr",
"firstName": "user",
"lastName": "lastname",
"streetName": "streetname",
"streetNumber": "2",
"postalCode": "101256",
"city": "Berlin",
"country": "DE",
"building": "34",
"pOBox": "12344",
"email": "user@example.com"
},
"itemShippingAddresses": [],
"shipping": [],
"shippingMode": "Single"
},
"messagePayloads": [
{
"email": "user@localhost",
"type": "OrderCustomerEmailSet"
},
{
"edit": {
"typeId": "order-edit",
"id": "df20c5ea-b114-4aab-b330-740b0e9f3099"
},
"result": {
"type": "Applied",
"appliedAt": "2018-10-04T15:29:14.091Z",
"excerptBeforeEdit": {
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3336,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.19,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "19% MwSt"
}
]
},
"version": 1
},
"excerptAfterEdit": {
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3336,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.19,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "19% MwSt"
}
]
},
"version": 3
}
},
"type": "OrderEditApplied"
}
],
"type": "PreviewSuccess"
},
"comment": "sample-comment"
}
Get OrderEdit by Key
key
.view_order_edits:{projectKey}
region String ​ | Region in which the Project is hosted. |
projectKey String ​ | key of the Project. |
key String ​ | key of the OrderEdit. |
expand | The parameter can be passed multiple times. |
application/json
curl --get https://api.{region}.commercetools.com/{projectKey}/orders/edits/key={key} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}"
{
"id": "df20c5ea-b114-4aab-b330-740b0e9f3099",
"version": 1,
"resource": {
"typeId": "order",
"id": "ed454f4e-c43a-485f-a86f-046c691b1363"
},
"key": "order-edit-key",
"createdAt": "2018-10-04T15:22:31.639Z",
"lastModifiedAt": "2018-10-04T15:22:31.639Z",
"stagedActions": [
{
"action": "setCustomerEmail",
"email": "user@localhost"
}
],
"result": {
"preview": {
"type": "Order",
"id": "ed454f4e-c43a-485f-a86f-046c691b1363",
"version": 3,
"customerId": "bf5d96ce-4704-45b2-8842-d409dd34cdfc",
"customerEmail": "user@localhost",
"createdAt": "2018-05-15T12:40:17.301Z",
"lastModifiedAt": "2018-05-15T12:40:17.301Z",
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3336,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.19,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "19% MwSt"
}
]
},
"country": "DE",
"orderState": "Open",
"syncInfo": [],
"returnInfo": [],
"refusedGifts": [],
"shippingInfo": {
"shippingMethodName": "DHL",
"price": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 570,
"fractionDigits": 2
},
"shippingRate": {
"price": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 570,
"fractionDigits": 2
},
"tiers": []
},
"taxRate": {
"name": "19% MwSt",
"amount": 0.19,
"includedInPrice": true,
"country": "DE",
"id": "rrsT1Jbw",
"subRates": []
},
"taxCategory": {
"typeId": "tax-category",
"id": "fdeb9625-10f8-476c-a549-5d5c6d1bd412"
},
"deliveries": [],
"shippingMethod": {
"typeId": "shipping-method",
"id": "d18b3f77-92de-4893-b6e3-b5c9c8c1eb96"
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 479,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 570,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.1,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "Bla"
}
]
},
"shippingMethodState": "MatchesCart"
},
"taxMode": "Platform",
"inventoryMode": "None",
"taxRoundingMode": "HalfEven",
"taxCalculationMode": "LineItemLevel",
"origin": "Customer",
"lineItems": [
{
"id": "31099128-dba8-40a7-bb6c-d12857149ff8",
"productId": "d6d0c517-572e-4d26-b80e-ffce825334a4",
"name": {
"en": "GIRLS CREW"
},
"productType": {
"typeId": "product-type",
"id": "6dc75271-b0e5-4ae9-9158-faa1fff65f7b",
"version": 2
},
"productSlug": {
"en": "girls-crew1522841378290"
},
"variant": {
"id": 1,
"sku": "sku_GIRLS_CREW_variant1_1522841378290",
"prices": [
{
"value": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
},
"id": "b5595b13-bbb8-44ab-a2e2-89c18edf1b22"
}
],
"images": [
{
"url": "https://www.commercetools.com/cli/data/253234387_1.jpg",
"dimensions": {
"w": 1400,
"h": 1400
}
}
],
"attributes": [],
"assets": []
},
"price": {
"value": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
},
"id": "b5595b13-bbb8-44ab-a2e2-89c18edf1b22"
},
"quantity": 1,
"discountedPricePerQuantity": [],
"taxRate": {
"name": "19% MwSt",
"amount": 0.19,
"includedInPrice": true,
"country": "DE",
"id": "rrsT1Jbw",
"subRates": []
},
"state": [
{
"quantity": 1,
"state": {
"typeId": "state",
"id": "60a64e06-b4e8-4205-a0f3-94bc203e2d6d"
}
}
],
"priceMode": "Platform",
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 2857,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.1,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "Bla"
}
]
},
"lineItemMode": "Standard",
"perMethodTaxRate": [],
"taxedPricePortions": []
}
],
"customLineItems": [],
"transactionFee": true,
"discountCodes": [],
"cart": {
"typeId": "cart",
"id": "6c97e772-9769-4419-8adc-501c7c5b6088"
},
"shippingAddress": {
"id": "51RkSh-E",
"salutation": "Mr",
"firstName": "user",
"lastName": "lastname",
"streetName": "streetname",
"streetNumber": "2",
"postalCode": "101256",
"city": "Berlin",
"country": "DE",
"building": "34",
"pOBox": "12344",
"email": "user@example.com"
},
"billingAddress": {
"id": "51RkSh-E",
"salutation": "Mr",
"firstName": "user",
"lastName": "lastname",
"streetName": "streetname",
"streetNumber": "2",
"postalCode": "101256",
"city": "Berlin",
"country": "DE",
"building": "34",
"pOBox": "12344",
"email": "user@example.com"
},
"itemShippingAddresses": [],
"shipping": [],
"shippingMode": "Single"
},
"messagePayloads": [
{
"email": "user@localhost",
"type": "OrderCustomerEmailSet"
},
{
"edit": {
"typeId": "order-edit",
"id": "df20c5ea-b114-4aab-b330-740b0e9f3099"
},
"result": {
"type": "Applied",
"appliedAt": "2018-10-04T15:29:14.091Z",
"excerptBeforeEdit": {
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3336,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.19,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "19% MwSt"
}
]
},
"version": 1
},
"excerptAfterEdit": {
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3336,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.19,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "19% MwSt"
}
]
},
"version": 3
}
},
"type": "OrderEditApplied"
}
],
"type": "PreviewSuccess"
},
"comment": "sample-comment"
}
Query OrderEdits
Retrieves OrderEdits in the Project.
view_order_edits:{projectKey}
region String ​ | Region in which the Project is hosted. |
projectKey String ​ | key of the Project. |
where | The parameter can be passed multiple times. |
sort | The parameter can be passed multiple times. |
expand | The parameter can be passed multiple times. |
limit Int ​ | Number of results requested. Default: 20 ​Minimum: 0 ​Maximum: 500 ​ |
offset Int ​ | Number of elements skipped. Default: 0 ​Maximum: 10000 ​ |
withTotal Boolean ​ | Controls the calculation of the total number of query results. Set to false to improve query performance when the total is not needed.Default: true ​ |
var.<varName> String ​ | Predicate parameter values. The parameter can be passed multiple times. |
application/json
curl --get https://api.{region}.commercetools.com/{projectKey}/orders/edits -i \
--header "Authorization: Bearer ${BEARER_TOKEN}"
{
"limit": 20,
"offset": 0,
"count": 1,
"total": 1,
"results": [
{
"id": "df20c5ea-b114-4aab-b330-740b0e9f3099",
"version": 1,
"resource": {
"typeId": "order",
"id": "ed454f4e-c43a-485f-a86f-046c691b1363"
},
"key": "order-edit-key",
"createdAt": "2018-10-04T15:22:31.639Z",
"lastModifiedAt": "2018-10-04T15:22:31.639Z",
"stagedActions": [
{
"action": "setCustomerEmail",
"email": "user@localhost"
}
],
"result": {
"type": "NotProcessed"
},
"comment": "sample-comment"
}
]
}
Check if OrderEdit exists
Check if OrderEdit exists by ID
id
. Returns a 200 OK
status if the OrderEdit exists or a 404 Not Found
otherwise.view_order_edits:{projectKey}
region String ​ | Region in which the Project is hosted. |
projectKey String ​ | key of the Project. |
id String ​ | id of the OrderEdit. |
curl --head https://api.{region}.commercetools.com/{projectKey}/orders/edits/{id} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}"
Check if OrderEdit exists by Key
key
. Returns a 200 OK
status if the OrderEdit exists or a 404 Not Found
otherwise.view_order_edits:{projectKey}
region String ​ | Region in which the Project is hosted. |
projectKey String ​ | key of the Project. |
key String ​ | key of the OrderEdit. |
curl --head https://api.{region}.commercetools.com/{projectKey}/orders/edits/key={key} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}"
Check if OrderEdit exists by Query Predicate
200 OK
status if any OrderEdits match the query predicate, or a 404 Not Found
otherwise.view_order_edits:{projectKey}
region String ​ | Region in which the Project is hosted. |
projectKey String ​ | key of the Project. |
where | The parameter can be passed multiple times. |
curl --head https://api.{region}.commercetools.com/{projectKey}/orders/edits -i \
--header "Authorization: Bearer ${BEARER_TOKEN}"
Create OrderEdit
Creates an OrderEdit in the Project. You can either create multiple Order Edits for an Order and apply them sequentially to an Order, or create multiple Order Edits parallelly (as alternatives to each other) and apply one of them to the Order.
manage_order_edits:{projectKey}
region String ​ | Region in which the Project is hosted. |
projectKey String ​ | key of the Project. |
expand | The parameter can be passed multiple times. |
application/json
application/json
curl https://api.{region}.commercetools.com/{projectKey}/orders/edits -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" \
--header 'Content-Type: application/json' \
--data-binary @- << DATA
{
"key" : "order-edit-key",
"resource" : {
"typeId" : "order",
"id" : "ed454f4e-c43a-485f-a86f-046c691b1363"
},
"stagedActions" : [ {
"action" : "setCustomerEmail",
"email" : "user@localhost"
} ],
"comment" : "sample-comment"
}
DATA
{
"id": "df20c5ea-b114-4aab-b330-740b0e9f3099",
"version": 1,
"resource": {
"typeId": "order",
"id": "ed454f4e-c43a-485f-a86f-046c691b1363"
},
"key": "order-edit-key",
"createdAt": "2018-10-04T15:22:31.639Z",
"lastModifiedAt": "2018-10-04T15:22:31.639Z",
"stagedActions": [
{
"action": "setCustomerEmail",
"email": "user@localhost"
}
],
"result": {
"preview": {
"type": "Order",
"id": "ed454f4e-c43a-485f-a86f-046c691b1363",
"version": 3,
"customerId": "bf5d96ce-4704-45b2-8842-d409dd34cdfc",
"customerEmail": "user@localhost",
"createdAt": "2018-05-15T12:40:17.301Z",
"lastModifiedAt": "2018-05-15T12:40:17.301Z",
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3336,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.19,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "19% MwSt"
}
]
},
"country": "DE",
"orderState": "Open",
"syncInfo": [],
"returnInfo": [],
"refusedGifts": [],
"shippingInfo": {
"shippingMethodName": "DHL",
"price": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 570,
"fractionDigits": 2
},
"shippingRate": {
"price": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 570,
"fractionDigits": 2
},
"tiers": []
},
"taxRate": {
"name": "19% MwSt",
"amount": 0.19,
"includedInPrice": true,
"country": "DE",
"id": "rrsT1Jbw",
"subRates": []
},
"taxCategory": {
"typeId": "tax-category",
"id": "fdeb9625-10f8-476c-a549-5d5c6d1bd412"
},
"deliveries": [],
"shippingMethod": {
"typeId": "shipping-method",
"id": "d18b3f77-92de-4893-b6e3-b5c9c8c1eb96"
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 479,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 570,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.1,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "Bla"
}
]
},
"shippingMethodState": "MatchesCart"
},
"taxMode": "Platform",
"inventoryMode": "None",
"taxRoundingMode": "HalfEven",
"taxCalculationMode": "LineItemLevel",
"origin": "Customer",
"lineItems": [
{
"id": "31099128-dba8-40a7-bb6c-d12857149ff8",
"productId": "d6d0c517-572e-4d26-b80e-ffce825334a4",
"name": {
"en": "GIRLS CREW"
},
"productType": {
"typeId": "product-type",
"id": "6dc75271-b0e5-4ae9-9158-faa1fff65f7b",
"version": 2
},
"productSlug": {
"en": "girls-crew1522841378290"
},
"variant": {
"id": 1,
"sku": "sku_GIRLS_CREW_variant1_1522841378290",
"prices": [
{
"value": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
},
"id": "b5595b13-bbb8-44ab-a2e2-89c18edf1b22"
}
],
"images": [
{
"url": "https://www.commercetools.com/cli/data/253234387_1.jpg",
"dimensions": {
"w": 1400,
"h": 1400
}
}
],
"attributes": [],
"assets": []
},
"price": {
"value": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
},
"id": "b5595b13-bbb8-44ab-a2e2-89c18edf1b22"
},
"quantity": 1,
"discountedPricePerQuantity": [],
"taxRate": {
"name": "19% MwSt",
"amount": 0.19,
"includedInPrice": true,
"country": "DE",
"id": "rrsT1Jbw",
"subRates": []
},
"state": [
{
"quantity": 1,
"state": {
"typeId": "state",
"id": "60a64e06-b4e8-4205-a0f3-94bc203e2d6d"
}
}
],
"priceMode": "Platform",
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 2857,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.1,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "Bla"
}
]
},
"lineItemMode": "Standard",
"perMethodTaxRate": [],
"taxedPricePortions": []
}
],
"customLineItems": [],
"transactionFee": true,
"discountCodes": [],
"cart": {
"typeId": "cart",
"id": "6c97e772-9769-4419-8adc-501c7c5b6088"
},
"shippingAddress": {
"id": "51RkSh-E",
"salutation": "Mr",
"firstName": "user",
"lastName": "lastname",
"streetName": "streetname",
"streetNumber": "2",
"postalCode": "101256",
"city": "Berlin",
"country": "DE",
"building": "34",
"pOBox": "12344",
"email": "user@example.com"
},
"billingAddress": {
"id": "51RkSh-E",
"salutation": "Mr",
"firstName": "user",
"lastName": "lastname",
"streetName": "streetname",
"streetNumber": "2",
"postalCode": "101256",
"city": "Berlin",
"country": "DE",
"building": "34",
"pOBox": "12344",
"email": "user@example.com"
},
"itemShippingAddresses": [],
"shipping": [],
"shippingMode": "Single"
},
"messagePayloads": [
{
"email": "user@localhost",
"type": "OrderCustomerEmailSet"
},
{
"edit": {
"typeId": "order-edit",
"id": "df20c5ea-b114-4aab-b330-740b0e9f3099"
},
"result": {
"type": "Applied",
"appliedAt": "2018-10-04T15:29:14.091Z",
"excerptBeforeEdit": {
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3336,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.19,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "19% MwSt"
}
]
},
"version": 1
},
"excerptAfterEdit": {
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3336,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.19,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "19% MwSt"
}
]
},
"version": 3
}
},
"type": "OrderEditApplied"
}
],
"type": "PreviewSuccess"
},
"comment": "sample-comment"
}
Update OrderEdit
Update OrderEdit by ID
manage_order_edits:{projectKey}
region String ​ | Region in which the Project is hosted. |
projectKey String ​ | key of the Project. |
id String ​ | id of the OrderEdit. |
expand | The parameter can be passed multiple times. |
application/json
version ​Int​ | Expected version of the Order Edit on which the changes should be applied.
If the expected version does not match the actual version, a ConcurrentModification error will be returned. |
actions ​Array of OrderEditUpdateAction​ | Update actions to be performed on the Order Edit. |
dryRun ​Boolean​ | If set to true , the Order Edit is applied on the Order without persisting it. |
application/json
curl https://api.{region}.commercetools.com/{projectKey}/orders/edits/{id} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" \
--header 'Content-Type: application/json' \
--data-binary @- << DATA
{
"version" : 7,
"actions" : [ {
"action" : "setKey",
"key" : "another-key"
}, {
"action" : "addStagedAction",
"stagedAction" : {
"action" : "setCountry",
"country" : "ES"
}
} ]
}
DATA
{
"id": "df20c5ea-b114-4aab-b330-740b0e9f3099",
"version": 1,
"resource": {
"typeId": "order",
"id": "ed454f4e-c43a-485f-a86f-046c691b1363"
},
"key": "order-edit-key",
"createdAt": "2018-10-04T15:22:31.639Z",
"lastModifiedAt": "2018-10-04T15:22:31.639Z",
"stagedActions": [
{
"action": "setCustomerEmail",
"email": "user@localhost"
}
],
"result": {
"preview": {
"type": "Order",
"id": "ed454f4e-c43a-485f-a86f-046c691b1363",
"version": 3,
"customerId": "bf5d96ce-4704-45b2-8842-d409dd34cdfc",
"customerEmail": "user@localhost",
"createdAt": "2018-05-15T12:40:17.301Z",
"lastModifiedAt": "2018-05-15T12:40:17.301Z",
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3336,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.19,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "19% MwSt"
}
]
},
"country": "DE",
"orderState": "Open",
"syncInfo": [],
"returnInfo": [],
"refusedGifts": [],
"shippingInfo": {
"shippingMethodName": "DHL",
"price": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 570,
"fractionDigits": 2
},
"shippingRate": {
"price": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 570,
"fractionDigits": 2
},
"tiers": []
},
"taxRate": {
"name": "19% MwSt",
"amount": 0.19,
"includedInPrice": true,
"country": "DE",
"id": "rrsT1Jbw",
"subRates": []
},
"taxCategory": {
"typeId": "tax-category",
"id": "fdeb9625-10f8-476c-a549-5d5c6d1bd412"
},
"deliveries": [],
"shippingMethod": {
"typeId": "shipping-method",
"id": "d18b3f77-92de-4893-b6e3-b5c9c8c1eb96"
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 479,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 570,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.1,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "Bla"
}
]
},
"shippingMethodState": "MatchesCart"
},
"taxMode": "Platform",
"inventoryMode": "None",
"taxRoundingMode": "HalfEven",
"taxCalculationMode": "LineItemLevel",
"origin": "Customer",
"lineItems": [
{
"id": "31099128-dba8-40a7-bb6c-d12857149ff8",
"productId": "d6d0c517-572e-4d26-b80e-ffce825334a4",
"name": {
"en": "GIRLS CREW"
},
"productType": {
"typeId": "product-type",
"id": "6dc75271-b0e5-4ae9-9158-faa1fff65f7b",
"version": 2
},
"productSlug": {
"en": "girls-crew1522841378290"
},
"variant": {
"id": 1,
"sku": "sku_GIRLS_CREW_variant1_1522841378290",
"prices": [
{
"value": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
},
"id": "b5595b13-bbb8-44ab-a2e2-89c18edf1b22"
}
],
"images": [
{
"url": "https://www.commercetools.com/cli/data/253234387_1.jpg",
"dimensions": {
"w": 1400,
"h": 1400
}
}
],
"attributes": [],
"assets": []
},
"price": {
"value": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
},
"id": "b5595b13-bbb8-44ab-a2e2-89c18edf1b22"
},
"quantity": 1,
"discountedPricePerQuantity": [],
"taxRate": {
"name": "19% MwSt",
"amount": 0.19,
"includedInPrice": true,
"country": "DE",
"id": "rrsT1Jbw",
"subRates": []
},
"state": [
{
"quantity": 1,
"state": {
"typeId": "state",
"id": "60a64e06-b4e8-4205-a0f3-94bc203e2d6d"
}
}
],
"priceMode": "Platform",
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 2857,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.1,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "Bla"
}
]
},
"lineItemMode": "Standard",
"perMethodTaxRate": [],
"taxedPricePortions": []
}
],
"customLineItems": [],
"transactionFee": true,
"discountCodes": [],
"cart": {
"typeId": "cart",
"id": "6c97e772-9769-4419-8adc-501c7c5b6088"
},
"shippingAddress": {
"id": "51RkSh-E",
"salutation": "Mr",
"firstName": "user",
"lastName": "lastname",
"streetName": "streetname",
"streetNumber": "2",
"postalCode": "101256",
"city": "Berlin",
"country": "DE",
"building": "34",
"pOBox": "12344",
"email": "user@example.com"
},
"billingAddress": {
"id": "51RkSh-E",
"salutation": "Mr",
"firstName": "user",
"lastName": "lastname",
"streetName": "streetname",
"streetNumber": "2",
"postalCode": "101256",
"city": "Berlin",
"country": "DE",
"building": "34",
"pOBox": "12344",
"email": "user@example.com"
},
"itemShippingAddresses": [],
"shipping": [],
"shippingMode": "Single"
},
"messagePayloads": [
{
"email": "user@localhost",
"type": "OrderCustomerEmailSet"
},
{
"edit": {
"typeId": "order-edit",
"id": "df20c5ea-b114-4aab-b330-740b0e9f3099"
},
"result": {
"type": "Applied",
"appliedAt": "2018-10-04T15:29:14.091Z",
"excerptBeforeEdit": {
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3336,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.19,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "19% MwSt"
}
]
},
"version": 1
},
"excerptAfterEdit": {
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3336,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.19,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "19% MwSt"
}
]
},
"version": 3
}
},
"type": "OrderEditApplied"
}
],
"type": "PreviewSuccess"
},
"comment": "sample-comment"
}
Update OrderEdit by Key
manage_order_edits:{projectKey}
region String ​ | Region in which the Project is hosted. |
projectKey String ​ | key of the Project. |
key String ​ | key of the OrderEdit. |
expand | The parameter can be passed multiple times. |
application/json
version ​Int​ | Expected version of the Order Edit on which the changes should be applied.
If the expected version does not match the actual version, a ConcurrentModification error will be returned. |
actions ​Array of OrderEditUpdateAction​ | Update actions to be performed on the Order Edit. |
dryRun ​Boolean​ | If set to true , the Order Edit is applied on the Order without persisting it. |
application/json
curl https://api.{region}.commercetools.com/{projectKey}/orders/edits/key={key} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" \
--header 'Content-Type: application/json' \
--data-binary @- << DATA
{
"version" : 7,
"actions" : [ {
"action" : "setKey",
"key" : "another-key"
}, {
"action" : "addStagedAction",
"stagedAction" : {
"action" : "setCountry",
"country" : "ES"
}
} ]
}
DATA
{
"id": "df20c5ea-b114-4aab-b330-740b0e9f3099",
"version": 1,
"resource": {
"typeId": "order",
"id": "ed454f4e-c43a-485f-a86f-046c691b1363"
},
"key": "order-edit-key",
"createdAt": "2018-10-04T15:22:31.639Z",
"lastModifiedAt": "2018-10-04T15:22:31.639Z",
"stagedActions": [
{
"action": "setCustomerEmail",
"email": "user@localhost"
}
],
"result": {
"preview": {
"type": "Order",
"id": "ed454f4e-c43a-485f-a86f-046c691b1363",
"version": 3,
"customerId": "bf5d96ce-4704-45b2-8842-d409dd34cdfc",
"customerEmail": "user@localhost",
"createdAt": "2018-05-15T12:40:17.301Z",
"lastModifiedAt": "2018-05-15T12:40:17.301Z",
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3336,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.19,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "19% MwSt"
}
]
},
"country": "DE",
"orderState": "Open",
"syncInfo": [],
"returnInfo": [],
"refusedGifts": [],
"shippingInfo": {
"shippingMethodName": "DHL",
"price": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 570,
"fractionDigits": 2
},
"shippingRate": {
"price": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 570,
"fractionDigits": 2
},
"tiers": []
},
"taxRate": {
"name": "19% MwSt",
"amount": 0.19,
"includedInPrice": true,
"country": "DE",
"id": "rrsT1Jbw",
"subRates": []
},
"taxCategory": {
"typeId": "tax-category",
"id": "fdeb9625-10f8-476c-a549-5d5c6d1bd412"
},
"deliveries": [],
"shippingMethod": {
"typeId": "shipping-method",
"id": "d18b3f77-92de-4893-b6e3-b5c9c8c1eb96"
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 479,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 570,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.1,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "Bla"
}
]
},
"shippingMethodState": "MatchesCart"
},
"taxMode": "Platform",
"inventoryMode": "None",
"taxRoundingMode": "HalfEven",
"taxCalculationMode": "LineItemLevel",
"origin": "Customer",
"lineItems": [
{
"id": "31099128-dba8-40a7-bb6c-d12857149ff8",
"productId": "d6d0c517-572e-4d26-b80e-ffce825334a4",
"name": {
"en": "GIRLS CREW"
},
"productType": {
"typeId": "product-type",
"id": "6dc75271-b0e5-4ae9-9158-faa1fff65f7b",
"version": 2
},
"productSlug": {
"en": "girls-crew1522841378290"
},
"variant": {
"id": 1,
"sku": "sku_GIRLS_CREW_variant1_1522841378290",
"prices": [
{
"value": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
},
"id": "b5595b13-bbb8-44ab-a2e2-89c18edf1b22"
}
],
"images": [
{
"url": "https://www.commercetools.com/cli/data/253234387_1.jpg",
"dimensions": {
"w": 1400,
"h": 1400
}
}
],
"attributes": [],
"assets": []
},
"price": {
"value": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
},
"id": "b5595b13-bbb8-44ab-a2e2-89c18edf1b22"
},
"quantity": 1,
"discountedPricePerQuantity": [],
"taxRate": {
"name": "19% MwSt",
"amount": 0.19,
"includedInPrice": true,
"country": "DE",
"id": "rrsT1Jbw",
"subRates": []
},
"state": [
{
"quantity": 1,
"state": {
"typeId": "state",
"id": "60a64e06-b4e8-4205-a0f3-94bc203e2d6d"
}
}
],
"priceMode": "Platform",
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 2857,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.1,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "Bla"
}
]
},
"lineItemMode": "Standard",
"perMethodTaxRate": [],
"taxedPricePortions": []
}
],
"customLineItems": [],
"transactionFee": true,
"discountCodes": [],
"cart": {
"typeId": "cart",
"id": "6c97e772-9769-4419-8adc-501c7c5b6088"
},
"shippingAddress": {
"id": "51RkSh-E",
"salutation": "Mr",
"firstName": "user",
"lastName": "lastname",
"streetName": "streetname",
"streetNumber": "2",
"postalCode": "101256",
"city": "Berlin",
"country": "DE",
"building": "34",
"pOBox": "12344",
"email": "user@example.com"
},
"billingAddress": {
"id": "51RkSh-E",
"salutation": "Mr",
"firstName": "user",
"lastName": "lastname",
"streetName": "streetname",
"streetNumber": "2",
"postalCode": "101256",
"city": "Berlin",
"country": "DE",
"building": "34",
"pOBox": "12344",
"email": "user@example.com"
},
"itemShippingAddresses": [],
"shipping": [],
"shippingMode": "Single"
},
"messagePayloads": [
{
"email": "user@localhost",
"type": "OrderCustomerEmailSet"
},
{
"edit": {
"typeId": "order-edit",
"id": "df20c5ea-b114-4aab-b330-740b0e9f3099"
},
"result": {
"type": "Applied",
"appliedAt": "2018-10-04T15:29:14.091Z",
"excerptBeforeEdit": {
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3336,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.19,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "19% MwSt"
}
]
},
"version": 1
},
"excerptAfterEdit": {
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3336,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.19,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "19% MwSt"
}
]
},
"version": 3
}
},
"type": "OrderEditApplied"
}
],
"type": "PreviewSuccess"
},
"comment": "sample-comment"
}
Update actions
Set Key
action ​String​ | "setKey" |
key ​String​ | Value to set. If empty, any existing value will be removed. |
{
"action": "setKey",
"key": "keyString"
}
Set StagedActions
action ​String​ | "setStagedActions" |
stagedActions ​Array of StagedOrderUpdateAction​ | Value to replace the stagedActions of the Order Edit. |
{
"action": "setStagedActions",
"stagedActions": [
{
"action": "setCountry",
"country": "DE"
}
]
}
Add StagedAction
action ​String​ | "addStagedAction" |
stagedAction ​ | Order update action to append to the stagedActions array. |
{
"action": "addStagedAction",
"stagedAction": {
"action": "setCountry",
"country": "DE"
}
}
Set Comment
action ​String​ | "setComment" |
comment ​String​ | Value to set. If empty, any existing value will be removed. |
{
"action": "setComment",
"comment": "commentString"
}
Set Custom Type
action ​String​ | "setCustomType" |
type ​ | Defines the Type that extends the Order Edit with Custom Fields.
If absent, any existing Type and Custom Fields are removed from the Order Edit. |
fields ​ | Sets the Custom Fields fields for the Order Edit. |
{
"action": "setCustomType",
"type": {
"id": "{{type-id}}",
"typeId": "type"
},
"fields": {
"exampleStringField": "TextString"
}
}
Set CustomField
action ​String​ | "setCustomField" |
name ​String​ | Name of the Custom Field. |
value ​ | 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 . |
{
"action": "setCustomField",
"name": "exampleStringField",
"value": "TextString"
}
StagedOrderUpdateActions
If one or more Line Items do not contain an Embedded Price or Standalone Price that matches the Line Item price selection criteria of the Order, they are removed during Order Edit operations. This scenario can occur when:
- You use the Create Order by Import endpoint. This is because the endpoint does not validate prices during the Order creation process. When the Order is later modified using an Order Edit, the invalid prices are detected, and the corresponding Line Items are removed.
- The price used in the Order is deleted, and no other matching price exists.
You can stage the following update actions to an OrderEdit:
on Order
Set Order Number
action ​String​ | "setOrderNumber" |
orderNumber ​String​ | Value to set. Must be unique across a Project. Once set, the value cannot be changed. |
{
"action": "setOrderNumber",
"orderNumber": "orderNumberString"
}
Set Purchase Order Number
action ​String​ | "setPurchaseOrderNumber" |
purchaseOrderNumber ​String​ | Value to set. |
{
"action": "setPurchaseOrderNumber",
"purchaseOrderNumber": "purchaseOrderNumberString"
}
Set Business Unit B2B
businessUnit
does not recalculate prices or discounts on the Order.action ​String​ | "setBusinessUnit" |
businessUnit ​ | New Business Unit to assign to the Order. If empty, any existing value is removed. If the referenced Business Unit does not exist, a ReferencedResourceNotFound error is returned. |
{
"action": "setBusinessUnit",
"businessUnit": {
"key": "{{business-unit-key}}",
"typeId": "business-unit"
}
}
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.action ​String​ | "setCustomerId" |
customerId ​String​ | id of an existing Customer.
If empty, any existing value is removed. |
{
"action": "setCustomerId",
"customerId": "{{customer-id}}"
}
Set Customer Email
customerEmail
on the Order, but it does not change the Customer email on the Cart the Order has been created from.action ​String​ | "setCustomerEmail" |
email ​String​ | Value to set. If empty, any existing value will be removed. |
{
"action": "setCustomerEmail",
"email": "mail@email.com"
}
Set Customer Group
This update action can only be used if a Customer is not assigned to a Cart. If a Customer is already assigned, the Cart uses the Customer Group of the assigned Customer.
action ​String​ | "setCustomerGroup" |
customerGroup ​ | Value to set. If empty, any existing value is removed. |
{
"action": "setCustomerGroup",
"customerGroup": {
"typeId": "customer-group",
"id": "{{customer-group-id}}"
}
}
Add LineItem
shippingDetails
is set, it is merged. All addresses will be present afterwards and, for address keys present in both shipping details, the quantity will be summed up.
A new Line Item is added when the externalPrice
or externalTotalPrice
is set in this update action.
The LineItem price is set as described in Line Item price selection.priceMode
value for a selected currency and/or country, Customer Group, or Channel, a MatchingPriceNotFound error is returned.action ​String​ | "addLineItem" |
key ​String​ | User-defined unique identifier of the LineItem. MinLength:Â2 ​MaxLength: 256 ​Pattern: ^[a-zA-Z0-9_-] ​ |
productId ​String​ | id of the published Product.Either the productId and variantId , or sku must be provided. |
variantId ​Int​ | id of the ProductVariant in the Product.
If not provided, the Master Variant is used.Either the productId and variantId , or sku must be provided. |
sku ​String​ | SKU of the ProductVariant.
Either the productId and variantId , or sku must be provided. |
quantity ​Int​ | Quantity of the Product Variant to add to the Cart. Default:Â1 ​ |
addedAt ​DateTime​ | Date and time (UTC) the Product Variant is added to the Cart. If not set, it defaults to the current date and time. Optional for backwards compatibility reasons. |
distributionChannel ​ | Used to select a Product Price.
The Channel must have the ProductDistribution ChannelRoleEnum.
If the Cart is bound to a Store with distributionChannels set, the Channel must match one of the Store's distribution channels. |
supplyChannel ​ | Used to identify Inventory entries that must be reserved.
The Channel must have the InventorySupply ChannelRoleEnum. |
externalPrice ​Money​ | |
externalTotalPrice ​ | Sets the LineItem price and totalPrice values, and the priceMode to ExternalTotal LineItemPriceMode. |
externalTaxRate ​ | Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode. If the Cart has Multiple ShippingMode, the Tax Rate is accepted but ignored. |
inventoryMode ​ | Inventory mode specific to the Line Item only, and valid for the entire quantity of the Line Item.
Set only if the inventory mode should be different from the inventoryMode specified on the Cart. |
shippingDetails ​ | Container for Line Item-specific addresses. |
custom ​ | Custom Fields for the Line Item. |
{
"action": "addLineItem",
"sku": "productSKU",
"quantity": 42,
"supplyChannel": {
"typeId": "channel",
"id": "{{channel-id}}"
},
"distributionChannel": {
"typeId": "channel",
"id": "{{channel-id}}"
},
"externalTaxRate": {
"name": "StandardExternalTaxRate",
"amount": 0.19,
"country": "DE",
"state": "Berlin"
},
"shippingDetails": {
"targets": [
{
"addressKey": "AddressKeyStringFromAddress",
"quantity": 2
}
]
}
}
Remove LineItem
action ​String​ | "removeLineItem" |
lineItemId ​String​ | |
lineItemKey ​String​ | |
quantity ​Int​ | New value to set.
If absent or Default: 0 , the Line Item is removed from the Cart.0 ​ |
externalPrice ​Money​ | Sets the LineItem price to the given value when decreasing the quantity of a Line Item with the ExternalPrice LineItemPriceMode. |
externalTotalPrice ​ | Sets the LineItem price and totalPrice to the given value when decreasing the quantity of a Line Item with the ExternalTotal LineItemPriceMode. |
shippingDetailsToRemove ​ | Container for Line Item-specific addresses to remove. |
{
"action": "removeLineItem",
"lineItemId": "{{lineItemId}}",
"quantity": 1
}
Add CustomLineItem
slug
, name
, money
, taxCategory
, state
,
and Custom Fields, then only the quantity of the existing Custom Line Item is increased.
If CustomLineItem shippingDetails
are set, they are merged with the targets
that already exist on the
ItemShippingDetails of the Custom Line Item.
In case of overlapping address keys the ItemShippingTarget quantity
is summed up.action ​String​ | "addCustomLineItem" |
key ​String​ | User-defined unique identifier of the Custom Line Item. MinLength:Â2 ​MaxLength: 256 ​Pattern: ^[a-zA-Z0-9_-] ​ |
money ​Money​ | Money value of the Custom Line Item. The value can be negative. |
name ​ | Name of the Custom Line Item. |
quantity ​Int​ | Number of Custom Line Items to add to the Cart. Default:Â1 ​ |
slug ​String​ | User-defined identifier used in a deep-link URL for the Custom Line Item. It must match the pattern [a-zA-Z0-9_-]{2,256} . |
taxCategory ​ | |
externalTaxRate ​ | An external Tax Rate can be set if the Cart has the External TaxMode. |
shippingDetails ​ | Container for Custom Line Item-specific addresses. |
priceMode ​ |
Standard ​ |
custom ​ | Custom Fields for the Custom Line Item. |
{
"action": "addCustomLineItem",
"name": {
"en": "Name"
},
"quantity": 2,
"money": {
"currencyCode": "EUR",
"centAmount": 4000
},
"slug": "slugString",
"taxCategory": {
"typeId": "tax-category",
"id": "{{tax-category-id}}"
}
}
Remove CustomLineItem
shippingDetails
must be partially removed, use the Change CustomLineItem Quantity update action.action ​String​ | "removeCustomLineItem" |
customLineItemId ​String​ | |
customLineItemKey ​String​ |
{
"action": "removeCustomLineItem",
"customLineItemId": "{{customLineItemId}}"
}
Add Shopping List
action ​String​ | "addShoppingList" |
shoppingList ​ | Shopping List that contains the Line Items to be added. |
distributionChannel ​ | distributionChannel to set for all LineItems that are added to the Cart.
The Channel must have the ProductDistribution ChannelRoleEnum. |
supplyChannel ​ | supplyChannel to set for all LineItems that are added to the Cart.
The Channel must have the InventorySupply ChannelRoleEnum. |
{
"action": "addShoppingList",
"shoppingList": {
"typeId": "shopping-list",
"id": "{{shopping-list-id}}"
}
}
Set Order Total Tax
ExternalAmount
TaxMode.action ​String​ | "setOrderTotalTax" |
externalTotalGross ​Money​ | Total gross amount of the Order (totalNet + taxes). |
externalTaxPortions ​Array of TaxPortionDraft​ | Value to set. |
{
"action": "setOrderTotalTax",
"externalTotalGross": {
"currencyCode": "EUR",
"centAmount": 4000
},
"externalTaxPortions": [
{
"name": "Name",
"rate": 0.19,
"amount": {
"currencyCode": "EUR",
"centAmount": 4000
}
}
]
}
Change TaxMode
- When
External
TaxMode is changed toPlatform
orDisabled
, all previously set external Tax Rates are removed. - When set to
Platform
, Line Items, Custom Line Items, and Shipping Method require a Tax Category with a Tax Rate for the Cart'sshippingAddress
.
action ​String​ | "changeTaxMode" |
taxMode ​TaxMode​ | The new TaxMode. |
{
"action": "changeTaxMode",
"taxMode": "Platform"
}
Change Tax RoundingMode
action ​String​ | "changeTaxRoundingMode" |
taxRoundingMode ​RoundingMode​ | New value to set. |
{
"action": "changeTaxRoundingMode",
"taxRoundingMode": "HalfUp"
}
Change TaxCalculationMode
action ​String​ | "changeTaxCalculationMode" |
taxCalculationMode ​ | New value to set. |
{
"action": "changeTaxCalculationMode",
"taxCalculationMode": "LineItemLevel"
}
Add DiscountCode
action ​String​ | "addDiscountCode" |
code ​String​ | code of a DiscountCode. |
{
"action": "addDiscountCode",
"code": "discountCodeString"
}
Remove DiscountCode
action ​String​ | "removeDiscountCode" |
discountCode ​ | Discount Code to remove from the Cart. |
{
"action": "removeDiscountCode",
"discountCode": {
"typeId": "discount-code",
"id": "{{discount-code-id}}"
}
}
Set DirectDiscounts
action ​String​ | "setDirectDiscounts" |
discounts ​Array of DirectDiscountDraft​ |
|
{
"action": "setDirectDiscounts",
"discounts": [
{
"value": {
"type": "relative",
"permyriad": 1000
},
"target": {
"type": "lineItems",
"predicate": "1=1"
}
}
]
}
Add Payment
action ​String​ | "addPayment" |
payment ​ | Payment to add to the PaymentInfo.
Must not be assigned to another Order or active Cart already. |
{
"action": "addPayment",
"payment": {
"typeId": "payment",
"id": "{{payment-id}}"
}
}
Remove Payment
action ​String​ | "removePayment" |
payment ​ | Payment to remove from the PaymentInfo. |
{
"action": "removePayment",
"payment": {
"typeId": "payment",
"id": "{{payment-id}}"
}
}
Change PaymentState
action ​String​ | "changePaymentState" |
paymentState ​PaymentState​ | New payment status of the Order. |
{
"action": "changePaymentState",
"paymentState": "Paid"
}
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.action ​String​ | "setBillingAddress" |
address ​BaseAddress​ | Value to set. If empty, any existing value is removed. |
{
"action": "setBillingAddress",
"address": {
"key": "exampleKey",
"title": "My Address",
"salutation": "Mr.",
"firstName": "Example",
"lastName": "Person",
"streetName": "Example Street",
"streetNumber": "4711",
"additionalStreetInfo": "Backhouse",
"postalCode": "80933",
"city": "Exemplary City",
"region": "Exemplary Region",
"state": "Exemplary State",
"country": "DE",
"company": "My Company Name",
"department": "Sales",
"building": "Hightower 1",
"apartment": "247",
"pOBox": "2471",
"phone": "+49 89 12345678",
"mobile": "+49 171 2345678",
"email": "email@example.com",
"fax": "+49 89 12345679",
"additionalAddressInfo": "no additional Info",
"externalId": "Information not needed"
}
}
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.action ​String​ | "setShippingAddress" |
address ​BaseAddress​ | Value to set. If empty, any existing value is removed. |
{
"action": "setShippingAddress",
"address": {
"key": "exampleKey",
"title": "My Address",
"salutation": "Mr.",
"firstName": "Example",
"lastName": "Person",
"streetName": "Example Street",
"streetNumber": "4711",
"additionalStreetInfo": "Backhouse",
"postalCode": "80933",
"city": "Exemplary City",
"region": "Exemplary Region",
"state": "Exemplary State",
"country": "DE",
"company": "My Company Name",
"department": "Sales",
"building": "Hightower 1",
"apartment": "247",
"pOBox": "2471",
"phone": "+49 89 12345678",
"mobile": "+49 171 2345678",
"email": "email@example.com",
"fax": "+49 89 12345679",
"additionalAddressInfo": "no additional Info",
"externalId": "Information not needed"
}
}
Add ItemShippingAddress
Adds an address to an Order when shipping to multiple addresses is desired.
action ​String​ | "addItemShippingAddress" |
address ​BaseAddress​ | Address to append to itemShippingAddresses .
The new Address must have a key that is unique across this Order. |
{
"action": "addItemShippingAddress",
"address": {
"key": "exampleKey",
"title": "My Address",
"salutation": "Mr.",
"firstName": "Example",
"lastName": "Person",
"streetName": "Example Street",
"streetNumber": "4711",
"additionalStreetInfo": "Backhouse",
"postalCode": "80933",
"city": "Exemplary City",
"region": "Exemplary Region",
"state": "Exemplary State",
"country": "DE",
"company": "My Company Name",
"department": "Sales",
"building": "Hightower 1",
"apartment": "247",
"pOBox": "2471",
"phone": "+49 89 12345678",
"mobile": "+49 171 2345678",
"email": "email@example.com",
"fax": "+49 89 12345679",
"additionalAddressInfo": "no additional Info",
"externalId": "Information not needed"
}
}
Remove ItemShippingAddress
action ​String​ | "removeItemShippingAddress" |
addressKey ​String​ | key of the Address to remove from itemShippingAddresses . |
{
"action": "removeItemShippingAddress",
"addressKey": "addressKey"
}
Update ItemShippingAddress
itemShippingAddresses
by keeping the Address key
.action ​String​ | "updateItemShippingAddress" |
address ​BaseAddress​ | The new Address with the same key as the Address it will replace. |
{
"action": "updateItemShippingAddress",
"address": {
"key": "exampleKey",
"title": "My Address",
"salutation": "Mr.",
"firstName": "Example",
"lastName": "Person",
"streetName": "Example Street",
"streetNumber": "4711",
"additionalStreetInfo": "Backhouse",
"postalCode": "80933",
"city": "Exemplary City",
"region": "Exemplary Region",
"state": "Exemplary State",
"country": "DE",
"company": "My Company Name",
"department": "Sales",
"building": "Hightower 1",
"apartment": "247",
"pOBox": "2471",
"phone": "+49 89 12345678",
"mobile": "+49 171 2345678",
"email": "email@example.com",
"fax": "+49 89 12345679",
"additionalAddressInfo": "no additional Info",
"externalId": "Information not needed"
}
}
Set ShippingAddress and ShippingMethod
Sets the shipping address and Shipping Method together to prevent an inconsistent state.
action ​String​ | "setShippingAddressAndShippingMethod" |
address ​BaseAddress​ | Value to set for shippingAddress . |
shippingMethod ​ | Value to set. |
externalTaxRate ​ | An external Tax Rate can be set if the Cart has the External TaxMode. |
{
"action": "setShippingAddressAndShippingMethod",
"address": {
"key": "exampleKey",
"title": "My Address",
"salutation": "Mr.",
"firstName": "Example",
"lastName": "Person",
"streetName": "Example Street",
"streetNumber": "4711",
"additionalStreetInfo": "Backhouse",
"postalCode": "80933",
"city": "Exemplary City",
"region": "Exemplary Region",
"state": "Exemplary State",
"country": "DE",
"company": "My Company Name",
"department": "Sales",
"building": "Hightower 1",
"apartment": "247",
"pOBox": "2471",
"phone": "+49 89 12345678",
"mobile": "+49 171 2345678",
"email": "email@example.com",
"fax": "+49 89 12345679",
"additionalAddressInfo": "no additional Info",
"externalId": "Information not needed"
},
"shippingMethod": {
"typeId": "shipping-method",
"id": "shippingMethodId"
}
}
Set ShippingAddress and Custom ShippingMethod
Sets the shipping address and a custom Shipping Method together to prevent an inconsistent state.
action ​String​ | "setShippingAddressAndCustomShippingMethod" |
address ​BaseAddress​ | Value to set for shippingAddress . |
shippingMethodName ​String​ | Value to set. |
shippingRate ​ | Value to set. |
taxCategory ​ | Used to select a Tax Rate when the Order has the Platform TaxMode. |
externalTaxRate ​ | An external Tax Rate can be set if the Cart has the External TaxMode. |
custom ​ | Custom Fields for the custom Shipping Method. |
{
"action": "setShippingAddressAndCustomShippingMethod",
"address": {
"key": "exampleKey",
"title": "My Address",
"salutation": "Mr.",
"firstName": "Example",
"lastName": "Person",
"streetName": "Example Street",
"streetNumber": "4711",
"additionalStreetInfo": "Backhouse",
"postalCode": "80933",
"city": "Exemplary City",
"region": "Exemplary Region",
"state": "Exemplary State",
"country": "DE",
"company": "My Company Name",
"department": "Sales",
"building": "Hightower 1",
"apartment": "247",
"pOBox": "2471",
"phone": "+49 89 12345678",
"mobile": "+49 171 2345678",
"email": "email@example.com",
"fax": "+49 89 12345679",
"additionalAddressInfo": "no additional Info",
"externalId": "Information not needed"
},
"shippingMethodName": "shippingMethodName",
"shippingRate": {
"price": {
"currencyCode": "EUR",
"centAmount": 4000
}
},
"taxCategory": {
"typeId": "tax-category",
"id": "{{tax-category-id}}"
}
}
Set ShippingMethod
Single
ShippingMode and a shippingAddress
.action ​String​ | "setShippingMethod" |
shippingMethod ​ | Value to set. If empty, any existing value will be removed.
If the referenced Shipping Method has a predicate that does not match the Cart, an InvalidOperation error is returned. |
externalTaxRate ​ | An external Tax Rate can be set if the Cart has the External TaxMode. |
{
"action": "setShippingMethod",
"shippingMethod": {
"typeId": "shipping-method",
"id": "shippingMethodId"
}
}
Set Custom ShippingMethod
Single
ShippingMode and a shippingAddress
.shippingMethod
field instead.action ​String​ | "setCustomShippingMethod" |
shippingMethodName ​String​ | Name of the custom Shipping Method. |
shippingRate ​ | Determines the shipping price. |
taxCategory ​ | Tax Category used to determine the Tax Rate when the Cart has the Platform TaxMode. |
externalTaxRate ​ | |
custom ​ | Custom Fields for the custom Shipping Method. |
{
"action": "setCustomShippingMethod",
"shippingMethodName": "shippingMethodName",
"shippingRate": {
"price": {
"currencyCode": "EUR",
"centAmount": 4000
}
},
"taxCategory": {
"typeId": "tax-category",
"id": "{{tax-category-id}}"
},
"externalTaxRate": {
"name": "taxRateName",
"amount": 0.19,
"country": "DE"
}
}
Set ShippingRateInput
action ​String​ | "setShippingRateInput" |
shippingRateInput ​ | The data type of this field depends on the
shippingRateInputType.type configured in the Project:
|
{
"action": "setShippingRateInput",
"shippingRateInput": {
"type": "Classification",
"key": "key"
}
}
Add Delivery
shippingInfo
(for shippingMode
= Single
), or its shipping
(for shippingMode
= Multiple
) exists.action ​String​ | "addDelivery" |
deliveryKey ​String​ | key of an existing Delivery. |
shippingKey ​String​ | |
items ​Array of DeliveryItem​ | Items to be included in the Delivery. |
address ​BaseAddress​ | Address the parcels should be delivered to. |
parcels ​Array of ParcelDraft​ | Parcels of the Delivery. If provided, this update action also produces the Parcel Added To Delivery Message. |
custom ​ | Custom Fields for the Delivery. |
{
"action": "addDelivery",
"items": [
{
"id": "{{lineItemId}}",
"quantity": 2
}
],
"parcels": [
{
"measurements": {
"heightInMillimeter": 11,
"lengthInMillimeter": 11
},
"trackingData": {
"trackingId": "{{trackingId}}",
"carrier": "TNT",
"provider": "providerName",
"providerTransaction": "{{transactionId}}",
"isReturn": false
},
"items": {
"id": "{{lineItemId}}",
"quantity": 2
}
}
],
"address": {
"key": "exampleKey",
"title": "My Address",
"salutation": "Mr.",
"firstName": "Example",
"lastName": "Person",
"streetName": "Example Street",
"streetNumber": "4711",
"additionalStreetInfo": "Backhouse",
"postalCode": "80933",
"city": "Exemplary City",
"region": "Exemplary Region",
"state": "Exemplary State",
"country": "DE",
"company": "My Company Name",
"department": "Sales",
"building": "Hightower 1",
"apartment": "247",
"pOBox": "2471",
"phone": "+49 89 12345678",
"mobile": "+49 171 2345678",
"email": "email@example.com",
"fax": "+49 89 12345679",
"additionalAddressInfo": "no additional Info",
"externalId": "Information not needed"
}
}
Remove Delivery
Change ShipmentState
action ​String​ | "changeShipmentState" |
shipmentState ​ | New shipment status of the Order. |
{
"action": "changeShipmentState",
"shipmentState": "Shipped"
}
Add ReturnInfo
action ​String​ | "addReturnInfo" |
returnTrackingId ​String​ | Value to set. |
items ​Array of ReturnItemDraft​ | Items to be returned. Must not be empty. MinItems:Â1 ​ |
returnDate ​DateTime​ | Value to set. If not set, it defaults to the current date and time. |
{
"action": "addReturnInfo",
"items": {
"quantity": 1,
"lineItemId": "{{lineItemId}}",
"shipmentState": "BackInStock"
},
"returnDate": "2018-10-12T14:00:00.000Z"
}
Set ReturnInfo
action ​String​ | "setReturnInfo" |
items ​Array of ReturnInfoDraft​ | Value to set. If empty, any existing value will be removed. |
{
"action": "setReturnInfo",
"items": [
{
"items": [
{
"quantity": 1,
"lineItemId": "{{lineItemId}}",
"comment": "any comment",
"shipmentState": "Returned"
}
],
"returnTrackingId": "returnTrackingId-example",
"returnDate": "2021-04-30T09:21:15.003Z"
}
]
}
Set ReturnShipmentState
action ​String​ | "setReturnShipmentState" |
returnItemId ​String​ | |
returnItemKey ​String​ | |
shipmentState ​ | New shipment state of the ReturnItem. |
{
"action": "setReturnShipmentState",
"returnItemId": "{{returnItemId}}",
"shipmentState": "Returned"
}
Set ReturnPaymentState
action ​String​ | "setReturnPaymentState" |
returnItemId ​String​ | |
returnItemKey ​String​ | |
paymentState ​ | New Payment status of the ReturnItem. |
{
"action": "setReturnPaymentState",
"returnItemId": "{{returnItemId}}",
"paymentState": "Refunded"
}
Change OrderState
action ​String​ | "changeOrderState" |
orderState ​OrderState​ | New status of the Order. |
{
"action": "changeOrderState",
"orderState": "Open"
}
Transition State
transitions
, there must be a direct transition to the new State. If transitions
is not set, no validation is performed.action ​String​ | "transitionState" |
state ​ | Value to set. If there is no State yet, the new State must be an initial State. |
force ​Boolean​ | Set to true to turn off validation. |
{
"action": "transitionState",
"state": {
"typeId": "state",
"id": "{{state-id}}"
}
}
Update SyncInfo
action ​String​ | "updateSyncInfo" |
externalId ​String​ | Set this to identify an external order instance, file, or other resource. |
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 ​DateTime​ | If not set, it defaults to the current date and time. |
{
"action": "updateSyncInfo",
"channel": {
"typeId": "channel",
"id": "{{channel-id}}"
},
"externalId": "externalId"
}
Set Locale
Set Country
action ​String​ | "setCountry" |
country ​CountryCode​ | Value to set. If empty, any existing value is removed. If the Cart is bound to a Pattern: store , the provided value must be included in the Store's countries .
Otherwise a CountryNotConfiguredInStore error is returned.^[A-Z]{2}$ ​ |
{
"action": "setCountry",
"country": "DE"
}
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.action ​String​ | "setStore" |
store ​ | Value to set. If empty, any existing value will be 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. |
{
"action": "setStore",
"store": {
"key": "{{store-key}}",
"typeId": "store"
}
}
Set Custom Type
action ​String​ | "setCustomType" |
type ​ | Defines the Type that extends the Order Edit with Custom Fields.
If absent, any existing Type and Custom Fields are removed from the Order Edit. |
fields ​ | Sets the Custom Fields fields for the Order Edit. |
{
"action": "setCustomType",
"type": {
"id": "{{type-id}}",
"typeId": "type"
},
"fields": {
"exampleStringField": "TextString"
}
}
Set CustomField
action ​String​ | "setCustomField" |
name ​String​ | Name of the Custom Field. |
value ​ | 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 . |
{
"action": "setCustomField",
"name": "exampleStringField",
"value": "TextString"
}
on Line Item
Change LineItem Quantity
shippingDetails
field is kept in its current state to avoid data loss.action ​String​ | "changeLineItemQuantity" |
lineItemId ​String​ | |
lineItemKey ​String​ | |
quantity ​Int​ | New value to set.
If Minimum: 0 , the LineItem is removed from the Order.0 ​ |
externalPrice ​Money​ | Required when the Line Item uses
ExternalPrice LineItemPriceMode.
Sets the LineItem price to the given value when changing the quantity of a Line Item.The LineItem price is updated as described in Line Item price selection. |
externalTotalPrice ​ | Sets the LineItem price and totalPrice to the given value when changing the quantity of a Line Item with the ExternalTotal LineItemPriceMode.
If externalTotalPrice is not given and the priceMode is ExternalTotal , the external price is unset and the priceMode is set to Platform . |
{
"action": "changeLineItemQuantity",
"lineItemId": "{{lineItemId}}",
"quantity": 2
}
Set LineItem TaxRate
External
TaxMode.action ​String​ | "setLineItemTaxRate" |
lineItemId ​String​ | |
lineItemKey ​String​ | |
externalTaxRate ​ | Value to set. If empty, any existing value will be removed. |
shippingKey ​String​ | key of the ShippingMethod used for this Line Item.
This is required for Carts with Multiple ShippingMode. |
{
"action": "setLineItemTaxRate",
"lineItemId": "{{lineItemId}}",
"externalTaxRate": {
"name": "Name",
"amount": 0.19,
"country": "DE"
}
}
Set LineItem TaxAmount
ExternalAmount
TaxMode. This update action sets the taxedPrice
and taxRate
on a Line Item and must be used after any price-affecting change occurs.action ​String​ | "setLineItemTaxAmount" |
lineItemId ​String​ | |
lineItemKey ​String​ | |
externalTaxAmount ​ | Value to set. If empty, any existing value will be removed. |
shippingKey ​String​ | key of the ShippingMethod used for this Line Item.
This is required for Carts with Multiple ShippingMode. |
{
"action": "setLineItemTaxAmount",
"lineItemId": "{{lineItemId}}",
"externalTaxAmount": {
"totalGross": {
"currencyCode": "EUR",
"centAmount": 4000
},
"taxRate": {
"name": "Name",
"amount": 0.19,
"country": "DE"
}
}
}
Set LineItem Price
action ​String​ | "setLineItemPrice" |
lineItemId ​String​ | |
lineItemKey ​String​ | |
externalPrice ​Money​ | Value to set.
If externalPrice is not given and the priceMode is ExternalPrice , the external price is unset and the priceMode is set to Platform . |
{
"action": "setLineItemPrice",
"lineItemId": "{{lineItemId}}",
"externalPrice": {
"currencyCode": "EUR",
"centAmount": 4000
}
}
Set LineItem TotalPrice
totalPrice
and price
, and changes the priceMode
to ExternalTotal
LineItemPriceMode.action ​String​ | "setLineItemTotalPrice" |
lineItemId ​String​ | |
lineItemKey ​String​ | |
externalTotalPrice ​ | Value to set.
If externalTotalPrice is not given and the priceMode is ExternalTotal , the external price is unset and the priceMode is set to Platform . |
{
"action": "setLineItemTotalPrice",
"lineItemId": "{{lineItemId}}",
"externalTotalPrice": {
"price": {
"currencyCode": "EUR",
"centAmount": 4000
},
"totalPrice": {
"currencyCode": "EUR",
"centAmount": 4000
}
}
}
Set LineItem DistributionChannel
price
as described in Line Item price selection.action ​String​ | "setLineItemDistributionChannel" |
lineItemId ​String​ | |
lineItemKey ​String​ | |
distributionChannel ​ |
|
{
"action": "setLineItemDistributionChannel",
"lineItemId": "{{lineItemId}}",
"distributionChannel": {
"typeId": "channel",
"id": "{{channel-id}}"
}
}
Set LineItem ShippingDetails
action ​String​ | "setLineItemShippingDetails" |
lineItemId ​String​ | |
lineItemKey ​String​ | |
shippingDetails ​ | Value to set. If empty, the existing value is removed. |
{
"action": "setLineItemShippingDetails",
"lineItemId": "{{lineItemId}}",
"shippingDetails": {
"targets": [
{
"addressKey": "addressKeyString",
"quantity": 2
}
]
}
}
Set LineItem Custom Type
action ​String​ | "setLineItemCustomType" |
lineItemId ​String​ | |
lineItemKey ​String​ | |
type ​ | Defines the Type that extends the Line Item with Custom Fields.
If absent, any existing Type and Custom Fields are removed from the Line Item. |
fields ​ | Sets the Custom Fields fields for the Line Item. |
{
"action": "setLineItemCustomType",
"lineItemId": "{{lineItemId}}",
"type": {
"id": "{{type-id}}",
"typeId": "type"
},
"fields": {
"exampleStringField": "TextString"
}
}
Set LineItem CustomField
action ​String​ | "setLineItemCustomField" |
lineItemId ​String​ | |
lineItemKey ​String​ | |
name ​String​ | Name of the Custom Field. |
value ​ | 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 . |
{
"action": "setLineItemCustomField",
"lineItemId": "{{lineItemId}}",
"name": "exampleStringField",
"value": "TextString"
}
Transition LineItem State
action ​String​ | "transitionLineItemState" |
lineItemId ​String​ | |
lineItemKey ​String​ | |
quantity ​Int​ | Number of Line Items that should transition State. |
fromState ​ | State the Line Item should transition from. |
toState ​ | State the Line Item should transition to. |
actualTransitionDate ​DateTime​ | Date and time (UTC) to perform the State transition. |
{
"action": "transitionLineItemState",
"lineItemId": "{lineItemId}}",
"quantity": 2,
"fromState": {
"typeId": "state",
"id": "stateId"
},
"toState": {
"typeId": "state",
"id": "stateId"
}
}
Import LineItem State
quantity
in the ItemStates must match the sum of all Line Item states' quantities.action ​String​ | "importLineItemState" |
lineItemId ​String​ | |
lineItemKey ​String​ | |
state ​Array of ItemState​ | New status of the Line Items. |
{
"action": "importLineItemState",
"lineItemId": "{{lineItemId}}",
"state": {
"typeId": "state",
"id": "{{state-id}}"
}
}
on Custom Line Item
Change CustomLineItem Quantity
shippingDetails
field is kept in its current state to avoid data loss.action ​String​ | "changeCustomLineItemQuantity" |
customLineItemId ​String​ | |
customLineItemKey ​String​ | |
quantity ​Int​ | New value to set.
If Minimum: 0 , the Custom Line Item is removed from the Order.0 ​ |
{
"action": "changeCustomLineItemQuantity",
"customLineItemId": "{{customLineItemId}}",
"quantity": 2
}
Set CustomLineItem TaxRate
External
TaxMode.action ​String​ | "setCustomLineItemTaxRate" |
customLineItemId ​String​ | |
customLineItemKey ​String​ | |
externalTaxRate ​ | Value to set. If empty, an existing value is removed. |
shippingKey ​String​ | key of the ShippingMethod used for this Custom Line Item.
This is required for Carts with Multiple ShippingMode. |
{
"action": "setCustomLineItemTaxRate",
"customLineItemId": "{{customLineItemId}}",
"externalTaxRate": {
"name": "Name",
"amount": 0.19,
"country": "DE"
}
}
Set CustomLineItem TaxAmount
ExternalAmount
TaxMode.action ​String​ | "setCustomLineItemTaxAmount" |
customLineItemId ​String​ | |
customLineItemKey ​String​ | |
externalTaxAmount ​ | Value to set. If empty, any existing value is removed. |
shippingKey ​String​ | key of the ShippingMethod used for this Custom Line Item.
This is required for Carts with Multiple ShippingMode. |
{
"action": "setCustomLineItemTaxAmount",
"customLineItemId": "{{customerLineItemId}}",
"externalTaxAmount": {
"totalGross": {
"currencyCode": "EUR",
"centAmount": 4000
},
"taxRate": {
"name": "Name",
"country": "DE",
"amount": 0.19
}
}
}
Change CustomLineItem Money
action ​String​ | "changeCustomLineItemMoney" |
customLineItemId ​String​ | |
customLineItemKey ​String​ | |
money ​Money​ | Value to set. Must not be empty. Can be a negative amount. |
{
"action": "changeCustomLineItemMoney",
"customLineItemId": "{{customLineItemId}}",
"money": {
"currencyCode": "EUR",
"centAmount": 4000
}
}
Set CustomLineItem ShippingDetails
action ​String​ | "setCustomLineItemShippingDetails" |
customLineItemId ​String​ | |
customLineItemKey ​String​ | |
shippingDetails ​ | Value to set. If empty, any existing value is removed. |
{
"action": "setCustomLineItemShippingDetails",
"customLineItemId": "{{customLineItemId}}",
"shippingDetails": {
"targets": [
{
"addressKey": "addressKey",
"quantity": 1
}
]
}
}
Set CustomLineItem Custom Type
action ​String​ | "setCustomLineItemCustomType" |
customLineItemId ​String​ | |
customLineItemKey ​String​ | |
type ​ | Defines the Type that extends the Custom Line Item with Custom Fields.
If absent, any existing Type and Custom Fields are removed from the Custom Line Item. |
fields ​ | Sets the Custom Fields fields for the Custom Line Item. |
{
"action": "setCustomLineItemCustomType",
"customLineItemId": "{{customLineItemId}}",
"type": {
"id": "{{type-id}}",
"typeId": "type"
},
"fields": {
"exampleStringField": "TextString"
}
}
Set CustomLineItem CustomField
action ​String​ | "setCustomLineItemCustomField" |
customLineItemId ​String​ | |
customLineItemKey ​String​ | |
name ​String​ | Name of the Custom Field. |
value ​ | 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 . |
{
"action": "setCustomLineItemCustomField",
"customLineItemId": "{{customLineItemId}}",
"name": "exampleStringField",
"value": "TextString"
}
Transition CustomLineItem State
action ​String​ | "transitionCustomLineItemState" |
customLineItemId ​String​ | |
customLineItemKey ​String​ | |
quantity ​Int​ | Number 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 ​DateTime​ | Date and time (UTC) to perform the State transition. |
{
"action": "transitionCustomLineItemState",
"customLineItemId": "{{customLineItemId}}",
"quantity": 2,
"fromState": {
"typeId": "state",
"id": "stateId"
},
"toState": {
"typeId": "state",
"id": "stateId"
}
}
Import CustomLineItem State
quantity
of the ItemStates must match the sum of all Custom Line Item states' quantities.action ​String​ | "importCustomLineItemState" |
customLineItemId ​String​ | |
customLineItemKey ​String​ | |
state ​Array of ItemState​ | New status of the Custom Line Items. |
{
"action": "importCustomLineItemState",
"customLineItemId": "{{customLineItemId}}",
"state": [
{
"quantity": 1,
"state": {
"typeId": "state",
"id": "{{state-id}}"
}
}
]
}
on Billing Address
Set Billing Address Custom Type
action ​String​ | "setBillingAddressCustomType" |
type ​ | Defines the Type that extends the billingAddress with Custom Fields.
If absent, any existing Type and Custom Fields are removed from the billingAddress . |
fields ​ | Sets the Custom Fields fields for the billingAddress . |
{
"action": "setBillingAddressCustomType",
"type": {
"id": "{{type-id}}",
"typeId": "type"
},
"fields": {
"exampleStringField": "TextString"
}
}
Set Billing Address CustomField
action ​String​ | "setBillingAddressCustomField" |
name ​String​ | Name of the Custom Field. |
value ​ | 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 . |
{
"action": "setBillingAddressCustomField",
"name": "exampleStringField",
"value": "TextString"
}
on Shipping Address
Set Shipping Address Custom Type
action ​String​ | "setShippingAddressCustomType" |
type ​ | Defines the Type that extends the shippingAddress with Custom Fields.
If absent, any existing Type and Custom Fields are removed from the shippingAddress . |
fields ​ | Sets the Custom Fields fields for the shippingAddress . |
{
"action": "setShippingAddressCustomType",
"type": {
"id": "{{type-id}}",
"typeId": "type"
},
"fields": {
"exampleStringField": "TextString"
}
}
Set Shipping Address CustomField
action ​String​ | "setShippingAddressCustomField" |
name ​String​ | Name of the Custom Field. |
value ​ | 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 . |
{
"action": "setShippingAddressCustomField",
"name": "exampleStringField",
"value": "TextString"
}
on ItemShipping Address
Set ItemShipping Address Custom Type
action ​String​ | "setItemShippingAddressCustomType" |
addressKey ​String​ | |
type ​ | Defines the Type that extends the itemShippingAddress with Custom Fields.
If absent, any existing Type and Custom Fields are removed from the itemShippingAddress . |
fields ​ | Sets the Custom Fields fields for the itemShippingAddress . |
{
"action": "setItemShippingAddressCustomType",
"addressKey": "{{address-key}}",
"type": {
"id": "{{type-id}}",
"typeId": "type"
},
"fields": {
"exampleStringField": "TextString"
}
}
Set ItemShipping Address CustomField
action ​String​ | "setItemShippingAddressCustomField" |
addressKey ​String​ | |
name ​String​ | Name of the Custom Field. |
value ​ | 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 . |
{
"action": "setItemShippingAddressCustomField",
"addressKey": "{{address-key}}",
"name": "exampleStringField",
"value": "TextString"
}
on Shipping Method
Set ShippingMethod TaxAmount
ExternalAmount
TaxMode.action ​String​ | "setShippingMethodTaxAmount" |
shippingKey ​String​ | |
externalTaxAmount ​ | Value to set. If empty, any existing value will be removed. |
{
"action": "setShippingMethodTaxAmount",
"shippingKey": "shipping-method-key",
"externalTaxAmount": {
"totalGross": {
"currencyCode": "EUR",
"centAmount": 4000
},
"taxRate": {
"name": "Name",
"amount": 0.19,
"country": "DE"
}
}
}
Set ShippingMethod TaxRate
External
TaxMode.action ​String​ | "setShippingMethodTaxRate" |
shippingKey ​String​ | |
externalTaxRate ​ | Value to set. If empty, any existing value is removed. |
{
"action": "setShippingMethodTaxRate",
"shippingKey": "shipping-method-key",
"externalTaxRate": {
"name": "Name",
"amount": 0.19,
"country": "DE"
}
}
on Shipping
Set Shipping Custom Type
shippingMethod
or shipping
.action ​String​ | "setShippingCustomType" |
shippingKey ​String​ | 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. |
type ​ | Defines the Type that extends the specified ShippingMethod with Custom Fields.
If absent, any existing Type and Custom Fields are removed from the ShippingMethod. |
fields ​ | Sets the Custom Fields fields for the shippingMethod . |
{
"action": "setShippingCustomType",
"shippingKey": "shipping-key-express",
"type": {
"id": "{{type-id}}",
"typeId": "type"
},
"fields": {
"exampleStringField": "TextString"
}
}
Set Shipping CustomField
action ​String​ | "setShippingCustomField" |
shippingKey ​String​ | 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. |
name ​String​ | Name of the Custom Field. |
value ​ | 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 . |
{
"action": "setShippingCustomField",
"shippingKey": "shipping-key-express",
"name": "exampleStringField",
"value": "TextString"
}
on Delivery
Set Delivery Address
action ​String​ | "setDeliveryAddress" |
deliveryId ​String​ | id of an existing Delivery.Either deliveryId or deliveryKey must be provided. |
deliveryKey ​String​ | key of an existing Delivery.Either deliveryId or deliveryKey must be provided. |
address ​BaseAddress​ | Value to set. If empty, any existing value will be removed. |
{
"action": "setDeliveryAddress",
"deliveryId": "{{deliveryId}}",
"address": {
"key": "exampleKey",
"title": "My Address",
"salutation": "Mr.",
"firstName": "Example",
"lastName": "Person",
"streetName": "Example Street",
"streetNumber": "4711",
"additionalStreetInfo": "Backhouse",
"postalCode": "80933",
"city": "Exemplary City",
"region": "Exemplary Region",
"state": "Exemplary State",
"country": "DE",
"company": "My Company Name",
"department": "Sales",
"building": "Hightower 1",
"apartment": "247",
"pOBox": "2471",
"phone": "+49 89 12345678",
"mobile": "+49 171 2345678",
"email": "email@example.com",
"fax": "+49 89 12345679",
"additionalAddressInfo": "no additional Info",
"externalId": "Information not needed"
}
}
Add Parcel to Delivery
action ​String​ | "addParcelToDelivery" |
deliveryId ​String​ | id of an existing Delivery.Either deliveryId or deliveryKey must be provided. |
deliveryKey ​String​ | key of an existing Delivery.Either deliveryId or deliveryKey must be provided. |
parcelKey ​String​ | key of an existing Parcel. |
measurements ​ | Value to set. |
trackingData ​TrackingData​ | Value to set. |
items ​Array of DeliveryItem​ | Value to set. |
custom ​ | Custom Fields for the Parcel. |
{
"action": "addParcelToDelivery",
"deliveryId": "{{deliveryId}}",
"measurements": {
"heightInMillimeter": 11,
"lengthInMillimeter": 11
},
"trackingData": {
"trackingId": "{{trackingId}}"
},
"items": {
"id": "{{lineItemId}}",
"quantity": 2
}
}
Remove Parcel from Delivery
Set Delivery Items
action ​String​ | "setDeliveryItems" |
deliveryId ​String​ | id of an existing Delivery.Either deliveryId or deliveryKey must be provided. |
deliveryKey ​String​ | key of an existing Delivery.Either deliveryId or deliveryKey must be provided. |
items ​Array of DeliveryItem​ | Value to set. If empty, any existing value is removed. |
{
"action": "setDeliveryItems",
"deliveryId": "{{deliveryId}}",
"items": [
{
"id": "{{itemId}}",
"quantity": 2
}
]
}
Set Delivery Custom Type
action ​String​ | "setDeliveryCustomType" |
deliveryId ​String​ | id of an existing Delivery.Either deliveryId or deliveryKey must be provided. |
deliveryKey ​String​ | key of an existing Delivery.Either deliveryId or deliveryKey must be provided. |
type ​ | Defines the Type that extends the Delivery with Custom Fields.
If absent, any existing Type and Custom Fields are removed from the Delivery. |
fields ​ | Sets the Custom Fields fields for the Delivery. |
{
"action": "setDeliveryCustomType",
"deliveryId": "exampleDeliveryID",
"type": {
"id": "{{type-id}}",
"typeId": "type"
},
"fields": {
"exampleStringField": "TextString"
}
}
Set Delivery CustomField
action ​String​ | "setDeliveryCustomField" |
deliveryId ​String​ | id of an existing Delivery.Either deliveryId or deliveryKey must be provided. |
deliveryKey ​String​ | key of an existing Delivery.Either deliveryId or deliveryKey must be provided. |
name ​String​ | Name of the Custom Field. |
value ​ | 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 . |
{
"action": "setDeliveryCustomField",
"deliveryId": "exampleDeliveryID",
"name": "exampleStringField",
"value": "TextString"
}
on Delivery Address
Set Delivery Address Custom Type
action ​String​ | "setDeliveryAddressCustomType" |
deliveryId ​String​ | id of an existing Delivery.Either deliveryId or deliveryKey must be provided. |
deliveryKey ​String​ | key of an existing Delivery.Either deliveryId or deliveryKey must be provided. |
type ​ | Defines the Type that extends the Delivery address with Custom Fields.
If absent, any existing Type and Custom Fields are removed from the Delivery address . |
fields ​ |
{
"action": "setDeliveryAddressCustomType",
"deliveryId": "{{delivery-id}}",
"type": {
"id": "{{type-id}}",
"typeId": "type"
},
"fields": {
"exampleStringField": "TextString"
}
}
Set Delivery Address CustomField
action ​String​ | "setDeliveryAddressCustomField" |
deliveryId ​String​ | id of an existing Delivery.Either deliveryId or deliveryKey must be provided. |
deliveryKey ​String​ | key of an existing Delivery.Either deliveryId or deliveryKey must be provided. |
name ​String​ | Name of the Custom Field. |
value ​ | 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 . |
{
"action": "setDeliveryAddressCustomField",
"deliveryId": "{{delivery-id}}",
"name": "exampleStringField",
"value": "TextString"
}
on Parcel
Set Parcel Measurements
action ​String​ | "setParcelMeasurements" |
parcelId ​String​ | id of an existing Parcel.Either parcelId or parcelKey must be provided. |
parcelKey ​String​ | key of an existing Parcel.Either parcelId or parcelKey must be provided. |
measurements ​ | Value to set. If empty, any existing value will be removed. |
{
"action": "setParcelMeasurements",
"parcelId": "{{parcelId}}",
"measurements": {
"heightInMillimeter": 11,
"widthInMillimeter": 11
}
}
Set Parcel Tracking Data
action ​String​ | "setParcelTrackingData" |
parcelId ​String​ | id of an existing Parcel.Either parcelId or parcelKey must be provided. |
parcelKey ​String​ | key of an existing Parcel.Either parcelId or parcelKey must be provided. |
trackingData ​TrackingData​ | Value to set. If empty, any existing value will be removed. |
{
"action": "setParcelTrackingData",
"parcelId": "{{parcelId))",
"trackingData": {
"trackingId": "{{trackingId}}",
"carrier": "TNT",
"provider": "providerName",
"providerTransaction": "{{transactionId}}",
"isReturn": false
}
}
Set Parcel Items
action ​String​ | "setParcelItems" |
parcelId ​String​ | id of an existing Parcel.Either parcelId or parcelKey must be provided. |
parcelKey ​String​ | key of an existing Parcel.Either parcelId or parcelKey must be provided. |
items ​Array of DeliveryItem​ | Value to set. If empty, any existing value will be removed. |
{
"action": "setParcelItems",
"parcelId": "{{parcelId}}",
"items": [
{
"id": "{{lineItemId}}",
"quantity": 2
}
]
}
Set Parcel Custom Type
action ​String​ | "setParcelCustomType" |
parcelId ​String​ | id of an existing Parcel.Either parcelId or parcelKey must be provided. |
parcelKey ​String​ | key of an existing Parcel.Either parcelId or parcelKey must be provided. |
type ​ | Defines the Type that extends the Parcel with Custom Fields.
If absent, any existing Type and Custom Fields are removed from the Parcel. |
fields ​ | Sets the Custom Fields fields for the Parcel. |
{
"action": "setParcelCustomType",
"parcelId": "exampleParcelID",
"type": {
"id": "{{type-id}}",
"typeId": "type"
},
"fields": {
"exampleStringField": "TextString"
}
}
Set Parcel CustomField
action ​String​ | "setParcelCustomField" |
parcelId ​String​ | id of an existing Parcel.Either parcelId or parcelKey must be provided. |
parcelKey ​String​ | key of an existing Parcel.Either parcelId or parcelKey must be provided. |
name ​String​ | Name of the Custom Field. |
value ​ | 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 . |
{
"action": "setParcelCustomField",
"parcelId": "exampleParcelID",
"name": "exampleStringField",
"value": "TextString"
}
on ReturnItem
Set ReturnItem Custom Type
action ​String​ | "setReturnItemCustomType" |
returnItemId ​String​ | |
returnItemKey ​String​ | |
type ​ | Defines the Type that extends the Return Item with Custom Fields.
If absent, any existing Type and Custom Fields are removed from the Return Item. |
fields ​ | Sets the Custom Fields fields for the Return Item. |
{
"action": "setReturnItemCustomType",
"returnItemId": "examplereturnItemID",
"type": {
"id": "{{type-id}}",
"typeId": "type"
},
"fields": {
"exampleStringField": "TextString"
}
}
Set ReturnItem CustomField
action ​String​ | "setReturnItemCustomField" |
returnItemId ​String​ | |
returnItemKey ​String​ | |
name ​String​ | Name of the Custom Field. |
value ​ | 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 . |
{
"action": "setReturnItemCustomField",
"returnItemId": "exampleReturnItemID",
"name": "exampleStringField",
"value": "TextString"
}
Apply OrderEdit
manage_order_edits:{projectKey}
region String ​ | Region in which the Project is hosted. |
projectKey String ​ | key of the Project. |
id String ​ | id of the OrderEdit. |
application/json
editVersion
and/or resourceVersion
do not match the actual version, a ConcurrentModification error will be returned.editVersion ​Int​ | Current version of the OrderEdit to be applied. |
resourceVersion ​Int​ | Current version of the Order to which the OrderEdit is applied. |
application/json
Delete OrderEdit
Delete OrderEdit by ID
Deleting an OrderEdit does not affect the related Order.
Deletes an OrderEdit in the Project.
manage_order_edits:{projectKey}
region String ​ | Region in which the Project is hosted. |
projectKey String ​ | key of the Project. |
id String ​ | id of the OrderEdit. |
version Int ​ | Last seen version of the resource. |
expand | The parameter can be passed multiple times. |
application/json
curl -X DELETE https://api.{region}.commercetools.com/{projectKey}/orders/edits/{id}?version={version} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}"
{
"id": "df20c5ea-b114-4aab-b330-740b0e9f3099",
"version": 1,
"resource": {
"typeId": "order",
"id": "ed454f4e-c43a-485f-a86f-046c691b1363"
},
"key": "order-edit-key",
"createdAt": "2018-10-04T15:22:31.639Z",
"lastModifiedAt": "2018-10-04T15:22:31.639Z",
"stagedActions": [
{
"action": "setCustomerEmail",
"email": "user@localhost"
}
],
"result": {
"preview": {
"type": "Order",
"id": "ed454f4e-c43a-485f-a86f-046c691b1363",
"version": 3,
"customerId": "bf5d96ce-4704-45b2-8842-d409dd34cdfc",
"customerEmail": "user@localhost",
"createdAt": "2018-05-15T12:40:17.301Z",
"lastModifiedAt": "2018-05-15T12:40:17.301Z",
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3336,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.19,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "19% MwSt"
}
]
},
"country": "DE",
"orderState": "Open",
"syncInfo": [],
"returnInfo": [],
"refusedGifts": [],
"shippingInfo": {
"shippingMethodName": "DHL",
"price": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 570,
"fractionDigits": 2
},
"shippingRate": {
"price": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 570,
"fractionDigits": 2
},
"tiers": []
},
"taxRate": {
"name": "19% MwSt",
"amount": 0.19,
"includedInPrice": true,
"country": "DE",
"id": "rrsT1Jbw",
"subRates": []
},
"taxCategory": {
"typeId": "tax-category",
"id": "fdeb9625-10f8-476c-a549-5d5c6d1bd412"
},
"deliveries": [],
"shippingMethod": {
"typeId": "shipping-method",
"id": "d18b3f77-92de-4893-b6e3-b5c9c8c1eb96"
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 479,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 570,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.1,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "Bla"
}
]
},
"shippingMethodState": "MatchesCart"
},
"taxMode": "Platform",
"inventoryMode": "None",
"taxRoundingMode": "HalfEven",
"taxCalculationMode": "LineItemLevel",
"origin": "Customer",
"lineItems": [
{
"id": "31099128-dba8-40a7-bb6c-d12857149ff8",
"productId": "d6d0c517-572e-4d26-b80e-ffce825334a4",
"name": {
"en": "GIRLS CREW"
},
"productType": {
"typeId": "product-type",
"id": "6dc75271-b0e5-4ae9-9158-faa1fff65f7b",
"version": 2
},
"productSlug": {
"en": "girls-crew1522841378290"
},
"variant": {
"id": 1,
"sku": "sku_GIRLS_CREW_variant1_1522841378290",
"prices": [
{
"value": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
},
"id": "b5595b13-bbb8-44ab-a2e2-89c18edf1b22"
}
],
"images": [
{
"url": "https://www.commercetools.com/cli/data/253234387_1.jpg",
"dimensions": {
"w": 1400,
"h": 1400
}
}
],
"attributes": [],
"assets": []
},
"price": {
"value": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
},
"id": "b5595b13-bbb8-44ab-a2e2-89c18edf1b22"
},
"quantity": 1,
"discountedPricePerQuantity": [],
"taxRate": {
"name": "19% MwSt",
"amount": 0.19,
"includedInPrice": true,
"country": "DE",
"id": "rrsT1Jbw",
"subRates": []
},
"state": [
{
"quantity": 1,
"state": {
"typeId": "state",
"id": "60a64e06-b4e8-4205-a0f3-94bc203e2d6d"
}
}
],
"priceMode": "Platform",
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 2857,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.1,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "Bla"
}
]
},
"lineItemMode": "Standard",
"perMethodTaxRate": [],
"taxedPricePortions": []
}
],
"customLineItems": [],
"transactionFee": true,
"discountCodes": [],
"cart": {
"typeId": "cart",
"id": "6c97e772-9769-4419-8adc-501c7c5b6088"
},
"shippingAddress": {
"id": "51RkSh-E",
"salutation": "Mr",
"firstName": "user",
"lastName": "lastname",
"streetName": "streetname",
"streetNumber": "2",
"postalCode": "101256",
"city": "Berlin",
"country": "DE",
"building": "34",
"pOBox": "12344",
"email": "user@example.com"
},
"billingAddress": {
"id": "51RkSh-E",
"salutation": "Mr",
"firstName": "user",
"lastName": "lastname",
"streetName": "streetname",
"streetNumber": "2",
"postalCode": "101256",
"city": "Berlin",
"country": "DE",
"building": "34",
"pOBox": "12344",
"email": "user@example.com"
},
"itemShippingAddresses": [],
"shipping": [],
"shippingMode": "Single"
},
"messagePayloads": [
{
"email": "user@localhost",
"type": "OrderCustomerEmailSet"
},
{
"edit": {
"typeId": "order-edit",
"id": "df20c5ea-b114-4aab-b330-740b0e9f3099"
},
"result": {
"type": "Applied",
"appliedAt": "2018-10-04T15:29:14.091Z",
"excerptBeforeEdit": {
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3336,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.19,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "19% MwSt"
}
]
},
"version": 1
},
"excerptAfterEdit": {
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3336,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.19,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "19% MwSt"
}
]
},
"version": 3
}
},
"type": "OrderEditApplied"
}
],
"type": "PreviewSuccess"
},
"comment": "sample-comment"
}
Delete OrderEdit by Key
Deleting an Order Edit does not affect the related Order.
Deletes an OrderEdit in the Project.
manage_order_edits:{projectKey}
region String ​ | Region in which the Project is hosted. |
projectKey String ​ | key of the Project. |
key String ​ | key of the OrderEdit. |
version Int ​ | Last seen version of the resource. |
expand | The parameter can be passed multiple times. |
application/json
curl -X DELETE https://api.{region}.commercetools.com/{projectKey}/orders/edits/key={key}?version={version} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}"
{
"id": "df20c5ea-b114-4aab-b330-740b0e9f3099",
"version": 1,
"resource": {
"typeId": "order",
"id": "ed454f4e-c43a-485f-a86f-046c691b1363"
},
"key": "order-edit-key",
"createdAt": "2018-10-04T15:22:31.639Z",
"lastModifiedAt": "2018-10-04T15:22:31.639Z",
"stagedActions": [
{
"action": "setCustomerEmail",
"email": "user@localhost"
}
],
"result": {
"preview": {
"type": "Order",
"id": "ed454f4e-c43a-485f-a86f-046c691b1363",
"version": 3,
"customerId": "bf5d96ce-4704-45b2-8842-d409dd34cdfc",
"customerEmail": "user@localhost",
"createdAt": "2018-05-15T12:40:17.301Z",
"lastModifiedAt": "2018-05-15T12:40:17.301Z",
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3336,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.19,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "19% MwSt"
}
]
},
"country": "DE",
"orderState": "Open",
"syncInfo": [],
"returnInfo": [],
"refusedGifts": [],
"shippingInfo": {
"shippingMethodName": "DHL",
"price": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 570,
"fractionDigits": 2
},
"shippingRate": {
"price": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 570,
"fractionDigits": 2
},
"tiers": []
},
"taxRate": {
"name": "19% MwSt",
"amount": 0.19,
"includedInPrice": true,
"country": "DE",
"id": "rrsT1Jbw",
"subRates": []
},
"taxCategory": {
"typeId": "tax-category",
"id": "fdeb9625-10f8-476c-a549-5d5c6d1bd412"
},
"deliveries": [],
"shippingMethod": {
"typeId": "shipping-method",
"id": "d18b3f77-92de-4893-b6e3-b5c9c8c1eb96"
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 479,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 570,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.1,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "Bla"
}
]
},
"shippingMethodState": "MatchesCart"
},
"taxMode": "Platform",
"inventoryMode": "None",
"taxRoundingMode": "HalfEven",
"taxCalculationMode": "LineItemLevel",
"origin": "Customer",
"lineItems": [
{
"id": "31099128-dba8-40a7-bb6c-d12857149ff8",
"productId": "d6d0c517-572e-4d26-b80e-ffce825334a4",
"name": {
"en": "GIRLS CREW"
},
"productType": {
"typeId": "product-type",
"id": "6dc75271-b0e5-4ae9-9158-faa1fff65f7b",
"version": 2
},
"productSlug": {
"en": "girls-crew1522841378290"
},
"variant": {
"id": 1,
"sku": "sku_GIRLS_CREW_variant1_1522841378290",
"prices": [
{
"value": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
},
"id": "b5595b13-bbb8-44ab-a2e2-89c18edf1b22"
}
],
"images": [
{
"url": "https://www.commercetools.com/cli/data/253234387_1.jpg",
"dimensions": {
"w": 1400,
"h": 1400
}
}
],
"attributes": [],
"assets": []
},
"price": {
"value": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
},
"id": "b5595b13-bbb8-44ab-a2e2-89c18edf1b22"
},
"quantity": 1,
"discountedPricePerQuantity": [],
"taxRate": {
"name": "19% MwSt",
"amount": 0.19,
"includedInPrice": true,
"country": "DE",
"id": "rrsT1Jbw",
"subRates": []
},
"state": [
{
"quantity": 1,
"state": {
"typeId": "state",
"id": "60a64e06-b4e8-4205-a0f3-94bc203e2d6d"
}
}
],
"priceMode": "Platform",
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 2857,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.1,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "Bla"
}
]
},
"lineItemMode": "Standard",
"perMethodTaxRate": [],
"taxedPricePortions": []
}
],
"customLineItems": [],
"transactionFee": true,
"discountCodes": [],
"cart": {
"typeId": "cart",
"id": "6c97e772-9769-4419-8adc-501c7c5b6088"
},
"shippingAddress": {
"id": "51RkSh-E",
"salutation": "Mr",
"firstName": "user",
"lastName": "lastname",
"streetName": "streetname",
"streetNumber": "2",
"postalCode": "101256",
"city": "Berlin",
"country": "DE",
"building": "34",
"pOBox": "12344",
"email": "user@example.com"
},
"billingAddress": {
"id": "51RkSh-E",
"salutation": "Mr",
"firstName": "user",
"lastName": "lastname",
"streetName": "streetname",
"streetNumber": "2",
"postalCode": "101256",
"city": "Berlin",
"country": "DE",
"building": "34",
"pOBox": "12344",
"email": "user@example.com"
},
"itemShippingAddresses": [],
"shipping": [],
"shippingMode": "Single"
},
"messagePayloads": [
{
"email": "user@localhost",
"type": "OrderCustomerEmailSet"
},
{
"edit": {
"typeId": "order-edit",
"id": "df20c5ea-b114-4aab-b330-740b0e9f3099"
},
"result": {
"type": "Applied",
"appliedAt": "2018-10-04T15:29:14.091Z",
"excerptBeforeEdit": {
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3336,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.19,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "19% MwSt"
}
]
},
"version": 1
},
"excerptAfterEdit": {
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxedPrice": {
"totalNet": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3336,
"fractionDigits": 2
},
"totalGross": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 3970,
"fractionDigits": 2
},
"taxPortions": [
{
"rate": 0.19,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "19% MwSt"
}
]
},
"version": 3
}
},
"type": "OrderEditApplied"
}
],
"type": "PreviewSuccess"
},
"comment": "sample-comment"
}