List merchants
merchants:readOrdered by name, paginated. No banking, commission, API key or pricing fields are exposed.
المعاملات
| الاسم | الموضع | النوع | الوصف |
|---|---|---|---|
page | query | integer (int32)الافتراضي: 1 | Page number, starting at 1. |
pageSize | query | integer (int32)الافتراضي: 25 | Items per page, 1 to 100 (larger values are clamped to 100). |
search | query | string | Text matched against name, contact person, phone and email. |
isActive | query | boolean | Only active (true) or only inactive (false) merchants. |
مثال طلب
curl -G "https://api.goldrock.live/api/public/v1/merchants" \
-H "X-API-Key: lmc_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "X-API-Secret: YOUR_API_SECRET" \
--data-urlencode 'search=noor' \
--data-urlencode 'isActive=true'const params = new URLSearchParams({
"search": "noor",
"isActive": "true"
});
const response = await fetch(`https://api.goldrock.live/api/public/v1/merchants?${params}`, {
method: "GET",
headers: {
"X-API-Key": "lmc_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"X-API-Secret": "YOUR_API_SECRET"
},
});
const data = await response.json();
console.log(response.status, data);<?php
$url = 'https://api.goldrock.live/api/public/v1/merchants?' . http_build_query([
'search' => 'noor',
'isActive' => 'true',
]);
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-API-Key: lmc_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'X-API-Secret: YOUR_API_SECRET',
],
]);
$result = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
var_dump($status, json_decode($result, true));import requests
response = requests.request(
"GET",
"https://api.goldrock.live/api/public/v1/merchants",
headers={
"X-API-Key": "lmc_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"X-API-Secret": "YOUR_API_SECRET",
},
params={
"search": "noor",
"isActive": "true",
},
timeout=30,
)
print(response.status_code, response.json())تستخدم الأمثلة مفتاح API؛ استبدل القيم النائبة. لاستخدام رمز Bearer أرسل Authorization: Bearer <accessToken>.
الاستجابات
200A page of merchants.
الاستجابات · الحقل
| الحقل | النوع | الوصف |
|---|---|---|
items | array<PublicMerchantDto>يقبل null | Items of the requested page. |
iditems[].id | string (uuid) | Merchant id. |
nameitems[].name | stringيقبل null | Account name. |
contactNameitems[].contactName | stringيقبل null | Contact person. |
contactPhoneitems[].contactPhone | stringيقبل null | Contact phone. |
contactEmailitems[].contactEmail | stringيقبل null | Contact email. |
isActiveitems[].isActive | boolean | Whether the merchant can book shipments. |
createdAtitems[].createdAt | string (date-time) | Creation time (UTC). |
primaryAddressitems[].primaryAddress | PublicMerchantAddressDto | A saved pickup address of a merchant. |
iditems[].primaryAddress.id | string (uuid) | Address id. |
labelitems[].primaryAddress.label | stringيقبل null | Short label. |
contactNameitems[].primaryAddress.contactName | stringيقبل null | Contact person at the address. |
contactPhoneitems[].primaryAddress.contactPhone | stringيقبل null | Phone at the address. |
countryitems[].primaryAddress.country | PublicNamedRef | A catalog entry shown in both languages. |
iditems[].primaryAddress.country.id | string (uuid)يقبل null | Catalog id, or null for legacy shipments that only stored a name. |
nameAritems[].primaryAddress.country.nameAr | stringيقبل null | Arabic name. |
nameEnitems[].primaryAddress.country.nameEn | stringيقبل null | English name. |
cityitems[].primaryAddress.city | PublicNamedRef | A catalog entry shown in both languages. |
iditems[].primaryAddress.city.id | string (uuid)يقبل null | Catalog id, or null for legacy shipments that only stored a name. |
nameAritems[].primaryAddress.city.nameAr | stringيقبل null | Arabic name. |
nameEnitems[].primaryAddress.city.nameEn | stringيقبل null | English name. |
districtitems[].primaryAddress.district | PublicNamedRef | A catalog entry shown in both languages. |
iditems[].primaryAddress.district.id | string (uuid)يقبل null | Catalog id, or null for legacy shipments that only stored a name. |
nameAritems[].primaryAddress.district.nameAr | stringيقبل null | Arabic name. |
nameEnitems[].primaryAddress.district.nameEn | stringيقبل null | English name. |
addressLineitems[].primaryAddress.addressLine | stringيقبل null | Street, building and landmark. |
shortAddressitems[].primaryAddress.shortAddress | stringيقبل null | Saudi national short address. |
latitudeitems[].primaryAddress.latitude | number (double)يقبل null | Latitude. |
longitudeitems[].primaryAddress.longitude | number (double)يقبل null | Longitude. |
isPrimaryitems[].primaryAddress.isPrimary | boolean | True for the primary address (used by default as the pickup of the merchant's shipments). |
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. |
{
"page": 1,
"pageSize": 1,
"totalCount": 1,
"totalPages": 1
}| الحالة | الوصف |
|---|---|
400 | The request is invalid (code |
401 | Authentication is missing or invalid (code |
403 | The credential lacks the required scope, or the public API is disabled (codes |
429 | Too many requests (code |
تشترك أخطاء الواجهة في جسم واحد موصوف في مرجع الأخطاء. مرجع الأخطاء