PerfexCRM icon

PerfexCRM

Interact with PerfexCRM API

Actions181

Expense → Create

AI-generated

Summary

Create a new expense record in PerfexCRM by specifying required fields and optional details.

Inputs

  • Category (required) — The ID of the expense category to classify the expense.
  • Amount (required) — The monetary amount of the expense. Must be zero or greater.
  • Date (required) — The date when the expense was incurred, formatted as YYYY-MM-DD.
  • Additional Fields — Optional parameters to provide extra details such as billable status, currency code, customer or project association, expense name, notes, tax percentages, and custom field values (by ID or slug).

Output shape

a single JSON object representing the newly created expense record returned by the PerfexCRM API.

The output directly reflects the API response for the created expense. If multiple input items are processed, an array of such objects is returned. Input validation for date formatting and numeric positivity is performed before the API call.

Examples

Example 1: Creating a billable expense of $100 USD under category ID 5 for project ID 123, with a note and tax percentages.

Set Category=5, Amount=100, Date=2023-04-15, Additional Fields including billable=true, currency='USD', project_id='123', note='Travel expenses', tax=10, tax2=5.

Discussion