# upsertOrders - Upsert orders Use this API to synchronize orders with Mirakl Connect. 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. Endpoint: POST /v1/orders Security: Bearer ## Request fields (application/json): - `orders` (array, required) - `orders.billing_info` (object) - `orders.billing_info.address` (object) - `orders.billing_info.address.additional_info` (string) - `orders.billing_info.address.city` (string, required) - `orders.billing_info.address.company` (string) - `orders.billing_info.address.country` (string) - `orders.billing_info.address.country_iso_code` (string) - `orders.billing_info.address.first_name` (string) - `orders.billing_info.address.last_name` (string, required) - `orders.billing_info.address.phone` (string) - `orders.billing_info.address.state` (string) - `orders.billing_info.address.street` (string, required) - `orders.billing_info.address.street_additional_info` (string) - `orders.billing_info.address.zip_code` (string) - `orders.channel_order_id` (string, required) - `orders.channel_updated_at` (string, required) - `orders.created_at` (string, required) - `orders.custom_attributes` (array) Custom attributes - `orders.custom_attributes.id` (string, required) Attribute's id - `orders.custom_attributes.type` (string, required) The attribute's type Enum: "STRING", "NUMERIC", "BOOLEAN", "DATE", "LIST" - `orders.fulfillment` (object, required) - `orders.fulfillment.code` (string) - `orders.fulfillment.type` (string, required) Enum: "FULFILLED_BY_SELLER", "FULFILLED_BY_PARTNER" - `orders.has_incident` (boolean) - `orders.order_lines` (array, required) - `orders.order_lines.adjustments` (array) - `orders.order_lines.adjustments.channel_adjustment_id` (string, required) - `orders.order_lines.adjustments.price` (object, required) - `orders.order_lines.adjustments.price.amount` (number, required) - `orders.order_lines.adjustments.price.currency` (string, required) - `orders.order_lines.adjustments.quantity` (integer, required) - `orders.order_lines.adjustments.reason` (string, required) Enum: "CUSTOMER_CANCELATION", "OUT_OF_STOCK", "RETURN", "ITEM_NOT_RECEIVED", "AGREEMENT", "DEFECT", "UNABLE_TO_DELIVER", "CHANNEL_SPECIFIC" - `orders.order_lines.adjustments.shipping_price` (object, required) - `orders.order_lines.adjustments.shipping_taxes` (array) - `orders.order_lines.adjustments.shipping_taxes.rate` (number) - `orders.order_lines.adjustments.taxes` (array) - `orders.order_lines.can_cancel` (boolean, required) - `orders.order_lines.can_refund` (boolean, required) - `orders.order_lines.channel_order_line_id` (string, required) Ensure uniqueness of this ID across all orders of a channel. - `orders.order_lines.product` (object, required) - `orders.order_lines.product.id` (string, required) - `orders.order_lines.product.thumbnail_url` (string) - `orders.order_lines.product.title` (string, required) - `orders.order_lines.status` (string, required) Enum: "AWAITING_ACCEPTANCE", "AWAITING_FRAUD_CHECK", "AWAITING_PAYMENT", "AWAITING_SHIPMENT", "CHANNEL_SPECIFIC", "CLOSED", "DELIVERED", "SHIPPED" - `orders.order_lines.status_reason` (string) Enum: "ACCEPTANCE_TIMEOUT", "AUTOMATICALLY_CLOSED", "CANCELED", "FRAUD_CHECK_FAILED", "FRAUD_CHECK_TIMEOUT", "PAYMENT_TIMEOUT", "REFUNDED", "REFUSED", "REFUSED_PAYMENT" - `orders.order_lines.total_shipping_price` (object, required) - `orders.order_lines.updated_at` (string, required) - `orders.shipping_info` (object, required) - `orders.shipping_info.carrier` (string) - `orders.shipping_info.delivery_date` (object) - `orders.shipping_info.delivery_date.earliest` (string, required) - `orders.shipping_info.delivery_date.latest` (string, required) - `orders.shipping_info.email` (string) - `orders.shipping_info.method` (string) - `orders.shipping_info.pudo_id` (string) - `orders.shipping_info.shipping_deadline` (string) - `origin` (object, required) - `origin.channel_id` (string, required) Unique identifier of the sales channel - `origin.channel_store_id` (string, required) Store identifier on the sales channel. ## Response 400 fields (application/json): - `code` (string, required) Error code (immutable) - `errors` (array) - `errors.extensions` (object) Free map where you find additional context data to better describe the error - `errors.field` (string) JsonPath to the field where the error occurred - `errors.message` (string, required) Literal string error item description (Please do not base your error handling on this field since it is subject to change) - `message` (string, required) Literal string error description (Please do not base your error handling on this field since it is subject to change)