compliance API1.2.0

getListingViolations

GET
/listing_violation
This call returns specific listing violations for five different 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 are grouped together by eBay listing ID. See ComplianceTypeEnum for more information on the five different compliance types. This method also has pagination control.

Note: 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 total 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.

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

Note: Only a canned response for this call will be returned in the Sandbox environment, so the non-compliant listing data will not be specific to the seller.

Input

Resource URI (production)

GET https://api.ebay.com/sell/compliance/v1/listing_violation?

URI parameters

ParameterTypeDescription
limitintegerThis query parameter is used if the user wants to set a limit on the number of listing violations that are returned in the current result set. This parameter is used in conjunction with the offset parameter to control the pagination of the output.

For example, if offset is set to 10 and limit is set to 10, the call retrieves listing violations 11 thru 20 from the collection of listing violations that match the value set in the compliance_type parameter.

Note: This feature employs a zero-based list, where the first item in the list has an offset of 0. If the listing_id parameter is included in the request, this parameter will be ignored.

Default: 100
Maximum: 200

Occurrence: Optional

listing_idstringNote: This query parameter is not yet supported for the Compliance API. Please not that until this query parameter becomes available, the compliance_type query parameter is required with each getListingViolations call.

This query parameter is used if the user wants to view all listing violations for one or more eBay listings. The string value passed into this field is the unique identifier of the listing, sometimes referred to as the Item ID. Either the listing_id or a compliance_type query parameter must be used, and if the seller only wants to view listing violations of a specific compliance type, both of these parameters can be used.

Up to 50 listing IDs can be specified with this query parameter, and each unique listing ID is separated with a comma.

Occurrence: Conditional

offsetintegerThe first policy violation to return based on its position in the collection of listing violations. Use this parameter in conjunction with the limit parameter to control the pagination of the output.

For example, if offset is set to 10 and limit is set to 10, the call retrieves listing violations 11 thru 20 from the resulting collection of listing violations.

Note: This feature employs a zero-based list, where the first item in the list has an offset of 0. If the listing_id parameter is included in the request, this parameter will be ignored.

Default: 0 {zero)

Occurrence: Optional

compliance_typestringA seller uses this query parameter to retrieve listing violations of a specific compliance type. Only one compliance type value should be passed in here. See ComplianceTypeEnum for more information on the compliance types that can be passed in here. If the listing_id query parameter is used, the compliance_type query parameter {if passed in) will be ignored. This is because all of a listing's policy violations {each compliance type) will be returned if a listing_id is provided. Either the listing_id or a compliance_type query parameter must be used, and if the seller only wants to view listing violations of a specific compliance type, both of these parameters can be used.

Note: The listing_id query parameter is not yet available for use, so the seller does not have the ability to retrieve listing violations for one or more specific listings. Until the listing_id query parameter becomes available, the compliance_type query parameter is required with each getListingViolations call.

Occurrence: Conditional

HTTP request headers

All requests made to eBay REST operations require you to provide the Authorization HTTP header for authentication authorization.

HeaderTypeDescription
X-EBAY-C-MARKETPLACE-IDstringThis header is required and is used to specify the eBay marketplace identifier. Supported values for this header can be found in the MarketplaceIdEnum type definition. Note that Version 1.2.0 of the Compliance API is only supported on the US, UK, Australia, Canada {English), and Germany sites.

Occurrence: Required

OAuth scope

This request requires an access token created with the authorization code grant flow, using one scope from the following list:

https://api.ebay.com/oauth/api_scope/sell.inventory

See OAuth access tokens for more information.

Output

HTTP response headers

Output container/fieldTypeDescription
offsetintegerThe distance {number of records) from the first policy violation in the collection to the first policy violation in this result set. In the call request, you can use the offset parameter in conjunction with the limit parameter to control the pagination of the output. For example, if offset is set to 30 and limit is set to 10, the call retrieves policy violations 31 thru 40 from the resulting collection of policy violations.

Note: This feature employs a zero-based list, where the first item in the list has an offset of 0.

Default: 0 {zero)

Occurrence: Conditional

hrefstringThe URI of the getListingViolations call request that produced the current page of the result set.

Occurrence: Conditional

totalintegerThe total number of policy violations in the result set.

