This page is generated from the contract (data/gateway-v1.json): each operation shows its verb, path, parameters, body, responses, whether it carries an Idempotency-Key, and the equivalent method in all five SDKs. For the end-to-end flow with complete examples, see the implementation guide.

Operations in tag affiliates #

Contract description: Affiliate base cross-check, ingestion and file upload.

MethodPathOperationScopeIdem.
POST/v1/gateway/affiliates/Cross / register the affiliate baseaffiliates:upsertrecommended
POST/v1/gateway/affiliates/upload/Upload affiliates from a file (CSV / Excel)affiliates:upsertrecommended
GET/v1/gateway/affiliates/{document}/Cross-check an affiliate by documentaffiliates:read—

Cross / register the affiliate base #

POST/v1/gateway/affiliates/

  • operationId crossAffiliates
  • Authentication X-API-Key · scope affiliates:upsert
  • Idempotency-Key recommended (the SDK generates it)
Bulk register or update affiliate records (ingestion, not management).

Parameters

NameInTypeDescription
Idempotency-KeyheaderstringClient-generated key that makes a write safely retryable. Replaying the same key returns the original result with idempotent_replay: true; a replay while the original is still in flight returns 409. E.g.: horizonte-2026-06-26-credit-000123

Request body

Content type: application/json · required

List (array) of AffiliateRecordIn .

Responses

CodeDescriptionBody
200Batch processed.TransactionEnvelope application/json
Possible errors (400, 401, 403, 404, 409, 422, 429, 500, 502) — application/problem+json
400Malformed request.about:blank
401Missing or invalid API key.about:blank
403The key is valid but lacks the required scope, or the source IP is not allow-listed.about:blank
404The requested resource does not exist.about:blank
409Idempotency conflict — same key, original still processing.https://errors.compense.co/gateway/idempotency-conflict
422Request body failed validation.https://errors.compense.co/gateway/validation
429Per-key rate limit or monthly quota exceeded; see Retry-After.https://errors.compense.co/gateway/rate-limited
500Unexpected gateway error; quote the trace_id to support.about:blank
502The processing engine returned an error.https://errors.compense.co/gateway/upstream-error

See problem+json errors for the equivalent exception in each SDK.

Example

SDK method and HTTP request
client.affiliates.cross()

Each SDK's methods come from its contract parity suite. The cURL runs against the sandbox; <field> values are placeholders.

Upload affiliates from a file (CSV / Excel) #

POST/v1/gateway/affiliates/upload/

  • operationId uploadAffiliatesFile
  • Authentication X-API-Key · scope affiliates:upsert
  • Idempotency-Key recommended (the SDK generates it)

Parameters

NameInTypeDescription
Idempotency-KeyheaderstringClient-generated key that makes a write safely retryable. Replaying the same key returns the original result with idempotent_replay: true; a replay while the original is still in flight returns 409. E.g.: horizonte-2026-06-26-credit-000123

Request body

Content type: multipart/form-data · required

FieldTypeDescription
file requiredstring (binary)CSV or XLSX, max 25 MB.

Responses

CodeDescriptionBody
200File parsed and batch processed.TransactionEnvelope application/json
Possible errors (400, 401, 403, 404, 409, 422, 429, 500, 502) — application/problem+json
400Malformed request.about:blank
401Missing or invalid API key.about:blank
403The key is valid but lacks the required scope, or the source IP is not allow-listed.about:blank
404The requested resource does not exist.about:blank
409Idempotency conflict — same key, original still processing.https://errors.compense.co/gateway/idempotency-conflict
422Request body failed validation.https://errors.compense.co/gateway/validation
429Per-key rate limit or monthly quota exceeded; see Retry-After.https://errors.compense.co/gateway/rate-limited
500Unexpected gateway error; quote the trace_id to support.about:blank
502The processing engine returned an error.https://errors.compense.co/gateway/upstream-error

See problem+json errors for the equivalent exception in each SDK.

Example

SDK method and HTTP request
client.affiliates.upload()

Each SDK's methods come from its contract parity suite. The cURL runs against the sandbox; <field> values are placeholders.

Cross-check an affiliate by document #

GET/v1/gateway/affiliates/{document}/

  • operationId getAffiliate
  • Authentication X-API-Key · scope affiliates:read
  • Idempotency-Key not applicable

Parameters

NameInTypeDescription
document requiredpathstringNational document number. E.g.: 1032456789

Responses

CodeDescriptionBody
200Affiliate found.AffiliateLookup application/json
Possible errors (400, 401, 403, 404, 409, 422, 429, 500, 502) — application/problem+json
400Malformed request.about:blank
401Missing or invalid API key.about:blank
403The key is valid but lacks the required scope, or the source IP is not allow-listed.about:blank
404The requested resource does not exist.about:blank
409Idempotency conflict — same key, original still processing.https://errors.compense.co/gateway/idempotency-conflict
422Request body failed validation.https://errors.compense.co/gateway/validation
429Per-key rate limit or monthly quota exceeded; see Retry-After.https://errors.compense.co/gateway/rate-limited
500Unexpected gateway error; quote the trace_id to support.about:blank
502The processing engine returned an error.https://errors.compense.co/gateway/upstream-error

See problem+json errors for the equivalent exception in each SDK.

Example

SDK method and HTTP request
client.affiliates.get()

Each SDK's methods come from its contract parity suite. The cURL runs against the sandbox; <field> values are placeholders.