Перейти к основному содержанию
PATCH
/
v1
/
shop
/
sales
/
{sale_id}
cURL
curl --request PATCH \
  --url https://api.example.com/v1/shop/sales/{sale_id}/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "client": 123,
  "agent": 123,
  "discount": 123,
  "additional_discount": "<string>",
  "discount_amount": "<string>",
  "created_by": 123
}
'
{
  "id": 123,
  "price": "<string>",
  "price_discount": "<string>",
  "paid_amount": "<string>",
  "rental_point": 123,
  "status": 0,
  "client": 123,
  "agent": 123,
  "discount": 123,
  "additional_discount": "<string>",
  "discount_amount": "<string>",
  "created_by": 123
}

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

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

Тело

client
integer | null
agent
integer | null
discount
integer | null
additional_discount
string<decimal>
Pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
discount_amount
string<decimal>
Pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
created_by
integer

Ответ

200 - application/json
id
integer
обязательно
price
string<decimal>
обязательно
Pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
price_discount
string<decimal>
обязательно
Pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
paid_amount
string<decimal>
обязательно
Pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
rental_point
integer | null
обязательно
status
enum<integer>
обязательно
  • 0 - черновик
  • 1 - Продано
  • 2 - cancelled
Доступные опции:
0,
1,
2
client
integer | null
agent
integer | null
discount
integer | null
additional_discount
string<decimal>
Pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
discount_amount
string<decimal>
Pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
created_by
integer