Order Products: list
Fetches objects collection.

HTTP Request
GET https://shop.url/webapi/rest/order-products
Parameters
Parameter	Type	Description
limit	integer	count of fetched objects, default: 10, max: 50
order	string	collection sort field
page	integer	index of requested page, default: 1
offset	integer	starting record index (used instead of page)
filters	string	JSON-ified string with filtering criteria
Sort fields
Parameter	Description
id	identifier
order_id	order identifier
product_id	product identifier. Value 0 means the product has never existed in catalog and has been added in different way (eg. using API). Attention: it may point on non-existing or an invalid product. You need to add a main product first before you can add a product variant.
stock_id	product stock identifier. Value 0 means the product has never existed in catalog and has been added in different way (eg. using API). Attention: it may point on non-existing or an invalid product. You don't need to add a main product, but you must add a product variant.
price	product price
discount_perc	percent of discount
quantity	quantity - if warehouses is enabled field is read only
warehouses	if warehouses is enabled it represents source warehouses, shipping warehouses and quantities
warehouses.(key).source_warehouse_id	source warehouse
warehouses.(key).shipping_warehouse_id	shipping warehouse
warehouses.(key).quantity	qunatity
delivery_time (deprecated since 5.20.14)	delivery time in days
delivery_time_hours	delivery time in hours
name	product name
code	product code
pkwiu	PKWiU (product quantifier)
tax	tax rate name
tax_value	tax rate value
unit_id	unit identifier
option	product stock name
unit_fp	determines if unit is floating point
weight	product weight
created_at	datetime information on object creation in ISO_8601 format
updated_at	datetime information on latest object modification in ISO_8601 format
Filtering criteria
Parameter	Description
id	identifier
order_id	order identifier
product_id	product identifier. Value 0 means the product has never existed in catalog and has been added in different way (eg. using API). Attention: it may point on non-existing or an invalid product. You need to add a main product first before you can add a product variant.
stock_id	product stock identifier. Value 0 means the product has never existed in catalog and has been added in different way (eg. using API). Attention: it may point on non-existing or an invalid product. You don't need to add a main product, but you must add a product variant.
price	product price
discount_perc	percent of discount
quantity	quantity - if warehouses is enabled field is read only
warehouses	if warehouses is enabled it represents source warehouses, shipping warehouses and quantities
warehouses.(key).source_warehouse_id	source warehouse
warehouses.(key).shipping_warehouse_id	shipping warehouse
warehouses.(key).quantity	qunatity
delivery_time (deprecated since 5.20.14)	delivery time in days
delivery_time_hours	delivery time in hours
name	product name
code	product code
pkwiu	PKWiU (product quantifier)
tax	tax rate name
tax_value	tax rate value
unit_id	unit identifier
option	product stock name
unit_fp	determines if unit is floating point
weight	product weight
created_at	datetime information on object creation in ISO_8601 format
updated_at	datetime information on latest object modification in ISO_8601 format
API Scope
This method requires at least one of the following permissions:

orders_delete
orders_create
orders_read
orders_edit
HTTP Request body
This method doesn't expect any request body parameters

HTTP Response body
Upon successful request, the collection of objects is returned according to the following structure:

{
    "count": integer,
    "pages": integer,
    "page": integer,
    "list": [
        Resource
    ]
}
Parameter	Type	Description
count	integer	a count of objects satisfying criteria
pages	integer	count of pages with results
page	integer	number of current page
list	array	a collection of objects
ExamplePHP
try{
    $options = array(
        'entrypoint' => $entrypoint,
        'client_id' => $clientId,
        'client_secret' => $clientSecret,
        'access_token' => $accessToken
    );
    $client = DreamCommerce\ShopAppstoreLib\Client::factory('OAuth', $options);

    $resource = new DreamCommerce\ShopAppstoreLib\Resource\OrderProduct($client);
    $result = $resource->get();

    foreach($result as $r){
        printf("#%d - %s @ %.2f \n", $r->id, $r->name, $r->price);
    }
} catch(DreamCommerce\ShopAppstoreLib\Exception\Exception $ex) {
    die($ex->getMessage());
}