To match the API pricing response against the DigiKey website:

  1. Use the Product Details operation of PartSearch API
  2. Validate the request is providing the correct locale information (as set on the website)
  3. 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.

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.

 

HeaderDescription
X-RateLimit-LimitThe maximum number of requests that the consumer is permitted to make per day.
X-RateLimit-RemainingThe 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:

HeaderDescription
Retry-AfterThe seconds until you can retry the request
X-BurstLimit-LimitThe maximum number of requests allowed for the API, number per minute
X-BurstLimit-RemainingThe number of requests remaining in the current rate limit window.
X-BurstLimit-ResetThe seconds until the burst limit window resets
X-BurstLimit-ResetTimeThe 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:

HeaderDescription
Retry-AfterThe seconds until you can retry the request
X-RateLimit-LimitThe maximum number of requests allowed for the API
X-RateLimit-RemainingThe number of requests remaining in the current rate limit window.
X-RateLimit-ResetThe seconds until the exceeded rate limit window resets
X-RateLimit-ResetTimeThe 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 CodeDescription
200 OKSuccessful.
400 Bad RequestBad 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 UnauthorizedThe 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 FoundResource not found.
405 Method Not AllowedThe 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 RequestsToo 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 ErrorServers are not working as expected. The request is probably valid but needs to be requested again later.
503 Service UnavailableService Unavailable.