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 String

line[date]
required

Validations:

  • Must be Date

line[amount_cents]
optional

Bill line amount in cents

Validations:

  • Must be Integer

line[amount_currency]
optional

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

Validations:

  • Must be String

line[receipt_id]
optional

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

Validations:

  • Must be Integer

line[asset_account_id]
optional

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

Validations:

  • Must be 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 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.