Skip to content

Latest commit

 

History

History
66 lines (47 loc) · 3.05 KB

ShopListingProductApi.md

File metadata and controls

66 lines (47 loc) · 3.05 KB

Swagger\Client\ShopListingProductApi

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

Method HTTP request Description
getListingProduct GET /v3/application/listings/{listing_id}/inventory/products/{product_id}

getListingProduct

\Swagger\Client\Model\ListingInventoryProduct getListingProduct($listing_id, $product_id)

General ReleaseReport bug

This endpoint is ready for production use.

Open API V3 endpoint to retrieve a ListingProduct by 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');
// Configure OAuth2 access token for authorization: oauth2
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Swagger\Client\Api\ShopListingProductApi(
    // 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
);
$listing_id = 56; // int | The listing to return a ListingProduct for.
$product_id = 56; // int | The numeric ID for a specific [product](/documentation/reference#tag/ShopListing-Product) purchased from a listing.

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

Parameters

Name Type Description Notes
listing_id int The listing to return a ListingProduct for.
product_id int The numeric ID for a specific product purchased from a listing.

Return type

\Swagger\Client\Model\ListingInventoryProduct

Authorization

api_key, 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]