Table of content
Table of Contents | ||
---|---|---|
|
...
Advanced Use
Rendering Options
...
URL: (Store URL)/api/products/?display=full
PHP:
Code Block |
---|
$opt = array(
'resource' => 'products',
'display' => 'full'
);
|
Include only the ID of all carriers
URL: (Store URL)/api/products/carriers/?display=[id]
PHP :
Code Block |
---|
$opt = array('resource' => 'products'carriers', 'display' => '[id]'); |
Only include the "name" and "value" fields from the "configurations" resource
URL: (Store URL)/api/configurations/?display=\[name,value\] Wiki Markup
PHP:
Code Block |
---|
$opt = array(
'resource' => 'configurations',
'display' => '[name,value]'
);
|
Rendering Filters
Only include the first and last names of customers "customers" whose ids are
...
1
...
or 5
URL: (Store URL)/api/customers/?display=\[firstname,lastname\]&filter\[id\]=\[1|5\] Wiki Markup
PHP:
Code Block |
---|
$opt = array(
'resource' => 'customers',
'display' => '[firstname,lastname]',
'filter[id]' => '[1|5]'
);
|
Only include the
...
last names of customers "customers" whose ids are between 1 and 10
URL: (Store URL)/api/customers/?display=\[lastname\]&filter\[id\]=\[1,10\] Wiki Markup
PHP:
Code Block |
---|
$opt = array( 'resource' =>'customers', 'display' => '[lastname]', 'filter[id]' => '[1,110]' ); |
Only include the birthday of clients whose name is "John" and whose last name is "Doe"
URL: (Store URL)/api/customers/?display=\[birthday\]&filter\[firstname\]=\[John\]&filter\[lastname\]=\[DOE\] Wiki Markup
PHP:
Code Block |
---|
$opt = array(
'resource' =>'customers',
'display' => '[birthday]',
'filter[firstname]' => '[John]',
'filter[lastname]' => '[DOE]'
);
|
Only include the names of manufacturers "manufacturers" whose name begins with "Appl"
URL: (Store URL)/api/manufacturers/?display=\[name\]&filter\[name\]=\[appl\]% Wiki Markup
PHP:
Code Block |
---|
$opt = array(
'resource' => 'manufacturers',
'display' => '[name]',
'filter[name]' => '[appl]%'
);
|
...
Filter the customers "customers" in alphabetical order according to last name
URL: Store URL/api/customers?display=full&sort=\[lastname_ASC\] Wiki Markup
PHP:
Code Block |
---|
$opt = array(
'resource' => 'customers',
'display' => 'full',
'sort' => '[lastname_ASC]'
);
|
...
URL: (Store URL)/api/states/?display=full&limit=5
PHP:
Code Block |
---|
$opt = array(
'resource' => 'states',
'display' => 'full',
'limit' => '5'
);
|
...
URL: (Store URL)/api/states/?display=full&limit=9,5
PHP:
Code Block |
---|
$opt = array(
'resource' => 'states',
'display' => 'full',
'limit' => '9,5'
);
|