Get the list of all receipts accessible to user. Can be paginated and/or filtered by receipt state
Param name | Description |
---|---|
archived_after optional |
Return only receipts accounted on and after the supplied date. Date format: YYYYMMDD (example: 20180702) Validations:
|
page optional |
Return only one page of receipts. Default per-page is 10 Validations:
|
per_page optional |
Number of receipts returned per page. Works only in combination with “page” param. Default value is 10 Validations:
|
state optional |
Validations:
|
Creates new receipt. Also, auto-applies account rules
Param name | Description |
---|---|
draft optional |
Whether created receipt should be in draft state. If the value of this param is 1, receipt will be saved as draft and will not be validated; otherwise, it will be either in reviewing or queue state (depending on whether its user has approvers or not). Validations:
|
transaction required |
Receipt hash Validations:
|
transaction[description] required |
Receipt description Validations:
|
transaction[participants] optional , nil allowed |
Additional description (e.g. participants). Required based on ExpenseAccount settings Validations:
|
transaction[date] required |
Receipt date Validations:
|
transaction[credit_account_id] required |
Validations:
|
transaction[attachment_ids] optional , nil allowed |
Validations:
|
transaction[vat_lines_attributes] required |
VAT lines Validations:
|
transaction[vat_lines_attributes][taxable] required |
Taxable amount, e.g. 95.5 Validations:
|
transaction[vat_lines_attributes][tax_percentage] required |
VAT percentage, e.g. “0.14” for 14% Validations:
|
transaction[vat_lines_attributes][currency] required |
VAT line currency code, e.g. “EUR” Validations:
|
transaction[vat_lines_attributes][expense_account_id] required |
Expense account ID per VAT line, required for the 1st line, optional for 2nd+ Validations:
|
transaction[vat_lines_attributes][cost_center_ids] optional , nil allowed |
If the values for the 2nd+ VAT line is not provided, they will be copied from the 1st line Validations:
|
transaction[vat_lines_attributes][vat_code] optional , nil allowed |
Can also be equal to one of the custom company-specific VAT codes. If the value for the 2nd+ VAT line is not provided, it will be copied from the 1st line Validations:
|
Approves receipt. If “transaction” params are present, updates the receipt before approval
Param name | Description |
---|---|
transaction required |
Receipt hash Validations:
|
transaction[description] optional |
Receipt description Validations:
|
transaction[participants] optional , nil allowed |
Additional description (e.g. participants). Required based on ExpenseAccount settings Validations:
|
transaction[date] optional |
Receipt date Validations:
|
transaction[credit_account_id] optional |
Validations:
|
transaction[attachment_ids] optional , nil allowed |
Validations:
|
transaction[vat_lines_attributes] optional |
VAT lines Validations:
|
transaction[vat_lines_attributes][taxable] optional |
Taxable amount, e.g. 95.5 Validations:
|
transaction[vat_lines_attributes][tax_percentage] optional |
VAT percentage, e.g. “0.14” for 14% Validations:
|
transaction[vat_lines_attributes][currency] optional |
VAT line currency code, e.g. “EUR” Validations:
|
transaction[vat_lines_attributes][expense_account_id] optional |
Expense account ID per VAT line, required for the 1st line, optional for 2nd+ Validations:
|
transaction[vat_lines_attributes][cost_center_ids] optional , nil allowed |
If the values for the 2nd+ VAT line is not provided, they will be copied from the 1st line Validations:
|
transaction[vat_lines_attributes][vat_code] optional , nil allowed |
Can also be equal to one of the custom company-specific VAT codes. If the value for the 2nd+ VAT line is not provided, it will be copied from the 1st line Validations:
|
Disapprove receipt with comment
Param name | Description |
---|---|
comment optional |
Validations:
|
comment[comment] optional |
The reason of receipt disapproval; will be displayed to user Validations:
|
Sets transaction-specific approval cycle. Resets transaction approved_by field, sends transaction back to “reviewing” state.
Params for adding new transaction-specific approval cycle, 3 approvers: {"approvers": [ {"operator": "then", "approver_id":2}, {"operator": "then", "approver_id":266}, {"operator": "or", "approver_id":19,} ] }
Param name | Description |
---|---|
approvers required |
Validations:
|
approvers[operator] required |
Operator specifying approver process logic Validations:
|
approvers[approver_id] required |
Approver’s user id Validations:
|
approvers[id] optional |
User approver id, required if user approver already exists. If it’s not supplied, new user approver will be added Validations:
|