shop.order.action

Performs an action on an order

Parameters

  • id POST

    Order ID.

  • action POST

    Action ID string. The list of IDs of actions available for a specified order can be retrieved by means of the 'shop.order.actions' method.

  • text POST Optional

    Comment that can be saved in the order processing history when one of actions 'comment', 'message', 'delete', 'pay', 'capture', 'refund' is executed.

  • return_stock POST Optional

    For the 'capture' action, ID of the stock to which the quantities of ordered products must be returned which are not selected for a partial capture of funds. An empty value denotes return to the stock from which they were previously subtracted.

    For the 'delete' action, ID of the stock to which the quantities of ordered products must be returned. An empty value denotes return to the stock from which they were previously subtracted.

    For the 'refund' action, ID of the stock to which product quantities must be returned during an order refund. An empty value denotes return to the stock from which they were previously subtracted.

  • capture_mode POST Optional

    The 'partial' string if a partial capture of funds is required during the execution of the 'capture' action.

  • capture_items POST Optional

    Array of information about products for which partial capture of funds is being executed by means of the 'capture' action, with the data structure [item_id]['quantity'] where item_id denotes an ID of an order item represented by a product variant and values are product variants’ quantities.

  • capture_shipping_cost POST Optional

    Flag (0 or 1) denoting whether the shipping cost must be captured during a partial capture of funds by means of the 'capture' action. Default value is 0.

  • code POST Optional

    Array of information about ordered products’ codes entered during the execution of the 'editcode' action, with the data structure [code_id][item_id][] where code_id is an ID of a product code set up in the store settings, item_id is an ID of an order item represented by a product variant, and values are entered product codes.

  • shipping_date POST Optional

    Delivery date by a courier, in the 'yyyy-mm-dd' format, which can be specified during the execution of the 'ship' and 'editshippingdetails' actions.

  • shipping_time_from POST Optional

    Beginning of a time span for the delivery a courier, in the 'hh:mm' format, which can be specified during the execution of the 'ship' and 'editshippingdetails' actions.

  • shipping_time_to POST Optional

    End of a time span for the delivery a courier, in the 'hh:mm' format, which can be specified during the execution of the 'ship' and 'editshippingdetails' actions.

  • tracking_number POST Optional

    Shipping tracking number, which can be specified during the execution of the 'ship' and 'editshippingdetails' actions.

  • courier_id POST Optional

    Courier ID, which can be specified during the execution of the 'ship' and 'editshippingdetails' actions.

  • transport POST Optional

    Message sending transport name, which can be specified during the execution of the 'message' action — 'email' or 'sms'.

  • sender POST Optional

    Sender info, which can be specified during the execution of the 'message details' action — and email address or a phone number. If no 'sender' value is specified for sending an email message then the main email address from the store settings is used by default.

  • refund POST Optional

    Flag (0 or 1) denoting whether an order refund must be processed by a payment plugin during the execution of the 'refund' action.

  • refund_mode POST Optional

    The 'partial' string if a partial refund is required during the execution of the 'refund' action.

  • refund_items POST Optional

    Array of information about the items of an order upon which the 'refund' action is being executed, with the data structure [item_id]['quantity'] where item_id is an ID of an order item represented by a product variant and values are product variant quantities.

  • master_id POST Optional

    ID of a main order with which an unsettled ordered must be merged during the execution of the 'settle' action.

  • master_id_custom POST Optional

    ID of a main order with which an unsettled ordered must be merged during the execution of the 'settle' action. Is used if the 'master_id' parameter contains the 'custom' string value (in the case when a user wants to enter a custom order number instead of selecting one of automatically found ones).

  • format GET Optional

    Sets response format. Available options: json (default), xml.

Return value

mixed Response returned by the run() method of an action’s PHP class.