Create Sales Orders
This endpoint is deprecated.
POST
/api/RPC.common.Api.So.set?token=<TOKEN>Parameters
| Field | Type | Description |
|---|---|---|
id | Integer | Sales Order ID |
for_date | String | Sales Order date |
action_date | String | Dispatch Order date |
sale_typerequired | String | Sales Order type name |
sale_type_coderequired | String | SO type code |
num | String | Sales Order ID |
trader | String | Merchant |
pos_coderequired | String | Point of sale (POS) |
tax_deal_code | String | Tax template |
store_code | String | Reserve quantity in warehouse |
currency | String | Currency |
fin_type | String | Financial document type |
pay_type | String | Payment method |
account_code | String | Account ID |
store_type | String | Handover |
delivery_code | String | Delivery method ID |
description | String | Description |
internal_description | String | Comment |
invoice_now | Boolean | Issue a financial document |
pay_now | Boolean | Pay automatically |
create_request | Boolean | Create stock request for the entire document |
create_request_unavailable | Boolean | Mark entire document as out of stock |
discount | String | Document discount % |
promo_card | String | Loyalty card |
partnerrequired | Object | Partner object. |
partner.id | String | Customer ID |
partner.is_company | Boolean | Customer is a company |
partner.client_type | String | Customer type |
partner.namerequired | String | Name |
partner.eik | String | UIC |
partner.egn | String | ID |
partner.dds_num | String | VAT Number |
partner.email | String | |
partner.phone | String | Phone |
partner.contact_name | String | Contact |
delivery_addressrequired | Object | Delivery_address object. |
delivery_address.to_speditor_office | String | Shipping operator office ID |
delivery_address.id | String | Address ID |
delivery_address.phone | String | Phone |
delivery_address.email | String | |
delivery_address.countryrequired | String | Country |
delivery_address.district | String | County |
delivery_address.settlement | String | City |
delivery_address.street | String | Street |
delivery_address.nbh | String | District |
delivery_address.address | String | Address |
delivery_address.num | String | Number |
delivery_address.building | String | Building |
delivery_address.building_entrance | String | Entrance |
delivery_address.building_floor | String | Floor |
delivery_address.building_apartment | String | Apartment |
delivery_address.zip | String | Postal code |
delivery_address.zip_num | String | Mailbox |
tax_addressrequired | Object | Tax_address object. |
tax_address.id | String | Address ID |
tax_address.phone | String | Phone |
tax_address.email | String | |
tax_address.countryrequired | String | Country |
tax_address.district | String | County |
tax_address.settlement | String | City |
tax_address.street | String | Street |
tax_address.nbh | String | District |
tax_address.address | String | Address |
tax_address.num | String | Number |
tax_address.building | String | Building |
tax_address.building_entrance | String | Entrance |
tax_address.building_floor | String | Floor |
tax_address.building_apartment | String | Apartment |
tax_address.zip | String | Postal code |
tax_address.zip_num | String | Mailbox |
rowsrequired | Object | Rows object. |
rows.skurequired | String | Item ID (SKU) |
rows.skurequired | String | Service ID (SKU) |
rows.bom_ident | String | BOM identifier |
rows.bom_iter | String | BOM counter |
rows.bom_position | String | BOM position |
rows.quantityrequired | String | Quantity |
rows.measure_code | String | Unit of measurement ID |
rows.pricerequired | String | Unit price |
rows.discount | String | Discount % |
rows.description | String | Description |
rows.row_request | Boolean | Create stock request for this row |
rows.row_request_unavailable | Boolean | Mark this row as out of stock |
integrationsrequired | Object | Integrations object. |
integrations.system_name | String | Integration system name |
integrations.integration_id | String | Order ID in integration system |
contractrequired | Object | Contract object. |
contract.num | String | Contract |
Request example
Create So Simple:
{
"data" : [
{
"pos_code" : "13BG",
"partner" : {
"name" : "YON COMPUTERS LTD",
"mail" : "simeonska@ionbg.com",
"is_company" : 1,
"eik" : 131398329
},
"rows" : [
{
"quantity" : 2,
"price" : "13.00",
"sku" : 10030
},
{
"price" : "89.00",
"quantity" : 5,
"sku" : 10243
},
{
"quantity" : 2,
"price" : "69.00",
"sku" : 10254
},
{
"quantity" : 3,
"price" : "72.00",
"sku" : 10288
},
{
"quantity" : 5,
"price" : "63.00",
"sku" : 10324
}
],
"sale_type" : "ExVan Sales"
}
]
}
Create So With Delivery:
{
"data" : [
{
"delivery_code" : "Fedex",
"store_type" : "delivery",
"pos_code" : "13BG",
"rows" : [
{
"quantity" : 2,
"price" : "13.00",
"sku" : 10030
},
{
"quantity" : 5,
"price" : "89.00",
"sku" : 10243
},
{
"sku" : 10254,
"quantity" : 2,
"price" : "69.00"
},
{
"sku" : 10288,
"quantity" : 3,
"price" : "72.00"
},
{
"quantity" : 5,
"price" : "63.00",
"sku" : 10324
}
],
"delivery_address" : {
"settlement" : "Sofia",
"country" : "Bulgaria",
"address" : null,
"district" : "Sofia District"
},
"partner" : {
"name" : "YON COMPUTERS LTD",
"eik" : 131398329,
"mail" : "simeonska@ionbg.com",
"is_company" : 1
},
"sale_type" : "ExVan Sales"
}
]
}cURL
Create So Simple:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -d '{ "data" : [ { "pos_code" : "13BG", "partner" : { "name" : "YON COMPUTERS LTD", "mail" : "simeonska@ionbg.com", "is_company" : 1, "eik" : 131398329 }, "rows" : [ { "quantity" : 2, "price" : "13.00", "sku" : 10030 }, { "price" : "89.00", "quantity" : 5, "sku" : 10243 }, { "quantity" : 2, "price" : "69.00", "sku" : 10254 }, { "quantity" : 3, "price" : "72.00", "sku" : 10288 }, { "quantity" : 5, "price" : "63.00", "sku" : 10324 } ], "sale_type" : "ExVan Sales" } ]}' "https://<DOMAIN_NAME>/api/RPC.common.Api.So.set?token=<TOKEN>"
Create So With Delivery:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -d '{ "data" : [ { "delivery_code" : "Fedex", "store_type" : "delivery", "pos_code" : "13BG", "rows" : [ { "quantity" : 2, "price" : "13.00", "sku" : 10030 }, { "quantity" : 5, "price" : "89.00", "sku" : 10243 }, { "sku" : 10254, "quantity" : 2, "price" : "69.00" }, { "sku" : 10288, "quantity" : 3, "price" : "72.00" }, { "quantity" : 5, "price" : "63.00", "sku" : 10324 } ], "delivery_address" : { "settlement" : "Sofia", "country" : "Bulgaria", "address" : null, "district" : "Sofia District" }, "partner" : { "name" : "YON COMPUTERS LTD", "eik" : 131398329, "mail" : "simeonska@ionbg.com", "is_company" : 1 }, "sale_type" : "ExVan Sales" } ]}' "https://<DOMAIN_NAME>/api/RPC.common.Api.So.set?token=<TOKEN>"Response example