Skip to content
Developer preview: the API may change before general availability. Request access

List locations

GET
/locations
curl --request GET \
--url 'https://sandbox.partners.loops.sa/v1/locations?limit=50' \
--header 'Authorization: Bearer <token>' \
--header 'Loops-Merchant-Id: mer_7Hq2Lw8Z'

Locations the merchant shared with your application.

Loops-Merchant-Id
string

The merchant you are acting for (mer_…). Required for platform applications; optional for direct integrations, which have a single merchant.

limit
integer
default: 50 >= 1 <= 100

Page size, 1–100.

cursor
string

The next_cursor from the previous page.

A page of locations.

Media typeapplication/json
object
data
required
Array<object>
object
id
required
string
merchant_id
required
string
brand_id
string | null
name
required

Text in the languages the merchant provided.

object
en
string | null
ar
string | null
status
required
string
Allowed values: open closed paused
timezone
required
string
address
object
line1
string | null
city
string | null
country
string
latitude
number | null
longitude
number | null
updated_at
string format: date-time
next_cursor
required

Pass as cursor to get the next page; null on the last page.

string | null
Example
{
"data": [
{
"id": "loc_2Xf9K",
"brand_id": "brd_9Lk3",
"status": "open",
"timezone": "Asia/Riyadh",
"address": {
"city": "Riyadh",
"country": "SA"
}
}
]
}

The access token is missing, expired or invalid.

Media typeapplication/problem+json

RFC 9457 Problem Details with a stable code.

object
type
required
string format: uri
title
required
string
status
required
integer
code
required

Stable machine-readable error code. Switch on this, not on title.

string
Allowed values: invalid_request merchant_required unauthorized insufficient_scope scope_not_granted connection_not_active application_suspended channel_not_permitted not_found merchant_not_found rate_limited upstream_unavailable
detail
string
request_id
required
string
errors

Field errors, for invalid_request.

Array<object>
object
field
string
message
string
Example
{
"type": "https://docs.partners.loops.sa/errors/scope_not_granted",
"title": "Scope not granted",
"status": 403,
"code": "invalid_request",
"detail": "The merchant has not granted orders:read to this application.",
"request_id": "req_01J9X7P2QK"
}

Not allowed: the scope isn’t approved or granted, the connection is not active, or your application is suspended. See code.

Media typeapplication/problem+json

RFC 9457 Problem Details with a stable code.

object
type
required
string format: uri
title
required
string
status
required
integer
code
required

Stable machine-readable error code. Switch on this, not on title.

string
Allowed values: invalid_request merchant_required unauthorized insufficient_scope scope_not_granted connection_not_active application_suspended channel_not_permitted not_found merchant_not_found rate_limited upstream_unavailable
detail
string
request_id
required
string
errors

Field errors, for invalid_request.

Array<object>
object
field
string
message
string
Example
{
"type": "https://docs.partners.loops.sa/errors/scope_not_granted",
"title": "Scope not granted",
"status": 403,
"code": "invalid_request",
"detail": "The merchant has not granted orders:read to this application.",
"request_id": "req_01J9X7P2QK"
}