Profile, Billing and Access Control API Overview

Structure of an API URL

You can retrieve the API version by calling GET /api.

API URLs follow the subsequent pattern:

endpoints
/api/category/{slug}/action

API URLs are prefixed by /api/, followed by a category indicator, followed by a unique identifier (typically the slug of a profile), followed by a specific action.

Featured API Scenarios

There are four main categories are:

auth
This category contains APIs related to authenticating users such as registration, login, updating a user password, etc.
billing
This category contains APIs to manage the checkout, billing and accounting workflows, including shopping carts, coupons, charges and balance statements.
profile
This category contains APIs to manage profiles, including contact information, password updates, subscriptions, and roles.
metrics
This category contains APIs to crunch numbers and create reporting dashboards.

Query parameters and results returned

There are three main formats for results returned:

  • a single item
  • a list of items
  • a table of aggregated values over a metric

When you call an API URL that returns a single item, the result will include all the details of that item. When you call an API URL that returns a list of items, each item returned will contain a short version with fields typically necessary to display in a Human User Interface (ex: printable_name ).

List APIs accept query parameters start_at and ends_at, which are dates in ISO format to filter items returned by their creation date. The q parameter is used to do random searches while the q_f parameter is used to further restrict which fields are searched for a matching q term.

The items returned can be sorted by a field specified in the o query parameter, while a minus sign preceding the field name will sort by reverse order.

List results are paginated, thus the page query parameter specifies the page of results to return. By default the query returns the first page.

Fields encoding

Field type

Date

Example field names

created_at, start_at, ends_at, last_login

Description

date/time in ISO 8601 format.


Field type

Phone

Example field names

phone

Description

phone number in E.164 format.


Field type

Currency unit

Example field names

unit

Description

currency in 3-letter ISO 4217 format.


Field type

Currency unit

Example field names

amount

Description

Amounts are written as natural integers expressing in 1/100th of currency unit. For example an amount of $10 is written as {"amount": 1000, "unit": "usd"}.