Skip to main content
Some lookups are naturally done in bulk: you have a list of radicados, cédulas, or NITs and want them all at once. Batch endpoints take an array of inputs, resolve them concurrently on Croma’s side, and return one result per item, so you make a single call instead of looping.
Batch is an addition, not a replacement. The single-item endpoint stays the simplest path for one lookup. Reach for batch when you have a list.

Which endpoints support batch?

More batch endpoints are rolling out. Each follows the exact shape on this page, so once you integrate one you’ve integrated them all.

Request shape

A batch body is always { "items": [ … ] }, where each item is the same body the single endpoint takes. Send between 1 and 50 items.

Response shape

A batch always returns 200 with a results array (in the same order as your items) and a summary:

Partial failure

A single bad item never fails the whole batch. If one radicado’s upstream lookup errors, that item comes back with status: "error" while the rest still resolve. Always iterate results and check each item’s status. There are two distinct layers to handle:
Validation errors fail the whole request; upstream errors are per-item.
  • A malformed item (for example a registration_number that isn’t 20-25 digits) is rejected up front with a 400 and a param like items.0.registration_number. Nothing runs.
  • A well-formed item whose upstream lookup fails comes back inside results as status: "error", with the batch itself still 200.
TypeScript

Limits and behavior

  • Up to 50 items per request. More than that is rejected with a 400.
  • Each item counts as one request against your quota. A 10-item batch consumes 10 from your rate limit, the same as 10 single calls, so a batch that would exceed your remaining quota returns 429.
  • Duplicates are deduped. The same input twice in one batch is fetched once; both positions get the result.
  • Cache is shared with the single endpoint. An item you looked up recently (single or batch) comes back with cache_hit: true.

Rate limits

How per-item quota and the X-RateLimit-* headers work.

Errors

The error envelope and every error code.