POST
/
accounting
/
expenses
curl --request POST \
  --url https://api.rootfi.dev/v3/accounting/expenses \
  --header 'Content-Type: application/json' \
  --header 'api_key: <api-key>' \
  --data '{
  "company_id": 123,
  "data": [
    {
      "account_id": "acc_56S9s4tRcvkHJBCrgzj3YM",
      "contact_id": "co_UVH2BXam9VXbtZzJXa4Ctr",
      "currency_id": "AED",
      "currency_rate": 1.5,
      "document_number": "testttt expense",
      "line_items": [
        {
          "account_id": "123456",
          "description": "This is a description",
          "item_id": "123456",
          "line_item_type": "INVOICES",
          "line_item_type_id": "123456",
          "platform_id": "123456",
          "quantity": 1,
          "rootfi_id": 157,
          "sub_total": 100,
          "tax_amount": 100,
          "tax_id": "123456",
          "total_amount": 100,
          "total_discount": 100,
          "tracking_category_ids": [
            "123456"
          ],
          "unit_amount": 100,
          "updated_at": "2024-01-22T05:07:31.000Z"
        }
      ],
      "memo": "Testttt",
      "payment_mode": "cash",
      "posted_date": "2023-06-03T00:00:00.000Z",
      "sub_total": 400,
      "tax_amount": 2.5,
      "total_amount": 400,
      "updated_at": "2023-06-03T00:00:00.000Z"
    }
  ]
}'
{
  "data": {
    "account_id": "acc_56S9s4tRcvkHJBCrgzj3YM",
    "contact_id": "co_UVH2BXam9VXbtZzJXa4Ctr",
    "currency_id": "AED",
    "currency_rate": 1.5,
    "document_number": "testttt expense",
    "line_items": [
      {
        "account_id": "123456",
        "description": "This is a description",
        "item_id": "123456",
        "line_item_type": "INVOICES",
        "line_item_type_id": "123456",
        "platform_id": "123456",
        "quantity": 1,
        "rootfi_id": 157,
        "sub_total": 100,
        "tax_amount": 100,
        "tax_id": "123456",
        "total_amount": 100,
        "total_discount": 100,
        "tracking_category_ids": [
          "123456"
        ],
        "unit_amount": 100,
        "updated_at": "2024-01-22T05:07:31.000Z"
      }
    ],
    "memo": "Testttt",
    "payment_mode": "cash",
    "platform_id": "123456",
    "posted_date": "2023-06-03T00:00:00.000Z",
    "rootfi_company_id": 456,
    "rootfi_created_at": "2024-01-25T09:00:00Z",
    "rootfi_id": 123,
    "rootfi_updated_at": "2024-01-25T09:00:00Z",
    "sub_total": 400,
    "tax_amount": 2.5,
    "total_amount": 400,
    "updated_at": "2023-06-03T00:00:00.000Z"
  }
}

Expenses are Payment made by a business at the time of purchase (ex. a credit card payment)

Authorizations

api_key
string
headerrequired

Body

application/json
company_id
integer
required

The ID of the company in the accounting platform

data
object[]
required

The data of the Expense to create

Response

200 - application/json
data
object
required