All URIs are relative to https://openapi.etsy.com
| Method | HTTP request | Description |
|---|---|---|
| consolidateShopReturnPolicies | POST /v3/application/shops/{shop_id}/policies/return/consolidate | |
| createShopReturnPolicy | POST /v3/application/shops/{shop_id}/policies/return | |
| deleteShopReturnPolicy | DELETE /v3/application/shops/{shop_id}/policies/return/{return_policy_id} | |
| getShopReturnPolicies | GET /v3/application/shops/{shop_id}/policies/return | |
| getShopReturnPolicy | GET /v3/application/shops/{shop_id}/policies/return/{return_policy_id} | |
| updateShopReturnPolicy | PUT /v3/application/shops/{shop_id}/policies/return/{return_policy_id} |
ShopReturnPolicy consolidateShopReturnPolicies(shopId, sourceReturnPolicyId, destinationReturnPolicyId)
<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> Consolidates Return Policies by moving all listings from a source return policy to a destination return policy, and deleting the source return policy. This is commonly used in the event that a user attempts to update a Return Policy such that its data is a duplicate of some other Return Policy, which is prevented.
// Import classes:
//import com.etsy.infrastructure.*
//import com.etsy.models.*
val apiInstance = ShopReturnPolicyApi()
val shopId : kotlin.Long = 789 // kotlin.Long | The unique positive non-zero numeric ID for an Etsy Shop.
val sourceReturnPolicyId : kotlin.Long = 789 // kotlin.Long | The numeric ID of the [Return Policy](/documentation/reference#operation/getShopReturnPolicies).
val destinationReturnPolicyId : kotlin.Long = 789 // kotlin.Long | The numeric ID of the [Return Policy](/documentation/reference#operation/getShopReturnPolicies).
try {
val result : ShopReturnPolicy = apiInstance.consolidateShopReturnPolicies(shopId, sourceReturnPolicyId, destinationReturnPolicyId)
println(result)
} catch (e: ClientException) {
println("4xx response calling ShopReturnPolicyApi#consolidateShopReturnPolicies")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ShopReturnPolicyApi#consolidateShopReturnPolicies")
e.printStackTrace()
}
| shopId | kotlin.Long| The unique positive non-zero numeric ID for an Etsy Shop. | | | sourceReturnPolicyId | kotlin.Long| The numeric ID of the Return Policy. | | | Name | Type | Description | Notes | | ————- | ————- | ————- | ————- | | destinationReturnPolicyId | kotlin.Long| The numeric ID of the Return Policy. | |
Configure api_key: ApiClient.apiKey[“x-api-key”] = “” ApiClient.apiKeyPrefix[“x-api-key”] = “” Configure oauth2: ApiClient.accessToken = “”
ShopReturnPolicy createShopReturnPolicy(shopId, acceptsReturns, acceptsExchanges, returnDeadline)
<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 a new Return Policy. Note: if either accepts_returns or accepts_exchanges is true, then a return_deadline is required.
// Import classes:
//import com.etsy.infrastructure.*
//import com.etsy.models.*
val apiInstance = ShopReturnPolicyApi()
val shopId : kotlin.Long = 789 // kotlin.Long | The unique positive non-zero numeric ID for an Etsy Shop.
val acceptsReturns : kotlin.Boolean = true // kotlin.Boolean |
val acceptsExchanges : kotlin.Boolean = true // kotlin.Boolean |
val returnDeadline : kotlin.Int = 56 // kotlin.Int | The deadline for the Return Policy, measured in days. The value must be one of the following: [7, 14, 21, 30, 45, 60, 90].
try {
val result : ShopReturnPolicy = apiInstance.createShopReturnPolicy(shopId, acceptsReturns, acceptsExchanges, returnDeadline)
println(result)
} catch (e: ClientException) {
println("4xx response calling ShopReturnPolicyApi#createShopReturnPolicy")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ShopReturnPolicyApi#createShopReturnPolicy")
e.printStackTrace()
}
| shopId | kotlin.Long| The unique positive non-zero numeric ID for an Etsy Shop. | | | acceptsReturns | kotlin.Boolean| | | | acceptsExchanges | kotlin.Boolean| | | | Name | Type | Description | Notes | | ————- | ————- | ————- | ————- | | returnDeadline | kotlin.Int| The deadline for the Return Policy, measured in days. The value must be one of the following: [7, 14, 21, 30, 45, 60, 90]. | [optional] |
Configure api_key: ApiClient.apiKey[“x-api-key”] = “” ApiClient.apiKeyPrefix[“x-api-key”] = “” Configure oauth2: ApiClient.accessToken = “”
deleteShopReturnPolicy(shopId, returnPolicyId)
<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 an existing Return Policy. Deletion is only allowed for policies which have no associated listings – move them to another policy before attempting deletion.
// Import classes:
//import com.etsy.infrastructure.*
//import com.etsy.models.*
val apiInstance = ShopReturnPolicyApi()
val shopId : kotlin.Long = 789 // kotlin.Long | The unique positive non-zero numeric ID for an Etsy Shop.
val returnPolicyId : kotlin.Long = 789 // kotlin.Long | The numeric ID of the [Return Policy](/documentation/reference#operation/getShopReturnPolicies).
try {
apiInstance.deleteShopReturnPolicy(shopId, returnPolicyId)
} catch (e: ClientException) {
println("4xx response calling ShopReturnPolicyApi#deleteShopReturnPolicy")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ShopReturnPolicyApi#deleteShopReturnPolicy")
e.printStackTrace()
}
| shopId | kotlin.Long| The unique positive non-zero numeric ID for an Etsy Shop. | | | Name | Type | Description | Notes | | ————- | ————- | ————- | ————- | | returnPolicyId | kotlin.Long| The numeric ID of the Return Policy. | |
null (empty response body)
Configure api_key: ApiClient.apiKey[“x-api-key”] = “” ApiClient.apiKeyPrefix[“x-api-key”] = “” Configure oauth2: ApiClient.accessToken = “”
ShopReturnPolicies getShopReturnPolicies(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> Returns a shop's list of existing Return Policies
// Import classes:
//import com.etsy.infrastructure.*
//import com.etsy.models.*
val apiInstance = ShopReturnPolicyApi()
val shopId : kotlin.Long = 789 // kotlin.Long | The unique positive non-zero numeric ID for an Etsy Shop.
try {
val result : ShopReturnPolicies = apiInstance.getShopReturnPolicies(shopId)
println(result)
} catch (e: ClientException) {
println("4xx response calling ShopReturnPolicyApi#getShopReturnPolicies")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ShopReturnPolicyApi#getShopReturnPolicies")
e.printStackTrace()
}
| 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 = “”
ShopReturnPolicy getShopReturnPolicy(shopId, returnPolicyId)
<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 an existing Return Policy.
// Import classes:
//import com.etsy.infrastructure.*
//import com.etsy.models.*
val apiInstance = ShopReturnPolicyApi()
val shopId : kotlin.Long = 789 // kotlin.Long | The unique positive non-zero numeric ID for an Etsy Shop.
val returnPolicyId : kotlin.Long = 789 // kotlin.Long | The numeric ID of the [Return Policy](/documentation/reference#operation/getShopReturnPolicies).
try {
val result : ShopReturnPolicy = apiInstance.getShopReturnPolicy(shopId, returnPolicyId)
println(result)
} catch (e: ClientException) {
println("4xx response calling ShopReturnPolicyApi#getShopReturnPolicy")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ShopReturnPolicyApi#getShopReturnPolicy")
e.printStackTrace()
}
| shopId | kotlin.Long| The unique positive non-zero numeric ID for an Etsy Shop. | | | Name | Type | Description | Notes | | ————- | ————- | ————- | ————- | | returnPolicyId | kotlin.Long| The numeric ID of the Return Policy. | |
Configure api_key: ApiClient.apiKey[“x-api-key”] = “” ApiClient.apiKeyPrefix[“x-api-key”] = “” Configure oauth2: ApiClient.accessToken = “”
ShopReturnPolicy updateShopReturnPolicy(shopId, returnPolicyId, acceptsReturns, acceptsExchanges, returnDeadline)
<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> Updates an existing Return Policy. Note: if either accepts_returns or accepts_exchanges is true, then a return_deadline is required.
// Import classes:
//import com.etsy.infrastructure.*
//import com.etsy.models.*
val apiInstance = ShopReturnPolicyApi()
val shopId : kotlin.Long = 789 // kotlin.Long | The unique positive non-zero numeric ID for an Etsy Shop.
val returnPolicyId : kotlin.Long = 789 // kotlin.Long | The numeric ID of the [Return Policy](/documentation/reference#operation/getShopReturnPolicies).
val acceptsReturns : kotlin.Boolean = true // kotlin.Boolean |
val acceptsExchanges : kotlin.Boolean = true // kotlin.Boolean |
val returnDeadline : kotlin.Int = 56 // kotlin.Int | The deadline for the Return Policy, measured in days. The value must be one of the following: [7, 14, 21, 30, 45, 60, 90].
try {
val result : ShopReturnPolicy = apiInstance.updateShopReturnPolicy(shopId, returnPolicyId, acceptsReturns, acceptsExchanges, returnDeadline)
println(result)
} catch (e: ClientException) {
println("4xx response calling ShopReturnPolicyApi#updateShopReturnPolicy")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ShopReturnPolicyApi#updateShopReturnPolicy")
e.printStackTrace()
}
| shopId | kotlin.Long| The unique positive non-zero numeric ID for an Etsy Shop. | | | returnPolicyId | kotlin.Long| The numeric ID of the Return Policy. | | | acceptsReturns | kotlin.Boolean| | | | acceptsExchanges | kotlin.Boolean| | | | Name | Type | Description | Notes | | ————- | ————- | ————- | ————- | | returnDeadline | kotlin.Int| The deadline for the Return Policy, measured in days. The value must be one of the following: [7, 14, 21, 30, 45, 60, 90]. | [optional] |
Configure api_key: ApiClient.apiKey[“x-api-key”] = “” ApiClient.apiKeyPrefix[“x-api-key”] = “” Configure oauth2: ApiClient.accessToken = “”