Skip to main content

Payload reference

Compact lookup table of every event Osigu emits. Use this page as a quick reference; click through for the full payload shape and the "what to do" guidance.

Full event-type catalogue

event_typeFamilyTriggerFull payload
authorization.createdAuthorizationsSponsor approved a PENDING_SPONSOR requestauthorization.created
authorization.rejectedAuthorizationsSponsor denied a requestauthorization.rejected
authorization.updatedAuthorizationsSponsor modified an existing authorizationauthorization.updated
authorization.voidedAuthorizationsAuthorization cancelled (provider / sponsor / expiry)authorization.voided
dispensing.startedDispensingPharmacy called startDispensationdispensing.started
dispensing.completedDispensingDispensation finaliseddispensing.completed
dispensing.cancelledDispensingSTARTED dispensation voideddispensing.cancelled
prescription.issuedPrescriptionsPrescription created (any version)prescription.issued
prescription.email_deliveredPrescriptionsNotification email accepted by receiverprescription.email_delivered
prescription.email_failedPrescriptionsNotification email bouncedprescription.email_failed
settlement.paidSettlementsDominican Republic sponsor paid a batch
settlement.rejectedSettlementsSponsor rejected a batch
settlement.partially_acceptedSettlementsMixed outcome per claim

settlement.* events are documented in the Submit a settlement batch guide.

Envelope fields

Every event, regardless of family, carries the same top-level shape. Recap:

FieldTypeDescription
event_idstringUnique, stable — use for dedupe.
event_typestringDot-namespaced type.
created_atISO 8601Emission time.
api_versiondateEnvelope schema version.
environmentsandbox | productionSource environment.
dataobjectFamily-specific payload.
providerobject{ provider_id, provider_slug } — the provider the event scopes to.

Type sniffing quickly

Common routing patterns:

// Prefix match on family
switch (event.event_type.split('.')[0]) {
case 'authorization': return handleAuth(event);
case 'dispensing': return handleDispense(event);
case 'prescription': return handleRx(event);
case 'settlement': return handleSettle(event);
default: return log('unknown event', event.event_type);
}

// Exact match
if (event.event_type === 'dispensing.completed') { /* ... */ }

// Glob-style
if (event.event_type.startsWith('authorization.')) { /* ... */ }

Field additivity

Fields inside data may be added at any time — we only bump api_version for breaking changes (removals or semantic changes). Design your parser to ignore unknown fields.