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
Input
Resource URI
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 clipboardRequest fields
Input container/field | Type | Description |
---|---|---|
consignAddress | CreateConsignPreferenceRequestData | This container is used to specify the address details used to create a consign address. Occurrence: Required |
consignAddress.consignPreferenceName | string | The name of the consign address. Occurrence: Required |
consignAddress.dropoffSiteId | string | The unique identifier of a drop-off site location. This value can be retrieved using the getDropoffSites method. Occurrence: Conditional |
consignAddress.pickupAddress | PickupAddressRequestData | This container is used to specify the address details used to create a pickup-from address. Occurrence: Conditional |
consignAddress.pickupAddress.city | string | The city code of the pickup address. Occurrence: Conditional |
consignAddress.pickupAddress.company | string | The company name associated with the pickup address. Occurrence: Conditional |
consignAddress.pickupAddress.contact | string | The name of the contact person associated with the pickup address. Occurrence: Conditional |
consignAddress.pickupAddress.countryCode | string | The two-letter country code of the pickup address.
Occurrence: Conditional |
consignAddress.pickupAddress.district | string | The district code of the pickup address. Occurrence: Conditional |
consignAddress.pickupAddress.name | string | The name of the pickup address. Occurrence: Conditional |
consignAddress.pickupAddress.phone | string | The phone number associated with the pickup address. Occurrence: Conditional |
consignAddress.pickupAddress.postcode | string | The postal code of the pickup address. Occurrence: Conditional |
consignAddress.pickupAddress.province | string | The province code of the the pickup address. Occurrence: Conditional |
consignAddress.pickupAddress.street1 | string | The first line of the street address of the pickup address. Occurrence: Conditional |
consignAddress.pickupAddress.street2 | string | The second line, if applicable, of the street address of the pickup address. Occurrence: Optional |
consignAddress.pickupAddress.street3 | string | The third line, if applicable, of the street address of the pickup address. Occurrence: Optional |
consignAddress.pickupTime | PickUpTimeTypeEnum | The pickup time that the pickup location supports. Occurrence: Conditional |
consignAddress.type | ConsignTypeEnum | The address type of the consign address.
Occurrence: Required |
Output
HTTP response headers
This call has no response headers.
Response payload
Response fields
Output container/field | Type | Description |
---|---|---|
consignAddressId | CreateConsignPreferenceResponsesData | This container specifies the unique identifier of the newly created consign address. Occurrence: Always |
consignAddressId.consignPreferenceId | string | The unique identifier of the newly-created consign address. 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.
Status | Meaning |
---|---|
201 | Created |
400 | Bad Request |
401 | Unauthorized |
500 | Internal Server Error |
Error codes
For more on errors, plus the codes of other common errors, see Handling errors.
Code | Domain | Category | Meaning |
---|---|---|---|
355000 | API_EDIS | APPLICATION | There was a problem with an eBay internal system or process. Contact eBay developer support for assistance. |
355050 | API_EDIS | REQUEST | Invalid value for type. Please check the document. |
355051 | API_EDIS | REQUEST | pickupTime is missing. Please check. |
355053 | API_EDIS | REQUEST | Connection failed with backend service. Please wait and retry. |
355055 | API_EDIS | REQUEST | Missing package address. Please check. |
355056 | API_EDIS | REQUEST | Missing request period. Please check. |
355057 | API_EDIS | REQUEST | Missing address ID of dropoff site. Please check. |
355058 | API_EDIS | REQUEST | Shipping preference name already exists. Please add a new name. |
355400 | API_EDIS | REQUEST | The 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.