getICollectionRowsById
احصل على صفوف مجموعة بواسطة معرّف المجموعة، صفحة تلو الأخرى.
الوصف
يجلب صفوف المجموعة ذات المعرّف id المحدد. يُعيد ICollectionRowsResponce: الصفوف في items، ويحمل total عدد الصفوف في المجموعة كلها. يُعيد ما يصل إلى userQuery.limit صفًا (30 افتراضيًا)؛ استخدم offset للتنقل عبر بقية الصفحات.
.getICollectionRowsById(
,
,
);
مخطط المعلمات
المخطط
id(required): number
معرّف المجموعة.
مثال: 1
langCode: string
رمز اللغة. الافتراضي: langCode المُمرَّر إلى defineOneEntry ("en_US" إذا لم يُمرَّر).
مثال: "en_US"
userQuery: ICollectionQuery
معاملات استعلام اختيارية.
مثال:
{
"limit": 30,
"offset": 0,
"entityType": "orders",
"entityId": 1
}
userQuery.limit: number
الحد الأقصى لعدد السجلات المراد إرجاعها. الافتراضي: 30.
userQuery.offset: number
عدد السجلات المراد تخطيها. الافتراضي: 0. يجب ألا يتجاوز offset + limit القيمة 200؛ وتُرفض النافذة الأكبر بالخطأ 400.
userQuery.entityType: string
نوع الكيان المرتبط. يُصفّي الصفوف فقط عند تعيين entityId أيضًا؛ ويُتجاهل بمفرده.
مثال: "orders"
userQuery.entityId: number
معرّف الكيان المرتبط. يُصفّي الصفوف فقط عند تعيين entityType أيضًا؛ ويُتجاهل بمفرده.
مثال: 1
أمثلة
مثال بسيط
const result = await IntegrationCollections.getICollectionRowsById(1);
مثال مع userQuery
const userQuery = { limit: 30, offset: 0 };
const result = await IntegrationCollections.getICollectionRowsById(1, 'en_US', userQuery);
مثال على الاستجابة
{
"items": [
{
"id": 1,
"entityId": null,
"entityType": null,
"createdDate": "2025-02-25T07:05:52.627Z",
"updatedDate": "2026-10-27T09:01:53.242Z",
"formData": [
{
"marker": "name_1",
"type": "string",
"value": "Item name"
}
],
"attributeSetIdentifier": null
},
{
"id": 2,
"entityId": null,
"entityType": null,
"createdDate": "2025-02-25T07:05:53.057Z",
"updatedDate": "2026-10-27T09:02:08.429Z",
"formData": [
{
"marker": "name_1",
"type": "string",
"value": "Item name"
}
],
"attributeSetIdentifier": null
},
{
"id": 3,
"entityId": null,
"entityType": null,
"createdDate": "2025-02-25T07:05:54.003Z",
"updatedDate": "2026-10-27T09:02:09.104Z",
"formData": [
{
"marker": "name_1",
"type": "string",
"value": "Item name 2"
}
],
"attributeSetIdentifier": null
}
],
"total": 214
}
مخطط الاستجابة
المخطط: ICollectionRowsResponce
items: ICollectionRow[]
صفوف المجموعة.
مثال:
[
{
"id": 1,
"createdDate": "2025-06-06T19:08:54.616Z",
"updatedDate": "2025-06-06T19:08:54.616Z",
"entityId": null,
"entityType": null,
"formData": [
{
"marker": "name_1",
"type": "string",
"value": "Value"
}
],
"attributeSetIdentifier": null
}
]
items.id: number
معرّف الصف.
مثال: 1
items.createdDate: string
تاريخ إنشاء السجل.
مثال: "2023-01-01T00:00:00Z"
items.updatedDate: string
تاريخ آخر تحديث للسجل.
مثال: "2023-01-02T00:00:00Z"
items.collectionId: number | null
معرّف المجموعة التي ينتمي إليها الصف. لا تُرجعه نقطتا نهاية قائمة الصفوف والصف حسب المعرّف.
مثال: 1
items.formData: ICollectionFormData[]
حقول النموذج لصف المجموعة.
مثال:
[
{
"marker": "name_1",
"type": "string",
"value": "Value"
}
]
items.entityType: string | null
نوع الكيان المرتبط به صف المجموعة.
مثال: "product"
items.entityId: number | null
معرّف الكيان المرتبط به صف المجموعة.
مثال: 12345
items.attributeSetIdentifier: string | null
علامة مجموعة السمات التي يستخدمها النموذج المرفق بصف المجموعة، أو null إذا لم توجد.
مثال: "attributeSet1" or null
items.langCode: string | null
رمز اللغة الذي تم تخزين السطر تحته.
مثال: "en_US"
items.formIdentifier: string | null
علامة النموذج الذي أُنشئ منه الصف؛ تُرجعها نقطة نهاية تحديث الصف (تحذفها استجابة الإنشاء).
مثال: "collection_form"
total: number
إجمالي عدد السجلات التي تم العثور عليها.
مثال: 10