recurring_expenses

Gets a list of recurring_expenses

Changed on

Lists recurring_expenses, search and filters allow fine grained lists to be generated.

Query parameters can be added to performed more fine grained filtering of the recurring_expenses, these are handled by the RecurringExpenseFilters class which defines the methods available
get/api/v1/recurring_expenses

Request

Query parameters

includestring
Example:first_load

Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes

indexstring
Example:user

Replaces the default response index from data to a user specific string

ie.

  ?index=new_index

response is wrapped

  {
    'new_index' : [
      .....  
    ]
  }
per_pageinteger
Example:20

The number of records to return for each request, default is 20

pageinteger
Example:1

The page number to return for this request (when performing pagination), default is 1

sortstring[]

Order the list by choosing a column and direction. Each value uses the form column|asc or column|desc.

Single sort — for example sort=next_send_date|asc.

Multiple sorts — for example
sort[]=id|desc&sort[]=amount|desc.

Recurring expenses combine table columns with client- or vendor-related sorts from RecurringExpenseFilters. Unsupported keys are ignored.

[
  "next_send_date|asc"
]

Headers

X-API-TOKENstring required
Example:TOKEN

The API token to be used for authentication

X-Requested-Withstring required
Example:XMLHttpRequest

Used to send the XMLHttpRequest header

Response

A list of recurring_expenses

Example response

{
  "data": [
    {
      "id": "Opnel5aKBz",
      "user_id": "Opnel5aKBz",
      "assigned_user_id": "Opnel5aKBz",
      "client_id": "Opnel5aKBz",
      "invoice_id": "Opnel5aKBz",
      "bank_id": "22",
      "invoice_currency_id": "1",
      "expense_currency_id": "1",
      "invoice_category_id": "1",
      "payment_type_id": "1",
      "private_notes": "Private and confidential",
      "public_notes": "This is the best client in the world",
      "transaction_reference": "EXP-1223-2333",
      "transcation_id": "1233312312",
      "custom_value1": "$1000",
      "custom_value2": "2022-10-10",
      "custom_value3": "short text",
      "custom_value4": "very long text",
      "tax_name1": "GST",
      "tax_name2": "VAT",
      "tax_rate1": 10,
      "tax_rate2": 10,
      "tax_rate3": 10,
      "amount": 10,
      "frequency_id": 1,
      "remaining_cycles": 1,
      "foreign_amount": 10,
      "exchange_rate": 0.8,
      "should_be_invoiced": true,
      "is_deleted": true,
      "last_sent_date": "1994-07-30",
      "next_send_date": "1994-07-30",
      "invoice_documents": true,
      "updated_at": 1434342123,
      "archived_at": 1434342123,
      "calculate_tax_by_amount": true,
      "category_id": "Opnel5aKBz",
      "currency_id": "1",
      "next_send_date_client": "2024-12-31",
      "number": "RE-0001",
      "project_id": "Opnel5aKBz",
      "tax_amount1": 10,
      "tax_amount2": 5,
      "tax_amount3": 2.5,
      "transaction_id": "txn_1234567890",
      "uses_inclusive_taxes": true,
      "vendor_id": "Opnel5aKBz"
    }
  ],
  "meta": {
    "pagination": {
      "total": 1,
      "count": 1,
      "per_page": 1,
      "current_page": 1,
      "total_pages": 1
    }
  }
}

Changes

    • info

      added the new optional query request parameter sort

    • info

      added the new optional query request parameter page

    • info

      added the new optional query request parameter per_page

    • info

      the response optional property // became read-only for the status