Skip to main content

GET/listing_violation

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 ComplianceTypeEnum for more information on the supported listing 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 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.

Input

Resource URI

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

This method is supported in Sandbox environment. To access the endpoint, just replace the api.ebay.com root URI with api.sandbox.ebay.com

URI parameters

ParameterTypeDescription
compliance_typestringThis query parameter specifies the compliance type of the listing violations being retrieved. Only one compliance type value can be specified.

See ComplianceTypeEnum for more information on supported compliance types.

Occurrence: Required

offsetintegerThe 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 offset and limit query parameters are used 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 set of violations.

Note: This feature employs a zero-based index, 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

listing_idstringNote: This query parameter is not yet supported for the Compliance API.

Occurrence: Optional

limitintegerThis 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 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 index, 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

filterstringThis 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.

Although other filters may be added in the future, complianceState is the only supported filter type at this time. See the ComplianceStateEnum type for a list of supported values.

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.

filter=complianceState:{OUT_OF_COMPLIANCE}

Occurrence: Optional

HTTP request headers

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

The table below shows additional HTTP request headers that are either required, conditionally required, or strongly recommended for this method. Other standard HTTP request headers- opens rest request components page (not in this table) can also be used, but they are optional.

HeaderTypeDescription
X-EBAY-C-MARKETPLACE-IDstringThis header identifies the seller's eBay marketplace.

Supported values for this header can be found in the MarketplaceIdEnum type definition.

Occurrence: Required

OAuth scope

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):

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

See OAuth access tokens for more information.

Request payload

This call has no payload.

Request fields

This call has no field definitions.

Output

HTTP response headers

This call has no response headers.

Response payload

Response fields

Output container/fieldTypeDescription
offsetinteger

This integer value shows the offset of the current page of results. The offset value controls the first listing violation in the result set that will be displayed at the top of the response. The offset and limit query parameters are used 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 violations.

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

Default: 0 {zero)

Occurrence: Conditional

hrefstring

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

Occurrence: Conditional

totalinteger

The total number of listing violations in the result set. If this value is higher than the limit value, there are multiple pages in the result set to view.

Occurrence: Conditional

nextstring

The getListingViolations 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:

path/listing_violation?limit=10&offset=20

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

Occurrence: Conditional

prevstring

The getListingViolations 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:

path/listing_violation?limit=10&offset=0

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

Occurrence: Conditional

limitinteger

The maximum number of listing violations returned per page of the result set. The limit and offset query parameters are used to control the pagination of the output.

Note: If this is the last or only page in the result set, 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 ComplianceViolation

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 204 No Content is returned, and there is no response body.

Occurrence: Conditional

listingViolations.complianceTypeComplianceTypeEnum

This 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.listingIdstring

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.

Occurrence: Conditional

listingViolations.skustring

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.

Occurrence: Conditional

listingViolations.offerIdstring

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

This 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.

For each returned violation, the fields that are returned and the details that are given will depend on the listing violation.

Occurrence: Conditional

listingViolations.violations.reasonCodestring

This 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 reasonCode values vary by compliance type. The reason codes for each compliance type are summarized below.

Aspects adoption

The reason codes for ASPECTS_ADOPTION compliance indicate that for the given violation, aspects listed in the violationData 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.

  • MISSING_OR_INVALID_REQUIRED_ASPECTS
  • MISSING_OR_INVALID_PREFERRED_ASPECTS
  • MISSING_OR_INVALID_SOON_TO_BE_REQUIRED_ASPECTS

HTTPS

The reason codes for HTTPS 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:
  • NON_SECURE_HTTP_LINK_IN_LISTING
  • NON_SECURE_HTTP_LINK_IN_PRODUCT

Non-eBay links

The reason codes for OUTSIDE_EBAY_BUYING_AND_SELLING 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:
  • UNAPPROVED_DOMAIN_WEBLINK_IN_LISTING
  • PHONE_NUMBER_IN_LISTING
  • EMAIL_ADDRESS_IN_LISTING

