Generated from the live OpenAPI document (
/api/v1/openapi.json, API version 1.0.0). The OpenAPI document and the live reference are the source of truth; if this page and they ever disagree, they win.
A location is either a branch of the business or a client_pickup point of one of its clients. API keys are organization-wide: a key reads and creates every branch.
GET /api/v1/locations
Scope: locations:read
Example request
curl -X GET "https://connect.rylixfleet.com/api/v1/locations" \
-H "Authorization: Bearer $RYLIX_API_KEY"
Example answer (200)
{
"object": "list",
"data": [
{
"id": "cm4w5q9yz0000s8z0l0c4t1on",
"object": "location",
"name": "Main store",
"address": "Mar Mikhael, Armenia St",
"lat": 33.8969,
"lng": 35.5226,
"isDefault": true,
"kind": "branch",
"active": true,
"phone": "+9611234567",
"hours": {
"week": {
"mon": [
[
"09:00",
"23:00"
]
]
}
},
"parentBranchId": null,
"createdAt": "2026-11-01T08:00:00.000Z"
}
]
}
Answers
| HTTP | Meaning |
|---|---|
| 200 | Every pickup location of the business. |
| 401 | Missing, malformed, unknown or revoked API key. |
| 403 | insufficient_scope, feature_off, or (writes) suspended or read_only. |
| 429 | Rate limit reached for this key. |
POST /api/v1/locations
Scope: locations:write
The business's first location becomes its default, so it must be an active branch. Branch fields (kind, active, phone, hours, parentBranchId) are optional: without them the location is an active branch. API keys are organization-wide: a key reads and creates every branch.
Parameters
| Name | In | Required | About |
|---|---|---|---|
Idempotency-Key |
header | no | Any unique string (a UUID). Replaying the same request with the same key returns the first answer without doing anything again. Kept 24 hours. (max length 255) |
Request body
| Field | Type | Required | About |
|---|---|---|---|
name |
string | yes | max length 80 |
address |
string | no | |
lat |
number | yes | min -90, max 90 |
lng |
number | yes | min -180, max 180 |
kind |
string (one of: branch, client_pickup) |
no | The business's first location must be a branch (it becomes the default). (default branch) |
active |
boolean | no | Inactive locations take no new orders. The first location must be active. (default True) |
phone |
string or null | no | The branch's phone, stored as E.164 (local numbers use the business's country). |
hours |
no | Opening hours: { week: { mon: [["09:00","23:00"]] }, closed: ["2026-12-25"] } (days mon–sun, HH:MM ranges, an end before the start runs past midnight), or null. |
|
parentBranchId |
string or null | no | Only for kind: client_pickup: a branch of this business that handles it. |
Example request
curl -X POST "https://connect.rylixfleet.com/api/v1/locations" \
-H "Authorization: Bearer $RYLIX_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"name": "Main store", "address": "Mar Mikhael, Armenia St", "lat": 33.8969, "lng": 35.5226, "phone": "01 234 567", "hours": {"week": {"mon": [["09:00", "23:00"]]}}}'
Example answer (201)
{
"id": "cm4w5q9yz0000s8z0l0c4t1on",
"object": "location",
"name": "Main store",
"address": "Mar Mikhael, Armenia St",
"lat": 33.8969,
"lng": 35.5226,
"isDefault": true,
"kind": "branch",
"active": true,
"phone": "+9611234567",
"hours": {
"week": {
"mon": [
[
"09:00",
"23:00"
]
]
}
},
"parentBranchId": null,
"createdAt": "2026-11-01T08:00:00.000Z"
}
Answers
| HTTP | Meaning |
|---|---|
| 201 | The location was created. |
| 400 | A field is missing or not valid (fields names each one). Branch fields: kind, active, phone, hours or parentBranchId is invalid (a parent must be a branch of this business and is only for a client_pickup); the business's first location answers kind: first_location_must_be_branch or active: default_must_be_active. Nothing is created. |
| 401 | Missing, malformed, unknown or revoked API key. |
| 403 | insufficient_scope, feature_off, or (writes) suspended or read_only. |
| 429 | Rate limit reached for this key. |
| Field | Type | Required | About |
|---|---|---|---|
id |
string | yes | |
object |
string (one of: location) |
yes | |
name |
string | yes | |
address |
string or null | yes | |
lat |
number or null | yes | |
lng |
number or null | yes | |
isDefault |
boolean | yes | |
kind |
string (one of: branch, client_pickup) |
no | A branch of the business, or a pickup point of one of its clients. |
active |
boolean | no | Inactive locations take no new orders (422 location_inactive). |
phone |
string or null | no | The branch's phone (E.164). |
hours |
no | Opening hours in the business's time zone: { week: { mon: [["09:00","23:00"]] }, closed: ["2026-12-25"] }, or null. Informational. |
|
parentBranchId |
string or null | no | A client pickup point's handling branch (its orders count as that branch's); null: the default branch handles it. |
createdAt |
string | yes |