This doc page has moved! You should be automatically redirected to the resources page for the eBay Account API. If you are not redirected automatically, follow this link to the Account API.

eBay Account APIVersion 1.2.0

Get Shipping Rate Tables

GET /rate_table

Retrieves information on the shipping rate tables defined by the seller. The call returns the shipping rate tables for the country specified by the country_code query parameter. If no country code is specified, the call returns all the shipping rate tables defined by the seller.

For more on shipping rate tables, including how details on how to set them up, see Using shipping rate tables.

Important: The documentation for this call is provided as a preview of functionality that will soon be available; this call is not yet live on our Production or Sandbox servers. This notice will be removed once getRateTables is wired-on and available for general use.

Input

See also Samples.

Resource URI (production)

GET https://api.ebay.com/sell/account/v1/rate_table?
  country_code=CountryCodeEnum

URI parameters

Parameter Type Required? Meaning
country_code string --- A two-letter ISO 3166-1 Alpha-2 country code that specifies the country for which you want shipping rate table information. If you do not specify a county, the call returns all the seller-defined rate tables.

Applicable values are from CountryCodeEnum.


HTTP request headers

All requests made to eBay REST operations require you to provide the authorization HTTP header for authentication.
See HTTP request headers for details.



OAuth request scope

This request requires a user access token with the following scope:

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

https://api.ebay.com/oauth/api_scope/sell.account.readonly

See Getting Access Tokens for more information.



Payload model

This call has no request payload.


Output

See also Samples.

HTTP status codes

This call can return one of the following HTTP status codes. See the HTTP Status Code Registry for a complete overview of HTTP status codes.

Status Meaning
200 Success
400 Bad Request
500 Internal Server Error

Payload model

Note: For information about the error fields and how to work with them, see Error Handling.

The following lists all fields that could be included in the response.

{ /* RateTableResponse */
"rateTables": [
    { /* RateTable */
    "countryCode": string,
    "locality": string,
    "name": string,
    "rateTableId": string
    }
    /* More RateTable nodes here */
  ]
}

Response field descriptions



Output Container/Field Type Occurrence Meaning
rateTables array of RateTable Conditionally A list of elements that provide information on the seller-defined shipping rate tables.
rateTables.countryCode string Conditionally A two-letter ISO 3166-1 Alpha-2 country code representing the eBay marketplace where an item is listed.

Applicable values are from CountryCodeEnum:See countryCode.
Code so that your app gracefully handles any future changes to this list.
rateTables.locality string Conditionally The region covered by the shipping rate table, either DOMESTIC or INTERNATIONAL.

DOMESTIC indicates that the shipping rate table applies to regions within the country where an item is listed (the source country) while INTERNATIONAL indicates that the shipping rate table applies to regions outside of the country where an item is listed.

Applicable values are from ShippingOptionTypeEnum:

DOMESTIC
DOMESTIC indicates a region that is within the source country.
INTERNATIONAL
INTERNATIONAL indicates a region that is external to the source country.

Code so that your app gracefully handles any future changes to this list.
rateTables.name string Conditionally The user-defined name for the shipping rate table. Sellers can access Seller Hub (or My eBay > Account > Site Preferences > Shipping preferences) to create and assign names to their shipping rate tables.
rateTables.rateTableId string Conditionally A unique eBay-assigned ID for the shipping rate table.

Use this ID value in the RateTableDetails container of the Add/Revise/Relist calls in the Trading API. If the locality for a rate table is set to DOMESTIC, pass the ID value in the RateTableDetails.DomesticRateTableId field. Otherwise, if locality is INTERNATIONAL, pass the ID value in RateTableDetails.InternationalRateTableId.



Error Codes

Code Domain Category Nature Meaning
20403 API_ACCOUNT REQUEST ERROR Invalid {fieldName}. {additionalInfo}
20500 API_ACCOUNT APPLICATION ERROR System error.



Samples

Note: Some item IDs, user IDs, or other data in these samples might no longer be active on eBay. If necessary, you can substitute current eBay data in your requests.

Sample: Get the shipping-rate tables for a country

Description

This example retrieves details about the shipping-rate tables defined by a seller for a specific country.

Input

This call does not require a request payload and the countryCode query parameter is optional (if you do not supply a countryCode in the request, the call returns all the seller's shipping-rate tables). The example shown relies on the default countryCode value.

URL format. See also the non-wrapped version of this URL.

GET https://api.ebay.com/sell/account/v1/rate_table

Output

A successful call returns information on the shipping-rate tables defined by the seller. Table information is returned for the country specified in the request and information on up to 20 tables can be returned by this call.

JSON format.
{
  "rateTables": [
    {
      "countryCode": "US",
      "rateTableId": "1948372637",
      "name": "Shoes Shipping Rates",
      "locality": "DOMESTIC"
    },
    {
      "countryCode": "US",
      "rateTableId": "1948372638",
      "name": "T-Shirts Shipping Rates",
      "locality": "DOMESTIC"
    },
    {
      "countryCode": "US",
      "rateTableId": "1948372639",
      "name": "Pants Shipping Rates",
      "locality": "DOMESTIC"
    },
    {
      "countryCode": "US",
      "rateTableId": "1948372640",
      "name": "Baseball Cards Shipping Rates",
      "locality": "INTERNATIONAL"
    },
    {
      "countryCode": "US",
      "rateTableId": "1948372641",
      "name": "Guitars Shipping Rates",
      "locality": "INTERNATIONAL"
    }
  ]
}



Change History

Change Date Description