etsy

ShopListingFileApi

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

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.

Example

// 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()
}

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 | | ————- | ————- | ————- | ————- | | listingFileId | kotlin.Long| The unique numeric ID of a file associated with a digital listing. | |

Return type

null (empty response body)

Authorization

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

HTTP request headers

getAllListingFiles

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.

Example

// 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()
}

Parameters

| 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. | |

Return type

ShopListingFiles

Authorization

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

HTTP request headers

getListingFile

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.

Example

// 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()
}

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 | | ————- | ————- | ————- | ————- | | listingFileId | kotlin.Long| The unique numeric ID of a file associated with a digital listing. | |

Return type

ShopListingFile

Authorization

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

HTTP request headers

uploadListingFile

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.

Example

// 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()
}

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. | | | 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] |

Return type

ShopListingFile

Authorization

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

HTTP request headers