Versioning

All requests must specify the version of the API they're using. Include the Api-Version header on all requests. The current version is 1 (Api-Version: 1).

Commitment on backwards compatibility

Perk is committed to maintaining backwards compatibility. Perk won't make breaking changes within an API version.

Changes allowed within a version

Accepted changesNotes
Adding new endpoints/resources
Adding optional parameters to existing endpoints
Adding new fields to existing resource responsesDon't use strict mode in your parsers, and don't assume that keys not currently in the response won't be added later.
Changing order of fields in existing responsesDon't rely on field ordering within a response object.
Changing the length/format of ID fields, or other opaque strings
  • IDs of individual objects won't change, but the format may differ between objects.

  • Don't introspect on ID values or base logic on comparing or computing them.

Adding new options for "enumerated" fields

For example, adding a new tax regime type to an invoice line, or a new event to a webhook.

Be prepared to handle unknown values in these fields.