Skip to content

Latest commit

 

History

History
265 lines (188 loc) · 7.86 KB

StoresApi.md

File metadata and controls

265 lines (188 loc) · 7.86 KB

DillerAPI\StoresApi

All URIs are relative to /

Method HTTP request Description
createDepartment POST /api/v2.0/stores/{storeId}/departments Add store department
get GET /api/v2.0/stores/{storeId} Gets store
getAll GET /api/v2.0/stores Get all stores that the client has access to
getDepartments GET /api/v2.0/stores/{storeId}/departments Get store departments
getSegments GET /api/v2.0/stores/{storeId}/segments Retrieves all store's segments

createDepartment

\DillerAPI\Model\StoreDepartmentResponse[] createDepartment($storeId, $body)

Add store department

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
$config = DillerAPI\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new DillerAPI\Api\StoresApi(
    // 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
);
$storeId = "storeId_example"; // string | The store id
$body = new \DillerAPI\Model\CreateDepartmentRequest(); // \DillerAPI\Model\CreateDepartmentRequest | 

try {
    $result = $apiInstance->createDepartment($storeId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StoresApi->createDepartment: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
storeId string The store id
body \DillerAPI\Model\CreateDepartmentRequest [optional]

Return type

\DillerAPI\Model\StoreDepartmentResponse[]

Authorization

OAuth2

HTTP request headers

  • Content-Type: application/json, text/json, application/_*+json
  • Accept: application/json

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

get

\DillerAPI\Model\StoreResponse get($storeId)

Gets store

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
$config = DillerAPI\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new DillerAPI\Api\StoresApi(
    // 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
);
$storeId = "storeId_example"; // string | The id of the store

try {
    $result = $apiInstance->get($storeId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StoresApi->get: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
storeId string The id of the store

Return type

\DillerAPI\Model\StoreResponse

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

getAll

\DillerAPI\Model\StoreResponse[] getAll()

Get all stores that the client has access to

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
$config = DillerAPI\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new DillerAPI\Api\StoresApi(
    // 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
);

try {
    $result = $apiInstance->getAll();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StoresApi->getAll: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

\DillerAPI\Model\StoreResponse[]

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

getDepartments

\DillerAPI\Model\StoreDepartmentResponse[] getDepartments($storeId)

Get store departments

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
$config = DillerAPI\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new DillerAPI\Api\StoresApi(
    // 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
);
$storeId = "storeId_example"; // string | The store id

try {
    $result = $apiInstance->getDepartments($storeId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StoresApi->getDepartments: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
storeId string The store id

Return type

\DillerAPI\Model\StoreDepartmentResponse[]

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

getSegments

\DillerAPI\Model\StoreSegmentResponse[] getSegments($storeId)

Retrieves all store's segments

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
$config = DillerAPI\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new DillerAPI\Api\StoresApi(
    // 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
);
$storeId = "storeId_example"; // string | The Id of the store

try {
    $result = $apiInstance->getSegments($storeId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StoresApi->getSegments: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
storeId string The Id of the store

Return type

\DillerAPI\Model\StoreSegmentResponse[]

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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