Skip to content

upsertOrders - Upsert orders

Request

Description

Use this API to synchronize orders with Mirakl Connect.

  • The operation is not partially successful: if any order in the payload is invalid, the entire request is rejected.
  • This API does not support PATCH operations. All fields must be sent with each upsert request to ensure the complete update of the order data.
  • Updates whose channel_updated_at timestamp is older than the value already stored in Connect are silently ignored (anti-replay guard).
Call Frequency
Maximum usage: 30 / sec
Security
Bearer(Required scopes:
connect-channel-platform:orders:...
)
Bodyapplication/jsonrequired
ordersArray of objects, [ 1 .. 100 ] itemsrequired

List of orders to create or update.

originobjectrequired
curl -i -X POST \
  https://miraklconnect.com/api/channel-platform/v1/orders \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "origin": {
      "channel_id": "string",
      "channel_store_id": "string"
    },
    "orders": [
      {
        "channel_order_id": "string",
        "created_at": "2023-03-28T09:34:42Z",
        "channel_updated_at": "2023-03-28T09:34:42Z",
        "status": "AWAITING_ACCEPTANCE",
        "shipping_info": {
          "email": "string",
          "address": {
            "last_name": "string",
            "street": "string",
            "city": "string",
            "first_name": "string",
            "company": "string",
            "street_additional_info": "string",
            "state": "string",
            "country": "string",
            "country_iso_code": "string",
            "zip_code": "string",
            "phone": "string",
            "additional_info": "string"
          },
          "carrier": "string",
          "method": "string",
          "pudo_id": "string",
          "shipping_deadline": "2023-03-28T09:34:42Z",
          "delivery_date": {
            "earliest": "2023-03-28T09:34:42Z",
            "latest": "2023-03-28T09:34:42Z"
          }
        },
        "order_lines": [
          {
            "channel_order_line_id": "string",
            "created_at": "2023-03-28T09:34:42Z",
            "updated_at": "2023-03-28T09:34:42Z",
            "quantity": 0,
            "can_cancel": true,
            "can_refund": true,
            "total_shipping_price": {
              "amount": 0,
              "currency": "string"
            },
            "price": {
              "amount": 0,
              "currency": "string"
            },
            "product": {
              "id": "string",
              "title": "string",
              "thumbnail_url": "string"
            },
            "taxes": [
              {
                "amount": {
                  "amount": 0,
                  "currency": "string"
                },
                "code": "string",
                "rate": 0,
                "seller_collectible": {
                  "amount": 0,
                  "currency": "string"
                },
                "channel_collectible": {
                  "amount": 0,
                  "currency": "string"
                }
              }
            ],
            "shipping_taxes": [
              {
                "amount": {
                  "amount": 0,
                  "currency": "string"
                },
                "code": "string",
                "rate": 0,
                "seller_collectible": {
                  "amount": 0,
                  "currency": "string"
                },
                "channel_collectible": {
                  "amount": 0,
                  "currency": "string"
                }
              }
            ],
            "status": "AWAITING_ACCEPTANCE",
            "status_reason": "ACCEPTANCE_TIMEOUT",
            "adjustments": [
              {
                "channel_adjustment_id": "string",
                "reason": "CUSTOMER_CANCELATION",
                "created_at": "2023-03-28T09:34:42Z",
                "type": "REFUND",
                "quantity": 0,
                "price": {
                  "amount": 0,
                  "currency": "string"
                },
                "taxes": [
                  {
                    "amount": {
                      "amount": 0,
                      "currency": "string"
                    },
                    "code": "string",
                    "rate": 0,
                    "seller_collectible": {
                      "amount": 0,
                      "currency": "string"
                    },
                    "channel_collectible": {
                      "amount": 0,
                      "currency": "string"
                    }
                  }
                ],
                "shipping_price": {
                  "amount": 0,
                  "currency": "string"
                },
                "shipping_taxes": [
                  {
                    "amount": {
                      "amount": 0,
                      "currency": "string"
                    },
                    "code": "string",
                    "rate": 0,
                    "seller_collectible": {
                      "amount": 0,
                      "currency": "string"
                    },
                    "channel_collectible": {
                      "amount": 0,
                      "currency": "string"
                    }
                  }
                ]
              }
            ],
            "custom_attributes": [
              {
                "id": "string",
                "type": "STRING"
              }
            ],
            "ship_from": {
              "warehouse": {
                "id": "string"
              }
            }
          }
        ],
        "status_reason": "ACCEPTANCE_TIMEOUT",
        "fulfillment": {
          "type": "FULFILLED_BY_SELLER",
          "code": "string"
        },
        "billing_info": {
          "address": {
            "last_name": "string",
            "street": "string",
            "city": "string",
            "first_name": "string",
            "company": "string",
            "street_additional_info": "string",
            "state": "string",
            "country": "string",
            "country_iso_code": "string",
            "zip_code": "string",
            "phone": "string",
            "additional_info": "string"
          }
        },
        "has_incident": true,
        "custom_attributes": [
          {
            "id": "string",
            "type": "STRING"
          }
        ],
        "sub_channel_code": "string"
      }
    ]
  }'

Responses

No Content

Response
No content