All URIs are relative to https://api.facestore.pt/v1
Method | HTTP request | Description |
---|---|---|
getOrderById | GET /orders/{id}/ | |
getOrders | GET /orders |
\Swagger\Client\Model\Order[] getOrderById($id, $includes)
Returns all orders from the system that the user has access to ### Includes You can give the following values on includes parameter: products, customers
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: APIKeyHeader
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('APIToken', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('APIToken', 'Bearer');
$apiInstance = new Swagger\Client\Api\OrdersApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 789; // int | ID of customer
$includes = array("includes_example"); // string[] | Include associated objects within response
try {
$result = $apiInstance->getOrderById($id, $includes);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrdersApi->getOrderById: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | ID of customer | |
includes | string[] | Include associated objects within response | [optional] |
- Content-Type: application/json, multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\Order[] getOrders($includes, $limit, $order_by)
Returns all orders from the system that the user has access to ### Includes You can give the following values on includes parameter: products, customers
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: APIKeyHeader
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('APIToken', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('APIToken', 'Bearer');
$apiInstance = new Swagger\Client\Api\OrdersApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$includes = array("includes_example"); // string[] | Include associated objects within response
$limit = 56; // int | max records to return
$order_by = array("order_by_example"); // string[] | Specify the field to be sorted, examples: - `?order_by=id|desc` - `?order_by=updated_at|desc,position|asc`
try {
$result = $apiInstance->getOrders($includes, $limit, $order_by);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrdersApi->getOrders: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
includes | string[] | Include associated objects within response | [optional] |
limit | int | max records to return | [optional] |
order_by | string[] | Specify the field to be sorted, examples: - `?order_by=id | desc` - `?order_by=updated_at |
- Content-Type: application/json, multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]