All URIs are relative to https://api.facestore.pt/v1
Method | HTTP request | Description |
---|---|---|
addShipping | POST /shippings | |
deleteShippingById | DELETE /shippings/{id}/ | |
getShippingById | GET /shippings/{id}/ | |
getShippings | GET /shippings | |
updateShippingById | PUT /shippings/{id}/ |
\Swagger\Client\Model\InlineResponse2013 addShipping($shipping)
Creates a new shipping in the store.
<?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\ShippingsApi(
// 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
);
$shipping = new \Swagger\Client\Model\Shipping(); // \Swagger\Client\Model\Shipping | Shipping to add to the store
try {
$result = $apiInstance->addShipping($shipping);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ShippingsApi->addShipping: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
shipping | \Swagger\Client\Model\Shipping | Shipping to add to the store |
\Swagger\Client\Model\InlineResponse2013
- Content-Type: application/json, multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteShippingById($id)
deletes a single shipping based on the ID supplied
<?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\ShippingsApi(
// 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 shipping to delete
try {
$apiInstance->deleteShippingById($id);
} catch (Exception $e) {
echo 'Exception when calling ShippingsApi->deleteShippingById: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | ID of shipping to delete |
void (empty response body)
- 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\InlineResponse2013 getShippingById($id, $includes)
Returns a shipping based on a single ID
<?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\ShippingsApi(
// 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 shipping to fetch
$includes = array("includes_example"); // string[] | Include associated objects within response
try {
$result = $apiInstance->getShippingById($id, $includes);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ShippingsApi->getShippingById: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | ID of shipping to fetch | |
includes | string[] | Include associated objects within response | [optional] |
\Swagger\Client\Model\InlineResponse2013
- 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\InlineResponse2005 getShippings($includes, $limit, $order_by)
Returns all shippings from the system that the user has access to
<?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\ShippingsApi(
// 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->getShippings($includes, $limit, $order_by);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ShippingsApi->getShippings: ', $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 |
\Swagger\Client\Model\InlineResponse2005
- 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\InlineResponse2013 updateShippingById($id, $tax)
update a single shipping based on the ID supplied
<?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\ShippingsApi(
// 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 shipping to update
$tax = new \Swagger\Client\Model\Shipping(); // \Swagger\Client\Model\Shipping | Shipping to update in store
try {
$result = $apiInstance->updateShippingById($id, $tax);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ShippingsApi->updateShippingById: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | ID of shipping to update | |
tax | \Swagger\Client\Model\Shipping | Shipping to update in store |
\Swagger\Client\Model\InlineResponse2013
- Content-Type: application/json, multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]