Sales types

Endpoints

Get Sales Order types

POST/api/RPC.common.Api.SoOrderTypes.get?token=<TOKEN>

Key SoOrderTypes.get · Open page

Parameters

5 body parameters inside data[]
FieldTypeDescription
coderequiredStringSO type code
nameStringSales Order type name
get_allBooleanGet all
offsetNumberOffset
limitNumberLimit

Request example

Search By Id:
{
   "data" : [
      {
         "id" : 1209425687
      }
   ]
}
Search By Code:
{
   "data" : [
      {
         "code" : 875786
      }
   ]
}
Search By Name:
{
   "data" : [
      {
         "name" : "CSKA Retail"
      }
   ]
}
Search By All Params:
{
   "data" : [
      {
         "id" : 1209425687,
         "name" : "CSKA Retail",
         "code" : 875786
      }
   ]
}
Get All:
{
	"data":[
		{}
	],
	"get_all":1,
	"limit":10000,
	"offset":0
}

cURL

Search By Id:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -d '{   "data" : [      {         "id" : 1209425687      }   ]}' "https://<DOMAIN_NAME>/api/RPC.common.Api.SoOrderTypes.get?token=<TOKEN>"
Search By Code:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -d '{   "data" : [      {         "code" : 875786      }   ]}' "https://<DOMAIN_NAME>/api/RPC.common.Api.SoOrderTypes.get?token=<TOKEN>"
Search By Name:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -d '{   "data" : [      {         "name" : "CSKA Retail"      }   ]}' "https://<DOMAIN_NAME>/api/RPC.common.Api.SoOrderTypes.get?token=<TOKEN>"
Search By All Params:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -d '{   "data" : [      {         "id" : 1209425687,         "name" : "CSKA Retail",         "code" : 875786      }   ]}' "https://<DOMAIN_NAME>/api/RPC.common.Api.SoOrderTypes.get?token=<TOKEN>"
Curl example Get All:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -d '{	"data":[		{}	],	"get_all":1,	"limit":10000,	"offset":0}	' "https://<DOMAIN_NAME>/api/RPC.common.Api.SoOrderTypes.get?token=<TOKEN>"

Response example

    HTTP/1.1 200 OK
{
   "total_count" : 1,
   "count" : 1,
   "result" : [
      {
         "id" : 1209425687,
         "code" : 875786,
         "pay_types" : [
            {
               "code" : "cash",
               "name" : "Cash",
               "id" : 21794,
               "tp" : "cash"
            },
            {
               "code" : "pos",
               "name" : "Payment terminal POS",
               "id" : 21799,
               "tp" : "bank"
            }
         ],
         "default_pay_type" : {
            "tp" : "cash",
            "code" : "cash",
            "id" : 21794,
            "name" : "Cash"
         },
         "default_fin_type" : {
            "code" : "receipt",
            "type_action" : "receipt",
            "advance" : 1,
            "type" : "receipt",
            "nm" : "Cash receipt",
            "taxes" : 1
         },
         "name" : "CSKA Retail",
         "fin_types" : [
            {
               "taxes" : 1,
               "nm" : "Cash receipt",
               "type" : "receipt",
               "advance" : 1,
               "type_action" : "receipt",
               "code" : "receipt"
            },
            {
               "advance" : 1,
               "code" : "invoice",
               "taxes" : 1,
               "nm" : "Invoice",
               "type" : "invoice",
               "type_action" : "invoice"
            }
         ],
         "tax_deals" : [
            {
               "income" : 1,
               "id" : 21889,
               "name" : "Sales",
               "code" : 1,
               "expense" : 0
            }
         ],
         "default_currency" : "EUR",
         "default_tax_deal" : {
            "id" : 21889,
            "income" : 1,
            "name" : "Sales",
            "code" : 1,
            "expense" : 0
         },
         "currencies" : [
            "BGN",
            "EUR"
         ]
      }
   ]
}