To match the API pricing response against the DigiKey website:
- Use the Product Details operation of PartSearch API
- Validate the request is providing the correct locale information (as set on the website)
- Validate the request is providing the same Customer ID in the API request (as signed in with on the DigiKey website)
This is the only process that will give the exact pricing for a part.
Make request to:
/Search/v3/Products/p5555-nd
Update the API request with locale information:
--header 'x-digikey-locale-currency: REPLACE_THIS_VALUE'
--header 'x-digikey-locale-language: REPLACE_THIS_VALUE'
--header 'x-digikey-locale-shiptocountry: REPLACE_THIS_VALUE'
--header 'x-digikey-locale-site: REPLACE_THIS_VALUE'
To match the API pricing response against the DigiKey website:
- Use the Product Details operation of PartSearch API
- Validate the request is providing the correct locale information (as set on the website)
- Validate the request is providing the same Customer ID in the API request (as signed in with on the DigiKey website)
This is the only process that will give the exact pricing for a part.
Make request to:
/Search/v3/Products/p5555-nd
Update the API request with locale information:
--header 'x-digikey-locale-currency: REPLACE_THIS_VALUE' --header 'x-digikey-locale-language: REPLACE_THIS_VALUE' --header 'x-digikey-locale-shiptocountry: REPLACE_THIS_VALUE' --header 'x-digikey-locale-site: REPLACE_THIS_VALUE'
When using the developer portal testing tool, you will receive a 400 error when all required fields for the header are not entered, or a malformed message.
When using the developer portal testing tool, you will receive a 400 error when all required fields for the header are not entered, or a malformed message.
Most likely this is do to the version of the TLS protocol being used. Please make sure your application is using TLSv1.2.
Most likely this is do to the version of the TLS protocol being used. Please make sure your application is using TLSv1.2.
Every API response is accompanied by the following set of headers to identify the status of the client application's consumption.
Header Description X-RateLimit-Limit
The maximum number of requests that the consumer is permitted to make per day. X-RateLimit-Remaining
The number of requests remaining in the current rate limit window.
Once an application exceeds the rate limit window, the application will receive a status code of:
429 Too Many Requests
When the burst limit is exceeded the response headers change to:
Header Description Retry-After The seconds until you can retry the request X-BurstLimit-Limit The maximum number of requests allowed for the API, number per minute X-BurstLimit-Remaining The number of requests remaining in the current rate limit window. X-BurstLimit-Reset The seconds until the burst limit window resets X-BurstLimit-ResetTime The time when the burst limit window resets, GMT
and a JSON response message like:
{
"ErrorResponseVersion": "3.0.0.0",
"StatusCode": 429,
"ErrorMessage": "BurstLimit exceeded",
"ErrorDetails": "Please try again after the number of seconds in the Retry-After header",
"RequestId": "fa3e4d88-bfc4-4565-c6d5-a567633c091b",
"ValidationErrors": []
}
When the daily limit is exceeded the response headers change to:
Header Description Retry-After The seconds until you can retry the request X-RateLimit-Limit The maximum number of requests allowed for the API X-RateLimit-Remaining The number of requests remaining in the current rate limit window. X-RateLimit-Reset The seconds until the exceeded rate limit window resets X-RateLimit-ResetTime The time when the rate limit window resets, GMT
and a JSON response message like:
{
"ErrorResponseVersion": "3.0.0.0",
"StatusCode": 429,
"ErrorMessage": "Daily Ratelimit exceeded",
"ErrorDetails": "Please try again after the number of seconds in the Retry-After header",
"RequestId": "f4a0c1ab-8b47-4a72-e010-8ebe5d78f96c",
"ValidationErrors": []
}
Every API response is accompanied by the following set of headers to identify the status of the client application's consumption.
Header | Description |
---|---|
X-RateLimit-Limit | The maximum number of requests that the consumer is permitted to make per day. |
X-RateLimit-Remaining | The number of requests remaining in the current rate limit window. |
Once an application exceeds the rate limit window, the application will receive a status code of:
429 Too Many Requests
When the burst limit is exceeded the response headers change to:
Header | Description |
---|---|
Retry-After | The seconds until you can retry the request |
X-BurstLimit-Limit | The maximum number of requests allowed for the API, number per minute |
X-BurstLimit-Remaining | The number of requests remaining in the current rate limit window. |
X-BurstLimit-Reset | The seconds until the burst limit window resets |
X-BurstLimit-ResetTime | The time when the burst limit window resets, GMT |
and a JSON response message like:
{ "ErrorResponseVersion": "3.0.0.0", "StatusCode": 429, "ErrorMessage": "BurstLimit exceeded", "ErrorDetails": "Please try again after the number of seconds in the Retry-After header", "RequestId": "fa3e4d88-bfc4-4565-c6d5-a567633c091b", "ValidationErrors": [] }
When the daily limit is exceeded the response headers change to:
Header | Description |
---|---|
Retry-After | The seconds until you can retry the request |
X-RateLimit-Limit | The maximum number of requests allowed for the API |
X-RateLimit-Remaining | The number of requests remaining in the current rate limit window. |
X-RateLimit-Reset | The seconds until the exceeded rate limit window resets |
X-RateLimit-ResetTime | The time when the rate limit window resets, GMT |
and a JSON response message like:
{ "ErrorResponseVersion": "3.0.0.0", "StatusCode": 429, "ErrorMessage": "Daily Ratelimit exceeded", "ErrorDetails": "Please try again after the number of seconds in the Retry-After header", "RequestId": "f4a0c1ab-8b47-4a72-e010-8ebe5d78f96c", "ValidationErrors": [] }
HTTP Status Code Description 200 OK
Successful. 400 Bad Request
Bad input parameter. Error message should indicate which one and why. Somehow your client request is malformed/invalid. Also possible, but less likely, the requested part has not been found. 401 Unauthorized
The client passed in the invalid access token. Client should refresh the token and then try again. Or you have not subscribed the client application to a DK API product. 404 Not Found
Resource not found. 405 Method Not Allowed
The resource doesn't support the specified HTTP verb. You are making a request in a format that is not expected. Example is making a GET request when the data needs to be presented as POST. 429 Too Many Requests
Too many request for rate limiting. Too many requests in a given period of time (>120 per minute), or more than allowed during the current rate limit window. 500 Internal Server Error
Servers are not working as expected. The request is probably valid but needs to be requested again later. 503 Service Unavailable
Service Unavailable.
HTTP Status Code | Description |
---|---|
200 OK | Successful. |
400 Bad Request | Bad input parameter. Error message should indicate which one and why. Somehow your client request is malformed/invalid. Also possible, but less likely, the requested part has not been found. |
401 Unauthorized | The client passed in the invalid access token. Client should refresh the token and then try again. Or you have not subscribed the client application to a DK API product. |
404 Not Found | Resource not found. |
405 Method Not Allowed | The resource doesn't support the specified HTTP verb. You are making a request in a format that is not expected. Example is making a GET request when the data needs to be presented as POST. |
429 Too Many Requests | Too many request for rate limiting. Too many requests in a given period of time (>120 per minute), or more than allowed during the current rate limit window. |
500 Internal Server Error | Servers are not working as expected. The request is probably valid but needs to be requested again later. |
503 Service Unavailable | Service Unavailable. |