Skip to content

Latest commit

 

History

History
126 lines (88 loc) · 4.54 KB

OrdersApi.md

File metadata and controls

126 lines (88 loc) · 4.54 KB

Swagger\Client\OrdersApi

All URIs are relative to https://api.facestore.pt/v1

Method HTTP request Description
getOrderById GET /orders/{id}/
getOrders GET /orders

getOrderById

\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

Example

<?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;
}
?>

Parameters

Name Type Description Notes
id int ID of customer
includes string[] Include associated objects within response [optional]

Return type

\Swagger\Client\Model\Order[]

Authorization

APIKeyHeader

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getOrders

\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

Example

<?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;
}
?>

Parameters

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

Return type

\Swagger\Client\Model\Order[]

Authorization

APIKeyHeader

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]