compliance API1.2.0

getListingViolationsSummary

GET
/listing_violation_summary
This call returns listing violation counts for a seller. A user can pass in one or more compliance types through the compliance_type query parameter. See ComplianceTypeEnum for more information on the five different compliance types. Listing violations are returned for multiple marketplaces if the seller sells on multiple eBay marketplaces.

Note: Only a canned response, with counts for all listing compliance types, is returned in the Sandbox environment. Due to this limitation, the compliance_type query parameter (if used) will not have an effect on the response.

Input

Resource URI (production)

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

URI parameters

ParameterTypeDescription
compliance_typestringA user passes in one or more compliance type values through this query parameter. See ComplianceTypeEnum for more information on the compliance types that can be passed in here. 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.

Note: Only a canned response, with counts for all listing compliance types, is returned in the Sandbox environment. Due to this limitation, the compliance_type query parameter (if used) will not have an effect on the response.

Occurrence: Optional

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-IDstringUse this header 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: Strongly Recommended

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

Occurrence: Conditional

violationSummaries.complianceTypeComplianceTypeEnumThis enumeration value indicates the type of compliance. See ComplianceTypeEnum for more information on each compliance type.

Occurrence: Conditional

violationSummaries.marketplaceIdMarketplaceIdEnumThis enumeration value indicates the eBay marketplace where the listing violations are occurring.

Occurrence: Conditional

violationSummaries.listingCountintegerThis integer value indicates the number of eBay listings that are currently violating the compliance type indicated in the complianceType field for the eBay marketplace indicated in the marketplaceId field.

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
850110API_COMPLIANCEREQUESTCompliance type is invalid
850111API_COMPLIANCEREQUESTCompliance type is missing
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 Listing Counts for All Compliance Types

This seller wants to get counts of active listings that are currently non-compliant with any of the five compliance types.

Input

In the call URI, since the seller wants to retrieve listing violation counts for all compliance types, he/she runs the operation without the compliance_type query parameter.
GET
https://api.ebay.com/sell/compliance/v1/listing_violation_summary

Output

The call response payload includes listing violation counts for all compliance types. Since the seller sells on two eBay marketplaces (US and UK), individual counts for each of these markeplaces are separated out. Each returned node shows the compliance type, the marketplace, and the number of active listings currently violating the corresponding compliance type. The next step for the seller would be to start making getListingViolations calls to find the specific, non-compliant listings.