All URIs are relative to https://api.mysitoo.com/v2/accounts/1500, except if the operation defines another base path.
Method | HTTP request | Description |
---|---|---|
addVoucher() | POST /sites/{siteid}/vouchers.json | |
deleteVoucher() | DELETE /sites/{siteid}/vouchers/{voucherid}.json | |
getVoucher() | GET /sites/{siteid}/vouchers/{voucherid}.json | |
getVouchers() | GET /sites/{siteid}/vouchers.json | |
updateVoucher() | PUT /sites/{siteid}/vouchers/{voucherid}.json |
addVoucher($siteid, $voucherWrite)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Spy\SitooClient\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Spy\SitooClient\Api\VouchersApi(
// 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
);
$siteid = 56; // int
$voucherWrite = {vouchertype=200, vouchername=Resellers, value_x=30}; // \Spy\SitooClient\Model\VoucherWrite
try {
$apiInstance->addVoucher($siteid, $voucherWrite);
} catch (Exception $e) {
echo 'Exception when calling VouchersApi->addVoucher: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
siteid | int | ||
voucherWrite | \Spy\SitooClient\Model\VoucherWrite |
void (empty response body)
- Content-Type:
application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteVoucher($siteid, $voucherid): bool
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Spy\SitooClient\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Spy\SitooClient\Api\VouchersApi(
// 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
);
$siteid = 56; // int
$voucherid = 56; // int
try {
$result = $apiInstance->deleteVoucher($siteid, $voucherid);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling VouchersApi->deleteVoucher: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
siteid | int | ||
voucherid | int |
bool
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getVoucher($siteid, $voucherid): \Spy\SitooClient\Model\VoucherRead
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Spy\SitooClient\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Spy\SitooClient\Api\VouchersApi(
// 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
);
$siteid = 56; // int
$voucherid = 56; // int
try {
$result = $apiInstance->getVoucher($siteid, $voucherid);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling VouchersApi->getVoucher: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
siteid | int | ||
voucherid | int |
\Spy\SitooClient\Model\VoucherRead
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getVouchers($siteid, $start, $num, $fields): \Spy\SitooClient\Model\GetVouchersResponse
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Spy\SitooClient\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Spy\SitooClient\Api\VouchersApi(
// 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
);
$siteid = 56; // int
$start = 56; // int
$num = 56; // int
$fields = array('fields_example'); // string[] | list of fields, comma-separated
try {
$result = $apiInstance->getVouchers($siteid, $start, $num, $fields);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling VouchersApi->getVouchers: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
siteid | int | ||
start | int | [optional] | |
num | int | [optional] | |
fields | string[] | list of fields, comma-separated | [optional] |
\Spy\SitooClient\Model\GetVouchersResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateVoucher($siteid, $voucherid, $voucherWrite): bool
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Spy\SitooClient\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Spy\SitooClient\Api\VouchersApi(
// 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
);
$siteid = 56; // int
$voucherid = 56; // int
$voucherWrite = {vouchername=Voucher for Resellers}; // \Spy\SitooClient\Model\VoucherWrite
try {
$result = $apiInstance->updateVoucher($siteid, $voucherid, $voucherWrite);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling VouchersApi->updateVoucher: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
siteid | int | ||
voucherid | int | ||
voucherWrite | \Spy\SitooClient\Model\VoucherWrite |
bool
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]