GET /api/bill_lines
Show the list of bill lines

Returns the list of bill lines in current company. Accessible to accountants only.

Examples

[
  {
    "id": 12,
    "date": "2021-06-03",
    "amount": "9.02",
    "amount_currency": "EUR",
    "name": "Some Payment *MONTHLY",
    "receipt_id": 1,
    "bill_id": 1,
    "exchange_rate": null,
    "taxable_amount": "9.02",
    "taxable_amount_currency": "EUR",
    "cleared": true
  }
] 

Params

Param name Description
updated_after
optional

Return only bill lines updated on and after the supplied date. Date format: YYYYMMDD (example: 20210702)

Validations:

  • Must be a String


POST /api/bills/:bill_id/lines
Add new bill line

Add new bill line to existing bill

Params

Param name Description
line
required

Bill line params

Validations:

  • Must be a Hash

line[name]
required

Bill line name

Validations:

  • Must be a String

line[date]
required

Validations:

  • Must be a Date

line[amount_cents]
optional

Bill line amount in cents

Validations:

  • Must be a Integer

line[amount_currency]
optional

Bill line currency. Should be currency code, e.g. EUR, USD, GBP etc

Validations:

  • Must be a String

line[receipt_id]
optional

ID of the related receipt. Receipt with such ID should already exist in the database.

Validations:

  • Must be a Integer

line[asset_account_id]
optional

ID of related asset account (credit account, payment method)

Validations:

  • Must be a Integer


PUT /api/bills/:bill_id/lines/:id
Edit existing bill line

Edit an existing bill line

Params

Param name Description
line
required

Bill line params

Validations:

  • Must be a Hash

line[receipt_id]
optional

ID of the related receipt. Receipt with such ID should exist in the database.

Validations:

  • Must be a Integer


DELETE /api/bills/:bill_id/lines/:id
Delete existing bill line

Deletes an existing bill line by ID. User must have permissions to manage both bill line and related bill to delete it.


PUT /api/bills/:bill_id/lines/bulk_update_no_receipt_needed
Bulk edit the existing bill lines receipt_id: 0

Bulk edit the existing bill lines to set receipt_id: 0

Params

Param name Description
ids
required

Bill line ids

Validations:

  • Must be an Array of nested elements