Skip to content

OR04 - Patch update orders

Request

Description

Update orders information field by field: unspecified fields will not be updated. To remove the value for a field, send it with the 'null' value (not allowed for the required fields).

You cannot use API OR04 to update customer-related information if the customer has been anonymized.

A maximum of 100 orders can be sent at once.

Call Frequency
Maximum usage: Once per minute, 100 orders per call
Read More
Security
Shop-API-Key(Required scopes: ROLE_SHOP_ADMINROLE_PARTNER_ORDER_EDIT)
Query
shop_idinteger, (int64)

Use this parameter when your user has access to several shops. If not specified, the shop_id from your default shop will be used.

Bodyapplication/json
ordersArray of objects, [ 1 .. 100 ] itemsrequired

Orders to be updated, maximum number of orders per call: 100

curl -i -X PUT \
  'https://your-instance.mirakl.net/api/orders?shop_id=0' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "orders": [
      {
        "order_id": "Order_00014",
        "order_lines": [
          {
            "eco_contributions": [
              {
                "epr_category_code": "FR-DEEE",
                "producer_id": "123456789012345",
                "unit_amount": 1.25
              },
              {
                "epr_category_code": "FR-ASL",
                "producer_id": "FRASLPRODUCERID",
                "unit_amount": 1.1
              }
            ],
            "order_line_id": "Order_00014-A-1"
          }
        ]
      }
    ]
  }'

Responses

OK

Bodyapplication/json
updated_ordersArray of objects

A list of updated orders and orders in error objects

Response
{ "updated_orders": [ { … } ] }