Skip to content

Latest commit

 

History

History
243 lines (176 loc) · 10.7 KB

ShopApi.md

File metadata and controls

243 lines (176 loc) · 10.7 KB

Swagger\Client\ShopApi

All URIs are relative to https://openapi.etsy.com

Method HTTP request Description
findShops GET /v3/application/shops
getShop GET /v3/application/shops/{shop_id}
getShopByOwnerUserId GET /v3/application/users/{user_id}/shops
updateShop PUT /v3/application/shops/{shop_id}

findShops

\Swagger\Client\Model\Shops findShops($shop_name, $limit, $offset)

General ReleaseReport bug

This endpoint is ready for production use.

Open API V3 endpoint for searching shops by name. Note: We make every effort to ensure that frozen or removed shops are not included in the search results. However, rarely, due to timing issues, they may appear.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');

$apiInstance = new Swagger\Client\Api\ShopApi(
    // 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
);
$shop_name = "shop_name_example"; // string | The shop's name string.
$limit = 25; // int | The maximum number of results to return.
$offset = 0; // int | The number of records to skip before selecting the first result.

try {
    $result = $apiInstance->findShops($shop_name, $limit, $offset);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ShopApi->findShops: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
shop_name string The shop's name string.
limit int The maximum number of results to return. [optional] [default to 25]
offset int The number of records to skip before selecting the first result. [optional] [default to 0]

Return type

\Swagger\Client\Model\Shops

Authorization

api_key

HTTP request headers

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

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

getShop

\Swagger\Client\Model\Shop getShop($shop_id)

General ReleaseReport bug

This endpoint is ready for production use.

Retrieves the shop identified by a specific shop ID.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');

$apiInstance = new Swagger\Client\Api\ShopApi(
    // 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
);
$shop_id = 56; // int | The unique positive non-zero numeric ID for an Etsy Shop.

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

Parameters

Name Type Description Notes
shop_id int The unique positive non-zero numeric ID for an Etsy Shop.

Return type

\Swagger\Client\Model\Shop

Authorization

api_key

HTTP request headers

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

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

getShopByOwnerUserId

\Swagger\Client\Model\Shop getShopByOwnerUserId($user_id)

General ReleaseReport bug

This endpoint is ready for production use.

Retrieves the shop identified by the shop owner's user ID.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');

$apiInstance = new Swagger\Client\Api\ShopApi(
    // 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
);
$user_id = 56; // int | The numeric user ID of the [user](/documentation/reference#tag/User) who owns this shop.

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

Parameters

Name Type Description Notes
user_id int The numeric user ID of the user who owns this shop.

Return type

\Swagger\Client\Model\Shop

Authorization

api_key

HTTP request headers

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

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

updateShop

\Swagger\Client\Model\Shop updateShop($shop_id, $title, $announcement, $sale_message, $digital_sale_message, $policy_additional)

General ReleaseReport bug

This endpoint is ready for production use.

Updates a shop. Assumes that all string parameters are provided in the shop's primary language. Please note that the policy_additional field should only be set for shops located in the EU. Passing a value for this field for shops outside of the EU, will result in an error.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
// Configure OAuth2 access token for authorization: oauth2
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Swagger\Client\Api\ShopApi(
    // 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
);
$shop_id = 56; // int | The unique positive non-zero numeric ID for an Etsy Shop.
$title = "title_example"; // string | 
$announcement = "announcement_example"; // string | 
$sale_message = "sale_message_example"; // string | 
$digital_sale_message = "digital_sale_message_example"; // string | 
$policy_additional = "policy_additional_example"; // string | 

try {
    $result = $apiInstance->updateShop($shop_id, $title, $announcement, $sale_message, $digital_sale_message, $policy_additional);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ShopApi->updateShop: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
shop_id int The unique positive non-zero numeric ID for an Etsy Shop.
title string [optional]
announcement string [optional]
sale_message string [optional]
digital_sale_message string [optional]
policy_additional string [optional]

Return type

\Swagger\Client\Model\Shop

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

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