Returns list of credit card bills accessible by the current user. Additional filters can be passed for more exact result.
[ { "id": 1, "date": "2021-06-03", "number": "2021-06-1224", "user_name": null, "state": "Processed", "asset_account_id": null, "asset_account_name": null, "totals": "72.00 EUR", "receipt_totals": "0.00 EUR (0/2)", "credit_cards": null, "user_id": null, "is_travel_account_bill": false, "card_number": null, "cardholder_name": null, "type": "credit_card", "scope": { "company_currency": "EUR" } }, { "id": 2, "date": "2021-06-03", "number": "2021-06-7777", "user_name": "Jake Peralta", "state": "Processed", "asset_account_id": 12, "asset_account_name": "Yrityksen luottokortti", "totals": "72.00 EUR", "receipt_totals": "0.00 EUR (0/2)", "credit_card_id": 12, "credit_cards": [ { "id": 12, "account_id": 12, "company_id": 1, "user_id": 1, "first": "44444", "last": "4444", "created_at": "2019-03-07T13:21:05.835Z", "updated_at": "2019-03-07T13:21:05.835Z" } ], "user_id": 1, "is_travel_account_bill": false, "card_number": "5555xxxxxxxx9999", "cardholder_name": "Jake Peralta", "type": "credit_card", "scope": { "company_currency": "EUR" } } ]
Param name | Description |
---|---|
page
optional |
Page number Validations:
|
per_page
optional |
Number of records per page. Can be set to 1000 for getting more bills in one page. Default: 50 Validations:
|
skip_pagination
optional |
Pass true to skip pagination and receive all the credit card bills in one request, no pagination. Validations:
|
updated_after
optional |
Return only credit card bills updated on and after the supplied date. Date format: YYYYMMDD (example: 20210702) Validations:
|
date_range
optional |
Show all bills that have date within the date range. Date range format: “DD/MM/YYYY - DD/MM/YYYY” (example: 01/12/2021 - 12/12/2021) Validations:
|
asset_account_id
optional |
Pass asset account ID to show all bills that have the asset account assigned. Validations:
|
credit_card_id
optional |
Pass credit card ID to show all bills that have the credit card assigned. Validations:
|
user_id
optional |
Pass user_id to get bills of that user. Validations:
|
type
optional |
Pass type to filter bills by type. Validations:
|
q
optional |
Pass query to filter bills by total lines taxable amount or bill number. Validations:
|
sort
optional |
Return bills sorted by some of the bill’s field. Example: id, date, number, created_at, updated_at. Default: id. Validations:
|
order
optional |
Order bills ascending or descending based on sort param. Default: asc Validations:
|
Shows individual credit card bill by its id. Bill lines are embedded into bill’s JSON as well as bill’s available receipts. To get the list of available receipt asset account or both asset account and credit card should be assigned to the bill.
[ { "id": 1, "date": "2021-06-03", "number": "2021-06-1224", "user_name": null, "state": "processed", "asset_account_id": null, "credit_card_id": null, "credit_cards": null, "user_id": null, "lines": [ { "id": 12, "date": "2021-06-03", "amount": "9.02", "amount_currency": "EUR", "name": "Some Payment *MONTHLY", "receipt_id": null, "bill_id": 1, "exchange_rate": null, "taxable_amount": "9.02", "taxable_amount_currency": "EUR" } ], "receipts": [] }, ]
Update credit card bill
Param name | Description |
---|---|
bill
required |
Bill hashtable Validations:
|
bill[credit_card_id]
optional |
Validations:
|
bill[user_id]
optional |
Only for travel account bills Validations:
|
Deletes credit card bills by provided IDs and all of their bill lines. Returns the number of deleted bills.
Param name | Description |
---|---|
ids
optional |
IDs of bills to delete Validations:
|
Import credit card bills from XML or CSV file in a specific format (.csv, .xml, .txt).
Param name | Description |
---|---|
file
optional |
Either a FILE object or base64-encoded string Validations:
|