Get categories

This endpoint is deprecated.
POST/api/RPC.common.Api.Groups.get?token=<TOKEN>

Key Groups.get · API version 2.0.0

Parameters

6 body parameters inside data[]
FieldTypeDescription
idIntegerCategory ID
coderequiredStringCategory ID
namerequiredStringCategory name
get_allBooleanGet all
offsetNumberOffset
limitNumberLimit

Request example

Search By Id:
{
   "data" : [
      {
         "id" : 2108822
      }
   ]
}
Search By Code:
{
   "data" : [
      {
         "code" : "TAX"
      }
   ]
}
Search By Name:
{
   "data" : [
      {
         "name" : "Taxes on delivery"
      }
   ]
}
Search By All Params:
{
   "data" : [
      {
         "code" : "TAX",
         "name" : "Taxes on delivery",
         "id" : 2108822
      }
   ]
}
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" : 2108822      }   ]}' "https://<DOMAIN_NAME>/api/RPC.common.Api.Groups.get?token=<TOKEN>"
Search By Code:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -d '{   "data" : [      {         "code" : "TAX"      }   ]}' "https://<DOMAIN_NAME>/api/RPC.common.Api.Groups.get?token=<TOKEN>"
Search By Name:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -d '{   "data" : [      {         "name" : "Taxes on delivery"      }   ]}' "https://<DOMAIN_NAME>/api/RPC.common.Api.Groups.get?token=<TOKEN>"
Search By All Params:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -d '{   "data" : [      {         "code" : "TAX",         "name" : "Taxes on delivery",         "id" : 2108822      }   ]}' "https://<DOMAIN_NAME>/api/RPC.common.Api.Groups.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.Groups.get?token=<TOKEN>"

Response example

    HTTP/1.1 200 OK
{
   "result" : [
      {
         "income_allocation_id" : 21564,
         "name_multilang" : {
            "en" : "Taxes on delivery",
            "bg" : "Taxes on delivery"
         },
         "parent_id" : 2108821,
         "name" : "Taxes on delivery",
         "have_childs" : 0,
         "parent_name" : "Delivery costs",
         "expense_allocation_id" : 21601,
         "tp" : "services",
         "code" : "TAX",
         "id" : 2108822
      }
   ],
   "total_count" : 1,
   "count" : 1
}