• Pricing
  • Blog
Log inBook a demo
Create market POSTDelete market DELETEGet market GETList markets GETUpdate market PATCH
System status
DocumentationKnowledge BaseBuild with AIAPI ReferenceWebhooks

Update market

Replace the name, countries, and metadata of a market.

PATCH
/markets/{id}

Replace the name, countries, and metadata of a market.

Authorization

ApiKeyAuth
x-api-key<token>

In: header

Path Parameters

id*string

Header Parameters

Idempotency-Key?string

Unique key used to safely retry this write for 24 hours without applying it twice.

Length1 <= length <= 200

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/markets/string" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "countryCodes": [      "st"    ]  }'
{  "id": "string",  "name": "string",  "countryCodes": [    "string"  ],  "metadata": {    "property1": null,    "property2": null  },  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "object": "market",  "livemode": true}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}

List markets GET

List reusable country groups that resolve market-specific prices independently from currency.

Create offer POST

Create reusable offer terms without assigning a plan, price, eligibility rule, or distribution channel.

name*string
Length1 <= length
countryCodes*array<>
Items1 <= items
metadata?