All URIs are relative to https://api.volocommerce.io/1.0
Method | HTTP request | Description |
---|---|---|
doRemove | DELETE /locations/{locationId} | Remove Locations |
doUpdate | PUT /locations | Update Locations |
getLocations | GET /locations | Returns locations based on given criteria |
saveLocations | POST /locations | Add new locations |
doRemove($location_id)
Remove Locations
Remove Location.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new \VoloCommerce\Api\v1\Client\LocationsApi();
$location_id = 56; // int |
try {
$api_instance->doRemove($location_id);
} catch (Exception $e) {
echo 'Exception when calling LocationsApi->doRemove: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
location_id | int |
void (empty response body)
No authorization required
- Content-Type: application/json; charset=utf-8
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\VoloCommerce\Api\v1\Model\AddUpdatedLocationResponse doUpdate($body)
Update Locations
Update Location.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new \VoloCommerce\Api\v1\Client\LocationsApi();
$body = new \VoloCommerce\Api\v1\Model\UpdateLocation(); // \VoloCommerce\Api\v1\Model\UpdateLocation |
try {
$result = $api_instance->doUpdate($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LocationsApi->doUpdate: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \VoloCommerce\Api\v1\Model\UpdateLocation | [optional] |
\VoloCommerce\Api\v1\Model\AddUpdatedLocationResponse
No authorization required
- Content-Type: application/json; charset=utf-8
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\VoloCommerce\Api\v1\Model\LocationsResponse getLocations($authorization, $x_api_key, $id, $parent_id, $pickable, $physical_location, $virtual_stock, $page_number, $entries_per_page)
Returns locations based on given criteria
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new \VoloCommerce\Api\v1\Client\LocationsApi();
$authorization = "authorization_example"; // string | Auth token
$x_api_key = "x_api_key_example"; // string | API Key
$id = 56; // int | Location ID
$parent_id = 56; // int | ID of the parent location
$pickable = true; // bool | Pickable location?
$physical_location = true; // bool | Physical location?
$virtual_stock = true; // bool | Virtual location?
$page_number = 56; // int | The Page number for pagination
$entries_per_page = 56; // int | No of records in a page to be retrieved
try {
$result = $api_instance->getLocations($authorization, $x_api_key, $id, $parent_id, $pickable, $physical_location, $virtual_stock, $page_number, $entries_per_page);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LocationsApi->getLocations: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | Auth token | |
x_api_key | string | API Key | |
id | int | Location ID | [optional] |
parent_id | int | ID of the parent location | [optional] |
pickable | bool | Pickable location? | [optional] |
physical_location | bool | Physical location? | [optional] |
virtual_stock | bool | Virtual location? | [optional] |
page_number | int | The Page number for pagination | [optional] |
entries_per_page | int | No of records in a page to be retrieved | [optional] |
\VoloCommerce\Api\v1\Model\LocationsResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
saveLocations($authorization, $x_api_key, $body)
Add new locations
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new \VoloCommerce\Api\v1\Client\LocationsApi();
$authorization = "authorization_example"; // string | Auth token
$x_api_key = "x_api_key_example"; // string | API Key
$body = new \VoloCommerce\Api\v1\Model\AddLocations(); // \VoloCommerce\Api\v1\Model\AddLocations |
try {
$api_instance->saveLocations($authorization, $x_api_key, $body);
} catch (Exception $e) {
echo 'Exception when calling LocationsApi->saveLocations: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | Auth token | |
x_api_key | string | API Key | |
body | \VoloCommerce\Api\v1\Model\AddLocations | [optional] |
void (empty response body)
No authorization required
- Content-Type: application/json; charset=utf-8
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]