getICollectionRowsById
Obtenha todos os registros pertencentes à coleção pelo id da coleção.
Descrição
Retorna uma Promise que resolve para um objeto ICollectionRowsResponce.
IntegrationCollections.getICollectionRowsById(
id,
langCode,
userQuery
);
Esquema de parâmetros
Esquema
id(obrigatório): número
Id da coleção
exemplo: 1
langCode: string
Código do idioma. Padrão: "en_US"
exemplo: "en_US"
userQuery: qualquer
Parâmetros de consulta opcionais
exemplo:
{
"limit": 0,
"offset": 30,
"entityType": "orders",
"entityId": 1
}
Exemplos
Exemplo mínimo
const result = await IntegrationCollections.getICollectionRowsById(1);
Exemplo com atributos
const userQuery = '';
const result = await IntegrationCollections.getICollectionRowsById(1, 'en_US', userQuery);
Exemplo de resposta
{
"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": "Наименование"
}
],
"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": "Наименование"
}
],
"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": "Наименование 2"
}
],
"attributeSetIdentifier": null
},
"..."
],
"total": 213
}
Esquema de resposta
Esquema: ICollectionRowsResponce
items: ICollectionRow[]
Array de objetos de linha de coleção.
exemplo:
[
{
"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
}
]
total: número
Número total de registros encontrados.
exemplo: 10