# SOR04 - Update an order Note: closed or cancelled order cannot be updated. Endpoint: PUT /api/mms/orders/{order_id} ## Path parameters: - `order_id` (string, required) The identifier of the order to be updated ## Query parameters: - `shop_id` (integer) Use this parameter when your user has access to several shops. If not specified, the shop_id from your default shop will be used. ## Request fields (application/json): - `booking` (object) Booking information to update for this order. - `booking.type` (string) Enum: "NO_BOOKING", "DATETIME_REQUEST", "SCHEDULED_EVENTS" - `custom_attribute_values` (array) Order custom attribute values to update.Only specified custom attribute values will be updated. In order to delete a custom attribute value, set it to null. - `custom_attribute_values.code` (string, required) Custom attribute code - `custom_attribute_values.type` (string, required) Custom attribute field type Enum: "BOOLEAN", "DATE_TIME", "INTEGER", "DECIMAL", "TEXT", "LONG_TEXT", "VALUE_LIST", "LINK", "VIDEO" - `custom_attribute_values.value` (object, required) Custom attribute value - `price` (object) New price for this order. - `price.options` (array) Order pricing options to update. Only specified pricing options will be updated (non specified pricing option will be ignored).Please note that the seller can only update pricing options when the order's state is 'Waiting for Consuming'. - `price.options.code` (string, required) Option code ## Response 200 fields (application/json): - `booking` (object, required) Order booking information - `booking.type` (string, required) Enum: "NO_BOOKING", "DATETIME_REQUEST", "SCHEDULED_EVENTS" - `can_evaluate` (boolean, required) Indicates if the order can be evaluated by the customer - `commercial_order_id` (string, required) Order commercial ID - `commission` (object) Order commission - `commission.amount_excluding_taxes` (number) Order commission amount, shop taxes excluded - `commission.amount_including_taxes` (number) Order commission amount, shop taxes included - `commission.commission_taxes` (array) Shop commission taxes - `commission.commission_taxes.amount` (number, required) Tax amount - `commission.commission_taxes.code` (string, required) Tax code - `consumption` (object, required) Order consumption information - `currency_code` (string, required) Order currency ISO Code - `custom_attribute_values` (array, required) Custom attribute values defined on the order - `custom_attribute_values.code` (string, required) Custom attribute code - `custom_attribute_values.label` (string, required) Custom attribute label - `custom_attribute_values.type` (string, required) Custom attribute field type Enum: "BOOLEAN", "DATE_TIME", "INTEGER", "DECIMAL", "TEXT", "LONG_TEXT", "VALUE_LIST", "LINK", "VIDEO" - `custom_attribute_values.value` (object) Custom attribute field value - `customer` (object) Customer who purchased the service.The node customer is not present when: the order is not yet accepted the order is cancelled or closed and was never accepted - `customer.billing_address` (object, required) Billing address of the customer - `customer.billing_address.city` (string, required) City of the address - `customer.billing_address.civility` (string) Civility of the person associated with the address - `customer.billing_address.company` (string) Company of the person associated with the address - `customer.billing_address.complementary` (string) Complementary information line of the street of the address - `customer.billing_address.country` (string, required) Country of the address - `customer.billing_address.country_code` (string, required) Country ISO 3166-1 alpha-3 code of the address, used by Mirakl to format the address (back-office, delivery bill, invoices...) Enum: "AFG", "ALA", "ALB", "DZA", "ASM", "AND", "AGO", "AIA", "ATA", "ATG", "ARG", "ARM", "ABW", "AUS", "AUT", "AZE", "BHS", "BHR", "BGD", "BRB", "BLR", "BEL", "BLZ", "BEN", "BMU", "BTN", "BOL", "BES", "BIH", "BWA", "BVT", "BRA", "IOT", "BRN", "BGR", "BFA", "BDI", "KHM", "CMR", "CAN", "CPV", "CYM", "CAF", "TCD", "CHL", "CHN", "CXR", "CCK", "COL", "COM", "COG", "COD", "COK", "CRI", "CIV", "HRV", "CUB", "CUW", "CYP", "CZE", "DNK", "DJI", "DMA", "DOM", "ECU", "EGY", "SLV", "GNQ", "ERI", "EST", "ETH", "FLK", "FRO", "FJI", "FIN", "FRA", "GUF", "PYF", "ATF", "GAB", "GMB", "GEO", "DEU", "GHA", "GIB", "GRC", "GRL", "GRD", "GLP", "GUM", "GTM", "GGY", "GIN", "GNB", "GUY", "HTI", "HMD", "VAT", "HND", "HKG", "HUN", "ISL", "IND", "IDN", "IRQ", "IRL", "IMN", "ISR", "ITA", "JAM", "JPN", "JEY", "JOR", "KAZ", "KEN", "KIR", "KOR", "KWT", "KGZ", "LAO", "LVA", "LBN", "LSO", "LBR", "LBY", "LIE", "LTU", "LUX", "MAC", "MKD", "MDG", "MWI", "MYS", "MDV", "MLI", "MLT", "MHL", "MTQ", "MRT", "MUS", "MYT", "MEX", "FSM", "MDA", "MCO", "MNG", "MNE", "MSR", "MAR", "MOZ", "MMR", "NAM", "NRU", "NPL", "NLD", "NCL", "NZL", "NIC", "NER", "NGA", "NIU", "NFK", "MNP", "NOR", "OMN", "PAK", "PLW", "PSE", "PAN", "PNG", "PRY", "PER", "PHL", "PCN", "POL", "PRT", "PRI", "QAT", "REU", "ROU", "RUS", "RWA", "BLM", "SHN", "KNA", "LCA", "MAF", "SPM", "VCT", "WSM", "SMR", "STP", "SAU", "SEN", "SRB", "SYC", "SLE", "SGP", "SXM", "SVK", "SVN", "SLB", "SOM", "ZAF", "SGS", "SSD", "ESP", "LKA", "SUR", "SJM", "SWZ", "SWE", "CHE", "TWN", "TJK", "TZA", "THA", "TLS", "TGO", "TKL", "TON", "TTO", "TUN", "TUR", "TKM", "TCA", "TUV", "UGA", "UKR", "ARE", "GBR", "USA", "UMI", "URY", "UZB", "VUT", "VEN", "VNM", "VGB", "VIR", "WLF", "YEM", "ZMB", "ZWE" - `customer.billing_address.first_name` (string) First name of the person associated with the address - `customer.billing_address.last_name` (string, required) Last name of the person associated with the address - `customer.billing_address.state` (string) State of the address - `customer.billing_address.street1` (string, required) First information line of the street of the address - `customer.billing_address.street2` (string) Second information line of the street of the address - `customer.billing_address.zip_code` (string) Zip code of the address - `customer.civility` (string) Civility of the customer - `customer.first_name` (string) First name of the customer - `customer.id` (string, required) Identifier of the customer - `customer.last_name` (string) Last name of the customer - `customer.locale` (string) RFC 3066 code of the customer's locale - `customer.phone_number` (string) Phone number of the customer - `customer_notification_email` (string) Anonymized customer email usable for notifications that do not expect an answer - `date_accepted` (string) Order acceptance date - `date_created` (string, required) Order creation date - `date_updated` (string, required) Order last modification date - `has_open_incident` (boolean) true if order has an incident open - `id` (string, required) Order ID - `location` (object, required) Order location - `price` (object) Order price - `price.options` (array) Order pricing options. The list is ordered as configured by the operator at the time of the order. - `price.options.code` (string, required) Option code - `price.options.label` (string, required) Option label - `refunds` (array) The list of refunds, sorted by creation date in ascending order - `refunds.amount` (number, required) Amount which was refunded. If taxes or options are also present, this amount is considered as 'excluding taxes and options' and the total amount of the refund can be determined by adding this amount, all tax amounts and all options amounts. - `refunds.commission` (object, required) Refunded commission - `refunds.creation_date` (string, required) Refund creation date - `refunds.id` (string, required) Refund ID - `refunds.options` (array) Pricing options - `refunds.reason_code` (string, required) Refund reason code - `refunds.state` (string, required) Refund state Enum: "WAITING", "OK" - `refunds.taxes` (array, required) Tax amounts - `refunds.taxes.amount` (number, required) Amount of the tax - `refunds.taxes.code` (string, required) Code of the tax - `refunds.transaction_date` (string) Transaction number/code - `refunds.transaction_number` (string) Transaction date - `service` (object, required) The service that was purchased - `service.category` (object, required) Service category - `service.category.code` (string, required) Category code - `service.category.label` (string, required) Category label - `service.code` (string, required) Service code - `service.custom_attribute_values` (array, required) Custom attribute values defined on the service - `service.description` (string) Service description - `service.medias` (array) Service medias - `service.medias.mime_type` (string, required) Media Mime type - `service.medias.url` (string, required) Media URL - `service.model` (object, required) Service model - `service.model.code` (string, required) Service model code - `service.model.label` (string, required) Service model label - `service.title` (string, required) Service title - `state` (string, required) Order state Enum: "WAITING_SCORING", "SCORING_OK", "SCORING_KO", "WAITING_ACCEPTANCE", "ORDER_ACCEPTED", "ORDER_REFUSED", "ORDER_PENDING", "ORDER_CONSUMED", "ORDER_EXPIRED", "ORDER_CLOSED", "ORDER_CANCELLED" - `warnings` (array) A list of warnings that should be checked before validating the order Enum: "PRICE_MISMATCH", "SERVICE_INACTIVE", "MAX_PER_ORDER_EXCEEDED", "STOCK_EXCEEDED", "LOCATION_MISMATCH", "LOCATION_NOT_COVERING_CLIENT_ADDRESS", "DATETIME_REQUEST_OPENING_HOURS_MISMATCH", "DATETIME_REQUEST_DURATION_MISMATCH", "DATETIME_REQUEST_IN_PAST", "PRICING_OPTION_AMOUNT_MISMATCH", "SCHEDULED_EVENT_ALREADY_STARTED", "SCHEDULED_EVENT_ALREADY_ENDED", "SCHEDULED_EVENT_FULLY_BOOKED" - `workflow` (object, required) Order workflow - `workflow.type` (string, required) Order workflow type Enum: "PAY_ON_ACCEPTANCE", "PAY_AFTER_CONSUMPTION"