Data Lake Schema

All the tables available to query via our enhanced reports feature.

Each heading below is the name of the database table as it should be spelled in your queries.

contacts

ColumnTypePKFKDescription
idVARCHARYesPostGrid resource ID (returned on creation; used to retrieve later).
createdAtTIMESTAMPTimestamp when the record was created.
updatedAtTIMESTAMPTimestamp when the record was last updated.
descriptionVARCHARFreeform description for your order/campaign (helps you identify the mailing in the dashboard).
metadataJSONArbitrary key–value JSON attached to the object for analytics/segmentation (size-limited).
firstNameVARCHAR
lastNameVARCHAR
emailVARCHAR
phoneNumberVARCHAR
addressLine1VARCHAR
addressLine2VARCHAR
cityVARCHAR
provinceOrStateVARCHAR
postalOrZipVARCHAR
countryCodeVARCHAR
addressStatusVARCHAR
addressErrorsJSON
skipVerificationBOOLEAN
forceVerifiedStatusBOOLEAN

letters

ColumnTypePKFKDescription
idVARCHARYesPostGrid resource ID (returned on creation; used to retrieve later).
createdAtTIMESTAMPTimestamp when the record was created.
updatedAtTIMESTAMPTimestamp when the record was last updated.
descriptionVARCHARFreeform description for your order/campaign (helps you identify the mailing in the dashboard).
metadataJSONArbitrary key–value JSON attached to the object for analytics/segmentation (size-limited).
sendDateTIMESTAMPScheduled print date. Defaults to the next business day if omitted.
from_idVARCHARcontactsSender contact ID (foreign key into contacts).
to_idVARCHARcontactsRecipient contact ID (foreign key into contacts).
userVARCHARUser that created the record (dashboard/API).
statusVARCHAROrder status in the delivery pipeline (e.g., readyprintingprocessed_for_deliverycompleted; cancelled possible).
pageCountINTEGERNumber of pages in the generated mail piece.
trackingNumberVARCHARCarrier tracking number (US orders get a USPS tracking number once processed).
imbStatusVARCHARIntelligent Mail Barcode status (US-only; e.g., entered_mail_stream, out_for_delivery, returned_to_sender).
imbZIPCodeVARCHARZIP code from IMB scan metadata (US-only).
imbDateTIMESTAMPTimestamp of the latest IMB scan (US-only).
expressBOOLEANExpress shipping flag (expedited printing/shipping; extra charge).
mailingClassVARCHARSelected mail class (e.g., First Class vs Standard/Marketing Mail).
mergeVariablesJSONJSON used to populate {{ }} placeholders in templates at render time.
colorBOOLEAN
doubleSidedBOOLEAN
addressPlacementVARCHAR
envelopeVARCHARReturn envelope resource to include with the mailing, if supplied.
returnEnvelopeVARCHAR
sizeVARCHARPrint size/format for this collateral.

postcards

ColumnTypePKFKDescription
idVARCHARYesPostGrid resource ID (returned on creation; used to retrieve later).
createdAtTIMESTAMPTimestamp when the record was created.
updatedAtTIMESTAMPTimestamp when the record was last updated.
descriptionVARCHARFreeform description for your order/campaign (helps you identify the mailing in the dashboard).
metadataJSONArbitrary key–value JSON attached to the object for analytics/segmentation (size-limited).
sendDateTIMESTAMPScheduled print date. Defaults to the next business day if omitted.
from_idVARCHARcontactsSender contact ID (foreign key into contacts).
to_idVARCHARcontactsRecipient contact ID (foreign key into contacts).
userVARCHARUser that created the record (dashboard/API).
statusVARCHAROrder status in the delivery pipeline (e.g., readyprintingprocessed_for_deliverycompleted; cancelled possible).
pageCountINTEGERNumber of pages in the generated mail piece.
trackingNumberVARCHARCarrier tracking number (US orders get a USPS tracking number once processed).
imbStatusVARCHARIntelligent Mail Barcode status (US-only; e.g., entered_mail_stream, out_for_delivery, returned_to_sender).
imbZIPCodeVARCHARZIP code from IMB scan metadata (US-only).
imbDateTIMESTAMPTimestamp of the latest IMB scan (US-only).
expressBOOLEANExpress shipping flag (expedited printing/shipping; extra charge).
mailingClassVARCHARSelected mail class (e.g., First Class vs Standard/Marketing Mail).
mergeVariablesJSONJSON used to populate {{ }} placeholders in templates at render time.
sizeVARCHARPrint size/format for this collateral.

