Requests and responses
- Send
Accept: application/json, andContent-Type: application/jsonon requests with a body. - A single record comes back as
{ "data": { ... } }. - Create and update calls return
200with the full record. - To change a record, send the fields you want it to end up with. Create and update share the same validation rules.
Pagination
List endpoints return one page at a time.
To read everything, request pages until
links.next is null.
Search and filters
Every list acceptssearch, a free-text match over the record’s main fields, such as its number, name or email.
from and to take YYYY-MM-DD and include the whole day in the workspace timezone.
Dates and times
Dates you send, such aswork_date and document_date, are YYYY-MM-DD. Times, such as time_window_from, are HH:mm. Both are in the workspace timezone, not UTC.
Dates and times in responses are also shown in the workspace timezone.
Money
Amounts you send and receive are in major currency units, for example250.00 for two hundred and fifty ringgit. This applies to unit_amount, amount_paid, final_amount and the other totals. Do not send or expect cents.
Each document carries its own currency. Totals are calculated by BeanRails from the items, taxes and discounts, so you cannot set them directly.
Statuses
Works, invoices, quotations and contacts have astatus value and a status_name. Use status in your code. Workspaces can rename statuses and add their own, so status_name can differ between customers.
