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."
}