POST/offer/get_listing_fees
This call is used to retrieve the expected listing fees for up to 250 unpublished offers. An array of one or more offerId values are passed in under the offers container.
In the response payload, all listing fees are grouped by eBay marketplace, and listing fees per offer are not shown. A fees container will be returned for each eBay marketplace where the seller is selling the products associated with the specified offers.
Errors will occur if the seller passes in offerIds that represent published offers, so this call should be made before the seller publishes offers with the publishOffer.
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.
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. Its 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.inventory.readonly
https://api.ebay.com/oauth/api_scope/sell.inventory
See OAuth access tokens for more information.
Request payload
Copy complete valid JSON to clipboardRequest fields
Input container/field | Type | Description |
---|---|---|
offers | array of OfferKeyWithId | This container is used to identify one or more (up to 250) unpublished offers for which expected listing fees will be retrieved. The user passes one or more offerId values (maximum of 250) in to this container to identify the unpublished offers in which to retrieve expected listing fees. This call is only applicable for offers in the unpublished state. Occurrence: Required |
offers.offerId | string | The unique identifier of an unpublished offer for which expected listing fees will be retrieved. One to 250 offerId values can be passed in to the offers container for one getListingFees call. Occurrence: Required |
Output
HTTP response headers
This call has no response headers.
Response payload
Response fields
Output container/field | Type | Description |
---|---|---|
feeSummaries | array of FeeSummary | This container consists of an array of one or more listing fees that the seller can expect to pay for unpublished offers specified in the call request. Many fee types will get returned even when they are Occurrence: Always |
feeSummaries.fees | array of Fee | This container is an array of listing fees that can be expected to be applied to an offer on the specified eBay marketplace (marketplaceId value). Many fee types will get returned even when they are Occurrence: Always |
feeSummaries.fees.amount | Amount | This dollar value in this container is the actual dollar value of the listing fee type specified in the feeType field. Occurrence: Always |
feeSummaries.fees.amount.currency | string | A three-digit string value representing the type of currency being used. Both the value and currency fields are required/always returned when expressing prices. Occurrence: Conditional |
feeSummaries.fees.amount.value | string | A string representation of a dollar value expressed in the currency specified in the currency field. Both the value and currency fields are required/always returned when expressing prices. Occurrence: Conditional |
feeSummaries.fees.feeType | string | The value returned in this field indicates the type of listing fee that the seller may incur if one or more unpublished offers (offers are specified in the call request) are published on the marketplace specified in the marketplaceId field. Applicable listing fees will often include things such as Occurrence: Always |
feeSummaries.fees.promotionalDiscount | Amount | The dollar value in this container indicates any eBay promotional discount applied toward the listing fee type specified in the feeType field. If there was no discount applied toward the fee, this container is still returned but its value is Occurrence: Conditional |
feeSummaries.fees.promotionalDiscount.currency | string | A three-digit string value representing the type of currency being used. Both the value and currency fields are required/always returned when expressing prices. Occurrence: Conditional |
feeSummaries.fees.promotionalDiscount.value | string | A string representation of a dollar value expressed in the currency specified in the currency field. Both the value and currency fields are required/always returned when expressing prices. Occurrence: Conditional |
feeSummaries.marketplaceId | MarketplaceEnum | This is the unique identifier of the eBay site for which listing fees for the offer are applicable. Occurrence: Always |
feeSummaries.warnings | array of ErrorDetailV3 | This container will contain an array of errors and/or warnings when a call is made, and errors and/or warnings occur. Occurrence: Conditional |
feeSummaries.warnings.category | string | This string value indicates the error category. There are three categories of errors: request errors, application errors, and system errors. Occurrence: Conditional |
feeSummaries.warnings.domain | string | The name of the domain in which the error or warning occurred. Occurrence: Conditional |
feeSummaries.warnings.errorId | integer | A unique code that identifies the particular error or warning that occurred. Your application can use error codes as identifiers in your customized error-handling algorithms. Occurrence: Conditional |
feeSummaries.warnings.inputRefIds | array of string | An array of one or more reference IDs which identify the specific request element(s) most closely associated to the error or warning, if any. Occurrence: Conditional |
feeSummaries.warnings.longMessage | string | A detailed description of the condition that caused the error or warning, and information on what to do to correct the problem. Occurrence: Conditional |
feeSummaries.warnings.message | string | A description of the condition that caused the error or warning. Occurrence: Conditional |
feeSummaries.warnings.outputRefIds | array of string | An array of one or more reference IDs which identify the specific response element(s) most closely associated to the error or warning, if any. Occurrence: Conditional |
feeSummaries.warnings.parameters | array of ErrorParameterV3 | Various warning and error messages return one or more variables that contain contextual information about the error or waring. This is often the field or value that triggered the error or warning. Occurrence: Conditional |
feeSummaries.warnings.parameters.name | string | This type contains the name and value of an input parameter that contributed to a specific error or warning condition. Occurrence: Conditional |
feeSummaries.warnings.parameters.value | string | This is the actual value that was passed in for the element specified in the name field. Occurrence: Conditional |
feeSummaries.warnings.subdomain | string | The name of the subdomain in which the error or warning occurred. Occurrence: Conditional |
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 |
---|---|
200 | Success |
400 | Bad Request |
404 | Not Found |
500 | Internal Server Error |
Error codes
For more on errors, plus the codes of other common errors, see Handling errors.
Code | Domain | Category | Meaning |
---|---|---|---|
25001 | API_INVENTORY | APPLICATION | A system error has occurred. {additionalInfo} |
25709 | API_INVENTORY | REQUEST | Invalid value for {fieldName}. {additionalInfo} |
25754 | API_INVENTORY | REQUEST | One or more provided offerId(s) are invalid. All offerId(s) in the request should belong to an inventoryItem or inventoryItemGroup for a specific marketplaceId and format. |
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: Retrieve Expected Listing Fees
This call retrieves expected listing fees per eBay marketplace for the unpublished offers that are specified in the request payload.
Input
Two offerId values are passed in under the offers container. The expected listing fees for these unpublished offers are returned in the response.
POSThttps://api.ebay.com/sell/inventory/v1/offer/get_listing_fees
Output
As you can see from the output, one of the offers will be published to the eBay US site, and the other will be published to the eBay UK site. The seller can expect to have an insertion fee and a subtitle fee for both of these offers.