Child pages
  • Chapter 8 - Advanced Use

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of contentcontents

Table of Contents
maxLevel3

...

Advanced Use

Rendering Options

...

URL: (Store URL)/api/products/?display=full

PHP:

Code Block

$opt = array( 'resource' => 'products', 
              'display'  => 'full' );

...

URL: (Store URL)/api/products/

PHP :

Code Block

$opt = array( 'resource' => 'products' );

...

URL: (Store URL)/api/configurations/?display=[name,value]

PHP:

Code Block

$opt = array( 'resource' => 'configurations', 
              'display'  => '[name,value]');

...

URL: (Store URL)/api/customers/?display=[firstname,lastname]&filter[id]=[1|5]

PHP:

Code Block

$opt = array( 'resource'   => 'customers', 
              'display'    => '[firstname,lastname]', 
              'filter[id]' => '[1|5]' );

...

URL: (Store URL)/api/customers/?display=[lastname]&filter[id]=[1,10]

PHP:

Code Block

$opt = array( 'resource'   =>'customers', 
              'display'    => '[lastname]', 
              'filter[id]' => '[1,10]');

...

URL: (Store URL)/api/customers/?display=[birthday]&filter[firstname]=[John]&filter[lastname]=[DOE]

PHP:

Code Block

$opt = array( 'resource'          =>'customers', 
              'display'           => '[birthday]', 
			  'filter[firstname]' => '[John]', 
			  'filter[lastname]'  => '[DOE]' );

...

URL: (Store URL)/api/manufacturers/?display=[name]&filter[name]=[appl]%

PHP:

Code Block

$opt = array( 'resource'     => 'manufacturers', 
              'display'      => '[name]', 
              'filter[name]' => '[appl]%');

...

URL: Store URL/api/customers?display=full&sort=[lastname_ASC]

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' );