snap_pack_base
{
"allOf": [
{
"$ref": "#/components/schemas/editable"
},
{
"type": "object",
"properties": {
"size": {
"$ref": "#/components/schemas/snap_pack_size"
}
}
}
]
}
snap_pack_editable
{
"allOf": [
{
"$ref": "#/components/schemas/snap_pack_base"
},
{
"$ref": "#/components/schemas/input_to"
},
{
"$ref": "#/components/schemas/input_from_us"
},
{
"type": "object",
"required": [
"to",
"inside",
"outside",
"use_type"
],
"properties": {
"color": {
"allOf": [
{
"$ref": "#/components/schemas/color"
},
{
"default": false
}
]
},
"inside": {
"oneOf": [
{
"$ref": "#/components/schemas/html_string"
},
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"$ref": "#/components/schemas/remote_file_url"
},
{
"$ref": "#/components/schemas/local_file_path"
}
],
"description": "The artwork to use as the inside of your snap pack.\n\nNotes:\n- HTML merge variables should not include delimiting whitespace.\n- PDF, PNG, and JPGs must be sized at 8.5\"x11\" at 300 DPI, while supplied HTML will be rendered to the specified `size`.\n- Be sure to leave room for address and postage information by following the template provided here:\n - <a href=\"https://s3.us-west-2.amazonaws.com/public.lob.com/assets/8.5x11_Snappack_template_address.pdf\" target=\"_blank\">8.5x11 snap pack template</a>\n\n\nSee [here](#section/HTML-Examples) for HTML examples.\n"
},
"outside": {
"oneOf": [
{
"$ref": "#/components/schemas/html_string"
},
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"$ref": "#/components/schemas/remote_file_url"
},
{
"$ref": "#/components/schemas/local_file_path"
}
],
"description": "The artwork to use as the outside of your snap pack.\n\nNotes:\n- HTML merge variables should not include delimiting whitespace.\n- PDF, PNG, and JPGs must be sized at 6\"x18\" at 300 DPI, while supplied HTML will be rendered to the specified `size`.\n\nSee [here](#section/HTML-Examples) for HTML examples.\n"
},
"use_type": {
"$ref": "#/components/schemas/snap_pack_use_type"
},
"billing_group_id": {
"$ref": "#/components/schemas/billing_group_id"
}
}
}
]
}
snap_pack_id
{
"type": "string",
"pattern": "^ord_[0-9a-f]{26}$",
"description": "Unique identifier prefixed with `ord_`."
}
snap_pack_size
{
"enum": [
"8.5x11"
],
"type": "string",
"default": "8.5x11",
"description": "Specifies the size of the snap pack."
}
snap_pack_use_type
{
"enum": [
"marketing",
"operational",
null
],
"type": "string",
"nullable": true,
"description": "The use type for each mailpiece. Can be one of marketing, operational, or null. Null use_type is only allowed if an account default use_type is selected in Account Settings. For more information on use_type, see our [Help Center article](https://help.lob.com/print-and-mail/building-a-mail-strategy/managing-mail-settings/declaring-mail-use-type)."
}
state
{
"type": "string",
"maxLength": 2,
"description": "The <a href=\"https://en.wikipedia.org/wiki/ISO_3166-2\" target=\"_blank\">ISO 3166-2</a> two letter code for the state.\n"
}
status
{
"enum": [
"processed",
"rendered",
"failed"
],
"type": "string",
"description": "A string describing the PDF render status:\n* `processed` - the rendering process is currently in progress.\n* `rendered` - a PDF has been successfully rendered of the mailpiece.\n* `failed` - one or more issues has caused the rendering process to fail.\n"
}
street_name
{
"type": "string",
"description": "The name of the street."
}
suggestions
{
"type": "object",
"required": [
"primary_line",
"city",
"state",
"zip_code"
],
"properties": {
"city": {
"$ref": "#/components/schemas/city"
},
"state": {
"$ref": "#/components/schemas/state"
},
"object": {
"enum": [
"us_autocompletion"
],
"type": "string",
"default": "us_autocompletion",
"description": "Value is resource type."
},
"zip_code": {
"allOf": [
{
"description": "Must be formatted as a US ZIP or ZIP+4 (e.g. `94107`, `941072282`, `94107-2282`).\n"
},
{
"$ref": "#/components/schemas/zip_code"
}
]
},
"primary_line": {
"type": "string",
"description": "The primary delivery line (usually the street address) of the address.\nCombination of the following applicable `components` (primary number &\nsecondary information may be missing or inaccurate):\n* `primary_number`\n* `street_predirection`\n* `street_name`\n* `street_suffix`\n* `street_postdirection`\n* `secondary_designator`\n* `secondary_number`\n* `pmb_designator`\n* `pmb_number`\n"
}
}
}
template
{
"type": "object",
"required": [
"id",
"versions",
"published_version"
],
"properties": {
"id": {
"$ref": "#/components/schemas/tmpl_id"
},
"object": {
"enum": [
"template"
],
"type": "string",
"default": "template",
"description": "Value is resource type."
},
"deleted": {
"$ref": "#/components/schemas/deleted"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"versions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/template_version"
},
"description": "An array of all non-deleted [version objects](#tag/Template-Versions) associated with the template."
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"date_created": {
"$ref": "#/components/schemas/date_created"
},
"date_modified": {
"$ref": "#/components/schemas/date_modified"
},
"published_version": {
"allOf": [
{
"description": "The template's currently published version. This version will be used in any Print & Mail API requests that reference the specified template."
},
{
"$ref": "#/components/schemas/template_version"
}
]
}
}
}
template_deletion
{
"properties": {
"id": {
"$ref": "#/components/schemas/tmpl_id"
},
"deleted": {
"$ref": "#/components/schemas/deleted"
}
},
"description": "Lob uses RESTful HTTP response codes to indicate success or failure of an API request. In general, 2xx indicates success, 4xx indicate an input error, and 5xx indicates an error on Lob's end."
}
template_html
{
"type": "string",
"maxLength": 100000,
"description": "An HTML string of less than 100,000 characters to be used as the `published_version` of this template. See [here](#section/HTML-Examples) for guidance on designing HTML templates. Please see endpoint specific documentation for any other product-specific HTML details:\n- [Postcards](#operation/postcard_create) - `front` and `back`\n- [Self Mailers](#operation/self_mailer_create) - `inside` and `outside`\n- [Letters](#operation/letter_create) - `file`\n- [Checks](#operation/check_create) - `check_bottom` and `attachment`\n- [Cards](#operation/card_create) - `front` and `back`\n\nIf there is a syntax error with your variable names within your HTML, then an error will be thrown, e.g. using a `{{#users}}` opening tag without the corresponding closing tag `{{/users}}`.\n"
}
template_required_vars
{
"type": "array",
"items": {
"type": "string"
},
"description": "An array of required variables to be used in a template. Only available for `handlebars` templates.\n"
}
template_update
{
"type": "object",
"properties": {
"description": {
"$ref": "#/components/schemas/resource_description"
},
"published_version": {
"allOf": [
{
"type": "string",
"description": "The ID of the published version of a template you'd like to update. The published version is the one that will be used in any Print & Mail API requests that reference the specified template. Will err if the referenced `published_version` has been deleted or does not exist."
},
{
"$ref": "#/components/schemas/vrsn_id"
}
]
}
}
}
template_version
{
"allOf": [
{
"$ref": "#/components/schemas/template_version_writable"
},
{
"$ref": "#/components/schemas/lob_base"
},
{
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"$ref": "#/components/schemas/vrsn_id"
},
"object": {
"enum": [
"version"
],
"type": "string",
"default": "version",
"description": "Value is resource type."
},
"merge_variables": {
"type": "object",
"description": "Object representing the keys of every merge variable present in the template. It has one key named 'keys', and its value is an array of strings.\n"
},
"suggest_json_editor": {
"type": "boolean",
"description": "Used by frontend, true if the template uses advanced features.\n"
}
}
}
]
}
template_version_deletion
{
"properties": {
"id": {
"$ref": "#/components/schemas/vrsn_id"
},
"deleted": {
"$ref": "#/components/schemas/deleted"
}
},
"description": "Lob uses RESTful HTTP response codes to indicate success or failure of an API request. In general, 2xx indicates success, 4xx indicate an input error, and 5xx indicates an error on Lob's end."
}
template_version_updatable
{
"type": "object",
"properties": {
"engine": {
"$ref": "#/components/schemas/engine"
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"required_vars": {
"$ref": "#/components/schemas/template_required_vars"
}
}
}
template_version_writable
{
"type": "object",
"required": [
"html"
],
"properties": {
"html": {
"$ref": "#/components/schemas/template_html"
},
"engine": {
"$ref": "#/components/schemas/engine"
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"required_vars": {
"$ref": "#/components/schemas/template_required_vars"
}
}
}
template_writable
{
"type": "object",
"required": [
"html"
],
"properties": {
"html": {
"$ref": "#/components/schemas/template_html"
},
"engine": {
"$ref": "#/components/schemas/engine"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"required_vars": {
"$ref": "#/components/schemas/template_required_vars"
}
}
}
thumbnail
{
"type": "object",
"properties": {
"large": {
"$ref": "#/components/schemas/signed_link"
},
"small": {
"$ref": "#/components/schemas/signed_link"
},
"medium": {
"$ref": "#/components/schemas/signed_link"
}
}
}
tmpl_id
{
"type": "string",
"pattern": "^tmpl_[a-zA-Z0-9]+$",
"description": "Unique identifier prefixed with `tmpl_`. ID of a saved [HTML template](#section/HTML-Templates)."
}
to_address_us_chk
{
"allOf": [
{
"$ref": "#/components/schemas/lob_base"
},
{
"type": "object",
"anyOf": [
{
"title": "address obj with `name` defined",
"required": [
"name"
]
},
{
"title": "address obj with `company` defined",
"required": [
"company"
]
}
],
"example": {
"id": "adr_e68217bd744d65c8X",
"name": "HARRY ZHANG",
"email": "harry@lob.com",
"phone": "5555555555",
"object": "address",
"company": "LOB",
"metadata": {},
"address_zip": "94107-1741",
"description": "Harry - Office",
"address_city": "SAN FRANCISCO",
"date_created": "2019-08-12T00:16:00.361Z",
"address_line1": "210 KING ST STE 6100",
"address_line2": null,
"address_state": "CA",
"date_modified": "2019-08-12T00:16:00.361Z",
"address_country": "UNITED STATES",
"recipient_moved": false
},
"required": [
"id",
"address_line1",
"address_city",
"address_state",
"address_zip"
],
"properties": {
"id": {
"$ref": "#/components/schemas/adr_id"
},
"name": {
"type": "string",
"nullable": true,
"maxLength": 40,
"description": "Either `name` or `company` is required, you may also add both. Must be no longer than 40 characters. If both `name` and `company` are provided, they will be printed on two separate lines above the rest of the address.\n"
},
"email": {
"type": "string",
"nullable": true,
"maxLength": 100,
"description": "Must be no longer than 100 characters."
},
"phone": {
"type": "string",
"nullable": true,
"maxLength": 40,
"description": "Must be no longer than 40 characters."
},
"object": {
"enum": [
"address"
],
"type": "string",
"default": "address",
"description": "Value is resource type."
},
"company": {
"type": "string",
"nullable": true,
"maxLength": 40,
"description": "Either `name` or `company` is required, you may also add both. Must be no longer than 40 characters. If both `name` and `company` are provided, they will be printed on two separate lines above the rest of the address. This field can be used for any secondary recipient information which is not part of the actual mailing address (Company Name, Department, Attention Line, etc).\n"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"address_zip": {
"type": "string",
"pattern": "^\\d{5}(-\\d{4})?$",
"description": "Must follow the ZIP format of `12345` or ZIP+4 format of `12345-1234`.\n"
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"address_city": {
"type": "string",
"maxLength": 200
},
"address_line1": {
"type": "string",
"maxLength": 50,
"description": "The primary number, street name, and directional information."
},
"address_line2": {
"type": "string",
"nullable": true,
"maxLength": 50,
"description": "An optional field containing any information which can't fit into line 1."
},
"address_state": {
"type": "string",
"pattern": "^[a-zA-Z]{2}$",
"description": "2 letter state short-name code"
},
"address_country": {
"enum": [
"UNITED STATES"
],
"type": "string",
"maxLength": 13,
"minLength": 13,
"description": "Full name of country"
},
"recipient_moved": {
"type": "boolean",
"nullable": true,
"description": "Only returned for accounts on certain <a href=\"https://dashboard.lob.com/#/settings/editions\" target=\"_blank\">Print & Mail Editions</a>. Value is `true` if the address was altered because the recipient filed for a <a href=\"#tag/National-Change-of-Address\">National Change of Address Linkage (NCOALink)</a>, `false` if the NCOALink check was run but no altered address was found, and `null` if the NCOALink check was not run. The NCOALink check does not happen for non-US addresses, for non-deliverable US addresses, or for addresses created before the NCOALink feature was added to your account.\n"
}
}
}
]
}
tracking_event_base
{
"type": "object",
"required": [
"id",
"date_created",
"date_modified",
"object"
],
"properties": {
"id": {
"$ref": "#/components/schemas/evnt_id"
},
"time": {
"type": "string",
"format": "date-time",
"description": "A timestamp in ISO 8601 format of the date USPS registered the event."
},
"object": {
"allOf": [
{
"$ref": "#/components/schemas/object"
},
{
"enum": [
"tracking_event"
],
"type": "string",
"default": "tracking_event"
}
]
},
"date_created": {
"$ref": "#/components/schemas/date_created"
},
"date_modified": {
"$ref": "#/components/schemas/date_modified"
}
},
"description": "As mail pieces travel through the mail stream, USPS scans their unique barcodes, and Lob processes these mail scans to generate tracking events."
}
tracking_event_certified
{
"allOf": [
{
"$ref": "#/components/schemas/tracking_event_base"
},
{
"type": "object",
"required": [
"type",
"name"
],
"properties": {
"name": {
"enum": [
"Mailed",
"In Transit",
"In Local Area",
"Processed for Delivery",
"Pickup Available",
"Delivered",
"Re-Routed",
"Returned to Sender",
"Issue"
],
"type": "string",
"description": "Name of tracking event for Certified letters. Letters sent with USPS Certified Mail are fully tracked by USPS, therefore their tracking events have an additional details object with more detailed information about the tracking event. Some certified tracking event names have multiple meanings, noted in the list here. See the description of the details object for the full set of combined certified tracking event name meanings.\n\n * `Mailed` - Package has been accepted into the carrier network for delivery.\n\n * `In Transit` - Maps to four distinct stages of transit.\n\n * `In Local Area` - Package is at a location near the end destination.\n\n * `Processed for Delivery` - Maps to two distinct stages of delivery.\n\n * `Pickup Available` - Package is available for pickup at carrier location.\n\n * `Delivered` - Package has been delivered.\n\n * `Re-Routed` - Package has been forwarded.\n\n * `Returned to Sender` - Package is to be returned to sender.\n\n * `Issue` - Maps to (at least) 15 possible issues, some of which are actionable.\n"
},
"type": {
"enum": [
"certified"
],
"type": "string",
"description": "a Certified letter tracking event"
},
"details": {
"$ref": "#/components/schemas/tracking_event_details"
},
"location": {
"type": "string",
"nullable": true,
"description": "The zip code in which the event occurred if it exists, otherwise will be the name of a Regional Distribution Center if it exists, otherwise will be null.\n"
}
}
}
]
}
tracking_event_details
{
"type": "object",
"required": [
"event",
"description",
"action_required"
],
"properties": {
"event": {
"enum": [
"package_accepted",
"package_arrived",
"package_departed",
"package_processing",
"package_processed",
"package_in_local_area",
"delivery_scheduled",
"out_for_delivery",
"pickup_available",
"delivered",
"package_forwarded",
"returned_to_sender",
"address_issue",
"contact_carrier",
"delayed",
"delivery_attempted",
"delivery_rescheduled",
"location_inaccessible",
"notice_left",
"package_damaged",
"package_disposed",
"package_held",
"package_lost",
"package_unclaimed",
"package_undeliverable",
"reschedule_delivery",
"other"
],
"type": "string",
"description": "Find the full table [here](#tag/Tracking-Events). A detailed substatus about the event:\n* `package_accepted` - Package has been accepted into the carrier network for delivery.\n* `package_arrived` - Package has arrived at an intermediate location in the carrier network.\n* `package_departed` - Package has departed from an intermediate location in the carrier network.\n* `package_processing` - Package is processing at an intermediate location in the carrier network.\n* `package_processed` - Package has been processed at an intermediate location.\n* `package_in_local_area` - Package is at a location near the end destination.\n* `delivery_scheduled` - Package is scheduled for delivery.\n* `out_for_delivery` - Package is out for delivery.\n* `pickup_available` - Package is available for pickup at carrier location.\n* `delivered` - Package has been delivered.\n* `package_forwarded` - Package has been forwarded.\n* `returned_to_sender` - Package is to be returned to sender.\n* `address_issue` - Address information is incorrect. Contact carrier to ensure delivery.\n* `contact_carrier` - Contact the carrier for more information.\n* `delayed` - Delivery of package is delayed.\n* `delivery_attempted` - Delivery of package has been attempted. Contact carrier to ensure delivery.\n* `delivery_rescheduled` - Delivery of package has been rescheduled.\n* `location_inaccessible` - Delivery location inaccessible to carrier. Contact carrier to ensure delivery.\n* `notice_left` - Carrier left notice during attempted delivery. Follow carrier instructions on notice.\n* `package_damaged` - Package has been damaged. Contact carrier for more details.\n* `package_disposed` - Package has been disposed.\n* `package_held` - Package held at carrier location. Contact carrier for more details.\n* `package_lost` - Package has been lost. Contact carrier for more details.\n* `package_unclaimed` - Package is unclaimed.\n* `package_undeliverable` - Package is not able to be delivered.\n* `reschedule_delivery` - Contact carrier to reschedule delivery.\n* `other` - Unrecognized carrier status.\n"
},
"notes": {
"type": "string",
"description": "Event-specific notes from USPS about the tracking event."
},
"description": {
"type": "string",
"description": "The description as listed in the description for event."
},
"action_required": {
"type": "boolean",
"description": "`true` if action is required by the end recipient, `false` otherwise.\n"
}
}
}
tracking_event_normal
{
"allOf": [
{
"$ref": "#/components/schemas/tracking_event_base"
},
{
"type": "object",
"required": [
"type",
"name"
],
"properties": {
"name": {
"enum": [
"Mailed",
"In Transit",
"In Local Area",
"Processed for Delivery",
"Delivered",
"Re-Routed",
"Returned to Sender",
"International Exit"
],
"type": "string",
"description": "Name of tracking event (for normal postcards, self mailers, letters, checks and snap packs):\n\n * `Mailed` - The mailpiece has been handed off to and accepted by USPS\n and is en route. <a href=\"https://help.lob.com/print-and-mail/getting-data-and-results/tracking-your-mail#mailed-tracking-events-4\" target=\"_blank\">More about\n Mailed.</a>\n Note this data is only available in Enterprise editions of\n Lob. <a href=\"https://lob.com/support/contact#contact\" target=\"_blank\">Contact Sales</a> if\n you want access to this feature.\n\n * `In Transit` - The mailpiece is being processed at the entry/origin facility.\n\n * `In Local Area` - The mailpiece is being processed at the destination facility.\n\n * `Processed for Delivery` - The mailpiece has been greenlit for\n delivery at the recipient's nearest postal facility. The mailpiece\n should reach the mailbox within 1 business day of this tracking\n event.\n\n * `Delivered` - The mail piece has been delivered to \n the recipient’s address. The final scan is generated when the mail \n carrier's GPS unit leaves the delivery area.\n\n * `Re-Routed` - The mailpiece is re-routed due to recipient change of\n address, address errors, or USPS relabeling of barcode/ID tag\n area.\n\n * `Returned to Sender` - The mailpiece is being returned to sender due\n to barcode, ID tag area, or address errors.\n \n * `International Exit` - The mail piece has been processed to \n ship to a destination abroad. This is typically the last \n scan a US-originated international mail piece will receive \n from the USPS.\n\n<a href=\"https://help.lob.com/print-and-mail/getting-data-and-results/tracking-your-mail#mailed-tracking-events-4\" target=\"_blank\">More about tracking</a>\n"
},
"type": {
"enum": [
"normal"
],
"type": "string",
"description": "non-Certified postcards, self mailers, letters, checks and snap packs"
},
"details": {
"enum": [
null
],
"type": "object",
"nullable": true,
"description": "Will be `null` for `type=normal` events"
},
"location": {
"type": "string",
"nullable": true,
"description": "The zip code in which the scan event occurred. Null for `Mailed` events.\n"
}
}
}
]
}
upl_id
{
"type": "string",
"pattern": "^upl_[a-zA-Z0-9]+$",
"description": "Unique identifier prefixed with `upl_`."
}
upload
{
"allOf": [
{
"$ref": "#/components/schemas/upload_writable"
},
{
"type": "object",
"required": [
"id",
"accountId",
"campaignId",
"requiredAddressColumnMapping",
"optionalAddressColumnMapping",
"metadata",
"mergeVariableColumnMapping",
"mode",
"state",
"totalMailpieces",
"failedMailpieces",
"validatedMailpieces",
"bytesProcessed",
"dateCreated",
"dateModified"
],
"properties": {
"id": {
"$ref": "#/components/schemas/upl_id"
},
"mode": {
"enum": [
"test",
"live"
],
"type": "string",
"description": "The environment in which the mailpieces were created. Today, will only be `live`."
},
"state": {
"$ref": "#/components/schemas/upload_state"
},
"accountId": {
"type": "string",
"title": "Account ID",
"example": "fa9ea650fc7b31a89f92",
"description": "Account ID that made the request"
},
"dateCreated": {
"type": "string",
"title": "Date Created",
"format": "date-time",
"description": "A timestamp in ISO 8601 format of the date the upload was created"
},
"failuresUrl": {
"type": "string",
"title": "Failures URL",
"example": "https://www.example.com",
"description": "Url where your campaign mailpiece failures can be retrieved"
},
"dateModified": {
"type": "string",
"title": "Date Modified",
"format": "date-time",
"description": "A timestamp in ISO 8601 format of the date the upload was last modified"
},
"bytesProcessed": {
"type": "integer",
"title": "Bytes Processed",
"example": 17268,
"description": "Number of bytes processed in your CSV"
},
"totalMailpieces": {
"type": "integer",
"title": "Total Mailpieces",
"example": 100,
"description": "Total number of recipients for the campaign"
},
"failedMailpieces": {
"type": "integer",
"title": "Failed Mailpieces",
"example": 5,
"description": "Number of mailpieces that failed to create"
},
"originalFilename": {
"type": "string",
"title": "Original Filename",
"example": "my_audience.csv",
"description": "Filename of the upload"
},
"validatedMailpieces": {
"type": "integer",
"title": "Validated Mailpieces",
"example": 95,
"description": "Number of mailpieces that were successfully created"
}
}
}
]
}
upload_create_export
{
"type": "object",
"required": [
"message",
"exportId"
],
"properties": {
"message": {
"enum": [
"Export is processing"
],
"type": "string",
"title": "Message",
"default": "Export is processing"
},
"exportId": {
"type": "string",
"title": "Export ID",
"example": "ex_2dafd758ed3da9c43"
}
}
}
upload_file
{
"type": "object",
"required": [
"message",
"filename"
],
"properties": {
"message": {
"enum": [
"File uploaded successfully"
],
"type": "string",
"title": "Message",
"default": "File uploaded successfully"
},
"filename": {
"type": "string",
"title": "Filename"
}
}
}
upload_state
{
"enum": [
"Preprocessing",
"Draft",
"Ready for Validation",
"Validating",
"Scheduled",
"Cancelled",
"Errored"
],
"type": "string",
"title": "Upload State",
"default": "Draft",
"description": "The `state` property on the `upload` object. As the file is processed, the `state` will change from `Ready for Validation` to `Validating` and then will be either `Scheduled` (successfully processed) or `Errored` (Unsuccessfully processed)."
}
upload_updatable
{
"type": "object",
"properties": {
"metadata": {
"$ref": "#/components/schemas/uploads_metadata"
},
"originalFilename": {
"type": "string",
"title": "Original Filename",
"description": "Original filename provided when the upload is created."
},
"mergeVariableColumnMapping": {
"$ref": "#/components/schemas/merge_variable_column_mapping"
},
"optionalAddressColumnMapping": {
"$ref": "#/components/schemas/optional_address_column_mapping"
},
"requiredAddressColumnMapping": {
"$ref": "#/components/schemas/required_address_column_mapping"
}
}
}
upload_writable
{
"type": "object",
"required": [
"campaignId"
],
"properties": {
"metadata": {
"$ref": "#/components/schemas/uploads_metadata"
},
"campaignId": {
"allOf": [
{
"$ref": "#/components/schemas/cmp_id"
},
{
"type": "string",
"example": "cmp_1933ad629bae1408",
"description": "Associated Campaign ID"
}
]
},
"mergeVariableColumnMapping": {
"$ref": "#/components/schemas/merge_variable_column_mapping",
"description": "test"
},
"optionalAddressColumnMapping": {
"$ref": "#/components/schemas/optional_address_column_mapping"
},
"requiredAddressColumnMapping": {
"$ref": "#/components/schemas/required_address_column_mapping"
}
}
}
uploads_metadata
{
"type": "object",
"title": "Metadata",
"default": {
"columns": []
},
"example": {
"columns": [
"recipient_name"
]
},
"required": [
"columns"
],
"properties": {
"columns": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "The list of column names from the csv file which you want associated with each of your mailpieces"
}
},
"description": "The list of column headers in your file as an array that you want as metadata associated with each mailpiece. See our <a href=\"https://help.lob.com/print-and-mail/building-a-mail-strategy/campaign-or-triggered-sends/campaign-audience-guide#required-columns-2\" target=\"_blank\">Campaign Audience Guide</a> for additional details."
}
urbanization
{
"type": "string",
"maxLength": 500,
"description": "Only present for addresses in Puerto Rico. An urbanization refers to an area, sector, or development within a city. See <a href=\"https://pe.usps.com/text/pub28/28api_008.htm#:~:text=I51.,-4%20Urbanizations&text=In%20Puerto%20Rico%2C%20identical%20street,placed%20before%20the%20urbanization%20name.\" target=\"_blank\">USPS documentation</a> for clarification.\n"
}
us_auto_id
{
"type": "string",
"pattern": "^us_auto_[a-zA-Z0-9]+$",
"description": "Unique identifier prefixed with `us_auto_`."
}
us_autocompletions
{
"type": "object",
"properties": {
"id": {
"$ref": "#/components/schemas/us_auto_id"
},
"object": {
"enum": [
"us_autocompletion"
],
"type": "string",
"default": "us_autocompletion",
"description": "Value is resource type."
},
"suggestions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/suggestions"
},
"maxItems": 10,
"minItems": 0,
"description": "An array of objects representing suggested addresses.\n"
}
}
}
us_autocompletions_writable
{
"type": "object",
"required": [
"address_prefix"
],
"properties": {
"city": {
"type": "string",
"description": "An optional city input used to filter suggestions. Case insensitive and does not match partial abbreviations.\n"
},
"state": {
"type": "string",
"description": "An optional state input used to filter suggestions. Case insensitive and does not match partial abbreviations.\n"
},
"zip_code": {
"type": "string",
"description": "An optional ZIP Code input used to filter suggestions. Matches partial entries.\n"
},
"geo_ip_sort": {
"type": "boolean",
"description": "If `true`, sort suggestions by proximity to the IP set in the `X-Forwarded-For` header.\n"
},
"address_prefix": {
"type": "string",
"description": "Only accepts numbers and street names in an alphanumeric format.\n"
}
}
}
us_components
{
"type": "object",
"required": [
"primary_number",
"street_predirection",
"street_name",
"street_suffix",
"street_postdirection",
"secondary_designator",
"secondary_number",
"pmb_designator",
"pmb_number",
"extra_secondary_designator",
"extra_secondary_number",
"city",
"state",
"zip_code",
"zip_code_plus_4",
"zip_code_type",
"delivery_point_barcode",
"address_type",
"record_type",
"default_building_address",
"county",
"county_fips",
"carrier_route",
"carrier_route_type",
"po_box_only_flag"
],
"properties": {
"city": {
"$ref": "#/components/schemas/city"
},
"state": {
"$ref": "#/components/schemas/state"
},
"county": {
"$ref": "#/components/schemas/county"
},
"latitude": {
"type": "number",
"format": "float",
"nullable": true,
"description": "A positive or negative decimal indicating the geographic latitude of the address, specifying the north-to-south position of a location. This should be used with `longitude` to pinpoint locations on a map. Will not be returned for undeliverable addresses or military addresses (state is `AA`, `AE`, or `AP`).\n"
},
"zip_code": {
"type": "string",
"pattern": "^\\d{5}$",
"description": "The 5-digit ZIP code"
},
"longitude": {
"type": "number",
"format": "float",
"nullable": true,
"description": "A positive or negative decimal indicating the geographic longitude of the address, specifying the north-to-south position of a location. This should be used with `latitude` to pinpoint locations on a map. Will not be returned for undeliverable addresses or military addresses (state is `AA`, `AE`, or `AP`).\n"
},
"pmb_number": {
"type": "string",
"description": "Number of a <a href=\"https://en.wikipedia.org/wiki/Commercial_mail_receiving_agency\" target=\"_blank\">CMRA-authorized</a> private mailbox.\n"
},
"county_fips": {
"$ref": "#/components/schemas/county_fips"
},
"record_type": {
"enum": [
"street",
"highrise",
"firm",
"po_box",
"rural_route",
"general_delivery",
""
],
"type": "string",
"description": "A description of the type of address. Populated if a DPV match is made (`deliverability_analysis[dpv_confirmation]`\nis `Y`, `S`, or `D`). For more detailed information about each record type, see\n[US Verification Details](#tag/US-Verification-Types).\n"
},
"street_name": {
"$ref": "#/components/schemas/street_name"
},
"address_type": {
"enum": [
"residential",
"commercial",
""
],
"type": "string",
"description": "Uses USPS's <a href=\"https://www.usps.com/nationalpremieraccounts/rdi.htm\" target=\"_blank\">Residential Delivery Indicator (RDI)</a> to identify\nwhether an address is classified as residential or\nbusiness. Possible values are:\n* `residential` –– The address is residential or a PO Box.\n* `commercial` –– The address is commercial.\n* `''` –– Not enough information provided to be determined.\n"
},
"carrier_route": {
"type": "string",
"description": "A 4-character code assigned to a mail delivery route within a ZIP code.\n"
},
"street_suffix": {
"type": "string",
"description": "The standard USPS abbreviation for the street suffix (`ST`, `AVE`, `BLVD`, etc).\n"
},
"zip_code_type": {
"$ref": "#/components/schemas/zip_code_type"
},
"pmb_designator": {
"type": "string",
"description": "Designator of a <a href=\"https://en.wikipedia.org/wiki/Commercial_mail_receiving_agency\" target=\"_blank\">CMRA-authorized</a> private mailbox.\n"
},
"primary_number": {
"$ref": "#/components/schemas/primary_number"
},
"zip_code_plus_4": {
"allOf": [
{
"description": "The 4-digit ZIP add-on code"
},
{
"$ref": "#/components/schemas/zip_code_plus_4"
}
]
},
"po_box_only_flag": {
"enum": [
"Y",
"N",
""
],
"type": "string",
"description": "Indicates the mailing facility for an address only supports PO Box deliveries and other forms of mail delivery are not available.\n"
},
"secondary_number": {
"type": "string",
"description": "Number of the apartment/unit/etc.\n"
},
"carrier_route_type": {
"enum": [
"city_delivery",
"rural_route",
"highway_contract",
"po_box",
"general_delivery"
],
"type": "string",
"description": "The type of `components[carrier_route]`. For more detailed information about\neach carrier route type, see [US Verification Details](#tag/US-Verification-Types).\n"
},
"street_predirection": {
"enum": [
"N",
"S",
"E",
"W",
"NE",
"SW",
"SE",
"NW",
""
],
"type": "string",
"description": "Geographic direction preceding a street name (`N`, `S`, `E`, `W`, `NE`, `SW`, `SE`, `NW`).\n"
},
"secondary_designator": {
"type": "string",
"description": "The standard USPS abbreviation describing the `components[secondary_number]` (`STE`, `APT`, `BLDG`, etc).\n"
},
"street_postdirection": {
"enum": [
"N",
"S",
"E",
"W",
"NE",
"SW",
"SE",
"NW",
""
],
"type": "string",
"description": "Geographic direction following a street name (`N`, `S`, `E`, `W`, `NE`, `SW`, `SE`, `NW`).\n"
},
"delivery_point_barcode": {
"type": "string",
"description": "A 12-digit identifier that uniquely identifies a delivery point (location where mail can be sent and received). It consists of the 5-digit ZIP code (`zip_code`), 4-digit ZIP+4 add-on (`zip_code_plus_4`), 2-digit delivery point, and 1-digit delivery point check digit.\n"
},
"extra_secondary_number": {
"type": "string",
"description": "An extra (often unnecessary) secondary number provided with the input address.\n"
},
"default_building_address": {
"type": "boolean",
"description": "Designates whether or not the address is the default address for a building containing multiple delivery points.\n"
},
"extra_secondary_designator": {
"type": "string",
"description": "An extra (often unnecessary) secondary designator provided with the input address.\n"
}
},
"description": "A nested object containing a breakdown of each component of an address."
}
us_ver_id
{
"type": "string",
"pattern": "^us_ver_[a-zA-Z0-9_]+$",
"description": "Unique identifier prefixed with `us_ver_`."
}
us_verification
{
"type": "object",
"properties": {
"id": {
"$ref": "#/components/schemas/us_ver_id"
},
"object": {
"enum": [
"us_verification"
],
"type": "string",
"default": "us_verification",
"description": "Value is resource type."
},
"last_line": {
"type": "string",
"description": "Combination of the following applicable `components`:\n* City (`city`)\n* State (`state`)\n* ZIP code (`zip_code`)\n* ZIP+4 (`zip_code_plus_4`)\n"
},
"recipient": {
"$ref": "#/components/schemas/recipient"
},
"components": {
"$ref": "#/components/schemas/us_components"
},
"primary_line": {
"$ref": "#/components/schemas/primary_line_us"
},
"urbanization": {
"$ref": "#/components/schemas/urbanization"
},
"valid_address": {
"enum": [
true,
false
],
"type": "boolean",
"description": "This field indicates whether an address was found in a more comprehensive address dataset that includes sources from the USPS, open source mapping data, and our proprietary mail delivery data.\nThis field can be interpreted as a representation of whether an address is a real location or not. Additionally a valid address may contradict the deliverability field since an address can be a real valid location but the USPS may not deliver to that address.\n"
},
"deliverability": {
"enum": [
"deliverable",
"deliverable_unnecessary_unit",
"deliverable_incorrect_unit",
"deliverable_missing_unit",
"undeliverable"
],
"type": "string",
"description": "Summarizes the deliverability of the `us_verification` object.\nFor full details, see the `deliverability_analysis` field. Possible values are:\n* `deliverable` – The address is deliverable by the USPS.\n* `deliverable_unnecessary_unit` – The address is deliverable, but the secondary unit information is unnecessary.\n* `deliverable_incorrect_unit` – The address is deliverable to the building's default address but the secondary unit provided may not exist. There is a chance the mail will not reach the intended recipient.\n* `deliverable_missing_unit` – The address is deliverable to the building's default address but is missing secondary unit information. There is a chance the mail will not reach the intended recipient.\n* `undeliverable` – The address is not deliverable according to the USPS.\n"
},
"secondary_line": {
"$ref": "#/components/schemas/secondary_line"
},
"lob_confidence_score": {
"$ref": "#/components/schemas/lob_confidence_score"
},
"deliverability_analysis": {
"$ref": "#/components/schemas/deliverability_analysis"
}
}
}
us_verifications
{
"type": "object",
"required": [
"addresses",
"errors"
],
"properties": {
"errors": {
"type": "boolean",
"description": "Indicates whether any errors occurred during the verification process."
},
"addresses": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/us_verification"
},
{
"$ref": "#/components/schemas/error"
}
]
}
}
}
}
us_verifications_writable
{
"oneOf": [
{
"$ref": "#/components/schemas/multiple_components"
},
{
"$ref": "#/components/schemas/single_line_address"
}
]
}
user_provided
{
"type": "string",
"pattern": "^env_[a-zA-Z0-9]+$",
"nullable": true,
"description": "Accepts an envelope ID for any customized envelope with available inventory. If no inventory is available for the specified ID, the letter will not be sent, and an error will be returned. If the letter has more than 6 sheets, it will be sent in a blank flat envelope. Custom envelopes may be created and ordered from the dashboard. This feature is exclusive to certain customers. Upgrade to the appropriate <a href=\"https://dashboard.lob.com/#/settings/editions\" target=\"_blank\">Print & Mail Edition</a> to gain access."
}
vrsn_id
{
"type": "string",
"pattern": "^vrsn_[a-zA-Z0-9]+$",
"description": "Unique identifier prefixed with `vrsn_`."
}
writable
{
"required": [
"color"
],
"properties": {
"size": {
"$ref": "#/components/schemas/postcard_size"
},
"qr_code": {
"$ref": "#/components/schemas/qr_code_campaigns"
},
"mail_type": {
"$ref": "#/components/schemas/mail_type"
}
},
"description": "Properties that the postcards in your Creative should have. Check within in order to add a QR code to your creative."
}
zip
{
"allOf": [
{
"$ref": "#/components/schemas/zip5"
},
{
"type": "object",
"required": [
"id",
"cities",
"zip_code_type",
"object"
],
"properties": {
"id": {
"$ref": "#/components/schemas/zip_id"
},
"cities": {
"type": "array",
"items": {
"$ref": "#/components/schemas/zip_lookup_city"
},
"description": "An array of city objects containing valid cities for the `zip_code`. Multiple cities will be returned if more than one city is associated with the input ZIP code.\n"
},
"object": {
"enum": [
"us_zip_lookup"
],
"type": "string",
"default": "us_zip_lookup",
"description": "Value is resource type."
},
"zip_code_type": {
"$ref": "#/components/schemas/zip_code_type"
}
}
}
]
}
zip5
{
"type": "object",
"required": [
"zip_code"
],
"properties": {
"zip_code": {
"type": "string",
"example": "94107",
"pattern": "^\\d{5}$",
"description": "A 5-digit ZIP code."
}
}
}
zip_code
{
"type": "string",
"pattern": "^\\d{5}((-)?\\d{4})?$"
}
zip_code_plus_4
{
"type": "string",
"pattern": "^\\d{4}$"
}