Actor Commands
Commands are atomic mutations applied to a single actor. They are not dispatched directly — instead they are batched inside a message (most commonly applyCommands, but some other messages accept commands as well). All commands in a batch execute as one atomic operation: if any command fails, the entire batch is rejected and no changes are applied.
Commands only mutate state within the actor that receives them; they never have side effects on other actors. For cross-actor effects, use messages.
http
POST /resources/actors/order/ORD12345
Content-Type: application/json
[{
"type": "applyCommands",
"body": {
"commands": [
{ "type": "addTag", "key": "blocked" }
]
}
}]See the Actors overview for the conceptual model.
Order Actor overview →
| addActivityLog | Adds an activity log to an Order |
| addDeliveryFee | Adds a fee to a Delivery |
| addDeliveryTag | Adds a tag to a Delivery |
| addFulfillmentFee | Adds a fee to a Fulfillment |
| addFulfillmentTag | Adds a tag to a Fulfillment |
| addOrderLineFee | Adds a fee to an Order Line |
| addTag | Adds a tag to an Order |
| cancelDelivery | Cancels a delivery. |
| cancelFulfillment | Cancels a fulfillment. |
| cancelInvoice | Cancels an Invoice |
| commodityClassificationPurposes | A jurisdiction's commodity classifications, per direction of trade |
| commodityClassificationValue | A single commodity classification value: the code and the taxonomy system it belongs to |
| completeDelivery | Marks a delivery as completed. |
| completeFulfillment | Marks a fulfillment as completed. |
| createDelivery | Adds a new Delivery to an Order |
| createFulfillment | Adds a new Fulfillment to an Order |
| createOrderLine | Creates a new Order Row |
| createPromotion | Creates a promotion on an Order based on a component |
| createPromotionBySource | Creates a promotion on an Order with inline Filtrera source |
| createReturn | Creates a Return for a specific Order Row |
| createStaticFeeDiscount | Creates a static discount on a fee |
| createStaticOrderDiscount | Creates a static discount on an Order. An order discount value is distributed across all order lines, native delivery shipping charges, and fees proportionally to their value. |
| createStaticOrderLineDiscount | Creates a static discount on an order line |
| createStaticShippingDiscount | Creates a static discount on a delivery's native shipping charge |
| deleteDiscount | Deletes an existing Discount from an Order |
| deleteFee | Removes a fee from an Order, regardless of its scope (delivery or order line) |
| deleteOrderLine | Deletes an existing Order Row |
| deletePromotion | Deletes a promotion from an Order |
| deleteReturn | Deletes and existing Return |
| generateOrderNumberByPrefix | Generates an order number for an order based on the given prefix |
| invoice | Invoices all entities released for invoicing on the Order. |
| linkPayment | Associates a Payment with an Order |
| moveOrderLineToDelivery | Moves an existing order line to a different delivery. |
| moveOrderLineToFulfillment | Moves an existing order line to a different fulfillment. |
| openDelivery | Opens a delivery that is currently in processing. Ensure there are no external dependencies such as warehouses actively working on the delivery. |
| openFulfillment | Opens a fulfillment that is currently in processing. Ensure there are no external dependencies such as warehouses actively working on the fulfillment. |
| releaseDelivery | Releases a delivery for fulfillment processing. |
| releaseFulfillment | Releases a fulfillment for fulfillment processing. |
| releaseFulfillmentToInvoicing | Releases a fulfillment's invoiceable charges to be invoiced: native shipping plus delivery-scoped fees. |
| releaseOrderLineToInvoicing | Releases an order line to be invoiced. |
| releaseShippingToInvoicing | Deprecated: use releaseFulfillmentToInvoicing. Releases the delivery's invoiceable charges (native shipping plus delivery-scoped fees) to be invoiced. |
| removeDeliveryTag | Removes a tag from a Delivery |
| removeFulfillmentTag | Removes a tag from a Fulfillment |
| removeTag | Removes a tag from an Order |
| retractFulfillmentFromInvoicing | Unreleases a fulfillment's invoiceable charges (native shipping plus delivery-scoped fees) from invoicing. |
| retractOrderLineFromInvoicing | Unreleases an order line from invoicing. |
| retractShippingFromInvoicing | Deprecated: use retractFulfillmentFromInvoicing. Unreleases the delivery's invoiceable charges (native shipping plus delivery-scoped fees) from invoicing. |
| setChannelKey | Sets the channel key of an order. |
| setCustomerNumber | Sets the customer number of an order. |
| setDeliveryAddress | Sets the Address of a Delivery |
| setDeliveryDynamicFields | Sets dynamic fields of a delivery. Non specified fields will be left unchanged. Set value to null to remove field. |
| setDeliveryTags | Replaces all tags on a Delivery |
| setDiscountDescription | Sets description of discount. Should be meaningful to the customer as it's used on invoices and customer communication. |
| setDiscountDynamicFields | Sets dynamic fields of a discount. Non specified fields will be left unchanged. Set value to null to remove field. |
| setFeeDynamicFields | Sets dynamic fields of a fee. Non specified fields will be left unchanged. Set value to null to remove field. |
| setFeeTaxClassifications | Replaces the full set of tax classifications on a Fee, keyed by system -> jurisdiction -> code |
| setFulfillmentAddress | Sets the Address of a Fulfillment |
| setFulfillmentDynamicFields | Sets dynamic fields of a fulfillment. Non specified fields will be left unchanged. Set value to null to remove field. |
| setFulfillmentTags | Replaces all tags on a Fulfillment |
| setInvoiceAddress | Sets the invoice address of an Order which will be used for new invoices |
| setInvoiceRecipient | Sets the invoice recipient of an Order which will be used for new invoices |
| setLocale | Set the locale of the Order. Nothing else will be affected. |
| setNotes | Set the notes of the Order. |
| setOrderDynamicFields | Sets dynamic fields of an order. Non specified fields will be left unchanged. Set value to null to remove field. |
| setOrderLineCommodityClassifications | Replaces the full set of commodity classifications on an Order Line, keyed by jurisdiction with optional export/import entries |
| setOrderLineCountryOfOrigin | Sets or clears the country of origin (ISO 3166-1 alpha-2) of an Order Line |
| setOrderLineDynamicFields | Sets dynamic fields of an order line. Non specified fields will be left unchanged. Set value to null to remove field. |
| setOrderLineProduct | Sets the product of an Order Line. |
| setOrderLineQuantity | Sets the quantity of an Order Line |
| setOrderLineSkus | Sets the required quantities of SKUs on an Order Line |
| setOrderLineTax | Sets the tax of an Order Line, either by a fixed total (taxTotal) or a percentage (taxFactor). |
| setOrderLineTaxClassifications | Replaces the full set of tax classifications on an Order Line, keyed by system -> jurisdiction -> code |
| setOrderLineUnitPrice | Sets the unit price of an Order Line. |
| setOrderState | Sets the state of an Order |
| setPromotionDescription | Sets the description on a promotion |
| setPromotionDynamicFields | Sets dynamic fields on a promotion |
| setPromotionParameters | Sets parameters on a promotion |
| setReturnDynamicFields | Sets dynamic fields of a return. Non specified fields will be left unchanged. Set value to null to remove field. |
| setShippingPrice | Sets the shipping price of a Delivery. |
| setShippingProduct | Sets the shipping product of a Delivery. |
| setShippingTax | Sets the tax factor of a Delivery's shipping cost. |
| setShippingTaxClassifications | Replaces the full set of shipping tax classifications on a Delivery, keyed by system -> jurisdiction -> code |
| setStaticDiscountValue | Updates the value of an existing static discount |
| setTags | Replaces all tags on an Order |
| splitOrderLine | Splits an existing order line into two by moving a portion of its quantity onto a new order line. The new line inherits product, price, dynamic fields and per-unit SKU composition from the original. Discounts and totals are left to be recomputed by the order pipeline. |
| updateFee | Updates a fee, regardless of its scope (delivery or order line). Non-specified fields will be left unchanged. |
Payment Actor overview →
| addActivityLog | Adds an activity log to a Payment |
| addTag | Adds a tag to a Payment |
| createAuthorization | Creates a new Authorization. |
| generatePaymentNumberByPrefix | Generates a payment number for a payment based on the given prefix |
| removeTag | Removes a tag from a Payment |
| setAuthorizationAmount | Sets the amount of an Authorization. |
| setAuthorizationState | Sets the state of an Authorization. |
| setChannel | Sets the channel key of a Payment. |
| setDynamicFields | Sets dynamic fields of a payment. Non specified fields will be left unchanged. Set value to null to remove field. |
| setTags | Replaces all tags on a Payment |
SKU Actor overview →
| reserve | Reserve stock. If not enough stock is available, a back order will automatically be created and it will be fulfilled once enough stock is available. |
| setAllocation | Creates or updates a stock allocation of SKU for a given inventory. |
| setDynamicFields | Sets dynamic fields of a sku. Non specified fields will be left unchanged. Set value to null to remove field. |
| setIncomingStock | Creates or updates incoming stock of SKU for a given inventory. Reference can be used to map incoming stock to an external entity. |
| setPhysicalStock | Sets the physical stock quantity of SKU for a given inventory. If there is no existing StockPosition for the SKU/inventory it will be created. |
| unreserve | Removes any reservation or back order of the specified order line |
Asset Actor overview →
| addActivityLog | Adds an activity log to an Asset |
| addTag | Adds a tag to an Asset |
| createItem | Adds a new Asset Item to a Asset |
| createItemRelation | Adds a new graph node relation to a Asset Item |
| createRelation | Adds a new graph node relation to a Asset |
| deleteItem | Removes an Asset Item from an Asset |
| deleteItemRelation | Removes a graph node relation from a Asset Item |
| deleteRelation | Removes a graph node relation from a Asset |
| generateAssetNumberByPrefix | Generates an asset number for an Asset based on the given prefix |
| removeTag | Removes a tag from an Asset |
| setDynamicFields | Sets dynamic fields of an asset. Non specified fields will be left unchanged. Set value to null to remove field. |
| setItemDynamicFields | Sets dynamic fields of an asset item. Non specified fields will be left unchanged. Set value to null to remove field. |
| setTags | Replaces all tags on an Asset |
Ticket Actor overview →
| addActivityLog | Adds an activity log to a Ticket |
| addTag | Adds a tag to a Ticket |
| createItem | Adds a new Ticket Item to a Ticket |
| createItemRelation | Adds a new graph node relation to a Ticket Item |
| createRelation | Adds a new graph node relation to a Ticket |
| deleteItem | Removes a Ticket Item from a Ticket |
| deleteItemRelation | Removes a graph node relation from a Ticket Item |
| deleteRelation | Removes a graph node relation from a Ticket |
| generateTicketNumberByPrefix | Generates a ticket number for a Ticket based on the given prefix |
| removeTag | Removes a tag from a Ticket |
| setChannelKey | Sets the channel key of a ticket. |
| setDynamicFields | Sets dynamic fields of a ticket. Non specified fields will be left unchanged. Set value to null to remove field. |
| setItemDynamicFields | Sets dynamic fields of a ticket item. Non specified fields will be left unchanged. Set value to null to remove field. |
| setTags | Replaces all tags on a Ticket |