版本:202201
创建采购单
POST/openapi/2022-01/procurements
使用提供的详情创建新采购单。
请求
- application/json
- 请求体
- 示例
请求体
procurement object必填
supplier_idstring必填
Supplier's ID
notestring
{
"procurement": {
"supplier_id": "string",
"note": "string"
}
}
响应
- 200
- 422
200
- application/json
- 数据结构
- 示例
- Result
数据结构
procurement object
idstring
示例:
382451985837728044procurement_snstring
示例:
00000002supplier_idstring
示例:
382411381263052204location_idstring
示例:
190035786870033452notestring
示例:
testaaastateinteger
默认值:
0示例:
1pending_quantityinteger
默认值:
0示例:
0received_quantityinteger
默认值:
0示例:
0rejected_quantityinteger
默认值:
0示例:
0transfer_quantityinteger
默认值:
0示例:
0created_bystring
示例:
created_atstring
示例:
2024-05-21T08:47:39Zupdated_atstring
示例:
2024-05-21T08:50:36Z{
"procurement": {
"id": "382451985837728044",
"procurement_sn": "00000002",
"supplier_id": "382411381263052204",
"location_id": "190035786870033452",
"note": "testaaa",
"state": 1,
"pending_quantity": 0,
"received_quantity": 0,
"rejected_quantity": 0,
"transfer_quantity": 0,
"created_by": "",
"created_at": "2024-05-21T08:47:39Z",
"updated_at": "2024-05-21T08:50:36Z"
}
}
{
"procurement": {
"id": "382451985837728044",
"procurement_sn": "00000002",
"supplier_id": "382411381263052204",
"location_id": "190035786870033452",
"note": "testaaa",
"state": 1,
"pending_quantity": 0,
"received_quantity": 0,
"rejected_quantity": 0,
"transfer_quantity": 0,
"created_by": "",
"created_at": "2024-05-21T08:47:39Z",
"updated_at": "2024-05-21T08:50:36Z"
}
}
422
- application/json
- 数据结构
- 示例
- Result
数据结构
errorsstring[]
{
"errors": [
"Supplier not found"
]
}
{
"errors": [
"Supplier not found"
]
}