openapi: 3.0.0
info:
title: eBay Account Advertising_eligibility Return_policy API
description: The Account API gives sellers the ability to configure their eBay seller accounts, including the seller's policies (eBay business policies and seller-defined custom policies), opt in and out of eBay seller programs, configure sales tax tables, and get account information.
For details on the availability of the methods in this API, see Account API requirements and restrictions.
contact:
name: eBay Inc,
license:
name: eBay API License Agreement
url: https://go.developer.ebay.com/api-license-agreement
version: v1.9.2
servers:
- url: https://api.ebay.com{basePath}
description: Production
variables:
basePath:
default: /sell/account/v1
tags:
- name: Return_policy
paths:
/return_policy:
get:
tags:
- Return_policy
description: 'This method retrieves all the return policies configured for the marketplace you specify using the marketplace_id query parameter.
Marketplaces and locales
Get the correct policies for a marketplace that supports multiple locales using the Content-Language request header. For example, get the policies for the French locale of the Canadian marketplace by specifying fr-CA for the Content-Language header. Likewise, target the Dutch locale of the Belgium marketplace by setting Content-Language: nl-BE. For details on header values, see HTTP request headers.'
operationId: getReturnPolicies
parameters:
- name: marketplace_id
in: query
description: This query parameter specifies the ID of the eBay marketplace of the policy you want to retrieve. For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/sell/account/types/ba:MarketplaceIdEnum
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/ReturnPolicyResponse'
'400':
description: Bad Request
x-response-codes:
errors:
'20401':
domain: API_ACCOUNT
category: REQUEST
description: Missing field {fieldName}. {additionalInfo}
'20403':
domain: API_ACCOUNT
category: REQUEST
description: Invalid {fieldName}. {additionalInfo}
'20404':
domain: API_ACCOUNT
category: REQUEST
description: '{fieldName} not found.'
'500':
description: Internal Server Error
x-response-codes:
errors:
'20500':
domain: API_ACCOUNT
category: APPLICATION
description: System error.
'20501':
domain: API_ACCOUNT
category: APPLICATION
description: Service unavailable. Please try again in next 24 hours.
security:
- api_auth:
- https://api.ebay.com/oauth/api_scope/sell.account
- https://api.ebay.com/oauth/api_scope/sell.account.readonly
post:
tags:
- Return_policy
description: This method creates a new return policy where the policy encapsulates seller's terms for returning items.
Each policy targets a specific marketplace, and you can create multiple policies for each marketplace. Return policies are not applicable to motor-vehicle listings.
A successful request returns the getReturnPolicy URI to the new policy in the Location response header and the ID for the new policy is returned in the response payload.
Tip: For details on creating and using the business policies supported by the Account API, see eBay business policies.
operationId: createReturnPolicy parameters: - name: Content-Type in: header description: This header indicates the format of the request body provided by the client. Its value should be set to application/json.returnPolicyId, which you can use to reference the policy.
content:
application/json:
schema:
$ref: '#/components/schemas/SetReturnPolicyResponse'
x-response-codes:
errors:
'20200':
domain: API_ACCOUNT
category: BUSINESS
description: Warning. {additionalInfo}
'400':
description: Bad Request
x-response-codes:
errors:
'20400':
domain: API_ACCOUNT
category: REQUEST
description: Invalid request. {additionalInfo}
'20401':
domain: API_ACCOUNT
category: REQUEST
description: Missing field .
'20406':
domain: API_ACCOUNT
category: REQUEST
description: Invalid return option
'500':
description: Internal Server Error
x-response-codes:
errors:
'20500':
domain: API_ACCOUNT
category: APPLICATION
description: System error.
'20501':
domain: API_ACCOUNT
category: APPLICATION
description: Service unavailable. Please try again in next 24 hours.
security:
- api_auth:
- https://api.ebay.com/oauth/api_scope/sell.account
/return_policy/{return_policy_id}:
get:
tags:
- Return_policy
description: This method retrieves the complete details of the return policy specified by the returnPolicyId path parameter.
operationId: getReturnPolicy
parameters:
- name: return_policy_id
in: path
description: This path parameter specifies the unique identifier of the return policy you want to retrieve. name and its associated marketplace_id in the request query parameters. Content-Language request header. For example, get a policy for the French locale of the Canadian marketplace by specifying fr-CA for the Content-Language header. Likewise, target the Dutch locale of the Belgium marketplace by setting Content-Language: nl-BE. For details on header values, see HTTP request headers.'
operationId: getReturnPolicyByName
parameters:
- name: marketplace_id
in: query
description: This query parameter specifies the ID of the eBay marketplace of the policy you want to retrieve. For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/sell/account/types/ba:MarketplaceIdEnum
required: true
schema:
type: string
- name: name
in: query
description: This query parameter specifies the seller-defined name of the return policy you want to retrieve.0.
format: int32
description: 'The response payload for the getReturnPolicies method. ALL_EXCLUDING_MOTORS_VEHICLES for return business policies.'
items:
$ref: '#/components/schemas/CategoryType'
description:
type: string
description: 'A seller-defined description of the return business policy. This description is only for the seller''s use, and is not exposed on any eBay pages. Important! This field is deprecated, since eBay no longer supports extended holiday returns. Any value supplied in this field is neither read nor returned.
' internationalOverride: description: This container shows the seller's international return policy settings. This container is only returned if the seller has set a separate international return policy for the business policies. International return policies are optional, even if the seller ships to international locations. If a separate international return policy is not set, all of the domestic return policy settings also apply to international orders. $ref: '#/components/schemas/InternationalReturnOverrideType' marketplaceId: type: string description: The ID of the eBay marketplace to which this return business policy applies. For implementation help, refer to eBay API documentation name: type: string description: A seller-defined name for this payment business policy. Names must be unique for policies assigned to the same marketplace.MONEY_BACK. For implementation help, refer to eBay API documentation
restockingFeePercentage:
type: string
description: 'Important! This field is deprecated, since eBay no longer allows sellers to charge a restocking fee for buyer remorse returns. If this field is included, it is ignored and it is no longer returned.
' returnInstructions: type: string description: 'This text-based field provides more details on seller-specified return instructions. This field is only returned if set for the return business policy.Important! This field is no longer supported on many eBay marketplaces. To see if a marketplace and eBay category does support this field, call getReturnPolicies method of the Metadata API. Then you will look for the policyDescriptionEnabled field with a value of true for the eBay category.
true, the seller accepts returns. BUYER or SELLER. ALL_EXCLUDING_MOTORS_VEHICLES for return business policies, since return business policies are not applicable to motor vehicle listings.
items:
$ref: '#/components/schemas/CategoryType'
description:
type: string
description: 'A seller-defined description of the return business policy. This description is only for the seller''s use, and is not exposed on any eBay pages. This field is returned if set for the policy. Important! This field is deprecated, since eBay no longer supports extended holiday returns. This field should no longer be returned.
' internationalOverride: description: This container is used by the seller to specify a separate international return policy, and will only be returned if the seller has set a separate return policy for international orders. If a separate international return policy is not defined by a seller, all of the domestic return policy settings will also apply to international orders. $ref: '#/components/schemas/InternationalReturnOverrideType' marketplaceId: type: string description: The ID of the eBay marketplace to which this return business policy applies. For implementation help, refer to eBay API documentation name: type: string description: A seller-defined name for this return business policy. Names must be unique for policies assigned to the same marketplace.MONEY_BACK. For implementation help, refer to eBay API documentation
restockingFeePercentage:
type: string
description: 'Important! This field is deprecated, since eBay no longer allows sellers to charge a restocking fee for buyer remorse returns.
' returnInstructions: type: string description: 'This text-based field provides more details on seller-specified return instructions.Important! This field is no longer supported on many eBay marketplaces. To see if a marketplace and eBay category does support this field, call getReturnPolicies method of the Metadata API. Then you will look for the policyDescriptionEnabled field with a value of true for the eBay category.
true, the seller accepts returns. If set to false, this field indicates that the seller does not accept returns.
returnShippingCostPayer:
type: string
description: This field indicates who is responsible for paying for the shipping charges for returned items. The field can be set to either BUYER or SELLER. ALL_EXCLUDING_MOTORS_VEHICLES for return business policies.'
items:
$ref: '#/components/schemas/CategoryType'
description:
type: string
description: 'A seller-defined description of the return business policy. This description is only for the seller''s use, and is not exposed on any eBay pages. Important! This field is deprecated, since eBay no longer supports extended holiday returns. Any value supplied in this field is neither read nor returned.
' internationalOverride: description: This container is used by the seller to specify a separate international return policy. If a separate international return policy is not defined by a seller, all of the domestic return policy settings will also apply to international orders. $ref: '#/components/schemas/InternationalReturnOverrideType' marketplaceId: type: string description: The ID of the eBay marketplace to which this return business policy applies. For implementation help, refer to eBay API documentation name: type: string description: 'A seller-defined name for this return business policy. Names must be unique for policies assigned to the same marketplace.Important! If this field is not included in a return business policy, it will default to MONEY_BACK.
For implementation help, refer to eBay API documentation' restockingFeePercentage: type: string description: 'Important! This field is deprecated, since eBay no longer allows sellers to charge a restocking fee for buyer remorse returns. If this field is included, it is ignored.
' returnInstructions: type: string description: 'This text-based field provides more details on seller-specified return instructions.Important! This field is no longer supported on many eBay marketplaces. To see if a marketplace and eBay category does support this field, call getReturnPolicies method of the Metadata API. Then you will look for the policyDescriptionEnabled field with a value of true for the eBay category.
DAY and value to either 30 or 60 (or other value, as appropriate). true.
$ref: '#/components/schemas/TimeDuration'
returnsAccepted:
type: boolean
description: If set to true, the seller accepts returns. Note:Top-Rated sellers must accept item returns and the handlingTime should be set to zero days or one day for a listing to receive a Top-Rated Plus badge on the View Item or search result pages. For more information on eBay's Top-Rated seller program, see Becoming a Top Rated Seller and qualifying for Top Rated Plus benefits.
returnShippingCostPayer: type: string description: This field indicates who is responsible for paying for the shipping charges for returned items. The field can be set to eitherBUYER or SELLER. true. For implementation help, refer to eBay API documentation
description: This root container defines a seller's return business policy for a specific marketplace and category group. This type is used when creating or updating a return business policy.
Error:
type: object
properties:
category:
type: string
description: 'The category type for this error or warning. It is a string that can have one of three values:Application: Indicates an exception or error occurred in the application code or at runtime. Examples include catching an exception in a service''s business logic, system failures, or request errors from a dependency.Business: Used when your service or a dependent service refused to continue processing on the resource because of a business rule violation such as "Seller does not ship item to Antarctica" or "Buyer ineligible to purchase an alcoholic item". Business errors are not syntactical input errors.Request: Used when there is anything wrong with the request, such as authentication, syntactical errors, rate limiting or missing headers, bad HTTP header values, and so on.message error field.
message:
type: string
description: Information on how to correct the problem, in the end user's terms and language where applicable. Its value is at most 50 characters long. If applicable, the value is localized in the end user's requested locale.
outputRefIds:
type: array
description: Identifies specific response elements associated with the error, if any. Path format is the same as inputRefId.
items:
type: string
parameters:
type: array
description: This optional list of name/value pairs that contain context-specific ErrorParameter objects, with each item in the list being a parameter (or input field name) that caused an error condition. Each ErrorParameter object consists of two fields, a name and a value.
items:
$ref: '#/components/schemas/ErrorParameter'
subdomain:
type: string
description: If present, indicates the subsystem in which the error occurred.
description: A container that defines the elements of error and warning messages.
TimeDuration:
type: object
properties:
unit:
type: string
description: These enum values represent the time measurement unit, such as DAY. A span of time is defined when you apply the value specified in the value field to the value specified for unit. MOTORS_VEHICLES category type is not valid for return policies. eBay flows do not support the return of motor vehicles. For implementation help, refer to eBay API documentation
description: The category type discerns whether the policy applies to motor vehicle listings, or to any other items except motor vehicle listings. DAY and the value field to either 30 or 60 (or other value, as appropriate). true.
$ref: '#/components/schemas/TimeDuration'
returnsAccepted:
type: boolean
description: If set to true, the seller accepts international returns. If set to false, the seller does not accept international returns. BUYER or SELLER. true. For implementation help, refer to eBay API documentation
description: 'This type defines the fields for a seller''s international return policy. Sellers have the ability to set separate domestic and international return policies, but if an international return policy is not set, the same return policy settings specified for the domestic return policy are also used for returns for international buyers. '
securitySchemes:
api_auth:
type: oauth2
description: The security definitions for this API. Please check individual operations for applicable scopes.
flows:
authorizationCode:
authorizationUrl: https://auth.ebay.com/oauth2/authorize
tokenUrl: https://api.ebay.com/identity/v1/oauth2/token
scopes:
https://api.ebay.com/oauth/api_scope/sell.account.readonly: View your account settings
https://api.ebay.com/oauth/api_scope/sell.account: View and manage your account settings