addPickPackOrdersToCart
The method allows you to assign multiple orders to a specific PickPack cart in a single API call. You can assign up to 20 orders at once. If any order is already assigned to another cart, it will be moved to the new cart (only one cart assignment per order is allowed).
Input parameters
Output data:
A sample request in PHP:
| order_ids | array | Array of order identifiers to be assigned to the cart (maximum 20 orders per call) |
| cart_id | int | Cart identifier where the orders should be assigned |
Output data
The method returns the data in JSON format.
| status | varchar(30) | SUCCESS - request executed correctly ERROR - an error occurred during an API request. Error details will be described in 2 additional returned fields: error_message and error_code |
| orders_assigned | int | Number of orders successfully assigned to the cart |
| orders_failed | array | Array of order_ids that failed to be assigned (due to validation errors) |
Sample
Input data:Output data:
A sample request in PHP: