Skip to content

Latest commit

 

History

History
357 lines (258 loc) · 17.6 KB

CategoriesAndParametersApi.md

File metadata and controls

357 lines (258 loc) · 17.6 KB

Swagger\Client\CategoriesAndParametersApi

All URIs are relative to https://api.{environment}

Method HTTP request Description
categorySuggestionUsingGET GET /sale/matching-categories Get categories suggestions
getCategoriesUsingGET GET /sale/categories Get IDs of Allegro categories
getCategoryEventsUsingGET1 GET /sale/category-events Get changes in categories
getCategoryParametersScheduledChangesUsingGET1 GET /sale/category-parameters-scheduled-changes Get planned changes in category parameters
getCategoryUsingGET1 GET /sale/categories/{categoryId} Get a category by ID
getFlatParametersUsingGET2 GET /sale/categories/{categoryId}/parameters Get parameters supported by a category

categorySuggestionUsingGET

\Swagger\Client\Model\CategorySuggestionResponse categorySuggestionUsingGET($name)

Get categories suggestions

Use this resource to receive suggested categories for given phrase. Read more: <a href="../../news/#matching-categories" target="_blank">PL / <a href="../../en/news/#matching-categories" target="_blank">EN.

Example

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

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

$apiInstance = new Swagger\Client\Api\CategoriesAndParametersApi(
    // 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
);
$name = "name_example"; // string | Product name for which you want to get suggested categories.

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

Parameters

Name Type Description Notes
name string Product name for which you want to get suggested categories.

Return type

\Swagger\Client\Model\CategorySuggestionResponse

Authorization

bearer-token-for-user

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.allegro.public.v1+json

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

getCategoriesUsingGET

\Swagger\Client\Model\CategoriesDto getCategoriesUsingGET($parent_id)

Get IDs of Allegro categories

Use this resource to traverse the Allegro categories tree. It returns the list of the given category's children or a list of the main Allegro categories. Read more: <a href="../../sale/#3-kategorie-i-parametry" target="_blank">PL / <a href="../../en/sale/#3-category-and-parameters" target="_blank">EN.

Example

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

// Configure OAuth2 access token for authorization: bearer-token-for-application
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: bearer-token-for-user
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Swagger\Client\Api\CategoriesAndParametersApi(
    // 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
);
$parent_id = "954b95b6-43cf-4104-8354-dea4d9b10ddf"; // string | The ID of the category which children should be returned. If omitted, the list of main Allegro categories will be returned.

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

Parameters

Name Type Description Notes
parent_id string The ID of the category which children should be returned. If omitted, the list of main Allegro categories will be returned. [optional] [default to 954b95b6-43cf-4104-8354-dea4d9b10ddf]

Return type

\Swagger\Client\Model\CategoriesDto

Authorization

bearer-token-for-application, bearer-token-for-user

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.allegro.public.v1+json

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

getCategoryEventsUsingGET1

\Swagger\Client\Model\CategoryEventsResponse getCategoryEventsUsingGET1($from, $limit, $type)

Get changes in categories

Use this resource to get information about changes in categories. It returns changes that occurred in the last 3 months. At present we support the following changes: - CATEGORY_CREATED - new category was created. - CATEGORY_RENAMED - category name has been changed. - CATEGORY_MOVED - category has been moved to a different place in category tree, category parent id field is changed. - CATEGORY_DELETED - category is no longer available, category from redirectCategory field should be used instead. Read more: <a href="../../my_offers/#dziennik-zmian-w-kategoriach" target="_blank">PL / <a href="../../en/my_offers/#event-journal-in-categories" target="_blank">EN.

Example

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

// Configure OAuth2 access token for authorization: bearer-token-for-application
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: bearer-token-for-user
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Swagger\Client\Api\CategoriesAndParametersApi(
    // 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
);
$from = "from_example"; // string | The ID of the last seen event. Changes that occurred after the given event will be returned.
$limit = 100; // int | The number of events that will be returned in the response.
$type = array("type_example"); // string[] | The types of events that will be returned in the response. All types of events are returned by default.

