etsy

ShopListingVariationImageApi

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

Method HTTP request Description
getListingVariationImages GET /v3/application/shops/{shop_id}/listings/{listing_id}/variation-images  
updateVariationImages POST /v3/application/shops/{shop_id}/listings/{listing_id}/variation-images  

getListingVariationImages

ListingVariationImages getListingVariationImages(shopId, listingId)

<div class=\"wt-display-flex-xs wt-align-items-center wt-mt-xs-2 wt-mb-xs-3\"><span class=\"wt-badge wt-badge–notificationPrimary wt-bg-slime-tint wt-mr-xs-2\">General Release</span><a class=\"wt-text-link\" href=\"https://github.com/etsy/open-api/discussions\" target=\"_blank\" rel=\"noopener noreferrer\">Report bug</a></div><div class=\"wt-display-flex-xs wt-align-items-center wt-mt-xs-2 wt-mb-xs-3\"><p class=\"wt-text-body-01 banner-text\">This endpoint is ready for production use.</p></div> Gets all variation images on a listing.

Example

// Import classes:
//import com.etsy.infrastructure.*
//import com.etsy.models.*

val apiInstance = ShopListingVariationImageApi()
val shopId : kotlin.Long = 789 // kotlin.Long | The unique positive non-zero numeric ID for an Etsy Shop.
val listingId : kotlin.Long = 789 // kotlin.Long | The numeric ID for the [listing](/documentation/reference#tag/ShopListing) associated to this transaction.
try {
    val result : ListingVariationImages = apiInstance.getListingVariationImages(shopId, listingId)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling ShopListingVariationImageApi#getListingVariationImages")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling ShopListingVariationImageApi#getListingVariationImages")
    e.printStackTrace()
}

Parameters

| shopId | kotlin.Long| The unique positive non-zero numeric ID for an Etsy Shop. | | | Name | Type | Description | Notes | | ————- | ————- | ————- | ————- | | listingId | kotlin.Long| The numeric ID for the listing associated to this transaction. | |

Return type

ListingVariationImages

Authorization

Configure api_key: ApiClient.apiKey[“x-api-key”] = “” ApiClient.apiKeyPrefix[“x-api-key”] = “”

HTTP request headers

updateVariationImages

ListingVariationImages updateVariationImages(shopId, listingId, updateVariationImagesRequest)

<div class=\"wt-display-flex-xs wt-align-items-center wt-mt-xs-2 wt-mb-xs-3\"><span class=\"wt-badge wt-badge–notificationPrimary wt-bg-slime-tint wt-mr-xs-2\">General Release</span><a class=\"wt-text-link\" href=\"https://github.com/etsy/open-api/discussions\" target=\"_blank\" rel=\"noopener noreferrer\">Report bug</a></div><div class=\"wt-display-flex-xs wt-align-items-center wt-mt-xs-2 wt-mb-xs-3\"><p class=\"wt-text-body-01 banner-text\">This endpoint is ready for production use.</p></div> Creates variation images on a listing. `variation_images` is an array with inputs for the `property_id`, `value_id`, and `image_id` fields. `image_ids` are associated with a `ListingImage` on the listing associated with the provided `listing_id`. `property_id` and `value_id` pairs are associated with a `ListingProduct` on the listing associated with the provided `listing_id`. `variation_images` should not contain any duplicates. `variation_images` does not contain more than one `property_id` as variation images can only be associated on one property. The update overwrites all existing variation images on a listing, so if your request is successful, the variation images on the listing will be exactly those you specify.

Example

// Import classes:
//import com.etsy.infrastructure.*
//import com.etsy.models.*

val apiInstance = ShopListingVariationImageApi()
val shopId : kotlin.Long = 789 // kotlin.Long | The unique positive non-zero numeric ID for an Etsy Shop.
val listingId : kotlin.Long = 789 // kotlin.Long | The numeric ID for the [listing](/documentation/reference#tag/ShopListing) associated to this transaction.
val updateVariationImagesRequest : UpdateVariationImagesRequest =  // UpdateVariationImagesRequest | 
try {
    val result : ListingVariationImages = apiInstance.updateVariationImages(shopId, listingId, updateVariationImagesRequest)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling ShopListingVariationImageApi#updateVariationImages")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling ShopListingVariationImageApi#updateVariationImages")
    e.printStackTrace()
}

Parameters

| shopId | kotlin.Long| The unique positive non-zero numeric ID for an Etsy Shop. | | | listingId | kotlin.Long| The numeric ID for the listing associated to this transaction. | | | Name | Type | Description | Notes | | ————- | ————- | ————- | ————- | | updateVariationImagesRequest | UpdateVariationImagesRequest| | [optional] |

Return type

ListingVariationImages

Authorization

Configure api_key: ApiClient.apiKey[“x-api-key”] = “” ApiClient.apiKeyPrefix[“x-api-key”] = “” Configure oauth2: ApiClient.accessToken = “”

HTTP request headers