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": [
{
"currency_id": "AED",
"account_id": "acc_56S9s4tRcvkHJBCrgzj3YM",
"contact_id": "co_UVH2BXam9VXbtZzJXa4Ctr",
"document_number": "testttt expense",
"memo": "Testttt",
"payment_mode": "cash",
"currency_rate": 1.5,
"posted_date": "2023-06-03T00:00:00.000Z",
"line_items": [
{
"tracking_category_ids": [
"123456"
],
"project_id": "123456",
"item_id": "123456",
"tax_id": "123456",
"account_id": "123456",
"description": "This is a description",
"quantity": 1,
"unit_amount": 100,
"total_discount": 100
}
]
}
]
}'
{
"data": {
"rootfi_id": 123,
"rootfi_deleted_at": null,
"rootfi_created_at": "2024-01-25T09:00:00Z",
"rootfi_updated_at": "2024-01-25T09:00:00Z",
"rootfi_company_id": 456,
"platform_id": "123456_1",
"platform_unique_id": "123456",
"currency_id": "AED",
"account_id": "acc_56S9s4tRcvkHJBCrgzj3YM",
"contact_id": "co_UVH2BXam9VXbtZzJXa4Ctr",
"sub_total": 400,
"tax_amount": 2.5,
"total_amount": 400,
"document_number": "testttt expense",
"memo": "Testttt",
"updated_at": "2023-06-03T00:00:00.000Z",
"payment_mode": "cash",
"currency_rate": 1.5,
"posted_date": "2023-06-03T00:00:00.000Z",
"line_items": [
{
"rootfi_id": 157,
"platform_id": "123456",
"line_item_type": "INVOICES",
"line_item_type_id": "123456",
"tracking_category_ids": [
"123456"
],
"project_id": "123456",
"item_id": "123456",
"tax_id": "123456",
"account_id": "123456",
"description": "This is a description",
"quantity": 1,
"unit_amount": 100,
"total_amount": 100,
"sub_total": 100,
"tax_amount": 100,
"total_discount": 100,
"updated_at": "2024-01-22T05:07:31.000Z"
}
]
}
}
Create a new Expense.
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": [
{
"currency_id": "AED",
"account_id": "acc_56S9s4tRcvkHJBCrgzj3YM",
"contact_id": "co_UVH2BXam9VXbtZzJXa4Ctr",
"document_number": "testttt expense",
"memo": "Testttt",
"payment_mode": "cash",
"currency_rate": 1.5,
"posted_date": "2023-06-03T00:00:00.000Z",
"line_items": [
{
"tracking_category_ids": [
"123456"
],
"project_id": "123456",
"item_id": "123456",
"tax_id": "123456",
"account_id": "123456",
"description": "This is a description",
"quantity": 1,
"unit_amount": 100,
"total_discount": 100
}
]
}
]
}'
{
"data": {
"rootfi_id": 123,
"rootfi_deleted_at": null,
"rootfi_created_at": "2024-01-25T09:00:00Z",
"rootfi_updated_at": "2024-01-25T09:00:00Z",
"rootfi_company_id": 456,
"platform_id": "123456_1",
"platform_unique_id": "123456",
"currency_id": "AED",
"account_id": "acc_56S9s4tRcvkHJBCrgzj3YM",
"contact_id": "co_UVH2BXam9VXbtZzJXa4Ctr",
"sub_total": 400,
"tax_amount": 2.5,
"total_amount": 400,
"document_number": "testttt expense",
"memo": "Testttt",
"updated_at": "2023-06-03T00:00:00.000Z",
"payment_mode": "cash",
"currency_rate": 1.5,
"posted_date": "2023-06-03T00:00:00.000Z",
"line_items": [
{
"rootfi_id": 157,
"platform_id": "123456",
"line_item_type": "INVOICES",
"line_item_type_id": "123456",
"tracking_category_ids": [
"123456"
],
"project_id": "123456",
"item_id": "123456",
"tax_id": "123456",
"account_id": "123456",
"description": "This is a description",
"quantity": 1,
"unit_amount": 100,
"total_amount": 100,
"sub_total": 100,
"tax_amount": 100,
"total_discount": 100,
"updated_at": "2024-01-22T05:07:31.000Z"
}
]
}
}
The response is of type object
.