GROperator

جارٍ التحميل…

English

Branches

كل عمليات واجهة LastMile العامة، مولَّدة من وثيقة OpenAPI. نص المرجع بالإنجليزية في اللغتين.

GET

/api/public/v1/branches

#

List branches

مفتاح API وسرّه، أو رمز Bearerالنطاق المطلوب: branches:read

Paginated; ordered by name. Scope branches:read.

المعاملات

الاسمالموضعالنوعالوصف
pagequeryinteger (int32)
الافتراضي: 1

Page number, starting at 1.

pageSizequeryinteger (int32)
الافتراضي: 25

Items per page, 1 to 100 (larger values are clamped to 100).

searchquerystring

Optional text matched against name, code and city.

activeOnlyqueryboolean

When true, only active branches.

مثال طلب

GET /branches
curl -G "https://api.goldrock.live/api/public/v1/branches" \
  -H "X-API-Key: lmc_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "X-API-Secret: YOUR_API_SECRET" \
  --data-urlencode 'activeOnly=true'

تستخدم الأمثلة مفتاح API؛ استبدل القيم النائبة. لاستخدام رمز Bearer أرسل Authorization: Bearer <accessToken>.

الاستجابات

200A page of branches.

الاستجابات · الحقل
الحقلالنوعالوصف
itemsarray<PublicBranchDto>يقبل null

Items of the requested page.

id
items[].id
string (uuid)

Branch id.

name
items[].name
stringيقبل null

Branch name.

code
items[].code
stringيقبل null

Branch code.

city
items[].city
stringيقبل null

City name as entered on the branch.

phone
items[].phone
stringيقبل null

Branch phone, when set.

latitude
items[].latitude
number (double)يقبل null

Latitude, when set.

longitude
items[].longitude
number (double)يقبل null

Longitude, when set.

isActive
items[].isActive
boolean

Whether the branch is active.

pageinteger (int32)

Current page number, starting at 1.

pageSizeinteger (int32)

Requested page size (1 to 100, default 25).

totalCountinteger (int32)

Total number of items across all pages.

totalPagesinteger (int32)

Total number of pages.

200 · مثال استجابة
{
  "page": 1,
  "pageSize": 1,
  "totalCount": 1,
  "totalPages": 1
}
الحالةالوصف
400

The request is invalid (code validation_failed, details.errors lists every field).

401

Authentication is missing or invalid (code unauthorized).

403

Missing scope or public API disabled.

429

Too many requests (code rate_limited); wait for the Retry-After header.

تشترك أخطاء الواجهة في جسم واحد موصوف في مرجع الأخطاء. مرجع الأخطاء

GET

/api/public/v1/branches/{id}

#

Get one branch

مفتاح API وسرّه، أو رمز Bearerالنطاق المطلوب: branches:read

Scope branches:read.

المعاملات

الاسمالموضعالنوعالوصف
id
مطلوب
pathstring (uuid)

Branch id.

مثال طلب

GET /branches/3fa85f64-5717-4562-b3fc-2c963f66afa6
curl "https://api.goldrock.live/api/public/v1/branches/3fa85f64-5717-4562-b3fc-2c963f66afa6" \
  -H "X-API-Key: lmc_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "X-API-Secret: YOUR_API_SECRET"

تستخدم الأمثلة مفتاح API؛ استبدل القيم النائبة. لاستخدام رمز Bearer أرسل Authorization: Bearer <accessToken>.

الاستجابات

200The branch.

الاستجابات · الحقل
الحقلالنوعالوصف
idstring (uuid)

Branch id.

namestringيقبل null

Branch name.

codestringيقبل null

Branch code.

citystringيقبل null

City name as entered on the branch.

phonestringيقبل null

Branch phone, when set.

latitudenumber (double)يقبل null

Latitude, when set.

longitudenumber (double)يقبل null

Longitude, when set.

isActiveboolean

Whether the branch is active.

200 · مثال استجابة
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "isActive": false
}
الحالةالوصف
401

Authentication is missing or invalid (code unauthorized).

403

The credential lacks the required scope, or the public API is disabled (codes forbidden, channel_disabled).

404

Code branch.not_found.

429

Too many requests (code rate_limited); wait for the Retry-After header.

تشترك أخطاء الواجهة في جسم واحد موصوف في مرجع الأخطاء. مرجع الأخطاء