In this article, you will find examples of the provided resource usage for different operations. For each analyzed scenario, we provide an example of the data that you are expected to provide to the API, as well as an example response.
In this article you can read more about the filter function. The filter functionality is for limiting the result.
$translationResource->getList(0, 10, array(
array('property' => 'translation.shopId', 'value' => 2)
));
$translationResource->getList(0, 1, array(
array('property' => 'translation.shopId', 'value' => 2),
array('property' => 'translation.key', 'value' => 200),
array('property' => 'translation.type', 'value' => 'article')
));
Example output:
array('total' => 246, 'data' => array(
array(
'type' => 'article',
'data' =>
array(
'name' => 'Dummy Translation',
'description' => 'Dummy Translation',
'descriptionLong' => 'Dummy Translation',
'additionalText' => 'Dummy Translation',
'keywords' => 'Dummy Translation',
'packUnit' => 'Dummy Translation',
),
'key' => 5,
'shopId' => '2'
),
array(
'type' => 'article',
'data' =>
array(
'name' => 'Dummy Translation',
'description' => 'Dummy Translation',
'descriptionLong' => 'Dummy Translation',
'additionalText' => 'Dummy Translation',
'keywords' => 'Dummy Translation',
'packUnit' => 'Dummy Translation',
),
'key' => 4,
'shopId' => '2'
)
));
{
"data": [
{},
{},
{}
],
"success": true,
"total": 3
}