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://apiv1.groperator.com/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.

الاستجابات · الحقل
الحقلالنوعالوصف
items
مطلوب
array<PublicBranchDto>

Items of the requested page.

id
items[].id
مطلوب
string (uuid)

Branch id.

name
items[].name
مطلوب
string

Branch name.

code
items[].code
مطلوب
string

Branch code.

city
items[].city
مطلوب
string

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.

page
مطلوب
integer (int32)

Current page number, starting at 1.

pageSize
مطلوب
integer (int32)

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

totalCount
مطلوب
integer (int32)

Total number of items across all pages.

totalPages
مطلوب
integer (int32)

Total number of pages.

200 · مثال استجابة
{
  "items": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "name": "string",
      "code": "string",
      "city": "string",
      "isActive": false
    }
  ],
  "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://apiv1.groperator.com/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.

الاستجابات · الحقل
الحقلالنوعالوصف
id
مطلوب
string (uuid)

Branch id.

name
مطلوب
string

Branch name.

code
مطلوب
string

Branch code.

city
مطلوب
string

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.

isActive
مطلوب
boolean

Whether the branch is active.

200 · مثال استجابة
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "name": "string",
  "code": "string",
  "city": "string",
  "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.

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