Skip to content

Latest commit

 

History

History
128 lines (85 loc) · 4.45 KB

BlacklistManagementApi.md

File metadata and controls

128 lines (85 loc) · 4.45 KB

OpenAPI\AllegroSdk\BlacklistManagementApi

All URIs are relative to https://api.allegro.pl.

Method HTTP request Description
doAddToBlackList() POST /sale/blacklisted-users Add a users to the blacklist
doRemoveFromBlackList() DELETE /sale/blacklisted-users/{excludedUserId} Remove users from the blacklist

doAddToBlackList()

doAddToBlackList($blacklist_request): \OpenAPI\AllegroSdk\Model\BlackListResponse

Add a users to the blacklist

Use this resource to add new users to the blacklist on given account. At least one of id or login is required. Read more: <a href="../../tutorials/jak-zarzadzac-kontem-danymi-uzytkownika-ZM9YAKgPgi2#jak-dodac-kupujacego-do-listy-nieaktywnych-kupujacych" target="_blank">PL / <a href="../../tutorials/account-and-user-data-management-jn9vBjqjnsw#how-to-add-the-buyer-to-the-blacklist" target="_blank">EN.

Example

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


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


$apiInstance = new OpenAPI\AllegroSdk\Api\BlacklistManagementApi(
    // 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
);
$blacklist_request = new \OpenAPI\AllegroSdk\Model\BlacklistRequest(); // \OpenAPI\AllegroSdk\Model\BlacklistRequest | request

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

Parameters

Name Type Description Notes
blacklist_request \OpenAPI\AllegroSdk\Model\BlacklistRequest request

Return type

\OpenAPI\AllegroSdk\Model\BlackListResponse

Authorization

bearer-token-for-user

HTTP request headers

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

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

doRemoveFromBlackList()

doRemoveFromBlackList($excluded_user_id)

Remove users from the blacklist

Use this resource to remove users from the blacklist on given account. Read more: <a href="../../tutorials/jak-zarzadzac-kontem-danymi-uzytkownika-ZM9YAKgPgi2#jak-usunac-uzytkownika-z-listy-nieaktywnych-kupujacych" target="_blank">PL / <a href="../../tutorials/account-and-user-data-management-jn9vBjqjnsw#how-to-remove-a-user-from-blacklist" target="_blank">EN.

Example

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


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


$apiInstance = new OpenAPI\AllegroSdk\Api\BlacklistManagementApi(
    // 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
);
$excluded_user_id = 56; // int | Remove users from the blacklist.

try {
    $apiInstance->doRemoveFromBlackList($excluded_user_id);
} catch (Exception $e) {
    echo 'Exception when calling BlacklistManagementApi->doRemoveFromBlackList: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
excluded_user_id int Remove users from the blacklist.

Return type

void (empty response body)

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]