Search Documentation
Request Headers
Below are request headers for REST and GraphQL APIs.
Common Request Headers
You must supply a set of HTTP headers when making a request to an eBay REST or GraphQL operation. These headers can include both standard HTTP headers and eBay custom headers. All eBay custom headers start with "X-EBAY-C-".
Some eBay custom headers are packed headers, meaning they can contain multiple name/value pairs. The format for a name/value pair is <name>=<value>, and you must separate multiple values in a single header by commas. The following example shows the general format:
X-EBAY-C-PACKED-EXAMPLE: fig=7,bar="quux",value=42
The table below presents the standard request headers that eBay accepts, as well as the custom eBay headers that you can use. Although not all possible request headers are listed in this table (some headers are still in flux), the ones listed here are stable.
Note: All headers should be treated as case-insensitive and must follow RFC standards.
|
HTTP Header |
Required |
Description |
|---|---|---|
|
|
Conditionally required |
Note: This header pairs with the JSON is the default and only format returned in response bodies. Example: |
|
|
Optional |
If the server cannot respond using the value specified in Example: |
|
|
Optional – |
We strongly recommend you include this header in all requests that can potentially return large response payloads. Compression encoding can increase performance by dramatically reducing response-payload size. Currently, Example: |
|
|
Conditionally required |
While recommended for all requests, you must supply this header when you are targeting the specific locale of a marketplace that supports multiple locales. For example:
Note: For the language values and locales supported by the different eBay marketplaces, see Marketplace ID values. Example: |
|
|
Required |
You must supply this request header in each request you make to the eBay REST interfaces. For details, see OAuth access tokens. Example: |
|
|
Conditionally required |
Note: This header pairs with the This header is usually required for all |
|
|
Conditionally required |
This header sets the natural language that will be used in request payload fields that support user-defined text. Supported values for this header include While recommended for all requests, you must supply this header when you are targeting the specific locale of a marketplace that supports multiple locales. For example:
Note: For the language values and locales supported by the different eBay marketplaces, see Marketplace ID values. |
Marketplace ID Values
The following table lists supported Marketplace IDs, their associated countries/regions, the URLs to the marketplaces, and the locales supported by each marketplace:
Note: The following Marketplace ID values can be used as input values for the X-EBAY-C-MARKETPLACE-ID header.
|
Marketplace IDs |
Country/Region |
Marketplace Site |
Locale Support |
|---|---|---|---|
|
|
United States |
https://www.ebay.com |
|
|
|
Austria |
|
|
|
|
Australia |
|
|
|
|
Belgium |
https://www.benl.ebay.be/ (Nederlandse) |
|
|
|
Canada |
https://www.ebay.ca (English) |
|
|
|
Switzerland |
|
|
|
|
Germany |
|
|
|
|
Spain |
|
|
|
|
France |
|
|
|
|
Great Britain |
|
|
|
|
Hong Kong |
|
|
|
|
Ireland |
|
|
|
|
Italy |
|
|
|
|
Malaysia |
|
|
|
|
Netherlands |
|
|
|
|
Philippines |
|
|
|
|
Poland |
|
|
|
|
Singapore |
|
|
|
|
Taiwan |
|
|
|
|
United States |
https://www.ebay.com/motors |
|