Update Market
Update an existing market.
Endpoint: PUT /api/v1/integration/markets/{id}
Authentication: Required (Bearer token)
Required Headers:
Authorization: Bearer <access_token>
X-Target-Server: integration
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string (UUID) | Yes | Market ID |
Request Body
All fields are optional. Only include the fields you want to update. The webhook field is optional - you can update it, remove it, or leave it unchanged.
Update with Webhook:
{
"domain": "updated-domain.com",
"webhook": {
"host": "https://webhook2.example.com",
"path": "/webhook",
"method": 1,
"authentication": {
"type": 1,
"username": "user2",
"password": "pass2"
},
"timeout": 30
}
}
Update without Webhook (remove webhook):
{
"domain": "updated-domain.com",
"webhook": null
}
Update only domain (keep existing webhook):
{
"domain": "updated-domain.com"
}
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
domain | string | No | Market domain |
webhook | object | null | No | Webhook configuration (optional, set to null to remove) |
webhook.host | string | No | Webhook host URL |
webhook.path | string | No | Webhook path |
webhook.method | integer | No | HTTP method (1=GET, 2=POST, etc.) |
webhook.authentication | object | No | Authentication configuration |
webhook.authentication.type | integer | No | Authentication type (1=Basic, 2=Token) |
webhook.authentication.username | string | No | Username (required if type=1) |
webhook.authentication.password | string | No | Password (required if type=1) |
webhook.timeout | integer | No | Request timeout in seconds |
Response
Status: 200 OK
Returns the updated market object.
{
"id": "262bed05-5a0e-4fff-8171-39fafab66b0c",
"node_id": "e40efce4-38a3-46c4-a202-e8db95d0409c",
"domain": "updated-domain.com",
"webhook": {
"host": "https://webhook2.example.com",
"path": "/webhook",
"method": "GET",
"authentication": {
"type": 1,
"username": "user2",
"password": "pass2"
},
"timeout": 30
},
"created_at": "2025-12-11T14:00:26.023564Z",
"updated_at": "2025-12-11T14:03:47.361795Z"
}
Example cURL Request
curl -X PUT 'https://<base-url>/api/v1/integration/markets/262bed05-5a0e-4fff-8171-39fafab66b0c' \
-H "Content-Type: application/json" \
-H "X-Target-Server: integration" \
-H "Authorization: Bearer <access_token>" \
-d '{
"domain": "updated-domain.com",
"webhook": {
"host": "https://webhook2.example.com",
"path": "/webhook",
"method": 1,
"authentication": {
"type": 1,
"username": "user2",
"password": "pass2"
},
"timeout": 30
}
}'