Skip to main content

POST/complaint

Important! This method is only available for Greater-China based sellers with an active eDIS account.


This method can be used to create a complaint about a shipment order. Complaints can be filed if there is a pickup delay on an order or if an item has been lost in transit.

The complaint reason, complaint type, and the date the issue occurred must be specified in the request. If the complaint is being filed for a missing package, the affected packageId values must also be specified in the affectedPackages array.

If the call was successful, HTTP status code 201 Created will be returned, and the complaint will be created.

Input

Resource URI

POST https://api.ebay.com/sell/edelivery_international_shipping/v1/complaint

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

This method has no URI parameters.

HTTP request headers

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

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/scope/sell.edelivery

See OAuth access tokens for more information.

Request payload

Copy complete valid JSON to clipboard

Request fields

Input container/fieldTypeDescription
complaintRequestAddComplaintRequestData

This container is used to specify the information included in a complaint request, such as the complaint reason, date, and type.

Occurrence: Required

complaintRequest.affectedPackagesarray of string

This array specifies a list of packages, specified by their packageId, affected by the issue causing the complaint.

Package ID values are returned when creating a package through the createPackage method

This array is required if the complaint being filed is for a missing package.

Occurrence: Conditional

complaintRequest.complaintDatestring

The date in which the issue associated with the complaint occurred.

Format: YYYY-MM-DDTHH:MM:SS.SSSZ

Occurrence: Required

complaintRequest.complaintReasonstring

This string specifies the reason the complaint was filed.

Max length: 200 characters

Occurrence: Required

complaintRequest.complaintTypeComplaintTypeEnum

The type of complaint being filed.

Valid values:

  • ABNORMAL_COLLECTION_COMPLAINT
  • LOST_PACKAGE_COMPLAINT

Occurrence: Required

complaintRequest.preferenceIdinteger

The unique identifier of the address associated with the complaint.

This field is required if the complain being filed is associated with a specific address.

Occurrence: Conditional

complaintRequest.remarkstring

A remark to the seller themselves.

Occurrence: Optional

Output

HTTP response headers

This call has no response headers.

Response payload

This call has no payload.

Response fields

This call has no field definitions.

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
201Created
400Bad Request
401Unauthorized
500Internal Server Error

Error codes

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

CodeDomainCategoryMeaning
355000API_EDISAPPLICATIONThere was a problem with an eBay internal system or process. Contact eBay developer support for assistance.
355060API_EDISREQUESTComplaint submission is declined on logistic service provider side. Please contact customer service for help.
355400API_EDISREQUESTThe access token provided in the Authorization header is not for an eBay user account that is currently allowed to call this API. Please go to account settings to add to your account list.

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: Create a complaint request for a lost package

This method can be used to create a complaint request.

Input

When using this method, information relating to the complaint being created is required to be in passed in the complaintRequest container. This information includes the complaint date, reason, type, and any affected packages.

In this sample, a complaint is being filed for a lost package. The ID for this package is specified in the affectedPackages field.

POSThttps://api.ebay.com/sell/edelivery_international_shipping/v1/complaint

Output

If the call is successful, HTTPS status code 201 Created will be returned and the complaint request will be created.