202 and report problems later as a reason.
Account links error format
The endpoints you host define their own error formats. A business error from the account links API returns this envelope:- Branch on
error.code. Usemessagefor logs only, and never show it to a customer. - Log
requestId, and quote it when you contact Bilt. It is empty on credential refusals and absent when the request had no trace. - Bilt does not echo an
x-request-idyou send. - Parse leniently, and decide retries from the code.
retryis alwaysfalse.
400 that fails validation has a different shape, with violations instead of error.code. Malformed JSON returns neither shape. A POST without Content-Type: application/json returns 415. Check the status code before you parse the body.
Error codes
These codes match theErrorCode enum in the spec.
“New token” means the request can succeed only after you mint a fresh id_token. Never resend the same body, and cap these retries at one.
An IdP outage can also show up as
401 INVALID_ID_TOKEN. Retry once with a fresh token, then alert.
Account links retry rules
Retry502, 409 CONCURRENT_UPDATE, and timeouts with exponential backoff. Send up to three tries, starting at about one second, and send the identical body each time. Do not retry a 500.
For create a link, the same token and
partnerUserId return 200 while the link is active, and 409 ID_TOKEN_REPLAYED after it ends. A different partnerUserId also returns ID_TOKEN_REPLAYED. A failure before Bilt commits the link does not spend the token.
A 404 from get a link means the account is not linked. It never means you should start over while a create request is still in flight.
Conflicts shown to customers
ALREADY_LINKED and IDENTITY_ALREADY_LINKED are not retryable. Tell the customer that their Bilt account, or this account, is already linked elsewhere. Both clear as soon as the other link ends.
Order reports HTTP responses
Report an order event and Report a batch answer before they check the content. They have no error body.Signature failures
Bilt checks the signature after the202. A failed request is not processed, and Bilt does not retry it. See Sign your requests.
Order report reasons
Every event endsACCEPTED, HELD, or REJECTED. A held or rejected event has one of these reasons. Held events are checked again by Bilt. Rejected events are final: fix them and send a new request. See Handle rejections and resends.
Bilt also rejects with
VALIDATION_FAILED an event dated more than 90 days ago or more than one hour in the future.