Add

Adding a transaction

POST https://do.workzeal.com/finance/insert

Creates a receipt (direction_id: 1) or an expense (direction_id: 2) on an account. Transfers between accounts are not supported via the public API.

Request Body

Name Type Description
transaction* JSON
{
  "status": "success",
  "error": "",
  "code": null,
  "rows": 0,
  "pages": 0,
  "page": 0,
  "value": "70012"
}

JSON

All available parameters of the new object
  • direction_id - * Direction: 1 - receipt, 2 - expense
  • account_id - * Account ID
  • sum - * Amount in the base currency
  • category_id - Income/expense category ID
  • type_id - Payment method ID
  • company_id - Client ID
  • deal_id - Deal ID
  • date - Date/time of the transaction, for example 2026-08-26 15:00. Defaults to now
  • note - Note
  • user_id - Responsible person ID. Defaults to the token owner
  • sum_currency - Amount in the currency (defaults to sum)
  • rate - Exchange rate (defaults to 1)
  • agent_id - Agent ID
  • project_id - Project ID
  • external_code - External code (from your accounting system)
  • tags - Comma-separated tags

{
   "direction_id": 1,
   "account_id": 3,
   "sum": 150000,
   "category_id": 7,
   "company_id": 368132,
   "date": "2026-08-26",
   "note": "Payment for invoice 145 from Prodstar"
}

Note

Required parameters
direction_id (1 - receipt, 2 - expense)
account_id (Account ID)
sum (Amount, cannot be zero)

Example

curl --location --request POST 'https://do.workzeal.com/finance/insert' \
--header 'Authorization: Bearer XXXX-XXXXXXX-XXXXXXX' \
--header 'Content-Type: application/json' \
--data-raw '{
    "direction_id": 1,
    "account_id": 3,
    "sum": 150000,
    "company_id": 368132,
    "note": "Payment for invoice 145 from Prodstar"
  }
  '
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://do.workzeal.com/finance/insert',
  'headers': {
    'Authorization': 'Bearer XXXX-XXXXXXX-XXXXXXX',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "direction_id": 1,
    "account_id": 3,
    "sum": 150000,
    "company_id": 368132,
    "note": "Payment for invoice 145 from Prodstar"
  })
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

Directories

Users

Response

{
  "status": "success",
  "error": "",
  "code": null,
  "rows": 0,
  "pages": 0,
  "page": 0,
  "value": "70012"
}
// value - ID of the new transaction
Previous
Next