Note: If no policy violations are found, this field is returned with a value of 0.

Occurrence: Conditional

nextstringThe getListingViolations call URI to use to view the next page of the result set. For example, the following URI returns policy violations 41 thru 50 from the collection of policy violations:

path/listing_violation?limit=10&offset=40

This field is only returned if an additional page of listing violations exists.

Occurrence: Conditional

prevstringThe getListingViolations call URI to use to view the previous page of the result set. For example, the following URI returns policy violations 21 thru 30 from the collection of policy violations:

path/listing_violation?limit=10&offset=20

Note: This feature employs a zero-based list, where the first policy violation in the list has an offset of 0.

This field is only returned if a previous page of listing violations exists.

Occurrence: Conditional

limitintegerThe maximum number of policy violations returned per page of the result set.

Note: If this is the last or only result set in the collection, it may contain fewer listing violations than the limit value. To determine the number of pages in the result set, divide this value into the value of total and round up to the next integer.

Default: 50
Max: 200

Occurrence: Conditional

listingViolationsarray of ComplianceViolationAn 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 violation for the specified compliance type, this container will be returned. If no listing violations are found for the seller, an HTTP status code of 204 No Content is returned, and there is no response body.

Occurrence: Conditional

listingViolations.complianceTypeComplianceTypeEnumThis enumeration value indicates the compliance type of listing violation. See ComplianceTypeEnum for more information on each compliance type. This will always be returned for each listing violation that is found.

Occurrence: Conditional

listingViolations.listingIdstringThe unique identifier of the eBay listing that currently has the corresponding listing violation{s). This will always be returned for each listing that has one or more violations.

Occurrence: Conditional

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

Occurrence: Conditional

listingViolations.offerIdstringNote: This field is for future use, and will not be returned, even for listings created through the Inventory API.

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.

Occurrence: Conditional

listingViolations.violationsarray of ComplianceDetailThis container consists of an array of one or more listing violations applicable to the eBay listing specified in the listingId field. This array is returned for each eBay listing that has one or more violations.

Occurrence: Conditional

listingViolations.violations.reasonCodestringThis value states the nature of the listing violation. A reasonCode value is returned for each listing violation, and each compliance type can have several reason codes and related messages. The reason codes for each compliance type are summarized below.

The PRODUCT_ADOPTION reason codes and how to revise your listings based on these reason codes are summarized in the Using Compliance API reason codes to revise listings topic in the Product-Based Shopping Experience Playbook.

The OUTSIDE_EBAY_BUYING_AND_SELLING reason codes include the following. For each of these violations, the seller will just need to remove this information with a revise listing call:
  • UNAPPROVED_DOMAIN_WEBLINK_IN_LISTING
  • PHONE_NUMBER_IN_LISTING
  • EMAIL_ADDRESS_IN_LISTING

The HTTPS reason codes include the following. For each of these violations, the seller will just need to remove the HTTP link (or update to HTTPS) from the listing details or product details:
  • NON_SECURE_HTTP_LINK_IN_LISTING
  • NON_SECURE_HTTP_LINK_IN_PRODUCT

The PRODUCT_ADOPTION_CONFORMANCE reason codes include the following:
  • PRODUCT_MISMATCH: indicates that wrong eBay catalog product is being used.
  • TITLE_MISMATCH: indicates that the listing title does not match the product title in the eBay catalog product.
  • TITLE_OR_ITEMSPECIFICS_MISMATCH: indicates that either the listing's title and/or Item Specifics do not match the product title and Item Specifics in the eBay catalog product.
  • PRICE_OR_CONDITION_MISMATCH: indicates that the item's price and/or condition do not match what is expected for a listing associated with the eBay catalog product.

The only RETURNS_POLICY reason code is UNSUPPORTED_RETURNS_PERIOD. The seller will have to revise their listing (or return business policy) with a supported return period for the site and category.

Occurrence: Conditional

listingViolations.violations.messagestringThis field provides a textual summary of the listing violation. A message field is returned for each listing violation. This message will vary widely based on the compliance type and corresponding reason code.

Occurrence: Conditional

listingViolations.violations.variationVariationDetailsThis 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.

Occurrence: Conditional

