API reference

Company IDs

A company ID is a customer's address (boulangeriemartin.monotree.com) and what its employees type in the Monotree app.

Base URL https://partners.monotree.com/api/v1 · every call needs a token

Check a company ID

get /company-ids/{name} customers:read

Whether a company ID is free, and a free one close to it when it is not. reason says why not: taken (a customer has it), reserved (Monotree keeps it for itself) or invalid (too short, too long, or other signs than lower-case letters and digits). Check before you create a customer, or let the create call tell you with a 422.

Parameters

name required

string · path

The company ID to check: 3 to 40 lower-case letters and digits, never a hyphen. Capital letters are read as lower case.
Response · 200 Whether the company ID is available.

object

string

company_id

string

The ID that was checked, in lower case.

available

boolean

reason

string, nullable

Why it is not available; null when it is.

one of taken, reserved, invalid

suggestion

string, nullable

A free company ID close to the one asked for, when there is one. Null when the ID is available, when it is reserved, and when no free one was found.

Errors

401 invalid_token: the token is missing, revoked or expired.
403 insufficient_ability: the token lacks the ability this call needs.
429 rate_limited: too many requests. The general limit is 120 requests a minute for all your tokens of one mode (live or sandbox) together, and 300 a minute per IP address before the token is checked. Some calls have a lower limit of their own, which counts only calls that did what they ask (a call refused with another error uses up no place); the Rate limits guide lists them. Wait for the number of seconds in the Retry-After header.
curl https://partners.monotree.com/api/v1/company-ids/boulangeriemartin \
  -H "Authorization: Bearer $MONOTREE_TOKEN"
200 · Response
{
    "object": "company_id",
    "company_id": "boulangeriemartin",
    "available": true,
    "reason": null,
    "suggestion": null
}

Only mpt_test_… tokens work here; nothing reaches a real customer. Kept in this browser tab only.

Sending…