Create Categories

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

Key Groups.set · API version 2.0.0

Parameters

7 body parameters inside data[]
FieldTypeDescription
coderequiredStringCategory ID
namerequiredStringCategory name
typeStringGroup type
income_allocation_nameStringName of financial category for income
expense_allocation_nameStringName of financial category for expenses
parent_nameStringParent group name
parent_idStringParent category ID

Request example

Create Category First Level:
{
   "data" : [
      {
         "name" : "Test Category (ZMU)",
         "code" : "ZMU"
      }
   ]
}
Create Category With Parent Category:
{
   "data" : [
      {
         "code" : "ZMU",
         "name" : "Test Category (ZMU)",
         "parent_name" : "Scan Station"
      }
   ]
}
Create Category With Parent Category And Allocations:
{
   "data" : [
      {
         "expense_allocation_name" : "Expenses for Foreign Exchange Transactions",
         "parent_name" : "Scan Station",
         "income_allocation_name" : "Other income",
         "code" : "ZMU",
         "name" : "Test Category (ZMU)"
      }
   ]
}

cURL

Create Category First Level:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -d '{   "data" : [      {         "name" : "Test Category (ZMU)",         "code" : "ZMU"      }   ]}' "https://<DOMAIN_NAME>/api/RPC.common.Api.Groups.set?token=<TOKEN>"
Create Category With Parent Category:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -d '{   "data" : [      {         "code" : "ZMU",         "name" : "Test Category (ZMU)",         "parent_name" : "Scan Station"      }   ]}' "https://<DOMAIN_NAME>/api/RPC.common.Api.Groups.set?token=<TOKEN>"
Create Category With Parent Category And Allocations:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -d '{   "data" : [      {         "expense_allocation_name" : "Expenses for Foreign Exchange Transactions",         "parent_name" : "Scan Station",         "income_allocation_name" : "Other income",         "code" : "ZMU",         "name" : "Test Category (ZMU)"      }   ]}' "https://<DOMAIN_NAME>/api/RPC.common.Api.Groups.set?token=<TOKEN>"

Response example

    HTTP/1.1 200 OK
{
   "count" : 1,
   "result" : [
      {
         "expense_allocation_id" : 21661,
         "parent_name" : "Scan Station",
         "expense_allocation_name" : "Expenses for Foreign Exchange Transactions",
         "income_allocation_name" : "Other income",
         "code" : "ZMU",
         "id" : "unique_id int()",
         "income_allocation_id" : 21559,
         "name" : "Test Category (ZMU)"
      }
   ]
}