Create Order
This endpoint is deprecated.
POST
/api/RPC.common.Api.Po.set?token=<TOKEN>Parameters
| Field | Type | Description |
|---|---|---|
id | Integer | Order ID |
for_date | String | Purchase Order date |
num | String | Purchase order # |
currency | String | Currency code |
trader | String | Merchant |
office_namerequired | String | Office Name Recipient |
tax_deal_coderequired | String | Tax template |
fin_typerequired | String | Financial document type |
pay_typerequired | String | Payment method |
description | String | Description |
partnerrequired | Object | Partner object. |
partner.id | String | Customer ID |
partner.is_company | Boolean | Customer is a company |
partner.vendor_type | String | Supplier type |
partner.name | String | Name |
partner.eik | String | UIC |
partner.egn | String | ID |
partner.dds_num | String | VAT Number |
partner.email | String | |
partner.phone | String | Phone |
rowsrequired | Object | Rows object. |
rows.skurequired | String | Item SKU |
rows.skurequired | String | Service ID |
rows.quantityrequired | String | Quantity |
rows.measure_code | String | Unit of measurement ID |
rows.pricerequired | String | Unit price |
rows.description | String | Description |
next_operrequired | Object | Next_oper object. |
next_oper.next_oper | Boolean | Create next operation |
next_oper.next_oper_type | String | Operation type |
next_oper.next_oper_date | String | Date of next operation |
next_oper.next_oper_store_coderequired | String | To be stored in the warehouse |
Request example
Create Po Simple:
{
"data" : [
{
"fin_type" : "expense_invoice",
"rows" : [
{
"quantity" : 2,
"price" : "16.00",
"sku" : "01001"
},
{
"sku" : 10276,
"price" : "79.00",
"quantity" : 2
},
{
"price" : "63.00",
"quantity" : 2,
"sku" : 10183
},
{
"sku" : 793975,
"quantity" : 3,
"price" : "72.00"
},
{
"quantity" : 5,
"price" : "82.00",
"sku" : 10250
},
{
"sku" : 10319,
"quantity" : 3,
"price" : "17.00"
}
],
"office_name" : "WholeSales",
"tax_deal_code" : 1,
"partner" : {
"is_company" : 1,
"eik" : 148106441,
"name" : "Inditex"
},
"pay_type" : "015"
}
]
}cURL
Create Po Simple:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -d '{ "data" : [ { "fin_type" : "expense_invoice", "rows" : [ { "quantity" : 2, "price" : "16.00", "sku" : "01001" }, { "sku" : 10276, "price" : "79.00", "quantity" : 2 }, { "price" : "63.00", "quantity" : 2, "sku" : 10183 }, { "sku" : 793975, "quantity" : 3, "price" : "72.00" }, { "quantity" : 5, "price" : "82.00", "sku" : 10250 }, { "sku" : 10319, "quantity" : 3, "price" : "17.00" } ], "office_name" : "WholeSales", "tax_deal_code" : 1, "partner" : { "is_company" : 1, "eik" : 148106441, "name" : "Inditex" }, "pay_type" : "015" } ]}' "https://<DOMAIN_NAME>/api/RPC.common.Api.Po.set?token=<TOKEN>"Response example