Get expense categories

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

Key Allocations.getExpense · API version 2.0.0

Parameters

5 body parameters inside data[]
FieldTypeDescription
idIntegerIncome/Expenses category ID
namerequiredStringIncome/Expenses category name
get_allBooleanGet all
offsetrequiredStringOffset
limitrequiredStringLimit

Request example

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

Response example

    HTTP/1.1 200 OK
{
   "result" : [
      {
         "id" : 21654,
         "name" : "Transportation on Delivery",
         "income" : 0,
         "expense" : 1
      }
   ]
}