Account Management

1. Location

1.1 Retrieve Location

Get location details.

Endpoint:
GET /locations/:id
Short endpoint:
GET /location (location only)
Access level:
location, account

Example request:

GET /locations/3r4s3-1:

{ "id": "3r4s3-1", "name": "Paris", "account": { "id": "3r4s3", "name": "Bella Pizza", "currency": "EUR" }, "address": "13 rue du Chant des Oiseaux", "postal_code": "75003", "city": "Paris", "country": "FR", "timezone": { "name": "Europe/Paris", "utc_offset": 7200 }, "custom_fields": { "latitude": 48.8697246, "longitude": 2.3061506 }}

1.2 Update Location

Update the custom_fields of the location

Endpoint:
PUT /locations/:id
Short endpoint:
PUT /location (location only)
Access level:
location, account

Example request:

PUT /locations/3r4s3-1:

{ "custom_fields": { "latitude": 48.8526388, "longitude": 2.3042135 }}

1.3 List Locations

Returns the locations of the account.

Endpoint:
GET /locations/
Access level:
account

Example request:

GET /locations:

[ { "id": "3r4s3-1", "name": "Paris", "account": { "id": "3r4s3", "name": "Bella Pizza", "currency": "EUR" } ... } ...]

2. Account

2.1 Retrieve Account

Get account details.

Endpoint:
GET /accounts/:id
Short endpoint:
GET /account
Access level:
account

Example request:

GET /accounts/3r4s3:

{ "id": "3r4s3", "name": "Mister Pizza", "currency": "EUR"}

3. User

3.1 Retrieve User

Get user information.

Endpoint:
GET /user
Access level:
profile, profile_with_email

Example request:

GET /user:

{ "id": "v6ap7", "first_name": "Tom", "last_name": "Jones", "email": "tom.jones@gmail.com", "timezone": { "name": "Europe/Paris", "utc_offset": 7200 }, "locales": ["en-GB", "fr-FR"]}

The email field is included only if the access level is profile_with_email.