Delivery quote
const url = 'https://dev-api.infiniteaudience.ai/v1/quote';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"audience_id":"example","destination":"download","template_id":"example","field_list":["example"],"include_unmatched":true,"output_format":"csv","output_compression":"none"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://dev-api.infiniteaudience.ai/v1/quote \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "audience_id": "example", "destination": "download", "template_id": "example", "field_list": [ "example" ], "include_unmatched": true, "output_format": "csv", "output_compression": "none" }'Returns a price estimate for a proposed delivery without executing it. Provide the audience ID, destination, and optionally field_list or template_id (mutually exclusive) to receive a structured cost breakdown and credit balance information. If neither is provided, the Standard IAG attribute set is used. No commitment is made and nothing is stored. Download is the currently active destination; LiveRamp and Narrative return 503 before a quote or billable record is created until their partner pushes are implemented.
Requires ‘discovery’ scope.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
ID of the audience to quote a delivery for.
Intended destination. liveramp and narrative currently return DELIVERY_DESTINATION_UNAVAILABLE without billing.
Enrichment template ID. Only standard_iag is valid. Mutually exclusive with field_list. If neither is provided, the Standard IAG attribute set (all attributes with product_usage containing audience) is used.
Explicit attribute list — every attribute must be a valid audience attribute (see GET /v1/catalog/fields). Mutually exclusive with template_id. If neither is provided, the Standard IAG attribute set is used.
Include unmatched input rows in matched-audience output.
Artifact format being quoted, independent of matched-input format.
Gzip is supported for csv/json/jsonl. Avro uses native DEFLATE and rejects outer gzip.
Responses
Section titled “Responses”Price quote — no commitment made.
object
true if this billing identity (audience composition and segment revisions, resolved fields, unmatched-row policy, and destination) has already been delivered. Artifact format/compression are deliberately excluded, so changing only those axes permits a free re-export.
ID of the persisted quote backing this estimate — fetch it later via GET /v1/campaigns/{id}/quotes for a campaign-linked audience. null when already_delivered is true (a free re-delivery has no pending cost, so nothing is persisted).
object
Base audience-delivery cost.
One-time deferred file-match cost included only until the underlying run is first delivered.
Total surcharge for requested attributes.
Destination surcharge (0 for download).
Sum of all cost components.
Effective cost per record.
Number of records that will be billed.
Current audience size.
Matched subtype only — resolved rows from most recent delivery.
Resolved from the org’s own billing_model, or ‘postpay’ for parent_billed (agency) orgs. Determines which of available_balance/shortfall vs. budget_ceiling/accrued_balance is populated below.
Prepay only — effective credit balance after holds. Null for postpay/agency orgs, which have no credit balance.
Prepay: whether available_balance ≥ total_cost. Postpay/agency: whether this delivery would stay within the org’s/agency’s optional budget ceiling (always true when no ceiling is set).
Prepay only — credits needed beyond current balance (0 when sufficient). Null for postpay/agency.
Postpay/agency only — the org’s configured budget ceiling in USD. Null if unset (unlimited) or for prepay.
Postpay/agency only — accrued USD spend so far this cycle. Null for prepay.
Example
{ "audience_id": "aud_abc123", "subtype": "filter", "destination": "download", "template_id": "standard_iag", "field_list": null, "output_format": "csv", "output_compression": "none", "already_delivered": false, "quote_id": "q_abc123", "cost_estimate": { "base_cost": 0.08, "match_cost": 0, "field_cost": 0.04, "destination_cost": 0, "total_cost": 0.12, "unit_price": 0.0015, "billing_count": 80000 }, "record_count": 80000, "match_count": null, "billing_model": "prepay", "available_balance": 5, "sufficient_balance": true, "shortfall": 0, "budget_ceiling": null, "accrued_balance": null}Invalid request — malformed body, missing required attribute, or failed validation. See error and message for details.
object
Stable machine-readable error code (e.g. INVALID_STATUS_TRANSITION, BILLING_INSUFFICIENT_BALANCE). Always present.
Human-readable explanation of the error.
Alternate machine-readable code — present on some endpoints as an alias for error for backward compatibility.
Opaque support/debug identifier when available.
Examples
{ "error": "Bad Request", "code": "MISSING_SEGMENTS", "message": "segment_ids is required for filter audiences."}Missing or invalid Bearer token. Obtain one via POST /v1/auth/token. When a token was supplied but rejected, code distinguishes TOKEN_EXPIRED (the token’s lifetime has passed — request a new one via POST /v1/auth/token and retry) from TOKEN_INVALID (malformed or revoked — re-authenticate).
object
Stable machine-readable error code (e.g. INVALID_STATUS_TRANSITION, BILLING_INSUFFICIENT_BALANCE). Always present.
Human-readable explanation of the error.
Alternate machine-readable code — present on some endpoints as an alias for error for backward compatibility.
Opaque support/debug identifier when available.
Examples
{ "error": "Unauthorized: Missing or invalid Authorization header"}{ "error": "Unauthorized", "code": "TOKEN_EXPIRED", "message": "Your session has expired. Please sign in again."}Token is valid but lacks the required scope for this endpoint. Check the endpoint description for the required scope (discovery, purchase, or account).
object
Stable machine-readable error code (e.g. INVALID_STATUS_TRANSITION, BILLING_INSUFFICIENT_BALANCE). Always present.
Human-readable explanation of the error.
Alternate machine-readable code — present on some endpoints as an alias for error for backward compatibility.
Opaque support/debug identifier when available.
Examples
{ "error": "SCOPE_REQUIRED", "message": "This endpoint requires the purchase scope."}Resource not found or not accessible to the calling org.
object
Stable machine-readable error code (e.g. INVALID_STATUS_TRANSITION, BILLING_INSUFFICIENT_BALANCE). Always present.
Human-readable explanation of the error.
Alternate machine-readable code — present on some endpoints as an alias for error for backward compatibility.
Opaque support/debug identifier when available.
Examples
{ "error": "Audience not found"}A required billing provider integration is temporarily unavailable.
object
Stable machine-readable error code (e.g. INVALID_STATUS_TRANSITION, BILLING_INSUFFICIENT_BALANCE). Always present.
Human-readable explanation of the error.
Alternate machine-readable code — present on some endpoints as an alias for error for backward compatibility.
Opaque support/debug identifier when available.
Examplegenerated
{ "error": "example", "message": "example", "code": "example", "request_id": "example"}