try {
    $result = $apiInstance->getCategoryEventsUsingGET1($from, $limit, $type);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CategoriesAndParametersApi->getCategoryEventsUsingGET1: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
from string The ID of the last seen event. Changes that occurred after the given event will be returned. [optional]
limit int The number of events that will be returned in the response. [optional] [default to 100]
type string[] The types of events that will be returned in the response. All types of events are returned by default. [optional]

Return type

\Swagger\Client\Model\CategoryEventsResponse

Authorization

bearer-token-for-application, bearer-token-for-user

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.allegro.public.v1+json, application/json

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

getCategoryParametersScheduledChangesUsingGET1

\Swagger\Client\Model\CategoryParametersScheduledChangesResponse getCategoryParametersScheduledChangesUsingGET1($scheduled_for_gte, $scheduled_for_lte, $scheduled_at_gte, $scheduled_at_lte, $type, $offset, $limit)

Get planned changes in category parameters

Use this resource to get information about planned changes in category parameters. Please note that in some cases, the returned events may finally not happen in the future. At present we support the following changes: - REQUIREMENT_CHANGE - the parameter will be required in the category. Read more: <a href="../../my_offers/#jak-sprawdzi%c4%87-przysz%c5%82e-zmiany-w-parametrach" target="_blank">PL / <a href="../../en/my_offers/#how-to-check-future-changes-in-parameters" target="_blank">EN.

Example

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

// Configure OAuth2 access token for authorization: bearer-token-for-application
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: bearer-token-for-user
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Swagger\Client\Api\CategoriesAndParametersApi(
    // 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
);
$scheduled_for_gte = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | The minimum date and time from which the change will be effective from in ISO 8601 format. Should be greater than the current date time and less than 3 months from the current date.
$scheduled_for_lte = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | The maximum date and time from which the change will be effective from in ISO 8601 format. Should be greater than the current date time and less than 3 months from the current date.
$scheduled_at_gte = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | The minimum date and time at which the change was scheduled in ISO 8601 format.
$scheduled_at_lte = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | The maximum date and time at which the change was scheduled in ISO 8601 format.
$type = array("type_example"); // string[] | The types of changes that will be returned in the response. All types of changes are returned by default.
$offset = 0; // int | The offset of elements in the response.
$limit = 100; // int | The limit of elements in the response.

try {
    $result = $apiInstance->getCategoryParametersScheduledChangesUsingGET1($scheduled_for_gte, $scheduled_for_lte, $scheduled_at_gte, $scheduled_at_lte, $type, $offset, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CategoriesAndParametersApi->getCategoryParametersScheduledChangesUsingGET1: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
scheduled_for_gte \DateTime The minimum date and time from which the change will be effective from in ISO 8601 format. Should be greater than the current date time and less than 3 months from the current date. [optional]
scheduled_for_lte \DateTime The maximum date and time from which the change will be effective from in ISO 8601 format. Should be greater than the current date time and less than 3 months from the current date. [optional]
scheduled_at_gte \DateTime The minimum date and time at which the change was scheduled in ISO 8601 format. [optional]
scheduled_at_lte \DateTime The maximum date and time at which the change was scheduled in ISO 8601 format. [optional]
type string[] The types of changes that will be returned in the response. All types of changes are returned by default. [optional]
offset int The offset of elements in the response. [optional] [default to 0]
limit int The limit of elements in the response. [optional] [default to 100]

Return type

\Swagger\Client\Model\CategoryParametersScheduledChangesResponse

Authorization

bearer-token-for-application, bearer-token-for-user

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.allegro.public.v1+json, application/json

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

getCategoryUsingGET1

\Swagger\Client\Model\CategoryDto getCategoryUsingGET1($category_id)

Get a category by ID

Use this resource to get the details of a specific category. Read more: <a href="../../sale/#3-kategorie-i-parametry" target="_blank">PL / <a href="../../en/sale/#3-category-and-parameters" target="_blank">EN.

Example

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

// Configure OAuth2 access token for authorization: bearer-token-for-application
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: bearer-token-for-user
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Swagger\Client\Api\CategoriesAndParametersApi(
    // 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
);
$category_id = "category_id_example"; // string | The category ID.

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

Parameters

Name Type Description Notes
category_id string The category ID.

Return type

\Swagger\Client\Model\CategoryDto

Authorization

bearer-token-for-application, bearer-token-for-user

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.allegro.public.v1+json

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

getFlatParametersUsingGET2

\Swagger\Client\Model\CategoryParameterList getFlatParametersUsingGET2($category_id)

Get parameters supported by a category

Use this resource to get the list of parameters that are supported by the given category. Read more: <a href="../../sale/#parametry" target="_blank">PL / <a href="../../en/sale/#parameters" target="_blank">EN.

Example

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

// Configure OAuth2 access token for authorization: bearer-token-for-application
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: bearer-token-for-user
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Swagger\Client\Api\CategoriesAndParametersApi(
    // 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
);
$category_id = "category_id_example"; // string | The category ID.

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

Parameters

Name Type Description Notes
category_id string The category ID.

Return type

\Swagger\Client\Model\CategoryParameterList

Authorization

bearer-token-for-application, bearer-token-for-user

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.allegro.public.v1+json

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