Aller au contenu principal

getICollectionRowsById

Obtenez tous les enregistrements appartenant à la collection par l'identifiant de la collection.

Description

Cela renvoie une promesse qui se résout en un objet ICollectionRowsResponce.

IntegrationCollections.getICollectionRowsById(

id, langCode, userQuery

);

Schéma des paramètres

Schéma

id(obligatoire): number
Identifiant de la collection
exemple : 1

langCode: string
Code de langue. Par défaut : "en_US"
exemple : "en_US"

userQuery: any
Paramètres de requête optionnels
exemple :

{
"limit": 0,
"offset": 30,
"entityType": "orders",
"entityId": 1
}

Exemples

Exemple minimal

const result = await IntegrationCollections.getICollectionRowsById(1);

Exemple avec des attributs

const userQuery = '';
const result = await IntegrationCollections.getICollectionRowsById(1, 'en_US', userQuery);

Exemple de réponse

{
"items": [
{
"id": 1,
"entityId": null,
"entityType": null,
"createdDate": "2025-02-25T07:05:52.627Z",
"updatedDate": "2025-02-25T07:05:52.627Z",
"formData": [
{
"marker": "naimenovanie_1",
"type": "string",
"value": "Nom"
}
],
"attributeSetIdentifier": null
},
{
"id": 2,
"entityId": null,
"entityType": null,
"createdDate": "2025-02-25T07:05:53.057Z",
"updatedDate": "2025-02-25T07:05:53.057Z",
"formData": [
{
"marker": "naimenovanie_1",
"type": "string",
"value": "Nom"
}
],
"attributeSetIdentifier": null
},
{
"id": 3,
"entityId": null,
"entityType": null,
"createdDate": "2025-02-25T07:05:54.003Z",
"updatedDate": "2025-02-25T07:05:54.460Z",
"formData": [
{
"marker": "naimenovanie_1",
"type": "string",
"value": "Nom 2"
}
],
"attributeSetIdentifier": null
},
"..."
],
"total": 213
}

Schéma de réponse

Schéma : ICollectionRowsResponce

items: ICollectionRow[]
Tableau d'objets de ligne de collection.
exemple :

[
{
"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": "Valeur"
}
],
"attributeSetIdentifier": null
}
]

total: number
Nombre total d'enregistrements trouvés.
exemple : 10