Product adoption

Product Adoption is not enforced at this time.

Product adoption conformance

Product Adoption is not enforced at this time.

Returns policy

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. The GetCategoryFeatures 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.

Occurrence: Conditional

listingViolations.violations.messagestring

This 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.variationVariationDetails

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.

Occurrence: Conditional

listingViolations.violations.variation.skustring

The 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 NameValueList

An 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.namestring

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.

Occurrence: Conditional

listingViolations.violations.variation.variationAspects.valuestring

This 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 NameValueList

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 ASPECTS_ADOPTION violations, this container lists the missing aspect(s) or aspect(s) with invalid values.

Occurrence: Conditional

listingViolations.violations.violationData.namestring

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.

Occurrence: Conditional

listingViolations.violations.violationData.valuestring

This 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.correctiveRecommendationsCorrectiveRecommendations

This container is returned for ASPECTS_ADOPTION 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 violationData array, will also show up under the aspectRecommendations array with suggested value(s).

Note: 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 productRecommendation container at this time.

Occurrence: Conditional

listingViolations.violations.correctiveRecommendations.productRecommendationProductRecommendation

This container is only applicable (and possibly returned) for the PRODUCT_ADOPTION and PRODUCT_ADOPTION_CONFORMANCE compliance types, and since eBay catalog product adoption is not enforced for any eBay category at this time, the productRecommendation container will not be returned at this time.

Occurrence: Conditional

listingViolations.violations.correctiveRecommendations.productRecommendation.epidstring

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.

Note: Product Adoption is not enforced at this time. Product Adoption violations are no longer returned.

Occurrence: Conditional

listingViolations.violations.correctiveRecommendations.aspectRecommendationsarray of AspectRecommendations

This container is returned for ASPECTS_ADOPTION 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 violationData array, will also show up under this array with suggested value(s).

Occurrence: Conditional

listingViolations.violations.correctiveRecommendations.aspectRecommendations.localizedAspectNamestring

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 violationData array for ASPECTS_ADOPTION listing violations are also returned here

Note: This name is always localized for the specified marketplace.

Occurrence: Conditional

listingViolations.violations.correctiveRecommendations.aspectRecommendations.suggestedValuesarray of string

One or more valid values for the corresponding item aspect (in localizedAspectName) 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.

Please use getItemAspectsForCategory in the Taxonomy API or GetCategorySpecifics 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.

Occurrence: Conditional

listingViolations.violations.complianceStateComplianceStateEnum

The enumeration value returned in this field indicates if the listing violation is considered to be OUT_OF_COMPLIANCE with an eBay listing policy, or the listing is considered to be AT_RISK of becoming non-compliant against an eBay listing policy.

Generally, OUT_OF_COMPLIANCE policy violations can prevent the seller from revising a listing until the underlying violation(s) can be remedied. When the compliance state is AT_RISK, 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.

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

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

For more on errors, plus the codes of other common errors, see Handling errors.

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
850113API_COMPLIANCEREQUESTlisting_id not specified
850114API_COMPLIANCEREQUESTMandatory headers are missing

Warnings

This call has no warnings.

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 Aspects Adoption Violations

This seller wants to see which active listings are currently violating the aspects 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 ASPECTS_ADOPTION.

GEThttps://api.ebay.com/sell/compliance/v1/listing_violation?compliance_type=ASPECTS_ADOPTION&offset=0&limit=5

Output

The call response payload groups violations by listing ID. Each violation has reasonCode, message, and complianceState fields, which provides more information about the violation. The correctiveRecommendations.aspectRecommendations container is returned with suggested values for the aspects that are called out in the violation.

Based on the type of violation, the seller will have to revise these listings, using the createOrReplaceInventoryItem call of the Inventory API, or the ReviseItem or ReviseFixedPriceItem 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.

GEThttps://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 ReviseItem or ReviseFixedPriceItem 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.

GEThttps://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 ReviseItem or ReviseFixedPriceItem 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

GEThttps://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.