Start a comparison
Send your own list inparts: 2 to 6 parts, compared as given. The first is the reference the others are
compared with.
mpn to compare it with its alternates, the list
GET /v1/alternates returns:
mpn or parts, not both. manufacturer is only needed when several companies make a part with
that number: beside mpn in the first shape, inside each part in the second
({"mpn": "NE555N", "manufacturer": "STMicroelectronics"}).
The answer is 202 with the comparison’s id, a Location header pointing at it, and Retry-After: 10.
Idempotency-Key is optional: send a new value for each comparison, and the same value only when retrying
that same comparison after a timeout. The retry returns the comparison the first call started.
When a comparison is refused
Every part you send is checked before anything starts. A refusal names the part in itssummary, and
nothing is started:
400 invalid_request: neither or both ofmpnandparts,partswith fewer than 2 or more than 6 parts, or amanufacturerbesidepartsinstead of inside each part.404 part_not_found: no distributor lists a part number you sent exactly, usually a typo or a partial number.did_you_meancarries listed part numbers that begin with what you sent, when there are any.422 not_a_specific_part: a part you sent is a question, a category or a generic specification, not one part. When it described a class of parts,did_you_meancarries real part numbers to retry with.503 verification_unavailable: we could not confirm a part number is real right now. Retry shortly.
Get the result
ReadGET /v1/compare/{id} after the 10 seconds in Retry-After. While status is still processing, the answer’s
summary and Retry-After give the wait before the next read, 9 seconds:
status ends as complete, with the parts, or failed, when the comparison could not be completed:
submit it again. Every poll counts toward your rate limit. To be told instead of
polling, register a webhook: compare.completed names the comparison when it ends.
What comes back
summaryis one sentence you can relay as it is. When no part to compare with was found, it says so andpartsholds the reference alone.columnsare the specifications chosen for this kind of part. Every part’sspecshas one entry per column: the value its datasheet states, ornullwhen it states none.datasheet_urlis the datasheet the values were read from.partslists the reference first (reference: true,comparison: null), then each part compared with it. For an alternate of the part you sent inmpn,matchis the parts catalogue’s classification, as on alternates; it isnullfor the reference and for your own list.supplyis what distributors hold now, in the same shape as alternates.comparisonholds one verdict per column,stated(the specifications both datasheets state),same_or_covers(how many of those aresameorcovers) and a one-sentencesummary.
What each verdict means
List and delete
GET /v1/compare lists your comparisons, newest first, one
page at a time, the same way as BOMs.
DELETE /v1/compare/{id} removes a comparison and its
results. With a key you created for one of your customers
(Serving your own customers), a customer sees only its own
comparisons.