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 |
| addDeliveryTag | Adds a tag to a Delivery |
| addTag | Adds a tag to an Order |
| cancelDelivery | Cancels a delivery. |
| cancelInvoice | Cancels an Invoice |
| completeDelivery | Marks a delivery as completed. |
| createDelivery | Adds a new Delivery 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 |
| createStaticOrderDiscount | Creates a static discount on an Order. An order discount value is distributed across all order lines and shipping fees proportionally to their value. |
| createStaticOrderLineDiscount | Creates a static discount on an order line |
| createStaticShippingDiscount | Creates a static discount on a shipping fee |
| deleteDiscount | Deletes an existing Discount from an Order |
| 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. |
| openDelivery | Opens a delivery that is currently in processing. Ensure there are no external dependencies such as warehouses actively working on the delivery. |
| releaseDelivery | Releases a delivery for fulfillment processing. |
| releaseOrderLineToInvoicing | Releases an order line to be invoiced. |
| releaseShippingToInvoicing | Releases a delivery's shipping fee to be invoiced. |
| removeDeliveryTag | Removes a tag from a Delivery |
| removeTag | Removes a tag from an Order |
| retractOrderLineFromInvoicing | Unreleases an order line from invoicing. |
| retractShippingFromInvoicing | Unreleases a delivery's shipping fee 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. |
| setDeliveryInventory | Sets the inventory and inventory date of a Delivery. Stock reservations will be updated if there are any. |
| 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. |
| setInvoiceAddress | Sets the invoice address 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. |
| 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). |
| 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 percentage factor of a a Delivery's shipping cost. |
| setStaticDiscountValue | Updates the value of an existing static discount |
| unsetDeliveryInventory | Removes the inventory from a Delivery. Stock reservations will be updated if there are any. |
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. |
| setDynamicFields | Sets dynamic fields of a payment. Non specified fields will be left unchanged. Set value to null to remove field. |
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. |
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. |