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
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
Parameter | Type | Description |
---|---|---|
rate_table_id | string | This 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.
Header | Type | Description |
---|---|---|
Content-Type | string | This 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 clipboardRequest fields
Input container/field | Type | Description |
---|---|---|
rates | array of RateUpdate | An array of rate objects for which shippingCost and/or additionalCost are to be updated. Occurrence: Required |
rates.additionalCost | Amount | An additional shipping cost added to the base shipping rate (i.e., shippingCost).
Occurrence: Conditional |
rates.additionalCost.currency | CurrencyCodeEnum | The base currency applied to the value field to establish a monetary amount. Occurrence: Optional |
rates.additionalCost.value | string | The monetary amount in the specified currency. Occurrence: Optional |
rates.rateId | string | The identifier for the rate object. Occurrence: Required |
rates.shippingCost | Amount | This is the base shipping rate for an item.
Occurrence: Conditional |
rates.shippingCost.currency | CurrencyCodeEnum | The base currency applied to the value field to establish a monetary amount. Occurrence: Optional |
rates.shippingCost.value | string | 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.
Status | Meaning |
---|---|
204 | No Content |
400 | Bad Request |
404 | Not Found |
409 | Conflict |
500 | Internal Server Error |
Error codes
For more on errors, plus the codes of other common errors, see Handling errors.
Code | Domain | Category | Meaning |
---|---|---|---|
394001 | API_ACCOUNT | REQUEST | The 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 |
394004 | API_ACCOUNT | REQUEST | Please specify at least one shipping rate entry to add/update through the rates array. |
394007 | API_ACCOUNT | REQUEST | Please specify the rateId value for one or more shipping rate entries being updated. |
394008 | API_ACCOUNT | REQUEST | The shippingCost containers are missing for one or more shipping rate entries. Please provide the shipping cost values for the shipping rate entries being updated. |
394009 | API_ACCOUNT | REQUEST | The specified shipping cost currency does not match the currency used for the marketplace. |
394011 | API_ACCOUNT | REQUEST | The 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. |
394012 | API_ACCOUNT | REQUEST | The specified additional cost currency does not match the currency used for the marketplace. |
394015 | API_ACCOUNT | REQUEST | The number of rate entries must be less than or equal to the existing data. |
394025 | API_ACCOUNT | REQUEST | The shipping cost value is invalid. |
394026 | API_ACCOUNT | REQUEST | The additional cost value is invalid. |
394035 | API_ACCOUNT | REQUEST | The shipping cost is not supported in surcharge calculation type. |
394036 | API_ACCOUNT | REQUEST | Additional costs are not applicable for shipping rate tables based on shipping item. Please remove the additional cost container. |
394041 | API_ACCOUNT | REQUEST | The rateId of rates is repeated. |
395000 | API_ACCOUNT | APPLICATION | There 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.