listingViolations.violations.variation.skustringThe seller-defined SKU value of the variation within the multiple-variation listing with the violation{s). This field is only returned if a seller-defined SKU value is defined for the variation. SKU values are optional in listing except when creating listings using the Inventory API.

Occurrence: Conditional

listingViolations.violations.variation.variationAspectsarray of NameValueListAn array of one or more variation aspects that define a variation within a multiple variation listing. The aspect{s) returned here define the individual variation because these aspects will differ for each variation. Common varying aspects include color and size.

Occurrence: Conditional

listingViolations.violations.variation.variationAspects.namestringThis 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.

Occurrence: Conditional

listingViolations.violations.variation.variationAspects.valuestringThis is the value of the variation aspect (in name 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.

Occurrence: Conditional

listingViolations.violations.violationDataarray of NameValueListNote: This container is for future use.

Once it becomes available, this container will provide 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.

Occurrence: Conditional

listingViolations.violations.violationData.namestringThis 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.

Occurrence: Conditional

listingViolations.violations.violationData.valuestringThis is the value of the variation aspect (in name 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.

Occurrence: Conditional

listingViolations.violations.correctiveRecommendationsCorrectiveRecommendationsThis container 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.

Note: As of August 2018, this container is only returned for the following Product-Based Shopping Experience categories: Smart Speakers (Cat. ID 184435), Audio Docks & Mini Speakers (Cat. ID 111694), Internet TV & Media Streamers (Cat. ID 168058), Space Heaters (Cat. ID 20613), Air Purifiers (Cat. ID 43510), Humidifiers (Cat. ID 71240), Portable Fans (Cat. ID 20612), and Programmable Thermostats (Cat. ID 115949).

Occurrence: Conditional

listingViolations.violations.correctiveRecommendations.productRecommendationProductRecommendationThis container 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.

Note: As of August 2018, this container is only returned for the following Product-Based Shopping Experience categories: Smart Speakers (Cat. ID 184435), Audio Docks & Mini Speakers (Cat. ID 111694), Internet TV & Media Streamers (Cat. ID 168058), Space Heaters (Cat. ID 20613), Air Purifiers (Cat. ID 43510), Humidifiers (Cat. ID 71240), Portable Fans (Cat. ID 20612), and Programmable Thermostats (Cat. ID 115949).

Occurrence: Conditional

listingViolations.violations.correctiveRecommendations.productRecommendation.epidstringThis 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. See the Product-Based Shopping Experience Playbook for more details on passing in an ePID for single and multiple-variation listings using the Inventory or Trading APIs.

Note: As of August 2018, this container is only returned for the following Product-Based Shopping Experience categories: Smart Speakers (Cat. ID 184435), Audio Docks & Mini Speakers (Cat. ID 111694), Internet TV & Media Streamers (Cat. ID 168058), Space Heaters (Cat. ID 20613), Air Purifiers (Cat. ID 43510), Humidifiers (Cat. ID 71240), Portable Fans (Cat. ID 20612), and Programmable Thermostats (Cat. ID 115949).

Occurrence: Conditional

HTTP status codes

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.

StatusMeaning
200Success
204No Content
400Bad Request
500Internal Server Error

Error codes

CodeDomainCategoryMeaning
850001API_COMPLIANCEAPPLICATIONAny System error. {additionalInfo}
850101API_COMPLIANCEREQUESTMarketplace ID is invalid
850102API_COMPLIANCEREQUESTMarketplace ID is missing
850109API_COMPLIANCEREQUESTSingle compliance type is supported per API call
850110API_COMPLIANCEREQUESTCompliance type is invalid
850111API_COMPLIANCEREQUESTCompliance type is missing
850112API_COMPLIANCEREQUESTInvalid listing_id specified - {listingId}
850113API_COMPLIANCEREQUESTlisting_id not specified
850114API_COMPLIANCEREQUESTMandatory headers are missing

Samples

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.

Sample 1: Get Product Adoption Violations

This seller wants to see which active listings (and which variations within a multiple-variation listing) are currently violating the product adoption requirement.

Input

In the call URI, the seller passes in the required compliance_type query parameter, and sets the value of the parameter to PRODUCT_ADOPTION.
GET
https://api.ebay.com/sell/compliance/v1/listing_violation?compliance_type=PRODUCT_ADOPTION

Output

The call response payload groups violations by listing ID. Each violation has a reasonCode and a message field which provides more information about the violation. For multiple-variation listings with one or more violations, specific variations within the listing are identified through the variation.variationAspects container. If eBay is able to locate a possible eBay Catalog product match for the listing or variation based on product details, a correctiveRecommendations.productRecommendation container is returned with the ePID value of the possible catalog product match. The seller can verify if the catalog product is the right match by calling getProduct of the Catalog API to get full details on the eBay Catalog product.

Based on the type of violation, the seller will have to revise these listings using the createOrReplaceInventoryItem call of the Inventory API, or the ReviseItemReviseFixedPriceItem call of the Trading API.

Sample 2: Get HTTP Violations

This seller wants to see which active listings are currently violating eBay's policy of having 'HTTP' links instead of 'HTTPS'.

Input

In the call URI, the seller passes in the required compliance_type query parameter, and sets the value of the parameter to HTTPS.
GET
https://api.ebay.com/sell/compliance/v1/listing_violation?compliance_type=HTTPS

Output

The call response payload groups violations by listing ID. Each violation has a reasonCode and a message field which provides more information about the violation.

The seller will have to revise these listings, removing or correcting all 'HTTP' links using the createOrReplaceInventoryItem call of the Inventory API, or the ReviseItemReviseFixedPriceItem call of the Trading API. Note that many webites/servers support both the 'HTTP' and 'HTTPS' protocols, so the seller may just need to update the link (from 'http' to 'https'), but it the referenced website/server does not support the 'HTTPS' protocol, that link will have to be removed from the listing. This includes links to externally-hosted images.

Sample 3: Get 'Outside eBay' Violations

This seller wants to see which active listings are currently violating eBay's policy against unauthorized external links or having contact information (phone number or email address) in the listing.

Input

In the call URI, the seller passes in the required compliance_type query parameter, and sets the value of the parameter to OUTSIDE_EBAY_BUYING_AND_SELLING.
GET
https://api.ebay.com/sell/compliance/v1/listing_violation?compliance_type=OUTSIDE_EBAY_BUYING_AND_SELLING

Output

The call response payload groups violations by listing ID. Each violation has a reasonCode and a message field which provides more information about the violation.

The seller will have to revise these listings, taking out the offending external link(s) or contact information, using the createOrReplaceInventoryItem call of the Inventory API, or the ReviseItemReviseFixedPriceItem call of the Trading API.

Sample 4: Get 'Returns Policy' Violations

This seller wants to see which active listings have return periods that are no longer supported for the site/category.

Input

In the call URI, the seller passes in the required compliance_type query parameter, and sets the value of the parameter to RETURNS_POLICY. In this particular sample, the seller wants to limit the number of violations returned per page of data to five, starting with the first violation in the results set. To enable this, the seller includes the offset query parameter and sets its value to 0, and includes the limit query parameter and sets its value to 5
GET
https://api.ebay.com/sell/compliance/v1/listing_violation?compliance_type=RETURNS_POLICY&offset=0&limit=5

Output

The call response payload groups violations by listing ID. Each violation has a reasonCode and a message field which provides more information about the violation.

The seller will have to revise these listings, updating the return period to a value that is supported for the site/category.

Note that only five listing violations are returned in the sample, but there are actual 10 listing violations of this compliance type. If the seller wanted to get the next page of data (and remaining five listing violations), he/she could just grab the call URI that is in the next field and run the operation again.

Sample 5: Get 'Product Adoption Conformance' Violations

This seller wants to see which product-based listings are out of synch with the associated eBay catalog product and/or which listings are associated with the wrong eBay catalog product.

Input

In the call URI, the seller passes in the required compliance_type query parameter, and sets the value of the parameter to PRODUCT_ADOPTION_CONFORMANCE.
GET
https://api.ebay.com/sell/compliance/v1/listing_violation?compliance_type=PRODUCT_ADOPTION_CONFORMANCE

Output

The call response payload groups violations by listing ID. Each violation has a reasonCode and a message field which provides more information about the violation. There are actual four different variations of product adoption conformance violations, so each listing can have more than one violation.

Based on the reason code and associated message, the seller will have to revise these listings to either synch the listing up with the associated catalog product, or perhaps change the catalog product that the listing is associated with.