Purchase Company Credit Report
Buy the latest credit report for one company. This spends your organisation's credits.
Accepted asynchronously: returns 202 with the purchase and a Location header pointing at GET /v1/companies/{company_id}/credit-report, addressed by the company's company_uuid whichever identifier you sent. Poll that URL โ it answers 202 while the purchase is in flight and returns the report itself once it is stored, so there is no job id to keep. company_id is the company's company_uuid OR its Companies-House company_number.
Every accepted purchase is charged when it is accepted, at the flat price, for the latest version Creditsafe holds. If that version turns out to be one your organisation already owns, the purchase still settles stored and the charge is refunded โ credits_reversed_at is set. Read GET โฆ/credit-report first if you only need a report you may already have.
**A second request while a purchase for the same company is in flight is not a second purchase.** It returns 202 with the purchase already running and charges nothing โ the id in the body is the same one. Its credits_charged can still be null if the first request's charge has not landed yet; poll for the settled figures. That holds per company only: a loop over many companies buys, and pays for, every one of them.
Send an ``Idempotency-Key`` header on anything that retries. The in-flight rule above stops protecting you once the first purchase settles, so a client that times out before reading the 202 and retries later buys the report a second time. With the same Idempotency-Key on the retry it does not: the response is 202 with the original purchase in its current state โ possibly already stored โ and nothing is charged. Keys are scoped to your API client and never expire, so generate a fresh one per intended purchase; reusing one for a different company is a 422. A purchase refused with 402 is not bound to its key, so the same key can be retried once you have credits. Without the header the endpoint behaves as described above.
The 402 tells you the numbers. Its problem body carries required (the price of a report) and available (what the organisation had) as decimal strings.
Requires the credit_reports:purchase scope; credit_reports:read does not permit buying. The data is supplied by Creditsafe and licensed to your organisation for its own use โ it may not be redistributed to third parties without prior written consent. Errors: 402 insufficient credits ยท 403 missing that scope ยท 404 no such company ยท 409 a purchase for this company is in progress but could not be returned โ retry shortly ยท 422 a malformed Idempotency-Key, or one already used for a different company.
curl -X POST "https://api.handshaik.com/v1/companies/{company_id}/credit-report-purchases" \
-H "Authorization: Bearer $HANDSHAIK_PUBLIC_API_KEY"Authorization
AuthorizationstringheaderrequiredOAuth2 client_credentials (M2M). Request a token with the
audienceset tohttps://api.handshaik.com.Handshaik's own first-party apps, such as the Chrome extension, instead sign a Handshaik user in with the authorization code flow and PKCE, with the same
audience. Such a token acts as that user, within their organisation. Partner integrations use client_credentials.
Parameters
company_idstringpathrequiredThe company's
id(its UUID) or its Companies-Housecompany_numberโ either is acceptedIdempotency-Keystring | nullheaderA unique value you generate per intended purchase (a UUID is ideal). Repeating it returns the original purchase and charges nothing, however long ago that purchase settled. Send it on every purchase your client may retry
Response
Successful Response
idstring<uuid>requiredThe purchase's id, stable for the life of this purchase attempt
statusenum<string>requiredWhere the purchase has got to โ
queuedandfetchingare in flight,storedmeans the report is bought and readable,failedmeans it is notOne of:queuedfetchingstoredfailedcredit_report_version_idstring<uuid> | nullVersion this purchase resolved to, matching
report.id. Null until it reachesstored, and on a purchase that failedcredits_chargedstring | nullCredits taken from your organisation's balance when the purchase was accepted, as an exact decimal string. Null if nothing has been charged โ on a
queuedpurchase, possibly not yetcredits_charged_atstring<date-time> | nullWhen those credits were taken, in UTC. Null means nothing has been charged for this purchase โ on a
queuedpurchase, possibly not yetcredits_reversed_atstring<date-time> | nullWhen the charge was refunded, in UTC. Set on a
failedpurchase once its refund lands โ null there means the refund is still pending, not that there is none โ and on astoredpurchase that resolved to a version your organisation already ownedfailure_reasonenum<string> | nullWhy a credit-report purchase failed โ the stable code a partner branches on.
Coarser than the provider exceptions behind it by design (DEV-4854): several of those describe our own configuration or rejected credentials, and a code naming either would tell a partner something about our infrastructure. They collapse into
internal_error. The provider's own text never reaches this surface at all.This set is open. Members are added as new failure modes are classified, so render an unrecognised code with a default rather than assuming this list is closed โ a client that switches exhaustively over it will break on the addition.
An independent allowlist rather than the internal
CreditReportFailureReasonimported, per the public-contract rule; a drift test compares the two.One of:company_not_foundprovider_unavailableprovider_errorpurchase_abandonedinternal_erroris_retryableboolean | nullWhether re-submitting this purchase could plausibly succeed. Null unless
statusisfailedโ there is nothing to retry otherwisecreated_atstring<date-time>requiredWhen the purchase was requested, in UTC
updated_atstring<date-time>requiredWhen the purchase last changed state, in UTC
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "queued",
"credit_report_version_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"credits_charged": "700.0000",
"credits_charged_at": "2026-01-15T09:30:00Z",
"credits_reversed_at": "2026-01-15T09:30:00Z",
"failure_reason": "company_not_found",
"is_retryable": true,
"created_at": "2026-01-15T09:30:00Z",
"updated_at": "2026-01-15T09:30:00Z"
}