query · Module: Routes · Requires routes:read
Arguments
| Argument | Type | Description |
|---|---|---|
type | String | Filter by type. |
status | String | Filter by status. |
createdGte | Int | Filter by created gte. |
createdLte | Int | Filter by created lte. |
limit | Int | Page size, 1–100 (default 10). |
startingAfter | ID | Cursor: return objects after this ID. |
endingBefore | ID | Cursor: return objects before this ID. |
Returns
FacilityList!
| Field | Type |
|---|---|
data | [Facility!]! |
has_more | Boolean |
Errors
Errors are returned inerrors[], with the REST error object in extensions (type, code, param, request_id), using the codes in Conventions §9.
query Facilities($limit: Int) {
facilities(limit: $limit) {
data {
id
object
name
type
status
livemode
created
updated
contact {
name
company
email
phone
tax_ids {
type
value
country
}
address {
line1
street_number
line2
city
}
}
location {
latitude
longitude
}
timezone
operating_hours {
frequency
interval
days
day_of_month
times
timezone
}
capabilities
service_zones
}
has_more
}
}
{
"limit": 10
}
{
"data": {
"facilities": {
"data": [
{
"id": "fac_1a2B3c",
"object": "facility",
"name": "Example",
"type": "hub",
"status": "active",
"livemode": true,
"created": 1791302400,
"updated": 1791302400,
"contact": {
"name": "Example",
"company": "example",
"email": "ops@example.com",
"phone": "+447700900123",
"tax_ids": [
{
"type": "eori",
"value": "example",
"country": "GB"
}
],
"address": {
"line1": "Downing St",
"street_number": "10",
"line2": "example",
"city": "London"
}
},
"location": {
"latitude": 51.5074,
"longitude": -0.1278
},
"timezone": "Europe/London",
"operating_hours": {
"frequency": "daily",
"interval": 2,
"days": [
"mon"
],
"day_of_month": 2,
"times": [
"example"
],
"timezone": "Europe/London"
},
"capabilities": [
"example"
],
"service_zones": [
"example"
]
}
],
"has_more": true
}
}
}