All URIs are relative to https://openapi.etsy.com
| Method | HTTP request | Description |
|---|---|---|
| deleteListingImage | DELETE /v3/application/shops/{shop_id}/listings/{listing_id}/images/{listing_image_id} | |
| getListingImage | GET /v3/application/listings/{listing_id}/images/{listing_image_id} | |
| getListingImages | GET /v3/application/listings/{listing_id}/images | |
| uploadListingImage | POST /v3/application/shops/{shop_id}/listings/{listing_id}/images |
deleteListingImage(shopId, listingId, listingImageId)
<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> Open API V3 endpoint to delete a listing image. A copy of the file remains on our servers, and so a deleted image may be re-associated with the listing without re-uploading the original image; see uploadListingImage.
// Import classes:
//import com.etsy.infrastructure.*
//import com.etsy.models.*
val apiInstance = ShopListingImageApi()
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 listingImageId : kotlin.Long = 789 // kotlin.Long | The numeric ID of the primary [listing image](/documentation/reference#tag/ShopListing-Image) for this transaction.
try {
apiInstance.deleteListingImage(shopId, listingId, listingImageId)
} catch (e: ClientException) {
println("4xx response calling ShopListingImageApi#deleteListingImage")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ShopListingImageApi#deleteListingImage")
e.printStackTrace()
}
| 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 | | ————- | ————- | ————- | ————- | | listingImageId | kotlin.Long| The numeric ID of the primary listing image for this transaction. | |
null (empty response body)
Configure api_key: ApiClient.apiKey[“x-api-key”] = “” ApiClient.apiKeyPrefix[“x-api-key”] = “” Configure oauth2: ApiClient.accessToken = “”
ListingImage getListingImage(listingId, listingImageId)
<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> Retrieves the references and metadata for a listing image with a specific image ID.
// Import classes:
//import com.etsy.infrastructure.*
//import com.etsy.models.*
val apiInstance = ShopListingImageApi()
val listingId : kotlin.Long = 789 // kotlin.Long | The numeric ID for the [listing](/documentation/reference#tag/ShopListing) associated to this transaction.
val listingImageId : kotlin.Long = 789 // kotlin.Long | The numeric ID of the primary [listing image](/documentation/reference#tag/ShopListing-Image) for this transaction.
try {
val result : ListingImage = apiInstance.getListingImage(listingId, listingImageId)
println(result)
} catch (e: ClientException) {
println("4xx response calling ShopListingImageApi#getListingImage")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ShopListingImageApi#getListingImage")
e.printStackTrace()
}
| listingId | kotlin.Long| The numeric ID for the listing associated to this transaction. | | | Name | Type | Description | Notes | | ————- | ————- | ————- | ————- | | listingImageId | kotlin.Long| The numeric ID of the primary listing image for this transaction. | |
Configure api_key: ApiClient.apiKey[“x-api-key”] = “” ApiClient.apiKeyPrefix[“x-api-key”] = “”
ListingImages getListingImages(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> Retrieves all listing image resources for a listing with a specific listing ID.
// Import classes:
//import com.etsy.infrastructure.*
//import com.etsy.models.*
val apiInstance = ShopListingImageApi()
val listingId : kotlin.Long = 789 // kotlin.Long | The numeric ID for the [listing](/documentation/reference#tag/ShopListing) associated to this transaction.
try {
val result : ListingImages = apiInstance.getListingImages(listingId)
println(result)
} catch (e: ClientException) {
println("4xx response calling ShopListingImageApi#getListingImages")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ShopListingImageApi#getListingImages")
e.printStackTrace()
}
| Name | Type | Description | Notes | | ————- | ————- | ————- | ————- | | listingId | kotlin.Long| The numeric ID for the listing associated to this transaction. | |
Configure api_key: ApiClient.apiKey[“x-api-key”] = “” ApiClient.apiKeyPrefix[“x-api-key”] = “”
ListingImage uploadListingImage(shopId, listingId, image, listingImageId, rank, overwrite, isWatermarked, altText)
<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> Uploads or assigns an image to a listing identified by a shop ID with a listing ID. To upload a new image, set the image file as the value for the `image` parameter. You can assign a previously deleted image to a listing using the deleted image's image ID in the `listing_image_id` parameter. When a request contains both `image` and `listing_image_id` parameter values, the endpoint uploads the image in the `image` parameter only. Note: When uploading a new image, data such as colors and size may return as null values due to asynchronous processing of the image. Use getListingImage endpoint to fetch these values.
// Import classes:
//import com.etsy.infrastructure.*
//import com.etsy.models.*
val apiInstance = ShopListingImageApi()
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 image : io.ktor.client.request.forms.FormPart<io.ktor.client.request.forms.InputProvider> = BINARY_DATA_HERE // io.ktor.client.request.forms.FormPart<io.ktor.client.request.forms.InputProvider> | The file name string of a file to upload
val listingImageId : kotlin.Long = 789 // kotlin.Long | The numeric ID of the primary [listing image](/documentation/reference#tag/ShopListing-Image) for this transaction.
val rank : kotlin.Int = 56 // kotlin.Int | The positive non-zero numeric position in the images displayed in a listing, with rank 1 images appearing in the left-most position in a listing.
val overwrite : kotlin.Boolean = true // kotlin.Boolean | When true, this request replaces the existing image at a given rank.
val isWatermarked : kotlin.Boolean = true // kotlin.Boolean | When true, indicates that the uploaded image has a watermark.
val altText : kotlin.String = altText_example // kotlin.String | Alt text for the listing image. Max length 500 characters.
try {
val result : ListingImage = apiInstance.uploadListingImage(shopId, listingId, image, listingImageId, rank, overwrite, isWatermarked, altText)
println(result)
} catch (e: ClientException) {
println("4xx response calling ShopListingImageApi#uploadListingImage")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ShopListingImageApi#uploadListingImage")
e.printStackTrace()
}
| 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. | | | image | io.ktor.client.request.forms.FormPart<io.ktor.client.request.forms.InputProvider>| The file name string of a file to upload | [optional] | | listingImageId | kotlin.Long| The numeric ID of the primary listing image for this transaction. | [optional] | | rank | kotlin.Int| The positive non-zero numeric position in the images displayed in a listing, with rank 1 images appearing in the left-most position in a listing. | [optional] [default to 1] | | overwrite | kotlin.Boolean| When true, this request replaces the existing image at a given rank. | [optional] [default to false] | | isWatermarked | kotlin.Boolean| When true, indicates that the uploaded image has a watermark. | [optional] [default to false] | | Name | Type | Description | Notes | | ————- | ————- | ————- | ————- | | altText | kotlin.String| Alt text for the listing image. Max length 500 characters. | [optional] [default to ""] |
Configure api_key: ApiClient.apiKey[“x-api-key”] = “” ApiClient.apiKeyPrefix[“x-api-key”] = “” Configure oauth2: ApiClient.accessToken = “”