This method creates a new custom policy in which a seller specifies their terms for complying with local governmental regulations.
Two Custom Policy types are supported:
This method has no URI parameters.
All requests made to eBay REST operations require you to provide the
Authorization HTTP header for authentication authorization.
This method has the additional request header requirements listed below. See HTTP request headers- opens rest request components page for details.
|X-EBAY-C-MARKETPLACE-ID||string||This header parameter specifies the eBay markeplace for the custom policy that is being created. Supported values for this header can be found in the MarketplaceIdEnum type definition.|
Note: The following eBay marketplaces support Custom Policies:
This request requires an access token created with the authorization code grant flow, using one or more scopes from the following list (please check your Application Keys page for a list of OAuth scopes available to your application):
See OAuth access tokens for more information.
Details of the seller's specific policy and terms for this policy.
Customer-facing label shown on View Item pages for items to which the policy applies. This seller-defined string is displayed as a system-generated hyperlink pointing to detailed policy information.
The seller-defined name for the custom policy. Names must be unique for policies assigned to the same seller, policy type, and eBay marketplace.
Specifies the type of custom policy being created.
See HTTP response headers for details.
|Location||The location response header contains the URL to the newly created custom policy. The URL includes the eBay-assigned |
This call has no payload.
This call has no field definitions.
This call can return one of the following HTTP status codes. For an overview of the status codes, see HTTP status codes in Using eBay RESTful APIs.
|409||Policy Name already used/ Maximum no of policies per site reached|
|500||Internal Server Error|
For more on errors, plus the codes of other common errors, see Handling errors.
|20417||API_ACCOUNT||REQUEST||Maximum custom policy per site is reached|
|20418||API_ACCOUNT||REQUEST||This policy name is already used|
This call has no warnings.
New to making API calls? Please see Making a Call.
Note: Identifiers, such as order IDs or user IDs, and personal data in these samples might be anonymized or may no longer be active on eBay. If necessary, substitute current, relevant eBay data in your requests.
This sample demonstrates how to create a take-back custom policy.
The details of the take-back custom policy are provided in the request payload. This method also requires you to specify the eBay marketplace ID where the policy will be valid using the
X-EBAY-C-MARKETPLACE-ID HTTP header.
If the call is successful, eBay returns an HTTP status code of
201 Created and the call URI for the newly-created policy. The URI will include the unique identifier for the policy, an ID that will be needed for 'get' and 'update' methods. Additionally, the system-generated policy ID is included in the Location response header. There is no response payload.