eBay Compliance API
The eBay Compliance API surfaces listing-violation and policy-compliance issues so sellers can identify and resolve listings that conflict with eBay marketplace policies.
The eBay Compliance API surfaces listing-violation and policy-compliance issues so sellers can identify and resolve listings that conflict with eBay marketplace policies.
openapi: 3.0.0
info:
title: eBay Compliance API
description: Service for providing information to sellers about their listings being non-compliant, or at risk for becoming non-compliant, against eBay listing policies.
contact:
name: eBay Inc,
license:
name: eBay API License Agreement
url: https://go.developer.ebay.com/api-license-agreement
version: 1.4.3
servers:
- url: https://api.ebay.com{basePath}
description: Production
variables:
basePath:
default: "/sell/compliance/v1"
paths:
"/listing_violation_summary":
get:
tags:
- Listing_violation_summary
description: This call returns listing violation counts for a seller. A user can pass in one or more compliance types through the <strong>compliance_type</strong> query parameter. See <a href="/api-docs/sell/compliance/types/com:ComplianceTypeEnum">ComplianceTypeEnum</a> for more information on the supported listing compliance types. Listing violations are returned for multiple marketplaces if the seller sells on multiple eBay marketplaces.<br /><br /> <span class="tablenote"><strong>Note:</strong> Only a canned response, with counts for all listing compliance types, is returned in the Sandbox environment. Due to this limitation, the <strong>compliance_type</strong> query parameter (if used) will not have an effect on the response. </span>
operationId: getListingViolationsSummary
parameters:
- name: X-EBAY-C-MARKETPLACE-ID
in: header
description: This header identifies the seller's eBay marketplace. <br><br>Supported values for this header can be found in the <a href="/api-docs/sell/compliance/types/bas:MarketplaceIdEnum">MarketplaceIdEnum</a> type definition.
required: true
schema:
type: string
- name: compliance_type
in: query
description: This query parameter specifies the compliance type(s) of the listing violation counts being retrieved. <br><br>See <a href="/api-docs/sell/compliance/types/com:ComplianceTypeEnum">ComplianceTypeEnum</a> for more information on the supported compliance types that can be passed in here. <br><br>If more than one compliance type value is used, delimit these values with a comma. If no compliance type values are passed in, the listing count for all compliance types will be returned. <br /><br /> <span class="tablenote"><strong>Note:</strong> Only a canned response, with counts for all listing compliance types, is returned in the Sandbox environment. Due to this limitation, the <strong>compliance_type</strong> query parameter (if used) will not have an effect on the response. </span>
required: false
schema:
type: string
responses:
'200':
description: Success
content:
application/json;charset=UTF-8:
schema:
"$ref": "#/components/schemas/ComplianceSummary"
'204':
description: No Content
'400':
description: Bad Request
x-response-codes:
errors:
'850101':
domain: API_COMPLIANCE
category: REQUEST
description: Marketplace ID is invalid
'850110':
domain: API_COMPLIANCE
category: REQUEST
description: Compliance type is invalid
'850111':
domain: API_COMPLIANCE
category: REQUEST
description: Compliance type is missing
'850114':
domain: API_COMPLIANCE
category: REQUEST
description: Mandatory headers are missing
'500':
description: Internal Server Error
x-response-codes:
errors:
'850001':
domain: API_COMPLIANCE
category: APPLICATION
description: Any System error. {additionalInfo}
security:
- api_auth:
- https://api.ebay.com/oauth/api_scope/sell.inventory
"/listing_violation":
get:
tags:
- Listing_violation
description: This call returns specific listing violations for the supported listing compliance types. Only one compliance type can be passed in per call, and the response will include all the listing violations for this compliance type, and listing violations are grouped together by eBay listing ID. See <a href="/api-docs/sell/compliance/types/com:ComplianceTypeEnum">ComplianceTypeEnum</a> for more information on the supported listing compliance types. This method also has pagination control. <br /><br /> <span class="tablenote"><strong>Note:</strong> A maximum of 2000 listing violations will be returned in a result set. If the seller has more than 2000 listing violations, some/all of those listing violations must be corrected before additional listing violations will be retrieved. The user should pay attention to the <strong>total</strong> value in the response. If this value is '2000', it is possible that the seller has more than 2000 listing violations, but this field maxes out at 2000. </span> <br /><span class="tablenote"><strong>Note:</strong> In a future release of this API, the seller will be able to pass in a specific eBay listing ID as a query parameter to see if this specific listing has any violations. </span><br /> <span class="tablenote"><strong>Note:</strong> Only mocked non-compliant listing data will be returned for this call in the Sandbox environment, and not specific to the seller. However, the user can still use this mock data to experiment with the compliance type filters and pagination control.</span>
operationId: getListingViolations
parameters:
- name: X-EBAY-C-MARKETPLACE-ID
in: header
description: This header identifies the seller's eBay marketplace. <br><br>Supported values for this header can be found in the <a href="/api-docs/sell/compliance/types/bas:MarketplaceIdEnum">MarketplaceIdEnum</a> type definition.
required: true
schema:
type: string
- name: compliance_type
in: query
description: This query parameter specifies the compliance type of the listing violations being retrieved. Only one compliance type value can be specified. <br> <br>See <a href="/api-docs/sell/compliance/types/com:ComplianceTypeEnum">ComplianceTypeEnum</a> for more information on supported compliance types.
required: true
schema:
type: string
- name: offset
in: query
description: 'The integer value input into this field controls the first listing violation in the result set that will be displayed at the top of the response. The <strong>offset</strong> and <strong>limit</strong> query parameters are used to control the pagination of the output. For example, if <strong>offset</strong> is set to <code>10</code> and <strong>limit</strong> is set to <code>10</code>, the call retrieves listing violations 11 thru 20 from the resulting set of violations. <br /><br /> <span class="tablenote"><strong>Note:</strong> This feature employs a zero-based index, where the first item in the list has an offset of <code>0</code>. If the <strong>listing_id</strong> parameter is included in the request, this parameter will be ignored.</span><br/><br/> <strong>Default: </strong> <code>0</code> {zero)'
required: false
schema:
type: string
- name: listing_id
in: query
description: <span class="tablenote"><strong>Note:</strong> This query parameter is not yet supported for the Compliance API.</span>
required: false
schema:
type: string
- name: limit
in: query
description: This query parameter is used if the user wants to set a limit on the number of listing violations that are returned on one page of the result set. This parameter is used in conjunction with the <strong>offset</strong> parameter to control the pagination of the output.<br /><br />For example, if <strong>offset</strong> is set to <code>10</code> and <strong>limit</strong> is set to <code>10</code>, the call retrieves listing violations 11 thru 20 from the collection of listing violations that match the value set in the <strong>compliance_type</strong> parameter.<br /><br /><span class="tablenote"><strong>Note:</strong> This feature employs a zero-based index, where the first item in the list has an offset of <code>0</code>. If the <strong>listing_id</strong> parameter is included in the request, this parameter will be ignored.</span><br/><br/><strong>Default:</strong> <code>100</code><br/> <strong>Maximum:</strong> <code>200</code>
required: false
schema:
type: string
- name: filter
in: query
description: This filter allows a user to retrieve only listings that are currently out of compliance, or only listings that are at risk of becoming out of compliance.<br><br> Although other filters may be added in the future, <code>complianceState</code> is the only supported filter type at this time. See the <a href="/api-docs/sell/compliance/types/com:ComplianceStateEnum">ComplianceStateEnum</a> type for a list of supported values.<br><br>Below is an example of how to set up this compliance state filter. Notice that the filter type and filter value are separated with a colon (:) character, and the filter value is wrapped with curly brackets.<br><br> <code>filter=complianceState:{OUT_OF_COMPLIANCE}</code>
required: false
schema:
type: string
responses:
'200':
description: Success
content:
application/json;charset=UTF-8:
schema:
"$ref": "#/components/schemas/PagedComplianceViolationCollection"
'204':
description: No Content
'400':
description: Bad Request
x-response-codes:
errors:
'850101':
domain: API_COMPLIANCE
category: REQUEST
description: Marketplace ID is invalid
'850102':
domain: API_COMPLIANCE
category: REQUEST
description: Marketplace ID is missing
'850109':
domain: API_COMPLIANCE
category: REQUEST
description: Single compliance type is supported per API call
'850110':
domain: API_COMPLIANCE
category: REQUEST
description: Compliance type is invalid
'850111':
domain: API_COMPLIANCE
category: REQUEST
description: Compliance type is missing
'850112':
domain: API_COMPLIANCE
category: REQUEST
description: Invalid listing_id specified
'850113':
domain: API_COMPLIANCE
category: REQUEST
description: listing_id not specified
'850114':
domain: API_COMPLIANCE
category: REQUEST
description: Mandatory headers are missing
'500':
description: Internal Server Error
x-response-codes:
errors:
'850001':
domain: API_COMPLIANCE
category: APPLICATION
description: Any System error. {additionalInfo}
security:
- api_auth:
- https://api.ebay.com/oauth/api_scope/sell.inventory
components:
schemas:
AspectRecommendations:
type: object
properties:
localizedAspectName:
type: string
description: The name of the item aspect for which eBay has a recommendation. In many cases, the same item aspect(s) that are returned under the <strong>violationData</strong> array for <code>ASPECTS_ADOPTION</code> listing violations are also returned here <br /><br /><span class="tablenote"> <strong>Note:</strong> This name is always localized for the specified marketplace. </span>
suggestedValues:
type: array
description: 'One or more valid values for the corresponding item aspect (in <strong>localizedAspectName</strong>) are returned here. These suggested values for the item aspect depend on the listing category and on the information specified in the listing. Sellers should confirm accuracy of the values before applying them to the listing. <p>Please use <strong><a href="../../../../../commerce/taxonomy/resources/category_tree/methods/getItemAspectsForCategory" target="_blank">getItemAspectsForCategory</a></strong> in the Taxonomy API or <strong><a href="../../../../../../devzone/xml/docs/Reference/eBay/GetCategorySpecifics.html" target="_blank">GetCategorySpecifics</a></strong> in the Trading API to get a comprehensive list of required and recommended aspects for a given category and a list of supported aspect values for each.</p> '
items:
type: string
description: This type is used by the <strong>aspectsRecommendation</strong> container, which is returned if eBay has found a listing with missing or invalid item aspects (<code>ASPECTS_ADOPTION</code> compliance type).
ComplianceDetail:
type: object
properties:
reasonCode:
type: string
description: This value states the nature of the listing violation. A <strong>reasonCode</strong> value is returned for each listing violation, and each compliance type can have several reason codes and related messages. The <strong>reasonCode</strong> values vary by compliance type. The reason codes for each compliance type are summarized below.<br /><br /><strong>Aspects adoption</strong><br /><br />The reason codes for <code>ASPECTS_ADOPTION</code> compliance indicate that for the given violation, aspects listed in the <strong>violationData</strong> container are either missing from the listing or they have invalid values. The reason codes specify whether the violation is for required aspects, recommended (preferred) aspects, or soon to be required aspects.<br /><ul><li><code>MISSING_OR_INVALID_REQUIRED_ASPECTS</code></li><li><code>MISSING_OR_INVALID_PREFERRED_ASPECTS</code></li><li><code>MISSING_OR_INVALID_SOON_TO_BE_REQUIRED_ASPECTS</code></li></ul><br /><strong>HTTPS</strong><br /><br />The reason codes for <code>HTTPS</code> compliance identify where in the listing the violation occurs. For HTTPS policy violations, the seller will just need to remove the HTTP link (or update to HTTPS) from the listing details or product details:<br /><ul><li><code>NON_SECURE_HTTP_LINK_IN_LISTING</code></li><li><code>NON_SECURE_HTTP_LINK_IN_PRODUCT</code></li></ul><br/><strong>Non-eBay links</strong><br /><br />The reason codes for <code>OUTSIDE_EBAY_BUYING_AND_SELLING</code> compliance identify the specific type of data (e.g., telephone number) that violated the policy. For each of these violations, the seller will just need to revise the listing, removing this information:<br /><ul><li><code>UNAPPROVED_DOMAIN_WEBLINK_IN_LISTING</code></li><li><code>PHONE_NUMBER_IN_LISTING</code></li><li><code>EMAIL_ADDRESS_IN_LISTING</code></li></ul><br /><strong>Product adoption</strong><br /><br />Product Adoption is not enforced at this time.<br /><br /><strong>Product adoption conformance</strong><br /><br />Product Adoption is not enforced at this time.<br /><br /><strong>Returns policy</strong><br /><br />The only <code>RETURNS_POLICY</code> reason code is <code>UNSUPPORTED_RETURNS_PERIOD</code>. The seller will have to revise their listing (or return business policy) with a supported return period for the site and category. The <strong>GetCategoryFeatures</strong> call of the Trading API can be used to verify the supported return periods for a particular category. For most eBay categories, the minimum return period that can be stated in a Returns Policy is 14 days for domestic and international sales, but some categories require a minimum 30-day return period.
message:
type: string
description: This field provides a textual summary of the listing violation. A <strong>message</strong> field is returned for each listing violation. This message will vary widely based on the compliance type and corresponding reason code.
variation:
description: This container defines the variation within a multiple-variation listing that has the listing violation. This container is only returned if an individual variation within a multiple-variation listing has the listing violation.
"$ref": "#/components/schemas/VariationDetails"
violationData:
type: array
description: This container provides more information about the listing violation, if applicable. The type of information that appears here will vary based on the compliance type and type of violation. For example, for <code>ASPECTS_ADOPTION</code> violations, this container lists the missing aspect(s) or aspect(s) with invalid values.
items:
"$ref": "#/components/schemas/NameValueList"
correctiveRecommendations:
description: This container is returned for <code>ASPECTS_ADOPTION</code> violations if eBay has found one or more item aspect name-value pairs that may be appropriate for the seller's product. In many cases, the missing or incorrect item aspect(s) shown under the corresponding <strong>violationData</strong> array, will also show up under the <strong>aspectRecommendations</strong> array with suggested value(s). <br><br><span class="tablenote"><strong>Note:</strong> eBay catalog product adoption is not enforced for any eBay category at this time, so a recommended eBay product ID (aka ePID) will not be returned under the <strong>productRecommendation</strong> container at this time.</span>
"$ref": "#/components/schemas/CorrectiveRecommendations"
complianceState:
type: string
description: The enumeration value returned in this field indicates if the listing violation is considered to be <code>OUT_OF_COMPLIANCE</code> with an eBay listing policy, or the listing is considered to be <code>AT_RISK</code> of becoming non-compliant against an eBay listing policy. <br><br>Generally, <code>OUT_OF_COMPLIANCE</code> policy violations can prevent the seller from revising a listing until the underlying violation(s) can be remedied. When the compliance state is <code>AT_RISK</code>, the seller is not blocked from revising the listing, but the seller should correct the violation to prevent the listing from being blocked for revisions in the future.<br><br><span class="tablenote"><strong>Note:</strong> This field is returned for most violations, but not all. In the case that this field is not returned, it can be assumed that the state of the listing violation is <code>OUT_OF_COMPLIANCE</code>.</span> For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/compliance/types/com:ComplianceStateEnum'>eBay API documentation</a>
description: This type is used by each listing violation that is returned under the <strong>violations</strong> container.
ComplianceSummary:
type: object
properties:
violationSummaries:
type: array
description: This container is an array of one or more policy violation counts. A policy violation count is returned for each unique eBay marketplace and compliance type violation. As long as there is at least one non-compliant listing for the specified compliance type(s), this container will be returned. If no non-compliant listings are found for the specified compliance type(s), an HTTP status code of <code>204 No Content</code> is returned, and there is no response body.
items:
"$ref": "#/components/schemas/ComplianceSummaryInfo"
description: This type is the base type for the <strong>getListingViolationsSummary</strong> response. The <strong>violationSummaries</strong> container contains an array of policy violation counts for each unique eBay marketplace and compliance type violation.
ComplianceSummaryInfo:
type: object
properties:
complianceType:
type: string
description: This enumeration value indicates the type of compliance. See <a href="/api-docs/sell/compliance/types/com:ComplianceTypeEnum">ComplianceTypeEnum</a> for more information on each compliance type. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/compliance/types/com:ComplianceTypeEnum'>eBay API documentation</a>
marketplaceId:
type: string
description: This enumeration value indicates the eBay marketplace where the listing violations exist. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/compliance/types/bas:MarketplaceIdEnum'>eBay API documentation</a>
listingCount:
type: integer
description: This integer value indicates the number of eBay listings that are currently violating the compliance type indicated in the <strong>complianceType</strong> field, for the eBay marketplace indicated in the <strong>marketplaceId</strong> field.
format: int32
description: This type is used by each unique eBay marketplace and compliance type combination that is returned in the <strong>getListingViolationsSummary</strong> response to indicate the total number of listing violations in regards to that eBay marketplace and compliance type.
ComplianceViolation:
type: object
properties:
complianceType:
type: string
description: This enumeration value indicates the compliance type of listing violation. See <a href="/api-docs/sell/compliance/types/com:ComplianceTypeEnum">ComplianceTypeEnum</a> for more information on each compliance type. This will always be returned for each listing violation that is found. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/compliance/types/com:ComplianceTypeEnum'>eBay API documentation</a>
listingId:
type: string
description: The unique identifier of the eBay listing that currently has the corresponding listing violation{s). This field will always be returned for each listing that has one or more violations.
sku:
type: string
description: The seller-defined SKU value of the product in the listing with the violation{s). This field is only returned if defined in the listing. SKU values are optional in listings except when creating listings using the Inventory API model.
offerId:
type: string
description: <span class="tablenote"><strong>Note:</strong> This field is for future use, and will not be returned, even for listings created through the Inventory API.</span><br /><br /> The unique identifier of the offer. This field is only applicable and returned for listings that were created through the Inventory API. To convert an Inventory Item object into an eBay listing, an Offer object must be created and published.
violations:
type: array
description: This container consists of an array of one or more listing violations applicable to the eBay listing specified in the <strong>listingId</strong> field. This array is returned for each eBay listing that has one or more violations.<br><br>For each returned violation, the fields that are returned and the details that are given will depend on the listing violation.
items:
"$ref": "#/components/schemas/ComplianceDetail"
description: This type is used by each listing violation that is returned under the <strong>listingViolations</strong> container.
CorrectiveRecommendations:
type: object
properties:
productRecommendation:
description: This container is only applicable (and possibly returned) for the <code>PRODUCT_ADOPTION</code> and <code>PRODUCT_ADOPTION_CONFORMANCE</code> compliance types, and since eBay catalog product adoption is not enforced for any eBay category at this time, the <strong>productRecommendation</strong> container will not be returned at this time.
"$ref": "#/components/schemas/ProductRecommendation"
aspectRecommendations:
type: array
description: This container is returned for <code>ASPECTS_ADOPTION</code> violations if eBay has found one or more item aspect name-value pairs that may be appropriate for the seller's product. In many cases, the missing or invalid item aspect(s) shown under the corresponding <strong>violationData</strong> array, will also show up under this array with suggested value(s).
items:
"$ref": "#/components/schemas/AspectRecommendations"
description: This type is used by the <strong>correctiveRecommendations</strong> container, which is returned if eBay has suggestions for how to correct the given violation.
Error:
type: object
properties:
category:
type: string
description: Identifies the type of erro.
domain:
type: string
description: Name for the primary system where the error occurred. This is relevant for application errors.
errorId:
type: integer
description: A unique number to identify the error.
format: int32
inputRefIds:
type: array
description: An array of request elements most closely associated to the error.
items:
type: string
longMessage:
type: string
description: A more detailed explanation of the error.
message:
type: string
description: Information on how to correct the problem, in the end user's terms and language where applicable.
outputRefIds:
type: array
description: An array of request elements most closely associated to the error.
items:
type: string
parameters:
type: array
description: An array of name/value pairs that describe details the error condition. These are useful when multiple errors are returned.
items:
"$ref": "#/components/schemas/ErrorParameter"
subdomain:
type: string
description: 'Further helps indicate which subsystem the error is coming from. System subcategories include: Initialization, Serialization, Security, Monitoring, Rate Limiting, etc.'
description: This type defines the fields that can be returned in an error.
ErrorParameter:
type: object
properties:
name:
type: string
description: The object of the error.
value:
type: string
description: The value of the object.
NameValueList:
type: object
properties:
name:
type: string
description: This is the name of the variation aspect, or the name of the category of information that is returned through the name-value pair. The type of information that appears here will vary based on the compliance type and type of violation.
value:
type: string
description: This is the value of the variation aspect (in <strong>name</strong> field), or the value of the category of information that is returned through the name-value pair. The type of information that appears here will vary based on the compliance type and type of violation.
description: This type is used to provide a name-value pair, including the identifying aspects of a product variation through the <strong>variationAspects</strong> container.
PagedComplianceViolationCollection:
type: object
properties:
offset:
type: integer
description: This integer value shows the offset of the current page of results. The <strong>offset</strong> value controls the first listing violation in the result set that will be displayed at the top of the response. The <strong>offset</strong> and <strong>limit</strong> query parameters are used to control the pagination of the output. For example, if <strong>offset</strong> is set to <code>10</code> and <strong>limit</strong> is set to <code>10</code>, the call retrieves listing violations 11 thru 20 from the resulting collection of violations. <br /><br /> <span class="tablenote"><strong>Note:</strong> This feature employs a zero-based index, where the first item in the list has an offset of <code>0</code>.</span><br/><br/><strong>Default:</strong> <code>0</code> {zero)
format: int32
href:
type: string
description: The URI of the <strong>getListingViolations</strong> call request that produced the current page of the result set.
total:
type: integer
description: The total number of listing violations in the result set. If this value is higher than the <strong>limit</strong> value, there are multiple pages in the result set to view.
format: int32
next:
type: string
description: 'The <strong>getListingViolations</strong> call URI to use to view the next page of the result set. For example, the following URI returns listing violations 21 thru 30 from the collection of policy violations: <br /><br /><code><i>path</i>/listing_violation?limit=10&offset=20 </code><br /><br/>This field is only returned if an additional page of listing violations exists.<br/>'
prev:
type: string
description: 'The <strong>getListingViolations</strong> call URI to use to view the previous page of the result set. For example, the following URI returns listing violations 1 thru 10 from the collection of policy violations: <br /><br /><code><i>path</i>/listing_violation?limit=10&offset=0 </code><br /><br/>This field is only returned if an previous page of listing violations exists.<br/>'
limit:
type: integer
description: The maximum number of listing violations returned per page of the result set. The <strong>limit</strong> and <strong>offset</strong> query parameters are used to control the pagination of the output.<br /><br /><span class="tablenote"><strong>Note:</strong> If this is the last or only page in the result set, it may contain fewer listing violations than the <strong>limit</strong> value. To determine the number of pages in the result set, divide this value into the value of <strong>total</strong> and round up to the next integer.</span><br/><br/><strong>Default:</strong> <code>50</code><br/><strong>Max:</strong> <code>200</code>
format: int32
listingViolations:
type: array
description: An array of listing violations that match the criteria in the call request, including pagination control {if set). As long as there is at least one listing violation that matches the input criteria, this container will be returned. If no listing violations are found for the seller, an HTTP status code of <code>204 No Content</code> is returned, and there is no response body.
items:
"$ref": "#/components/schemas/ComplianceViolation"
description: This type is the base response type of the <strong>getListingViolations</strong> method.
ProductRecommendation:
type: object
properties:
epid:
type: string
description: This field will return the eBay Product ID {ePID) of an eBay Catalog product that eBay recommends that the seller use to make their listing compliant. <br><br><span class="tablenote"><strong>Note:</strong> Product Adoption is not enforced at this time. Product Adoption violations are no longer returned.</span>
description: This type is used by the <strong>productRecommendation</strong> container, which is returned if eBay has found an eBay catalog product that may be a match for the product (or product variation) that has a listing violation.<br><br><span class="tablenote"><strong>Note:</strong> eBay catalog product adoption is not enforced at this time, so product adoption violations are no longer returned. Due to this fact, this type and <strong>productRecommendation</strong> container are not currently applicable. </span>
VariationDetails:
type: object
properties:
sku:
type: string
description: The seller-defined SKU value of the variation within the multiple-variation listing with the violation{s). This field is only returned if a se
# --- truncated at 32 KB (33 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/ebay/refs/heads/main/openapi/ebay-compliance-openapi-original.yml