All URIs are relative to https://openapi.etsy.com
| Method | HTTP request | Description |
|---|---|---|
| deleteListingFile | DELETE /v3/application/shops/{shop_id}/listings/{listing_id}/files/{listing_file_id} | |
| getAllListingFiles | GET /v3/application/shops/{shop_id}/listings/{listing_id}/files | |
| getListingFile | GET /v3/application/shops/{shop_id}/listings/{listing_id}/files/{listing_file_id} | |
| uploadListingFile | POST /v3/application/shops/{shop_id}/listings/{listing_id}/files |
deleteListingFile(shopId, listingId, listingFileId)
<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> Deletes a file from a specific listing. When you delete the final file for a digital listing, the listing converts into a physical listing. The response to a delete request returns a list of the remaining file records associated with the given listing.
// Import classes:
//import com.etsy.infrastructure.*
//import com.etsy.models.*
val apiInstance = ShopListingFileApi()
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 listingFileId : kotlin.Long = 789 // kotlin.Long | The unique numeric ID of a file associated with a digital listing.
try {
apiInstance.deleteListingFile(shopId, listingId, listingFileId)
} catch (e: ClientException) {
println("4xx response calling ShopListingFileApi#deleteListingFile")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ShopListingFileApi#deleteListingFile")
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 | | ————- | ————- | ————- | ————- | | listingFileId | kotlin.Long| The unique numeric ID of a file associated with a digital listing. | |
null (empty response body)
Configure api_key: ApiClient.apiKey[“x-api-key”] = “” ApiClient.apiKeyPrefix[“x-api-key”] = “” Configure oauth2: ApiClient.accessToken = “”
ShopListingFiles getAllListingFiles(listingId, shopId)
<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 the files associated with the given digital listing. Requesting files from a physical listing returns an empty result.
// Import classes:
//import com.etsy.infrastructure.*
//import com.etsy.models.*
val apiInstance = ShopListingFileApi()
val listingId : kotlin.Long = 789 // kotlin.Long | The numeric ID for the [listing](/documentation/reference#tag/ShopListing) associated to this transaction.
val shopId : kotlin.Long = 789 // kotlin.Long | The unique positive non-zero numeric ID for an Etsy Shop.
try {
val result : ShopListingFiles = apiInstance.getAllListingFiles(listingId, shopId)
println(result)
} catch (e: ClientException) {
println("4xx response calling ShopListingFileApi#getAllListingFiles")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ShopListingFileApi#getAllListingFiles")
e.printStackTrace()
}
| listingId | kotlin.Long| The numeric ID for the listing associated to this transaction. | | | Name | Type | Description | Notes | | ————- | ————- | ————- | ————- | | shopId | kotlin.Long| The unique positive non-zero numeric ID for an Etsy Shop. | |
Configure api_key: ApiClient.apiKey[“x-api-key”] = “” ApiClient.apiKeyPrefix[“x-api-key”] = “” Configure oauth2: ApiClient.accessToken = “”
ShopListingFile getListingFile(shopId, listingId, listingFileId)
<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 a single file associated with the given digital listing. Requesting a file from a physical listing returns an empty result.
// Import classes:
//import com.etsy.infrastructure.*
//import com.etsy.models.*
val apiInstance = ShopListingFileApi()
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 listingFileId : kotlin.Long = 789 // kotlin.Long | The unique numeric ID of a file associated with a digital listing.
try {
val result : ShopListingFile = apiInstance.getListingFile(shopId, listingId, listingFileId)
println(result)
} catch (e: ClientException) {
println("4xx response calling ShopListingFileApi#getListingFile")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ShopListingFileApi#getListingFile")
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 | | ————- | ————- | ————- | ————- | | listingFileId | kotlin.Long| The unique numeric ID of a file associated with a digital listing. | |
Configure api_key: ApiClient.apiKey[“x-api-key”] = “” ApiClient.apiKeyPrefix[“x-api-key”] = “” Configure oauth2: ApiClient.accessToken = “”
ShopListingFile uploadListingFile(shopId, listingId, listingFileId, file, name, rank)
<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 a new file for a digital listing, or associates an existing file with a specific listing. You must either provide the `listing_file_id` of an existing file, or the name and binary file data for a file to upload. Associating an existing file to a physical listing converts the physical listing into a digital listing, which removes all shipping costs and any product and inventory variations.
// Import classes:
//import com.etsy.infrastructure.*
//import com.etsy.models.*
val apiInstance = ShopListingFileApi()
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 listingFileId : kotlin.Long = 789 // kotlin.Long | The unique numeric ID of a file associated with a digital listing.
val file : 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> | A binary file to upload.
val name : kotlin.String = name_example // kotlin.String | The file name string of a file to upload
val rank : kotlin.Long = 789 // kotlin.Long | 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.
try {
val result : ShopListingFile = apiInstance.uploadListingFile(shopId, listingId, listingFileId, file, name, rank)
println(result)
} catch (e: ClientException) {
println("4xx response calling ShopListingFileApi#uploadListingFile")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ShopListingFileApi#uploadListingFile")
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. | | | listingFileId | kotlin.Long| The unique numeric ID of a file associated with a digital listing. | [optional] | | file | io.ktor.client.request.forms.FormPart<io.ktor.client.request.forms.InputProvider>| A binary file to upload. | [optional] | | name | kotlin.String| The file name string of a file to upload | [optional] | | Name | Type | Description | Notes | | ————- | ————- | ————- | ————- | | rank | kotlin.Long| 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 1L] |
Configure api_key: ApiClient.apiKey[“x-api-key”] = “” ApiClient.apiKeyPrefix[“x-api-key”] = “” Configure oauth2: ApiClient.accessToken = “”