OrderUpdate
The method updates orders already saved in the database.
Input parameters
Incoming as $_POST fields.
POST request:
returned data JSON:
Dane wyjściowe:
orders_ids | string | Order IDs separated by a comma |
update_type | string | Change type: "status" = order status update, "paid" = order was paid, "delivery_number" = set shipping number |
update_value | string | Depending on update_type, status ID, posting number, or information about paying for the order (0 or 1) |
delivery_method_name | string | Name of delivery method, available only when 'update_type' is 'delivery_number' |
tracking_url | string | Url to package tracking, available only when 'update_type' is 'delivery_number' |
Outgoing data
Array fields that the method should return.
counter | int | the number of orders in which the changes were made (even if the order remained the same as before) |
Example:
Input data:Array
(
[order_ids] => 1234,1235,1236
[update_type] => status
[update_value] => sent
)
(
[order_ids] => 1234,1235,1236
[update_type] => status
[update_value] => sent
)
POST request:
order_ids=1234%2C1235%2C1236&update_type=status&update_value=sent
returned data JSON:
{"counter":3}
Dane wyjściowe:
Array
(
[counter] => 3
)
(
[counter] => 3
)