Query structured spec data via REST or MCP. Get exactly what your agent needs.
https://api.lob.com/v1
/buckslips/{buckslip_id}
Update the details of an existing buckslip. You need only supply the unique identifier that was returned upon buckslip creation.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/buckslip_updatable"
},
"example": {
"description": "Test buckslip",
"auto_reorder": true
}
},
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/buckslip_updatable"
},
"example": {
"description": "Test buckslip",
"auto_reorder": true
}
},
"application/x-www-form-urlencoded": {
"schema": {
"$ref": "#/components/schemas/buckslip_updatable"
},
"example": {
"description": "Test buckslip",
"auto_reorder": true
}
}
},
"required": true
}
PATCH /buckslips/{buckslip_id}
/campaigns/{cmp_id}
Update the details of an existing campaign. You need only supply the unique identifier that was returned upon campaign creation.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/campaign_updatable"
},
"example": {
"description": "Test campaign"
}
},
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/campaign_updatable"
},
"example": {
"description": "Test campaign"
}
},
"application/x-www-form-urlencoded": {
"schema": {
"$ref": "#/components/schemas/campaign_updatable"
},
"example": {
"description": "Test campaign"
}
}
},
"required": true
}
PATCH /campaigns/{cmp_id}
/creatives/{crv_id}
Update the details of an existing creative. You need only supply the unique identifier that was returned upon creative creation.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/creative_base"
},
"example": {
"description": "Test creative"
}
},
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/creative_base"
},
"example": {
"description": "Test creative"
}
},
"application/x-www-form-urlencoded": {
"schema": {
"$ref": "#/components/schemas/creative_base"
},
"example": {
"description": "Test creative"
}
}
},
"required": true
}
PATCH /creatives/{crv_id}
/links/{link_id}
Update any of the properties of a shortened link.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/link_single"
},
"examples": {
"test": {
"value": {
"redirect_link": "ltr_133"
}
},
"basic": {
"value": {
"resource_id": "ltr_133"
}
}
}
},
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/link_single"
},
"examples": {
"test": {
"value": {
"resource_id": "ltr_133"
}
},
"basic": {
"value": {
"resource_id": "ltr_133"
}
}
}
},
"application/x-www-form-urlencoded": {
"schema": {
"$ref": "#/components/schemas/link_single"
},
"examples": {
"test": {
"value": {
"resource_id": "ltr_133"
}
},
"basic": {
"value": {
"resource_id": "ltr_133"
}
}
}
}
},
"required": true
}
PATCH /links/{link_id}
/uploads/{upl_id}
Update the details of an existing upload. You need only supply the unique identifier that was returned upon upload creation.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/upload_updatable"
}
}
},
"required": true
}
PATCH /uploads/{upl_id}
AddressesListResponse
{
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/address"
},
"description": "list of addresses"
}
}
}
]
}
BankAccountsGetListResponse
{
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/bank_account"
},
"description": "list of bank_accounts"
}
}
}
]
}
BillingGroupsListResponse
{
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/billing_group"
},
"description": "list of billing_groups"
}
}
}
]
}
BuckslipOrdersGetByBuckslipIdResponse
{
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/buckslip_order"
},
"description": "List of buckslip orders"
}
}
}
]
}
BuckslipsListResponse
{
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/buckslip"
},
"description": "list of buckslips"
}
}
}
]
}
CampaignDeleteResponse
{
"properties": {
"id": {
"$ref": "#/components/schemas/cmp_id"
},
"deleted": {
"type": "boolean",
"description": "True if the resource has been successfully 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."
}
CampaignsListResponse
{
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/campaign"
},
"description": "list of campaigns"
}
}
}
]
}
CardOrdersGetResponse
{
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/card_order"
},
"description": "List of card orders"
}
}
}
]
}
CardsListResponse
{
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/card"
},
"description": "list of cards"
}
}
}
]
}
ChecksListResponse
{
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/check"
},
"description": "list of checks"
}
}
}
]
}
ExportRetrieveResponse
{
"type": "object",
"required": [
"id",
"dateCreated",
"dateModified",
"deleted",
"s3Url",
"state",
"type",
"uploadId"
],
"properties": {
"id": {
"$ref": "#/components/schemas/ex_id"
},
"type": {
"enum": [
"all",
"failures",
"successes"
],
"type": "string",
"description": "The export file type, which can be `all`, `failures` or `successes`."
},
"s3Url": {
"type": "string",
"description": "The URL for the generated export file."
},
"state": {
"enum": [
"in_progress",
"failed",
"succeeded"
],
"type": "string",
"description": "The state of the export file, which can be `in_progress`, `failed` or `succeeded`."
},
"deleted": {
"type": "boolean",
"description": "Returns as `true` if the resource has been successfully deleted."
},
"uploadId": {
"$ref": "#/components/schemas/upl_id"
},
"dateCreated": {
"type": "string",
"format": "date-time",
"description": "A timestamp in ISO 8601 format of the date the export was created"
},
"dateModified": {
"type": "string",
"format": "date-time",
"description": "A timestamp in ISO 8601 format of the date the export was last modified"
}
}
}
LettersListResponse
{
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/letter"
},
"description": "list of letters"
}
}
}
]
}
PostcardsListResponse
{
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/postcard"
},
"description": "list of postcards"
}
}
}
]
}
QrCodesGetSortedQrCodesResponse
{
"allOf": [
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/qr_code_scans"
},
"description": "List of QR code analytics"
},
"count": {
"$ref": "#/components/schemas/count"
},
"object": {
"$ref": "#/components/schemas/object"
},
"total_count": {
"type": "integer",
"description": "Indicates the total number of records. Provided when the request specifies an \"include\" query parameter"
},
"scanned_count": {
"type": "integer",
"description": "Indicates the number of QR Codes out of `count` that were scanned atleast once."
}
}
}
]
}
ReportRetrieve403Response
{
"type": "object",
"properties": {
"code": {
"type": "number",
"description": "The error code"
},
"message": {
"type": "string",
"description": "Details of the error message with the feature flagged mentioned."
}
}
}
ReportRetrieveResponse
{
"type": "object",
"required": [
"data",
"count",
"offset",
"total_count"
],
"properties": {
"data": {
"type": "array",
"items": {
"properties": {
"status": {
"enum": [
"Validated",
"Failed",
"Processing"
],
"type": "string",
"description": "The processing status of line item."
},
"rowNumber": {
"type": "number",
"title": "Row Number",
"description": "The row number of the csv file containing this data."
},
"mailpieceId": {
"type": "string",
"nullable": true,
"description": "The mailpiece id created from the line item when it was validated."
},
"errorMessage": {
"type": "string",
"nullable": true,
"description": "The error message detailing the reason why processing the line item failed."
},
"originalData": {
"type": "object",
"description": "Key-value pairs where each key is the column header and each value is the value of the column for the row."
}
}
}
},
"count": {
"$ref": "#/components/schemas/count"
},
"next_url": {
"type": "string",
"nullable": true,
"description": "Url of next page of items in list."
},
"prev_url": {
"type": "string",
"nullable": true,
"description": "Url of previous page of items in list."
},
"total_count": {
"type": "integer",
"description": "Indicates the total number of records. Provided when the request specifies an \"include\" query parameter"
}
}
}
SelfMailersGetListResponse
{
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/self_mailer"
},
"description": "list of self_mailers"
}
}
}
]
}
TemplateVersionsGetListResponse
{
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/template_version"
},
"description": "list of template versions"
}
}
}
]
}
TemplatesListResponse
{
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/template"
},
"description": "list of templates"
}
}
}
]
}
UploadCreateResponse
{
"type": "object",
"title": "HTTPValidationError",
"properties": {
"detail": {
"type": "array",
"items": {
"type": "object",
"title": "ValidationError",
"required": [
"loc",
"msg",
"type"
],
"properties": {
"loc": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
}
},
"title": "Detail"
}
}
}
UploadFileRequest
{
"type": "object",
"properties": {
"file": {
"type": "string",
"format": "binary"
}
}
}
UploadsCreateExportFileRequest
{
"type": "object",
"properties": {
"type": {
"enum": [
"all",
"failures",
"successes"
],
"type": "string"
}
}
}
UploadsCreateExportFileResponse
{
"type": "object",
"example": {
"code": 400,
"errors": [
"type must be a string"
],
"message": "Invalid body, check 'errors' property for more info."
},
"required": [
"code",
"message",
"errors"
],
"properties": {
"code": {
"enum": [
400,
404
],
"type": "number",
"description": "A conventional HTTP status code"
},
"errors": {
"type": "array",
"items": {
"type": "string"
},
"description": "An array of pre-defined strings that identify an error"
},
"message": {
"type": "string",
"description": "A human-readable message with more details about the error"
}
}
}
UploadsListResponse
{
"type": "array",
"items": {
"$ref": "#/components/schemas/upload"
}
}
address
{
"oneOf": [
{
"$ref": "#/components/schemas/address_us"
},
{
"$ref": "#/components/schemas/address_intl"
}
]
}
address_deletion
{
"properties": {
"id": {
"$ref": "#/components/schemas/adr_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."
}
address_editable
{
"oneOf": [
{
"$ref": "#/components/schemas/address_editable_us"
},
{
"$ref": "#/components/schemas/address_editable_intl"
}
]
}
address_editable_intl
{
"allOf": [
{
"$ref": "#/components/schemas/address_fields_intl"
},
{
"type": "object",
"anyOf": [
{
"title": "address obj with `name` defined",
"required": [
"name"
]
},
{
"title": "address obj with `company` defined",
"required": [
"company"
]
}
],
"properties": {
"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."
},
"company": {
"$ref": "#/components/schemas/company"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"address_country": {
"$ref": "#/components/schemas/country_extended"
}
}
}
]
}
address_editable_us
{
"allOf": [
{
"$ref": "#/components/schemas/address_fields_us"
},
{
"type": "object",
"anyOf": [
{
"title": "address obj with `name` defined",
"required": [
"name"
]
},
{
"title": "address obj with `company` defined",
"required": [
"company"
]
}
],
"properties": {
"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."
},
"company": {
"$ref": "#/components/schemas/company"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"address_country": {
"enum": [
"US"
],
"type": "string",
"default": "US"
}
}
}
]
}
address_fields_intl
{
"type": "object",
"required": [
"address_line1",
"address_country"
],
"properties": {
"address_zip": {
"type": "string",
"nullable": true,
"maxLength": 40,
"description": "Optional postal code."
},
"address_city": {
"type": "string",
"nullable": true,
"maxLength": 200
},
"address_line1": {
"type": "string",
"maxLength": 200,
"description": "The primary number, street name, and directional information."
},
"address_line2": {
"type": "string",
"nullable": true,
"maxLength": 200,
"description": "An optional field containing any information which can't fit into line 1."
},
"address_state": {
"type": "string",
"nullable": true,
"maxLength": 200
}
}
}
address_fields_us
{
"type": "object",
"required": [
"address_line1",
"address_city",
"address_state",
"address_zip"
],
"properties": {
"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"
},
"address_city": {
"type": "string",
"maxLength": 200
},
"address_line1": {
"type": "string",
"maxLength": 64,
"description": "The primary number, street name, and directional information."
},
"address_line2": {
"type": "string",
"nullable": true,
"maxLength": 64,
"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_intl
{
"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",
"company": "Lob",
"metadata": {},
"address_zip": "C1N 1C4",
"description": "Harry - Office",
"address_city": "SUMMERSIDE",
"address_line1": "370 WATER ST",
"address_line2": "",
"address_state": "PRINCE EDWARD ISLAND",
"address_country": "CANADA"
},
"required": [
"id",
"address_line1",
"address_country"
],
"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": {
"$ref": "#/components/schemas/company"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"address_zip": {
"type": "string",
"nullable": true,
"maxLength": 40,
"description": "Optional postal code."
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"address_city": {
"type": "string",
"nullable": true,
"maxLength": 200
},
"address_line1": {
"type": "string",
"maxLength": 200
},
"address_line2": {
"type": "string",
"nullable": true,
"maxLength": 200
},
"address_state": {
"type": "string",
"nullable": true,
"maxLength": 200,
"description": "Will be returned as a full string"
},
"address_country": {
"enum": [
"AFGHANISTAN",
"ALBANIA",
"ALGERIA",
"AMERICAN SAMOA",
"ANDORRA",
"ANGOLA",
"ANGUILLA",
"ANTARCTICA",
"ANTIGUA AND BARBUDA",
"ARGENTINA",
"ARUBA",
"AUSTRALIA",
"AUSTRIA",
"AZERBAIJAN",
"BAHRAIN",
"BANGLADESH",
"BARBADOS",
"BELARUS",
"BELGIUM",
"BELIZE",
"BENIN",
"BERMUDA",
"BHUTAN",
"BOLIVIA (PLURINATIONAL STATE OF)",
"BONAIRE, SAINT EUSTATIUS AND SABA",
"BOSNIA AND HERZEGOVINA",
"BOTSWANA",
"BRAZIL",
"BRITISH INDIAN OCEAN TERRITORY",
"BRITISH VIRGIN ISLANDS",
"BRUNEI DARUSSALAM",
"BULGARIA",
"BURKINA FASO",
"BURUNDI",
"CABO VERDE",
"CAMBODIA",
"CAMEROON",
"CANADA",
"CAYMAN ISLANDS",
"CENTRAL AFRICAN REPUBLIC",
"CHAD",
"CHILE",
"CHINA",
"COLOMBIA",
"COMOROS",
"CONGO",
"CONGO, DEMOCRATIC REPUBLIC OF THE",
"COOK ISLANDS",
"COSTA RICA",
"CÔTE D'IVOIRE",
"CROATIA",
"CUBA",
"CURAÇAO",
"CYPRUS",
"CZECH REPUBLIC",
"DENMARK",
"DJIBOUTI",
"DOMINICA",
"DOMINICAN REPUBLIC",
"ECUADOR",
"EGYPT",
"EL SALVADOR",
"EQUATORIAL GUINEA",
"ERITREA",
"ESTONIA",
"ESWATINI",
"ETHIOPIA",
"FALKLAND ISLANDS (MALVINAS)",
"FAROE ISLANDS",
"FIJI",
"FINLAND",
"FRANCE",
"GABON",
"GAMBIA",
"GEORGIA",
"GERMANY",
"GHANA",
"GIBRALTAR",
"GREECE",
"GREENLAND",
"GRENADA",
"GUATEMALA",
"GUINEA",
"GUINEA-BISSAU",
"GUYANA",
"HAITI",
"HOLY SEE",
"HONDURAS",
"HONG KONG",
"HUNGARY",
"ICELAND",
"INDIA",
"INDONESIA",
"IRAN (ISLAMIC REPUBLIC OF)",
"IRAQ",
"IRELAND",
"ISRAEL",
"ITALY",
"JAMAICA",
"JAPAN",
"JORDAN",
"KAZAKHSTAN",
"KENYA",
"KIRIBATI",
"KOREA (DEMOCRATIC PEOPLE’S REPUBLIC OF)",
"KOREA, REPUBLIC OF",
"KUWAIT",
"KYRGYZSTAN",
"LAO PEOPLE’S DEMOCRATIC REPUBLIC",
"LATVIA",
"LEBANON",
"LESOTHO",
"LIBERIA",
"LIBYA",
"LIECHTENSTEIN",
"LITHUANIA",
"LUXEMBOURG",
"MACAO",
"MACEDONIA",
"MADAGASCAR",
"MALAWI",
"MALAYSIA",
"MALDIVES",
"MALI",
"MALTA",
"MAURITANIA",
"MAURITIUS",
"MEXICO",
"MOLDOVA, REPUBLIC OF",
"MONACO",
"MONGOLIA",
"MONTENEGRO",
"MONTSERRAT",
"MOROCCO",
"MOZAMBIQUE",
"MYANMAR",
"NAMIBIA",
"NAURU",
"NEPAL",
"NETHERLAND ANTILLES",
"NETHERLANDS",
"NEW ZEALAND",
"NICARAGUA",
"NIGER",
"NIGERIA",
"NIUE",
"NORFOLK ISLAND",
"NORWAY",
"OMAN",
"PAKISTAN",
"PANAMA",
"PAPUA NEW GUINEA",
"PARAGUAY",
"PERU",
"PHILIPPINES",
"PITCAIRN",
"POLAND",
"PORTUGAL",
"QATAR",
"ROMANIA",
"RUSSIAN FEDERATION",
"RWANDA",
"SAINT HELENA",
"SAINT KITTS AND NEVIS",
"SAINT LUCIA",
"SAINT VINCENT AND THE GRENADINES",
"SAMOA",
"SAN MARINO",
"SAO TOME AND PRINCIPE",
"SAUDI ARABIA",
"SENEGAL",
"SERBIA",
"SEYCHELLES",
"SIERRA LEONE",
"SINGAPORE",
"SINT MAARTEN",
"SLOVAKIA",
"SLOVENIA",
"SOLOMON ISLANDS",
"SOMALIA",
"SOUTH AFRICA",
"SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS",
"SOUTH SUDAN",
"SPAIN",
"SRI LANKA",
"SUDAN",
"SURINAME",
"SWEDEN",
"SWITZERLAND",
"SYRIAN ARAB REPUBLIC",
"TAIWAN",
"TAJIKISTAN",
"TANZANIA",
"THAILAND",
"THE BAHAMAS",
"TIMOR-LESTE",
"TOGO",
"TOKELAU",
"TONGA",
"TRINIDAD AND TOBAGO",
"TUNISIA",
"TURKEY",
"TURKMENISTAN",
"TURKS AND CAICOS ISLANDS",
"TUVALU",
"UGANDA",
"UKRAINE",
"UNITED ARAB EMIRATES",
"UNITED KINGDOM",
"URUGUAY",
"UZBEKISTAN",
"VANUATU",
"VENEZUELA",
"VIET NAM",
"WESTERN SAHARA",
"YEMEN",
"ZAMBIA",
"ZIMBABWE"
],
"type": "string",
"maxLength": 200,
"description": "Full name of country"
}
}
}
]
}
address_placement
{
"enum": [
"top_first_page",
"insert_blank_page",
"bottom_first_page_center",
"bottom_first_page"
],
"type": "string",
"default": "top_first_page",
"description": "Specifies the location of the address information that will show through the double-window envelope. To see how this will impact your letter design, view our letter template.\nSome values are 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.\n * `top_first_page` - (default) print address information at the top of your provided first page\n * `insert_blank_page` - insert a blank address page at the beginning of your file (you will be charged for the extra page)\n * `bottom_first_page_center` - **(exclusive, deprecation planned within a few months)** print address information at the bottom center of your provided first page\n * `bottom_first_page` - **(exclusive)** print address information at the bottom of your provided first page\n"
}
address_types
{
"enum": [
"address.created",
"address.deleted"
],
"type": "string",
"description": "Unique identifier referring to status of address"
}
address_us
{
"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_e68217bd744d65c8",
"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": 64,
"description": "The primary number, street name, and directional information."
},
"address_line2": {
"type": "string",
"nullable": true,
"maxLength": 64,
"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"
}
}
}
]
}
addresses
{
"type": "object",
"properties": {
"components": {
"$ref": "#/components/schemas/components"
},
"location_analysis": {
"$ref": "#/components/schemas/location_analysis"
}
}
}
adr_id
{
"type": "string",
"pattern": "^adr_[a-zA-Z0-9]+$",
"description": "Unique identifier prefixed with `adr_`."
}
bank_account
{
"allOf": [
{
"$ref": "#/components/schemas/bank_account_base"
},
{
"$ref": "#/components/schemas/lob_base"
},
{
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"$ref": "#/components/schemas/bank_id"
},
"object": {
"enum": [
"bank_account"
],
"type": "string",
"default": "bank_account",
"description": "Value is resource type."
},
"verified": {
"type": "boolean",
"default": false,
"description": "A bank account must be verified before a check can be created. More info [here](#operation/bank_account_verify)."
},
"bank_name": {
"type": "string",
"description": "The name of the bank based on the provided routing number, e.g. `JPMORGAN CHASE BANK`."
},
"signature_url": {
"allOf": [
{
"type": "string",
"nullable": true,
"description": "A [signed link](#section/Asset-URLs) to the signature image."
},
{
"$ref": "#/components/schemas/signed_link"
}
]
}
}
}
],
"example": {
"id": "bank_a",
"object": "bank_account",
"metadat": {
"spiffy": "true"
},
"verified": true,
"bank_name": "JPMORGAN CHASE BANK",
"signatory": "Jane Doe",
"description": "Test Bank Account",
"account_type": "individual",
"date_created": "2019-08-08T19:34:47.571Z",
"date_modified": "2019-08-08T19:34:47.571Z",
"signature_url": "https://lob-assets.com/bank-accounts/asd_asdfghjkqwertyui.pdf?expires=1234567890&signature=aksdf",
"account_number": "123456789",
"routing_number": "322271627"
}
}
bank_account_base
{
"type": "object",
"required": [
"routing_number",
"account_number",
"account_type",
"signatory"
],
"properties": {
"city": {
"type": "string",
"description": "The city associated with your home bank account. Required for the `jpm` check template only. Please contact a bank representative if you do not know the city associated with your home bank institution."
},
"state": {
"type": "string",
"description": "The state associated with your home bank account. Required for the `jpm` check template only. Please contact a bank representative if you do not know the state associated with your home bank institution."
},
"zipcode": {
"type": "string",
"description": "The zipcode associated with your home bank account. Required for the `jpm` check template only. Please contact a bank representative if you do not know the zipcode associated with your home bank institution."
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"signatory": {
"type": "string",
"maxLength": 30,
"description": "The signatory associated with your account. This name will be printed on checks created with this bank account. If you prefer to use a custom signature image on your checks instead, please create your bank account from the <a href=\"https://dashboard.lob.com/#/login\" target=\"_blank\">Dashboard</a>."
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"account_type": {
"enum": [
"company",
"individual"
],
"type": "string",
"description": "The type of entity that holds the account."
},
"account_number": {
"type": "string",
"maxLength": 17
},
"check_template": {
"enum": [
"common",
"jpm"
],
"type": "string",
"description": "The check template used for printing. The defualt value is `common`. If you bank with JP Morgan Chase and wish to use Positive Pay use the `jpm` template. `jpm` requires additional information to be provided."
},
"routing_number": {
"type": "string",
"maxLength": 9,
"minLength": 9,
"description": "Must be a <a href=\"https://www.frbservices.org/index.html\" target=\"_blank\">valid US routing number</a>."
},
"fractional_routing_number": {
"type": "string",
"description": "The fractional routing number for your home bank account. Required for the `jpm` check template only. Please contact a bank representative if you do not know the fractional routing number associated with your home bank institution."
}
}
}
bank_account_types
{
"enum": [
"bank_account.created",
"bank_account.deleted",
"bank_account.verified"
],
"type": "string",
"description": "Unique identifier referring to status of bank account"
}
bank_account_verify
{
"type": "object",
"required": [
"amounts"
],
"properties": {
"amounts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/cents"
},
"maxItems": 2,
"minItems": 2,
"description": "In live mode, an array containing the two micro deposits (in cents) placed in the bank account. In test mode, no micro deposits will be placed, so any two integers between `1` and `100` will work."
}
}
}
bank_deletion
{
"properties": {
"id": {
"$ref": "#/components/schemas/bank_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."
}
bank_id
{
"allOf": [
{
"$ref": "#/components/schemas/bank_id_no_description"
},
{
"type": "string",
"description": "Unique identifier prefixed with `bank_`."
}
]
}
bank_id_no_description
{
"type": "string",
"pattern": "^bank_[a-zA-Z0-9]+$"
}
bg_description
{
"type": "string",
"maxLength": 255,
"description": "Description of the billing group."
}
bg_id
{
"type": "string",
"pattern": "^bg_[a-zA-Z0-9]+$",
"description": "Unique identifier prefixed with `bg_`."
}
billing_group
{
"allOf": [
{
"$ref": "#/components/schemas/billing_group_base"
},
{
"type": "object",
"properties": {
"id": {
"$ref": "#/components/schemas/bg_id"
},
"object": {
"enum": [
"billing_group"
],
"type": "string",
"default": "billing_group",
"description": "Value is resource type."
},
"date_created": {
"$ref": "#/components/schemas/date_created"
},
"date_modified": {
"$ref": "#/components/schemas/date_modified"
}
}
}
]
}
billing_group_base
{
"type": "object",
"properties": {
"name": {
"$ref": "#/components/schemas/name"
},
"description": {
"$ref": "#/components/schemas/bg_description"
}
}
}
billing_group_editable
{
"allOf": [
{
"$ref": "#/components/schemas/billing_group_base"
},
{
"required": [
"name"
]
}
]
}
billing_group_id
{
"type": "string",
"description": "An optional string with the billing group ID to tag your usage with. Is used for billing purposes. Requires special activation to use. See <a href=\"#tag/Billing-Groups\">Billing Group API</a> for more information."
}
bo_id
{
"type": "string",
"pattern": "^bo_[a-zA-Z0-9]+$",
"description": "Unique identifier prefixed with `bo_`."
}
buckslip
{
"allOf": [
{
"$ref": "#/components/schemas/lob_base"
},
{
"$ref": "#/components/schemas/buckslip_base"
},
{
"required": [
"description"
]
},
{
"type": "object",
"required": [
"id",
"auto_reorder",
"reorder_quantity",
"threshold_amount",
"url",
"raw_url",
"front_original_url",
"back_original_url",
"thumbnails",
"available_quantity",
"allocated_quantity",
"onhand_quantity",
"pending_quantity",
"projected_quantity",
"buckslip_orders",
"stock",
"weight",
"finish",
"status",
"object"
],
"properties": {
"id": {
"$ref": "#/components/schemas/buckslip_id"
},
"url": {
"type": "string",
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"description": "The signed link for the buckslip."
},
"stock": {
"enum": [
"text",
"cover"
],
"type": "string",
"title": "The stock of the buckslip."
},
"finish": {
"enum": [
"gloss",
"matte"
],
"type": "string",
"title": "The finish of the buckslip."
},
"object": {
"enum": [
"buckslip"
],
"type": "string",
"default": "buckslip",
"description": "object"
},
"status": {
"enum": [
"processed",
"rendered",
"failed"
],
"type": "string",
"title": "The status of the buckslip."
},
"weight": {
"enum": [
"80#"
],
"type": "string",
"title": "The weight of the buckslip."
},
"raw_url": {
"type": "string",
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"description": "The raw URL of the buckslip."
},
"thumbnails": {
"type": "array",
"items": {
"$ref": "#/components/schemas/thumbnail"
}
},
"auto_reorder": {
"type": "boolean",
"default": false,
"description": "True if the buckslips should be auto-reordered."
},
"buckslip_orders": {
"type": "array",
"items": {
"$ref": "#/components/schemas/buckslip_order"
},
"minItems": 0,
"description": "An array of buckslip orders that are associated with the buckslip."
},
"onhand_quantity": {
"type": "number",
"default": 0,
"description": "The onhand quantity of buckslips."
},
"pending_quantity": {
"type": "number",
"default": 0,
"description": "The pending quantity of buckslips."
},
"reorder_quantity": {
"type": "integer",
"nullable": true,
"description": "The number of buckslips to be reordered."
},
"threshold_amount": {
"type": "integer",
"default": 0,
"description": "The threshold amount of the buckslip"
},
"back_original_url": {
"type": "string",
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"description": "The original URL of the back template."
},
"allocated_quantity": {
"type": "number",
"default": 0,
"description": "The allocated quantity of buckslips."
},
"available_quantity": {
"type": "number",
"default": 0,
"description": "The available quantity of buckslips."
},
"front_original_url": {
"type": "string",
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"description": "The original URL of the front template."
},
"projected_quantity": {
"type": "number",
"default": 0,
"description": "The sum of pending and onhand quantities of buckslips."
}
}
}
]
}
buckslip_base
{
"type": "object",
"properties": {
"size": {
"enum": [
"8.75x3.75"
],
"type": "string",
"default": "8.75x3.75",
"description": "The size of the buckslip"
},
"description": {
"$ref": "#/components/schemas/buckslip_description"
}
}
}
buckslip_deletion
{
"properties": {
"id": {
"$ref": "#/components/schemas/buckslip_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."
}
buckslip_description
{
"type": "string",
"nullable": true,
"maxLength": 255,
"description": "Description of the buckslip."
}
buckslip_editable
{
"allOf": [
{
"$ref": "#/components/schemas/buckslip_base"
},
{
"type": "object",
"required": [
"front"
],
"properties": {
"back": {
"oneOf": [
{
"$ref": "#/components/schemas/remote_file_url"
},
{
"$ref": "#/components/schemas/local_file_path"
}
],
"description": "A PDF template for the back of the buckslip"
},
"front": {
"oneOf": [
{
"$ref": "#/components/schemas/remote_file_url"
},
{
"$ref": "#/components/schemas/local_file_path"
}
],
"description": "A PDF template for the front of the buckslip"
}
}
}
]
}
buckslip_id
{
"type": "string",
"pattern": "^bck_[a-zA-Z0-9]+$",
"description": "Unique identifier prefixed with `bck_`."
}
buckslip_order
{
"allOf": [
{
"$ref": "#/components/schemas/lob_base"
},
{
"type": "object",
"properties": {
"id": {
"$ref": "#/components/schemas/bo_id"
},
"status": {
"enum": [
"pending",
"printing",
"available",
"cancelled",
"depleted"
],
"type": "string",
"description": "The status of the buckslip order."
},
"inventory": {
"type": "number",
"default": 0,
"description": "The inventory of the buckslip order."
},
"unit_price": {
"type": "number",
"default": 0,
"description": "The unit price for the buckslip order."
},
"buckslip_id": {
"$ref": "#/components/schemas/buckslip_id"
},
"cancelled_reason": {
"type": "string",
"description": "The reason for cancellation."
},
"quantity_ordered": {
"type": "number",
"default": 0,
"description": "The quantity of buckslips ordered."
},
"availability_date": {
"type": "string",
"format": "date-time",
"description": "A timestamp in ISO 8601 format of the date the resource was created."
},
"expected_availability_date": {
"type": "string",
"format": "date-time",
"description": "The fixed deadline for the buckslips to be printed."
}
}
}
]
}
buckslip_order_editable
{
"type": "object",
"required": [
"quantity"
],
"properties": {
"quantity": {
"type": "integer",
"maximum": 10000000,
"minimum": 5000,
"description": "The quantity of buckslips in the order (minimum 5,000)."
}
}
}
buckslip_updatable
{
"type": "object",
"properties": {
"description": {
"$ref": "#/components/schemas/buckslip_description"
},
"auto_reorder": {
"type": "boolean",
"description": "Allows for auto reordering"
},
"reorder_quantity": {
"type": "number",
"maximum": 10000000,
"minimum": 5000,
"description": "The quantity of items to be reordered (only required when auto_reorder is true)."
}
}
}
campaign
{
"allOf": [
{
"$ref": "#/components/schemas/lob_base"
},
{
"$ref": "#/components/schemas/campaign_writable"
},
{
"type": "object",
"required": [
"id",
"name",
"description",
"schedule_type",
"use_type",
"is_draft",
"creatives",
"uploads",
"auto_cancel_if_ncoa",
"date_created",
"date_modified",
"object"
],
"properties": {
"id": {
"$ref": "#/components/schemas/cmp_id"
},
"object": {
"enum": [
"campaign"
],
"type": "string",
"default": "campaign",
"description": "Value is resource type."
},
"uploads": {
"type": "array",
"items": {
"$ref": "#/components/schemas/upload"
},
"maxItems": 1,
"minItems": 0,
"description": "A single-element array containing the upload object that is assocated with this campaign."
},
"is_draft": {
"type": "boolean",
"default": true,
"description": "Whether or not the campaign is still a draft."
},
"use_type": {
"$ref": "#/components/schemas/cmp_use_type"
},
"creatives": {
"type": "array",
"items": {
"$ref": "#/components/schemas/creative"
},
"minItems": 0,
"description": "An array of creatives that have been associated with this campaign."
}
}
}
]
}
campaign_id
{
"type": "string",
"title": "campaign_id",
"pattern": "^(cmp|camp)_[a-zA-Z0-9]+$",
"nullable": true,
"description": "Denotes resources created by the provided campaign id, prefixed with `cmp_`. In the case of snap packs and letters with size `us_legal`, the campaign id is prefixed with `camp_` instead of `cmp_`."
}
campaign_item
{
"allOf": [
{
"$ref": "#/components/schemas/campaign_writable"
},
{
"type": "object",
"required": [
"id",
"name",
"description",
"schedule_type",
"use_type",
"is_draft",
"creatives",
"uploads",
"auto_cancel_if_ncoa",
"date_created",
"date_modified",
"object"
],
"properties": {
"id": {
"$ref": "#/components/schemas/cmp_id"
},
"object": {
"enum": [
"campaign"
],
"type": "string",
"default": "campaign",
"description": "Value is resource type."
},
"deleted": {
"$ref": "#/components/schemas/deleted"
},
"uploads": {
"type": "array",
"items": {
"description": "WARNING: Missing items property in array schema. Missing items property has been filled with this AnyType schema."
},
"maxItems": 1,
"minItems": 0,
"description": "A single-element array containing the upload object that is assocated with this campaign."
},
"is_draft": {
"type": "boolean",
"default": true,
"description": "Whether or not the campaign is still a draft."
},
"creatives": {
"type": "array",
"items": {
"description": "WARNING: Missing items property in array schema. Missing items property has been filled with this AnyType schema."
},
"description": "An array of creatives that have been associated with this campaign."
},
"date_created": {
"$ref": "#/components/schemas/date_created"
},
"date_modified": {
"$ref": "#/components/schemas/date_modified"
}
}
}
]
}
campaign_list
{
"type": "array",
"items": {
"$ref": "#/components/schemas/campaign_item"
},
"example": [
{
"id": "cmp_ed76e33e7ac4d0bd",
"name": "My postman Campaign 2",
"object": "campaign",
"deleted": false,
"uploads": [],
"is_draft": true,
"metadata": {},
"use_type": null,
"creatives": [],
"send_date": null,
"description": "Created via postman again",
"date_created": "2022-07-26T20:20:25.016Z",
"date_modified": "2022-07-26T20:20:25.016Z",
"schedule_type": "immediate",
"auto_cancel_if_ncoa": false,
"target_delivery_date": null,
"cancel_window_campaign_minutes": null
}
],
"description": "Array of campaigns associated with the creative ID"
}
campaign_updatable
{
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Name"
},
"is_draft": {
"type": "boolean",
"description": "Whether or not the campaign is still a draft. Can either be excluded or `false`."
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"use_type": {
"$ref": "#/components/schemas/cmp_use_type"
},
"send_date": {
"type": "string",
"format": "date-time",
"description": "If `schedule_type` is `scheduled_send_date`, provide a date to send this campaign."
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"schedule_type": {
"$ref": "#/components/schemas/cmp_schedule_type"
},
"auto_cancel_if_ncoa": {
"type": "boolean",
"description": "Whether or not a mail piece should be automatically canceled and not sent if the address is updated via NCOA."
},
"target_delivery_date": {
"type": "string",
"format": "date-time",
"description": "If `schedule_type` is `target_delivery_date`, provide a targeted delivery date for mail pieces in this campaign."
},
"cancel_window_campaign_minutes": {
"type": "integer",
"description": "A window, in minutes, within which the campaign can be canceled."
}
}
}
campaign_writable
{
"type": "object",
"required": [
"name",
"schedule_type",
"use_type"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the campaign."
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"use_type": {
"$ref": "#/components/schemas/cmp_use_type"
},
"send_date": {
"type": "string",
"format": "date-time",
"nullable": true,
"description": "If `schedule_type` is `scheduled_send_date`, provide a date to send this campaign."
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"schedule_type": {
"$ref": "#/components/schemas/cmp_schedule_type"
},
"billing_group_id": {
"type": "string",
"pattern": "^bg_[a-zA-Z0-9]+$",
"nullable": true,
"description": "Unique identifier prefixed with `bg_`."
},
"auto_cancel_if_ncoa": {
"type": "boolean",
"description": "Whether or not a mail piece should be automatically canceled and not sent if the address is updated via NCOA."
},
"target_delivery_date": {
"type": "string",
"format": "date-time",
"nullable": true,
"description": "If `schedule_type` is `target_delivery_date`, provide a targeted delivery date for mail pieces in this campaign."
},
"cancel_window_campaign_minutes": {
"type": "integer",
"nullable": true,
"description": "A window, in minutes, within which the campaign can be canceled."
}
}
}
card
{
"allOf": [
{
"$ref": "#/components/schemas/lob_base"
},
{
"$ref": "#/components/schemas/card_base"
},
{
"required": [
"description"
]
},
{
"type": "object",
"required": [
"id",
"url",
"auto_reorder",
"reorder_quantity",
"raw_url",
"front_original_url",
"back_original_url",
"thumbnails",
"available_quantity",
"pending_quantity",
"status",
"orientation",
"threshold_amount",
"object"
],
"properties": {
"id": {
"$ref": "#/components/schemas/card_id"
},
"url": {
"type": "string",
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"description": "The signed link for the card."
},
"object": {
"enum": [
"card"
],
"type": "string",
"default": "card",
"description": "object"
},
"status": {
"enum": [
"processed",
"rendered"
],
"type": "string",
"title": "The status of the card."
},
"raw_url": {
"type": "string",
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"description": "The raw URL of the card."
},
"thumbnails": {
"type": "array",
"items": {
"$ref": "#/components/schemas/thumbnail"
}
},
"orientation": {
"enum": [
"horizontal",
"vertical"
],
"type": "string",
"default": "horizontal",
"description": "The orientation of the card."
},
"auto_reorder": {
"type": "boolean",
"default": false,
"description": "True if the cards should be auto-reordered."
},
"pending_quantity": {
"type": "integer",
"default": 0,
"description": "The pending quantity of cards."
},
"reorder_quantity": {
"type": "integer",
"nullable": true,
"description": "The number of cards to be reordered."
},
"threshold_amount": {
"type": "integer",
"default": 0,
"description": "The threshold amount of the card"
},
"back_original_url": {
"type": "string",
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"description": "The original URL of the back template."
},
"available_quantity": {
"type": "integer",
"default": 0,
"description": "The available quantity of cards."
},
"front_original_url": {
"type": "string",
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"description": "The original URL of the front template."
}
}
}
]
}
card_base
{
"type": "object",
"properties": {
"size": {
"enum": [
"3.375x2.125",
"2.125x3.375"
],
"type": "string",
"default": "2.125x3.375",
"description": "The size of the card"
},
"description": {
"$ref": "#/components/schemas/card_description"
}
}
}
card_deletion
{
"properties": {
"id": {
"$ref": "#/components/schemas/card_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."
}
card_description
{
"type": "string",
"nullable": true,
"maxLength": 255,
"description": "Description of the card."
}
card_editable
{
"allOf": [
{
"$ref": "#/components/schemas/card_base"
},
{
"type": "object",
"required": [
"front"
],
"properties": {
"back": {
"oneOf": [
{
"$ref": "#/components/schemas/remote_file_url"
},
{
"$ref": "#/components/schemas/local_file_path"
}
],
"default": "https://s3.us-west-2.amazonaws.com/public.lob.com/assets/card_blank_horizontal.pdf",
"description": "A PDF template for the back of the card"
},
"front": {
"oneOf": [
{
"$ref": "#/components/schemas/remote_file_url"
},
{
"$ref": "#/components/schemas/local_file_path"
}
],
"description": "A PDF template for the front of the card"
}
}
}
]
}
card_id
{
"type": "string",
"pattern": "^card_[a-zA-Z0-9]+$",
"description": "Unique identifier prefixed with `card_`."
}
card_order
{
"allOf": [
{
"$ref": "#/components/schemas/lob_base"
},
{
"type": "object",
"properties": {
"id": {
"$ref": "#/components/schemas/co_id"
},
"status": {
"enum": [
"pending",
"printing",
"available",
"cancelled",
"depleted"
],
"type": "string",
"description": "The status of the card order."
},
"card_id": {
"$ref": "#/components/schemas/card_id"
},
"inventory": {
"type": "number",
"default": 0,
"description": "The inventory of the card order."
},
"unit_price": {
"type": "number",
"default": 0,
"description": "The unit price for the card order."
},
"cancelled_reason": {
"type": "string",
"description": "The reason for cancellation."
},
"quantity_ordered": {
"type": "number",
"default": 0,
"description": "The quantity of cards ordered"
},
"availability_date": {
"type": "string",
"format": "date-time",
"description": "A timestamp in ISO 8601 format of the date the resource was created."
},
"expected_availability_date": {
"type": "string",
"format": "date-time",
"description": "The fixed deadline for the cards to be printed."
}
}
}
]
}
card_order_editable
{
"type": "object",
"required": [
"quantity"
],
"properties": {
"quantity": {
"type": "integer",
"maximum": 10000000,
"minimum": 10000,
"description": "The quantity of cards in the order (minimum 10,000)."
}
}
}
card_updatable
{
"type": "object",
"properties": {
"description": {
"$ref": "#/components/schemas/card_description"
},
"auto_reorder": {
"type": "boolean",
"description": "Allows for auto reordering"
},
"reorder_quantity": {
"type": "number",
"maximum": 10000000,
"minimum": 10000,
"description": "The quantity of items to be reordered (only required when auto_reorder is true)."
}
}
}
cents
{
"type": "integer",
"maximum": 100,
"minimum": 1
}
certified
{
"allOf": [
{
"type": "object",
"required": [
"extra_service",
"tracking_events",
"color"
],
"properties": {
"color": {
"$ref": "#/components/schemas/color"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"mail_type": {
"$ref": "#/components/schemas/mail_type"
},
"send_date": {
"$ref": "#/components/schemas/send_date"
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"double_sided": {
"$ref": "#/components/schemas/double_sided"
},
"extra_service": {
"enum": [
"certified",
"certified_return_receipt"
],
"type": "string",
"description": "Add an extra service to your letter. See <a href=\"https://www.lob.com/pricing/print-mail#compare\" target=\"_blank\">pricing</a> for extra costs incurred.\n * `certified` - track and confirm delivery for domestic destinations. An extra sheet (1 PDF page single-sided or 2 PDF pages double-sided) is added to the beginning of your letter for address and barcode information. See here for templates: <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_certified_template.pdf\" target=\"_blank\">#10 envelope</a> and <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_certified_flat_template.pdf\" target=\"_blank\">flat envelope</a> (used for letters over 6 pages single-sided or 12 pages double-sided). You will not be charged for this extra sheet.\n * `certified_return_receipt` - request an electronic copy of the recipient's signature to prove delivery of your certified letter\n"
},
"return_address": {
"$ref": "#/components/schemas/return_address"
},
"custom_envelope": {
"$ref": "#/components/schemas/custom_envelope_returned"
},
"merge_variables": {
"$ref": "#/components/schemas/merge_variables"
},
"perforated_page": {
"type": "integer",
"nullable": true,
"description": "Required if `return_envelope` is `true`. The number of the page that should be perforated for use with the return envelope. Must be greater than or equal to `1`. The blank page added by `address_placement=insert_blank_page` will be ignored when considering the perforated page number. To see how perforation will impact your letter design, view our <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_perf_template.pdf\" target=\"_blank\">perforation guide</a>."
},
"return_envelope": {
"$ref": "#/components/schemas/return_envelope_returned"
},
"tracking_events": {
"type": "array",
"items": {
"$ref": "#/components/schemas/tracking_event_certified"
},
"description": "An array of certified tracking events ordered by ascending `time`. Not populated in test mode."
},
"tracking_number": {
"type": "string",
"nullable": true,
"description": "The tracking number will be here immediately upon creation.\nDummy tracking numbers are created in test mode."
},
"address_placement": {
"$ref": "#/components/schemas/address_placement"
}
}
},
{
"$ref": "#/components/schemas/letter_generated_base"
}
]
}
check
{
"allOf": [
{
"$ref": "#/components/schemas/check_base"
},
{
"$ref": "#/components/schemas/from_us"
},
{
"type": "object",
"required": [
"bank_account",
"id",
"amount",
"to",
"url",
"carrier",
"date_created",
"date_modified",
"use_type"
],
"properties": {
"id": {
"$ref": "#/components/schemas/chk_id"
},
"to": {
"$ref": "#/components/schemas/to_address_us_chk"
},
"url": {
"$ref": "#/components/schemas/signed_link"
},
"amount": {
"type": "number",
"format": "float",
"maximum": 999999.99,
"multipleOf": 0.01,
"description": "The payment amount to be sent in US dollars."
},
"object": {
"enum": [
"check"
],
"type": "string",
"default": "check",
"description": "Value is resource type."
},
"status": {
"$ref": "#/components/schemas/status"
},
"carrier": {
"enum": [
"USPS"
],
"type": "string",
"default": "USPS"
},
"deleted": {
"$ref": "#/components/schemas/deleted"
},
"use_type": {
"$ref": "#/components/schemas/chk_use_type"
},
"thumbnails": {
"type": "array",
"items": {
"$ref": "#/components/schemas/thumbnail"
}
},
"bank_account": {
"$ref": "#/components/schemas/bank_account"
},
"date_created": {
"$ref": "#/components/schemas/date_created"
},
"date_modified": {
"$ref": "#/components/schemas/date_modified"
},
"failure_reason": {
"allOf": [
{
"$ref": "#/components/schemas/failure_reason"
},
{
"nullable": true
}
]
},
"tracking_events": {
"type": "array",
"items": {
"$ref": "#/components/schemas/tracking_event_normal"
},
"nullable": true,
"description": "An array of tracking_event objects ordered by ascending `time`. Will not be populated for checks created in test mode."
},
"attachment_template_id": {
"allOf": [
{
"description": "The unique ID of the HTML template used for the attachment."
},
{
"$ref": "#/components/schemas/tmpl_id"
}
]
},
"expected_delivery_date": {
"$ref": "#/components/schemas/expected_delivery_date"
},
"check_bottom_template_id": {
"allOf": [
{
"description": "The unique ID of the HTML template used for the check bottom."
},
{
"$ref": "#/components/schemas/tmpl_id"
}
]
},
"attachment_template_version_id": {
"allOf": [
{
"type": "string",
"description": "The unique ID of the specific version of the HTML template used for the attachment."
},
{
"$ref": "#/components/schemas/vrsn_id"
}
]
},
"check_bottom_template_version_id": {
"allOf": [
{
"type": "string",
"description": "The unique ID of the specific version of the HTML template used for the check bottom."
},
{
"$ref": "#/components/schemas/vrsn_id"
}
]
}
}
}
]
}
check_base
{
"allOf": [
{
"$ref": "#/components/schemas/editable_no_mailtype"
},
{
"type": "object",
"properties": {
"memo": {
"type": "string",
"nullable": true,
"maxLength": 40,
"description": "Text to include on the memo line of the check."
},
"message": {
"type": "string",
"maxLength": 400,
"description": "Max of 400 characters to be included at the bottom of the check page."
},
"use_type": {
"$ref": "#/components/schemas/chk_use_type"
},
"mail_type": {
"enum": [
"usps_first_class"
],
"type": "string",
"default": "usps_first_class",
"description": "Checks must be sent `usps_first_class`"
},
"check_number": {
"type": "integer",
"maximum": 500000000,
"minimum": 1,
"description": "An integer that designates the check number.\nIf `check_number` is not provided, checks created from a new `bank_account` will start at `10000` and increment with each check created with the `bank_account`.\nA provided `check_number` overrides the defaults. Subsequent checks created with the same `bank_account` will increment from the provided check number."
}
}
}
]
}
check_bottom
{
"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 on the bottom of the check page.\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 and trimmed to fit on a 8.5\"x11\" page.\n- The check bottom will always be printed in black & white.\n- Must conform to <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/check_bottom_template.pdf\" target=\"_blank\">this template</a>.\n\nNeed more help? Consult our [HTML examples](#section/HTML-Examples)."
}
check_deletion
{
"properties": {
"id": {
"$ref": "#/components/schemas/chk_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."
}
check_editable
{
"oneOf": [
{
"allOf": [
{
"required": [
"message"
]
},
{
"$ref": "#/components/schemas/check_editable_props"
}
],
"title": "words at check bottom"
},
{
"allOf": [
{
"required": [
"check_bottom"
]
},
{
"$ref": "#/components/schemas/check_editable_props"
}
],
"title": "image at check bottom"
}
]
}
check_editable_props
{
"allOf": [
{
"$ref": "#/components/schemas/check_base"
},
{
"$ref": "#/components/schemas/check_input_to"
},
{
"type": "object",
"required": [
"bank_account",
"to",
"from",
"amount",
"use_type"
],
"properties": {
"from": {
"oneOf": [
{
"$ref": "#/components/schemas/adr_id"
},
{
"$ref": "#/components/schemas/inline_address_us"
}
],
"description": "Must either be an address ID or an inline object with correct address parameters. Must either be an address ID or an inline object with correct address parameters. All addresses will be standardized into uppercase without being modified by verification."
},
"logo": {
"oneOf": [
{
"type": "string",
"pattern": "^https://[-a-zA-Z0-9@:%._+~#=/]{1,256}.(png|jpg)$"
},
{
"type": "string",
"pattern": "^(?!https://)[a-zA-Z0-9@:%._+~#=/]{1,256}.(png|jpg)$"
}
],
"description": "Accepts a remote URL or local file upload to an image to print (in grayscale) in the upper-left corner of your check. Image requirements:\n\n * RGB or CMYK\n\n * square\n\n * minimum size: 100px x 100px\n\n * transparent backgrond\n\n * `png` or `jpg`"
},
"amount": {
"type": "number",
"format": "float",
"maximum": 999999.99,
"description": "The payment amount to be sent in US dollars. Amounts will be rounded to two decimal places."
},
"use_type": {
"$ref": "#/components/schemas/chk_use_type"
},
"attachment": {
"oneOf": [
{
"$ref": "#/components/schemas/html_string"
},
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"$ref": "#/components/schemas/remote_file_url"
},
{
"$ref": "#/components/schemas/local_file_path"
}
],
"description": "A document to include with the check.\n\nNotes:\n- HTML merge variables should not include delimiting whitespace.\n- All pages of PDF, PNG, and JPGs must be sized at 8.5\"x11\" at 300 DPI, while supplied HTML will be rendered and trimmed to as many 8.5\"x11\" pages as necessary.\n- If a PDF is provided, it must be 6 pages or fewer.\n- The attachment will be printed double-sided in black & white and will be included in the envelope after the check page.\n- Please follow these <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/check_attachment_template.pdf\" target=\"_blank\">design guidelines</a>.\n\nSee <a href=\"https://lob.com/pricing/print-mail#compare\" target=\"_blank\">pricing</a> for extra costs incurred. Need more help? Consult our [HTML examples](#section/HTML-Examples)."
},
"bank_account": {
"allOf": [
{
"$ref": "#/components/schemas/bank_id_no_description"
},
{
"type": "string",
"description": "The id for a verified bank account."
}
]
},
"check_bottom": {
"$ref": "#/components/schemas/check_bottom"
},
"billing_group_id": {
"$ref": "#/components/schemas/billing_group_id"
}
}
}
]
}
check_input_to
{
"type": "object",
"properties": {
"to": {
"oneOf": [
{
"$ref": "#/components/schemas/adr_id"
},
{
"$ref": "#/components/schemas/inline_address_us_chk"
}
],
"description": "Must either be an address ID or an inline object with correct address parameters. Checks cannot be sent internationally (`address_country` must be `US`). The total string of the sum of `address_line1` and `address_line2` must be no longer than 50 characters combined. If an object is used, an address will be created, corrected, and standardized for free whenever possible using our US Address Verification engine, and returned back with an ID. Depending on your <a href=\"https://dashboard.lob.com/#/settings/editions\" target=\"_blank\">Print & Mail Edition</a>, addresses may also be run through [National Change of Address (NCOALink)](#tag/National-Change-of-Address). If an address used does not meet your account’s <a href=\"https://dashboard.lob.com/#/settings/account\" target=\"_blank\">US Mail Strictness Setting</a>, the request will fail. <a href=\"https://help.lob.com/print-and-mail/all-about-addresses\" target=\"_blank\">More about verification of mailing addresses</a>"
}
}
}
check_types
{
"enum": [
"check.created",
"check.rendered_pdf",
"check.rendered_thumbnails",
"check.deleted",
"check.delivered",
"check.failed",
"check.mailed",
"check.in_transit",
"check.in_local_area",
"check.international_exit",
"check.processed_for_delivery",
"check.re-routed",
"check.returned_to_sender"
],
"type": "string",
"description": "Unique identifier referring to status of check"
}
chk_id
{
"type": "string",
"pattern": "^chk_[a-zA-Z0-9]+$",
"description": "Unique identifier prefixed with `chk_`."
}
chk_use_type
{
"enum": [
"marketing",
"operational",
null
],
"type": "string",
"nullable": true,
"description": "TThe 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)."
}
city
{
"allOf": [
{
"$ref": "#/components/schemas/city_no_description"
},
{
"type": "string",
"description": "The name of the city."
}
]
}
city_no_description
{
"type": "string",
"maxLength": 200
}
cmp_id
{
"type": "string",
"title": "Campaign id",
"pattern": "^cmp_[a-zA-Z0-9]+$",
"description": "Unique identifier prefixed with `cmp_`."
}
cmp_schedule_type
{
"enum": [
"immediate"
],
"type": "string",
"description": "How the campaign should be scheduled. Only value available today is `immediate`."
}
cmp_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)."
}
co_id
{
"type": "string",
"pattern": "^co_[a-zA-Z0-9]+$",
"description": "Unique identifier prefixed with `co_`."
}
color
{
"type": "boolean",
"description": "Set this key to `true` if you would like to print in color. Set to `false` if you would like to print in black and white."
}
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"
}
company_input
{
"allOf": [
{
"anyOf": [
{
"title": "Address object with `city` and `state`",
"required": [
"city",
"state"
]
},
{
"title": "Address object with `zip_code`",
"required": [
"zip_code"
]
}
]
},
{
"type": "object",
"required": [
"company",
"primary_line"
],
"properties": {
"city": {
"allOf": [
{
"$ref": "#/components/schemas/city_no_description"
},
{
"type": "string",
"description": "The name of the city. `city` and `state` are required if no `zip_code` is passed."
}
]
},
"state": {
"type": "string",
"maxLength": 50,
"description": "The <a href=\"https://en.wikipedia.org/wiki/ISO_3166-2:US\" target=\"_blank\">ISO 3166-2</a> two letter code or subdivision name for the state. `city` and `state` are required if no `zip_code` is passed."
},
"company": {
"$ref": "#/components/schemas/identity_validation_company"
},
"zip_code": {
"allOf": [
{
"type": "string",
"description": "Required if `city` and `state` are not passed in. If included, must be formatted as a US ZIP or ZIP+4 (e.g. `94107`, `941072282`, `94107-2282`)."
},
{
"$ref": "#/components/schemas/zip_code"
}
]
},
"primary_line": {
"$ref": "#/components/schemas/primary_line_us"
},
"urbanization": {
"$ref": "#/components/schemas/urbanization"
},
"secondary_line": {
"$ref": "#/components/schemas/secondary_line"
}
}
}
]
}
company_validation
{
"type": "object",
"properties": {
"id": {
"$ref": "#/components/schemas/identity_validation_id"
},
"score": {
"type": "number",
"format": "float",
"default": null,
"maximum": 100,
"minimum": 0,
"nullable": true,
"description": "A numerical score between 0 and 100 that represents the likelihood the provided name is associated with a physical address.\n"
},
"object": {
"enum": [
"id_validation"
],
"type": "string",
"default": "id_validation",
"description": "Value is resource type."
},
"company": {
"$ref": "#/components/schemas/identity_validation_company"
},
"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"
},
"confidence": {
"enum": [
"high",
"medium",
"low",
""
],
"type": "string",
"description": "Indicates the likelihood the recipient name and address match based on our custom internal calculation. Possible values are:\n- `high` — Has a Lob confidence score greater than 70.\n- `medium` — Has a Lob confidence score between 40 and 70.\n- `low` — Has a Lob confidence score less than 40.\n- `\"\"` — No tracking data exists for this address.\n"
},
"primary_line": {
"$ref": "#/components/schemas/primary_line_us"
},
"urbanization": {
"$ref": "#/components/schemas/urbanization"
},
"secondary_line": {
"$ref": "#/components/schemas/secondary_line"
}
}
}
components
{
"type": "object",
"required": [
"zip_code",
"zip_code_plus_4"
],
"properties": {
"zip_code": {
"type": "string",
"pattern": "^\\d{5}$",
"description": "The 5-digit ZIP code"
},
"zip_code_plus_4": {
"allOf": [
{
"description": "A 4-digit ZIP add-on code"
},
{
"$ref": "#/components/schemas/zip_code_plus_4"
}
]
}
},
"description": "A nested object containing a breakdown of each component of a reverse geocoded response."
}
count
{
"type": "integer",
"description": "number of resources in a set"
}
country_extended
{
"enum": [
"AD",
"AE",
"AF",
"AG",
"AI",
"AL",
"AN",
"AO",
"AQ",
"AR",
"AT",
"AU",
"AW",
"AZ",
"BA",
"BB",
"BD",
"BE",
"BF",
"BG",
"BH",
"BI",
"BJ",
"BM",
"BN",
"BO",
"BQ",
"BR",
"BS",
"BT",
"BW",
"BY",
"BZ",
"CA",
"CD",
"CG",
"CH",
"CI",
"CK",
"CL",
"CM",
"CN",
"CO",
"CR",
"CS",
"CU",
"CV",
"CW",
"CY",
"CZ",
"DE",
"DJ",
"DK",
"DM",
"DO",
"DZ",
"EC",
"EE",
"EG",
"EH",
"ER",
"ES",
"ET",
"FI",
"FJ",
"FK",
"FO",
"FR",
"GA",
"GB",
"GD",
"GE",
"GH",
"GI",
"GL",
"GM",
"GN",
"GQ",
"GR",
"GS",
"GT",
"GW",
"GY",
"HK",
"HN",
"HR",
"HT",
"HU",
"ID",
"IE",
"IL",
"IN",
"IO",
"IQ",
"IR",
"IS",
"IT",
"JM",
"JO",
"JP",
"KE",
"KG",
"KH",
"KI",
"KM",
"KN",
"KP",
"KR",
"KW",
"KY",
"KZ",
"LA",
"LB",
"LC",
"LI",
"LK",
"LR",
"LS",
"LT",
"LU",
"LV",
"LY",
"MA",
"MC",
"MD",
"ME",
"MG",
"MK",
"ML",
"MM",
"MN",
"MO",
"MR",
"MS",
"MT",
"MU",
"MV",
"MW",
"MX",
"MY",
"MZ",
"NA",
"NE",
"NF",
"NG",
"NI",
"NL",
"NO",
"NP",
"NR",
"NU",
"NZ",
"OM",
"PA",
"PE",
"PG",
"PH",
"PK",
"PL",
"PN",
"PT",
"PY",
"QA",
"RO",
"RS",
"RU",
"RW",
"SA",
"SB",
"SC",
"SD",
"SE",
"SG",
"SH",
"SI",
"SK",
"SL",
"SM",
"SN",
"SO",
"SR",
"SS",
"ST",
"SV",
"SX",
"SY",
"SZ",
"TC",
"TD",
"TG",
"TH",
"TJ",
"TK",
"TL",
"TM",
"TN",
"TO",
"TR",
"TT",
"TV",
"TW",
"TZ",
"UA",
"UG",
"UY",
"UZ",
"VA",
"VC",
"VE",
"VG",
"VN",
"VU",
"WS",
"YE",
"ZA",
"ZM",
"ZW"
],
"type": "string",
"description": "Must be a 2 letter country short-name code (ISO 3166). Does not accept `US`, `AS`, `PR`, `FM`, `GU`, `MH`, `MP`, `PW`, or `VI`. For these addresses, please use the US verification API. Also does not accept `PS`, which is not currently supported."
}
country_short
{
"type": "string",
"example": "CA",
"description": "The country of the address. Will be returned as a 2 letter country short-name code (ISO 3166)."
}
county
{
"type": "string",
"description": "County name of the address city."
}
county_fips
{
"type": "string",
"pattern": "\\d{5}",
"description": "A 5-digit <a href=\"https://en.wikipedia.org/wiki/FIPS_county_code\" target=\"_blank\">FIPS county code</a> which uniquely identifies `components[county]`. It consists of a 2-digit state code and a 3-digit county code.\n"
}
creative
{
"allOf": [
{
"$ref": "#/components/schemas/lob_base"
},
{
"$ref": "#/components/schemas/returned_resource"
},
{
"type": "object",
"required": [
"id",
"description",
"from",
"resource_type",
"details",
"metadata",
"template_preview_urls",
"template_previews",
"campaigns",
"date_created",
"date_modified",
"object",
"deleted"
],
"properties": {
"id": {
"$ref": "#/components/schemas/crv_id"
},
"object": {
"enum": [
"creative"
],
"type": "string",
"default": "creative",
"description": "Value is resource type."
},
"deleted": {
"type": "boolean",
"description": "Whether the resource has been deleted."
},
"campaigns": {
"$ref": "#/components/schemas/campaign_list"
},
"template_previews": {
"type": "array",
"items": {
"type": "object"
},
"title": "Template Previews",
"description": "A list of template preview objects if the creative uses HTML template(s) as artwork asset(s). An empty array will be returned if no `template_preview`s have been generated for the creative."
},
"template_preview_urls": {
"type": "object",
"title": "Template Preview URLs",
"description": "Preview URLs associated with a creative's artwork asset(s) if the creative uses HTML templates as assets. An empty object will be returned if no `template_preview`s have been generated."
}
}
}
]
}
creative_base
{
"type": "object",
"properties": {
"from": {
"$ref": "#/components/schemas/from_attribute"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"description": {
"$ref": "#/components/schemas/resource_description"
}
}
}
creative_writable
{
"oneOf": [
{
"allOf": [
{
"title": "Postcard Creative",
"required": [
"front",
"back",
"campaign_id",
"resource_type",
"details"
],
"properties": {
"back": {
"$ref": "#/components/schemas/crv_back"
},
"front": {
"$ref": "#/components/schemas/crv_front"
},
"details": {
"$ref": "#/components/schemas/writable"
},
"campaign_id": {
"$ref": "#/components/schemas/cmp_id"
},
"resource_type": {
"enum": [
"postcard"
],
"type": "string",
"description": "Mailpiece type for the creative"
}
}
},
{
"$ref": "#/components/schemas/creative_base"
}
]
},
{
"allOf": [
{
"title": "Letter Creative",
"required": [
"file",
"from",
"campaign_id",
"resource_type",
"details"
],
"properties": {
"file": {
"$ref": "#/components/schemas/crv_file"
},
"details": {
"$ref": "#/components/schemas/letter_details_writable"
},
"campaign_id": {
"$ref": "#/components/schemas/cmp_id"
},
"resource_type": {
"enum": [
"letter"
],
"type": "string",
"description": "Mailpiece type for the creative"
}
}
},
{
"$ref": "#/components/schemas/creative_base"
}
]
},
{
"allOf": [
{
"title": "Self Mailer Creative",
"required": [
"inside",
"outside",
"campaign_id",
"resource_type",
"details"
],
"properties": {
"inside": {
"$ref": "#/components/schemas/crv_inside"
},
"details": {
"$ref": "#/components/schemas/self_mailer_details_writable"
},
"outside": {
"$ref": "#/components/schemas/crv_outside"
},
"campaign_id": {
"$ref": "#/components/schemas/cmp_id"
},
"resource_type": {
"enum": [
"self_mailer"
],
"type": "string",
"description": "Mailpiece type for the creative"
}
}
},
{
"$ref": "#/components/schemas/creative_base"
}
]
}
]
}
crv_back
{
"oneOf": [
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"$ref": "#/components/schemas/local_file_path"
}
],
"description": "The artwork to use as the back of your postcard creative.\n\nNotes:\n- HTML merge variables should not include delimiting whitespace.\n- PDF, PNG, and JPGs must be sized at 4.25\"x6.25\", 6.25\"x9.25\", or 6.25\"x11.25\" at 300 DPI, while supplied HTML template will be rendered to the specified `size`.\n- Be sure to leave room for address and postage information by following the templates provided here:\n - <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/postcards/4x6_postcard.pdf\" target=\"_blank\">4x6 template</a>\n - <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/postcards/6x9_postcard.pdf\" target=\"_blank\">6x9 template</a>\n - <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/postcards/6x11_postcard.pdf\" target=\"_blank\">6x11 template</a>\n\n\nSee [here](#section/HTML-Examples) for HTML examples.\n"
}
crv_file
{
"oneOf": [
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"$ref": "#/components/schemas/local_file_path"
}
],
"description": "Notes:\n- HTML merge variables should not include delimiting whitespace.\n- All pages of a supplied PDF file must be sized at 8.5\"x11\", while supplied HTML will be rendered and trimmed to as many 8.5\"x11\" pages as necessary.\n- For design specifications, please see our <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_template.pdf\" target=\"_blank\">PDF</a> and [HTML](#section/HTML-Examples) templates.\n- If a `custom_envelope` is used, follow <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_custom_envelope.pdf\" target=\"_blank\">this template</a>.\n- For domestic destinations, the file limit is 60 pages single-sided or 120 pages double-sided. For international destinations, the file limit is 6 pages single-sided or 12 pages double-sided. PDFs that surpass the file limit will error, while HTML that renders more pages than the file limit will be trimmed.\n- Any letters over 6 pages single-sided or 12 pages double-sided will be placed in a <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_flat_template.pdf\" target=\"_blank\">flat envelope</a> instead of the standard double window envelope.\n\nSee <a href=\"https://lob.com/pricing/print-mail#compare\" target=\"_blank\">pricing</a> for extra costs incurred."
}
crv_front
{
"oneOf": [
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"$ref": "#/components/schemas/local_file_path"
}
],
"description": "The artwork to use as the front of your postcard.\n\nNotes:\n- HTML merge variables should not include delimiting whitespace.\n- PDF, PNG, and JPGs must be sized at 4.25\"x6.25\", 6.25\"x9.25\", or 6.25\"x11.25\" at 300 DPI, while supplied HTML template will be rendered to the specified `size`.\n\nSee [here](#section/HTML-Examples) for HTML examples.\n"
}
crv_id
{
"type": "string",
"example": "crv_2a3b096c409b32c",
"pattern": "^crv_[a-zA-Z0-9]+$",
"description": "Unique identifier prefixed with `crv_`."
}
crv_inside
{
"oneOf": [
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"$ref": "#/components/schemas/local_file_path"
}
],
"description": "The artwork to use as the inside of your self mailer creative.\nNotes:\n- HTML merge variables should not include delimiting whitespace.\n- PDF, PNG, and JPGs must be sized at 6.25\"x18.25\", 12.25\"x9.25\" or 11.25\"x9.25\" at 300 DPI, while supplied HTML template will be rendered to the specified `size`.\n- Be sure to leave room for address and postage information by following the templates provided here:\n - <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/self_mailers/6x18_sfm_bifold_template.pdf\" target=\"_blank\">6x18 bifold template</a>\n - <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/self_mailers/11x9_sfm_bifold_template.pdf\" target=\"_blank\">11x9 bifold template</a>\n - <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/self_mailers/12x9_sfm_bifold_template.pdf\" target=\"_blank\">12x9 bifold template</a>\n\n\nSee [here](#section/HTML-Examples) for HTML examples.\n"
}
crv_outside
{
"oneOf": [
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"$ref": "#/components/schemas/local_file_path"
}
],
"description": "The artwork to use as the outside of your self mailer creative.\nNotes:\n- HTML merge variables should not include delimiting whitespace.\n- PDF, PNG, and JPGs must be sized at 6.25\"x18.25\", 12.25\"x9.25\" or 11.25\"x9.25\" at 300 DPI, while supplied HTML template will be rendered to the specified `size`.\n- Be sure to leave room for address and postage information by following the templates provided here:\n - <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/self_mailers/6x18_sfm_bifold_template.pdf\" target=\"_blank\">6x18 bifold template</a>\n - <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/self_mailers/11x9_sfm_bifold_template.pdf\" target=\"_blank\">11x9 bifold template</a>\n - <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/self_mailers/12x9_sfm_bifold_template.pdf\" target=\"_blank\">12x9 bifold template</a>\n\n\nSee [here](#section/HTML-Examples) for HTML examples.\n"
}
custom_envelope_returned
{
"type": "object",
"nullable": true,
"required": [
"id",
"url",
"object"
],
"properties": {
"id": {
"type": "string",
"maxLength": 40,
"description": "The unique identifier of the custom envelope used."
},
"url": {
"type": "string",
"description": "The url of the envelope asset used."
},
"object": {
"enum": [
"envelope"
],
"type": "string",
"default": "envelope"
}
},
"description": "A nested custom envelope object containing more information about the custom envelope used or `null` if a custom envelope was not used."
}
customized_redirect_url
{
"type": "string",
"description": "Redirect all mail receipients to a unique URL per mailpiece. Add an extra column in the [audience file](https://help.lob.com/print-and-mail/building-a-mail-strategy/campaign-or-triggered-sends/campaign-audience-guide) with a unique link against each address row and map that row using the merge variable mapping while creating an upload."
}
date_created
{
"type": "string",
"format": "date-time",
"description": "A timestamp in ISO 8601 format of the date the resource was created."
}
date_filter
{
"type": "object",
"description": "Filter by ISO-8601 date or datetime, e.g. `{ \"gt\": \"2012-01-01\", \"lt\": \"2012-01-31T12:34:56Z\" }` where `gt` is >, `lt` is <, `gte` is ≥, and `lte` is ≤.",
"additionalProperties": {
"type": "string"
}
}
date_modified
{
"type": "string",
"format": "date-time",
"description": "A timestamp in ISO 8601 format of the date the resource was last modified."
}
deleted
{
"type": "boolean",
"description": "Only returned if the resource has been successfully deleted."
}
deliverability_analysis
{
"type": "object",
"required": [
"dpv_confirmation",
"dpv_cmra",
"dpv_vacant",
"dpv_active",
"dpv_inactive_reason",
"dpv_throwback",
"dpv_non_delivery_day_flag",
"dpv_non_delivery_day_values",
"dpv_no_secure_location",
"dpv_door_not_accessible",
"dpv_footnotes",
"ews_match",
"lacs_indicator",
"lacs_return_code",
"suite_return_code"
],
"properties": {
"dpv_cmra": {
"enum": [
"Y",
"N",
""
],
"type": "string",
"example": "N",
"description": "Indicates whether or not the address is <a href=\"https://en.wikipedia.org/wiki/Commercial_mail_receiving_agency\" target=\"_blank\">CMRA-authorized</a>. Possible values are:\n* `Y` –– Address is CMRA-authorized.\n* `N` –– Address is not CMRA-authorized.\n* `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string).\n"
},
"ews_match": {
"type": "boolean",
"example": false,
"description": "Indicates whether or not an address has been flagged in the <a href=\"https://docs.informatica.com/data-engineering/data-engineering-quality/10-4-0/address-validator-port-reference/postal-carrier-certification-data-ports/early-warning-system-return-code.html\" target=\"_blank\">Early Warning System</a>, meaning the address is under development and not yet ready to receive mail. However, it should become available in a few months.\n"
},
"dpv_active": {
"enum": [
"Y",
"N",
""
],
"type": "string",
"example": "Y",
"description": "Corresponds to the USPS field `dpv_no_stat`. Indicates that an address has been vacated in the recent past, and is no longer receiving deliveries. If it's been unoccupied for 90+ days, or temporarily vacant, this will be flagged. Possible values are:\n* `Y` –– Address is active.\n* `N` –– Address is not active.\n* `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string).\n"
},
"dpv_vacant": {
"enum": [
"Y",
"N",
""
],
"type": "string",
"example": "N",
"description": "Indicates that an address was once deliverable, but has become vacant and is no longer receiving deliveries. Possible values are:\n* `Y` –– Address is vacant.\n* `N` –– Address is not vacant.\n* `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string).\n"
},
"dpv_footnotes": {
"type": "array",
"items": {
"$ref": "#/components/schemas/dpv_footnote"
},
"example": [
"AA",
"BB"
],
"description": "An array of 2-character strings that gives more insight into how `deliverability_analysis[dpv_confirmation]` was determined. Will always include at least 1 string, and can include up to 3. For details, see [US Verification Details](#tag/US-Verification-Types).\n"
},
"dpv_throwback": {
"enum": [
"Y",
"N",
""
],
"type": "string",
"example": "N",
"description": "Indicates a street address for which mail is delivered to a PO Box. Possible values are:\n* `Y` –– Address is a PO Box throwback delivery point.\n* `N` –– Address is not a PO Box throwback delivery point.\n* `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string).\n"
},
"lacs_indicator": {
"enum": [
"Y",
"N",
""
],
"type": "string",
"example": "",
"description": "Indicates whether this address has been converted by\n<a href=\"https://postalpro.usps.com/address-quality/lacslink\" target=\"_blank\">LACS<sup>Link</sup></a>.\nLACS<sup>Link</sup> corrects outdated addresses into their modern counterparts.\nPossible values are:\n* `Y` –– New address produced with a matching record in LACS<sup>Link</sup>.\n* `N` –– New address could not be produced with a matching record in LACS<sup>Link</sup>.\n* `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string).\n"
},
"dpv_confirmation": {
"enum": [
"Y",
"S",
"D",
"N",
""
],
"type": "string",
"example": "Y",
"description": "Result of Delivery Point Validation (DPV), which determines whether or not the address is deliverable by the USPS. Possible values are:\n* `Y` –– The address is deliverable by the USPS.\n* `S` –– The address is deliverable by removing the provided secondary unit designator. This information may be incorrect or unnecessary.\n* `D` –– The address is deliverable to the building's default address but is missing a secondary unit designator and/or number.\n There is a chance the mail will not reach the intended recipient.\n* `N` –– The address is not deliverable according to the USPS, but parts of the address are valid (such as the street and ZIP code).\n* `''` –– This address is not deliverable. No matching street could be found within the city or ZIP code.\n"
},
"lacs_return_code": {
"type": "string",
"example": "",
"description": "A code indicating how `deliverability_analysis[lacs_indicator]` was determined.\nPossible values are:\n* `A` — A new address was produced because a match was found in LACS<sup>Link</sup>.\n* `92` — A LACS<sup>Link</sup> record was matched after dropping secondary information.\n* `14` — A match was found in LACS<sup>Link</sup>, but could not be converted to a deliverable address.\n* `00` — A match was not found in LACS<sup>Link</sup>, and no new address was produced.\n* `''` — LACS<sup>Link</sup> was not attempted.\n"
},
"suite_return_code": {
"enum": [
"A",
"00",
""
],
"type": "string",
"example": "",
"description": "A return code that indicates whether the address was matched and corrected by\n<a href=\"https://postalpro.usps.com/address-quality-solutions/suitelink\" target=\"_blank\">Suite<sup>Link</sup></a>.\nSuite<sup>Link</sup> attempts to provide secondary information to business addresses.\nPossible values are:\n* `A` –– A Suite<sup>Link</sup> match was found and secondary information was added.\n* `00` –– A Suite<sup>Link</sup> match could not be found and no secondary information was added.\n* `''` –– Suite<sup>Link</sup> lookup was not attempted.\n"
},
"dpv_inactive_reason": {
"enum": [
"01",
"02",
"03",
"04",
"05",
"06",
""
],
"type": "string",
"example": "06",
"description": "Indicates the reason why an address is vacant or no longer receiving deliveries. Possible values are:\n* `01` –– Address does not receive mail from the USPS directly, but is serviced by a drop address.\n* `02` –– Address not yet deliverable.\n* `03` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string).\n* `04` –– Address is a College, Military Zone, or other type.\n* `05` –– Address no longer receives deliveries.\n* `06` –– Address is missing required secondary information.\n* `''` –– A DPV match is not made or the address is active.\n"
},
"dpv_no_secure_location": {
"enum": [
"Y",
"N",
""
],
"type": "string",
"example": "N",
"description": "Indicates packages to this address will not be left due to security concerns. Possible values are:\n* `Y` –– Address does not have a secure mailbox.\n* `N` –– Address has a secure mailbox.\n* `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string).\n"
},
"dpv_door_not_accessible": {
"enum": [
"Y",
"N",
""
],
"type": "string",
"example": "N",
"description": "Indicates the door of the address is not accessible for mail delivery. Possible values are:\n* `Y` –– Door is not accessible.\n* `N` –– Door is accessible.\n* `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string).\n"
},
"dpv_non_delivery_day_flag": {
"enum": [
"Y",
"N",
""
],
"type": "string",
"example": "N",
"description": "Indicates whether deliveries are not performed on one or more days of the week at an address. Possible values are:\n* `Y` –– Mail delivery does not occur on some days of the week.\n* `N` –– Mail delivery occurs every day of the week.\n* `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string).\n"
},
"dpv_non_delivery_day_values": {
"type": "string",
"example": "YNNNNNN",
"description": "Indicates days of the week (starting on Sunday) deliveries are not performed at an address. For example:\n* `YNNNNNN` –– Mail delivery does not occur on Sunday's.\n* `NYNNNYN` –– Mail delivery does not occur on Monday's or Friday's.\n* `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string) or address receives mail every day of the week (`deliverability_analysis[dpv_non_delivery_day_flag]` is `N` or an empty string).\n"
}
},
"description": "A nested object containing a breakdown of the deliverability of an address."
}
domain
{
"type": "string",
"description": "The registered domain/hostname."
}
domain_response
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for a domain."
},
"domain": {
"type": "string",
"description": "The registered domain/hostname."
},
"account_id": {
"type": "string",
"description": "Unique identifier associated with the account the domain is registered for."
}
}
}
domains
{
"type": "object",
"required": [
"domain"
],
"properties": {
"domain": {
"$ref": "#/components/schemas/domain"
}
}
}
domains_response
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/domain_response"
},
"description": "List of domains."
}
}
}
double_sided
{
"type": "boolean",
"default": true,
"description": "Set this attribute to `true` for double sided printing, or `false` for for single sided printing. Defaults to `true`."
}
dpv_footnote
{
"enum": [
"AA",
"A1",
"BB",
"CC",
"N1",
"F1",
"G1",
"U1",
"M1",
"M3",
"P1",
"P3",
"R1",
"R7",
"RR"
],
"type": "string",
"example": "AA"
}
editable
{
"type": "object",
"properties": {
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"mail_type": {
"$ref": "#/components/schemas/mail_type"
},
"send_date": {
"$ref": "#/components/schemas/send_date"
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"merge_variables": {
"$ref": "#/components/schemas/merge_variables"
}
}
}
editable_no_mailtype
{
"type": "object",
"properties": {
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"send_date": {
"$ref": "#/components/schemas/send_date"
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"merge_variables": {
"$ref": "#/components/schemas/merge_variables"
}
}
}
engine
{
"enum": [
"legacy",
"handlebars"
],
"type": "string",
"default": "legacy",
"nullable": true,
"description": "The engine used to combine HTML template with merge variables.\n * `legacy` - Lob's original engine\n * `handlebars`\n"
}
error
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"required": [
"message",
"status_code",
"code"
],
"properties": {
"code": {
"enum": [
"bad_request",
"conflict",
"feature_limit_reached",
"internal_server_error",
"invalid",
"not_deletable",
"not_found",
"request_timeout",
"service_unavailable",
"unrecognized_endpoint",
"unsupported_lob_version",
"address_length_exceeds_limit",
"bank_account_already_verified",
"bank_error",
"billing_address_required",
"custom_envelope_inventory_depleted",
"deleted_bank_account",
"failed_deliverability_strictness",
"file_pages_below_min",
"file_pages_exceed_max",
"file_size_exceeds_limit",
"foreign_return_address",
"inconsistent_page_dimensions",
"invalid_bank_account",
"invalid_bank_account_verification",
"invalid_check_international",
"invalid_country_covid",
"invalid_file",
"invalid_file_dimensions",
"invalid_file_download_time",
"invalid_file_url",
"invalid_image_dpi",
"invalid_international_feature",
"invalid_perforation_return_envelope",
"invalid_template_html",
"mail_use_type_can_not_be_null",
"merge_variable_required",
"merge_variable_whitespace",
"payment_method_unverified",
"pdf_encrypted",
"special_characters_restricted",
"unembedded_fonts",
"email_required",
"invalid_api_key",
"publishable_key_not_allowed",
"rate_limit_exceeded",
"unauthorized",
"unauthorized_token"
],
"type": "string",
"description": "A pre-defined string identifying an error. Error codes fall into three categories:\n\n**GENERIC**\n* `bad_request` - 422: an invalid request was made. See error message for details.\n* `conflict` - 409/422: this operation would leave data in a conflicted state.\n* `feature_limit_reached` - 403: the account has reached its resource limit and requires upgrading to add more.\n* `internal_server_error` - 500: an error has occured on Lob's servers. Please try request again.\n* `invalid` - 422: an invalid request was made. See error message for details.\n* `not_deletable` - 422: an attempt was made to delete a resource, but the resource cannot be deleted.\n* `not_found` - 404: the requested resource was not found.\n* `request_timeout` - 408: the request took too long. Please try again.\n* `service_unavailable` - 503: the Lob servers are temporarily unavailable. Please try agian.\n* `unrecognized_endpoint` - 404: the requested endpoint doesn't exist.\n* `unsupported_lob_version` - 422: an unsupported Lob API version was requested.\n\n**ADVANCED**\n* `address_length_exceeds_limit` - 422: the sum of to.address_line1 and to.address_line2 cannot surpass 50 characters.\n* `bank_account_already_verified` - 422: the bank account has already been verified.\n* `bank_error` - 422: there's an issue with the bank account.\n* `billing_address_required` - 403: in order to create a live mail piece, your account needs to set up a billing address.\n* `custom_envelope_inventory_depleted` - 422: custom envelope inventory is depleted, and more will need to be ordered.\n* `deleted_bank_account` - 404: checks cannot be created with a deleted bank account.\n* `failed_deliverability_strictness` - 422: the `to` address doesn't meet strictness requirements. See <a href=\"https://dashboard.lob.com/#/settings/account\" target=\"_blank\">Account Settings</a> to configure strictness.\n* `file_pages_below_min` - 422: not enough pages.\n* `file_pages_exceed_max` - 422: too many pages.\n* `file_size_exceeds_limit` - 422: the file size is too large. See description for details.\n* `foreign_return_address` - 422: the `from` address must be a US address.\n* `inconsistent_page_dimensions` - 422: all pages of the input file must have the same dimensions.\n* `invalid_bank_account` - 422: the provided bank routing number is invalid.\n* `invalid_bank_account_verification` - 422: verification amounts do not match.\n* `invalid_check_international` - 422: checks cannot be sent internationally.\n* `invalid_country_covid` - 422: the postal service in the specified country is currently unable to process the request due to COVID-19 restrictions.\n* `invalid_file` - 422: the file is invalid.\n* `invalid_file_dimensions` - 422: file dimensions are incorrect for the selected mail type.\n* `invalid_file_download_time` - 422: file download from remote server took too long.\n* `invalid_file_url` - 422: the file URL when creating a resource is invalid.\n* `invalid_image_dpi` - 422: DPI must be at least 300.\n* `invalid_international_feature` - 422: the specified product cannot be sent to the destination.\n* `invalid_perforation_return_envelope` - 422: both `return_envelope` and `perforation` must be used together.\n* `invalid_template_html` - 422: the provided HTML is invalid.\n* `mail_use_type_can_not_be_null` - 422: use_type must be one of \"marketing\" or \"operational\". Alternatively, an admin can set the account default use type in Account Settings.\n* `merge_variable_required` - 422: a required merge variable is missing.\n* `merge_variable_whitespace` - 422: merge variable names cannot contain whitespace.\n* `payment_method_unverified` - 401: you must have a verified bank account or credit card to submit live requests.\n* `pdf_encrypted` - 422: an encrypted PDF was provided.\n* `special_characters_restricted` - 422: cannot use special characters for merge variable names.\n* `unembedded_fonts` - 422: the provided PDF contains non-standard unembedded fonts. See description for details.\n\n**AUTHENTICATION**\n* `email_required` - 401: account must have a verified email address before creating live resources.\n* `invalid_api_key` - 401/403: the API key is invalid.\n* `publishable_key_not_allowed` - 403: the requested operation needs a secret key, not a publishable key. See [API Keys](#section/API-Keys) for more information.\n* `rate_limit_exceeded` - 429: requests were sent too quickly and must be slowed down.\n* `unauthorized` - 401: the request isn't authorized.\n* `unauthorized_token` - 401: token isn't authorized.\n"
},
"message": {
"type": "string",
"example": "Rate limit exceeded. Please wait 5 seconds and try your request again.",
"description": "A human-readable message with more details about the error"
},
"status_code": {
"$ref": "#/components/schemas/failure_status_code"
}
}
}
},
"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."
}
event_type
{
"type": "object",
"required": [
"id",
"enabled_for_test",
"resource",
"object"
],
"properties": {
"id": {
"oneOf": [
{
"$ref": "#/components/schemas/postcard_types"
},
{
"$ref": "#/components/schemas/self_mailer_types"
},
{
"$ref": "#/components/schemas/letter_types"
},
{
"$ref": "#/components/schemas/check_types"
},
{
"$ref": "#/components/schemas/address_types"
},
{
"$ref": "#/components/schemas/bank_account_types"
}
]
},
"object": {
"enum": [
"event_type"
],
"type": "string",
"default": "event_type",
"description": "Value is resource type."
},
"resource": {
"enum": [
"postcards",
"self mailers",
"letters",
"checks",
"addresses",
"bank accounts"
],
"type": "string"
},
"enabled_for_test": {
"type": "boolean",
"description": "Value is `true` if the event type is enabled in both the test and live environments and `false` if it is only enabled in the live environment."
}
}
}
events
{
"type": "object",
"required": [
"id",
"body",
"reference_id",
"event_type",
"date_created",
"object"
],
"properties": {
"id": {
"type": "string",
"pattern": "^evt_[a-zA-Z0-9_]+$",
"description": "Unique identifier prefixed with `evt_`."
},
"body": {
"type": "object",
"description": "The body of the associated resource as they were at the time of the event, i.e. the [postcard object](#operation/postcard_retrieve), [the letter object](#operation/letter_retrieve), [the check object](#operation/check_retrieve), [the address object](#operation/address_retrieve), or [the bank account object](#operation/bank_account_retrieve). For `.deleted` events, the body matches the response for the corresponding delete endpoint for that resource (e.g. the [postcard delete response](#operation/postcard_delete))."
},
"object": {
"enum": [
"event"
],
"type": "string",
"default": "event",
"description": "Value is resource type."
},
"event_type": {
"$ref": "#/components/schemas/event_type"
},
"date_created": {
"$ref": "#/components/schemas/date_created"
},
"reference_id": {
"type": "string",
"description": "Unique identifier of the related resource for the event."
}
}
}
evnt_id
{
"type": "string",
"pattern": "^evnt_[a-zA-Z0-9]+$",
"description": "Unique identifier prefixed with `evnt_`."
}
ex_id
{
"type": "string",
"pattern": "^ex_[a-zA-Z0-9]+$",
"description": "Unique identifier prefixed with `ex_`."
}
expected_delivery_date
{
"type": "string",
"format": "date",
"description": "A date in YYYY-MM-DD format of the mailpiece's expected delivery date based on its `send_date`."
}
extra_service
{
"enum": [
"certified",
"certified_return_receipt",
"registered",
null
],
"type": "string",
"nullable": true,
"description": "Add an extra service to your letter. Can only be non-`null` if `mail_type` isn't `usps_standard`. See <a href=\"https://www.lob.com/pricing/print-mail#compare\" target=\"_blank\">pricing</a> for extra costs incurred.\n * `certified` - track and confirm delivery for domestic destinations. An extra sheet (1 PDF page single-sided or 2 PDF pages double-sided) is added to the beginning of your letter for address and barcode information. See here for templates: <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_certified_template.pdf\" target=\"_blank\">#10 envelope</a> and <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_certified_flat_template.pdf\" target=\"_blank\">flat envelope</a> (used for letters over 6 pages single-sided or 12 pages double-sided). You will not be charged for this extra sheet.\n * `certified_return_receipt` - request an electronic copy of the recipient's signature to prove delivery of your certified letter\n * `registered` - provides tracking and confirmation for international addresses\n \nNot available for `us_legal` letter size.\n"
}
failure_reason
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/failure_reason_error"
},
"nullable": true
},
"remediation": {
"type": "string",
"description": "Instructions on how to resolve the error"
},
"failure_reason": {
"type": "string",
"description": "Reason failure occurred"
}
},
"description": "An object describing the reason for failure if the resource failed to render."
}
failure_reason_error
{
"type": "object",
"properties": {
"url": {
"type": "string",
"nullable": true,
"description": "Failed URL of asset"
},
"host": {
"type": "string",
"nullable": true,
"description": "URL host"
},
"path": {
"type": "string",
"nullable": true,
"description": "URL path"
},
"protocol": {
"type": "string",
"nullable": true,
"description": "Network protocol"
},
"error_type": {
"type": "string",
"nullable": true,
"description": "HTTP response status code message or service defined error"
},
"remediation": {
"type": "string",
"nullable": true,
"description": "Instructions on how to resolve the error"
},
"status_code": {
"type": "number",
"nullable": true,
"description": "HTTP response status codes if the error is asset related"
}
},
"description": "Failure error details"
}
failure_status_code
{
"enum": [
401,
403,
404,
413,
422,
429,
500
],
"type": "integer",
"description": "A conventional HTTP status code:\n * `401` - Authorization error with your API key or account\n * `403` - Forbidden error with your API key or account\n * `404` - The requested item does not exist\n * `413` - Payload too large\n * `422` - The query or body parameters did not pass validation\n * `429` - Too many requests have been sent with an API key in a given amount of time\n * `500` - An internal server error occurred, please contact support@lob.com\n"
}
from
{
"type": "object",
"properties": {
"from": {
"$ref": "#/components/schemas/address"
}
}
}
from_attribute
{
"oneOf": [
{
"$ref": "#/components/schemas/adr_id"
},
{
"$ref": "#/components/schemas/inline_address_us"
}
],
"title": "From",
"description": "Must either be an address ID or an inline object with correct address parameters. All addresses will be standardized into uppercase without being modified by verification."
}
from_us
{
"type": "object",
"properties": {
"from": {
"$ref": "#/components/schemas/address_us"
}
}
}
generated
{
"type": "object",
"required": [
"to",
"carrier"
],
"properties": {
"to": {
"$ref": "#/components/schemas/address"
},
"carrier": {
"enum": [
"USPS"
],
"type": "string",
"default": "USPS"
},
"deleted": {
"$ref": "#/components/schemas/deleted"
},
"thumbnails": {
"type": "array",
"items": {
"$ref": "#/components/schemas/thumbnail"
}
},
"date_created": {
"$ref": "#/components/schemas/date_created"
},
"date_modified": {
"$ref": "#/components/schemas/date_modified"
},
"expected_delivery_date": {
"$ref": "#/components/schemas/expected_delivery_date"
}
}
}
html_string
{
"type": "string",
"pattern": "<",
"maxLength": 10000,
"description": "An HTML string of under 10,000 characters."
}
identity_validation
{
"oneOf": [
{
"$ref": "#/components/schemas/recipient_validation"
},
{
"$ref": "#/components/schemas/company_validation"
}
]
}
identity_validation_company
{
"type": "string",
"nullable": true,
"maxLength": 500,
"description": "The name of the company or firm."
}
identity_validation_id
{
"type": "string",
"pattern": "^id_validation_[a-zA-Z0-9_]+$",
"description": "Unique identifier prefixed with `id_validation_`."
}
identity_validation_recipient
{
"type": "string",
"nullable": true,
"maxLength": 500,
"description": "The name of the person whose identity is being validated."
}
identity_validation_writable
{
"oneOf": [
{
"$ref": "#/components/schemas/recipient_input"
},
{
"$ref": "#/components/schemas/company_input"
}
]
}
inline_address
{
"oneOf": [
{
"$ref": "#/components/schemas/inline_address_us"
},
{
"$ref": "#/components/schemas/inline_address_intl"
}
]
}
inline_address_intl
{
"allOf": [
{
"$ref": "#/components/schemas/address_editable_intl"
},
{
"type": "object",
"required": [
"address_line1",
"address_country"
]
},
{
"type": "object",
"oneOf": [
{
"required": [
"address_city",
"address_state"
]
},
{
"required": [
"address_zip"
]
}
]
}
]
}
inline_address_us
{
"allOf": [
{
"$ref": "#/components/schemas/address_editable_us"
},
{
"type": "object",
"required": [
"address_line1",
"address_city",
"address_state",
"address_zip"
]
}
]
}
inline_address_us_chk
{
"allOf": [
{
"type": "object",
"anyOf": [
{
"title": "address obj with `name` defined",
"required": [
"name"
]
},
{
"title": "address obj with `company` defined",
"required": [
"company"
]
}
],
"required": [
"address_line1",
"address_city",
"address_state",
"address_zip"
],
"properties": {
"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."
},
"company": {
"$ref": "#/components/schemas/company"
},
"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 for address unit information. Total string sum of this plus `address_line1` may not exceed 50 characters."
},
"address_state": {
"type": "string",
"pattern": "^[a-zA-Z]{2}$",
"description": "2 letter state short-name code"
},
"address_country": {
"enum": [
"US"
],
"type": "string",
"default": "US"
}
}
}
]
}
input_from
{
"type": "object",
"properties": {
"from": {
"oneOf": [
{
"$ref": "#/components/schemas/adr_id"
},
{
"$ref": "#/components/schemas/inline_address"
}
],
"description": "Must either be an address ID or an inline object with correct address parameters. Must be a US address unless using a `custom_envelope`. All addresses will be standardized into uppercase without being modified by verification."
}
}
}
input_from_us
{
"type": "object",
"properties": {
"from": {
"oneOf": [
{
"$ref": "#/components/schemas/adr_id"
},
{
"$ref": "#/components/schemas/inline_address_us"
}
],
"description": "*Required* if `to` address is international. Must either be an address ID or an inline object with correct address parameters. Must either be an address ID or an inline object with correct address parameters. All addresses will be standardized into uppercase without being modified by verification."
}
}
}
input_to
{
"type": "object",
"properties": {
"to": {
"oneOf": [
{
"$ref": "#/components/schemas/adr_id"
},
{
"$ref": "#/components/schemas/inline_address"
}
],
"description": "Must either be an address ID or an inline object with correct address parameters. If an object is used, an address will be created, corrected, and standardized for free whenever possible using our US Address Verification engine (if it is a US address), and returned back with an ID. Depending on your <a href=\"https://dashboard.lob.com/#/settings/editions\" target=\"_blank\">Print & Mail Edition</a>, US addresses may also be run through <a href=\"#tag/National-Change-of-Address\">National Change of Address Linkage(NCOALink)</a>. Non-US addresses will be standardized into uppercase only. If a US address used does not meet your account’s <a href=\"https://dashboard.lob.com/#/settings/account\" target=\"_blank\">US Mail strictness setting</a>, the request will fail. <a href=\"https://help.lob.com/print-and-mail/all-about-addresses\" target=\"_blank\">Lob Guide: Verification of Mailing Addresses</a>"
}
}
}
intl_auto_id
{
"type": "string",
"pattern": "^intl_auto_[a-zA-Z0-9]+$",
"description": "Unique identifier prefixed with `intl_auto_`."
}
intl_autocompletions
{
"type": "object",
"properties": {
"id": {
"$ref": "#/components/schemas/intl_auto_id"
},
"suggestions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/intl_suggestions"
},
"maxItems": 10,
"minItems": 0,
"description": "An array of objects representing suggested addresses.\n"
}
}
}
intl_autocompletions_writable
{
"type": "object",
"required": [
"address_prefix",
"country"
],
"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"
},
"country": {
"$ref": "#/components/schemas/country_extended"
},
"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"
}
}
}
intl_components
{
"type": "object",
"properties": {
"city": {
"$ref": "#/components/schemas/city"
},
"state": {
"$ref": "#/components/schemas/state"
},
"postal_code": {
"$ref": "#/components/schemas/postal_code"
},
"street_name": {
"$ref": "#/components/schemas/street_name"
},
"primary_number": {
"$ref": "#/components/schemas/primary_number"
}
},
"description": "A nested object containing a breakdown of each component of an address."
}
intl_suggestions
{
"type": "object",
"required": [
"primary_number_range",
"primary_line",
"city",
"country",
"state",
"zip_code"
],
"properties": {
"city": {
"$ref": "#/components/schemas/city"
},
"state": {
"$ref": "#/components/schemas/state"
},
"country": {
"$ref": "#/components/schemas/country_extended"
},
"zip_code": {
"$ref": "#/components/schemas/postal_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"
},
"primary_number_range": {
"type": "string",
"description": "The primary number range of the address that identifies a building at street level.\n"
}
}
}
intl_ver_id
{
"type": "string",
"pattern": "^intl_ver_[a-zA-Z0-9]+$",
"description": "Unique identifier prefixed with `intl_ver_`."
}
intl_verification
{
"allOf": [
{
"$ref": "#/components/schemas/intl_verification_base"
},
{
"type": "object",
"properties": {
"id": {
"$ref": "#/components/schemas/intl_ver_id"
},
"object": {
"enum": [
"intl_verification"
],
"type": "string",
"default": "intl_verification",
"description": "Value is resource type."
},
"status": {
"enum": [
"LV4",
"LV3",
"LV2",
"LV1",
"LF4",
"LF3",
"LF2",
"LF1",
"LM4",
"LM3",
"LM2",
"LU1"
],
"type": "string",
"description": "The status level for the country. This represents the maximum level of\naccuracy an input address can be verified to.\n\n* `LV4` - Verified. The input data is correct. All input data was able to match in databases.\n* `LV3` - Verified. The input data is correct. All input data was able to match in databases <em>after</em> some or all elements were standarized. The input data may also be using outdated city, state, or country names.\n* `LV2` - Verified. The input data is correct although some input data is unverifiable due to incomplete data.\n* `LV1` - Verified. The input data is acceptable but in an attempt to standarize user input, errors were introduced.\n* `LF4` - Fixed. The input data is matched and fixed. (Example: Brighon, UK -> Brighton, UK)\n* `LF3` - Fixed. The input data is matched and fixed but some elements such as Subbuilding number and house number cannot be checked.\n* `LF2` - Fixed. The input data is matched but some elements such as Street cannot be checked.\n* `LF1` - Fixed. The input data is acceptable but in an attempt to standarize user input, errors were introduced.\n* `LM4` - Missing Info. The input data cannot be corrected completely.\n* `LM3` - Missing Info. The input data cannot be corrected completely and there were multiple matches found in databases.\n* `LM2` - Missing Info. The input data cannot be corrected completely and only some elements were found.\n* `LU1` - Unverified. The input data cannot be corrected or matched.\n"
},
"country": {
"$ref": "#/components/schemas/country_short"
},
"coverage": {
"enum": [
"SUBBUILDING",
"HOUSENUMBER/BUILDING",
"STREET",
"LOCALITY",
"SPARSE"
],
"type": "string",
"description": "The coverage level for the country. This represents the maximum level of\naccuracy an input address can be verified to.\n\n* `SUBBUILDING` - Coverage down to unit numbers. For example, in an apartment or a large building\n* `HOUSENUMBER/BUILDING` - Coverage down to house number. For example, the address where a house or building may be located\n* `STREET` - Coverage down to street. This means that we can verify that an street exists in a city, state, country\n* `LOCALITY` - Coverage down to city, state, or village or province. This means that we can verify that a city, village, province, or state exists in a country. Countries differ in how they define what is a province, state, city, village, etc. This attempts to group eveyrthing together.\n* `SPARSE` - Some addresses for this country exist in our databases\n"
},
"last_line": {
"type": "string",
"description": "Combination of the following applicable `components`:\n* `city`\n* `state`\n* `zip_code`\n* `zip_code_plus_4`\n"
},
"components": {
"$ref": "#/components/schemas/intl_components"
},
"deliverability": {
"enum": [
"deliverable",
"deliverable_missing_info",
"undeliverable",
"no_match"
],
"type": "string",
"description": "Summarizes the deliverability of the `intl_verification` object. Possible values are:\n* `deliverable` — The address is deliverable.\n* `deliverable_missing_info` — The address is missing some information, but is most likely deliverable.\n* `undeliverable` — The address is most likely not deliverable. Some components of the address (such as city or postal code) may have been found.\n* `no_match` — This address is not deliverable. No matching street could be found within the city or postal code.\n"
}
}
}
]
}
intl_verification_base
{
"type": "object",
"properties": {
"recipient": {
"$ref": "#/components/schemas/recipient"
},
"primary_line": {
"$ref": "#/components/schemas/primary_line"
},
"secondary_line": {
"$ref": "#/components/schemas/secondary_line"
}
}
}
intl_verification_writable
{
"oneOf": [
{
"$ref": "#/components/schemas/multiple_components_intl"
},
{
"$ref": "#/components/schemas/single_line_address_intl"
}
]
}
intl_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/intl_verification"
},
{
"$ref": "#/components/schemas/error"
}
]
}
}
}
}
intl_verifications_payload
{
"type": "object",
"required": [
"addresses"
],
"properties": {
"addresses": {
"type": "array",
"items": {
"$ref": "#/components/schemas/multiple_components_intl"
},
"maxItems": 20,
"minItems": 1
}
}
}
letter
{
"oneOf": [
{
"allOf": [
{
"title": "regular"
},
{
"$ref": "#/components/schemas/no_extra_service"
}
]
},
{
"allOf": [
{
"title": "registered"
},
{
"$ref": "#/components/schemas/registered"
}
]
},
{
"allOf": [
{
"title": "certified"
},
{
"$ref": "#/components/schemas/certified"
}
]
}
]
}
letter_add_on_types
{
"enum": [
"buckslips",
"cards",
"custom_envelope"
],
"type": "string"
}
letter_deletion
{
"properties": {
"id": {
"$ref": "#/components/schemas/ltr_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."
}
letter_details_returned
{
"properties": {
"cards": {
"type": "array",
"items": {
"$ref": "#/components/schemas/card_id"
},
"maxItems": 1,
"minItems": 0,
"nullable": true,
"description": "A single-element array containing an existing card id in a string format. See [cards](#tag/Cards) for more information."
},
"color": {
"$ref": "#/components/schemas/color"
},
"buckslips": {
"type": "array",
"items": {
"$ref": "#/components/schemas/buckslip_id"
},
"maxItems": 1,
"minItems": 0,
"nullable": true,
"description": "A single-element array containing an existing buckslip id in a string format. See [buckslips](#tag/Buckslips) for more information."
},
"mail_type": {
"$ref": "#/components/schemas/mail_type"
},
"double_sided": {
"$ref": "#/components/schemas/double_sided"
},
"extra_service": {
"$ref": "#/components/schemas/extra_service"
},
"custom_envelope": {
"$ref": "#/components/schemas/custom_envelope_returned"
},
"address_placement": {
"$ref": "#/components/schemas/address_placement"
},
"file_original_url": {
"type": "string",
"description": "The original URL of the `file` template."
}
},
"description": "Properties that the letters in your Creative should have. Check within in order to add a QR code to your creative."
}
letter_details_writable
{
"required": [
"color"
],
"properties": {
"cards": {
"type": "array",
"items": {
"$ref": "#/components/schemas/card_id"
},
"maxItems": 1,
"minItems": 0,
"nullable": true,
"description": "A single-element array containing an existing card id in a string format. See [cards](#tag/Cards) for more information."
},
"color": {
"$ref": "#/components/schemas/color"
},
"qr_code": {
"$ref": "#/components/schemas/qr_code_campaigns"
},
"buckslips": {
"type": "array",
"items": {
"$ref": "#/components/schemas/buckslip_id"
},
"maxItems": 1,
"minItems": 0,
"nullable": true,
"description": "A single-element array containing an existing buckslip id in a string format. See [buckslips](#tag/Buckslips) for more information. Note that buckslip letter campaigns require a minimum send quantity of 5,000 letters per campaign."
},
"mail_type": {
"$ref": "#/components/schemas/mail_type"
},
"add_on_types": {
"type": "array",
"items": {
"$ref": "#/components/schemas/letter_add_on_types"
},
"maxItems": 3,
"minItems": 0,
"nullable": true,
"description": "An array containing the types of add-ons for the Letter Creative."
},
"double_sided": {
"$ref": "#/components/schemas/double_sided"
},
"extra_service": {
"$ref": "#/components/schemas/extra_service"
},
"custom_envelope": {
"$ref": "#/components/schemas/user_provided"
},
"address_placement": {
"$ref": "#/components/schemas/address_placement"
}
},
"description": "Properties that the letters in your Creative should have. Check within in order to add a QR code to your creative."
}
letter_editable
{
"allOf": [
{
"$ref": "#/components/schemas/input_to"
},
{
"$ref": "#/components/schemas/input_from"
},
{
"$ref": "#/components/schemas/editable"
},
{
"type": "object",
"required": [
"to",
"from",
"file",
"color",
"use_type"
],
"properties": {
"fsc": {
"type": "boolean",
"default": false,
"description": "This is in beta. Contact support@lob.com or your account contact to learn more. Not available for `A4` and `us_legal` letter size."
},
"file": {
"$ref": "#/components/schemas/ltr_file"
},
"size": {
"$ref": "#/components/schemas/ltr_size"
},
"cards": {
"type": "array",
"items": {
"$ref": "#/components/schemas/card_id"
},
"maxItems": 1,
"minItems": 0,
"nullable": true,
"description": "A single-element array containing an existing card id in a string format. See [cards](#tag/Cards) for more information. Not available for `us_legal` letter size."
},
"color": {
"allOf": [
{
"$ref": "#/components/schemas/color"
},
{
"default": false
}
]
},
"qr_code": {
"$ref": "#/components/schemas/qr_code"
},
"use_type": {
"$ref": "#/components/schemas/ltr_use_type"
},
"mail_type": {
"$ref": "#/components/schemas/mail_type"
},
"double_sided": {
"$ref": "#/components/schemas/double_sided"
},
"extra_service": {
"$ref": "#/components/schemas/extra_service"
},
"custom_envelope": {
"$ref": "#/components/schemas/user_provided"
},
"perforated_page": {
"type": "integer",
"nullable": true,
"description": "Required if `return_envelope` is `true`. The number of the page that should be perforated for use with the return envelope. Must be greater than or equal to `1`. The blank page added by `address_placement=insert_blank_page` will be ignored when considering the perforated page number. To see how perforation will impact your letter design, view our <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_perf_template.pdf\" target=\"_blank\">perforation guide</a>."
},
"return_envelope": {
"$ref": "#/components/schemas/return_envelope_user_provided"
},
"billing_group_id": {
"$ref": "#/components/schemas/billing_group_id"
},
"address_placement": {
"$ref": "#/components/schemas/address_placement"
}
}
}
]
}
letter_generated_base
{
"allOf": [
{
"$ref": "#/components/schemas/generated"
},
{
"$ref": "#/components/schemas/from"
},
{
"type": "object",
"required": [
"id",
"from",
"use_type"
],
"properties": {
"id": {
"$ref": "#/components/schemas/ltr_id"
},
"fsc": {
"type": "boolean",
"default": false,
"description": "This is in beta. Contact support@lob.com or your account contact to learn more. Not available for `A4` letter size."
},
"url": {
"$ref": "#/components/schemas/signed_link"
},
"object": {
"enum": [
"letter"
],
"type": "string",
"default": "letter",
"description": "Value is resource type."
},
"status": {
"$ref": "#/components/schemas/status"
},
"use_type": {
"$ref": "#/components/schemas/ltr_use_type"
},
"campaign_id": {
"$ref": "#/components/schemas/campaign_id"
},
"template_id": {
"allOf": [
{
"description": "The unique ID of the HTML template used for the letter."
},
{
"$ref": "#/components/schemas/tmpl_id"
}
]
},
"failure_reason": {
"allOf": [
{
"$ref": "#/components/schemas/failure_reason"
},
{
"nullable": true
}
]
},
"template_version_id": {
"allOf": [
{
"type": "string",
"description": "The unique ID of the specific version of the HTML template used for the letter."
},
{
"$ref": "#/components/schemas/vrsn_id"
}
]
}
}
}
]
}
letter_types
{
"enum": [
"letter.created",
"letter.rendered_pdf",
"letter.rendered_thumbnails",
"letter.deleted",
"letter.delivered",
"letter.failed",
"letter.mailed",
"letter.in_transit",
"letter.in_local_area",
"letter.international_exit",
"letter.processed_for_delivery",
"letter.re-routed",
"letter.returned_to_sender",
"letter.certified.mailed",
"letter.certified.in_transit",
"letter.certified.in_local_area",
"letter.certified.processed_for_delivery",
"letter.certified.re-routed",
"letter.certified.returned_to_sender",
"letter.certified.delivered",
"letter.certified.pickup_available",
"letter.certified.issue",
"letter.return_envelope.created",
"letter.return_envelope.delivered",
"letter.return_envelope.in_transit",
"letter.return_envelope.in_local_area",
"letter.return_envelope.international_exit",
"letter.return_envelope.processed_for_delivery",
"letter.return_envelope.re_routed",
"letter.return_envelope.returned_to_sender",
"letter.viewed"
],
"type": "string",
"description": "Unique identifier referring to status of letter"
}
link_list
{
"type": "array",
"items": {
"$ref": "#/components/schemas/link_single"
},
"maxItems": 1000,
"minItems": 1,
"description": "Array of links to shorten."
}
link_response
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier prefixed with `lnk_`."
},
"domain_id": {
"type": "string",
"description": "A unique identifier for the registered domain."
},
"short_link": {
"type": "string",
"description": "The shortened URL for the associated original URL."
},
"campaign_id": {
"$ref": "#/components/schemas/cmp_id"
},
"resource_id": {
"type": "string",
"description": "The unique ID of the associated resource where the link was used."
},
"metadata_tag": {
"$ref": "#/components/schemas/metadata"
},
"redirect_link": {
"$ref": "#/components/schemas/redirect_link"
},
"billing_group_id": {
"$ref": "#/components/schemas/billing_group_id"
}
}
}
link_single
{
"type": "object",
"required": [
"redirect_link"
],
"properties": {
"slug": {
"type": "string",
"description": "The unique path for the shortened URL, if empty a unique path will be used."
},
"domain": {
"type": "string",
"description": "The registered domain to be used for the short URL."
},
"metadata_tag": {
"$ref": "#/components/schemas/metadata"
},
"redirect_link": {
"$ref": "#/components/schemas/redirect_link"
},
"billing_group_id": {
"$ref": "#/components/schemas/billing_group_id"
}
}
}
links_response
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/link_response"
},
"description": "list of links\n"
},
"count": {
"type": "integer",
"description": "The number of results in the current response."
},
"limit": {
"type": "integer",
"description": "How many results to return."
},
"offset": {
"type": "integer",
"description": "An integer that designates the offset at which to begin returning results. Defaults to 0."
}
}
}
list
{
"type": "object",
"properties": {
"count": {
"$ref": "#/components/schemas/count"
},
"object": {
"$ref": "#/components/schemas/object"
},
"next_url": {
"type": "string",
"nullable": true,
"description": "Url of next page of items in list."
},
"total_count": {
"type": "integer",
"description": "Indicates the total number of records. Provided when the request specifies an \"include\" query parameter"
},
"previous_url": {
"type": "string",
"nullable": true,
"description": "Url of previous page of items in list."
}
},
"description": "Multiple items returned in order"
}
lob_base
{
"type": "object",
"required": [
"date_created",
"date_modified",
"object"
],
"properties": {
"object": {
"$ref": "#/components/schemas/object"
},
"deleted": {
"$ref": "#/components/schemas/deleted"
},
"date_created": {
"$ref": "#/components/schemas/date_created"
},
"date_modified": {
"$ref": "#/components/schemas/date_modified"
}
}
}
lob_confidence_score
{
"type": "object",
"required": [
"score",
"level"
],
"properties": {
"level": {
"enum": [
"high",
"medium",
"low",
""
],
"type": "string",
"description": "Indicates the likelihood that the address is a valid, mail-receiving address. Possible values are:\n - `high` — Over 70% of mailpieces Lob has sent to this address were delivered successfully and recent mailings were also successful.\n - `medium` — Between 40% and 70% of mailpieces Lob has sent to this address were delivered successfully.\n - `low` — Less than 40% of mailpieces Lob has sent to this address were delivered successfully and recent mailings weren't successful.\n - `\"\"` — No tracking data exists for this address or lob deliverability was unable to find a corresponding level of mail success.\n"
},
"score": {
"type": "number",
"format": "float",
"default": null,
"maximum": 100,
"minimum": 0,
"nullable": true,
"description": "A numerical score between 0 and 100 that represents the percentage of mailpieces Lob has sent to this addresses that have been delivered successfully over the past 2 years. Will be `null` if no tracking data exists for this address.\n"
}
},
"description": "Lob Confidence Score is a nested object that provides a numerical value between 0-100 of the likelihood that an address is deliverable based on Lob’s mail delivery data to over half of US households."
}
lob_credits_balance
{
"type": "object",
"required": [
"balance"
],
"properties": {
"balance": {
"type": "number",
"example": 1000,
"description": "Account's current balance of Lob Credits. Can be positive, negative, or zero."
}
}
}
local_file_path
{
"type": "string",
"pattern": "^(?!https://)[a-zA-Z0-9@:%._+~#=/]{1,256}.(html?|pdf|png|jpg)$",
"description": "The path to a local file."
}
location
{
"type": "object",
"required": [
"latitude",
"longitude"
],
"properties": {
"latitude": {
"type": "number",
"format": "float",
"maximum": 90,
"minimum": -90,
"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 input with `longitude` to pinpoint locations on a map.\n"
},
"longitude": {
"type": "number",
"format": "float",
"maximum": 180,
"minimum": -180,
"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 input with `latitude` to pinpoint locations on a map.\n"
}
}
}
location_analysis
{
"type": "object",
"required": [
"latitude",
"longitude",
"distance"
],
"properties": {
"distance": {
"type": "number",
"format": "float",
"description": "The distance from the input location to this exact zip code in miles.\n"
},
"latitude": {
"type": "number",
"format": "float",
"maximum": 90,
"minimum": -90,
"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"
},
"longitude": {
"type": "number",
"format": "float",
"maximum": 180,
"minimum": -180,
"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"
}
},
"description": "A nested object containing a breakdown of the analysis of a reverse geocoded location."
}
ltr_file
{
"oneOf": [
{
"$ref": "#/components/schemas/html_string"
},
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"$ref": "#/components/schemas/remote_file_url"
},
{
"type": "string",
"pattern": "^(?!https://)[a-zA-Z0-9@:%._+~#=/]{1,256}.(html?|pdf)$"
}
],
"description": "Notes:\n- HTML merge variables should not include delimiting whitespace.\n- All pages of a supplied PDF file must be sized at 8.5\"x11\", while supplied HTML will be rendered and trimmed to as many 8.5\"x11\" pages as necessary.\n- For design specifications, please see our <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_template.pdf\" target=\"_blank\">PDF</a> and [HTML](#section/HTML-Examples) templates.\n- If a `custom_envelope` is used, follow <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_custom_envelope.pdf\" target=\"_blank\">this template</a>.\n- For domestic destinations, the file limit is 60 pages single-sided or 120 pages double-sided. For international destinations, the file limit is 6 pages single-sided or 12 pages double-sided. PDFs that surpass the file limit will error, while HTML that renders more pages than the file limit will be trimmed.\n- Any letters over 6 pages single-sided or 12 pages double-sided will be placed in a <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_flat_template.pdf\" target=\"_blank\">flat envelope</a> instead of the standard double window envelope.\n\nSee <a href=\"https://lob.com/pricing/print-mail#compare\" target=\"_blank\">pricing</a> for extra costs incurred."
}
ltr_id
{
"type": "string",
"pattern": "^ltr_[a-zA-Z0-9]+$",
"description": "Unique identifier prefixed with `ltr_`."
}
ltr_size
{
"enum": [
"us_letter",
"us_legal"
],
"type": "string",
"default": "us_letter",
"description": "Specifies the size of the letter. It accepts two values `us_letter` and `us_legal`. If the [Lob-Version header](https://docs.lob.com/#tag/Versioning-and-Changelog) in the request is set to `2024-01-01` and above, the `size` property is automatically included with the default value of `us_letter`, unless explicitly specified.\n\nPlease note that attempting to include the `size` property in the request with the `Lob-Version` header predating to `2024-01-01` will result in an error.\n"
}
ltr_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)."
}
mail_type
{
"enum": [
"usps_first_class",
"usps_standard"
],
"type": "string",
"default": "usps_first_class",
"description": "A string designating the mail postage type:\n* `usps_first_class` - (default)\n* `usps_standard` - a <a href=\"https://lob.com/pricing/print-mail#compare\" target=\"_blank\">cheaper option</a> which is\nless predictable and takes longer to deliver. `usps_standard` cannot be used with `4x6`\npostcards or for any postcards sent outside of the United States.\n"
}
merge_variable_column_mapping
{
"type": "object",
"title": "Merge Variable Mapping",
"default": null,
"example": {
"name": "recipient_name",
"gift_code": "code"
},
"nullable": true,
"description": "The mapping of column headers in your file to the merge variables present in your creative. See our <a href=\"https://help.lob.com/print-and-mail/building-a-mail-strategy/campaign-or-triggered-sends/campaign-audience-guide#step-3-map-merge-variable-data-if-applicable-7\" target=\"_blank\">Campaign Audience Guide</a> for additional details. <br />If a merge variable has the same \"name\" as a \"key\" in the `requiredAddressColumnMapping` or `optionalAddressColumnMapping` objects, then they **CANNOT** have a different value in this object. If a different value is provided, then when the campaign is processing it will get overwritten with the mapped value present in the `requiredAddressColumnMapping` or `optionalAddressColumnMapping` objects. If using customized QR code redirect from the Audience file, then a `qr_code_redirect_url` must be mapped to the column header as used in the CSV."
}
merge_variables
{
"type": "object",
"nullable": true,
"maxLength": 25000,
"description": "You can input a merge variable payload object to your template to render dynamic content. For example, if you have a template like: `{{variable_name}}`, pass in `{\"variable_name\": \"Harry\"}` to render `Harry`. `merge_variables` must be an object. Any type of value is accepted as long as the object is valid JSON; you can use `strings`, `numbers`, `booleans`, `arrays`, `objects`, or `null`. The max length of the object is 25,000 characters. If you call `JSON.stringify` on your object, it can be no longer than 25,000 characters. Your variable names cannot contain any whitespace or any of the following special characters: `!`, `\"`, `#`, `%`, `&`, `'`, `(`, `)`, `*`, `+`, `,`, `/`, `;`, `<`, `=`, `>`, `@`, `[`, `\\`, `]`, `^`, `` ` ``, `{`, `|`, `}`, `~`. More instructions can be found in <a href=\"https://help.lob.com/print-and-mail/designing-mail-creatives/dynamic-personalization#using-html-and-merge-variables-10\" target=\"_blank\">our guide to using html and merge variables</a>. Depending on your <a href=\"https://dashboard.lob.com/#/settings/account\" target=\"_blank\">Merge Variable strictness</a> setting, if you define variables in your HTML but do not pass them here, you will either receive an error or the variable will render as an empty string."
}
metadata
{
"type": "object",
"pattern": "[^\"\\\\]{0,500}",
"maxLength": 500,
"description": "Use metadata to store custom information for tagging and labeling back to your internal systems. Must be an object with up to 20 key-value pairs. Keys must be at most 40 characters and values must be at most 500 characters. Neither can contain the characters `\"` and `\\`. i.e. '{\"customer_id\" : \"NEWYORK2015\"}' Nested objects are not supported. See [Metadata](#section/Metadata) for more information.",
"additionalProperties": {
"type": "string"
}
}
multiple_components
{
"allOf": [
{
"anyOf": [
{
"title": "US verification object with `city` and `state`",
"required": [
"city",
"state"
]
},
{
"title": "US verification object with `zip_code`",
"required": [
"zip_code"
]
}
]
},
{
"type": "object",
"required": [
"primary_line"
],
"properties": {
"city": {
"allOf": [
{
"$ref": "#/components/schemas/city_no_description"
},
{
"type": "string",
"description": "The name of the city. `city` and `state` are required if no `zip_code` is passed."
}
]
},
"state": {
"type": "string",
"maxLength": 50,
"description": "The <a href=\"https://en.wikipedia.org/wiki/ISO_3166-2:US\" target=\"_blank\">ISO 3166-2</a> two letter code or subdivision name for the state. `city` and `state` are required if no `zip_code` is passed."
},
"zip_code": {
"allOf": [
{
"description": "Required if `city` and `state` are not passed in. If included, must be formatted as a US ZIP or ZIP+4 (e.g. `94107`, `941072282`, `94107-2282`)."
},
{
"$ref": "#/components/schemas/zip_code"
}
]
},
"recipient": {
"$ref": "#/components/schemas/recipient"
},
"primary_line": {
"$ref": "#/components/schemas/primary_line_us"
},
"urbanization": {
"$ref": "#/components/schemas/urbanization"
},
"secondary_line": {
"$ref": "#/components/schemas/secondary_line"
}
}
}
]
}
multiple_components_intl
{
"allOf": [
{
"$ref": "#/components/schemas/intl_verification_base"
},
{
"type": "object",
"required": [
"primary_line",
"country"
],
"properties": {
"city": {
"$ref": "#/components/schemas/city"
},
"state": {
"type": "string",
"description": "The name of the state."
},
"country": {
"$ref": "#/components/schemas/country_extended"
},
"postal_code": {
"$ref": "#/components/schemas/postal_code"
}
}
}
]
}
multiple_components_list
{
"type": "object",
"required": [
"addresses"
],
"properties": {
"addresses": {
"type": "array",
"items": {
"$ref": "#/components/schemas/multiple_components"
},
"maxItems": 20,
"minItems": 1
}
}
}
name
{
"type": "string",
"maxLength": 255,
"description": "Name of the billing group."
}
no_extra_service
{
"allOf": [
{
"type": "object",
"required": [
"color"
],
"properties": {
"cards": {
"type": "array",
"items": {
"$ref": "#/components/schemas/card"
},
"nullable": true,
"description": "An array of cards associated with a specific letter"
},
"color": {
"$ref": "#/components/schemas/color"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"buckslips": {
"type": "array",
"items": {
"$ref": "#/components/schemas/buckslip"
},
"nullable": true,
"description": "An array of buckslip(s) associated with a specific letter"
},
"mail_type": {
"$ref": "#/components/schemas/mail_type"
},
"send_date": {
"$ref": "#/components/schemas/send_date"
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"double_sided": {
"$ref": "#/components/schemas/double_sided"
},
"return_address": {
"$ref": "#/components/schemas/return_address"
},
"custom_envelope": {
"$ref": "#/components/schemas/custom_envelope_returned"
},
"merge_variables": {
"$ref": "#/components/schemas/merge_variables"
},
"perforated_page": {
"type": "integer",
"nullable": true,
"description": "Required if `return_envelope` is `true`. The number of the page that should be perforated for use with the return envelope. Must be greater than or equal to `1`. The blank page added by `address_placement=insert_blank_page` will be ignored when considering the perforated page number. To see how perforation will impact your letter design, view our <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_perf_template.pdf\" target=\"_blank\">perforation guide</a>."
},
"return_envelope": {
"$ref": "#/components/schemas/return_envelope_returned"
},
"tracking_events": {
"type": "array",
"items": {
"$ref": "#/components/schemas/tracking_event_normal"
},
"description": "An array of tracking events ordered by ascending `time`."
},
"address_placement": {
"$ref": "#/components/schemas/address_placement"
}
}
},
{
"$ref": "#/components/schemas/letter_generated_base"
}
]
}
object
{
"type": "string",
"description": "Value is resource type."
}
optional_address_column_mapping
{
"type": "object",
"title": "Optional Address Columns",
"example": {
"company": "company",
"address_line2": "secondary_line",
"address_country": "country,"
},
"required": [
"address_line2",
"company",
"address_country"
],
"properties": {
"company": {
"type": "string",
"default": null,
"nullable": true,
"description": "The column header from the csv file that should be mapped to the optional field \"company\""
},
"address_line2": {
"type": "string",
"default": null,
"nullable": true,
"description": "The column header from the csv file that should be mapped to the optional field \"address_line2\""
},
"address_country": {
"type": "string",
"default": null,
"nullable": true,
"description": "The column header from the csv file that should be mapped to the optional field \"address_country\""
}
},
"description": "The mapping of column headers in your file to Lob-optional fields for the resource created. See our <a href=\"https://help.lob.com/print-and-mail/building-a-mail-strategy/campaign-or-triggered-sends/campaign-audience-guide#optional-columns-3\" target=\"_blank\">Campaign Audience Guide</a> for additional details."
}
postal_code
{
"type": "string",
"maxLength": 12,
"description": "The postal code."
}
postcard
{
"allOf": [
{
"$ref": "#/components/schemas/postcard_base"
},
{
"$ref": "#/components/schemas/generated"
},
{
"$ref": "#/components/schemas/from_us"
},
{
"type": "object",
"required": [
"id",
"front_template_id",
"back_template_id",
"url"
],
"properties": {
"id": {
"$ref": "#/components/schemas/psc_id"
},
"fsc": {
"type": "boolean",
"default": false,
"description": "This is in beta. Contact support@lob.com or your account contact to learn more. Not available for `4x6` or `A5` postcard sizes."
},
"url": {
"$ref": "#/components/schemas/signed_link"
},
"object": {
"enum": [
"postcard"
],
"type": "string",
"default": "postcard",
"description": "Value is resource type."
},
"status": {
"$ref": "#/components/schemas/status"
},
"use_type": {
"$ref": "#/components/schemas/psc_use_type"
},
"campaign_id": {
"$ref": "#/components/schemas/campaign_id"
},
"failure_reason": {
"allOf": [
{
"$ref": "#/components/schemas/failure_reason"
},
{
"nullable": true
}
]
},
"tracking_events": {
"type": "array",
"items": {
"$ref": "#/components/schemas/tracking_event_normal"
},
"nullable": true,
"description": "An array of tracking_event objects ordered by ascending `time`. Will not be populated for postcards created in test mode."
},
"back_template_id": {
"type": "string",
"pattern": "^tmpl_[a-zA-Z0-9]+$",
"nullable": true,
"description": "The unique ID of the HTML template used for the back of the postcard. Only filled out when the request contains a valid postcard template ID."
},
"front_template_id": {
"type": "string",
"pattern": "^tmpl_[a-zA-Z0-9]+$",
"nullable": true,
"description": "The unique ID of the HTML template used for the front of the postcard. Only filled out when the request contains a valid postcard template ID."
},
"back_template_version_id": {
"type": "string",
"pattern": "^vrsn_[a-zA-Z0-9]+$",
"nullable": true,
"description": "The unique ID of the specific version of the HTML template used for the back of the postcard. Only filled out when the request contains a valid postcard template ID."
},
"front_template_version_id": {
"type": "string",
"pattern": "^vrsn_[a-zA-Z0-9]+$",
"nullable": true,
"description": "The unique ID of the specific version of the HTML template used for the front of the postcard. Only filled out when the request contains a valid postcard template ID."
}
}
}
]
}
postcard_base
{
"allOf": [
{
"$ref": "#/components/schemas/editable"
},
{
"type": "object",
"properties": {
"size": {
"$ref": "#/components/schemas/postcard_size"
}
}
}
]
}
postcard_deletion
{
"properties": {
"id": {
"$ref": "#/components/schemas/psc_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."
}
postcard_editable
{
"allOf": [
{
"$ref": "#/components/schemas/postcard_base"
},
{
"$ref": "#/components/schemas/input_to"
},
{
"$ref": "#/components/schemas/input_from_us"
},
{
"type": "object",
"required": [
"to",
"front",
"back",
"use_type"
],
"properties": {
"fsc": {
"type": "boolean",
"default": false,
"description": "This is in beta. Contact support@lob.com or your account contact to learn more. Not available for `4x6` or `A5` postcard sizes."
},
"back": {
"$ref": "#/components/schemas/psc_back"
},
"front": {
"$ref": "#/components/schemas/psc_front"
},
"qr_code": {
"$ref": "#/components/schemas/qr_code"
},
"use_type": {
"$ref": "#/components/schemas/psc_use_type"
},
"billing_group_id": {
"$ref": "#/components/schemas/billing_group_id"
}
}
}
]
}
postcard_size
{
"enum": [
"4x6",
"6x9",
"6x11"
],
"type": "string",
"default": "4x6",
"description": "Specifies the size of the postcard. Only `4x6` postcards can be sent to international destinations.\n"
}
postcard_types
{
"enum": [
"postcard.created",
"postcard.rendered_pdf",
"postcard.rendered_thumbnails",
"postcard.deleted",
"postcard.delivered",
"postcard.failed",
"postcard.mailed",
"postcard.in_transit",
"postcard.in_local_area",
"postcard.international_exit",
"postcard.processed_for_delivery",
"postcard.re-routed",
"postcard.returned_to_sender",
"postcard.viewed"
],
"type": "string",
"description": "Unique identifier referring to status of postcard"
}
primary_line
{
"type": "string",
"maxLength": 200,
"description": "The primary delivery line (usually the street address) of the address.\n"
}
primary_line_us
{
"type": "string",
"maxLength": 500,
"description": "The primary delivery line (usually the street address) of the address.\nCombination of the following applicable `components`:\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"
}
primary_number
{
"type": "string",
"description": "The numeric or alphanumeric part of an address preceding the street name. Often the house, building, or PO Box number."
}
psc_back
{
"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 back of your postcard.\n\nNotes:\n- HTML merge variables should not include delimiting whitespace.\n- PDF, PNG, and JPGs must be sized at 4.25\"x6.25\", 6.25\"x9.25\", or 6.25\"x11.25\" 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 templates provided here:\n - <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/postcards/4x6_postcard.pdf\" target=\"_blank\">4x6 template</a>\n - <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/postcards/6x9_postcard.pdf\" target=\"_blank\">6x9 template</a>\n - <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/postcards/6x11_postcard.pdf\" target=\"_blank\">6x11 template</a>\n\n\nSee [here](#section/HTML-Examples) for HTML examples.\n"
}
psc_front
{
"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 front of your postcard.\n\nNotes:\n- HTML merge variables should not include delimiting whitespace.\n- PDF, PNG, and JPGs must be sized at 4.25\"x6.25\", 6.25\"x9.25\", or 6.25\"x11.25\" at 300 DPI, while supplied HTML will be rendered to the specified `size`.\n\nSee [here](#section/HTML-Examples) for HTML examples.\n"
}
psc_id
{
"type": "string",
"pattern": "^psc_[a-zA-Z0-9]+$",
"description": "Unique identifier prefixed with `psc_`."
}
psc_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)."
}
qr_code
{
"type": "object",
"required": [
"position",
"redirect_url",
"width"
],
"properties": {
"top": {
"type": "string",
"description": "Vertical distance (in inches) to place QR code from the top. Only allowed if \"bottom\" isn't provided."
},
"left": {
"type": "string",
"description": "Horizontal distance (in inches) to place QR code from the left. Only allowed if \"right\" isn't provided."
},
"pages": {
"type": "string",
"description": "Specify the pages where the QR code should be stamped in a comma separated format. Your QR code can be printed in the same position on multiple pages. For postcards, the values should either be \"front\", \"back\" (for either front or back) or \"front,back\" (for the QR code to be printed on both sides). For self-mailers, the values should either be \"inside\", \"outside\" (for either inside or outside) or \"inside,outside\" (for the QR code to be printed on both sides). For letters, the values can be specific page numbers (\"1\", \"3\"), page number ranges such as \"1-3\", or a comma separated combination of both (\"1,3,5-7\")."
},
"right": {
"type": "string",
"description": "Horizontal distance (in inches) to place QR code from the right. Only allowed if \"left\" isn't provided."
},
"width": {
"type": "string",
"description": "The size (in inches) of the QR code with a minimum of 1 inch. All QR codes are generated as a square."
},
"bottom": {
"type": "string",
"description": "Vertical distance (in inches) to place QR code from the bottom. Only allowed if \"top\" isn't provided."
},
"position": {
"enum": [
"relative"
],
"type": "string",
"description": "Sets how a QR code is being positioned in the document. Together with this, you should provide one of 'top' or 'bottom', and one of 'left' or 'right'."
},
"redirect_url": {
"type": "string",
"description": "The url to redirect the user when a QR code is scanned. The url must start with `https://`"
}
},
"description": "Customize and place a QR code on the creative at the required position. Not available for `us_legal` letter size and snap packs."
}
qr_code_campaigns
{
"type": "object",
"required": [
"position",
"width"
],
"properties": {
"top": {
"type": "string",
"description": "Vertical distance (in inches) to place QR code from the top. Only allowed if \"bottom\" isn't provided."
},
"left": {
"type": "string",
"description": "Horizontal distance (in inches) to place QR code from the left. Only allowed if \"right\" isn't provided."
},
"pages": {
"type": "string",
"description": "Specify the pages where the QR code should be stamped in a comma separated format. Your QR code can be printed in the same position on multiple pages. For postcards, the values should either be \"front\", \"back\" (for either front or back) or \"front,back\" (for the QR code to be printed on both sides). For self-mailers, the values should either be \"inside\", \"outside\" (for either inside or outside) or \"inside,outside\" (for the QR code to be printed on both sides). For letters, the values can be specific page numbers (\"1\", \"3\"), page number ranges such as \"1-3\", or a comma separated combination of both (\"1,3,5-7\")."
},
"right": {
"type": "string",
"description": "Horizontal distance (in inches) to place QR code from the right. Only allowed if \"left\" isn't provided."
},
"width": {
"type": "string",
"description": "The size (in inches) of the QR code with a minimum of 1 inch. All QR codes are generated as a square."
},
"bottom": {
"type": "string",
"description": "Vertical distance (in inches) to place QR code from the bottom. Only allowed if \"top\" isn't provided."
},
"position": {
"enum": [
"relative"
],
"type": "string",
"description": "Sets how a QR code is being positioned in the document. Together with this, you should provide one of 'top' or 'bottom', and one of 'left' or 'right'."
},
"redirect_url": {
"oneOf": [
{
"$ref": "#/components/schemas/single_redirect_url"
},
{
"$ref": "#/components/schemas/customized_redirect_url"
}
],
"description": "Redirect all mail recipients to either a single URL or a custom personalized URL for each recipient. To redirect to a single URL for the whole campaign, add a `redirect_url` in the request body along with the url as string. To redirect to a custom URL for each recipient, do not provide any value for `redirect_url`. Instead, create an extra column in the [audience file](https://help.lob.com/print-and-mail/building-a-mail-strategy/campaign-or-triggered-sends/campaign-audience-guide) with a unique link against each address row and while creating an upload, map `qr_code_redirect_url` to this column. If the QR code section is used but a redirection url is not provided or mapped while creating an upload, then there might be failures in creating individual mail pieces.\n"
}
},
"description": "Customize and place a QR code on all the postcards, letters or self mailers in a campaign. Redirect URLs can either be unique for each recipient, or a single link can be used for the whole campaign. See `redirect_url` attribute below for more details."
}
qr_code_scans
{
"allOf": [
{
"type": "object",
"properties": {
"scans": {
"type": "array",
"items": {
"$ref": "#/components/schemas/scans"
},
"description": "Detailed scan information associated with each mail piece."
},
"resource_id": {
"type": "string",
"description": "Unique identifier for each mail piece."
},
"date_created": {
"$ref": "#/components/schemas/date_created"
},
"number_of_scans": {
"type": "number",
"description": "Number of times the QR Code associated with this mail piece was scanned."
}
}
}
]
}
recipient
{
"type": "string",
"nullable": true,
"maxLength": 500,
"description": "The intended recipient, typically a person's or firm's name."
}
recipient_input
{
"allOf": [
{
"anyOf": [
{
"title": "Address object with `city` and `state`",
"required": [
"city",
"state"
]
},
{
"title": "Address object with `zip_code`",
"required": [
"zip_code"
]
}
]
},
{
"type": "object",
"required": [
"recipient",
"primary_line"
],
"properties": {
"city": {
"allOf": [
{
"$ref": "#/components/schemas/city_no_description"
},
{
"type": "string",
"description": "The name of the city. `city` and `state` are required if no `zip_code` is passed."
}
]
},
"state": {
"type": "string",
"maxLength": 50,
"description": "The <a href=\"https://en.wikipedia.org/wiki/ISO_3166-2:US\" target=\"_blank\">ISO 3166-2</a> two letter code or subdivision name for the state. `city` and `state` are required if no `zip_code` is passed."
},
"zip_code": {
"allOf": [
{
"description": "Required if `city` and `state` are not passed in. If included, must be formatted as a US ZIP or ZIP+4 (e.g. `94107`, `941072282`, `94107-2282`)."
},
{
"$ref": "#/components/schemas/zip_code"
}
]
},
"recipient": {
"$ref": "#/components/schemas/recipient"
},
"primary_line": {
"$ref": "#/components/schemas/primary_line_us"
},
"urbanization": {
"$ref": "#/components/schemas/urbanization"
},
"secondary_line": {
"$ref": "#/components/schemas/secondary_line"
}
}
}
]
}
recipient_validation
{
"type": "object",
"properties": {
"id": {
"$ref": "#/components/schemas/identity_validation_id"
},
"score": {
"type": "number",
"format": "float",
"default": null,
"maximum": 100,
"minimum": 0,
"nullable": true,
"description": "A numerical score between 0 and 100 that represents the likelihood the provided name is associated with a physical address.\n"
},
"object": {
"enum": [
"id_validation"
],
"type": "string",
"default": "id_validation",
"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/identity_validation_recipient"
},
"confidence": {
"enum": [
"high",
"medium",
"low",
""
],
"type": "string",
"description": "Indicates the likelihood the recipient name and address match based on our custom internal calculation. Possible values are:\n- `high` — Has a Lob confidence score greater than 70.\n- `medium` — Has a Lob confidence score between 40 and 70.\n- `low` — Has a Lob confidence score less than 40.\n- `\"\"` — No tracking data exists for this address.\n"
},
"primary_line": {
"$ref": "#/components/schemas/primary_line_us"
},
"urbanization": {
"$ref": "#/components/schemas/urbanization"
},
"secondary_line": {
"$ref": "#/components/schemas/secondary_line"
}
}
}
redirect_link
{
"type": "string",
"description": "The original target URL."
}
registered
{
"allOf": [
{
"type": "object",
"required": [
"extra_service",
"color"
],
"properties": {
"color": {
"$ref": "#/components/schemas/color"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"mail_type": {
"$ref": "#/components/schemas/mail_type"
},
"send_date": {
"$ref": "#/components/schemas/send_date"
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"double_sided": {
"$ref": "#/components/schemas/double_sided"
},
"extra_service": {
"enum": [
"registered"
],
"type": "string",
"description": "Add an extra service to your letter. See <a href=\"https://www.lob.com/pricing/print-mail#compare\" target=\"_blank\">pricing</a> for extra costs incurred.\n * registered - provides tracking and confirmation for international addresses\n"
},
"return_address": {
"$ref": "#/components/schemas/return_address"
},
"custom_envelope": {
"$ref": "#/components/schemas/custom_envelope_returned"
},
"merge_variables": {
"$ref": "#/components/schemas/merge_variables"
},
"perforated_page": {
"type": "integer",
"nullable": true,
"description": "Required if `return_envelope` is `true`. The number of the page that should be perforated for use with the return envelope. Must be greater than or equal to `1`. The blank page added by `address_placement=insert_blank_page` will be ignored when considering the perforated page number. To see how perforation will impact your letter design, view our <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_perf_template.pdf\" target=\"_blank\">perforation guide</a>."
},
"return_envelope": {
"$ref": "#/components/schemas/return_envelope_returned"
},
"tracking_events": {
"type": "array",
"items": {
"$ref": "#/components/schemas/tracking_event_normal"
},
"maxItems": 0,
"description": "Tracking events are not populated for registered letters."
},
"tracking_number": {
"type": "string",
"nullable": true,
"description": "The tracking number will appear here when it becomes available.\nDummy tracking numbers are not created in test mode."
},
"address_placement": {
"$ref": "#/components/schemas/address_placement"
}
}
},
{
"$ref": "#/components/schemas/letter_generated_base"
}
]
}
remote_file_url
{
"type": "string",
"pattern": "^https://[-a-zA-Z0-9@:%._+~#=/]{1,256}.(html?|pdf|png|jpg)$",
"description": "The location of a remote file. Remote URLs have a 20 MB file size limit and must be downloaded within 40 seconds.\n"
}
required_address_column_mapping
{
"type": "object",
"title": "Required Address Columns",
"example": {
"name": "recipient_name",
"address_zip": "zip_code",
"address_city": "city",
"address_line1": "primary_line",
"address_state": "state"
},
"required": [
"name",
"address_line1",
"address_city",
"address_state",
"address_zip"
],
"properties": {
"name": {
"type": "string",
"default": null,
"nullable": true,
"description": "The column header from the csv file that should be mapped to the required field `name`"
},
"address_zip": {
"type": "string",
"default": null,
"nullable": true,
"description": "The column header from the csv file that should be mapped to the required field `address_zip`"
},
"address_city": {
"type": "string",
"default": null,
"nullable": true,
"description": "The column header from the csv file that should be mapped to the required field `address_city`"
},
"address_line1": {
"type": "string",
"default": null,
"nullable": true,
"description": "The column header from the csv file that should be mapped to the required field `address_line1`"
},
"address_state": {
"type": "string",
"default": null,
"nullable": true,
"description": "The column header from the csv file that should be mapped to the required field `address_state`"
}
},
"description": "The mapping of column headers in your file to Lob-required fields for the resource created. 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."
}
resource_description
{
"type": "string",
"nullable": true,
"maxLength": 255,
"description": "An internal description that identifies this resource. Must be no longer than 255 characters.\n"
}
return_address
{
"oneOf": [
{
"$ref": "#/components/schemas/adr_id"
},
{
"$ref": "#/components/schemas/inline_address"
}
],
"description": "Specifies the address the return envelope will be sent back to. This is an optional argument that is available if an account is signed up for the return envelope tracking beta, and has `return_envelope`, and `perforated_page` fields populated in the API request."
}
return_envelope_returned
{
"oneOf": [
{
"type": "boolean"
},
{
"type": "object"
}
],
"properties": {
"id": {
"type": "string",
"description": "The unique ID of the Return Envelope."
},
"url": {
"type": "string",
"description": "The url of the return envelope."
},
"alias": {
"type": "string",
"description": "A quick reference name for the Return Envelope."
},
"object": {
"type": "string",
"description": "Value is resource type."
}
}
}
return_envelope_user_provided
{
"oneOf": [
{
"type": "boolean"
},
{
"type": "string"
}
],
"default": false,
"description": "Indicates if a return envelope is requested for the letter. The value corresponding to this field is by default a boolean. But if the account is signed up for custom return envelopes, the value is of type string and is `no_9_single_window` for a standard return envelope and a custom `return_envelope_id` for non-standard return envelopes.\n\nTo include a return envelope with your letter, set to `true` and specify the `perforated_page`. See <a href=\"https://www.lob.com/pricing/print-mail#compare\" target=\"_blank\">pricing</a> for extra costs incurred."
}
returned
{
"properties": {
"size": {
"$ref": "#/components/schemas/postcard_size"
},
"mail_type": {
"$ref": "#/components/schemas/mail_type"
},
"back_original_url": {
"type": "string",
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"description": "The original URL of the `back` template."
},
"front_original_url": {
"type": "string",
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"description": "The original URL of the `front` template."
}
},
"description": "Properties that the postcards in your Creative should have. Check within in order to add a QR code to your creative."
}
returned_resource
{
"oneOf": [
{
"allOf": [
{
"title": "Postcard Creative",
"required": [
"resource_type",
"details"
],
"properties": {
"details": {
"$ref": "#/components/schemas/returned"
},
"resource_type": {
"enum": [
"postcard"
],
"type": "string",
"description": "Mailpiece type for the creative"
}
}
},
{
"$ref": "#/components/schemas/creative_base"
}
]
},
{
"allOf": [
{
"title": "Letter Creative",
"required": [
"from",
"resource_type",
"details"
],
"properties": {
"details": {
"$ref": "#/components/schemas/letter_details_returned"
},
"resource_type": {
"enum": [
"letter"
],
"type": "string",
"description": "Mailpiece type for the creative"
}
}
},
{
"$ref": "#/components/schemas/creative_base"
}
]
},
{
"allOf": [
{
"title": "Self Mailer Creative",
"required": [
"resource_type",
"details"
],
"properties": {
"details": {
"$ref": "#/components/schemas/self_mailer_details_returned"
},
"resource_type": {
"enum": [
"self_mailer"
],
"type": "string",
"description": "Mailpiece type for the creative"
}
}
},
{
"$ref": "#/components/schemas/creative_base"
}
]
}
]
}
reverse_geocode
{
"type": "object",
"properties": {
"id": {
"$ref": "#/components/schemas/reverse_geocode_id"
},
"object": {
"enum": [
"us_reverse_geocode_lookup"
],
"type": "string",
"default": "us_reverse_geocode_lookup",
"description": "Value is resource type."
},
"addresses": {
"type": "array",
"items": {
"$ref": "#/components/schemas/addresses"
},
"description": "list of addresses\n"
}
}
}
reverse_geocode_id
{
"type": "string",
"pattern": "^us_reverse_geocode_[a-zA-Z0-9_]+$",
"description": "Unique identifier prefixed with `us_reverse_geocode_`."
}
scans
{
"type": "object",
"properties": {
"scan_date": {
"type": "string"
},
"ip_location": {
"type": "string"
}
}
}
secondary_line
{
"type": "string",
"maxLength": 500,
"description": "The secondary delivery line of the address. This field is typically empty but may contain information if `primary_line` is too long.\n"
}
self_mailer
{
"allOf": [
{
"$ref": "#/components/schemas/self_mailer_base"
},
{
"$ref": "#/components/schemas/generated"
},
{
"$ref": "#/components/schemas/from_us"
},
{
"type": "object",
"required": [
"id",
"url",
"use_type"
],
"properties": {
"id": {
"$ref": "#/components/schemas/sfm_id"
},
"fsc": {
"type": "boolean",
"default": false,
"description": "This is in beta. Contact support@lob.com or your account contact to learn more. Not available for `11x9_bifold` self-mailer size."
},
"url": {
"$ref": "#/components/schemas/signed_link"
},
"object": {
"enum": [
"self_mailer"
],
"type": "string",
"default": "self_mailer",
"description": "Value is resource type."
},
"status": {
"$ref": "#/components/schemas/status"
},
"use_type": {
"$ref": "#/components/schemas/sfm_use_type"
},
"campaign_id": {
"$ref": "#/components/schemas/campaign_id"
},
"failure_reason": {
"allOf": [
{
"$ref": "#/components/schemas/failure_reason"
},
{
"nullable": true
}
]
},
"tracking_events": {
"type": "array",
"items": {
"$ref": "#/components/schemas/tracking_event_certified"
},
"description": "An array of certified tracking events ordered by ascending `time`. Not populated in test mode."
},
"inside_template_id": {
"allOf": [
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"type": "string",
"nullable": true
}
],
"description": "The unique ID of the HTML template used for the inside of the self mailer."
},
"outside_template_id": {
"allOf": [
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"type": "string",
"nullable": true
}
],
"description": "The unique ID of the HTML template used for the outside of the self mailer."
},
"inside_template_version_id": {
"allOf": [
{
"$ref": "#/components/schemas/vrsn_id"
},
{
"type": "string",
"nullable": true
}
],
"description": "The unique ID of the specific version of the HTML template used for the inside of the self mailer."
},
"outside_template_version_id": {
"allOf": [
{
"$ref": "#/components/schemas/vrsn_id"
},
{
"type": "string",
"nullable": true
}
],
"description": "The unique ID of the specific version of the HTML template used for the outside of the self mailer."
}
}
}
]
}
self_mailer_base
{
"allOf": [
{
"$ref": "#/components/schemas/editable"
},
{
"type": "object",
"properties": {
"size": {
"$ref": "#/components/schemas/self_mailer_size"
}
}
}
]
}
self_mailer_deletion
{
"properties": {
"id": {
"$ref": "#/components/schemas/sfm_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."
}
self_mailer_details_returned
{
"properties": {
"size": {
"$ref": "#/components/schemas/self_mailer_size"
},
"mail_type": {
"$ref": "#/components/schemas/mail_type"
},
"inside_original_url": {
"type": "string",
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"description": "The original URL of the `inside` template."
},
"outside_original_url": {
"type": "string",
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"description": "The original URL of the `outside` template."
}
},
"description": "Properties that the self mailers in your Creative should have. Check within in order to add a QR code to your creative."
}
self_mailer_details_writable
{
"required": [
"color"
],
"properties": {
"size": {
"$ref": "#/components/schemas/self_mailer_size"
},
"qr_code": {
"$ref": "#/components/schemas/qr_code_campaigns"
},
"mail_type": {
"$ref": "#/components/schemas/mail_type"
}
},
"description": "Properties that the self mailers in your Creative should have. Check within in order to add a QR code to your creative."
}
self_mailer_editable
{
"allOf": [
{
"$ref": "#/components/schemas/self_mailer_base"
},
{
"$ref": "#/components/schemas/input_to"
},
{
"$ref": "#/components/schemas/input_from_us"
},
{
"type": "object",
"required": [
"to",
"inside",
"outside",
"use_type"
],
"properties": {
"fsc": {
"type": "boolean",
"default": false,
"description": "This is in beta. Contact support@lob.com or your account contact to learn more. Not available for `11x9_bifold` self-mailer size."
},
"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 self mailer.\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- Be sure to leave room for address and postage information by following the templates provided here:\n - <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/self_mailers/6x18_sfm_bifold_template.pdf\" target=\"_blank\">6x18 bifold template</a>\n - <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/self_mailers/12x9_sfm_bifold_template.pdf\" target=\"_blank\">12x9 bifold template</a>\n - <a href=\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/self_mailers/17_75x9_trifold_sfm_template.pdf\" target=\"_blank\">17.75x9 trifold 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 self mailer.\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"
},
"qr_code": {
"$ref": "#/components/schemas/qr_code"
},
"use_type": {
"$ref": "#/components/schemas/sfm_use_type"
},
"billing_group_id": {
"$ref": "#/components/schemas/billing_group_id"
}
}
}
]
}
self_mailer_size
{
"enum": [
"6x18_bifold",
"11x9_bifold",
"12x9_bifold",
"17.75x9_trifold"
],
"type": "string",
"default": "6x18_bifold",
"description": "Specifies the size of the self mailer. The `17.75x9_trifold` size is in beta. Contact support@lob.com or your account contact to learn more."
}
self_mailer_types
{
"enum": [
"self_mailer.created",
"self_mailer.rendered_pdf",
"self_mailer.rendered_thumbnails",
"self_mailer.deleted",
"self_mailer.delivered",
"self_mailer.failed",
"self_mailer.mailed",
"self_mailer.in_transit",
"self_mailer.in_local_area",
"self_mailer.international_exit",
"self_mailer.processed_for_delivery",
"self_mailer.re-routed",
"self_mailer.returned_to_sender",
"self_mailer.viewed"
],
"type": "string",
"description": "Unique identifier referring to status of self mailer"
}
send_date
{
"type": "string",
"anyOf": [
{
"format": "date-time"
},
{
"format": "date"
}
],
"description": "A timestamp in ISO 8601 format which specifies a date after the current time and up to 180 days in the future to send the letter off for production. Setting a send date overrides the default [cancellation window](#section/Cancellation-Windows) applied to the mailpiece. Until the `send_date` has passed, the mailpiece can be canceled. If a date in the format `2017-11-01` is passed, it will evaluate to midnight UTC of that date (`2017-11-01T00:00:00.000Z`). If a datetime is passed, that exact time will be used. A `send_date` passed with no time zone will default to UTC, while a `send_date` passed with a time zone will be converted to UTC."
}
sfm_id
{
"type": "string",
"pattern": "^sfm_[a-zA-Z0-9]+$",
"description": "Unique identifier prefixed with `sfm_`."
}
sfm_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)."
}
signed_link
{
"type": "string",
"pattern": "^https://lob-assets.com/(letters|postcards|bank-accounts|checks|self-mailers|cards|order-creatives)/([a-z]{3,4}_[a-z0-9]{15,16}|[a-z]{3}_[a-z0-9]{26}_[a-z]{4}_[a-z0-9]{26})('|_signature)(.pdf|_thumb_[a-z]+_[0-9]+.png|.png)?(version=[a-z0-9]*&)expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+",
"description": "A [signed link](#section/Asset-URLs) served over HTTPS. The link returned will expire in 30 days to prevent mis-sharing. Each time a GET request is initiated, a new signed URL will be generated."
}
single_line_address
{
"type": "object",
"required": [
"address"
],
"properties": {
"address": {
"type": "string",
"maxLength": 500,
"description": "The entire address in one string (e.g., \"210 King Street 94107\"). _Does not support a recipient and will error when other payload parameters are provided._\n"
}
}
}
single_line_address_intl
{
"type": "object",
"required": [
"address",
"country"
],
"properties": {
"address": {
"type": "string",
"maxLength": 500,
"description": "The entire address in one string (e.g., \"370 Water St C1N 1C4\").\n"
},
"country": {
"$ref": "#/components/schemas/country_extended"
}
}
}
single_redirect_url
{
"type": "string",
"description": "Redirect all QRs in the camapign to a common URL. Add a redirect_url in the request body along with the url as string."
}
snap_pack
{
"allOf": [
{
"$ref": "#/components/schemas/snap_pack_base"
},
{
"$ref": "#/components/schemas/generated"
},
{
"$ref": "#/components/schemas/from_us"
},
{
"type": "object",
"required": [
"id",
"url",
"use_type"
],
"properties": {
"id": {
"$ref": "#/components/schemas/snap_pack_id"
},
"fsc": {
"type": "boolean",
"default": false,
"description": "Contact support@lob.com or your account contact to learn more. Not available for snap_pack currently."
},
"url": {
"$ref": "#/components/schemas/signed_link"
},
"color": {
"$ref": "#/components/schemas/color"
},
"object": {
"enum": [
"snap_pack"
],
"type": "string",
"default": "snap_pack",
"description": "Value is resource type."
},
"status": {
"$ref": "#/components/schemas/status"
},
"use_type": {
"$ref": "#/components/schemas/snap_pack_use_type"
},
"campaign_id": {
"$ref": "#/components/schemas/campaign_id"
},
"failure_reason": {
"allOf": [
{
"$ref": "#/components/schemas/failure_reason"
},
{
"nullable": true
}
]
},
"tracking_events": {
"type": "array",
"items": {
"$ref": "#/components/schemas/tracking_event_normal"
},
"description": "An array of tracking events ordered by ascending `time`. Not populated in test mode."
},
"inside_template_id": {
"allOf": [
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"type": "string",
"nullable": true
}
],
"description": "The unique ID of the HTML template used for the inside of the snap pack."
},
"outside_template_id": {
"allOf": [
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"type": "string",
"nullable": true
}
],
"description": "The unique ID of the HTML template used for the outside of the snap pack."
},
"inside_template_version_id": {
"allOf": [
{
"$ref": "#/components/schemas/vrsn_id"
},
{
"type": "string",
"nullable": true
}
],
"description": "The unique ID of the specific version of the HTML template used for the inside of the snap pack."
},
"outside_template_version_id": {
"allOf": [
{
"$ref": "#/components/schemas/vrsn_id"
},
{
"type": "string",
"nullable": true
}
],
"description": "The unique ID of the specific version of the HTML template used for the outside of the snap pack."
}
}
}
]
}
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}$"
}
zip_code_type
{
"enum": [
"standard",
"po_box",
"unique",
"military",
""
],
"type": "string",
"description": "A description of the ZIP code type. For more detailed information about\neach ZIP code type, see [US Verification Details](#tag/US-Verification-Types).\n"
}
zip_id
{
"type": "string",
"pattern": "^us_zip_[a-zA-Z0-9]+$",
"description": "Unique identifier prefixed with `us_zip_`."
}
zip_lookup_city
{
"type": "object",
"required": [
"city",
"state",
"county",
"county_fips",
"preferred"
],
"properties": {
"city": {
"$ref": "#/components/schemas/city"
},
"state": {
"$ref": "#/components/schemas/state"
},
"county": {
"$ref": "#/components/schemas/county"
},
"preferred": {
"type": "boolean",
"example": true,
"description": "Indicates whether or not the city is the <a href=\"https://en.wikipedia.org/wiki/ZIP_Code#ZIP_Codes_and_previous_zoning_lines\" target=\"_blank\">USPS default city</a> (preferred city) of a ZIP code. There is only one preferred city per ZIP code, which will always be in position 0 in the array of cities.\n"
},
"county_fips": {
"$ref": "#/components/schemas/county_fips"
}
}
}