Versioning
The version is in the path:/api/v1. Adding a field or an endpoint is not a breaking change and does not create a new version. A breaking change ships as /v2.
Data formats
Parse money as a decimal type, not a floating-point number.
"19.9900" is exact. 19.99 may not be.Sending money and percentages
Fields that take an amount accept a decimal string or a number, with at most two decimal places. Prefer a string.Sending dates
Dates areYYYY-MM-DD, read in the organisation’s timezone. If you omit start_date when creating a subscription, it defaults to today in that timezone. Retrieve the timezone from the organisation.
Request bodies
Send JSON withContent-Type: application/json. Bodies can be up to 100,000 characters.
The API rejects fields it doesn’t know. A misspelt discount_precent would otherwise be ignored, and the subscription would be created with no discount. The error names the field.
Response headers
Every response includes these headers.
Responses are never cached: they carry
Cache-Control: no-store.
Request log
Saasybill keeps a log of every authenticated request for 30 days. Find it under Developer Settings, then Logs. Each entry records the key, method, path, status, duration, request id and idempotency key. The log never holds request or response bodies, because they carry customer data. It also records the path only, without the query string, which can carry a customer’s email address.Where to next
Pagination
Page through lists.
Errors
Handle failures.
Idempotency
Retry writes safely.