cheques

ColumnTypePKFKDescription
idVARCHARYesPostGrid resource ID (returned on creation; used to retrieve later).
createdAtTIMESTAMPTimestamp when the record was created.
updatedAtTIMESTAMPTimestamp when the record was last updated.
descriptionVARCHARFreeform description for your order/campaign (helps you identify the mailing in the dashboard).
metadataJSONArbitrary key–value JSON attached to the object for analytics/segmentation (size-limited).
sendDateTIMESTAMPScheduled print date. Defaults to the next business day if omitted.
from_idVARCHARcontactsSender contact ID (foreign key into contacts).
to_idVARCHARcontactsRecipient contact ID (foreign key into contacts).
userVARCHARUser that created the record (dashboard/API).
statusVARCHAROrder status in the delivery pipeline (e.g., readyprintingprocessed_for_deliverycompleted; cancelled possible).
pageCountINTEGERNumber of pages in the generated mail piece.
trackingNumberVARCHARCarrier tracking number (US orders get a USPS tracking number once processed).
imbStatusVARCHARIntelligent Mail Barcode status (US-only; e.g., entered_mail_stream, out_for_delivery, returned_to_sender).
imbZIPCodeVARCHARZIP code from IMB scan metadata (US-only).
imbDateTIMESTAMPTimestamp of the latest IMB scan (US-only).
expressBOOLEANExpress shipping flag (expedited printing/shipping; extra charge).
mailingClassVARCHARSelected mail class (e.g., First Class vs Standard/Marketing Mail).
mergeVariablesJSONJSON used to populate {{ }} placeholders in templates at render time.
sizeVARCHARPrint size/format for this collateral.
bankAccountVARCHARBank account used to issue the cheque.
amountINTEGERCheque amount.
currencyCodeVARCHARISO currency code for the cheque (e.g., USD, CAD).
envelopeVARCHARReturn envelope resource to include with the mailing, if supplied.

selfmailers

ColumnTypePKFKDescription
idVARCHARYesPostGrid resource ID (returned on creation; used to retrieve later).
createdAtTIMESTAMPTimestamp when the record was created.
updatedAtTIMESTAMPTimestamp when the record was last updated.
descriptionVARCHARFreeform description for your order/campaign (helps you identify the mailing in the dashboard).
metadataJSONArbitrary key–value JSON attached to the object for analytics/segmentation (size-limited).
sendDateTIMESTAMPScheduled print date. Defaults to the next business day if omitted.
from_idVARCHARcontactsSender contact ID (foreign key into contacts).
to_idVARCHARcontactsRecipient contact ID (foreign key into contacts).
userVARCHARUser that created the record (dashboard/API).
statusVARCHAROrder status in the delivery pipeline (e.g., readyprintingprocessed_for_deliverycompleted; cancelled possible).
pageCountINTEGERNumber of pages in the generated mail piece.
trackingNumberVARCHARCarrier tracking number (US orders get a USPS tracking number once processed).
imbStatusVARCHARIntelligent Mail Barcode status (US-only; e.g., entered_mail_stream, out_for_delivery, returned_to_sender).
imbZIPCodeVARCHARZIP code from IMB scan metadata (US-only).
imbDateTIMESTAMPTimestamp of the latest IMB scan (US-only).
expressBOOLEANExpress shipping flag (expedited printing/shipping; extra charge).
mailingClassVARCHARSelected mail class (e.g., First Class vs Standard/Marketing Mail).
mergeVariablesJSONJSON used to populate {{ }} placeholders in templates at render time.
sizeVARCHARPrint size/format for this collateral.

trackervisits

ColumnTypePKFKDescription
idVARCHARYesPostGrid resource ID (returned on creation; used to retrieve later).
createdAtTIMESTAMPTimestamp when the record was created.
updatedAtTIMESTAMPTimestamp when the record was last updated.
descriptionVARCHARFreeform description for your order/campaign (helps you identify the mailing in the dashboard).
metadataJSONArbitrary key–value JSON attached to the object for analytics/segmentation (size-limited).
trackerVARCHARTracker ID (QR code / PURL definition) that generated this visit.
orderIDVARCHAROrder ID (letter/postcard/cheque/self-mailer) associated with this tracker visit.
deviceVARCHARDevice classification captured for the visit (e.g., mobile/desktop).
ipAddressVARCHARVisitor IP captured for the visit.