Перейти к основному содержанию
PUT
/
v1
/
website
/
products
/
{id}
cURL
curl --request PUT \
  --url https://api.example.com/v1/website/products/{id}/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "type": "set",
  "unique_id": "<string>",
  "price": "<string>",
  "amount": -1,
  "object_id": 0,
  "slug": "<string>",
  "category": 123,
  "image": "<string>",
  "discount": 123,
  "discount_start_at": "2023-11-07T05:31:56Z",
  "discount_end_at": "2023-11-07T05:31:56Z",
  "extra": "<unknown>",
  "order": -1,
  "published": true
}
'
{
  "id": 123,
  "name": "<string>",
  "type": "set",
  "unique_id": "<string>",
  "price": "<string>",
  "amount": -1,
  "object_id": 0,
  "slug": "<string>",
  "category": 123,
  "image": "<string>",
  "discount": 123,
  "discount_start_at": "2023-11-07T05:31:56Z",
  "discount_end_at": "2023-11-07T05:31:56Z",
  "extra": "<unknown>",
  "order": -1,
  "published": true
}

Параметры пути

id
integer
обязательно

Тело

name
string | null
обязательно
Maximum string length: 255
type
обязательно
  • set - set
  • product - product
  • service - service
Доступные опции:
set,
product,
service
unique_id
string | null
обязательно
Maximum string length: 64
price
string<decimal>
обязательно
Pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
amount
integer
обязательно
Требуемый диапазон: -2147483648 <= x <= 2147483647
object_id
integer<int64>
обязательно
Требуемый диапазон: -9223372036854776000 <= x <= 9223372036854776000
slug
string | null
Maximum string length: 50
Pattern: ^[-a-zA-Z0-9_]+$
category
integer | null
image
string<uri> | null
discount
integer | null
discount_start_at
string<date-time> | null
discount_end_at
string<date-time> | null
extra
any
order
integer
Требуемый диапазон: -2147483648 <= x <= 2147483647
published
boolean

Ответ

200 - application/json
id
integer
обязательно
name
string | null
обязательно
Maximum string length: 255
type
обязательно
  • set - set
  • product - product
  • service - service
Доступные опции:
set,
product,
service
unique_id
string | null
обязательно
Maximum string length: 64
price
string<decimal>
обязательно
Pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
amount
integer
обязательно
Требуемый диапазон: -2147483648 <= x <= 2147483647
object_id
integer<int64>
обязательно
Требуемый диапазон: -9223372036854776000 <= x <= 9223372036854776000
slug
string | null
Maximum string length: 50
Pattern: ^[-a-zA-Z0-9_]+$
category
integer | null
image
string<uri> | null
discount
integer | null
discount_start_at
string<date-time> | null
discount_end_at
string<date-time> | null
extra
any
order
integer
Требуемый диапазон: -2147483648 <= x <= 2147483647
published
boolean