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
/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
Response · 200 Whether the company ID is available.
object
string
company_id
string
available
boolean
reason
string, nullable
one of taken, reserved, invalid
suggestion
string, nullable
Errors
invalid_token: the token is missing, revoked or expired.
insufficient_ability: the token lacks the ability this call needs.
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"$client = new GuzzleHttp\Client();
$response = $client->request('GET', 'https://partners.monotree.com/api/v1/company-ids/boulangeriemartin', [
'headers' => [
'Authorization' => 'Bearer '.getenv('MONOTREE_TOKEN'),
],
]);
$data = json_decode($response->getBody(), true);const response = await fetch('https://partners.monotree.com/api/v1/company-ids/boulangeriemartin', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.MONOTREE_TOKEN}`,
},
});
const data = await response.json();import os
import requests
response = requests.get(
"https://partners.monotree.com/api/v1/company-ids/boulangeriemartin",
headers={
"Authorization": f"Bearer {os.environ['MONOTREE_TOKEN']}",
},
)
data = response.json(){
"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.