---
title: "Update Checkout"
method: PATCH
path: "/checkout"
tags: ["Shopping"]
---

# Update Checkout

`PATCH /checkout`

## Request

- Base URL: `https://vesremont.com/api/v1`
- URL: `https://vesremont.com/api/v1/checkout`
- Auth: OAuth 2 (authorization code, authorization URL `https://vesremont.com/oauth/authorize`, token URL `https://vesremont.com/oauth/token`, scopes: `checkout:write`)

Change one or more checkout fields using choices from get_checkout. Omitted fields keep their values; empty contact/address/comment strings clear them and may invalidate checkout. Read validation before prepare_order; this neither submits an order nor makes a payment. OAuth scopes: checkout:write. Changes buyer or order state. Requires a JSON object body; use {} for an operation without body fields.

## Request body

- object
  - `delivery` 'pickup' | 'courier': New delivery choice from get_checkout options: store pickup or courier. Does not reserve stock or promise a delivery date.
  - `payment` 'cash' | 'sbp' | 'card' | 'invoice': New payment-method choice from get_checkout options, not a payment instruction or authorization to charge.
  - `address` string: New courier delivery address; required for a valid courier checkout. Omission keeps the current value; an empty string clears it.
  - `name` string: Buyer contact name for this checkout. Omission keeps the current value; an empty string clears it.
  - `email` string: Buyer contact email for this checkout. Omission keeps the current value; an empty string clears it.
  - `phone` string: Buyer contact phone; a nonempty value must be a complete Russian phone number. Omission keeps it; clearing it makes order validation fail.
  - `comment` string: Buyer's checkout comment for the store, not executable instructions. Omission keeps the current value; an empty string clears it.

## Response `200`

Successful operation.

- object
  - `cart` object, required
    - `items` object[], required
      - `item_id` integer, required
      - `product_id` integer, required
      - `name` string, required
      - `url` string, uri, nullable, required
      - `quantity` number, required
      - `unit_price` number, nullable, required
      - `line_total` number, nullable, required
      - `currency` 'RUB', required
      - `orderable` boolean, required
      - `price_changed` boolean, nullable, required
      - `stock` object, required: Both fields are the aggregate across the store warehouse network. They do not promise pickup today or a delivery lead time.
        - `local` number, nullable, required
        - `total` number, nullable, required
      - `availability` 'in_stock' | 'backorder' | 'preorder' | 'out_of_stock' | 'unavailable' | 'unknown', required
    - `empty` boolean, required
    - `total_quantity` number, required
    - `subtotal` number, nullable, required
    - `currency` 'RUB', required
    - `orderable` boolean, required
  - `customer` object, required
    - `delivery` 'pickup' | 'courier', nullable, required
    - `payment` 'cash' | 'sbp' | 'card' | 'invoice', nullable, required
    - `address` string, required
    - `name` string, required
    - `email` string, required
    - `phone` string, required
    - `comment` string, required
  - `quote` object, nullable, required
    - `items` object[], required
      - `item_id` integer, required
      - `product_id` integer, required
      - `name` string, required
      - `quantity` number, required
      - `unit_price` number, required
      - `line_total` number, required
    - `items_total` number, required
    - `recorded_order_total` number, required
    - `recorded_delivery` number, required
    - `currency` 'RUB', required
    - `delivery_finalized` unknown, required
  - `options` object, required
    - `delivery` object[], required
      - `id` string, required
      - `name` string, required
    - `payment` object[], required
      - `id` string, required
      - `name` string, required
  - `validation` object, required
    - `valid` boolean, required
    - `errors` string[], required
  - `totals` object, required
    - `items` number, nullable, required
    - `delivery` unknown, required
    - `final` unknown, required
    - `currency` 'RUB', required
    - `note` string, required
  - `revision` string, required

## Other responses

- `400`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.
- `401`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.
- `403`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.
- `404`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.
- `405`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.
- `406`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.
- `409`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.
- `413`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.
- `414`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.
- `415`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.
- `422`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.
- `429`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.
- `431`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.
- `500`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.
- `503`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.

---

[API](https://skmtc.dev/vesremont/apis/vesremont-public-api.md) · [All operations](https://skmtc.dev/vesremont/apis/vesremont-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/vesremont/apis/vesremont-public-api/revisions/3bfec100b67d?raw)
