---
title: "Add/update markets"
method: POST
path: "/api/v1/markets"
tags: ["Products and markets"]
---

# Add/update markets

`POST /api/v1/markets`

## Request

- Base URL: `https://yespo.io` (the document declares no server; this is the origin it was published from)
- URL: `https://yespo.io/api/v1/markets`
- Auth: HTTP basic

## Request body

- MarketSyncRequest: Markets sync request
  - `siteId` string: Client site/account identifier
  - `markets` MarketRequest[]: Markets with product-specific patches
    - `marketId` string: Client-defined market identifier
    - `products` MarketProductRequest[]: Market product patches
      - `productId` string: Product identifier matching the base product identity
      - `updatedDate` string: Source ordering timestamp in UTC
      - `price` number: Market-specific selling price
      - `oldPrice` number: Market-specific original price
      - `currency` string: ISO 4217 currency code
      - `isInStock` integer: Market-specific availability: 1 = in stock, 0 = out of stock
      - `urls` object: Market-specific URLs keyed by BCP 47 language code
      - `remove` MarketProductRemovePatch: Market product remove patch
        - `fields` string[]: Market product fields to remove
        - `urlsTranslations` string[]: URL translation language codes to remove

## Response `200`

Markets accepted

## Other responses

- `207`: Markets partially accepted
- `400`: Bad request
- `413`: Request entity too large
- `429`: Too many requests
- `502`: Downstream service error

---

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