انتقل إلى المحتوى الرئيسي

createICollectionRow

إنشاء سجل في المجموعة.

الوصف

ترجع Promise التي تحل إلى كائن ICollectionRow.

IntegrationCollections.createICollectionRow(

marker, body, body.formIdentifier, body.formData, langCode

);

مخطط المعلمات

المخطط

marker(مطلوب): string
معرف نص المجموعة
مثال: "collection1"

body(مطلوب): ICollectionFormObject
كائن لإنشاء سجل
مثال:

{
"formIdentifier": "collection-form",
"formData": {
"en_US": [
{
"marker": "collection_marker",
"type": "string",
"value": "علامة المجموعة"
}
]
}
}

body.formIdentifier(مطلوب): string
معرف نصي (علامة) النموذج.
مثال: "collection-form"

body.formData(مطلوب): Record<string, ICollectionFormData>
كائن حيث المفاتيح هي علامات حقول النموذج والقيم هي مصفوفات من كائنات ICollectionFormData.
مثال:

[
{
"marker": "name_1",
"type": "string",
"value": "القيمة"
}
]

langCode: string
رمز اللغة. الافتراضي: "en_US"
مثال: "en_US"

أمثلة

مثال بسيط

const body = {
"formIdentifier": "collection-form",
"formData": [
{
"marker": "name_1",
"type": "string"
"value": "القيمة"
}
]
};

const response = await IntegrationCollections.createICollectionRow(body);

مثال على الاستجابة

{
"formData": [
{
"marker": "c_marker",
"type": "string",
"value": "القيمة"
}
],
"collectionId": 1,
"langCode": "en_US",
"createdDate": "2025-07-21T09:40:07.591Z",
"updatedDate": "2025-07-21T09:40:07.591Z",
"entityType": null,
"entityId": null,
"id": 414
}

مخطط الاستجابة

المخطط: ICollectionRow

id: number
معرف الكائن.
مثال: 1

createdDate: string
تاريخ إنشاء السجل.
مثال: "2023-01-01T00:00:00Z"

updatedDate: string
تاريخ آخر تحديث للسجل.
مثال: "2023-01-02T00:00:00Z"

collectionId: number | null
معرف المجموعة المرتبط بسطر المجموعة.
مثال: "product", "order", "etc"

formData: ICollectionFormData[]
مصفوفة من كائنات بيانات النموذج المرتبطة بسطر المجموعة.
مثال:

[
{
"marker": "name_1",
"type": "string",
"value": "القيمة"
}
]

entityType: string | null
نوع الكائن المرتبط بسطر المجموعة.
مثال: "product", "order", "etc"

entityId: number | null
معرف الكائن المرتبط بسطر المجموعة.
مثال: 12345

attributeSetIdentifier: string | null
معرف مجموعة الخصائص المستخدمة من قبل النموذج المرتبط بسطر المجموعة، أو null إذا لم يكن ذلك قابلاً للتطبيق.
مثال: "attributeSet1" أو null

total: string
إجمالي العدد.
مثال: "1"