---
title: "Update order state"
method: PUT
path: "/merchants/{merchant_ref}/orders/{order_ref_1}"
tags: ["Order Update"]
---

# Update order state

`PUT /merchants/{merchant_ref}/orders/{order_ref_1}`

## Path parameters

- `order_ref_1` string, required
- `merchant_ref` string, required

## Request body

- Order
  - `order` object
    - `merchant` object, required — Fields describing the merchant and the store integration
      - `id` string, required — Merchant identifier. Also called merchant_ref. Example: "s1"
      - `store_ref` string — Permanent identifier for the store where the checkout takes place. Mandatory for multistore merchants and physical stores, not permitted for others. Example: "maquinista"
    - `merchant_reference` object — Order id(s) used by the merchant
      - `order_ref_1` string — Merchant reference 1. Example: "ZXCV1234"
      - `order_ref_2` string — Merchant reference 2. Example: "0080-1234-4343-5353"
    - `unshipped_cart` object — Fields describing the unshipped items
      - `currency` string — Name of currency used on the purchase. Example: "EUR"
      - `order_total_with_tax` integer — Total value with tax of the items listed below. Example: 5097
      - `items` unknown[] — List of unshipped items in the order. The list can contain zero or more instances of each item type
        - unknown
    - `shipped_cart` object — Fields describing the shipped items
      - `currency` string — Name of currency used on the purchase. Example: "EUR"
      - `order_total_with_tax` integer — Total value with tax of the items listed below. Example: 5097
      - `items` unknown[] — List of shipped items in the order. The list can contain zero or more instances of each item type
        - unknown
    - `cancellation_reason` 'change' | 'change_payment_method' | 'customer_cancel' | 'out_of_stock' | 'other' | 'null', nullable — String containing the cancellation reason when clearing an order. Example: "customer_cancel"
    - `delivery_method` object — Delivery method used on the purchase
      - `name` string — Name of the delivery method. Example: "SEUR24"
      - `days` string — Days it takes to deliver the goods. Example: "¡Entrega día siguiente!"
      - `provider` string — Company or agent that performs the delivery. Example: "Correos"
      - `home_delivery` boolean — If goods are delivered to the buyer's home or office and not to a pick-up place. Example: true
    - `delivery_address` object — Fields describing the delivery address
      - `given_names` string — Shopper's given names for delivery. Example: 'Maria José'
      - `surnames` string — Shopper's surnames for delivery. Example: 'Barroso Rajoy'
      - `company` string — Shopper company name
      - `address_line_1` string — Delivery address line 1. Example: "C/ Aragó 383"
      - `address_line_2` string — Delivery address line 2. Example: "5º"
      - `postal_code` string — Delivery address address postal code. Example: "08013"
      - `city` string — Delivery address city. Example: "Barcelona"
      - `country_code` 'AF' | 'AX' | 'AL' | 'DZ' | 'AS' | 'AD' | 'AO' | 'AI' | 'AQ' | 'AG' | 'AR' | 'AM' | 'AW' | 'AU' | 'AT' | 'AZ' | 'BS' | 'BH' | 'BD' | 'BB' | 'BY' | 'BE' | 'BZ' | 'BJ' | 'BM' | 'BT' | 'BO' | 'BQ' | 'BA' | 'BW' | 'BV' | 'BR' | 'IO' | 'BN' | 'BG' | 'BF' | 'BI' | 'CV' | 'KH' | 'CM' | 'CA' | 'KY' | 'CF' | 'TD' | 'CL' | 'CN' | 'CX' | 'CC' | 'CO' | 'KM' | 'CD' | 'CG' | 'CK' | 'CR' | 'CI' | 'HR' | 'CU' | 'CW' | 'CY' | 'CZ' | 'DK' | 'DJ' | 'DM' | 'DO' | 'EC' | 'EG' | 'SV' | 'GQ' | 'ER' | 'EE' | 'SZ' | 'ET' | 'FK' | 'FO' | 'FJ' | 'FI' | 'FR' | 'GF' | 'PF' | 'TF' | 'GA' | 'GM' | 'GE' | 'DE' | 'GH' | 'GI' | 'GR' | 'GL' | 'GD' | 'GP' | 'GU' | 'GT' | 'GG' | 'GN' | 'GW' | 'GY' | 'HT' | 'HM' | 'VA' | 'HN' | 'HK' | 'HU' | 'IS' | 'IN' | 'ID' | 'IR' | 'IQ' | 'IE' | 'IM' | 'IL' | 'IT' | 'JM' | 'JP' | 'JE' | 'JO' | 'KZ' | 'KE' | 'KI' | 'KP' | 'KR' | 'KW' | 'KG' | 'LA' | 'LV' | 'LB' | 'LS' | 'LR' | 'LY' | 'LI' | 'LT' | 'LU' | 'MO' | 'MG' | 'MW' | 'MY' | 'MV' | 'ML' | 'MT' | 'MH' | 'MQ' | 'MR' | 'MU' | 'YT' | 'MX' | 'FM' | 'MD' | 'MC' | 'MN' | 'ME' | 'MS' | 'MA' | 'MZ' | 'MM' | 'NA' | 'NR' | 'NP' | 'NL' | 'NC' | 'NZ' | 'NI' | 'NE' | 'NG' | 'NU' | 'NF' | 'MK' | 'MP' | 'NO' | 'OM' | 'PK' | 'PW' | 'PS' | 'PA' | 'PG' | 'PY' | 'PE' | 'PH' | 'PN' | 'PL' | 'PT' | 'PR' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'BL' | 'SH' | 'KN' | 'LC' | 'MF' | 'PM' | 'VC' | 'WS' | 'SM' | 'ST' | 'SA' | 'SN' | 'RS' | 'SC' | 'SL' | 'SG' | 'SX' | 'SK' | 'SI' | 'SB' | 'SO' | 'ZA' | 'GS' | 'SS' | 'ES' | 'LK' | 'SD' | 'SR' | 'SJ' | 'SE' | 'CH' | 'SY' | 'TW' | 'TJ' | 'TZ' | 'TH' | 'TL' | 'TG' | 'TK' | 'TO' | 'TT' | 'TN' | 'TR' | 'TM' | 'TC' | 'TV' | 'UG' | 'UA' | 'AE' | 'GB' | 'UM' | 'US' | 'UY' | 'UZ' | 'VU' | 'VE' | 'VN' | 'VG' | 'VI' | 'WF' | 'EH' | 'YE' | 'ZM' | 'ZW' — Delivery address country code
      - `phone` string — Shopper phone. Can be a mobile phone. Example: "933 033 033"
      - `mobile_phone` string — Shopper mobile phone. Only use this field if the shopper indicated that this number is a mobile phone. Example: "615 615 615"
      - `state` string — Shopper region or state. Example: "Barcelona"
      - `extra` string — Extra handling information that the shopper adds to the order. Example: "I'm home between 9 and 12."
      - `vat_number` string — Shopper VAT number. Example: "B12345"
    - `invoice_address` object — Fields describing the invoice address
      - `given_names` string — Shopper's given names for invoice. Example: "Maria José"
      - `surnames` string — Shopper's surnames for invoice. Example: "Barroso Rajoy"
      - `company` string — Shopper company name
      - `address_line_1` string — Invoice address line 1. Example: "C/ Aragó 383"
      - `address_line_2` string — Invoice address line 2. Example: "5º"
      - `postal_code` string — Invoice address address postal code. Example: "08013"
      - `city` string — Invoice address city. Example: "Barcelona"
      - `country_code` 'AF' | 'AX' | 'AL' | 'DZ' | 'AS' | 'AD' | 'AO' | 'AI' | 'AQ' | 'AG' | 'AR' | 'AM' | 'AW' | 'AU' | 'AT' | 'AZ' | 'BS' | 'BH' | 'BD' | 'BB' | 'BY' | 'BE' | 'BZ' | 'BJ' | 'BM' | 'BT' | 'BO' | 'BQ' | 'BA' | 'BW' | 'BV' | 'BR' | 'IO' | 'BN' | 'BG' | 'BF' | 'BI' | 'CV' | 'KH' | 'CM' | 'CA' | 'KY' | 'CF' | 'TD' | 'CL' | 'CN' | 'CX' | 'CC' | 'CO' | 'KM' | 'CD' | 'CG' | 'CK' | 'CR' | 'CI' | 'HR' | 'CU' | 'CW' | 'CY' | 'CZ' | 'DK' | 'DJ' | 'DM' | 'DO' | 'EC' | 'EG' | 'SV' | 'GQ' | 'ER' | 'EE' | 'SZ' | 'ET' | 'FK' | 'FO' | 'FJ' | 'FI' | 'FR' | 'GF' | 'PF' | 'TF' | 'GA' | 'GM' | 'GE' | 'DE' | 'GH' | 'GI' | 'GR' | 'GL' | 'GD' | 'GP' | 'GU' | 'GT' | 'GG' | 'GN' | 'GW' | 'GY' | 'HT' | 'HM' | 'VA' | 'HN' | 'HK' | 'HU' | 'IS' | 'IN' | 'ID' | 'IR' | 'IQ' | 'IE' | 'IM' | 'IL' | 'IT' | 'JM' | 'JP' | 'JE' | 'JO' | 'KZ' | 'KE' | 'KI' | 'KP' | 'KR' | 'KW' | 'KG' | 'LA' | 'LV' | 'LB' | 'LS' | 'LR' | 'LY' | 'LI' | 'LT' | 'LU' | 'MO' | 'MG' | 'MW' | 'MY' | 'MV' | 'ML' | 'MT' | 'MH' | 'MQ' | 'MR' | 'MU' | 'YT' | 'MX' | 'FM' | 'MD' | 'MC' | 'MN' | 'ME' | 'MS' | 'MA' | 'MZ' | 'MM' | 'NA' | 'NR' | 'NP' | 'NL' | 'NC' | 'NZ' | 'NI' | 'NE' | 'NG' | 'NU' | 'NF' | 'MK' | 'MP' | 'NO' | 'OM' | 'PK' | 'PW' | 'PS' | 'PA' | 'PG' | 'PY' | 'PE' | 'PH' | 'PN' | 'PL' | 'PT' | 'PR' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'BL' | 'SH' | 'KN' | 'LC' | 'MF' | 'PM' | 'VC' | 'WS' | 'SM' | 'ST' | 'SA' | 'SN' | 'RS' | 'SC' | 'SL' | 'SG' | 'SX' | 'SK' | 'SI' | 'SB' | 'SO' | 'ZA' | 'GS' | 'SS' | 'ES' | 'LK' | 'SD' | 'SR' | 'SJ' | 'SE' | 'CH' | 'SY' | 'TW' | 'TJ' | 'TZ' | 'TH' | 'TL' | 'TG' | 'TK' | 'TO' | 'TT' | 'TN' | 'TR' | 'TM' | 'TC' | 'TV' | 'UG' | 'UA' | 'AE' | 'GB' | 'UM' | 'US' | 'UY' | 'UZ' | 'VU' | 'VE' | 'VN' | 'VG' | 'VI' | 'WF' | 'EH' | 'YE' | 'ZM' | 'ZW' — Invoice address country code
      - `phone` string — Shopper phone. Can be a mobile phone. Example: "933 033 033"
      - `mobile_phone` string — Shopper mobile phone. Only use this field if the shopper indicated that this number is a mobile phone. Example: "615 615 615"
      - `state` string — Shopper region or state. Example: "Barcelona"
      - `extra` string — Extra handling information that the shopper adds to the order. Example: "I'm home between 9 and 12."
      - `vat_number` string — Shopper VAT number. Example: "B12345"
    - `customer` object — Fields describing the customer
      - `given_names` string — Customer given names. Example: "Maria José"
      - `surnames` string — Customer surnames. Example: "Barroso Rajoy"
      - `email` string, email — Customer email. Example: "nisse@example.com"
      - `ref` union — Customer reference number in the shop's database. Example: 123.
        - string
        - integer
      - `date_of_birth` string, date — Customer date of birth in ISO-8601 format. Example: "1980-01-20"
      - `nin` string — Customer's national identity number. For Spanish DNI, please include final letter. Example: "13003009L"
      - `company` string — Shopper company name.
      - `vat_number` string — Shopper VAT number. Example: "B12345".
      - `rating` integer — The merchant's rating of this customer. 0 to 100, inclusive, where 0 is "cannot be trusted" and 100 is "very trustworthy". Example: 100
      - `nin_control` string — A validation code printed in the physical DNI or NIE. Required for multistore merchants and physical stores. Example: "15012018F2"
    - `platform` object — Fields describing the store platform
      - `name` string — Name of the platform. Use your shop name. Plugins for "standard" platforms will use that name. Example: "www.theshop.es"
      - `version` string — Version of the platform. If you don't use explicit versioning, use a release date instead. Example: "1.1"
      - `plugin_version` string — Version of the plugin or platform module. If you don't use explicit versioning, use a release date instead. Example: "1.0.2"
      - `uname` string — uname of the shop server. In PHP, use php_uname(). Example: "Darwin roatan.local 13.0.0 Darwin Kernel Version 13.0... x86_64"
      - `db_name` string — DB used. Example: "mysql"
      - `db_version` string — Version of the DB. Example: "1.2.3"
      - `php_version` string — PHP interpreter version. Example: "5.4.1.7"

## Response `202`

Update order

## Other responses

- `401` — Unauthorized
- `403` — Access forbidden
- `409` — Conflict

---

[API](https://skmtc.dev/sequra/apis/checkout-api.md) · [All operations](https://skmtc.dev/sequra/apis/checkout-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sequra/checkout-api/revisions/2b0b60c52d04/schema)
