Добавление
Добавление новой сделки
POST
https://do.myfreshcloud.com/deal/insert
Request Body
Name
Type
Description
deal*
JSON
{
"status": "success",
"error": null,
"code": "0",
"rows": 1,
"pages": 1,
"page": 1,
"value": "1"
}
JSON
{
"name":"test-deal-API",
"company_id":1,
"type_id":1,
"status_id":5,
"user_id":37,
"sum":100,
"date_start":"2022-01-21",
"date_finish":"2022-01-22",
"note":"test-Note",
"Goods" : [{
"goods_id" : 0,
"discription" : "test-good-API",
"code" : "0000001",
"price" : 2000,
"discount" : 0,
"qnt" : 1,
"note" : "test-note-API"
}]
}
Пример
curl --location --request POST 'https://do.myfreshcloud.com/deal/insert' \
--header 'Authorization: Bearer XXXX-XXXXXXX-XXXXXXX \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "test-deal-API",
"company_id": 1,
"type_id": 1,
"status_id": 5,
"user_id": 37,
"sum": 100,
"date_start": "2022-01-21",
"date_finish": "2022-01-22",
"note": "test-Note",
"Goods": [
{
"goods_id": 0,
"discription": "test-good-API",
"code": "0000001",
"price": 2000,
"discount": 0,
"qnt": 1,
"note": "test-note-API"
}
]
}'
Last updated
Was this helpful?