Skip to main content

POST/consign_preference

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


This method can be used to create a consign address.

The following types of address preferences can be created via this method:
  • PICK_UP
  • DROP_OFF
  • FORWARD_DEPLOYMENT
The address information for the consign address must be provided in the consignAddress container. If the call is successful, the addressId for the newly created address will be returned. This ID can then be used when creating a package to specify the consign address to use for the shipment.

Input

Resource URI

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

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
consignAddressCreateConsignPreferenceRequestData

This container is used to specify the address details used to create a consign address.

Occurrence: Required

consignAddress.consignPreferenceNamestring

The name of the consign address.

Occurrence: Required

consignAddress.dropoffSiteIdstring

The unique identifier of a drop-off site location. This value can be retrieved using the getDropoffSites method.

This field is required if the DROPOFF address type is specified.

Occurrence: Conditional

consignAddress.pickupAddressPickupAddressRequestData

This container is used to specify the address details used to create a pickup-from address.

This container is required if the PICK_UP address type is specified.

Occurrence: Conditional

consignAddress.pickupAddress.citystring

The city code of the pickup address.

See 商户API地址编码主数据 for valid city codes.

Occurrence: Conditional

consignAddress.pickupAddress.companystring

The company name associated with the pickup address.

Max length: 50 characters

Occurrence: Conditional

consignAddress.pickupAddress.contactstring

The name of the contact person associated with the pickup address.

Max length: 50 characters

Occurrence: Conditional

consignAddress.pickupAddress.countryCodestring

The two-letter country code of the pickup address.

Valid values:

  • CN
  • HK

Occurrence: Conditional

consignAddress.pickupAddress.districtstring

The district code of the pickup address.

See 商户API地址编码主数据 for valid district codes.

Occurrence: Conditional

consignAddress.pickupAddress.namestring

The name of the pickup address.

Max length: 50 characters

Occurrence: Conditional

consignAddress.pickupAddress.phonestring

The phone number associated with the pickup address.

Occurrence: Conditional

consignAddress.pickupAddress.postcodestring

The postal code of the pickup address.

Occurrence: Conditional

consignAddress.pickupAddress.provincestring

The province code of the the pickup address.

See 商户API地址编码主数据 for valid province codes.

Occurrence: Conditional

consignAddress.pickupAddress.street1string

The first line of the street address of the pickup address.

Max length: 50 characters

Occurrence: Conditional

consignAddress.pickupAddress.street2string

The second line, if applicable, of the street address of the pickup address.

Max length: 50 characters

Occurrence: Optional

consignAddress.pickupAddress.street3string

The third line, if applicable, of the street address of the pickup address.

Max length: 50 characters

Occurrence: Optional

consignAddress.pickupTimePickUpTimeTypeEnum

The pickup time that the pickup location supports.

This field is required if the PICK_UP address type is specified.

Occurrence: Conditional

consignAddress.typeConsignTypeEnum

The address type of the consign address.

Valid values:

  • PICK_UP
  • DROP_OFF
  • FORWARD_DEPLOYMENT

Occurrence: Required

Output

HTTP response headers

This call has no response headers.

Response payload

Response fields

Output container/fieldTypeDescription
consignAddressIdCreateConsignPreferenceResponsesData

This container specifies the unique identifier of the newly created consign address.

Occurrence: Always

consignAddressId.consignPreferenceIdstring

The unique identifier of the newly-created consign address.

This ID can be used when creating a package through the createPackage method to specify the pickup, drop-off, or forward deployment address associated with the package.

Occurrence: Always

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.
355050API_EDISREQUESTInvalid value for type. Please check the document.
355051API_EDISREQUESTpickupTime is missing. Please check.
355053API_EDISREQUESTConnection failed with backend service. Please wait and retry.
355055API_EDISREQUESTMissing package address. Please check.
355056API_EDISREQUESTMissing request period. Please check.
355057API_EDISREQUESTMissing address ID of dropoff site. Please check.
355058API_EDISREQUESTShipping preference name already exists. Please add a new name.
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 pickup-from consign address

This method can be used to create a pickup-from consign address on a user's eDIS account.

Input

When using this method to create a pickup-from address, the address and contact information for the consign address is required to be passed in the pickupAddress container. In addition, the address name (consignPreferenceName) and type must also be indicated in the request.

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

Output

If the call is successful, HTTP status code 201 Created is returned, alongside the unique identifier of the newly-created location.