Skip to main content

POST/rate_table/{rate_table_id}/update_shipping_cost

This method allows sellers to update shippingCost and/or additionalCost information for an existing shipping rate table identified by the rate_table_id path parameter.

A successful call returns an HTTP status code of 204 No Content.

Input

Resource URI

POST https://api.ebay.com/sell/account/v2/rate_table/{rate_table_id}/update_shipping_cost

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

ParameterTypeDescription
rate_table_idstringThis path parameter is the unique identifier for the shipping rate table for which shipping costs will be updated.

Use the getRateTables method of the Account API v1 to retrieve rate table IDs.

Occurrence: Required

HTTP request headers

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

The table below shows additional HTTP request headers that are either required, conditionally required, or strongly recommended for this method. Other standard HTTP request headers- opens rest request components page (not in this table) can also be used, but they are optional.

HeaderTypeDescription
Content-TypestringThis header indicates the format of the request body provided by the client. It's value should be set to application/json.

For more information, refer to HTTP request headers.

Occurrence: Required

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/api_scope/sell.account

eBayUser

See OAuth access tokens for more information.

Request payload

Copy complete valid JSON to clipboard

Request fields

Input container/fieldTypeDescription
ratesarray of RateUpdate

An array of rate objects for which shippingCost and/or additionalCost are to be updated.

Occurrence: Required

rates.additionalCostAmount

An additional shipping cost added to the base shipping rate (i.e., shippingCost).

This amount applies only to the following rateTableBasis options:

  • WEIGHT: This is a cost per unit weight and is calculated using the weight of the item(s) being shipped.
  • SURCHARGE: This is a flat amount that is added to the base shipping rate.
This field is returned only when it is applicable to the specified rate ID.

Occurrence: Conditional

rates.additionalCost.currencyCurrencyCodeEnum

The base currency applied to the value field to establish a monetary amount.

The currency is represented as a 3-letter ISO 4217 currency code. For example, the code for the Canadian Dollar is CAD.

Occurrence: Optional

rates.additionalCost.valuestring

The monetary amount in the specified currency.

Occurrence: Optional

rates.rateIdstring

The identifier for the rate object.

Note: This is a string automatically assigned by the system when the rate object is created. It cannot be changed or updated.

Occurrence: Required

rates.shippingCostAmount

This is the base shipping rate for an item.

This amount applies only to the following rateTableBasis options:

  • ITEM: This is a flat rate shipping cost per item being shipped.
  • WEIGHT: This is a cost per unit weight and is calculated using the weight of the item(s) being shipped.

Occurrence: Conditional

rates.shippingCost.currencyCurrencyCodeEnum

The base currency applied to the value field to establish a monetary amount.

The currency is represented as a 3-letter ISO 4217 currency code. For example, the code for the Canadian Dollar is CAD.

Occurrence: Optional

rates.shippingCost.valuestring

The monetary amount in the specified currency.

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
204No Content
400Bad Request
404Not Found
409Conflict
500Internal Server Error

Error codes

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

CodeDomainCategoryMeaning
394001API_ACCOUNTREQUESTThe specified rate table ID is invalid. Please input a valid rate table ID. The getRateTables method can be used to retrieve valid rate table IDs
394004API_ACCOUNTREQUESTPlease specify at least one shipping rate entry to add/update through the rates array.
394007API_ACCOUNTREQUESTPlease specify the rateId value for one or more shipping rate entries being updated.
394008API_ACCOUNTREQUESTThe shippingCost containers are missing for one or more shipping rate entries. Please provide the shipping cost values for the shipping rate entries being updated.
394009API_ACCOUNTREQUESTThe specified shipping cost currency does not match the currency used for the marketplace.
394011API_ACCOUNTREQUESTThe additional cost containers are missing for one or more shipping rate entries for the WEIGHT/SURCHARGE rate table. Please provide these values for the additional rate entries being added/updated.
394012API_ACCOUNTREQUESTThe specified additional cost currency does not match the currency used for the marketplace.
394015API_ACCOUNTREQUESTThe number of rate entries must be less than or equal to the existing data.
394025API_ACCOUNTREQUESTThe shipping cost value is invalid.
394026API_ACCOUNTREQUESTThe additional cost value is invalid.
394035API_ACCOUNTREQUESTThe shipping cost is not supported in surcharge calculation type.
394036API_ACCOUNTREQUESTAdditional costs are not applicable for shipping rate tables based on shipping item. Please remove the additional cost container.
394041API_ACCOUNTREQUESTThe rateId of rates is repeated.
395000API_ACCOUNTAPPLICATIONThere was a problem with an eBay internal system or process. Contact eBay developer support for assistance.

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: Update Shipping Costs: rateTableBasis = ITEM

This example illustrates how to update shipping costs for an existing shipping rate table specifying flat-rate shipping costs (i.e., rateTableBasis = ITEM).

Input

The rate table for which shipping costs will be updated is specified with the rate_table_id path parameter.

The request payload is an array that specifies the rateId plus updated shippingCost information for each rate being updated.

Note: When rateTableBasis = ITEM, only the shippingCost field is used.

Only those shipping rates that are being updated need to be included in the request payload.

Rates must be listed in numerical order by their rateId.

POSThttps://api.ebay.com/sell/account/v2/rate_table/5******7/update_shipping_cost

Output

A successful call returns an HTTP status code of 204 No Content. There is no response payload.

Sample 2: Update Shipping Costs: rateTableBasis = WEIGHT

This example illustrates how to update shipping costs for an existing shipping rate table specifying shipping costs based on the weight of the item(s) being shipped (i.e., rateTableBasis = WEIGHT).

Input

The rate table for which shipping costs will be updated is specified with the rate_table_id path parameter.

The request payload is an array that specifies the rateId plus updated shippingCost and additionalCost information for each rate being updated.

Note: When rateTableBasis = WEIGHT, both shippingCost and additionalCost fields are used.

Only those shipping rates that are being updated need to be included in the request payload. However, for each rate being updated, shippingCost and additionalCost information must be included in the request payload even if one field is not being updated (e.g., shippingCost is increasing by $0.50 but additionalCost remains unchanged).

Rates must be listed in numerical order by their rateId.

POSThttps://api.ebay.com/sell/account/v2/rate_table/6******2/update_shipping_cost

Output

A successful call returns an HTTP status code of 204 No Content. There is no response payload.

Sample 3: Update Shipping Costs: rateTableBasis = SURCHARGE

This example illustrates how to update shipping costs for an existing shipping rate table specifying fixed-rate surcharges that are charged by the seller (i.e., rateTableBasis = SURCHARGE).

Input

The rate table for which shipping costs will be updated is specified with the rate_table_id path parameter.

The request payload is an array that specifies the rateId plus updated additionalCost information for each rate being updated.

Note: When rateTableBasis = SURCHARGE, only the additionalCost field is used.

Only those shipping rates that are being updated need to be included in the request payload.

Rates must be listed in numerical order by their rateId.

POSThttps://api.ebay.com/sell/account/v2/rate_table/9******1/update_shipping_cost

Output

A successful call returns an HTTP status code of 204 No Content. There is no response payload.

Got thoughts? Click the feedback button – your insights help us improve!