Skip to main content
Every taggun.api.* operation is listed below with parameter shapes and return types from the plugin Zod schemas.
New to Corsair? See API access, authentication, and error handling.

Campaigns

create

campaigns.create Store a new set of validation rules under a campaign ID you choose; rejected if that ID already exists Risk: write
Input The campaign ID is yours to choose, up to 50 characters. At least one rule section is needed, or the campaign validates nothing. balanceOwing.max must be above zero: Taggun skips the comparison when it is 0.
Output

delete

campaigns.delete Remove a campaign’s validation rules permanently; later submissions against that campaign cannot evaluate them Risk: destructive · Irreversible
Input Permanently removes the campaign rules. Submit nothing against that campaign afterwards, since the removed rules cannot be evaluated. Output

get

campaigns.get Read one campaign’s stored validation rules; sections with no rules may be omitted from the answer Risk: read
Input Sections with no rules are omitted from the response, so a campaign with only a date window returns just date. Output

list

campaigns.list List the campaign IDs that have validation settings stored on the account; needs the Campaign Validation feature Risk: read
Input: empty object Returns a bare array of campaign IDs. An account without Campaign Validation enabled gets a 400 naming the feature rather than an empty list. Output: string[]

update

campaigns.update Replace a campaign’s stored validation rules wholesale: every section left out is removed, so re-send the response from campaigns.get with your changes Risk: destructive · Irreversible
Input Replaces the stored rules wholesale: every section left out is removed. Read the current rules with campaigns.get and re-send them with your changes.
Output

validateFile

campaigns.validateFile Check an uploaded receipt against a campaign’s stored rules and return pass/fail per rule; a failed rule is a successful call reporting successful: false Risk: write
Input A failed rule is a successful call reporting successful: false with failedValidations, not an error. Each call is one billable scan. Output

validateUrl

campaigns.validateUrl Check a receipt at an HTTPS URL against a campaign’s stored rules; a failed rule is a successful call reporting successful: false Risk: write
Input Validates against the rules stored under campaignId. A failed rule is a successful call reporting successful: false. Output

Receipt Validation

file

receiptValidation.file Check an uploaded receipt against rules sent with this request, storing nothing; a failed rule is a successful call reporting successful: false Risk: write
Input The inline validation rules travel as a JSON string inside the multipart body, because a form field cannot carry an object. Set required: false on a rule to report its output without letting it affect successful.
Output

url

receiptValidation.url Check a receipt at an HTTPS URL against rules sent with this request, storing nothing; a failed rule is a successful call reporting successful: false Risk: write
Input Nothing is stored: the rules in validation apply to this request only. Set required: false on a rule to report its output without letting it affect successful.
Output

Simple

encoded

simple.encoded Scan a base64-encoded receipt or invoice and return the four core fields; each call is one billable scan Risk: write
Input Output

file

simple.file Scan an uploaded receipt or invoice file and return the four core fields; each call is one billable scan Risk: write
Input The file must be under 20 MB. The request-size limit counts multipart framing, so a file at the limit plus its boundaries is a 413. Output

url

simple.url Scan a receipt at an HTTPS URL and return the four core fields with confidence levels; each call is one billable scan and the receipt is stored unless incognito is set Risk: write
Input Only https URLs are accepted, and localhost, loopback, link-local and private-network hosts are rejected before the request is sent. incognito keeps the receipt out of Taggun storage. Output

Verbose

encoded

verbose.encoded Scan a base64-encoded receipt or invoice and return the full extraction, including product line items unless extractLineItems is false Risk: write
Input Output

file

verbose.file Scan an uploaded receipt or invoice file and return the full extraction, including product line items unless extractLineItems is false Risk: write
Input The verbose form is the one to evaluate Taggun with: it returns line items, the OCR text and per-field metadata. Output

url

verbose.url Scan a receipt at an HTTPS URL and return the full extraction: line items, text, helper arrays, per-field confidence and enabled feature blocks Risk: write
Input extractLineItems defaults to true; set it to false to skip product line items, which is faster and omits entities.productLineItems. Output