Files
lob-openapi-agent/openapi.json
a2a-platform 31d5255002 deploy
2026-06-27 01:06:26 +00:00

22945 lines
1.1 MiB

{
"components": {
"headers": {
"ratelimit-limit": {
"description": "The rate limit for a given endpoint.",
"schema": {
"example": 150,
"type": "integer"
}
},
"ratelimit-remaining": {
"description": "The number of requests remaining in the current window.",
"schema": {
"example": 100,
"type": "integer"
}
},
"ratelimit-reset": {
"description": "The time at which the rate limit window resets in <a href=\"https://en.wikipedia.org/wiki/Unix_time\" target=\"_blank\">UTC epoch seconds</a>\n",
"schema": {
"example": 1528749846,
"type": "integer"
}
}
},
"mediaTypes": {
"all_billing_groups": {
"application/json": {
"example": {
"count": 2,
"data": [
{
"date_created": "2019-07-27T23:49:01.511Z",
"date_modified": "2019-07-27T23:49:01.511Z",
"description": "Test billing_group",
"id": "bg_d5a5a89da9106f8",
"metadata": {},
"object": "billing_group"
},
{
"date_created": "2019-03-29T10:22:34.642Z",
"date_modified": "2019-03-29T10:22:34.642Z",
"description": "Test billing_group",
"id": "bg_59b2150ae120887",
"metadata": {},
"object": "billing_group"
}
],
"next_url": null,
"object": "list",
"prev_url": null
},
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"properties": {
"data": {
"description": "list of billing_groups",
"items": {
"$ref": "#/components/schemas/billing_group"
},
"type": "array"
}
},
"type": "object"
}
]
}
}
},
"all_buckslip_orders": {
"application/json": {
"example": {
"count": 1,
"data": [
{
"availability_date": "2021-10-12T21:41:48.326Z",
"buckslip_id": "bck_6afffd19045076c",
"cancelled_reason": "No longer needed",
"date_created": "2021-10-07T21:03:18.871Z",
"date_modified": "2021-10-16T01:00:30.144Z",
"expected_availability_date": "2021-11-04T21:03:18.871Z",
"id": "bo_e0f8a0562a06bea7f",
"object": "buckslip_order",
"quantity_ordered": 5000,
"status": "available",
"unit_price": 0.75
}
],
"next_url": null,
"object": "list",
"previous_url": null
},
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"properties": {
"data": {
"description": "List of buckslip orders",
"items": {
"$ref": "#/components/schemas/buckslip_order"
},
"type": "array"
}
},
"type": "object"
}
]
}
}
},
"all_buckslips": {
"application/json": {
"example": {
"count": 1,
"data": [
{
"account_id": "fa9ea650fc7b31a89f92",
"allocated_quantity": 0,
"auto_reorder": false,
"available_quantity": 0,
"back_original_url": "https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw",
"buckslip_orders": [],
"date_created": "2021-03-24T22:51:42.838Z",
"date_modified": "2021-03-24T22:51:42.838Z",
"description": null,
"finish": "gloss",
"front_original_url": "https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw",
"has_back": true,
"has_front": true,
"id": "bck_7a6d73c5c8457fc",
"mode": "test",
"object": "buckslip",
"onhand_quantity": 0,
"pending_quantity": 0,
"projected_quantity": 0,
"raw_url": "https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw",
"reorder_quantity": null,
"send_date": "2021-03-24T22:51:42.838Z",
"size": "8.75x3.75",
"status": "rendered",
"stock": "text",
"threshold_amount": 0,
"thumbnails": [
{
"large": "https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_large_1.png?version=v1&expires=1636910992&signature=FKSzymA13j-CQ0uk20cGHZTzT3vimzNBYrgp-xifLFg4mMdo1BZALR5O0aF_jVhsX614hKP35ONdYl47TQxXAw",
"medium": "https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_medium_1.png?version=v1&expires=1636910992&signature=VgL_2Ckm_kxKiWGgWtdNoy9HHOn8dGYSVOn7UqyCbwdbVlUtx28TRN4Bo8Iru3n0keKp9He0YhKT1ILotznMDA",
"small": "https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_small_1.png?version=v1&expires=1636910992&signature=mrv8JDvpZK4I8WUGH0tPdtK-My5oes0Ltj_gL7BDw96SpCTTeZFHkz81SzclyFP9dQRtlsvAsjcuGcTBvCvOCg"
}
],
"url": "https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e.pdf?version=v1&expires=1636910992&signature=mnsDH2DAxdkN9VibdlLMxJC86sME5WYDqkNtmvGwdNsAaUWfbnv0rJhJ1mR8Ol4uxQq61j5wYZ0r3s-lBkQfDA",
"weight": "80#"
}
],
"next_url": null,
"object": "list",
"previous_url": null
},
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"properties": {
"data": {
"description": "list of buckslips",
"items": {
"$ref": "#/components/schemas/buckslip"
},
"type": "array"
}
},
"type": "object"
}
]
}
}
},
"all_card_orders": {
"application/json": {
"example": {
"count": 1,
"data": [
{
"availability_date": "2021-10-12T21:41:48.326Z",
"cancelled_reason": "No longer needed",
"card_id": "card_6afffd19045076c",
"date_created": "2021-10-07T21:03:18.871Z",
"date_modified": "2021-10-16T01:00:30.144Z",
"expected_availability_date": "2021-11-04T21:03:18.871Z",
"id": "co_e0f8a0562a06bea7f",
"inventory": 9500,
"object": "card_order",
"quantity_ordered": 10000,
"status": "available",
"unit_price": 0.75
}
],
"next_url": null,
"object": "list",
"previous_url": null
},
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"properties": {
"data": {
"description": "List of card orders",
"items": {
"$ref": "#/components/schemas/card_order"
},
"type": "array"
}
},
"type": "object"
}
]
}
}
},
"all_cards": {
"application/json": {
"example": {
"count": 1,
"data": [
{
"account_id": "fa9ea650fc7b31a89f92",
"auto_reorder": false,
"available_quantity": 10000,
"back_original_url": "https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw",
"countries": null,
"date_created": "2021-03-24T22:51:42.838Z",
"date_modified": "2021-03-24T22:51:42.838Z",
"description": null,
"front_original_url": "https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw",
"id": "card_7a6d73c5c8457fc",
"mode": "test",
"object": "card",
"orientation": "horizontal",
"pending_quantity": 0,
"raw_url": "https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw",
"reorder_quantity": null,
"send_date": "2021-03-24T22:51:42.838Z",
"size": "2.125x3.375",
"status": "rendered",
"threshold_amount": 0,
"thumbnails": [
{
"large": "https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_large_1.png?version=v1&expires=1636910992&signature=FKSzymA13j-CQ0uk20cGHZTzT3vimzNBYrgp-xifLFg4mMdo1BZALR5O0aF_jVhsX614hKP35ONdYl47TQxXAw",
"medium": "https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_medium_1.png?version=v1&expires=1636910992&signature=VgL_2Ckm_kxKiWGgWtdNoy9HHOn8dGYSVOn7UqyCbwdbVlUtx28TRN4Bo8Iru3n0keKp9He0YhKT1ILotznMDA",
"small": "https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_small_1.png?version=v1&expires=1636910992&signature=mrv8JDvpZK4I8WUGH0tPdtK-My5oes0Ltj_gL7BDw96SpCTTeZFHkz81SzclyFP9dQRtlsvAsjcuGcTBvCvOCg"
}
],
"url": "https://lob-assets.com/cards/card_c51ae96f5cebf3e.pdf?version=v1&expires=1636910992&signature=mnsDH2DAxdkN9VibdlLMxJC86sME5WYDqkNtmvGwdNsAaUWfbnv0rJhJ1mR8Ol4uxQq61j5wYZ0r3s-lBkQfDA"
}
],
"next_url": null,
"object": "list",
"previous_url": null
},
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"properties": {
"data": {
"description": "list of cards",
"items": {
"$ref": "#/components/schemas/card"
},
"type": "array"
}
},
"type": "object"
}
]
}
}
},
"all_qr_codes": {
"application/json": {
"example": {
"count": 2,
"data": [
{
"date_created": "2019-07-27T23:49:01.511Z",
"number_of_scans": 2,
"resource_id": "ltr_d5a5a89da9106f8",
"scans": [
{
"ip_location": "127.0.0.1",
"scan_date": "2022-07-27T23:49:01.511Z"
},
{
"ip_location": "127.0.0.1",
"scan_date": "2022-07-29T23:45:00.436Z"
}
]
},
{
"date_created": "2022-09-27T23:49:01.511Z",
"number_of_scans": 1,
"resource_id": "psc_d5a5a89da9106f8",
"scans": [
{
"ip_location": "127.0.0.1",
"scan_date": "2022-09-27T23:49:01.511Z"
}
]
}
],
"object": "list",
"scanned_count": 2,
"total_count": 2
},
"schema": {
"allOf": [
{
"properties": {
"count": {
"$ref": "#/components/schemas/count"
},
"data": {
"description": "List of QR code analytics",
"items": {
"$ref": "#/components/schemas/qr_code_scans"
},
"type": "array"
},
"object": {
"$ref": "#/components/schemas/object"
},
"scanned_count": {
"description": "Indicates the number of QR Codes out of `count` that were scanned atleast once.",
"type": "integer"
},
"total_count": {
"description": "Indicates the total number of records. Provided when the request specifies an \"include\" query parameter",
"type": "integer"
}
},
"type": "object"
}
]
}
}
},
"bank_account": {
"application/json": {
"example": {
"account_number": "123456789",
"account_type": "company",
"bank_city": "Columbus",
"bank_name": "J.P. MORGAN CHASE BANK, N.A.,",
"bank_state": "OH",
"bank_zip": "43240",
"check_template": "jpm",
"date_created": "2015-11-06T19:24:24.440Z",
"date_modified": "2015-11-06T19:24:24.440Z",
"description": "Test Bank Account",
"fractional_routing_number": "25-3/440",
"id": "bank_8cad8df5354d33f",
"metadata": {},
"microdeposit_type": null,
"object": "bank_account",
"routing_number": "322271627",
"signatory": "John Doe",
"signature_url": "https://lob-assets.com/letters/asd_asdfghjklqwertyu.pdf?version=45&expires=1234567890&signature=a",
"verified": true
},
"schema": {
"$ref": "#/components/schemas/bank_account"
}
}
},
"billing_group": {
"application/json": {
"example": {
"date_created": "2017-11-07T22:56:10.962Z",
"date_modified": "2017-11-07T22:56:10.962Z",
"description": "Usage group used for the Marketing Dept resource sends",
"id": "bg_c94e83ca2cd5121",
"name": "Marketing Dept",
"object": "billing_group"
},
"schema": {
"$ref": "#/components/schemas/billing_group"
}
}
},
"booklet": {
"application/json": {
"example": {
"carrier": "USPS",
"date_created": "2021-03-16T18:40:40.504Z",
"date_modified": "2021-03-16T18:40:40.504Z",
"description": "April Campaign",
"expected_delivery_date": "2021-03-24",
"from": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_line2": null,
"address_state": "CA",
"address_zip": "94107-1741",
"company": null,
"date_created": "2017-09-05T15:54:53.264Z",
"date_modified": "2017-09-05T15:54:53.264Z",
"deleted": true,
"description": null,
"email": null,
"id": "adr_b8fb5acf3a2b55db",
"metadata": {},
"name": "LEORE AVIDAR",
"object": "address",
"phone": null
},
"fsc": false,
"id": "ord_0d6a16a3fff6318ac8f8008dc1",
"mail_type": "usps_first_class",
"merge_variables": {
"name": "Harry"
},
"metadata": {},
"object": "booklet",
"pages": 8,
"send_date": "2021-03-16T18:45:40.493Z",
"size": "8.375x5.375",
"sla": "2",
"source_material": "60# Gloss Text",
"thumbnails": [
{
"large": "https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg",
"medium": "https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_medium_1.png?version=v1&expires=1618512040&signature=ryxN7bsXGtw_GRFSP3Cs3A3IYjxZi3cW9BHDCNgMt6p3nobVmsc_iFHt2e-S7ndAXhhN7nP-MQVov3bt3r37BQ",
"small": "https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA"
}
],
"to": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_line2": null,
"address_state": "CA",
"address_zip": "94107-1741",
"company": null,
"date_created": "2017-09-05T15:54:53.264Z",
"date_modified": "2017-09-05T15:54:53.264Z",
"deleted": true,
"description": null,
"email": null,
"id": "adr_d3489cd64c791ab5",
"metadata": {},
"name": "HARRY ZHANG",
"object": "address",
"phone": null
},
"tracking_events": [],
"tracking_number": null,
"url": "https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA",
"use_type": "marketing"
},
"schema": {
"$ref": "#/components/schemas/booklet"
}
}
},
"buckslip": {
"application/json": {
"examples": {
"basic": {
"value": {
"account_id": "fa9ea650fc7b31a89f92",
"allocated_quantity": 0,
"auto_reorder": false,
"available_quantity": 0,
"back_original_url": "https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw",
"buckslip_orders": [],
"date_created": "2021-03-24T22:51:42.838Z",
"date_modified": "2021-03-24T22:51:42.838Z",
"description": "Test buckslip",
"finish": "gloss",
"front_original_url": "https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw",
"id": "bck_7a6d73c5c8457fc",
"mode": "test",
"object": "buckslip",
"onhand_quantity": 0,
"pending_quantity": 0,
"projected_quantity": 0,
"raw_url": "https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw",
"reorder_quantity": null,
"send_date": "2021-03-24T22:51:42.838Z",
"size": "8.75x3.755",
"status": "rendered",
"stock": "text",
"threshold_amount": 0,
"thumbnails": [
{
"large": "https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_large_1.png?version=v1&expires=1636910992&signature=FKSzymA13j-CQ0uk20cGHZTzT3vimzNBYrgp-xifLFg4mMdo1BZALR5O0aF_jVhsX614hKP35ONdYl47TQxXAw",
"medium": "https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_medium_1.png?version=v1&expires=1636910992&signature=VgL_2Ckm_kxKiWGgWtdNoy9HHOn8dGYSVOn7UqyCbwdbVlUtx28TRN4Bo8Iru3n0keKp9He0YhKT1ILotznMDA",
"small": "https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_small_1.png?version=v1&expires=1636910992&signature=mrv8JDvpZK4I8WUGH0tPdtK-My5oes0Ltj_gL7BDw96SpCTTeZFHkz81SzclyFP9dQRtlsvAsjcuGcTBvCvOCg"
},
{
"large": "https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_large_2.png?version=v1&expires=1636910992&signature=r0OFUhh315ZwN0raMZdIwJd2oCIEYsz0BABaMxIuO1PKTD0ckGWrhcGdzk2dlWQ6vSvp0CUQ5k1RXGqkIIqkDw",
"medium": "https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_medium_2.png?version=v1&expires=1636910992&signature=zxK7VKGiTvz5Ywrkaydd0v3GcYf58R7A08J4tNfI7-aiNODDcTF3l0MqY13n9Pyc8RXSdD0XVBY-OpbA1VM-Ag",
"small": "https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_small_2.png?version=v1&expires=1636910992&signature=IWsmPa_ULlv2yyqjX564d_YfHHY_M7i9YxDnw-WXDr2jtOFcArmRZQbnHeE9g_rYxnddJbgosuv8-c2utiu7Cg"
}
],
"url": "https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e.pdf?version=v1&expires=1636910992&signature=mnsDH2DAxdkN9VibdlLMxJC86sME5WYDqkNtmvGwdNsAaUWfbnv0rJhJ1mR8Ol4uxQq61j5wYZ0r3s-lBkQfDA",
"weight": "80#"
}
}
},
"schema": {
"$ref": "#/components/schemas/buckslip"
}
}
},
"buckslip_order": {
"application/json": {
"examples": {
"basic": {
"value": {
"availability_date": "2021-10-12T21:41:48.326Z",
"buckslip_id": "bck_6afffd19045076c",
"cancelled_reason": "No longer needed",
"date_created": "2021-10-07T21:03:18.871Z",
"date_modified": "2021-10-16T01:00:30.144Z",
"expected_availability_date": "2021-11-04T21:03:18.871Z",
"id": "bo_e0f8a0562a06bea7f",
"object": "buckslip_order",
"quantity_ordered": 10000,
"status": "available",
"unit_price": 0.75
}
}
},
"schema": {
"$ref": "#/components/schemas/buckslip_order"
}
}
},
"campaign": {
"application/json": {
"example": {
"auto_cancel_if_ncoa": false,
"billing_group_id": "bg_fe3079dcdd80e5ae",
"cancel_window_campaign_minutes": 60,
"creatives": [],
"date_created": "2017-09-05T17:47:53.767Z",
"date_modified": "2017-09-05T17:47:53.767Z",
"deleted": false,
"description": "My Campaign's description",
"id": "cmp_e05ee61ff80764b",
"is_draft": true,
"metadata": {},
"name": "My Campaign",
"object": "campaign",
"schedule_type": "immediate",
"uploads": [],
"use_type": "marketing"
},
"schema": {
"$ref": "#/components/schemas/campaign"
}
}
},
"card": {
"application/json": {
"examples": {
"basic": {
"value": {
"account_id": "fa9ea650fc7b31a89f92",
"auto_reorder": false,
"available_quantity": 10000,
"back_original_url": "https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw",
"countries": null,
"date_created": "2021-03-24T22:51:42.838Z",
"date_modified": "2021-03-24T22:51:42.838Z",
"description": "Test card",
"front_original_url": "https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw",
"id": "card_7a6d73c5c8457fc",
"mode": "test",
"object": "card",
"orientation": "horizontal",
"pending_quantity": 0,
"raw_url": "https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw",
"reorder_quantity": null,
"send_date": "2021-03-24T22:51:42.838Z",
"size": "2.125x3.375",
"status": "rendered",
"threshold_amount": 0,
"thumbnails": [
{
"large": "https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_large_1.png?version=v1&expires=1636910992&signature=FKSzymA13j-CQ0uk20cGHZTzT3vimzNBYrgp-xifLFg4mMdo1BZALR5O0aF_jVhsX614hKP35ONdYl47TQxXAw",
"medium": "https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_medium_1.png?version=v1&expires=1636910992&signature=VgL_2Ckm_kxKiWGgWtdNoy9HHOn8dGYSVOn7UqyCbwdbVlUtx28TRN4Bo8Iru3n0keKp9He0YhKT1ILotznMDA",
"small": "https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_small_1.png?version=v1&expires=1636910992&signature=mrv8JDvpZK4I8WUGH0tPdtK-My5oes0Ltj_gL7BDw96SpCTTeZFHkz81SzclyFP9dQRtlsvAsjcuGcTBvCvOCg"
},
{
"large": "https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_large_2.png?version=v1&expires=1636910992&signature=r0OFUhh315ZwN0raMZdIwJd2oCIEYsz0BABaMxIuO1PKTD0ckGWrhcGdzk2dlWQ6vSvp0CUQ5k1RXGqkIIqkDw",
"medium": "https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_medium_2.png?version=v1&expires=1636910992&signature=zxK7VKGiTvz5Ywrkaydd0v3GcYf58R7A08J4tNfI7-aiNODDcTF3l0MqY13n9Pyc8RXSdD0XVBY-OpbA1VM-Ag",
"small": "https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_small_2.png?version=v1&expires=1636910992&signature=IWsmPa_ULlv2yyqjX564d_YfHHY_M7i9YxDnw-WXDr2jtOFcArmRZQbnHeE9g_rYxnddJbgosuv8-c2utiu7Cg"
}
],
"url": "https://lob-assets.com/cards/card_c51ae96f5cebf3e.pdf?version=v1&expires=1636910992&signature=mnsDH2DAxdkN9VibdlLMxJC86sME5WYDqkNtmvGwdNsAaUWfbnv0rJhJ1mR8Ol4uxQq61j5wYZ0r3s-lBkQfDA"
}
}
},
"schema": {
"$ref": "#/components/schemas/card"
}
}
},
"card_order": {
"application/json": {
"examples": {
"basic": {
"value": {
"availability_date": "2021-10-12T21:41:48.326Z",
"cancelled_reason": "No longer needed",
"card_id": "card_6afffd19045076c",
"date_created": "2021-10-07T21:03:18.871Z",
"date_modified": "2021-10-16T01:00:30.144Z",
"expected_availability_date": "2021-11-04T21:03:18.871Z",
"id": "co_e0f8a0562a06bea7f",
"inventory": 9500,
"object": "card_order",
"quantity_ordered": 10000,
"status": "available",
"unit_price": 0.75
}
}
},
"schema": {
"$ref": "#/components/schemas/card_order"
}
}
},
"check": {
"application/json": {
"example": {
"amount": 22.5,
"attachment_template_id": "tmpl_a",
"attachment_template_version_id": "vrsn_a",
"bank_account": {
"account_number": "123456789",
"account_type": "company",
"bank_name": "J.P. MORGAN CHASE BANK, N.A.",
"date_created": "2015-11-06T19:24:24.440Z",
"date_modified": "2015-11-06T19:41:28.312Z",
"description": "Test Bank Account",
"id": "bank_8cad8df5354d33f",
"metadata": {},
"object": "bank_account",
"routing_number": "322271627",
"signatory": "John Doe",
"signature_url": "https://lob-assets.com/bank-accounts/asd_asdfghjkqwertyui.pdf?expires=1234567890&signature=aksdf",
"verified": true
},
"carrier": "USPS",
"check_bottom_template_id": "tmpl_a",
"check_bottom_template_version_id": "vrsn_a",
"check_number": 10062,
"date_created": "2017-09-05T17:47:53.896Z",
"date_modified": "2017-09-05T17:47:53.896Z",
"deleted": true,
"description": "Demo Check",
"expected_delivery_date": "2017-09-12",
"from": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_state": "CA",
"address_zip": "94107-1741",
"date_created": "2017-09-05T17:47:53.767Z",
"date_modified": "2017-09-05T17:47:53.767Z",
"id": "adr_b8fb5acf3a2b55db",
"metadata": {},
"name": "LEORE AVIDAR",
"object": "address"
},
"id": "chk_534f10783683daa0",
"mail_type": "usps_first_class",
"memo": "rent",
"merge_variables": {
"name": "Harry"
},
"message": "pancakes are good",
"metadata": {},
"object": "check",
"send_date": "2017-09-05T17:47:53.896Z",
"sla": "2",
"thumbnails": [
{
"large": "https://lob-assets.com/checks/chk_534f10783683daa0_thumb_large_1.png?expires=1540372221&signature=04nLEwE9d2qgQJNgJYWSOgPnU0FZbEv",
"medium": "https://lob-assets.com/checks/chk_534f10783683daa0_thumb_medium_1.png?expires=1540372221&signature=tmIOq6aAyKgzAECp7STj1rvJuMS5Svd",
"small": "https://lob-assets.com/checks/chk_534f10783683daa0_thumb_small_1.png?expires=1540372221&signature=ShhPpH74wYkNiAj7Il9B6q8ZKkzlGd4"
}
],
"to": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_line2": "",
"address_state": "CA",
"address_zip": "94107-1741",
"company": "LOB",
"date_created": "2018-12-08T03:08:43.446Z",
"date_modified": "2018-12-08T03:08:43.446Z",
"description": "Harry - Office",
"email": "harry@lob.com",
"id": "adr_bae820679f3f536b",
"metadata": {},
"name": "HARRY ZHANG",
"object": "address",
"phone": "5555555555",
"recipient_moved": false
},
"tracking_events": [],
"url": "https://lob-assets.com/checks/chk_534f10783683daa0.pdf?expires=1540372221&signature=Ty3IV2bGPEoQfrdraYHlNYTaarnHLXb",
"use_type": "operational"
},
"schema": {
"$ref": "#/components/schemas/check"
}
}
},
"creative": {
"application/json": {
"example": {
"campaigns": [],
"date_created": "2017-09-05T17:47:53.767Z",
"date_modified": "2017-09-05T17:47:53.767Z",
"description": "Our 4x6 postcard creative",
"details": {},
"from": "adr_210a8d4b0b76d77b",
"id": "crv_2a3b096c409b32c",
"metadata": {},
"object": "creative",
"resource_type": "postcard",
"template_preview_urls": {},
"template_previews": []
},
"schema": {
"$ref": "#/components/schemas/creative"
}
}
},
"informed_delivery_campaign": {
"application/json": {
"example": {
"account_id": "xxxxxxxxxxxxxxxxxxxx",
"brand_name": "Lob",
"campaign_code": "1a1a1a1a-9657-423b-b3c7-2+Code",
"date_created": "2024-08-30T23:30:02.980Z",
"date_modified": "2024-08-30T23:30:05.027Z",
"deleted": false,
"end_date": "2024-10-15T00:00:00.000Z",
"end_serial": 3183506,
"id": "infd_234g5324g324g23",
"lob_campaign_id": null,
"mode": "live",
"object": "informed_delivery_campaign",
"quantity": 20,
"representative_image_s3_link": null,
"ride_along_image_s3_link": "https://lob-assets.com/informed-delivery/infd_234g5324g324g23_ride_along.jpg",
"ride_along_url": "https://www.lob.com",
"service_request_number": null,
"start_date": "2024-08-31T00:00:00.000Z",
"start_serial": 3183487,
"status": "approved",
"usps_campaign_id": "1234567890",
"usps_title": "Campaign: 1a1a1a1a-9657-423b-b3c7-2"
},
"schema": {
"$ref": "#/components/schemas/response"
}
}
},
"letter": {
"application/json": {
"example": {
"address_placement": "top_first_page",
"cards": [
{
"account_id": "fa9ea650fc7b31a89f92",
"auto_reorder": false,
"available_quantity": 10000,
"back_original_url": "https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw",
"countries": null,
"date_created": "2017-08-05T15:54:53.346Z",
"date_modified": "2017-08-05T15:54:53.346Z",
"description": null,
"front_original_url": "https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw",
"id": "card_c51ae96f5cebf3e",
"mode": "test",
"object": "card",
"orientation": "horizontal",
"pending_quantity": 0,
"raw_url": "https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw",
"reorder_quantity": null,
"size": "2.125x3.375",
"status": "rendered",
"threshold_amount": 0,
"thumbnails": [
{
"large": "https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_large_1.png?version=v1&expires=1636910992&signature=FKSzymA13j-CQ0uk20cGHZTzT3vimzNBYrgp-xifLFg4mMdo1BZALR5O0aF_jVhsX614hKP35ONdYl47TQxXAw",
"medium": "https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_medium_1.png?version=v1&expires=1636910992&signature=VgL_2Ckm_kxKiWGgWtdNoy9HHOn8dGYSVOn7UqyCbwdbVlUtx28TRN4Bo8Iru3n0keKp9He0YhKT1ILotznMDA",
"small": "https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_small_1.png?version=v1&expires=1636910992&signature=mrv8JDvpZK4I8WUGH0tPdtK-My5oes0Ltj_gL7BDw96SpCTTeZFHkz81SzclyFP9dQRtlsvAsjcuGcTBvCvOCg"
},
{
"large": "https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_large_2.png?version=v1&expires=1636910992&signature=r0OFUhh315ZwN0raMZdIwJd2oCIEYsz0BABaMxIuO1PKTD0ckGWrhcGdzk2dlWQ6vSvp0CUQ5k1RXGqkIIqkDw",
"medium": "https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_medium_2.png?version=v1&expires=1636910992&signature=zxK7VKGiTvz5Ywrkaydd0v3GcYf58R7A08J4tNfI7-aiNODDcTF3l0MqY13n9Pyc8RXSdD0XVBY-OpbA1VM-Ag",
"small": "https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_small_2.png?version=v1&expires=1636910992&signature=IWsmPa_ULlv2yyqjX564d_YfHHY_M7i9YxDnw-WXDr2jtOFcArmRZQbnHeE9g_rYxnddJbgosuv8-c2utiu7Cg"
}
],
"url": "https://lob-assets.com/cards/card_c51ae96f5cebf3e.pdf?version=v1&expires=1636910992&signature=mnsDH2DAxdkN9VibdlLMxJC86sME5WYDqkNtmvGwdNsAaUWfbnv0rJhJ1mR8Ol4uxQq61j5wYZ0r3s-lBkQfDA"
}
],
"carrier": "USPS",
"color": true,
"custom_envelope": null,
"date_created": "2017-09-05T15:54:53.346Z",
"date_modified": "2017-09-05T15:54:53.346Z",
"description": "Demo Letter",
"double_sided": true,
"expected_delivery_date": "2017-09-12",
"extra_service": null,
"from": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_line2": null,
"address_state": "CA",
"address_zip": "94107-1741",
"company": null,
"date_created": "2017-09-05T15:54:53.264Z",
"date_modified": "2017-09-05T15:54:53.264Z",
"deleted": true,
"description": null,
"email": null,
"id": "adr_b8fb5acf3a2b55db",
"metadata": {},
"name": "LEORE AVIDAR",
"object": "address",
"phone": null
},
"fsc": false,
"id": "ltr_4868c3b754655f90",
"mail_type": "usps_first_class",
"merge_variables": {
"name": "Harry"
},
"metadata": {},
"object": "letter",
"perforated_page": null,
"return_envelope": false,
"send_date": "2017-09-05T15:54:53.346Z",
"sla": "2",
"thumbnails": [
{
"large": "https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_large_1.png?expires=1540372221&signature=gsKvxXgrm4v4iZD3bOibK7jApNkEMdW",
"medium": "https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_medium_1.png?expires=1540372221&signature=bAzL8sv935PY09FWSkpDpWKkyvGSWYF",
"small": "https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_small_1.png?expires=1540372221&signature=a5fRBJ22ZA78Vgpg34M9UfmHWTS3eha"
}
],
"to": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_line2": null,
"address_state": "CA",
"address_zip": "94107-1741",
"company": null,
"date_created": "2017-09-05T15:54:53.264Z",
"date_modified": "2017-09-05T15:54:53.264Z",
"deleted": true,
"description": null,
"email": null,
"id": "adr_d3489cd64c791ab5",
"metadata": {},
"name": "HARRY ZHANG",
"object": "address",
"phone": null
},
"tracking_events": [],
"tracking_number": null,
"url": "https://lob-assets.com/letters/ltr_4868c3b754655f90.pdf?expires=1540372221&signature=8r94fse8uam7wGWmW5baxXulU88X2CA",
"use_type": "marketing"
},
"schema": {
"$ref": "#/components/schemas/letter"
}
}
},
"lob_credits_balance": {
"application/json": {
"examples": {
"empty": {
"value": {
"balance": 0
}
},
"negative": {
"value": {
"balance": -1234.56
}
},
"positive": {
"value": {
"balance": 1000
}
}
},
"schema": {
"$ref": "#/components/schemas/lob_credits_balance"
}
}
},
"postcard": {
"application/json": {
"examples": {
"basic": {
"value": {
"back_template_id": null,
"carrier": "USPS",
"date_created": "2021-03-24T22:51:42.838Z",
"date_modified": "2021-03-24T22:51:42.838Z",
"description": null,
"front_template_id": null,
"fsc": false,
"id": "psc_208e45e48d271294",
"metadata": {},
"object": "postcard",
"send_date": "2021-03-24T22:51:42.838Z",
"sla": "2",
"to": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_line2": null,
"address_state": "CA",
"address_zip": "94107-1741",
"company": "LOB",
"date_created": "2018-12-08T03:01:07.651Z",
"date_modified": "2018-12-08T03:01:07.651Z",
"description": null,
"email": null,
"id": "adr_210a8d4b0b76d77b",
"metadata": {},
"name": null,
"object": "address",
"phone": null
},
"url": "https://lob-assets.com/postcards/psc_208e45e48d271294.pdf?version=v1&expires=1619218302&signature=NfHHLBSr5tOHA_Z4kij4dKqZG8f3vMDtwvuFVeeF9pV_lylcjLsVVODhNCE5hR6-2slUr6t9WMNsi429Pj7_DA",
"use_type": "marketing"
}
},
"full": {
"value": {
"back_template_id": "tmpl_93c369f06171958",
"back_template_version_id": "vrsn_a83e044941c393b",
"carrier": "USPS",
"date_created": "2021-03-24T22:51:42.838Z",
"date_modified": "2021-03-24T22:51:42.838Z",
"description": null,
"expected_delivery_date": "2021-03-30",
"from": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_line2": null,
"address_state": "CA",
"address_zip": "94107-1741",
"company": null,
"date_created": "2018-12-08T03:01:07.651Z",
"date_modified": "2018-12-08T03:01:07.651Z",
"description": null,
"email": null,
"id": "adr_210a8d4b0b76d77b",
"metadata": {},
"name": "LEORE AVIDAR",
"object": "address",
"phone": null
},
"front_template_id": "tmpl_93c369f06171958",
"front_template_version_id": "vrsn_a83e044941c393b",
"fsc": false,
"id": "psc_0e03d1ad7d31f151",
"mail_type": "usps_first_class",
"merge_variables": {},
"metadata": {},
"object": "postcard",
"print_speed": "core",
"send_date": "2021-03-24T22:51:42.838Z",
"size": "6x11",
"sla": "2",
"thumbnails": [
{
"large": "https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_large_1.png?expires=1540372221&signature=gsKvxXgrm4v4iZD3bOibK7jApNkEMdW",
"medium": "https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_medium_1.png?expires=1540372221&signature=bAzL8sv935PY09FWSkpDpWKkyvGSWYF",
"small": "https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_small_1.png?expires=1540372221&signature=a5fRBJ22ZA78Vgpg34M9UfmHWTS3eha"
}
],
"to": {
"address_city": "SUMMERSIDE",
"address_country": "CANADA",
"address_line1": "370 WATER ST",
"address_line2": "",
"address_state": "PE",
"address_zip": "C1N 1C4",
"company": "LOB",
"date_created": "2018-12-08T03:01:07.651Z",
"date_modified": "2018-12-08T03:01:07.651Z",
"description": null,
"email": "jane.doe@lob.com",
"id": "adr_c7cb63d68f8d6",
"metadata": {},
"name": "JANE DOE",
"object": "address",
"phone": "5555555555",
"recipient_moved": false
},
"tracking_events": [],
"url": "https://lob-assets.com/postcards/psc_208e45e48d271294.pdf?version=v1&expires=1619218302&signature=NfHHLBSr5tOHA_Z4kij4dKqZG8f3vMDtwvuFVeeF9pV_lylcjLsVVODhNCE5hR6-2slUr6t9WMNsi429Pj7_DA",
"use_type": "marketing"
}
}
},
"schema": {
"$ref": "#/components/schemas/postcard"
}
}
},
"resource_proof": {
"application/json": {
"example": {
"date_created": "2017-11-07T22:56:10.962Z",
"date_modified": "2017-11-07T22:56:10.962Z",
"errors": [],
"id": "res_prf_example123",
"object": "resource_proof",
"resource_type": "postcard",
"status": "completed",
"template_id": null,
"thumbnails": [
{
"large": "https://lob-assets.com/resource-proofs/res_prf_example123_thumb_large_1.png",
"medium": "https://lob-assets.com/resource-proofs/res_prf_example123_thumb_medium_1.png",
"small": "https://lob-assets.com/resource-proofs/res_prf_example123_thumb_small_1.png"
}
],
"url": "https://lob-assets.com/resource-proofs/res_prf_example123.pdf"
},
"schema": {
"$ref": "#/components/schemas/resource_proof"
}
}
},
"self_mailer": {
"application/json": {
"example": {
"carrier": "USPS",
"date_created": "2021-03-16T18:40:40.504Z",
"date_modified": "2021-03-16T18:40:40.504Z",
"description": "April Campaign",
"expected_delivery_date": "2021-03-24",
"from": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_line2": null,
"address_state": "CA",
"address_zip": "94107-1741",
"company": null,
"date_created": "2017-09-05T17:47:53.767Z",
"date_modified": "2017-09-05T17:47:53.767Z",
"deleted": true,
"description": null,
"email": null,
"id": "adr_210a8d4b0b76d77b",
"metadata": {},
"name": "LEORE AVIDAR",
"object": "address",
"phone": null
},
"fsc": false,
"id": "sfm_8ffbe811dea49dcf",
"inside_template_id": "tmpl_a3cb937f26d7eec",
"inside_template_version_id": "vrsn_bfdf70893b00a85",
"mail_type": "usps_first_class",
"merge_variables": {
"name": null
},
"metadata": {},
"object": "self_mailer",
"outside_template_id": "tmpl_a3cb937f26d7eec",
"outside_template_version_id": "vrsn_bfdf70893b00a85",
"send_date": "2021-03-16T18:45:40.493Z",
"size": "6x18_bifold",
"sla": "2",
"thumbnails": [
{
"large": "https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg",
"medium": "https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_1.png?version=v1&expires=1618512040&signature=ryxN7bsXGtw_GRFSP3Cs3A3IYjxZi3cW9BHDCNgMt6p3nobVmsc_iFHt2e-S7ndAXhhN7nP-MQVov3bt3r37BQ",
"small": "https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA"
},
{
"large": "https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_2.png?version=v1&expires=1618512040&signature=cICc7HEm1xG_eyM4a_wtvPk2FqoLRmtgGa29kJisWnMIYBL0OkyzG4ZCYGMhp-5cZpJlSpXfTgGKh_Qmeo1TDw",
"medium": "https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_2.png?version=v1&expires=1618512040&signature=Ue1lw5CMj7KRx6cMQL8xPeazaHCdJzWcACd1w3acuYPnWkVIpSt62OIO7hAtpAQK9xm1dhhlFj0rqRZMdRMMBA",
"small": "https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_2.png?version=v1&expires=1618512040&signature=3gTgU7Fd3KoT_vNlQnTGptRps5ZgnkhSnPrAwk7L98higIzSwfKoLvuu_DIpMM48dHbxckKT9waR8euJ4KSDBQ"
}
],
"to": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_line2": null,
"address_state": "CA",
"address_zip": "94107-1741",
"company": null,
"date_created": "2017-09-05T17:47:53.767Z",
"date_modified": "2017-09-05T17:47:53.767Z",
"deleted": true,
"description": null,
"email": null,
"id": "adr_bae820679f3f536b",
"metadata": {},
"name": "HARRY ZHANG",
"object": "address",
"phone": null
},
"tracking_events": [],
"url": "https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA",
"use_type": "marketing"
},
"schema": {
"$ref": "#/components/schemas/self_mailer"
}
}
},
"snap_pack": {
"application/json": {
"example": {
"carrier": "USPS",
"color": false,
"date_created": "2021-03-16T18:40:40.504Z",
"date_modified": "2021-03-16T18:40:40.504Z",
"description": "April Campaign",
"expected_delivery_date": "2021-03-24",
"from": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_line2": null,
"address_state": "CA",
"address_zip": "94107-1741",
"company": null,
"date_created": "2017-09-05T17:47:53.767Z",
"date_modified": "2017-09-05T17:47:53.767Z",
"deleted": true,
"description": null,
"email": null,
"id": "adr_210a8d4b0b76d77b",
"metadata": {},
"name": "LEORE AVIDAR",
"object": "address",
"phone": null
},
"fsc": false,
"id": "ord_0d6a16a3fff6318ac8f8008dc1",
"inside_template_id": "tmpl_a3cb937f26d7eec",
"inside_template_version_id": "vrsn_bfdf70893b00a85",
"mail_type": "usps_first_class",
"merge_variables": {
"name": null
},
"object": "snap_pack",
"outside_template_id": "tmpl_a3cb937f26d7eec",
"outside_template_version_id": "vrsn_bfdf70893b00a85",
"send_date": "2021-03-16T18:45:40.493Z",
"size": "8.5x11",
"sla": "2",
"thumbnails": [
{
"large": "https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg",
"medium": "https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_medium_1.png?version=v1&expires=1618512040&signature=ryxN7bsXGtw_GRFSP3Cs3A3IYjxZi3cW9BHDCNgMt6p3nobVmsc_iFHt2e-S7ndAXhhN7nP-MQVov3bt3r37BQ",
"small": "https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA"
},
{
"large": "https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_large_2.png?version=v1&expires=1618512040&signature=cICc7HEm1xG_eyM4a_wtvPk2FqoLRmtgGa29kJisWnMIYBL0OkyzG4ZCYGMhp-5cZpJlSpXfTgGKh_Qmeo1TDw",
"medium": "https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_medium_2.png?version=v1&expires=1618512040&signature=Ue1lw5CMj7KRx6cMQL8xPeazaHCdJzWcACd1w3acuYPnWkVIpSt62OIO7hAtpAQK9xm1dhhlFj0rqRZMdRMMBA",
"small": "https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_small_2.png?version=v1&expires=1618512040&signature=3gTgU7Fd3KoT_vNlQnTGptRps5ZgnkhSnPrAwk7L98higIzSwfKoLvuu_DIpMM48dHbxckKT9waR8euJ4KSDBQ"
}
],
"to": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_line2": null,
"address_state": "CA",
"address_zip": "94107-1741",
"company": null,
"date_created": "2017-09-05T17:47:53.767Z",
"date_modified": "2017-09-05T17:47:53.767Z",
"deleted": true,
"description": null,
"email": null,
"id": "adr_bae820679f3f536b",
"metadata": {},
"name": "HARRY ZHANG",
"object": "address",
"phone": null
},
"tracking_events": [],
"url": "https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA",
"use_type": "marketing"
},
"schema": {
"$ref": "#/components/schemas/snap_pack"
}
}
},
"template": {
"application/json": {
"example": {
"date_created": "2017-11-07T22:56:10.962Z",
"date_modified": "2017-11-07T22:56:10.962Z",
"description": "Test Template",
"id": "tmpl_c94e83ca2cd5121",
"metadata": {},
"object": "template",
"published_version": {
"date_created": "2017-11-07T22:56:10.962Z",
"date_modified": "2017-11-07T22:56:10.962Z",
"description": "Test Template",
"engine": "handlebars",
"html": "<html>HTML for {{name}}</html>",
"id": "vrsn_362184d96d9b0c9",
"object": "version",
"suggest_json_editor": false
},
"versions": [
{
"date_created": "2017-11-07T22:56:10.962Z",
"date_modified": "2017-11-07T22:56:10.962Z",
"description": "Test Template",
"engine": "legacy",
"html": "<html>HTML for {{name}}</html>",
"id": "vrsn_362184d96d9b0c9",
"object": "version",
"suggest_json_editor": true
}
]
},
"schema": {
"$ref": "#/components/schemas/template"
}
}
},
"template_version": {
"application/json": {
"example": {
"date_created": "2017-11-09T04:49:38.016Z",
"date_modified": "2017-11-09T04:49:38.016Z",
"description": "Second Version",
"html": "<html>Second HTML for {{name}}</html>",
"id": "vrsn_534e339882d2282",
"object": "version"
},
"schema": {
"$ref": "#/components/schemas/template_version"
}
}
},
"upload": {
"application/json": {
"example": {
"accountId": "fa9ea650fc7b31a89f92",
"bytesProcessed": 17628,
"campaignId": "cmp_1933ad629bae1408",
"dateCreated": "2017-09-05T17:47:53.767Z",
"dateModified": "2017-09-05T17:47:53.767Z",
"failedMailpieces": 5,
"failuresUrl": "http://www.example.com",
"id": "upl_71be866e430b11e9",
"mergeVariableColumnMapping": null,
"metadata": {
"columns": []
},
"mode": "live",
"optionalAddressColumnMapping": {
"address_country": null,
"address_line2": null,
"company": null
},
"originalFilename": "my_audience.csv",
"requiredAddressColumnMapping": {
"address_city": null,
"address_line1": null,
"address_state": null,
"address_zip": null,
"name": null
},
"state": "Draft",
"totalMailpieces": 100,
"validatedMailpieces": 95
},
"schema": {
"$ref": "#/components/schemas/upload"
}
}
}
},
"parameters": {
"before_after": {
"description": "`before` and `after` are both optional but only one of them can be in the query at a time.\n",
"in": "query",
"name": "before/after",
"required": false,
"schema": {
"allOf": [
{
"properties": {
"after": {
"description": "A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the `next_url` field in the return response.\n",
"type": "string"
},
"before": {
"description": "A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the `previous_url` field in the return response.\n",
"type": "string"
}
},
"type": "object"
},
{
"oneOf": [
{
"required": [
"before"
]
},
{
"required": [
"after"
]
}
]
}
]
}
},
"campaign_id": {
"description": "Filters resources created by the provided campaign id, prefixed with `cmp_`. In the case of snap packs, booklets, and letters with size `us_legal`, however, the campaign id is prefixed with `camp_` instead of `cmp_`.",
"in": "query",
"name": "campaign_id",
"required": false,
"schema": {
"$ref": "#/components/schemas/campaign_id"
}
},
"date_created": {
"description": "Filter by date created. Accepted formats are ISO-8601 date or datetime, e.g. `{ \"gt\": \"2012-01-01\", \"lt\": \"2012-01-31T12:34:56Z\" }` where `gt` is >, `lt` is <, `gte` is \u2265, and `lte` is \u2264.",
"explode": true,
"in": "query",
"name": "date_created",
"schema": {
"$ref": "#/components/schemas/date_filter"
},
"style": "deepObject"
},
"date_modified": {
"description": "Filter by date modified. Accepted formats are ISO-8601 date or datetime, e.g. `{ \"gt\": \"2012-01-01\", \"lt\": \"2012-01-31T12:34:56Z\" }` where `gt` is >, `lt` is <, `gte` is \u2265, and `lte` is \u2264.",
"explode": true,
"in": "query",
"name": "date_modified",
"schema": {
"$ref": "#/components/schemas/date_filter"
},
"style": "deepObject"
},
"idem-header": {
"description": "A string of no longer than 256 characters that uniquely identifies this resource. For more help integrating idempotency keys, refer to our <a href=\"https://help.lob.com/print-and-mail/building-a-mail-strategy/managing-mail-settings#idempotent-requests-12\" target=\"_blank\">implementation guide</a>.\n",
"in": "header",
"name": "Idempotency-Key",
"required": false,
"schema": {
"example": "026e7634-24d7-486c-a0bb-4a17fd0eebc5",
"maxLength": 256,
"type": "string"
}
},
"idem-query": {
"description": "A string of no longer than 256 characters that uniquely identifies this resource. For more help integrating idempotency keys, refer to our <a href=\"https://help.lob.com/print-and-mail/building-a-mail-strategy/managing-mail-settings#idempotent-requests-12\" target=\"_blank\">implementation guide</a>.\n",
"in": "query",
"name": "idempotency_key",
"required": false,
"schema": {
"example": "026e7634-24d7-486c-a0bb-4a17fd0eebc5",
"maxLength": 256,
"type": "string"
}
},
"include": {
"description": "Request that the response include the total count by specifying `include=[\"total_count\"]`.\n",
"explode": true,
"in": "query",
"name": "include",
"schema": {
"items": {
"type": "string"
},
"type": "array"
}
},
"lang_spec": {
"description": "* `native` - Translate response to the native language of the country in the request\n* `match` - match the response to the language in the request\n\nDefault response is in English.\n",
"in": "header",
"name": "x-lang-output",
"required": false,
"schema": {
"enum": [
"native",
"match"
],
"type": "string"
}
},
"limit": {
"description": "How many results to return.",
"in": "query",
"name": "limit",
"required": false,
"schema": {
"default": 10,
"example": 10,
"maximum": 100,
"minimum": 1,
"type": "integer"
}
},
"lob-version": {
"description": "A string representing the version of the API being used. Specifically for letters, if this header is set to `2024-01-01` and above, the `size` property is automatically included with the default value of `us_letter`. Refer to `size` for all possible values. For more information on versioning, refer to our [Versioning and Changelog](#tag/Versioning-and-Changelog) documentation.\n",
"in": "header",
"name": "Lob-Version",
"required": false,
"schema": {
"example": "2024-01-01",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
"type": "string"
}
},
"mail_type": {
"description": "A string designating the mail postage type: * `usps_first_class` - (default) * `usps_standard` - a <a href=\"https://lob.com/pricing/print-mail#compare\" target=\"_blank\">cheaper option</a> which is less predictable and takes longer to deliver. `usps_standard` cannot be used with `4x6` postcards or for any postcards sent outside of the United States.\n",
"in": "query",
"name": "mail_type",
"schema": {
"$ref": "#/components/schemas/mail_type"
}
},
"metadata": {
"description": "Filter by metadata key-value pair`.",
"explode": true,
"in": "query",
"name": "metadata",
"schema": {
"$ref": "#/components/schemas/metadata"
},
"style": "deepObject"
},
"offset": {
"description": "An integer that designates the offset at which to begin returning results. Defaults to 0.",
"in": "query",
"name": "offset",
"required": false,
"schema": {
"default": 0,
"type": "integer"
}
},
"scheduled": {
"description": "* `true` - only return orders (past or future) where `send_date` is\ngreater than `date_created`\n* `false` - only return orders where `send_date` is equal to `date_created`\n",
"in": "query",
"name": "scheduled",
"schema": {
"type": "boolean"
}
},
"send_date": {
"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 \u2265, and `lte` is \u2264.\n",
"in": "query",
"name": "send_date",
"schema": {
"$ref": "#/components/schemas/send_date"
}
},
"sort_by": {
"description": "Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both.\n",
"in": "query",
"name": "sort_by",
"schema": {
"allOf": [
{
"properties": {
"date_created": {
"enum": [
"asc",
"desc"
],
"type": "string"
},
"send_date": {
"enum": [
"asc",
"desc"
],
"type": "string"
}
},
"type": "object"
},
{
"oneOf": [
{
"required": [
"date_created"
]
},
{
"required": [
"send_date"
]
}
]
}
]
}
},
"status": {
"description": "A string describing the render status:\n* `processed` - the rendering process is currently underway.\n* `rendered` - the rendering process has completed successfully.\n* `failed` - the rendering process has failed.\n",
"in": "query",
"name": "status",
"schema": {
"$ref": "#/components/schemas/status"
}
}
},
"responses": {
"404": {
"content": {
"application/json": {
"example": {
"error": {
"code": "not_found",
"message": "informed delivery campaign not found",
"status_code": 404
}
},
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error"
},
"address": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/address"
}
}
},
"description": "Returns an address object if a valid identifier was provided."
},
"address_deleted": {
"content": {
"application/json": {
"example": {
"deleted": true,
"id": "adr_123456789"
},
"schema": {
"$ref": "#/components/schemas/address_deletion"
}
}
},
"description": "Deleted"
},
"address_error": {
"content": {
"application/json": {
"example": {
"error": {
"code": "not_found",
"message": "address not found",
"status_code": 404
}
},
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error"
},
"all_addresses": {
"content": {
"application/json": {
"example": {
"count": 2,
"data": [
{
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_line2": null,
"address_state": "CA",
"address_zip": "94107-1741",
"company": "LOB",
"date_created": "2019-08-12T00:16:00.361Z",
"date_modified": "2019-08-12T00:16:00.361Z",
"description": "Harry - Office",
"email": "harry@lob.com",
"id": "adr_e68217bd744d65c8",
"metadata": {},
"name": "HARRY ZHANG",
"object": "address",
"phone": "5555555555"
},
{
"address_city": "SUMMERSIDE",
"address_country": "CANADA",
"address_line1": "370 WATER ST",
"address_line2": "",
"address_state": "PRINCE EDWARD ISLAND",
"address_zip": "C1N 1C4",
"company": "Lob",
"date_created": "2019-09-20T00:14:00.361Z",
"date_modified": "2019-09-20T00:14:00.361Z",
"description": "Harry - Office",
"email": "harry@lob.com",
"id": "adr_asdi2y3riuasasoi",
"metadata": {},
"name": "Harry Zhang",
"object": "address",
"phone": "5555555555"
}
],
"next_url": "https://api.lob.com/v1/addresses?limit=2&after=eyJkYXRlT2Zmc2V0IjoiMjAxOS0wOC0wN1QyMTo1OTo0Ni43NjRaIiwiaWRPZmZzZXQiOiJhZHJfODMwYmYwZWFiZGFhYTQwOSJ9",
"object": "list",
"previous_url": null
},
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"properties": {
"data": {
"description": "list of addresses",
"items": {
"$ref": "#/components/schemas/address"
},
"type": "array"
}
},
"type": "object"
}
]
}
}
},
"description": "A dictionary with a data property that contains an array of up to `limit` addresses. Each entry in the array is a separate address object. The previous and next page of address entries can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively.<br>If no more addresses are available beyond the current set of returned results, the `next_url` field will be empty."
},
"all_bank_accounts": {
"content": {
"application/json": {
"example": {
"count": 2,
"data": [
{
"account_number": "1234564789",
"account_type": "company",
"bank_name": "JPMORGAN CHASE BANK, NA",
"date_created": "2019-03-30T13:13:22.200Z",
"date_modified": "2019-03-30T13:13:23.385Z",
"description": "Example bank account",
"id": "bank_0e3fb07eba0b35b",
"metadata": {},
"object": "bank_account",
"routing_number": "122100024",
"signatory": "John Doe",
"signature_url": "https://lob-assets.com/letters/asd_asdfghjklqwertyu.pdf?version=45&expires=1234567890&signature=a",
"verified": true
},
{
"account_number": "1234564789",
"account_type": "company",
"bank_name": "JPMORGAN CHASE BANK, NA",
"date_created": "2019-03-30T13:11:06.809Z",
"date_modified": "2019-03-30T13:11:07.872Z",
"description": "Example bank account",
"id": "bank_eba93f7de3c02d9",
"metadata": {},
"object": "bank_account",
"routing_number": "122100024",
"signatory": "John Doe",
"verified": true
}
],
"next_url": "https://api.lob.com/v1/bank_accounts?limit=2&after=eyJkYXRlT2Zmc2V0IjoiMjAxOS0wMy0zMFQxMzoxMTowNi44MDlaIiwiaWRPZmZzZXQiOiJiYW5rX2ViYTkzZjdkZTNjMDJkOSJ9",
"object": "list",
"previous_url": null
},
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"properties": {
"data": {
"description": "list of bank_accounts",
"items": {
"$ref": "#/components/schemas/bank_account"
},
"type": "array"
}
},
"type": "object"
}
]
}
}
},
"description": "A dictionary with a data property that contains an array of up to `limit` bank_accounts. Each entry in the array is a separate bank_account. The previous and next page of bank_accounts can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively.<br>If no more bank_accounts are available beyond the current set of returned results, the `next_url` field will be empty."
},
"all_booklets": {
"content": {
"application/json": {
"example": {
"count": 2,
"data": [
{
"carrier": "USPS",
"date_created": "2021-03-16T18:40:40.504Z",
"date_modified": "2021-03-16T18:40:40.504Z",
"description": "April Campaign",
"expected_delivery_date": "2021-03-24",
"from": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_line2": null,
"address_state": "CA",
"address_zip": "94107-1741",
"company": null,
"date_created": "2017-09-05T15:54:53.264Z",
"date_modified": "2017-09-05T15:54:53.264Z",
"deleted": true,
"description": null,
"email": null,
"id": "adr_b8fb5acf3a2b55db",
"metadata": {},
"name": "LEORE AVIDAR",
"object": "address",
"phone": null
},
"fsc": false,
"id": "ord_0d6a16a3fff6318ac8f8008dc1",
"mail_type": "usps_first_class",
"merge_variables": {
"name": "Harry"
},
"metadata": {},
"object": "booklet",
"pages": 8,
"send_date": "2021-03-16T18:45:40.493Z",
"size": "8.375x5.375",
"source_material": "60# Gloss Text",
"thumbnails": [
{
"large": "https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg",
"medium": "https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_medium_1.png?version=v1&expires=1618512040&signature=ryxN7bsXGtw_GRFSP3Cs3A3IYjxZi3cW9BHDCNgMt6p3nobVmsc_iFHt2e-S7ndAXhhN7nP-MQVov3bt3r37BQ",
"small": "https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA"
}
],
"to": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_line2": null,
"address_state": "CA",
"address_zip": "94107-1741",
"company": null,
"date_created": "2017-09-05T15:54:53.264Z",
"date_modified": "2017-09-05T15:54:53.264Z",
"deleted": true,
"description": null,
"email": null,
"id": "adr_d3489cd64c791ab5",
"metadata": {},
"name": "HARRY ZHANG",
"object": "address",
"phone": null
},
"tracking_events": [],
"tracking_number": null,
"url": "https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA",
"use_type": "marketing"
},
{
"carrier": "USPS",
"date_created": "2021-03-16T18:40:40.504Z",
"date_modified": "2021-03-16T18:40:40.504Z",
"description": "April Campaign",
"expected_delivery_date": "2021-03-24",
"from": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_line2": null,
"address_state": "CA",
"address_zip": "94107-1741",
"company": "LOB",
"date_created": "2018-12-08T03:01:07.651Z",
"date_modified": "2018-12-08T03:01:07.651Z",
"description": null,
"email": null,
"id": "adr_210a8d4b0b76d77b",
"metadata": {},
"name": null,
"object": "address",
"phone": null
},
"fsc": false,
"id": "ord_851100000f31bb1a872f794cee",
"mail_type": "usps_first_class",
"merge_variables": {
"name": "Harry"
},
"metadata": {},
"object": "booklet",
"pages": 8,
"send_date": "2021-03-16T18:45:40.493Z",
"size": "8.375x5.375",
"source_material": "60# Gloss Text",
"thumbnails": [
{
"large": "https://lob-assets.com/order-creatives/ord_851100000f31bb1a872f794cee_comp_a20fd48ba4efda76ee827400d_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg",
"medium": "https://lob-assets.com/order-creatives/ord_851100000f31bb1a872f794cee_comp_a20fd48ba4efda76ee827400d_thumb_medium_1.png?version=v1&expires=1618512040&signature=ryxN7bsXGtw_GRFSP3Cs3A3IYjxZi3cW9BHDCNgMt6p3nobVmsc_iFHt2e-S7ndAXhhN7nP-MQVov3bt3r37BQ",
"small": "https://lob-assets.com/order-creatives/ord_851100000f31bb1a872f794cee_comp_a20fd48ba4efda76ee827400d_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA"
}
],
"to": {
"address_city": "CHARLOTTE",
"address_country": "UNITED STATES",
"address_line1": "2812 PARK RD",
"address_line2": null,
"address_state": "NC",
"address_zip": "28209-1314",
"company": null,
"date_created": "2021-03-16T18:40:40.410Z",
"date_modified": "2021-03-16T18:40:40.410Z",
"deleted": true,
"description": null,
"email": null,
"id": "adr_f9228b743884ff98",
"metadata": {},
"name": "AYA",
"object": "address",
"phone": null
},
"tracking_events": [],
"tracking_number": null,
"url": "https://lob-assets.com/order-creatives/ord_851100000f31bb1a872f794cee_comp_a20fd48ba4efda76ee827400d.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA",
"use_type": "marketing"
}
],
"next_url": null,
"object": "list",
"previous_url": null
},
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"properties": {
"data": {
"description": "list of booklets",
"items": {
"$ref": "#/components/schemas/booklet"
},
"type": "array"
}
},
"type": "object"
}
]
}
}
},
"description": "A dictionary with a data property that contains an array of up to `limit` booklets. Each entry in the array is a separate booklet. The previous and next page of booklets can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively. If no more booklets are available beyond the current set of returned results, the `next_url` field will be empty."
},
"all_campaigns": {
"content": {
"application/json": {
"example": {
"count": 1,
"data": [
{
"auto_cancel_if_ncoa": false,
"billing_group_id": "bg_fe3079dcdd80e5ae",
"cancel_window_campaign_minutes": 60,
"creatives": [],
"date_created": "2017-09-05T17:47:53.767Z",
"date_modified": "2017-09-05T17:47:53.767Z",
"deleted": false,
"description": "My Campaign's description",
"id": "cmp_e05ee61ff80764b",
"is_draft": true,
"metadata": {},
"name": "My Campaign",
"object": "campaign",
"schedule_type": "immediate",
"send_date": null,
"target_delivery_date": null,
"uploads": [],
"use_type": "marketing"
}
],
"next_url": null,
"object": "list",
"previous_url": null
},
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"properties": {
"data": {
"description": "list of campaigns",
"items": {
"$ref": "#/components/schemas/campaign"
},
"type": "array"
}
},
"type": "object"
}
]
}
}
},
"description": "A dictionary with a data property that contains an array of up to `limit` campaigns. Each entry in the array is a separate campaign. The previous and next page of campaigns can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively.<br>If no more campaigns are available beyond the current set of returned results, the `next_url` field will be empty."
},
"all_checks": {
"content": {
"application/json": {
"example": {
"count": 2,
"data": [
{
"amount": 22.5,
"attachment_template_id": "tmpl_a",
"attachment_template_version_id": "vrsn_a",
"bank_account": {
"account_number": "123456789",
"account_type": "individual",
"bank_name": "J.P. MORGAN CHASE BANK, N.A.",
"date_created": "2015-11-06T19:24:24.440Z",
"date_modified": "2015-11-06T19:41:28.312Z",
"description": "Test Bank Account",
"id": "bank_8cad8df5354d33f",
"metadata": {},
"object": "bank_account",
"routing_number": "322271627",
"signatory": "John Doe",
"signature_url": "https://lob-assets.com/bank-accounts/asd_asdfghjkqwertyui.pdf?expires=1234567890&signature=aksdf",
"verified": true
},
"carrier": "USPS",
"check_bottom_template_id": "tmpl_a",
"check_bottom_template_version_id": "vrsn_a",
"check_number": 12559,
"date_created": "2019-08-08T19:34:47.571Z",
"date_modified": "2019-08-08T19:34:49.612Z",
"deleted": true,
"description": "Demo Check",
"expected_delivery_date": "2019-08-16",
"from": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_state": "CA",
"address_zip": "94107-1741",
"date_created": "2018-12-08T03:01:07.651Z",
"date_modified": "2018-12-08T03:01:07.651Z",
"id": "adr_210a8d4b0b76d77b",
"metadata": {},
"name": "LEORE AVIDAR",
"object": "address"
},
"id": "chk_0176bf6197100185",
"mail_type": "usps_first_class",
"memo": "rent",
"merge_variables": {},
"message": "pancakes are good",
"metadata": {},
"object": "check",
"send_date": "2019-08-08",
"thumbnails": [
{
"large": "https://lob-assets.com/checks/chk_0176bf6197100185_thumb_large_1.png?version=v1&expires=1568239682&signature=VJlOkVDPKZThstdd632r3Grm2WhoyPkC-pffpcePTw1i1NkpAObDSRaItKMOQgeWkAcUud3SH0tYcVOadaNiCw",
"medium": "https://lob-assets.com/checks/chk_0176bf6197100185_thumb_medium_1.png?version=v1&expires=1568239682&signature=-iJD7C58xOCD8eQ01StqSlw9WbDymL0Ygze9twfTs9s17zQppr2Zx363_Z4bP3ATHNhF3osjHuAxIasI2Wf6DQ",
"small": "https://lob-assets.com/checks/chk_0176bf6197100185_thumb_small_1.png?version=v1&expires=1568239682&signature=T8DfMm_mxJJzIPgm8I0lvYY4Z6I8aFjsGsrEAicEqw8Ei_FaOtiGQKGeY16rdugAt8lmS_iX0lveBoG2RgWDDw"
},
{
"large": "https://lob-assets.com/checks/chk_0176bf6197100185_thumb_large_2.png?version=v1&expires=1568239682&signature=ybe8ovBh8Gf-AWKGRs4CB4XkU-erPVbY66umXARhTiJG2Dg1QlyCb9WmBXWt0tBCwD5NGMl20mHeAgHwecLxBA",
"medium": "https://lob-assets.com/checks/chk_0176bf6197100185_thumb_medium_2.png?version=v1&expires=1568239682&signature=sdgnJMzusEfndu7dNmk37eKc0AV7Hmqev6TQAqkCESs5pg7j6dDTsp7v4pnDvhsj8d7SIMcahl1aGiysoom0CA",
"small": "https://lob-assets.com/checks/chk_0176bf6197100185_thumb_small_2.png?version=v1&expires=1568239682&signature=XpCkOjy2zIKXkuc0s-UAYGNwpD_pgt7c9FKTDUCYbyqXupAg1MV1l2tdqevr0L0LT5FJqrGZH9khD5QRMQTkAA"
}
],
"to": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_line2": "",
"address_state": "CA",
"address_zip": "94107-1741",
"company": "LOB",
"date_created": "2018-12-08T03:08:43.446Z",
"date_modified": "2018-12-08T03:08:43.446Z",
"description": "Harry - Office",
"email": "harry@lob.com",
"id": "adr_bae820679f3f536b",
"metadata": {},
"name": "HARRY ZHANG",
"object": "address",
"phone": "5555555555",
"recipient_moved": false
},
"tracking_events": [],
"url": "https://lob-assets.com/checks/chk_0176bf6197100185.pdf?version=v1&expires=1568239682&signature=aqKV5lmg_ktxzyl-qEwIf8-7DbvcguLO0LrfFcyMrUDDt6hxX_da0MEEpElxKR876VUaZrpHq_i_ayDWrsK3BA",
"use_type": "operational"
},
{
"amount": 22.5,
"bank_account": {
"account_number": "123456789",
"account_type": "individual",
"bank_name": "J.P. MORGAN CHASE BANK, N.A.",
"date_created": "2015-11-06T19:24:24.440Z",
"date_modified": "2015-11-06T19:41:28.312Z",
"description": "Test Bank Account",
"id": "bank_8cad8df5354d33f",
"metadata": {},
"object": "bank_account",
"routing_number": "322271627",
"signatory": "John Doe",
"verified": true
},
"carrier": "USPS",
"check_number": 12558,
"date_created": "2019-08-08T19:34:27.802Z",
"date_modified": "2019-08-08T19:34:30.582Z",
"description": "Demo Check",
"expected_delivery_date": "2019-08-16",
"from": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_state": "CA",
"address_zip": "94107-1741",
"date_created": "2018-12-08T03:01:07.651Z",
"date_modified": "2018-12-08T03:01:07.651Z",
"id": "adr_210a8d4b0b76d77b",
"metadata": {},
"name": "LEORE AVIDAR",
"object": "address"
},
"id": "chk_92b9a6714bc0557c",
"mail_type": "usps_first_class",
"memo": "rent",
"merge_variables": null,
"metadata": {},
"object": "check",
"send_date": "2019-08-08T19:34:27.802Z",
"thumbnails": [
{
"large": "https://lob-assets.com/checks/chk_92b9a6714bc0557c_thumb_large_1.png?version=v1&expires=1568239682&signature=SzCLKJ5m_TKJPLlL9PMw-zW9wo5mVYEK1jCtHwWRwwEaNU2v4Aehy-YHtus3TFJIt8RD2M-0Y3MtCxHwhqSABg",
"medium": "https://lob-assets.com/checks/chk_92b9a6714bc0557c_thumb_medium_1.png?version=v1&expires=1568239682&signature=vHyuOtsanX4HnY_0LNft6ZJ8C67JnbI8ZVCjA2d9nR0Rd6lCl0Nk1s6BAhefbBkzecX9Yp0B8NWN9Q5v1Z4ICw",
"small": "https://lob-assets.com/checks/chk_92b9a6714bc0557c_thumb_small_1.png?version=v1&expires=1568239682&signature=ublquO_xAdvAkAwGJuOjgZQwcz7c3Ao4NHWHeDVTBEBjcrQr8LavxWEwUc1KU105Zex3SajRQLd6hqJOrDl0Bw"
},
{
"large": "https://lob-assets.com/checks/chk_92b9a6714bc0557c_thumb_large_2.png?version=v1&expires=1568239682&signature=NQf7tP9F4rP66S16hQ8duFpZSbTjaGBGK61Sr3H5D4CWtRyaPdoQlIpT2Jw-eKRcuYRkDEtQse_oWtL5gPqXDQ",
"medium": "https://lob-assets.com/checks/chk_92b9a6714bc0557c_thumb_medium_2.png?version=v1&expires=1568239682&signature=2vwvm_QsfmdtkAa-_F4uk-0yeUPRascyhfwOr-OX1ya9i_8gdFQAxMTrP-FfNBVSYFXeknFm6IUPJHggfgeiBg",
"small": "https://lob-assets.com/checks/chk_92b9a6714bc0557c_thumb_small_2.png?version=v1&expires=1568239682&signature=iElagODaOCkF_lCUxIw-lK50GhEU1ar_odmslCazZqD4Fsd_rQLx3M4Q5HzYWp4evfzuCoFvk4oAQVuIAaguAw"
},
{
"large": "https://lob-assets.com/checks/chk_92b9a6714bc0557c_thumb_large_3.png?version=v1&expires=1568239682&signature=If4tXlN13WYy7JDPpFkWw0HAQpYNJHqi2UstiPHxUA_8IAj6vXORb-22acI124Pd1bR1QSjBHAW1gbiJ0kjiAQ",
"medium": "https://lob-assets.com/checks/chk_92b9a6714bc0557c_thumb_medium_3.png?version=v1&expires=1568239682&signature=vSgwVs7T9E6KKBK7XU-6jRL9i0jvgTqvNxkdRARFf0UNlryJFm8l_t_x5mPH0sCTFZcLp7ouRaR5hhdHC6vZBQ",
"small": "https://lob-assets.com/checks/chk_92b9a6714bc0557c_thumb_small_3.png?version=v1&expires=1568239682&signature=dbjFd44H9TyZsc3d0fqKon5e0GqZ6GA1dT26MH6WnoX8lrQor2CA6sZJ5qmu0Z4SAFlMKAzb-twqN7faLjEbDQ"
}
],
"to": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_state": "CA",
"address_zip": "94107-1741",
"date_created": "2018-12-08T03:08:43.446Z",
"date_modified": "2018-12-08T03:08:43.446Z",
"id": "adr_bae820679f3f536b",
"metadata": {},
"name": "HARRY ZHANG",
"object": "address"
},
"tracking_events": [],
"url": "https://lob-assets.com/checks/chk_92b9a6714bc0557c.pdf?version=v1&expires=1568239682&signature=jCct5PvzU58Iz2pSo58nf6rgsMRcJfMbUWThmm6lztFl5Vn2Y204b9h7gvw0vJvkDK2ThfaYqaUbWc0KzTpvAg",
"use_type": "operational"
}
],
"next_url": "https://api.lob.com/v1/checks?limit=2&after=eyJkYXRlT2Zmc2V0IjoiMjAxOS0wOC0wOFQxOTozNDoyNy44MDJaIiwiaWRPZmZzZXQiOiJjaGtfOTJiOWE2NzE0YmMwNTU3YyJ9",
"object": "list",
"previous_url": null
},
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"properties": {
"data": {
"description": "list of checks",
"items": {
"$ref": "#/components/schemas/check"
},
"type": "array"
}
},
"type": "object"
}
]
}
}
},
"description": "A dictionary with a data property that contains an array of up to `limit` checks. Each entry in the array is a separate check. The previous and next page of checks can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively.<br>If no more checks are available beyond the current set of returned results, the `next_url` field will be empty."
},
"all_informed_delivery_campaigns": {
"content": {
"application/json": {
"example": {
"count": 2,
"data": [
{
"account_id": "xxxxxxxxxxxxxxxxxxxx",
"brand_name": "Lob",
"campaign_code": "1a1a1a1a-9657-423b-b3c7-2+Code",
"date_created": "2024-08-30T23:30:02.980Z",
"date_modified": "2024-08-30T23:30:05.027Z",
"deleted": false,
"end_date": "2024-10-15T00:00:00.000Z",
"end_serial": 3183506,
"id": "infd_234g5324g324g23",
"lob_campaign_id": null,
"mode": "live",
"object": "informed_delivery_campaign",
"quantity": 20,
"representative_image_s3_link": null,
"ride_along_image_s3_link": "https://lob-assets.com/informed-delivery/infd_234g5324g324g23_ride_along.jpg",
"ride_along_url": "https://www.lob.com",
"service_request_number": null,
"start_date": "2024-08-31T00:00:00.000Z",
"start_serial": 3183487,
"status": "approved",
"usps_campaign_id": "1234567890",
"usps_title": "Campaign: 1a1a1a1a-9657-423b-b3c7-2"
},
{
"account_id": "xxxxxxxxxxxxxxxxxxxx",
"brand_name": "Lob",
"campaign_code": "133d228e-f9e9-4056-aaea-f+Code",
"date_created": "2024-08-30T23:30:02.980Z",
"date_modified": "2024-09-30T23:30:05.027Z",
"deleted": false,
"end_date": "2024-10-15T00:00:00.000Z",
"end_serial": null,
"id": "infd_23g23g234g23g42",
"lob_campaign_id": null,
"mode": "live",
"object": "informed_delivery_campaign",
"quantity": 5,
"representative_image_s3_link": null,
"ride_along_image_s3_link": "https://lob-assets.com/informed-delivery/infd_23g23g234g23g42_ride_along.jpg",
"ride_along_url": "https://www.lob.com",
"service_request_number": null,
"start_date": "2024-08-31T00:00:00.000Z",
"start_serial": null,
"status": "pending_approval",
"usps_campaign_id": "23452345",
"usps_title": "Campaign: 133d228e-f9e9-4056-aaea-f"
}
],
"next_url": null,
"object": "list",
"previous_url": null
},
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"properties": {
"data": {
"description": "list of Informed Delivery campaigns",
"items": {
"$ref": "#/components/schemas/response"
},
"type": "array"
}
},
"type": "object"
}
]
}
}
},
"description": "A dictionary with a data property that contains an array of up to `limit` Informed Delivery campaigns. Each entry in the array is a separate campaign. The previous and next page of campaigns can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively. If no more campaigns are available beyond the current set of returned results, the `next_url` field will be empty."
},
"all_letters": {
"content": {
"application/json": {
"example": {
"count": 2,
"data": [
{
"address_placement": "top_first_page",
"carrier": "USPS",
"color": true,
"custom_envelope": null,
"date_created": "2019-08-08T17:09:14.514Z",
"date_modified": "2019-08-08T17:09:16.850Z",
"description": "Demo Letter",
"double_sided": false,
"expected_delivery_date": "2019-08-16",
"extra_service": "certified",
"from": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_line2": null,
"address_state": "CA",
"address_zip": "94107-1741",
"company": null,
"date_created": "2018-12-08T03:01:07.651Z",
"date_modified": "2018-12-08T03:01:07.651Z",
"description": null,
"email": null,
"id": "adr_210a8d4b0b76d77b",
"metadata": {},
"name": "LEORE AVIDAR",
"object": "address",
"phone": null
},
"fsc": false,
"id": "ltr_5ba44b462c79f07c",
"mail_type": "usps_first_class",
"merge_variables": null,
"metadata": {},
"object": "letter",
"perforated_page": null,
"return_envelope": false,
"send_date": "2019-08-08",
"template_id": "tmpl_a",
"template_version_id": "vrsn_a",
"thumbnails": [
{
"large": "https://lob-assets.com/letters/ltr_5ba44b462c79f07c_thumb_large_1.png?version=v1&expires=1568239830&signature=54LUIDKZyItA9pnC87d1pJVAuw8bhKLCsMpNWkB3LgdVWxPxxb_c1IyIWAbSR-dyOYEOlDBCc40J4Kns-O_mAg",
"medium": "https://lob-assets.com/letters/ltr_5ba44b462c79f07c_thumb_medium_1.png?version=v1&expires=1568239830&signature=H7354Qpcm9S4aXbrMsBe6QJ6lSNi9IWPgMJtLWLi4Kyx9tHF8Mp9YEc_IL9x89Jfw4-yRzKDXA410X4W0PssBQ",
"small": "https://lob-assets.com/letters/ltr_5ba44b462c79f07c_thumb_small_1.png?version=v1&expires=1568239830&signature=xZUmE8rq8wSECHPEb9c37cUDZBzGUO3XK5LsIPZhI6dOXgm6zJEn8_7tKuZ3JWBmvNJNXdTl_ufkNu4avjQUDw"
}
],
"to": {
"address_city": "SUMMERSIDE",
"address_country": "CANADA",
"address_line1": "370 WATER ST",
"address_line2": "",
"address_state": "PRINCE EDWARD ISLAND",
"address_zip": "C1N 1C4",
"company": "Lob",
"date_created": "2019-09-20T00:14:00.361Z",
"date_modified": "2019-09-20T00:14:00.361Z",
"description": "Harry - Office",
"email": "harry@lob.com",
"id": "adr_asdi2y3riuasasoi",
"metadata": {},
"name": "Harry Zhang",
"object": "address",
"phone": "5555555555",
"recipient_moved": false
},
"tracking_events": [
{
"date_created": "2019-10-08T19:41:00Z",
"date_modified": "2019-10-08T19:41:00Z",
"details": {
"action_required": false,
"description": "Package has been delivered.",
"event": "delivered",
"notes": "Delivered, Front Desk/Reception/Mail Room"
},
"id": "evnt_9e84094c9368cfb",
"location": "33408",
"name": "Delivered",
"object": "tracking_event",
"time": "2019-10-08T19:41:00Z",
"type": "certified"
}
],
"tracking_number": "92071902358909000011275538",
"url": "https://lob-assets.com/letters/ltr_5ba44b462c79f07c.pdf?version=v1&expires=1568239830&signature=Ob-DUPLJLM4scWQeCDNadPJ4j33MZw16pykOxwv2us-bA7utTYi6oZ8WrEtBYDBBo09XkapR3gdJf0NEr90xAA",
"use_type": "marketing"
},
{
"address_placement": "top_first_page",
"cards": null,
"carrier": "USPS",
"color": true,
"custom_envelope": null,
"date_created": "2019-08-08T17:08:12.224Z",
"date_modified": "2019-08-08T17:08:13.990Z",
"description": "Demo Letter",
"double_sided": false,
"expected_delivery_date": "2019-08-16",
"extra_service": null,
"from": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_line2": null,
"address_state": "CA",
"address_zip": "94107-1741",
"company": null,
"date_created": "2018-12-08T03:01:07.651Z",
"date_modified": "2018-12-08T03:01:07.651Z",
"description": null,
"email": null,
"id": "adr_210a8d4b0b76d77b",
"metadata": {},
"name": "LEORE AVIDAR",
"object": "address",
"phone": null
},
"fsc": true,
"id": "ltr_da8267c6a6545cd6",
"mail_type": "usps_first_class",
"merge_variables": null,
"metadata": {},
"object": "letter",
"perforated_page": null,
"return_envelope": false,
"send_date": "2019-08-08T17:08:12.224Z",
"thumbnails": [
{
"large": "https://lob-assets.com/letters/ltr_da8267c6a6545cd6_thumb_large_1.png?version=v1&expires=1568239830&signature=4Y1OIymaWkSO3aBIHCeshFAVnF-pDcF2FFqkx_jovaUFuk4FT1SI24L7_POwTRXQHlETMGlzkP_CGgqselRUAA",
"medium": "https://lob-assets.com/letters/ltr_da8267c6a6545cd6_thumb_medium_1.png?version=v1&expires=1568239830&signature=gz63l0yi3sK_sXjYfIVdLSvkknJFr_O5TWRulo_iKIgS-PosIl6J0tDR6bx_Tv5Ab_w7DABg3qdKZ846MZ7TCw",
"small": "https://lob-assets.com/letters/ltr_da8267c6a6545cd6_thumb_small_1.png?version=v1&expires=1568239830&signature=C1Rs83187HpWGhsg_pJIOhDIKlDtC_IgBBxHiocCEzJ8CncJwqrq5yHke-p97Dv7o81G_pfhFmirai589O6DCw"
}
],
"to": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_line2": null,
"address_state": "CA",
"address_zip": "94107-1741",
"company": null,
"date_created": "2018-12-08T03:01:07.651Z",
"date_modified": "2018-12-08T03:01:07.651Z",
"description": null,
"email": null,
"id": "adr_210a8d4b0b76d77b",
"metadata": {},
"name": "LEORE AVIDAR",
"object": "address",
"phone": null
},
"tracking_events": [],
"tracking_number": null,
"url": "https://lob-assets.com/letters/ltr_da8267c6a6545cd6.pdf?version=v1&expires=1568239830&signature=HH-5RnbD4x0eJcnEC9HhqKSvQGsbkjovzvqSKgBijUHKIXwEKQJ4CbYhKs_U2q2A1k20Xefcaw7bfdPKozuqCQ",
"use_type": "marketing"
}
],
"next_url": "https://api.lob.com/v1/letters?limit=2&after=eyJkYXRlT2Zmc2V0IjoiMjAxOS0wOC0wOFQxNzowODoxMi4yMjRaIiwiaWRPZmZzZXQiOiJsdHJfZGE4MjY3YzZhNjU0NWNkNiJ9",
"object": "list",
"previous_url": null
},
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"properties": {
"data": {
"description": "list of letters",
"items": {
"$ref": "#/components/schemas/letter"
},
"type": "array"
}
},
"type": "object"
}
]
}
}
},
"description": "A dictionary with a data property that contains an array of up to `limit` letters. Each entry in the array is a separate letter. The previous and next page of letters can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively. If no more letters are available beyond the current set of returned results, the `next_url` field will be empty."
},
"all_postcards": {
"content": {
"application/json": {
"example": {
"count": 2,
"data": [
{
"back_template_id": null,
"back_template_version_id": null,
"carrier": "USPS",
"date_created": "2021-03-24T22:51:42.838Z",
"date_modified": "2021-03-24T22:51:42.838Z",
"description": null,
"front_template_id": null,
"front_template_version_id": null,
"fsc": false,
"id": "psc_208e45e48d271294",
"metadata": {},
"object": "postcard",
"send_date": "2021-03-24T22:51:42.838Z",
"to": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_line2": null,
"address_state": "CA",
"address_zip": "94107-1741",
"company": null,
"date_created": "2018-12-08T03:01:07.651Z",
"date_modified": "2018-12-08T03:01:07.651Z",
"description": null,
"email": null,
"id": "adr_210a8d4b0b76d77b",
"metadata": {},
"name": "LEORE AVIDAR",
"object": "address",
"phone": null
},
"url": "https://lob-assets.com/postcards/psc_208e45e48d271294.pdf?version=v1&expires=1619218302&signature=NfHHLBSr5tOHA_Z4kij4dKqZG8f3vMDtwvuFVeeF9pV_lylcjLsVVODhNCE5hR6-2slUr6t9WMNsi429Pj7_DA",
"use_type": "marketing"
},
{
"back_template_id": null,
"back_template_version_id": null,
"carrier": "USPS",
"date_created": "2021-03-24T22:51:42.838Z",
"date_modified": "2021-03-24T22:51:42.838Z",
"description": null,
"expected_delivery_date": "2021-03-30",
"from": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_line2": null,
"address_state": "CA",
"address_zip": "94107-1741",
"company": null,
"date_created": "2018-12-08T03:01:07.651Z",
"date_modified": "2018-12-08T03:01:07.651Z",
"description": null,
"email": null,
"id": "adr_210a8d4b0b76d77b",
"metadata": {},
"name": "LEORE AVIDAR",
"object": "address",
"phone": null
},
"front_template_id": null,
"front_template_version_id": null,
"fsc": false,
"id": "psc_0e03d1ad7d31f151",
"mail_type": "usps_first_class",
"merge_variables": {},
"metadata": {},
"object": "postcard",
"send_date": "2021-03-24T22:51:42.838Z",
"size": "6x11",
"thumbnails": [
{
"large": "https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_large_1.png?expires=1540372221&signature=gsKvxXgrm4v4iZD3bOibK7jApNkEMdW",
"medium": "https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_medium_1.png?expires=1540372221&signature=bAzL8sv935PY09FWSkpDpWKkyvGSWYF",
"small": "https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_small_1.png?expires=1540372221&signature=a5fRBJ22ZA78Vgpg34M9UfmHWTS3eha"
}
],
"to": {
"address_city": "SUMMERSIDE",
"address_country": "CANADA",
"address_line1": "370 WATER ST",
"address_line2": "",
"address_state": "PE",
"address_zip": "C1N 1C4",
"company": "LOB",
"date_created": "2018-12-08T03:01:07.651Z",
"date_modified": "2018-12-08T03:01:07.651Z",
"description": null,
"email": "jane.doe@lob.com",
"id": "adr_c7cb63d68f8d6",
"metadata": {},
"name": "JANE DOE",
"object": "address",
"phone": "5555555555",
"recipient_moved": false
},
"tracking_events": [],
"url": "https://lob-assets.com/postcards/psc_208e45e48d271294.pdf?version=v1&expires=1619218302&signature=NfHHLBSr5tOHA_Z4kij4dKqZG8f3vMDtwvuFVeeF9pV_lylcjLsVVODhNCE5hR6-2slUr6t9WMNsi429Pj7_DA",
"use_type": "marketing"
}
],
"next_url": null,
"object": "list",
"previous_url": null
},
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"properties": {
"data": {
"description": "list of postcards",
"items": {
"$ref": "#/components/schemas/postcard"
},
"type": "array"
}
},
"type": "object"
}
]
}
}
},
"description": "A dictionary with a data property that contains an array of up to `limit` postcards. Each entry in the array is a separate postcard. The previous and next page of postcards can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively.<br>If no more postcards are available beyond the current set of returned results, the `next_url` field will be empty."
},
"all_self_mailers": {
"content": {
"application/json": {
"example": {
"count": 2,
"data": [
{
"carrier": "USPS",
"date_created": "2021-03-16T18:40:40.504Z",
"date_modified": "2021-03-16T18:41:06.691Z",
"deleted": true,
"description": "April Campaign",
"expected_delivery_date": "2021-03-24",
"from": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_line2": null,
"address_state": "CA",
"address_zip": "94107-1741",
"company": "LOB",
"date_created": "2018-12-08T03:01:07.651Z",
"date_modified": "2018-12-08T03:01:07.651Z",
"description": null,
"email": null,
"id": "adr_210a8d4b0b76d77b",
"metadata": {},
"name": null,
"object": "address",
"phone": null
},
"fsc": false,
"id": "sfm_7239rhwqkrfaskas",
"inside_template_id": "tmpl_a3cb937f26d7eec",
"inside_template_version_id": "vrsn_bfdf70893b00a85",
"mail_type": "usps_first_class",
"merge_variables": {
"name": null
},
"metadata": {},
"object": "self_mailer",
"outside_template_id": "tmpl_a3cb937f26d7eec",
"outside_template_version_id": "vrsn_bfdf70893b00a85",
"send_date": "2021-03-16T18:45:40.493Z",
"size": "6x18_bifold",
"thumbnails": [
{
"large": "https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_1.png?version=v1&expires=1618781264&signature=g2jifhCselPqIj8au6lsbJMNFN8ZX3aM6GkLoAXiHBCS8X5mF9nhVbmO0odpnmwNlV1CWIp-MXVsZkC3NmxqBQ",
"medium": "https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_1.png?version=v1&expires=1618781264&signature=b9pynuawVpU_vrhnT_mTpksdE-FLF_ZjdIBOFR_ltIzEGlx-VKD4VvZrqP98lG2D8V7UKQ7SdRr2nUAk4LxvCg",
"small": "https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_1.png?version=v1&expires=1618781264&signature=A7q5HbRO53sUYYnwGlmP5mTS6ylLE7kS2mYhfcEOdexjyqG7UseK0MD26DppE4Q0aE4u2msDVMxd5ukjMerYCg"
},
{
"large": "https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_2.png?version=v1&expires=1618781264&signature=NieHDnoQ7STZUvofHrFt7S987CzIkUJWpaSgpVQPZw-C3_wwTPsIrvxYdXEuFrr6ciTUcxRBFPlE0lurmMkyCA",
"medium": "https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_2.png?version=v1&expires=1618781264&signature=xEAX7bURyc8fSphacuo5yb7iVIpT8Xvq05KgMaNQS4r3aCpx0z1p42wbPmW758B5Ae0li1YDYvVyzS7qJIoWAw",
"small": "https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_2.png?version=v1&expires=1618781264&signature=biJY4-ZbNNRydPYg3cZkq7wxjILbPBK_nIVyoyQsg5X5q4jlsa-2fzeMa48V9jprUetsC6WEuYvasHosRfG_DQ"
}
],
"to": {
"address_city": "SUMMERSIDE",
"address_country": "CANADA",
"address_line1": "370 WATER ST",
"address_line2": "",
"address_state": "PRINCE EDWARD ISLAND",
"address_zip": "C1N 1C4",
"company": "Lob",
"date_created": "2019-09-20T00:14:00.361Z",
"date_modified": "2019-09-20T00:14:00.361Z",
"description": "Harry - Office",
"email": "harry@lob.com",
"id": "adr_asdi2y3riuasasoi",
"metadata": {},
"name": "Harry Zhang",
"object": "address",
"phone": "5555555555",
"recipient_moved": false
},
"tracking_events": [],
"url": "https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf.pdf?version=v1&expires=1618781264&signature=YP_bCwrgVA2lz1Gr1YVCJN1f-WspUGsH0aJp2ihjfLXU7lDUV12_xRv4uPch0mfWeOOxEqpyP8hGpgvjmQKNAw",
"use_type": "marketing"
},
{
"carrier": "USPS",
"date_created": "2021-03-16T18:40:40.504Z",
"date_modified": "2021-03-16T18:41:06.691Z",
"deleted": true,
"description": "April Campaign",
"expected_delivery_date": "2021-03-24",
"from": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_line2": null,
"address_state": "CA",
"address_zip": "94107-1741",
"company": "LOB",
"date_created": "2018-12-08T03:01:07.651Z",
"date_modified": "2018-12-08T03:01:07.651Z",
"description": null,
"email": null,
"id": "adr_210a8d4b0b76d77b",
"metadata": {},
"name": null,
"object": "address",
"phone": null
},
"fsc": true,
"id": "sfm_8ffbe811dea49dcf",
"inside_template_id": "tmpl_a3cb937f26d7eec",
"inside_template_version_id": "vrsn_bfdf70893b00a85",
"mail_type": "usps_first_class",
"merge_variables": {
"name": null
},
"metadata": {},
"object": "self_mailer",
"outside_template_id": "tmpl_a3cb937f26d7eec",
"outside_template_version_id": "vrsn_bfdf70893b00a85",
"send_date": "2021-03-16T18:45:40.493Z",
"size": "6x18_bifold",
"thumbnails": [
{
"large": "https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_1.png?version=v1&expires=1618781264&signature=g2jifhCselPqIj8au6lsbJMNFN8ZX3aM6GkLoAXiHBCS8X5mF9nhVbmO0odpnmwNlV1CWIp-MXVsZkC3NmxqBQ",
"medium": "https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_1.png?version=v1&expires=1618781264&signature=b9pynuawVpU_vrhnT_mTpksdE-FLF_ZjdIBOFR_ltIzEGlx-VKD4VvZrqP98lG2D8V7UKQ7SdRr2nUAk4LxvCg",
"small": "https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_1.png?version=v1&expires=1618781264&signature=A7q5HbRO53sUYYnwGlmP5mTS6ylLE7kS2mYhfcEOdexjyqG7UseK0MD26DppE4Q0aE4u2msDVMxd5ukjMerYCg"
},
{
"large": "https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_2.png?version=v1&expires=1618781264&signature=NieHDnoQ7STZUvofHrFt7S987CzIkUJWpaSgpVQPZw-C3_wwTPsIrvxYdXEuFrr6ciTUcxRBFPlE0lurmMkyCA",
"medium": "https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_2.png?version=v1&expires=1618781264&signature=xEAX7bURyc8fSphacuo5yb7iVIpT8Xvq05KgMaNQS4r3aCpx0z1p42wbPmW758B5Ae0li1YDYvVyzS7qJIoWAw",
"small": "https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_2.png?version=v1&expires=1618781264&signature=biJY4-ZbNNRydPYg3cZkq7wxjILbPBK_nIVyoyQsg5X5q4jlsa-2fzeMa48V9jprUetsC6WEuYvasHosRfG_DQ"
}
],
"to": {
"address_city": "CHARLOTTE",
"address_country": "UNITED STATES",
"address_line1": "2812 PARK RD",
"address_line2": null,
"address_state": "NC",
"address_zip": "28209-1314",
"company": null,
"date_created": "2021-03-16T18:40:40.410Z",
"date_modified": "2021-03-16T18:40:40.410Z",
"deleted": true,
"description": null,
"email": null,
"id": "adr_f9228b743884ff98",
"metadata": {},
"name": "AYA",
"object": "address",
"phone": null
},
"tracking_events": [],
"url": "https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf.pdf?version=v1&expires=1618781264&signature=YP_bCwrgVA2lz1Gr1YVCJN1f-WspUGsH0aJp2ihjfLXU7lDUV12_xRv4uPch0mfWeOOxEqpyP8hGpgvjmQKNAw",
"use_type": "marketing"
}
],
"next_url": null,
"object": "list",
"previous_url": null
},
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"properties": {
"data": {
"description": "list of self_mailers",
"items": {
"$ref": "#/components/schemas/self_mailer"
},
"type": "array"
}
},
"type": "object"
}
]
}
}
},
"description": "A dictionary with a data property that contains an array of up to `limit` self_mailers. Each entry in the array is a separate self_mailer. The previous and next page of self_mailers can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively.<br>If no more self_mailers are available beyond the current set of returned results, the `next_url` field will be empty."
},
"all_snap_packs": {
"content": {
"application/json": {
"example": {
"count": 2,
"data": [
{
"carrier": "USPS",
"color": false,
"date_created": "2021-03-16T18:40:40.504Z",
"date_modified": "2021-03-16T18:40:40.504Z",
"description": "April Campaign",
"expected_delivery_date": "2021-03-24",
"from": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_line2": null,
"address_state": "CA",
"address_zip": "94107-1741",
"company": null,
"date_created": "2017-09-05T17:47:53.767Z",
"date_modified": "2017-09-05T17:47:53.767Z",
"deleted": true,
"description": null,
"email": null,
"id": "adr_210a8d4b0b76d77b",
"metadata": {},
"name": "LEORE AVIDAR",
"object": "address",
"phone": null
},
"fsc": false,
"id": "ord_0d6a16a3fff6318ac8f8008dc1",
"inside_template_id": "tmpl_a3cb937f26d7eec",
"inside_template_version_id": "vrsn_bfdf70893b00a85",
"mail_type": "usps_first_class",
"merge_variables": {
"name": null
},
"object": "snap_pack",
"outside_template_id": "tmpl_a3cb937f26d7eec",
"outside_template_version_id": "vrsn_bfdf70893b00a85",
"send_date": "2021-03-16T18:45:40.493Z",
"size": "8.5x11",
"thumbnails": [
{
"large": "https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg",
"medium": "https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_medium_1.png?version=v1&expires=1618512040&signature=ryxN7bsXGtw_GRFSP3Cs3A3IYjxZi3cW9BHDCNgMt6p3nobVmsc_iFHt2e-S7ndAXhhN7nP-MQVov3bt3r37BQ",
"small": "https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA"
},
{
"large": "https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_large_2.png?version=v1&expires=1618512040&signature=cICc7HEm1xG_eyM4a_wtvPk2FqoLRmtgGa29kJisWnMIYBL0OkyzG4ZCYGMhp-5cZpJlSpXfTgGKh_Qmeo1TDw",
"medium": "https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_medium_2.png?version=v1&expires=1618512040&signature=Ue1lw5CMj7KRx6cMQL8xPeazaHCdJzWcACd1w3acuYPnWkVIpSt62OIO7hAtpAQK9xm1dhhlFj0rqRZMdRMMBA",
"small": "https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_small_2.png?version=v1&expires=1618512040&signature=3gTgU7Fd3KoT_vNlQnTGptRps5ZgnkhSnPrAwk7L98higIzSwfKoLvuu_DIpMM48dHbxckKT9waR8euJ4KSDBQ"
}
],
"to": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_line2": null,
"address_state": "CA",
"address_zip": "94107-1741",
"company": null,
"date_created": "2017-09-05T17:47:53.767Z",
"date_modified": "2017-09-05T17:47:53.767Z",
"deleted": true,
"description": null,
"email": null,
"id": "adr_bae820679f3f536b",
"metadata": {},
"name": "HARRY ZHANG",
"object": "address",
"phone": null
},
"tracking_events": [],
"url": "https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA",
"use_type": "marketing"
},
{
"carrier": "USPS",
"color": false,
"date_created": "2021-03-16T18:40:40.504Z",
"date_modified": "2021-03-16T18:40:40.504Z",
"description": "April Campaign",
"expected_delivery_date": "2021-03-24",
"from": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_line2": null,
"address_state": "CA",
"address_zip": "94107-1741",
"company": "LOB",
"date_created": "2018-12-08T03:01:07.651Z",
"date_modified": "2018-12-08T03:01:07.651Z",
"description": null,
"email": null,
"id": "adr_210a8d4b0b76d77b",
"metadata": {},
"name": null,
"object": "address",
"phone": null
},
"fsc": false,
"id": "ord_851100000f31bb1a872f794cee",
"inside_template_id": "tmpl_a3cb937f26d7eec",
"inside_template_version_id": "vrsn_bfdf70893b00a85",
"mail_type": "usps_first_class",
"merge_variables": {
"name": null
},
"object": "snap_pack",
"outside_template_id": "tmpl_a3cb937f26d7eec",
"outside_template_version_id": "vrsn_bfdf70893b00a85",
"send_date": "2021-03-16T18:45:40.493Z",
"size": "8.5x11",
"thumbnails": [
{
"large": "https://lob-assets.com/order-creatives/ord_851100000f31bb1a872f794cee_comp_a20fd48ba4efda76ee827400d_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg",
"medium": "https://lob-assets.com/order-creatives/ord_851100000f31bb1a872f794cee_comp_a20fd48ba4efda76ee827400d_thumb_medium_1.png?version=v1&expires=1618512040&signature=ryxN7bsXGtw_GRFSP3Cs3A3IYjxZi3cW9BHDCNgMt6p3nobVmsc_iFHt2e-S7ndAXhhN7nP-MQVov3bt3r37BQ",
"small": "https://lob-assets.com/order-creatives/ord_851100000f31bb1a872f794cee_comp_a20fd48ba4efda76ee827400d_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA"
},
{
"large": "https://lob-assets.com/order-creatives/ord_851100000f31bb1a872f794cee_comp_a20fd48ba4efda76ee827400d_thumb_large_2.png?version=v1&expires=1618512040&signature=cICc7HEm1xG_eyM4a_wtvPk2FqoLRmtgGa29kJisWnMIYBL0OkyzG4ZCYGMhp-5cZpJlSpXfTgGKh_Qmeo1TDw",
"medium": "https://lob-assets.com/order-creatives/ord_851100000f31bb1a872f794cee_comp_a20fd48ba4efda76ee827400d_thumb_medium_2.png?version=v1&expires=1618512040&signature=Ue1lw5CMj7KRx6cMQL8xPeazaHCdJzWcACd1w3acuYPnWkVIpSt62OIO7hAtpAQK9xm1dhhlFj0rqRZMdRMMBA",
"small": "https://lob-assets.com/order-creatives/ord_851100000f31bb1a872f794cee_comp_a20fd48ba4efda76ee827400d_thumb_small_2.png?version=v1&expires=1618512040&signature=3gTgU7Fd3KoT_vNlQnTGptRps5ZgnkhSnPrAwk7L98higIzSwfKoLvuu_DIpMM48dHbxckKT9waR8euJ4KSDBQ"
}
],
"to": {
"address_city": "CHARLOTTE",
"address_country": "UNITED STATES",
"address_line1": "2812 PARK RD",
"address_line2": null,
"address_state": "NC",
"address_zip": "28209-1314",
"company": null,
"date_created": "2021-03-16T18:40:40.410Z",
"date_modified": "2021-03-16T18:40:40.410Z",
"deleted": true,
"description": null,
"email": null,
"id": "adr_f9228b743884ff98",
"metadata": {},
"name": "AYA",
"object": "address",
"phone": null
},
"tracking_events": [],
"url": "https://lob-assets.com/order-creatives/ord_851100000f31bb1a872f794cee_comp_a20fd48ba4efda76ee827400d.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA",
"use_type": "marketing"
}
],
"next_url": null,
"object": "list",
"previous_url": null
},
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"properties": {
"data": {
"description": "list of snap_packs",
"items": {
"$ref": "#/components/schemas/snap_pack"
},
"type": "array"
}
},
"type": "object"
}
]
}
}
},
"description": "A dictionary with a data property that contains an array of up to `limit` snap_packs. Each entry in the array is a separate self_mailer. The previous and next page of snap_packs can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively.<br>If no more snap_packs are available beyond the current set of returned results, the `next_url` field will be empty."
},
"all_template_versions": {
"content": {
"application/json": {
"example": {
"count": 2,
"data": [
{
"date_created": "2017-11-09T05:09:03.665Z",
"date_modified": "2018-05-22T22:01:10.479Z",
"description": "Second Version",
"html": "Second HTML for ",
"id": "vrsn_4d6ff5d868bf630",
"object": "version"
},
{
"date_created": "2017-11-09T05:08:40.004Z",
"date_modified": "2018-05-22T22:01:11.309Z",
"description": "Test Template",
"html": "HTML for ",
"id": "vrsn_2a17159c1911919",
"object": "version"
}
],
"object": "list"
},
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"properties": {
"data": {
"description": "list of template versions",
"items": {
"$ref": "#/components/schemas/template_version"
},
"type": "array"
}
},
"type": "object"
}
]
}
}
},
"description": "A dictionary with a data property that contains an array of up to `limit` template versions. Each entry in the array is a separate template version object. The previous and next page of template versions can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively.<br>If no more template versions are available beyond the current set of returned results, the `next_url` field will be empty."
},
"all_templates": {
"content": {
"application/json": {
"example": {
"count": 2,
"data": [
{
"date_created": "2019-07-27T23:49:01.511Z",
"date_modified": "2019-07-27T23:49:01.511Z",
"description": "Test Template",
"id": "tmpl_d5a5a89da9106f8",
"metadata": {},
"object": "template",
"published_version": {
"date_created": "2019-07-27T23:49:01.512Z",
"date_modified": "2019-07-27T23:49:01.512Z",
"description": "Test Template",
"engine": "handlebars",
"html": "HTML for ",
"id": "vrsn_232a02fb8224791",
"object": "version",
"suggest_json_editor": false
},
"versions": [
{
"date_created": "2019-07-27T23:49:01.512Z",
"date_modified": "2019-07-27T23:49:01.512Z",
"description": "Test Template",
"engine": "legacy",
"html": "HTML for ",
"id": "vrsn_232a02fb8224791",
"object": "version",
"suggest_json_editor": true
}
]
},
{
"date_created": "2019-03-29T10:22:34.642Z",
"date_modified": "2019-03-29T10:22:34.642Z",
"description": "Test Template",
"id": "tmpl_59b2150ae120887",
"metadata": {},
"object": "template",
"published_version": {
"date_created": "2019-03-29T10:22:34.643Z",
"date_modified": "2019-03-29T10:22:34.643Z",
"description": "Test Template",
"html": "HTML for ",
"id": "vrsn_2a7eb63ccb795b9",
"object": "version"
},
"versions": [
{
"date_created": "2019-03-29T10:22:34.643Z",
"date_modified": "2019-03-29T10:22:34.643Z",
"description": "Test Template",
"html": "HTML for ",
"id": "vrsn_2a7eb63ccb795b9",
"object": "version"
}
]
}
],
"next_url": "https://api.lob.com/v1/templates?limit=2&after=eyJkYXRlT2Zmc2V0IjoiMjAxOS0wMy0yOVQxMDoyMjozNC42NDJaIiwiaWRPZmZzZXQiOiJ0bXBsXzU5YjIxNTBhZTEyMDg4NyJ9",
"object": "list",
"previous_url": null
},
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"properties": {
"data": {
"description": "list of templates",
"items": {
"$ref": "#/components/schemas/template"
},
"type": "array"
}
},
"type": "object"
}
]
}
}
},
"description": "A dictionary with a data property that contains an array of up to `limit` templates. Each entry in the array is a separate template. The previous and next page of templates can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively.<br>If no more templates are available beyond the current set of returned results, the `next_url` field will be empty."
},
"all_uploads": {
"content": {
"application/json": {
"example": [
{
"accountId": "fa9ea650fc7b31a89f92",
"bytesProcessed": 17268,
"campaignId": "cmp_1933ad629bae1408",
"dateCreated": "2017-09-05T17:47:53.767Z",
"dateModified": "2017-09-05T17:47:53.767Z",
"failedMailpieces": 5,
"failuresUrl": "https://www.example.com",
"id": "upl_71be866e430b11e9",
"mergeVariableColumnMapping": {
"gift_code": "code"
},
"metadata": {
"columns": [
"recipient_name",
"zip_code"
]
},
"mode": "test",
"optionalAddressColumnMapping": {
"address_country": "country",
"address_line2": "secondary_line",
"company": "company"
},
"originalFilename": "my_audience.csv",
"requiredAddressColumnMapping": {
"address_city": "city",
"address_line1": "primary_line",
"address_state": "state",
"address_zip": "zip_code",
"name": "recipient_name"
},
"state": "Draft",
"totalMailpieces": 100,
"validatedMailpieces": 95
}
],
"schema": {
"items": {
"$ref": "#/components/schemas/upload"
},
"type": "array"
}
}
},
"description": "An array of matching uploads. Each entry in the array is a separate upload."
},
"bank_account_deleted": {
"content": {
"application/json": {
"example": {
"deleted": true,
"id": "bank_123456789"
},
"schema": {
"$ref": "#/components/schemas/bank_deletion"
}
}
},
"description": "Deleted"
},
"bank_account_error": {
"content": {
"application/json": {
"example": {
"error": {
"code": "invalid",
"message": "routing_number is required",
"status_code": 422
}
},
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error"
},
"billing_group_error": {
"content": {
"application/json": {
"example": {
"error": {
"code": "invalid",
"message": "message about incorrect parameter",
"status_code": 422
}
},
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error"
},
"billing_group_list_error": {
"content": {
"application/json": {
"example": {
"error": {
"code": "not_found",
"message": "billing_group not found",
"status_code": 404
}
},
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error"
},
"booklet_deleted": {
"content": {
"application/json": {
"example": {
"deleted": true,
"id": "ord_0d6a16a3fff6318ac8f8008dc1"
},
"schema": {
"$ref": "#/components/schemas/booklet_deletion"
}
}
},
"description": "Deleted"
},
"buckslip_deleted": {
"content": {
"application/json": {
"example": {
"deleted": true,
"id": "buckslip_123456789"
},
"schema": {
"$ref": "#/components/schemas/buckslip_deletion"
}
}
},
"description": "Deleted the buckslip"
},
"buckslip_error": {
"content": {
"application/json": {
"example": {
"error": {
"code": "invalid",
"message": "message about incorrect parameter",
"status_code": 422
}
},
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error"
},
"buckslip_order_error": {
"content": {
"application/json": {
"example": {
"error": {
"code": "not_found",
"message": "buckslip not found",
"status_code": 404
}
},
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error"
},
"bulk_intl_verifications": {
"content": {
"application/json": {
"example": {
"addresses": [
{
"components": {
"city": "SUMMERSIDE",
"postal_code": "C1N 1C4",
"primary_number": "370",
"state": "PE",
"street_name": "WATER ST"
},
"country": "CA",
"coverage": "SUBBUILDING",
"deliverability": "deliverable",
"id": "intl_ver_c7cb63d68f8d6",
"last_line": "SUMMERSIDE PE C1N 1C4",
"object": "intl_verification",
"primary_line": "370 WATER ST",
"recipient": null,
"secondary_line": "",
"status": "LV4"
}
],
"errors": false
},
"schema": {
"$ref": "#/components/schemas/intl_verifications"
}
}
},
"description": "Returns an array of international verification objects.",
"headers": {
"ratelimit-limit": {
"$ref": "#/components/headers/ratelimit-limit"
},
"ratelimit-remaining": {
"$ref": "#/components/headers/ratelimit-remaining"
},
"ratelimit-reset": {
"$ref": "#/components/headers/ratelimit-reset"
}
}
},
"bulk_us_verifications": {
"content": {
"application/json": {
"example": {
"addresses": [
{
"components": {
"address_type": "commercial",
"carrier_route": "C032",
"carrier_route_type": "city_delivery",
"city": "SAN FRANCISCO",
"county": "SAN FRANCISCO",
"county_fips": "06075",
"default_building_address": false,
"delivery_point_barcode": "941071728506",
"extra_secondary_designator": "",
"extra_secondary_number": "",
"latitude": 37.77597542841264,
"longitude": -122.3929557343685,
"pmb_designator": "",
"pmb_number": "",
"po_box_only_flag": "N",
"primary_number": "210",
"record_type": "street",
"secondary_designator": "",
"secondary_number": "",
"state": "CA",
"street_name": "KING",
"street_postdirection": "",
"street_predirection": "",
"street_suffix": "ST",
"zip_code": "94107",
"zip_code_plus_4": "1702",
"zip_code_type": "standard"
},
"deliverability": "deliverable",
"deliverability_analysis": {
"dpv_active": "Y",
"dpv_cmra": "N",
"dpv_confirmation": "Y",
"dpv_door_not_accessible": "N",
"dpv_footnotes": [
"AA",
"BB"
],
"dpv_inactive_reason": "",
"dpv_no_secure_location": "N",
"dpv_non_delivery_day_flag": "N",
"dpv_non_delivery_day_values": "",
"dpv_throwback": "N",
"dpv_vacant": "N",
"ews_match": false,
"lacs_indicator": "",
"lacs_return_code": "",
"suite_return_code": ""
},
"id": "us_ver_c7cb63d68f8d6",
"last_line": "SAN FRANCISCO CA 94107-1702",
"lob_confidence_score": {
"level": "high",
"score": 100
},
"object": "us_verification",
"primary_line": "210 KING ST",
"recipient": "LOB.COM",
"secondary_line": "",
"urbanization": "",
"valid_address": true
}
],
"errors": false
},
"schema": {
"$ref": "#/components/schemas/us_verifications"
}
}
},
"description": "Returns a list of US verification objects.",
"headers": {
"ratelimit-limit": {
"$ref": "#/components/headers/ratelimit-limit"
},
"ratelimit-remaining": {
"$ref": "#/components/headers/ratelimit-remaining"
},
"ratelimit-reset": {
"$ref": "#/components/headers/ratelimit-reset"
}
}
},
"campaign_deleted": {
"content": {
"application/json": {
"example": {
"deleted": true,
"id": "cmp_e05ee61ff80764b"
},
"schema": {
"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.",
"properties": {
"deleted": {
"description": "True if the resource has been successfully deleted.",
"type": "boolean"
},
"id": {
"$ref": "#/components/schemas/cmp_id"
}
}
}
}
},
"description": "Deleted the campaign."
},
"campaigns_error": {
"content": {
"application/json": {
"example": {
"error": {
"code": "not_found",
"message": "campaign not found",
"status_code": 404
}
},
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error"
},
"card_deleted": {
"content": {
"application/json": {
"example": {
"deleted": true,
"id": "card_123456789"
},
"schema": {
"$ref": "#/components/schemas/card_deletion"
}
}
},
"description": "Deleted the card"
},
"card_order_error": {
"content": {
"application/json": {
"example": {
"error": {
"code": "not_found",
"message": "card not found",
"status_code": 404
}
},
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error"
},
"check_canceled": {
"content": {
"application/json": {
"example": {
"deleted": true,
"id": "chk_123456789"
},
"schema": {
"$ref": "#/components/schemas/check_deletion"
}
}
},
"description": "Deleted"
},
"creatives_error": {
"content": {
"application/json": {
"example": {
"error": {
"code": "not_found",
"message": "creative not found",
"status_code": 404
}
},
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error"
},
"events": {
"content": {
"application/json": {
"example": {
"body": {
"back_template_id": null,
"carrier": "USPS",
"date_created": "2016-12-04T10:51:51.843Z",
"date_modified": "2016-12-04T10:51:51.843Z",
"description": "Test Postcard",
"expected_delivery_date": "2016-12-09",
"from": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "123 TEST ST",
"address_line2": "UNIT 1",
"address_state": "CA",
"address_zip": "94107",
"company": "LOB",
"date_created": "2016-12-04T10:51:51.845Z",
"date_modified": "2016-12-04T10:51:51.845Z",
"description": "Test Sender Address",
"email": null,
"id": "adr_d2e26faf793ed422",
"metadata": {},
"name": "Harry Zhang",
"object": "address",
"phone": null
},
"front_template_id": null,
"id": "psc_d2d10a2e9cba991c",
"mail_type": "usps_first_class",
"merge_variables": null,
"metadata": {},
"object": "postcard",
"send_date": "2016-12-04T10:56:51.843Z",
"size": "4x6",
"thumbnails": [
{
"large": "https://lob-assets.com/postcards/psc_d2d10a2e9cba991c_thumb_large_1.png?expires=1540372221&signature=RAHpIwoYKYM17f0bbaoOiamCkjpzYfH",
"medium": "https://lob-assets.com/postcards/psc_d2d10a2e9cba991c_thumb_medium_1.png?expires=1540372221&signature=VBClptOuCcj9Ybay6gE5aetT5j3C7KS",
"small": "https://lob-assets.com/postcards/psc_d2d10a2e9cba991c_thumb_small_1.png?expires=1540372221&signature=McmqScxPgbe7yQY5X31U3vhU8VUlfA1"
},
{
"large": "https://lob-assets.com/postcards/psc_d2d10a2e9cba991c_thumb_large_1.png?expires=1540372221&signature=z80p90RBak6T26IAfg5yg7a6qKF53a8",
"medium": "https://lob-assets.com/postcards/psc_d2d10a2e9cba991c_thumb_medium_1.png?expires=1540372221&signature=1ApGx0kn5EO4qQKGJzCe6zEPnQpzpRY",
"small": "https://lob-assets.com/postcards/psc_d2d10a2e9cba991c_thumb_small_1.png?expires=1540372221&signature=5biHoaCmkphQaGJymOZxmTF0hHdiH4N"
}
],
"to": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "123 TEST ST",
"address_line2": "UNIT 1",
"address_state": "CA",
"address_zip": "94107",
"company": "LOB",
"date_created": "2016-12-04T10:51:51.844Z",
"date_modified": "2016-12-04T10:51:51.844Z",
"description": "Test Recipient Address",
"email": null,
"id": "adr_8e783523dd7f0e70",
"metadata": {},
"name": "Harry Zhang",
"object": "address",
"phone": null
},
"tracking_events": [],
"url": "https://lob-assets.com/postcards/psc_d2d10a2e9cba991c.pdf?expires=1540372221&signature=dNE8OtbDymujUxBIMYle4H1cv1aZNFk"
},
"date_created": "2016-12-04T22:50:08.180Z",
"event_type": {
"enabled_for_test": true,
"id": "postcard.created",
"object": "event_type",
"resource": "postcards"
},
"id": "evt_d95ff8ffd2b5cfb4",
"object": "event",
"reference_id": "psc_d2d10a2e9cba991c"
},
"schema": {
"$ref": "#/components/schemas/events"
}
}
},
"description": "Returns an `event` object to the specified server."
},
"identity_validation": {
"content": {
"application/json": {
"example": {
"confidence": "high",
"id": "id_validation_8a013f3e",
"last_line": "SAN FRANCISCO CA 94107-1728",
"object": "id_validation",
"primary_line": "210 KING ST.",
"recipient": "LARRY LOBSTER",
"score": 100,
"secondary_line": "",
"urbanization": ""
},
"schema": {
"$ref": "#/components/schemas/identity_validation"
}
}
},
"description": "Returns the likelihood a given name is associated with an address.",
"headers": {
"ratelimit-limit": {
"$ref": "#/components/headers/ratelimit-limit"
},
"ratelimit-remaining": {
"$ref": "#/components/headers/ratelimit-remaining"
},
"ratelimit-reset": {
"$ref": "#/components/headers/ratelimit-reset"
}
}
},
"identity_validation_error": {
"content": {
"application/json": {
"example": {
"error": {
"code": "invalid",
"message": "recipient is required",
"status_code": 422
}
},
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error"
},
"intl_verifications": {
"content": {
"application/json": {
"examples": {
"full": {
"value": {
"components": {
"city": "SUMMERSIDE",
"postal_code": "C1N 1C4",
"primary_number": "370",
"state": "PE",
"street_name": "WATER ST"
},
"country": "CA",
"coverage": "SUBBUILDING",
"deliverability": "deliverable",
"id": "intl_ver_c7cb63d68f8d6",
"last_line": "SUMMERSIDE PE C1N 1C4",
"object": "intl_verification",
"primary_line": "370 WATER ST",
"recipient": null,
"secondary_line": "",
"status": "LV4"
}
},
"test": {
"value": {
"components": {
"city": "SUMMERSIDE",
"postal_code": "C1N 1C4",
"primary_number": "370",
"state": "PE",
"street_name": "WATER ST"
},
"country": "CA",
"coverage": "SUBBUILDING",
"deliverability": "deliverable",
"id": "intl_ver_c7cb63d68f8d6",
"last_line": "SUMMERSIDE PE C1N 1C4",
"object": "intl_verification",
"primary_line": "370 WATER ST",
"recipient": "TEST KEYS DO NOT VERIFY ADDRESSES",
"secondary_line": "",
"status": "LV4"
}
}
},
"schema": {
"$ref": "#/components/schemas/intl_verification"
}
}
},
"description": "Returns an international verification object.",
"headers": {
"ratelimit-limit": {
"$ref": "#/components/headers/ratelimit-limit"
},
"ratelimit-remaining": {
"$ref": "#/components/headers/ratelimit-remaining"
},
"ratelimit-reset": {
"$ref": "#/components/headers/ratelimit-reset"
}
}
},
"intl_verifications_error": {
"content": {
"application/json": {
"example": {
"error": {
"code": "invalid",
"message": "country is required",
"status_code": 422
}
},
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error"
},
"letter_deleted": {
"content": {
"application/json": {
"example": {
"deleted": true,
"id": "ltr_123456789"
},
"schema": {
"$ref": "#/components/schemas/letter_deletion"
}
}
},
"description": "Deleted"
},
"mailpiece_error": {
"content": {
"application/json": {
"example": {
"error": {
"code": "not_found",
"message": "to address not found",
"status_code": 404
}
},
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error"
},
"post_address": {
"content": {
"application/json": {
"examples": {
"full_intl": {
"value": {
"address_city": "SUMMERSIDE",
"address_country": "CANADA",
"address_line1": "370 WATER ST",
"address_state": "PRINCE EDWARD ISLAND",
"address_zip": "C1N 1C4",
"company": "LOB",
"date_created": "2021-11-29T20:55:46.843Z",
"date_modified": "2021-11-29T20:56:46.843Z",
"description": "Harry - Office",
"email": "harry@lob.com",
"id": "adr_b9f49f464c836203",
"metadata": {},
"name": "HARRY ZHANG",
"object": "address",
"phone": "5555555555"
}
},
"full_us": {
"value": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_state": "CA",
"address_zip": "94107",
"company": "LOB",
"date_created": "2017-09-05T17:47:53.767Z",
"date_modified": "2017-09-05T17:47:53.767Z",
"description": "Harry - Office",
"email": "harry@lob.com",
"id": "adr_d3489cd64c791ab5",
"metadata": {},
"name": "HARRY ZHANG",
"object": "address",
"phone": "5555555555"
}
},
"ncoa_us_live": {
"value": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "\u2588\u2588\u2588\u2588",
"address_line2": "\u2588\u2588\u2588\u2588",
"address_state": "CA",
"address_zip": "94107",
"company": "LOB",
"date_created": "2017-09-05T17:47:53.767Z",
"date_modified": "2017-09-05T17:47:53.767Z",
"description": "Harry - Office",
"email": "harry@lob.com",
"id": "adr_d3489cd64c791ab5",
"inline": false,
"metadata": {},
"name": "HARRY ZHANG",
"object": "address",
"phone": "5555555555",
"recipient_moved": true
}
},
"ncoa_us_test": {
"value": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "\u2588\u2588\u2588\u2588",
"address_line2": "\u2588\u2588\u2588\u2588",
"address_state": "CA",
"address_zip": "94107",
"company": null,
"date_created": "2019-12-05T19:39:19.932Z",
"date_modified": "2019-12-05T19:39:19.932Z",
"description": null,
"email": null,
"id": "adr_e463565030210e12",
"inline": false,
"metadata": {},
"name": "TEST KEYS DO NOT VERIFY ADDRESSES",
"object": "address",
"phone": null,
"recipient_moved": true
}
}
},
"schema": {
"$ref": "#/components/schemas/address"
}
}
},
"description": "Echos the writable fields of a newly created address object.",
"headers": {
"ratelimit-limit": {
"$ref": "#/components/headers/ratelimit-limit"
},
"ratelimit-remaining": {
"$ref": "#/components/headers/ratelimit-remaining"
},
"ratelimit-reset": {
"$ref": "#/components/headers/ratelimit-reset"
}
}
},
"post_bank_account": {
"content": {
"$ref": "#/components/mediaTypes/bank_account"
},
"description": "Returns a bank_account object",
"headers": {
"ratelimit-limit": {
"$ref": "#/components/headers/ratelimit-limit"
},
"ratelimit-remaining": {
"$ref": "#/components/headers/ratelimit-remaining"
},
"ratelimit-reset": {
"$ref": "#/components/headers/ratelimit-reset"
}
}
},
"post_billing_group": {
"content": {
"$ref": "#/components/mediaTypes/billing_group"
},
"description": "Returns a billing group object",
"headers": {
"ratelimit-limit": {
"$ref": "#/components/headers/ratelimit-limit"
},
"ratelimit-remaining": {
"$ref": "#/components/headers/ratelimit-remaining"
},
"ratelimit-reset": {
"$ref": "#/components/headers/ratelimit-reset"
}
}
},
"post_booklet": {
"content": {
"$ref": "#/components/mediaTypes/booklet"
},
"description": "Returns a booklet object",
"headers": {
"ratelimit-limit": {
"$ref": "#/components/headers/ratelimit-limit"
},
"ratelimit-remaining": {
"$ref": "#/components/headers/ratelimit-remaining"
},
"ratelimit-reset": {
"$ref": "#/components/headers/ratelimit-reset"
}
}
},
"post_check": {
"content": {
"$ref": "#/components/mediaTypes/check"
},
"description": "Returns a check object",
"headers": {
"ratelimit-limit": {
"$ref": "#/components/headers/ratelimit-limit"
},
"ratelimit-remaining": {
"$ref": "#/components/headers/ratelimit-remaining"
},
"ratelimit-reset": {
"$ref": "#/components/headers/ratelimit-reset"
}
}
},
"post_letter": {
"content": {
"$ref": "#/components/mediaTypes/letter"
},
"description": "Returns a letter object",
"headers": {
"ratelimit-limit": {
"$ref": "#/components/headers/ratelimit-limit"
},
"ratelimit-remaining": {
"$ref": "#/components/headers/ratelimit-remaining"
},
"ratelimit-reset": {
"$ref": "#/components/headers/ratelimit-reset"
}
}
},
"post_postcard": {
"content": {
"$ref": "#/components/mediaTypes/postcard"
},
"description": "Returns a postcard object",
"headers": {
"ratelimit-limit": {
"$ref": "#/components/headers/ratelimit-limit"
},
"ratelimit-remaining": {
"$ref": "#/components/headers/ratelimit-remaining"
},
"ratelimit-reset": {
"$ref": "#/components/headers/ratelimit-reset"
}
}
},
"post_resource_proof": {
"content": {
"$ref": "#/components/mediaTypes/resource_proof"
},
"description": "Returns a resource proof object",
"headers": {
"ratelimit-limit": {
"$ref": "#/components/headers/ratelimit-limit"
},
"ratelimit-remaining": {
"$ref": "#/components/headers/ratelimit-remaining"
},
"ratelimit-reset": {
"$ref": "#/components/headers/ratelimit-reset"
}
}
},
"post_self_mailer": {
"content": {
"$ref": "#/components/mediaTypes/self_mailer"
},
"description": "Returns a self_mailer object",
"headers": {
"ratelimit-limit": {
"$ref": "#/components/headers/ratelimit-limit"
},
"ratelimit-remaining": {
"$ref": "#/components/headers/ratelimit-remaining"
},
"ratelimit-reset": {
"$ref": "#/components/headers/ratelimit-reset"
}
}
},
"post_snap_pack": {
"content": {
"$ref": "#/components/mediaTypes/snap_pack"
},
"description": "Returns a snap_pack object",
"headers": {
"ratelimit-limit": {
"$ref": "#/components/headers/ratelimit-limit"
},
"ratelimit-remaining": {
"$ref": "#/components/headers/ratelimit-remaining"
},
"ratelimit-reset": {
"$ref": "#/components/headers/ratelimit-reset"
}
}
},
"post_template_version": {
"content": {
"$ref": "#/components/mediaTypes/template_version"
},
"description": "Returns the template version with the given template and version ids.",
"headers": {
"ratelimit-limit": {
"$ref": "#/components/headers/ratelimit-limit"
},
"ratelimit-remaining": {
"$ref": "#/components/headers/ratelimit-remaining"
},
"ratelimit-reset": {
"$ref": "#/components/headers/ratelimit-reset"
}
}
},
"postcard_deleted": {
"content": {
"application/json": {
"example": {
"deleted": true,
"id": "psc_123456789"
},
"schema": {
"$ref": "#/components/schemas/postcard_deletion"
}
}
},
"description": "Deleted"
},
"reverse_geocode_lookups": {
"content": {
"application/json": {
"example": {
"addresses": [
{
"components": {
"zip_code": "94107",
"zip_code_plus_4": "1702"
},
"location_analysis": {
"distance": 1.32,
"latitude": 37.78271,
"longitude": -122.416202
}
},
{
"components": {
"zip_code": "94107",
"zip_code_plus_4": "1702"
},
"location_analysis": {
"distance": 1.33,
"latitude": 37.782917,
"longitude": -122.416131
}
}
],
"id": "us_reverse_geocode_8a013f3e"
},
"schema": {
"$ref": "#/components/schemas/reverse_geocode"
}
}
},
"description": "Returns a zip lookup object if a valid zip was provided.",
"headers": {
"ratelimit-limit": {
"$ref": "#/components/headers/ratelimit-limit"
},
"ratelimit-remaining": {
"$ref": "#/components/headers/ratelimit-remaining"
},
"ratelimit-reset": {
"$ref": "#/components/headers/ratelimit-reset"
}
}
},
"reverse_geocode_lookups_error": {
"content": {
"application/json": {
"example": {
"error": {
"code": "invalid",
"message": "latitude is required",
"status_code": 422
}
},
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error"
},
"self_mailer_deleted": {
"content": {
"application/json": {
"example": {
"deleted": true,
"id": "sfm_123456789"
},
"schema": {
"$ref": "#/components/schemas/self_mailer_deletion"
}
}
},
"description": "Deleted"
},
"snap_pack_deleted": {
"content": {
"application/json": {
"example": {
"deleted": true,
"id": "ord_0d6a16a3fff6318ac8f8008dc1"
},
"schema": {
"$ref": "#/components/schemas/snap_pack_deletion"
}
}
},
"description": "Deleted"
},
"template_deleted": {
"content": {
"application/json": {
"example": {
"value": {
"deleted": true,
"id": "tmpl_123456789"
}
},
"schema": {
"$ref": "#/components/schemas/template_deletion"
}
}
},
"description": "Deleted"
},
"template_error": {
"content": {
"application/json": {
"example": {
"error": {
"code": "invalid",
"message": "html is required",
"status_code": 422
}
},
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error"
},
"template_version_deleted": {
"content": {
"application/json": {
"example": {
"value": {
"deleted": true,
"id": "vrsn_123456789"
}
},
"schema": {
"$ref": "#/components/schemas/template_version_deletion"
}
}
},
"description": "Deleted"
},
"tracking_events": {
"content": {
"application/json": {
"examples": {
"certified": {
"value": {
"date_created": "2019-10-08T19:41:00Z",
"date_modified": "2019-10-08T19:41:00Z",
"details": {
"action_required": false,
"description": "Package has been delivered.",
"event": "delivered",
"notes": "Delivered, Front Desk/Reception/Mail Room"
},
"id": "evnt_9e84094c9368cfb",
"location": "33408",
"name": "Delivered",
"object": "tracking_event",
"time": "2019-10-08T19:41:00Z",
"type": "certified"
}
},
"normal": {
"value": {
"date_created": "2016-06-30T17:41:59.771Z",
"date_modified": "2016-06-30T17:41:59.771Z",
"details": null,
"id": "evnt_9e84094c9368cfb",
"location": "72231",
"name": "In Local Area",
"object": "tracking_event",
"time": "2016-06-30T15:51:41.000Z",
"type": "normal"
}
}
},
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/tracking_event_normal"
},
{
"$ref": "#/components/schemas/tracking_event_certified"
}
]
}
}
},
"description": "Returns a `tracking_event` object to the specified server."
},
"upload_export_error": {
"content": {
"application/json": {
"schema": {
"example": {
"code": 400,
"errors": [
"type must be a string"
],
"message": "Invalid body, check 'errors' property for more info."
},
"properties": {
"code": {
"description": "A conventional HTTP status code",
"enum": [
400,
404
],
"type": "number"
},
"errors": {
"description": "An array of pre-defined strings that identify an error",
"items": {
"type": "string"
},
"type": "array"
},
"message": {
"description": "A human-readable message with more details about the error",
"type": "string"
}
},
"required": [
"code",
"message",
"errors"
],
"type": "object"
}
}
},
"description": "Create Export Error"
},
"upload_not_found": {
"content": {
"application/json": {
"example": {
"error": {
"code": "not_found",
"message": "upload not found",
"status_code": 404
}
},
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Not Found Error"
},
"upload_validation_error": {
"content": {
"application/json": {
"schema": {
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"title": "Location",
"type": "array"
},
"msg": {
"title": "Message",
"type": "string"
},
"type": {
"title": "Error Type",
"type": "string"
}
},
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError",
"type": "object"
},
"title": "Detail",
"type": "array"
}
},
"title": "HTTPValidationError",
"type": "object"
}
}
},
"description": "Validation Error"
},
"us_autocompletions": {
"content": {
"application/json": {
"examples": {
"basic": {
"value": {
"id": "us_auto_a3ac97bcfbb2460ab20c",
"object": "us_autocompletion",
"suggestions": [
{
"city": "SAN FRANCISCO",
"primary_line": "185 BAYSIDE VILLAGE PL",
"state": "CA",
"zip_code": "94107"
},
{
"city": "SAN FRANCISCO",
"primary_line": "185 BRANNAN ST",
"state": "CA",
"zip_code": "94107"
},
{
"city": "SAN FRANCISCO",
"primary_line": "185 BONIFACIO ST",
"state": "CA",
"zip_code": "94107"
},
{
"city": "SAN FRANCISCO",
"primary_line": "185 BLAIR TER",
"state": "CA",
"zip_code": "94107"
},
{
"city": "SAN FRANCISCO",
"primary_line": "185 BLUXOME ST",
"state": "CA",
"zip_code": "94107"
},
{
"city": "SAN FRANCISCO",
"primary_line": "210 KING ST",
"state": "CA",
"zip_code": "94107"
},
{
"city": "SAN FRANCISCO",
"primary_line": "185 BRYANT ST",
"state": "CA",
"zip_code": "94107"
}
]
}
},
"test": {
"value": {
"id": "us_auto_a3ac97bcfbb2460ab20c",
"object": "us_autocompletion",
"suggestions": [
{
"city": "OXFORD",
"primary_line": "1 TELEPHONE RD",
"state": "AR",
"zip_code": "72565"
},
{
"city": "PALMDALE",
"primary_line": "1 TELEGA PL",
"state": "CA",
"zip_code": "93550"
},
{
"city": "ELMONT",
"primary_line": "1 TELEGRAM AVE",
"state": "NY",
"zip_code": "11003"
},
{
"city": "GARDEN CITY",
"primary_line": "1 TELEGRAM AVE",
"state": "KS",
"zip_code": "67846"
},
{
"city": "HOLMDEL",
"primary_line": "1 TELEGRAPH HILL RD",
"state": "NJ",
"zip_code": "07733"
},
{
"city": "HOLMDEL",
"primary_line": "1 TELEGRAPH HILL RD S",
"state": "NJ",
"zip_code": "07733"
},
{
"city": "SAN FRANCISCO",
"primary_line": "1 TELEGRAPH HILL BLVD",
"state": "CA",
"zip_code": "94133"
}
]
}
}
},
"schema": {
"$ref": "#/components/schemas/us_autocompletions"
}
}
},
"description": "Returns a US autocompletion object.",
"headers": {
"ratelimit-limit": {
"$ref": "#/components/headers/ratelimit-limit"
},
"ratelimit-remaining": {
"$ref": "#/components/headers/ratelimit-remaining"
},
"ratelimit-reset": {
"$ref": "#/components/headers/ratelimit-reset"
}
}
},
"us_autocompletions_error": {
"content": {
"application/json": {
"example": {
"error": {
"code": "invalid",
"message": "address_prefix is required",
"status_code": 422
}
},
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error"
},
"us_verifications": {
"content": {
"application/json": {
"examples": {
"basic": {
"value": {
"components": {
"address_type": "commercial",
"carrier_route": "C032",
"carrier_route_type": "city_delivery",
"city": "SAN FRANCISCO",
"county": "SAN FRANCISCO",
"county_fips": "06075",
"default_building_address": false,
"delivery_point_barcode": "941071702108",
"extra_secondary_designator": "",
"extra_secondary_number": "",
"latitude": 37.77597542841264,
"longitude": -122.3929557343685,
"pmb_designator": "",
"pmb_number": "",
"po_box_only_flag": "N",
"primary_number": "210",
"record_type": "street",
"secondary_designator": "",
"secondary_number": "",
"state": "CA",
"street_name": "KING",
"street_postdirection": "",
"street_predirection": "",
"street_suffix": "ST",
"zip_code": "94107",
"zip_code_plus_4": "1702",
"zip_code_type": "standard"
},
"deliverability": "deliverable",
"deliverability_analysis": {
"dpv_active": "Y",
"dpv_cmra": "N",
"dpv_confirmation": "Y",
"dpv_door_not_accessible": "N",
"dpv_footnotes": [
"AA",
"BB"
],
"dpv_inactive_reason": "",
"dpv_no_secure_location": "N",
"dpv_non_delivery_day_flag": "N",
"dpv_non_delivery_day_values": "",
"dpv_throwback": "N",
"dpv_vacant": "N",
"ews_match": false,
"lacs_indicator": "",
"lacs_return_code": "",
"suite_return_code": ""
},
"id": "us_ver_c7cb63d68f8d6",
"last_line": "SAN FRANCISCO CA 94107-1702",
"lob_confidence_score": {
"level": "high",
"score": 100
},
"object": "us_verification",
"primary_line": "210 KING ST",
"recipient": "LOB.COM",
"secondary_line": "",
"urbanization": "",
"valid_address": true
}
},
"test": {
"value": {
"components": {
"address_type": "residential",
"carrier_route": "BOO2",
"carrier_route_type": "po_box",
"city": "SAN FRANCISCO",
"county": "SAN FRANCISCO",
"county_fips": "06075",
"default_building_address": false,
"delivery_point_barcode": "941720114146",
"extra_secondary_designator": "",
"extra_secondary_number": "",
"latitude": 37.75971500260575,
"longitude": -122.69397561170017,
"pmb_designator": "",
"pmb_number": "",
"po_box_only_flag": "",
"primary_number": "720114",
"record_type": "po_box",
"secondary_designator": "",
"secondary_number": "",
"state": "CA",
"street_name": "PO BOX",
"street_postdirection": "",
"street_predirection": "",
"street_suffix": "",
"zip_code": "94172",
"zip_code_plus_4": "0114",
"zip_code_type": "po_box"
},
"deliverability": "deliverable",
"deliverability_analysis": {
"dpv_active": "Y",
"dpv_cmra": "N",
"dpv_confirmation": "Y",
"dpv_door_not_accessible": "",
"dpv_footnotes": [
"AA",
"BB"
],
"dpv_inactive_reason": "",
"dpv_no_secure_location": "",
"dpv_non_delivery_day_flag": "",
"dpv_non_delivery_day_values": "",
"dpv_throwback": "",
"dpv_vacant": "N",
"ews_match": false,
"lacs_indicator": "",
"lacs_return_code": "",
"suite_return_code": ""
},
"id": "us_ver_po_box",
"last_line": "SAN FRANCISCO CA 94172-0114",
"object": "us_verification",
"primary_line": "PO BOX 720114",
"recipient": "TEST KEYS DO NOT VERIFY ADDRESSES",
"secondary_line": "",
"urbanization": "",
"valid_address": true
}
}
},
"schema": {
"$ref": "#/components/schemas/us_verification"
}
}
},
"description": "Returns a US verification object.",
"headers": {
"ratelimit-limit": {
"$ref": "#/components/headers/ratelimit-limit"
},
"ratelimit-remaining": {
"$ref": "#/components/headers/ratelimit-remaining"
},
"ratelimit-reset": {
"$ref": "#/components/headers/ratelimit-reset"
}
}
},
"us_verifications_error": {
"content": {
"application/json": {
"example": {
"error": {
"code": "invalid",
"message": "primary_line is required or address is required",
"status_code": 422
}
},
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error"
},
"writeable_422": {
"content": {
"application/json": {
"example": {
"error": {
"code": "invalid",
"message": "quantity must be greater than or equal to 2",
"status_code": 422
}
},
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error"
},
"zip_lookups": {
"content": {
"application/json": {
"example": {
"cities": [
{
"city": "SAN FRANCISCO",
"county": "SAN FRANCISCO",
"county_fips": "06075",
"preferred": true,
"state": "CA"
}
],
"id": "us_zip_c7cb63d68f8d6",
"object": "us_zip_lookup",
"zip_code": "94107",
"zip_code_type": "standard"
},
"schema": {
"$ref": "#/components/schemas/zip"
}
}
},
"description": "Returns a zip lookup object if a valid zip was provided.",
"headers": {
"ratelimit-limit": {
"$ref": "#/components/headers/ratelimit-limit"
},
"ratelimit-remaining": {
"$ref": "#/components/headers/ratelimit-remaining"
},
"ratelimit-reset": {
"$ref": "#/components/headers/ratelimit-reset"
}
}
},
"zip_lookups_error": {
"content": {
"application/json": {
"example": {
"error": {
"code": "invalid",
"message": "zip_code is required",
"status_code": 422
}
},
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error"
}
},
"schemas": {
"0": {
"properties": {
"resource_parameters": {
"$ref": "#/components/schemas/postcard_resource_parameters"
},
"resource_type": {
"description": "The type of resource to generate a proof for.",
"enum": [
"postcard"
],
"type": "string"
},
"template_id": {
"description": "The template ID to associate with the resource proof.",
"nullable": true,
"type": "string"
}
},
"title": "Postcard Resource Proof",
"type": "object"
},
"1": {
"properties": {
"resource_parameters": {
"$ref": "#/components/schemas/letter_resource_parameters"
},
"resource_type": {
"description": "The type of resource to generate a proof for.",
"enum": [
"letter"
],
"type": "string"
},
"template_id": {
"description": "The template ID to associate with the resource proof.",
"nullable": true,
"type": "string"
}
},
"title": "Letter Resource Proof",
"type": "object"
},
"2": {
"properties": {
"resource_parameters": {
"$ref": "#/components/schemas/self_mailer_resource_parameters"
},
"resource_type": {
"description": "The type of resource to generate a proof for.",
"enum": [
"self_mailer"
],
"type": "string"
},
"template_id": {
"description": "The template ID to associate with the resource proof.",
"nullable": true,
"type": "string"
}
},
"title": "Self Mailer Resource Proof",
"type": "object"
},
"address": {
"oneOf": [
{
"$ref": "#/components/schemas/address_us"
},
{
"$ref": "#/components/schemas/address_intl"
}
]
},
"address_deletion": {
"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.",
"properties": {
"deleted": {
"$ref": "#/components/schemas/deleted"
},
"id": {
"$ref": "#/components/schemas/adr_id"
}
}
},
"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"
},
{
"anyOf": [
{
"required": [
"name"
],
"title": "address obj with `name` defined"
},
{
"required": [
"company"
],
"title": "address obj with `company` defined"
}
],
"properties": {
"address_country": {
"$ref": "#/components/schemas/country_extended"
},
"company": {
"$ref": "#/components/schemas/company"
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"email": {
"description": "Must be no longer than 100 characters.",
"maxLength": 100,
"nullable": true,
"type": "string"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"name": {
"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",
"maxLength": 40,
"nullable": true,
"type": "string"
},
"phone": {
"description": "Must be no longer than 40 characters.",
"maxLength": 40,
"nullable": true,
"type": "string"
}
},
"type": "object"
}
]
},
"address_editable_us": {
"allOf": [
{
"$ref": "#/components/schemas/address_fields_us"
},
{
"anyOf": [
{
"required": [
"name"
],
"title": "address obj with `name` defined"
},
{
"required": [
"company"
],
"title": "address obj with `company` defined"
}
],
"properties": {
"address_country": {
"default": "US",
"enum": [
"US"
],
"type": "string"
},
"company": {
"$ref": "#/components/schemas/company"
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"email": {
"description": "Must be no longer than 100 characters.",
"maxLength": 100,
"nullable": true,
"type": "string"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"name": {
"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",
"maxLength": 40,
"nullable": true,
"type": "string"
},
"phone": {
"description": "Must be no longer than 40 characters.",
"maxLength": 40,
"nullable": true,
"type": "string"
}
},
"type": "object"
}
]
},
"address_fields_intl": {
"properties": {
"address_city": {
"maxLength": 200,
"nullable": true,
"type": "string"
},
"address_line1": {
"description": "The primary number, street name, and directional information.",
"maxLength": 200,
"type": "string"
},
"address_line2": {
"description": "An optional field containing any information which can't fit into line 1.",
"maxLength": 200,
"nullable": true,
"type": "string"
},
"address_state": {
"maxLength": 200,
"nullable": true,
"type": "string"
},
"address_zip": {
"description": "Optional postal code.",
"maxLength": 40,
"nullable": true,
"type": "string"
}
},
"required": [
"address_line1",
"address_country"
],
"type": "object"
},
"address_fields_us": {
"properties": {
"address_city": {
"maxLength": 200,
"type": "string"
},
"address_line1": {
"description": "The primary number, street name, and directional information.",
"maxLength": 64,
"type": "string"
},
"address_line2": {
"description": "An optional field containing any information which can't fit into line 1.",
"maxLength": 64,
"nullable": true,
"type": "string"
},
"address_state": {
"description": "2 letter state short-name code",
"pattern": "^[a-zA-Z]{2}$",
"type": "string"
},
"address_zip": {
"description": "Must follow the ZIP format of `12345` or ZIP+4 format of `12345-1234`.\n",
"pattern": "^\\d{5}(-\\d{4})?$",
"type": "string"
}
},
"required": [
"address_line1",
"address_city",
"address_state",
"address_zip"
],
"type": "object"
},
"address_intl": {
"allOf": [
{
"$ref": "#/components/schemas/lob_base"
},
{
"anyOf": [
{
"required": [
"name"
],
"title": "address obj with `name` defined"
},
{
"required": [
"company"
],
"title": "address obj with `company` defined"
}
],
"example": {
"address_city": "SUMMERSIDE",
"address_country": "CANADA",
"address_line1": "370 WATER ST",
"address_line2": "",
"address_state": "PRINCE EDWARD ISLAND",
"address_zip": "C1N 1C4",
"company": "Lob",
"description": "Harry - Office",
"email": "harry@lob.com",
"id": "adr_e68217bd744d65c8",
"metadata": {},
"name": "Harry Zhang",
"phone": "5555555555"
},
"properties": {
"address_city": {
"maxLength": 200,
"nullable": true,
"type": "string"
},
"address_country": {
"description": "Full name of 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\u00d4TE D'IVOIRE",
"CROATIA",
"CUBA",
"CURA\u00c7AO",
"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\u2019S REPUBLIC OF)",
"KOREA, REPUBLIC OF",
"KUWAIT",
"KYRGYZSTAN",
"LAO PEOPLE\u2019S 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"
],
"maxLength": 200,
"type": "string"
},
"address_line1": {
"maxLength": 200,
"type": "string"
},
"address_line2": {
"maxLength": 200,
"nullable": true,
"type": "string"
},
"address_state": {
"description": "Will be returned as a full string",
"maxLength": 200,
"nullable": true,
"type": "string"
},
"address_zip": {
"description": "Optional postal code.",
"maxLength": 40,
"nullable": true,
"type": "string"
},
"company": {
"$ref": "#/components/schemas/company"
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"email": {
"description": "Must be no longer than 100 characters.",
"maxLength": 100,
"nullable": true,
"type": "string"
},
"id": {
"$ref": "#/components/schemas/adr_id"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"name": {
"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",
"maxLength": 40,
"nullable": true,
"type": "string"
},
"object": {
"default": "address",
"description": "Value is resource type.",
"enum": [
"address"
],
"type": "string"
},
"phone": {
"description": "Must be no longer than 40 characters.",
"maxLength": 40,
"nullable": true,
"type": "string"
}
},
"required": [
"id",
"address_line1",
"address_country"
],
"type": "object"
}
]
},
"address_placement": {
"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",
"enum": [
"top_first_page",
"insert_blank_page",
"bottom_first_page_center",
"bottom_first_page"
],
"type": "string"
},
"address_types": {
"description": "Unique identifier referring to status of address",
"enum": [
"address.created",
"address.deleted"
],
"type": "string"
},
"address_us": {
"allOf": [
{
"$ref": "#/components/schemas/lob_base"
},
{
"anyOf": [
{
"required": [
"name"
],
"title": "address obj with `name` defined"
},
{
"required": [
"company"
],
"title": "address obj with `company` defined"
}
],
"example": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_line2": null,
"address_state": "CA",
"address_zip": "94107-1741",
"company": "LOB",
"date_created": "2019-08-12T00:16:00.361Z",
"date_modified": "2019-08-12T00:16:00.361Z",
"description": "Harry - Office",
"email": "harry@lob.com",
"id": "adr_e68217bd744d65c8",
"metadata": {},
"name": "HARRY ZHANG",
"object": "address",
"phone": "5555555555",
"recipient_moved": false
},
"properties": {
"address_city": {
"maxLength": 200,
"type": "string"
},
"address_country": {
"description": "Full name of country",
"enum": [
"UNITED STATES"
],
"maxLength": 13,
"minLength": 13,
"type": "string"
},
"address_line1": {
"description": "The primary number, street name, and directional information.",
"maxLength": 64,
"type": "string"
},
"address_line2": {
"description": "An optional field containing any information which can't fit into line 1.",
"maxLength": 64,
"nullable": true,
"type": "string"
},
"address_state": {
"description": "2 letter state short-name code",
"pattern": "^[a-zA-Z]{2}$",
"type": "string"
},
"address_zip": {
"description": "Must follow the ZIP format of `12345` or ZIP+4 format of `12345-1234`.\n",
"pattern": "^\\d{5}(-\\d{4})?$",
"type": "string"
},
"company": {
"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",
"maxLength": 40,
"nullable": true,
"type": "string"
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"email": {
"description": "Must be no longer than 100 characters.",
"maxLength": 100,
"nullable": true,
"type": "string"
},
"id": {
"$ref": "#/components/schemas/adr_id"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"name": {
"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",
"maxLength": 40,
"nullable": true,
"type": "string"
},
"object": {
"default": "address",
"description": "Value is resource type.",
"enum": [
"address"
],
"type": "string"
},
"phone": {
"description": "Must be no longer than 40 characters.",
"maxLength": 40,
"nullable": true,
"type": "string"
},
"recipient_moved": {
"description": "Only returned for accounts on certain <a href=\"https://dashboard.lob.com/#/settings/editions\" target=\"_blank\">Print &amp; 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",
"nullable": true,
"type": "boolean"
}
},
"required": [
"id",
"address_line1",
"address_city",
"address_state",
"address_zip"
],
"type": "object"
}
]
},
"addresses": {
"properties": {
"components": {
"$ref": "#/components/schemas/components"
},
"location_analysis": {
"$ref": "#/components/schemas/location_analysis"
}
},
"type": "object"
},
"adr_id": {
"description": "Unique identifier prefixed with `adr_`.",
"pattern": "^adr_[a-zA-Z0-9]+$",
"type": "string"
},
"bank_account": {
"allOf": [
{
"$ref": "#/components/schemas/bank_account_base"
},
{
"$ref": "#/components/schemas/lob_base"
},
{
"properties": {
"bank_name": {
"description": "The name of the bank based on the provided routing number, e.g. `JPMORGAN CHASE BANK`.",
"type": "string"
},
"id": {
"$ref": "#/components/schemas/bank_id"
},
"microdeposit_type": {
"description": "The type of microdeposit verification required for this bank account. Always present when `verified` is `false`; `null` once the account is verified. Use this value to determine which field to submit to `POST /v1/bank_accounts/:id/verify`: `amounts` (an array of two integers) or `descriptor_code` (the 6-character code from the bank statement).",
"enum": [
"amounts",
"descriptor_code"
],
"nullable": true,
"type": "string"
},
"object": {
"default": "bank_account",
"description": "Value is resource type.",
"enum": [
"bank_account"
],
"type": "string"
},
"signature_url": {
"allOf": [
{
"description": "A [signed link](#section/Asset-URLs) to the signature image.",
"nullable": true,
"type": "string"
},
{
"$ref": "#/components/schemas/signed_link"
}
]
},
"verified": {
"default": false,
"description": "A bank account must be verified before a check can be created. More info [here](#operation/bank_account_verify).",
"type": "boolean"
}
},
"required": [
"id"
],
"type": "object"
}
],
"example": {
"account_number": "123456789",
"account_type": "individual",
"bank_name": "JPMORGAN CHASE BANK",
"date_created": "2019-08-08T19:34:47.571Z",
"date_modified": "2019-08-08T19:34:47.571Z",
"description": "Test Bank Account",
"id": "bank_a",
"metadata": {
"spiffy": "true"
},
"microdeposit_type": "amounts",
"object": "bank_account",
"routing_number": "322271627",
"signatory": "Jane Doe",
"signature_url": "https://lob-assets.com/bank-accounts/asd_asdfghjkqwertyui.pdf?expires=1234567890&signature=aksdf",
"verified": false
}
},
"bank_account_base": {
"properties": {
"account_number": {
"maxLength": 17,
"type": "string"
},
"account_type": {
"description": "The type of entity that holds the account.",
"enum": [
"company",
"individual"
],
"type": "string"
},
"check_template": {
"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.",
"enum": [
"common",
"jpm"
],
"type": "string"
},
"city": {
"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.",
"type": "string"
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"fractional_routing_number": {
"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.",
"type": "string"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"routing_number": {
"description": "Must be a <a href=\"https://www.frbservices.org/index.html\" target=\"_blank\">valid US routing number</a>.",
"maxLength": 9,
"minLength": 9,
"type": "string"
},
"signatory": {
"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>.",
"maxLength": 30,
"type": "string"
},
"state": {
"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.",
"type": "string"
},
"zipcode": {
"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.",
"type": "string"
}
},
"required": [
"routing_number",
"account_number",
"account_type",
"signatory"
],
"type": "object"
},
"bank_account_types": {
"description": "Unique identifier referring to status of bank account",
"enum": [
"bank_account.created",
"bank_account.deleted",
"bank_account.verified"
],
"type": "string"
},
"bank_account_verify": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"amounts": {
"description": "In live mode, an array containing the two microdeposit amounts (in cents) placed in the bank account. In test mode, no microdeposits will be placed, so any two integers between `1` and `100` will work.",
"items": {
"$ref": "#/components/schemas/cents"
},
"maxItems": 2,
"minItems": 2,
"type": "array"
}
},
"required": [
"amounts"
],
"title": "BankAccountVerifyAmounts",
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"descriptor_code": {
"description": "The 6-character code (beginning with `SM`) found in the statement descriptor of the $0.01 microdeposit placed in the bank account.",
"maxLength": 6,
"minLength": 6,
"pattern": "^[Ss][Mm][A-Za-z0-9]{4}$",
"type": "string"
}
},
"required": [
"descriptor_code"
],
"title": "BankAccountVerifyDescriptorCode",
"type": "object"
}
]
},
"bank_deletion": {
"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.",
"properties": {
"deleted": {
"$ref": "#/components/schemas/deleted"
},
"id": {
"$ref": "#/components/schemas/bank_id"
}
}
},
"bank_id": {
"allOf": [
{
"$ref": "#/components/schemas/bank_id_no_description"
},
{
"description": "Unique identifier prefixed with `bank_`.",
"type": "string"
}
]
},
"bank_id_no_description": {
"pattern": "^bank_[a-zA-Z0-9]+$",
"type": "string"
},
"bg_description": {
"description": "Description of the billing group.",
"maxLength": 255,
"type": "string"
},
"bg_id": {
"description": "Unique identifier prefixed with `bg_`.",
"pattern": "^bg_[a-zA-Z0-9]+$",
"type": "string"
},
"billing_group": {
"allOf": [
{
"$ref": "#/components/schemas/billing_group_base"
},
{
"properties": {
"date_created": {
"$ref": "#/components/schemas/date_created"
},
"date_modified": {
"$ref": "#/components/schemas/date_modified"
},
"id": {
"$ref": "#/components/schemas/bg_id"
},
"object": {
"default": "billing_group",
"description": "Value is resource type.",
"enum": [
"billing_group"
],
"type": "string"
}
},
"type": "object"
}
]
},
"billing_group_base": {
"properties": {
"description": {
"$ref": "#/components/schemas/bg_description"
},
"name": {
"$ref": "#/components/schemas/name"
}
},
"type": "object"
},
"billing_group_editable": {
"allOf": [
{
"$ref": "#/components/schemas/billing_group_base"
},
{
"required": [
"name"
]
}
]
},
"billing_group_id": {
"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.",
"type": "string"
},
"bo_id": {
"description": "Unique identifier prefixed with `bo_`.",
"pattern": "^bo_[a-zA-Z0-9]+$",
"type": "string"
},
"booklet": {
"allOf": [
{
"properties": {
"description": {
"$ref": "#/components/schemas/resource_description"
},
"mail_type": {
"$ref": "#/components/schemas/mail_type"
},
"merge_variables": {
"$ref": "#/components/schemas/merge_variables"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"send_date": {
"$ref": "#/components/schemas/send_date"
},
"tracking_events": {
"description": "An array of tracking events ordered by ascending `time`.",
"items": {
"$ref": "#/components/schemas/tracking_event_normal"
},
"type": "array"
}
},
"type": "object"
},
{
"$ref": "#/components/schemas/booklet_generated_base"
}
]
},
"booklet_deletion": {
"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.",
"properties": {
"deleted": {
"$ref": "#/components/schemas/deleted"
},
"id": {
"$ref": "#/components/schemas/booklet_id"
}
}
},
"booklet_editable": {
"allOf": [
{
"$ref": "#/components/schemas/input_to"
},
{
"$ref": "#/components/schemas/input_from"
},
{
"$ref": "#/components/schemas/editable"
},
{
"properties": {
"billing_group_id": {
"$ref": "#/components/schemas/billing_group_id"
},
"file": {
"$ref": "#/components/schemas/booklet_file"
},
"fsc": {
"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.",
"type": "boolean"
},
"mail_type": {
"$ref": "#/components/schemas/mail_type"
},
"pages": {
"$ref": "#/components/schemas/booklet_pages"
},
"print_speed": {
"$ref": "#/components/schemas/print_speed"
},
"qr_code": {
"$ref": "#/components/schemas/qr_code"
},
"size": {
"$ref": "#/components/schemas/booklet_size"
},
"source_material": {
"$ref": "#/components/schemas/booklet_source_material"
},
"use_type": {
"$ref": "#/components/schemas/booklet_use_type"
}
},
"required": [
"to",
"from",
"file",
"use_type",
"pages",
"size"
],
"type": "object"
}
]
},
"booklet_file": {
"description": "Notes:\n- HTML merge variables should not include delimiting whitespace.\n- All pages of a supplied PDF file must be sized per the `size` attribute, while supplied HTML will be rendered and trimmed to as many `size` 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.\nSee <a href=\"https://lob.com/pricing/print-mail#compare\" target=\"_blank\">pricing</a> for extra costs incurred.",
"oneOf": [
{
"$ref": "#/components/schemas/html_string"
},
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"$ref": "#/components/schemas/remote_file_url"
},
{
"pattern": "^(?!https://)[a-zA-Z0-9@:%._+~#=/]{1,256}.(html?|pdf)$",
"type": "string"
}
]
},
"booklet_generated_base": {
"allOf": [
{
"$ref": "#/components/schemas/generated"
},
{
"$ref": "#/components/schemas/from"
},
{
"properties": {
"campaign_id": {
"$ref": "#/components/schemas/campaign_id"
},
"failure_reason": {
"allOf": [
{
"$ref": "#/components/schemas/failure_reason"
},
{
"nullable": true
}
]
},
"fsc": {
"default": false,
"description": "This is in beta. Contact support@lob.com or your account contact to learn more.",
"type": "boolean"
},
"id": {
"$ref": "#/components/schemas/booklet_id"
},
"object": {
"default": "booklet",
"description": "Value is resource type.",
"enum": [
"booklet"
],
"type": "string"
},
"pages": {
"$ref": "#/components/schemas/booklet_pages"
},
"size": {
"$ref": "#/components/schemas/booklet_size"
},
"source_material": {
"$ref": "#/components/schemas/booklet_source_material"
},
"status": {
"$ref": "#/components/schemas/status"
},
"template_id": {
"allOf": [
{
"description": "The unique ID of the HTML template used for the booklet."
},
{
"$ref": "#/components/schemas/tmpl_id"
}
]
},
"template_version_id": {
"allOf": [
{
"description": "The unique ID of the specific version of the HTML template used for the booklet.",
"type": "string"
},
{
"$ref": "#/components/schemas/vrsn_id"
}
]
},
"url": {
"$ref": "#/components/schemas/signed_link"
},
"use_type": {
"$ref": "#/components/schemas/booklet_use_type"
}
},
"required": [
"id",
"from",
"use_type"
],
"type": "object"
}
]
},
"booklet_id": {
"description": "Unique identifier prefixed with `ord_`.",
"pattern": "^ord_[0-9a-f]{26}$",
"type": "string"
},
"booklet_pages": {
"description": "Pages specifies the total number of pages in a booklet, where four pages make up one sheet. Pages must always be in increments of four to maintain booklet integrity. For a booklet with dimensions of 8.375x5.375 inches, we allow for 8, 12, 16, 20, 24, 28, or 32 pages.",
"type": "integer"
},
"booklet_size": {
"default": "8.375x5.375",
"description": "Specifies the size of the booklet.\n",
"enum": [
"8.375x5.375"
],
"type": "string"
},
"booklet_source_material": {
"default": "60# Gloss Text",
"description": "Defines the material used to create the mail piece, specifically for booklets. This property is directly tied to the size of the booklet, ensuring that the appropriate material is selected based on the booklet's dimensions. For booklets with `size` equal to `8.375x5.375` inches, the default source material is `60# Gloss Text`.",
"enum": [
"60# Gloss Text"
],
"type": "string"
},
"booklet_use_type": {
"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).",
"enum": [
"marketing",
"operational",
null
],
"nullable": true,
"type": "string"
},
"buckslip": {
"allOf": [
{
"$ref": "#/components/schemas/lob_base"
},
{
"$ref": "#/components/schemas/buckslip_base"
},
{
"required": [
"description"
]
},
{
"properties": {
"allocated_quantity": {
"default": 0,
"description": "The allocated quantity of buckslips.",
"type": "number"
},
"auto_reorder": {
"default": false,
"description": "True if the buckslips should be auto-reordered.",
"type": "boolean"
},
"available_quantity": {
"default": 0,
"description": "The available quantity of buckslips.",
"type": "number"
},
"back_original_url": {
"description": "The original URL of the back template.",
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"type": "string"
},
"buckslip_orders": {
"description": "An array of buckslip orders that are associated with the buckslip.",
"items": {
"$ref": "#/components/schemas/buckslip_order"
},
"minItems": 0,
"type": "array"
},
"finish": {
"enum": [
"gloss",
"matte"
],
"title": "The finish of the buckslip.",
"type": "string"
},
"front_original_url": {
"description": "The original URL of the front template.",
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"type": "string"
},
"id": {
"$ref": "#/components/schemas/buckslip_id"
},
"object": {
"default": "buckslip",
"description": "object",
"enum": [
"buckslip"
],
"type": "string"
},
"onhand_quantity": {
"default": 0,
"description": "The onhand quantity of buckslips.",
"type": "number"
},
"pending_quantity": {
"default": 0,
"description": "The pending quantity of buckslips.",
"type": "number"
},
"projected_quantity": {
"default": 0,
"description": "The sum of pending and onhand quantities of buckslips.",
"type": "number"
},
"raw_url": {
"description": "The raw URL of the buckslip.",
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"type": "string"
},
"reorder_quantity": {
"description": "The number of buckslips to be reordered.",
"nullable": true,
"type": "integer"
},
"status": {
"enum": [
"processed",
"rendered",
"failed"
],
"title": "The status of the buckslip.",
"type": "string"
},
"stock": {
"enum": [
"text",
"cover"
],
"title": "The stock of the buckslip.",
"type": "string"
},
"threshold_amount": {
"default": 0,
"description": "The threshold amount of the buckslip",
"type": "integer"
},
"thumbnails": {
"items": {
"$ref": "#/components/schemas/thumbnail"
},
"type": "array"
},
"url": {
"description": "The signed link for the buckslip.",
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"type": "string"
},
"weight": {
"enum": [
"80#"
],
"title": "The weight of the buckslip.",
"type": "string"
}
},
"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"
],
"type": "object"
}
]
},
"buckslip_base": {
"properties": {
"description": {
"$ref": "#/components/schemas/buckslip_description"
},
"size": {
"default": "8.75x3.75",
"description": "The size of the buckslip",
"enum": [
"8.75x3.75"
],
"type": "string"
}
},
"type": "object"
},
"buckslip_deletion": {
"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.",
"properties": {
"deleted": {
"$ref": "#/components/schemas/deleted"
},
"id": {
"$ref": "#/components/schemas/buckslip_id"
}
}
},
"buckslip_description": {
"description": "Description of the buckslip.",
"maxLength": 255,
"nullable": true,
"type": "string"
},
"buckslip_editable": {
"allOf": [
{
"$ref": "#/components/schemas/buckslip_base"
},
{
"properties": {
"back": {
"description": "A PDF template for the back of the buckslip",
"oneOf": [
{
"$ref": "#/components/schemas/remote_file_url"
},
{
"$ref": "#/components/schemas/local_file_path"
}
]
},
"front": {
"description": "A PDF template for the front of the buckslip",
"oneOf": [
{
"$ref": "#/components/schemas/remote_file_url"
},
{
"$ref": "#/components/schemas/local_file_path"
}
]
}
},
"required": [
"front"
],
"type": "object"
}
]
},
"buckslip_id": {
"description": "Unique identifier prefixed with `bck_`.",
"pattern": "^bck_[a-zA-Z0-9]+$",
"type": "string"
},
"buckslip_order": {
"allOf": [
{
"$ref": "#/components/schemas/lob_base"
},
{
"properties": {
"availability_date": {
"description": "A timestamp in ISO 8601 format of the date the resource was created.",
"format": "date-time",
"type": "string"
},
"buckslip_id": {
"$ref": "#/components/schemas/buckslip_id"
},
"cancelled_reason": {
"description": "The reason for cancellation.",
"type": "string"
},
"expected_availability_date": {
"description": "The fixed deadline for the buckslips to be printed.",
"format": "date-time",
"type": "string"
},
"id": {
"$ref": "#/components/schemas/bo_id"
},
"inventory": {
"default": 0,
"description": "The inventory of the buckslip order.",
"type": "number"
},
"quantity_ordered": {
"default": 0,
"description": "The quantity of buckslips ordered.",
"type": "number"
},
"status": {
"description": "The status of the buckslip order.",
"enum": [
"pending",
"printing",
"available",
"cancelled",
"depleted"
],
"type": "string"
},
"unit_price": {
"default": 0,
"description": "The unit price for the buckslip order.",
"type": "number"
}
},
"type": "object"
}
]
},
"buckslip_order_editable": {
"properties": {
"quantity": {
"description": "The quantity of buckslips in the order (minimum 5,000).",
"maximum": 10000000,
"minimum": 5000,
"type": "integer"
}
},
"required": [
"quantity"
],
"type": "object"
},
"buckslip_updatable": {
"properties": {
"auto_reorder": {
"description": "Allows for auto reordering",
"type": "boolean"
},
"description": {
"$ref": "#/components/schemas/buckslip_description"
},
"reorder_quantity": {
"description": "The quantity of items to be reordered (only required when auto_reorder is true).",
"maximum": 10000000,
"minimum": 5000,
"type": "number"
}
},
"type": "object"
},
"campaign": {
"allOf": [
{
"$ref": "#/components/schemas/lob_base"
},
{
"$ref": "#/components/schemas/campaign_writable"
},
{
"properties": {
"creatives": {
"description": "An array of creatives that have been associated with this campaign.",
"items": {
"$ref": "#/components/schemas/creative"
},
"minItems": 0,
"type": "array"
},
"id": {
"$ref": "#/components/schemas/cmp_id"
},
"is_draft": {
"default": true,
"description": "Whether or not the campaign is still a draft.",
"type": "boolean"
},
"object": {
"default": "campaign",
"description": "Value is resource type.",
"enum": [
"campaign"
],
"type": "string"
},
"uploads": {
"description": "A single-element array containing the upload object that is assocated with this campaign.",
"items": {
"$ref": "#/components/schemas/upload"
},
"maxItems": 1,
"minItems": 0,
"type": "array"
},
"use_type": {
"$ref": "#/components/schemas/cmp_use_type"
}
},
"required": [
"id",
"name",
"description",
"schedule_type",
"use_type",
"is_draft",
"creatives",
"uploads",
"auto_cancel_if_ncoa",
"date_created",
"date_modified",
"object"
],
"type": "object"
}
]
},
"campaign_id": {
"description": "Denotes resources created by the provided campaign id, prefixed with `cmp_`. In the case of snap packs, booklets, and letters with size `us_legal`, however, the campaign id is prefixed with `camp_` instead of `cmp_`.",
"nullable": true,
"pattern": "^(cmp|camp)_[a-zA-Z0-9]+$",
"title": "campaign_id",
"type": "string"
},
"campaign_item": {
"allOf": [
{
"$ref": "#/components/schemas/campaign_writable"
},
{
"properties": {
"creatives": {
"description": "An array of creatives that have been associated with this campaign.",
"type": "array"
},
"date_created": {
"$ref": "#/components/schemas/date_created"
},
"date_modified": {
"$ref": "#/components/schemas/date_modified"
},
"deleted": {
"$ref": "#/components/schemas/deleted"
},
"id": {
"$ref": "#/components/schemas/cmp_id"
},
"is_draft": {
"default": true,
"description": "Whether or not the campaign is still a draft.",
"type": "boolean"
},
"object": {
"default": "campaign",
"description": "Value is resource type.",
"enum": [
"campaign"
],
"type": "string"
},
"uploads": {
"description": "A single-element array containing the upload object that is assocated with this campaign.",
"maxItems": 1,
"minItems": 0,
"type": "array"
}
},
"required": [
"id",
"name",
"description",
"schedule_type",
"use_type",
"is_draft",
"creatives",
"uploads",
"auto_cancel_if_ncoa",
"date_created",
"date_modified",
"object"
],
"type": "object"
}
]
},
"campaign_list": {
"description": "Array of campaigns associated with the creative ID",
"example": [
{
"auto_cancel_if_ncoa": false,
"cancel_window_campaign_minutes": null,
"creatives": [],
"date_created": "2022-07-26T20:20:25.016Z",
"date_modified": "2022-07-26T20:20:25.016Z",
"deleted": false,
"description": "Created via postman again",
"id": "cmp_ed76e33e7ac4d0bd",
"is_draft": true,
"metadata": {},
"name": "My postman Campaign 2",
"object": "campaign",
"schedule_type": "immediate",
"send_date": null,
"target_delivery_date": null,
"uploads": [],
"use_type": null
}
],
"items": {
"$ref": "#/components/schemas/campaign_item"
},
"type": "array"
},
"campaign_updatable": {
"properties": {
"auto_cancel_if_ncoa": {
"description": "Whether or not a mail piece should be automatically canceled and not sent if the address is updated via NCOA.",
"type": "boolean"
},
"cancel_window_campaign_minutes": {
"description": "A window, in minutes, within which the campaign can be canceled.",
"type": "integer"
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"is_draft": {
"description": "Whether or not the campaign is still a draft. Can either be excluded or `false`.",
"type": "boolean"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"name": {
"title": "Name",
"type": "string"
},
"schedule_type": {
"$ref": "#/components/schemas/cmp_schedule_type"
},
"send_date": {
"description": "If `schedule_type` is `scheduled_send_date`, provide a date to send this campaign.",
"format": "date-time",
"type": "string"
},
"target_delivery_date": {
"description": "If `schedule_type` is `target_delivery_date`, provide a targeted delivery date for mail pieces in this campaign.",
"format": "date-time",
"type": "string"
},
"use_type": {
"$ref": "#/components/schemas/cmp_use_type"
}
},
"type": "object"
},
"campaign_writable": {
"properties": {
"auto_cancel_if_ncoa": {
"description": "Whether or not a mail piece should be automatically canceled and not sent if the address is updated via NCOA.",
"type": "boolean"
},
"billing_group_id": {
"description": "Unique identifier prefixed with `bg_`.",
"nullable": true,
"pattern": "^bg_[a-zA-Z0-9]+$",
"type": "string"
},
"cancel_window_campaign_minutes": {
"description": "A window, in minutes, within which the campaign can be canceled.",
"nullable": true,
"type": "integer"
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"name": {
"description": "Name of the campaign.",
"type": "string"
},
"print_speed": {
"$ref": "#/components/schemas/print_speed"
},
"schedule_type": {
"$ref": "#/components/schemas/cmp_schedule_type"
},
"send_date": {
"description": "If `schedule_type` is `scheduled_send_date`, provide a date to send this campaign.",
"format": "date-time",
"nullable": true,
"type": "string"
},
"target_delivery_date": {
"description": "If `schedule_type` is `target_delivery_date`, provide a targeted delivery date for mail pieces in this campaign.",
"format": "date-time",
"nullable": true,
"type": "string"
},
"use_type": {
"$ref": "#/components/schemas/cmp_use_type"
}
},
"required": [
"name",
"schedule_type",
"use_type"
],
"type": "object"
},
"card": {
"allOf": [
{
"$ref": "#/components/schemas/lob_base"
},
{
"$ref": "#/components/schemas/card_base"
},
{
"required": [
"description"
]
},
{
"properties": {
"auto_reorder": {
"default": false,
"description": "True if the cards should be auto-reordered.",
"type": "boolean"
},
"available_quantity": {
"default": 0,
"description": "The available quantity of cards.",
"type": "integer"
},
"back_original_url": {
"description": "The original URL of the back template.",
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"type": "string"
},
"front_original_url": {
"description": "The original URL of the front template.",
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"type": "string"
},
"id": {
"$ref": "#/components/schemas/card_id"
},
"object": {
"default": "card",
"description": "object",
"enum": [
"card"
],
"type": "string"
},
"orientation": {
"default": "horizontal",
"description": "The orientation of the card.",
"enum": [
"horizontal",
"vertical"
],
"type": "string"
},
"pending_quantity": {
"default": 0,
"description": "The pending quantity of cards.",
"type": "integer"
},
"raw_url": {
"description": "The raw URL of the card.",
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"type": "string"
},
"reorder_quantity": {
"description": "The number of cards to be reordered.",
"nullable": true,
"type": "integer"
},
"status": {
"enum": [
"processed",
"rendered"
],
"title": "The status of the card.",
"type": "string"
},
"threshold_amount": {
"default": 0,
"description": "The threshold amount of the card",
"type": "integer"
},
"thumbnails": {
"items": {
"$ref": "#/components/schemas/thumbnail"
},
"type": "array"
},
"url": {
"description": "The signed link for the card.",
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"type": "string"
}
},
"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"
],
"type": "object"
}
]
},
"card_base": {
"properties": {
"description": {
"$ref": "#/components/schemas/card_description"
},
"size": {
"default": "2.125x3.375",
"description": "The size of the card",
"enum": [
"3.375x2.125",
"2.125x3.375"
],
"type": "string"
}
},
"type": "object"
},
"card_deletion": {
"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.",
"properties": {
"deleted": {
"$ref": "#/components/schemas/deleted"
},
"id": {
"$ref": "#/components/schemas/card_id"
}
}
},
"card_description": {
"description": "Description of the card.",
"maxLength": 255,
"nullable": true,
"type": "string"
},
"card_editable": {
"allOf": [
{
"$ref": "#/components/schemas/card_base"
},
{
"properties": {
"back": {
"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",
"oneOf": [
{
"$ref": "#/components/schemas/remote_file_url"
},
{
"$ref": "#/components/schemas/local_file_path"
}
]
},
"front": {
"description": "A PDF template for the front of the card",
"oneOf": [
{
"$ref": "#/components/schemas/remote_file_url"
},
{
"$ref": "#/components/schemas/local_file_path"
}
]
}
},
"required": [
"front"
],
"type": "object"
}
]
},
"card_id": {
"description": "Unique identifier prefixed with `card_`.",
"pattern": "^card_[a-zA-Z0-9]+$",
"type": "string"
},
"card_order": {
"allOf": [
{
"$ref": "#/components/schemas/lob_base"
},
{
"properties": {
"availability_date": {
"description": "A timestamp in ISO 8601 format of the date the resource was created.",
"format": "date-time",
"type": "string"
},
"cancelled_reason": {
"description": "The reason for cancellation.",
"type": "string"
},
"card_id": {
"$ref": "#/components/schemas/card_id"
},
"expected_availability_date": {
"description": "The fixed deadline for the cards to be printed.",
"format": "date-time",
"type": "string"
},
"id": {
"$ref": "#/components/schemas/co_id"
},
"inventory": {
"default": 0,
"description": "The inventory of the card order.",
"type": "number"
},
"quantity_ordered": {
"default": 0,
"description": "The quantity of cards ordered",
"type": "number"
},
"status": {
"description": "The status of the card order.",
"enum": [
"pending",
"printing",
"available",
"cancelled",
"depleted"
],
"type": "string"
},
"unit_price": {
"default": 0,
"description": "The unit price for the card order.",
"type": "number"
}
},
"type": "object"
}
]
},
"card_order_editable": {
"properties": {
"quantity": {
"description": "The quantity of cards in the order (minimum 10,000).",
"maximum": 10000000,
"minimum": 10000,
"type": "integer"
}
},
"required": [
"quantity"
],
"type": "object"
},
"card_updatable": {
"properties": {
"auto_reorder": {
"description": "Allows for auto reordering",
"type": "boolean"
},
"description": {
"$ref": "#/components/schemas/card_description"
},
"reorder_quantity": {
"description": "The quantity of items to be reordered (only required when auto_reorder is true).",
"maximum": 10000000,
"minimum": 10000,
"type": "number"
}
},
"type": "object"
},
"cents": {
"maximum": 100,
"minimum": 1,
"type": "integer"
},
"certified": {
"allOf": [
{
"properties": {
"address_placement": {
"$ref": "#/components/schemas/address_placement"
},
"color": {
"$ref": "#/components/schemas/color"
},
"custom_envelope": {
"$ref": "#/components/schemas/returned-2"
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"double_sided": {
"$ref": "#/components/schemas/double_sided"
},
"extra_service": {
"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",
"enum": [
"certified",
"certified_return_receipt"
],
"type": "string"
},
"mail_type": {
"$ref": "#/components/schemas/mail_type"
},
"merge_variables": {
"$ref": "#/components/schemas/merge_variables"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"perforated_page": {
"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>.",
"nullable": true,
"type": "integer"
},
"return_address": {
"$ref": "#/components/schemas/return_address"
},
"return_envelope": {
"$ref": "#/components/schemas/returned-5"
},
"send_date": {
"$ref": "#/components/schemas/send_date"
},
"tracking_events": {
"description": "An array of certified tracking events ordered by ascending `time`. Not populated in test mode.",
"items": {
"$ref": "#/components/schemas/tracking_event_certified"
},
"type": "array"
},
"tracking_number": {
"description": "The tracking number will be here immediately upon creation.\nDummy tracking numbers are created in test mode.",
"nullable": true,
"type": "string"
}
},
"required": [
"extra_service",
"tracking_events",
"color"
],
"type": "object"
},
{
"$ref": "#/components/schemas/letter_generated_base"
}
]
},
"check": {
"allOf": [
{
"$ref": "#/components/schemas/check_base"
},
{
"$ref": "#/components/schemas/from_us"
},
{
"properties": {
"amount": {
"description": "The payment amount to be sent in US dollars.",
"format": "float",
"maximum": 999999.99,
"multipleOf": 0.01,
"type": "number"
},
"attachment_template_id": {
"allOf": [
{
"description": "The unique ID of the HTML template used for the attachment."
},
{
"$ref": "#/components/schemas/tmpl_id"
}
]
},
"attachment_template_version_id": {
"allOf": [
{
"description": "The unique ID of the specific version of the HTML template used for the attachment.",
"type": "string"
},
{
"$ref": "#/components/schemas/vrsn_id"
}
]
},
"bank_account": {
"$ref": "#/components/schemas/bank_account"
},
"carrier": {
"default": "USPS",
"enum": [
"USPS"
],
"type": "string"
},
"check_bottom_template_id": {
"allOf": [
{
"description": "The unique ID of the HTML template used for the check bottom."
},
{
"$ref": "#/components/schemas/tmpl_id"
}
]
},
"check_bottom_template_version_id": {
"allOf": [
{
"description": "The unique ID of the specific version of the HTML template used for the check bottom.",
"type": "string"
},
{
"$ref": "#/components/schemas/vrsn_id"
}
]
},
"date_created": {
"$ref": "#/components/schemas/date_created"
},
"date_modified": {
"$ref": "#/components/schemas/date_modified"
},
"deleted": {
"$ref": "#/components/schemas/deleted"
},
"expected_delivery_date": {
"$ref": "#/components/schemas/expected_delivery_date"
},
"failure_reason": {
"allOf": [
{
"$ref": "#/components/schemas/failure_reason"
},
{
"nullable": true
}
]
},
"id": {
"$ref": "#/components/schemas/chk_id"
},
"object": {
"default": "check",
"description": "Value is resource type.",
"enum": [
"check"
],
"type": "string"
},
"status": {
"$ref": "#/components/schemas/status"
},
"thumbnails": {
"items": {
"$ref": "#/components/schemas/thumbnail"
},
"type": "array"
},
"to": {
"$ref": "#/components/schemas/to_address_us_chk"
},
"tracking_events": {
"description": "An array of tracking_event objects ordered by ascending `time`. Will not be populated for checks created in test mode.",
"items": {
"$ref": "#/components/schemas/tracking_event_normal"
},
"nullable": true,
"type": "array"
},
"url": {
"$ref": "#/components/schemas/signed_link"
},
"use_type": {
"$ref": "#/components/schemas/chk_use_type"
}
},
"required": [
"bank_account",
"id",
"amount",
"to",
"url",
"carrier",
"date_created",
"date_modified",
"use_type"
],
"type": "object"
}
]
},
"check_base": {
"allOf": [
{
"$ref": "#/components/schemas/editable_no_mailtype"
},
{
"properties": {
"check_number": {
"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.",
"maximum": 500000000,
"minimum": 1,
"type": "integer"
},
"mail_type": {
"default": "usps_first_class",
"description": "Checks must be sent `usps_first_class`",
"enum": [
"usps_first_class"
],
"type": "string"
},
"memo": {
"description": "Text to include on the memo line of the check.",
"maxLength": 40,
"nullable": true,
"type": "string"
},
"message": {
"description": "Max of 400 characters to be included at the bottom of the check page.",
"maxLength": 400,
"type": "string"
},
"use_type": {
"$ref": "#/components/schemas/chk_use_type"
}
},
"type": "object"
}
]
},
"check_bottom": {
"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).",
"oneOf": [
{
"$ref": "#/components/schemas/html_string"
},
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"$ref": "#/components/schemas/remote_file_url"
},
{
"$ref": "#/components/schemas/local_file_path"
}
]
},
"check_deletion": {
"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.",
"properties": {
"deleted": {
"$ref": "#/components/schemas/deleted"
},
"id": {
"$ref": "#/components/schemas/chk_id"
}
}
},
"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"
},
{
"properties": {
"amount": {
"description": "The payment amount to be sent in US dollars. Amounts will be rounded to two decimal places.",
"format": "float",
"maximum": 999999.99,
"type": "number"
},
"attachment": {
"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).",
"oneOf": [
{
"$ref": "#/components/schemas/html_string"
},
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"$ref": "#/components/schemas/remote_file_url"
},
{
"$ref": "#/components/schemas/local_file_path"
}
]
},
"bank_account": {
"allOf": [
{
"$ref": "#/components/schemas/bank_id_no_description"
},
{
"description": "The id for a verified bank account.",
"type": "string"
}
]
},
"billing_group_id": {
"$ref": "#/components/schemas/billing_group_id"
},
"check_bottom": {
"$ref": "#/components/schemas/check_bottom"
},
"from": {
"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.",
"oneOf": [
{
"$ref": "#/components/schemas/adr_id"
},
{
"$ref": "#/components/schemas/inline_address_us"
}
]
},
"logo": {
"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`",
"oneOf": [
{
"pattern": "^https://[-a-zA-Z0-9@:%._+~#=/]{1,256}.(png|jpg)$",
"type": "string"
},
{
"pattern": "^(?!https://)[a-zA-Z0-9@:%._+~#=/]{1,256}.(png|jpg)$",
"type": "string"
}
]
},
"print_speed": {
"$ref": "#/components/schemas/print_speed"
},
"use_type": {
"$ref": "#/components/schemas/chk_use_type"
}
},
"required": [
"bank_account",
"to",
"from",
"amount",
"use_type"
],
"type": "object"
}
]
},
"check_input_to": {
"properties": {
"to": {
"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\u2019s <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>",
"oneOf": [
{
"$ref": "#/components/schemas/adr_id"
},
{
"$ref": "#/components/schemas/inline_address_us_chk"
}
]
}
},
"type": "object"
},
"check_types": {
"description": "Unique identifier referring to status of check",
"enum": [
"check.created",
"check.rejected",
"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"
},
"chk_id": {
"description": "Unique identifier prefixed with `chk_`.",
"pattern": "^chk_[a-zA-Z0-9]+$",
"type": "string"
},
"chk_use_type": {
"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).",
"enum": [
"marketing",
"operational",
null
],
"nullable": true,
"type": "string"
},
"city": {
"allOf": [
{
"$ref": "#/components/schemas/city_no_description"
},
{
"description": "The name of the city.",
"type": "string"
}
]
},
"city_no_description": {
"maxLength": 200,
"type": "string"
},
"cmp_id": {
"description": "Unique identifier prefixed with `cmp_`.",
"pattern": "^cmp_[a-zA-Z0-9]+$",
"title": "Campaign id",
"type": "string"
},
"cmp_schedule_type": {
"description": "How the campaign should be scheduled. Only value available today is `immediate`.",
"enum": [
"immediate"
],
"type": "string"
},
"cmp_use_type": {
"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).",
"enum": [
"marketing",
"operational",
null
],
"nullable": true,
"type": "string"
},
"co_id": {
"description": "Unique identifier prefixed with `co_`.",
"pattern": "^co_[a-zA-Z0-9]+$",
"type": "string"
},
"color": {
"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.",
"type": "boolean"
},
"common": {
"allOf": [
{
"properties": {
"brand_name": {
"description": "The brand name you would like included in the informed delivery email. Will default to the \u201ccompany\u201d on the users account.",
"type": "string"
},
"lob_campaign_id": {
"description": "When sending as part of Lob\u2019s campaign workflow, include the lob_campaign_id as part of the request to associate this Informed Delivery campaign with the Lob campaign\n",
"nullable": true,
"pattern": "^cmp_[a-zA-Z0-9]+$",
"type": "string"
},
"quantity": {
"description": "The number of mail pieces that will be part of this Informed Delivery campaign. USPS requires that IMB Codes are in sequence, so any mail pieces sent beyond this quantity will be rejected.\n",
"maximum": 10000000,
"minimum": 2,
"type": "integer"
},
"ride_along_url": {
"description": "To qualify as part of a promotion, the base domain must match the domain used to register the promotion.\nI.e. If the promo was registered with https://lob.com then you could use any variation of https://lob.com such as\nhttps://lob.com/promotions/promo_123\n",
"maxLength": 255,
"minLength": 10,
"pattern": "^https:\\/\\/.{5,247}$",
"type": "string"
},
"start_date": {
"description": "The first date that mail can be handed off to USPS and still included in the informed delivery campaign.\nThe start date must be at least two days in the future. The end date will be automatically calculated to be 45 days from the start.\nFor Target Delivery Date, recommended to set the start date to the earliest possible date (2 days from now).\n",
"format": "date",
"type": "string"
},
"status": {
"type": "string"
},
"usps_title": {
"description": "Unique title for the campaign. One will be auto generated if not provided.",
"type": "string"
}
},
"type": "object"
}
]
},
"company": {
"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",
"maxLength": 40,
"nullable": true,
"type": "string"
},
"company_input": {
"allOf": [
{
"anyOf": [
{
"required": [
"city",
"state"
],
"title": "Address object with `city` and `state`"
},
{
"required": [
"zip_code"
],
"title": "Address object with `zip_code`"
}
]
},
{
"properties": {
"city": {
"allOf": [
{
"$ref": "#/components/schemas/city_no_description"
},
{
"description": "The name of the city. `city` and `state` are required if no `zip_code` is passed.",
"type": "string"
}
]
},
"company": {
"$ref": "#/components/schemas/identity_validation_company"
},
"primary_line": {
"$ref": "#/components/schemas/primary_line_us"
},
"secondary_line": {
"$ref": "#/components/schemas/secondary_line"
},
"state": {
"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.",
"maxLength": 50,
"type": "string"
},
"urbanization": {
"$ref": "#/components/schemas/urbanization"
},
"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`).",
"type": "string"
},
{
"$ref": "#/components/schemas/zip_code"
}
]
}
},
"required": [
"company",
"primary_line"
],
"type": "object"
}
]
},
"company_validation": {
"properties": {
"company": {
"$ref": "#/components/schemas/identity_validation_company"
},
"confidence": {
"description": "Indicates the likelihood the recipient name and address match based on our custom internal calculation. Possible values are:\n- `high` \u2014 Has a Lob confidence score greater than 70.\n- `medium` \u2014 Has a Lob confidence score between 40 and 70.\n- `low` \u2014 Has a Lob confidence score less than 40.\n- `\"\"` \u2014 No tracking data exists for this address.\n",
"enum": [
"high",
"medium",
"low",
""
],
"type": "string"
},
"id": {
"$ref": "#/components/schemas/identity_validation_id"
},
"last_line": {
"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",
"type": "string"
},
"object": {
"default": "id_validation",
"description": "Value is resource type.",
"enum": [
"id_validation"
],
"type": "string"
},
"primary_line": {
"$ref": "#/components/schemas/primary_line_us"
},
"score": {
"default": null,
"description": "A numerical score between 0 and 100 that represents the likelihood the provided name is associated with a physical address.\n",
"format": "float",
"maximum": 100,
"minimum": 0,
"nullable": true,
"type": "number"
},
"secondary_line": {
"$ref": "#/components/schemas/secondary_line"
},
"urbanization": {
"$ref": "#/components/schemas/urbanization"
}
},
"type": "object"
},
"components": {
"description": "A nested object containing a breakdown of each component of a reverse geocoded response.",
"properties": {
"zip_code": {
"description": "The 5-digit ZIP code",
"pattern": "^\\d{5}$",
"type": "string"
},
"zip_code_plus_4": {
"allOf": [
{
"description": "A 4-digit ZIP add-on code"
},
{
"$ref": "#/components/schemas/zip_code_plus_4"
}
]
}
},
"required": [
"zip_code",
"zip_code_plus_4"
],
"type": "object"
},
"count": {
"description": "number of resources in a set",
"type": "integer"
},
"country_extended": {
"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.",
"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"
},
"country_short": {
"description": "The country of the address. Will be returned as a 2 letter country short-name code (ISO 3166).",
"example": "CA",
"type": "string"
},
"county": {
"description": "County name of the address city.",
"type": "string"
},
"county_fips": {
"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",
"pattern": "\\d{5}",
"type": "string"
},
"create": {
"allOf": [
{
"$ref": "#/components/schemas/writable_base"
},
{
"properties": {
"status": {
"description": "If setting a campaign to `pending_approval` the Informed Delivery campaign will not be active, and you can not send mail using it.\nIt will be editable in this status however, and changes can be made until `approved`.\n**NOTE** that the default status is `approved` which makes the campaign active, but un-editable.\n",
"enum": [
"pending_approval"
],
"type": "string"
}
},
"required": [
"quantity",
"ride_along_image",
"ride_along_url",
"start_date"
],
"type": "object"
}
]
},
"creative": {
"allOf": [
{
"$ref": "#/components/schemas/lob_base"
},
{
"$ref": "#/components/schemas/returned_resource"
},
{
"properties": {
"campaigns": {
"$ref": "#/components/schemas/campaign_list"
},
"deleted": {
"description": "Whether the resource has been deleted.",
"type": "boolean"
},
"id": {
"$ref": "#/components/schemas/crv_id"
},
"object": {
"default": "creative",
"description": "Value is resource type.",
"enum": [
"creative"
],
"type": "string"
},
"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.",
"title": "Template Preview URLs",
"type": "object"
},
"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.",
"items": {
"type": "object"
},
"title": "Template Previews",
"type": "array"
}
},
"required": [
"id",
"description",
"from",
"resource_type",
"details",
"metadata",
"template_preview_urls",
"template_previews",
"campaigns",
"date_created",
"date_modified",
"object",
"deleted"
],
"type": "object"
}
]
},
"creative_base": {
"properties": {
"description": {
"$ref": "#/components/schemas/resource_description"
},
"from": {
"$ref": "#/components/schemas/from_attribute"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
}
},
"type": "object"
},
"creative_writable": {
"oneOf": [
{
"allOf": [
{
"properties": {
"back": {
"$ref": "#/components/schemas/crv_back"
},
"campaign_id": {
"$ref": "#/components/schemas/cmp_id"
},
"details": {
"$ref": "#/components/schemas/writable"
},
"front": {
"$ref": "#/components/schemas/crv_front"
},
"resource_type": {
"description": "Mailpiece type for the creative",
"enum": [
"postcard"
],
"type": "string"
}
},
"required": [
"front",
"back",
"campaign_id",
"resource_type",
"details"
],
"title": "Postcard Creative"
},
{
"$ref": "#/components/schemas/creative_base"
}
]
},
{
"allOf": [
{
"properties": {
"campaign_id": {
"$ref": "#/components/schemas/cmp_id"
},
"details": {
"$ref": "#/components/schemas/writable-2"
},
"file": {
"$ref": "#/components/schemas/crv_file"
},
"resource_type": {
"description": "Mailpiece type for the creative",
"enum": [
"letter"
],
"type": "string"
}
},
"required": [
"file",
"from",
"campaign_id",
"resource_type",
"details"
],
"title": "Letter Creative"
},
{
"$ref": "#/components/schemas/creative_base"
}
]
},
{
"allOf": [
{
"properties": {
"campaign_id": {
"$ref": "#/components/schemas/cmp_id"
},
"details": {
"$ref": "#/components/schemas/writable-3"
},
"inside": {
"$ref": "#/components/schemas/crv_inside"
},
"outside": {
"$ref": "#/components/schemas/crv_outside"
},
"resource_type": {
"description": "Mailpiece type for the creative",
"enum": [
"self_mailer"
],
"type": "string"
}
},
"required": [
"inside",
"outside",
"campaign_id",
"resource_type",
"details"
],
"title": "Self Mailer Creative"
},
{
"$ref": "#/components/schemas/creative_base"
}
]
}
]
},
"crv_back": {
"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",
"oneOf": [
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"$ref": "#/components/schemas/local_file_path"
}
]
},
"crv_file": {
"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.",
"oneOf": [
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"$ref": "#/components/schemas/local_file_path"
}
]
},
"crv_front": {
"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",
"oneOf": [
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"$ref": "#/components/schemas/local_file_path"
}
]
},
"crv_id": {
"description": "Unique identifier prefixed with `crv_`.",
"example": "crv_2a3b096c409b32c",
"pattern": "^crv_[a-zA-Z0-9]+$",
"type": "string"
},
"crv_inside": {
"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",
"oneOf": [
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"$ref": "#/components/schemas/local_file_path"
}
]
},
"crv_outside": {
"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",
"oneOf": [
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"$ref": "#/components/schemas/local_file_path"
}
]
},
"date_created": {
"description": "A timestamp in ISO 8601 format of the date the resource was created.",
"format": "date-time",
"type": "string"
},
"date_filter": {
"additionalProperties": {
"type": "string"
},
"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 \u2265, and `lte` is \u2264.",
"type": "object"
},
"date_modified": {
"description": "A timestamp in ISO 8601 format of the date the resource was last modified.",
"format": "date-time",
"type": "string"
},
"deleted": {
"description": "Only returned if the resource has been successfully deleted.",
"type": "boolean"
},
"deliverability_analysis": {
"description": "A nested object containing a breakdown of the deliverability of an address.",
"properties": {
"dpv_active": {
"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` \u2013\u2013 Address is active.\n* `N` \u2013\u2013 Address is not active.\n* `''` \u2013\u2013 A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string).\n",
"enum": [
"Y",
"N",
""
],
"example": "Y",
"type": "string"
},
"dpv_cmra": {
"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` \u2013\u2013 Address is CMRA-authorized.\n* `N` \u2013\u2013 Address is not CMRA-authorized.\n* `''` \u2013\u2013 A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string).\n",
"enum": [
"Y",
"N",
""
],
"example": "N",
"type": "string"
},
"dpv_confirmation": {
"description": "Result of Delivery Point Validation (DPV), which determines whether or not the address is deliverable by the USPS. Possible values are:\n* `Y` \u2013\u2013 The address is deliverable by the USPS.\n* `S` \u2013\u2013 The address is deliverable by removing the provided secondary unit designator. This information may be incorrect or unnecessary.\n* `D` \u2013\u2013 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` \u2013\u2013 The address is not deliverable according to the USPS, but parts of the address are valid (such as the street and ZIP code).\n* `''` \u2013\u2013 This address is not deliverable. No matching street could be found within the city or ZIP code.\n",
"enum": [
"Y",
"S",
"D",
"N",
""
],
"example": "Y",
"type": "string"
},
"dpv_door_not_accessible": {
"description": "Indicates the door of the address is not accessible for mail delivery. Possible values are:\n* `Y` \u2013\u2013 Door is not accessible.\n* `N` \u2013\u2013 Door is accessible.\n* `''` \u2013\u2013 A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string).\n",
"enum": [
"Y",
"N",
""
],
"example": "N",
"type": "string"
},
"dpv_footnotes": {
"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",
"example": [
"AA",
"BB"
],
"items": {
"$ref": "#/components/schemas/dpv_footnote"
},
"type": "array"
},
"dpv_inactive_reason": {
"description": "Indicates the reason why an address is vacant or no longer receiving deliveries. Possible values are:\n* `01` \u2013\u2013 Address does not receive mail from the USPS directly, but is serviced by a drop address.\n* `02` \u2013\u2013 Address not yet deliverable.\n* `03` \u2013\u2013 A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string).\n* `04` \u2013\u2013 Address is a College, Military Zone, or other type.\n* `05` \u2013\u2013 Address no longer receives deliveries.\n* `06` \u2013\u2013 Address is missing required secondary information.\n* `''` \u2013\u2013 A DPV match is not made or the address is active.\n",
"enum": [
"01",
"02",
"03",
"04",
"05",
"06",
""
],
"example": "06",
"type": "string"
},
"dpv_no_secure_location": {
"description": "Indicates packages to this address will not be left due to security concerns. Possible values are:\n* `Y` \u2013\u2013 Address does not have a secure mailbox.\n* `N` \u2013\u2013 Address has a secure mailbox.\n* `''` \u2013\u2013 A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string).\n",
"enum": [
"Y",
"N",
""
],
"example": "N",
"type": "string"
},
"dpv_non_delivery_day_flag": {
"description": "Indicates whether deliveries are not performed on one or more days of the week at an address. Possible values are:\n* `Y` \u2013\u2013 Mail delivery does not occur on some days of the week.\n* `N` \u2013\u2013 Mail delivery occurs every day of the week.\n* `''` \u2013\u2013 A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string).\n",
"enum": [
"Y",
"N",
""
],
"example": "N",
"type": "string"
},
"dpv_non_delivery_day_values": {
"description": "Indicates days of the week (starting on Sunday) deliveries are not performed at an address. For example:\n* `YNNNNNN` \u2013\u2013 Mail delivery does not occur on Sunday's.\n* `NYNNNYN` \u2013\u2013 Mail delivery does not occur on Monday's or Friday's.\n* `''` \u2013\u2013 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",
"example": "YNNNNNN",
"type": "string"
},
"dpv_throwback": {
"description": "Indicates a street address for which mail is delivered to a PO Box. Possible values are:\n* `Y` \u2013\u2013 Address is a PO Box throwback delivery point.\n* `N` \u2013\u2013 Address is not a PO Box throwback delivery point.\n* `''` \u2013\u2013 A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string).\n",
"enum": [
"Y",
"N",
""
],
"example": "N",
"type": "string"
},
"dpv_vacant": {
"description": "Indicates that an address was once deliverable, but has become vacant and is no longer receiving deliveries. Possible values are:\n* `Y` \u2013\u2013 Address is vacant.\n* `N` \u2013\u2013 Address is not vacant.\n* `''` \u2013\u2013 A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string).\n",
"enum": [
"Y",
"N",
""
],
"example": "N",
"type": "string"
},
"ews_match": {
"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",
"example": false,
"type": "boolean"
},
"lacs_indicator": {
"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` \u2013\u2013 New address produced with a matching record in LACS<sup>Link</sup>.\n* `N` \u2013\u2013 New address could not be produced with a matching record in LACS<sup>Link</sup>.\n* `''` \u2013\u2013 A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string).\n",
"enum": [
"Y",
"N",
""
],
"example": "",
"type": "string"
},
"lacs_return_code": {
"description": "A code indicating how `deliverability_analysis[lacs_indicator]` was determined.\nPossible values are:\n* `A` \u2014 A new address was produced because a match was found in LACS<sup>Link</sup>.\n* `92` \u2014 A LACS<sup>Link</sup> record was matched after dropping secondary information.\n* `14` \u2014 A match was found in LACS<sup>Link</sup>, but could not be converted to a deliverable address.\n* `00` \u2014 A match was not found in LACS<sup>Link</sup>, and no new address was produced.\n* `''` \u2014 LACS<sup>Link</sup> was not attempted.\n",
"example": "",
"type": "string"
},
"suite_return_code": {
"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` \u2013\u2013 A Suite<sup>Link</sup> match was found and secondary information was added.\n* `00` \u2013\u2013 A Suite<sup>Link</sup> match could not be found and no secondary information was added.\n* `''` \u2013\u2013 Suite<sup>Link</sup> lookup was not attempted.\n",
"enum": [
"A",
"00",
""
],
"example": "",
"type": "string"
}
},
"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"
],
"type": "object"
},
"domain": {
"description": "The registered domain/hostname.",
"type": "string"
},
"domain_delete": {
"properties": {
"deleted": {
"description": "Only returned if the domain was successfully deleted.",
"type": "boolean"
},
"id": {
"description": "Unique identifier for a domain.",
"type": "string"
}
},
"type": "object"
},
"domain_response": {
"properties": {
"created_at": {
"description": "The date and time the domain was created.",
"type": "string"
},
"domain": {
"description": "The registered domain/hostname.",
"type": "string"
},
"error_redirect_link": {
"description": "URL to redirect customers if a short link is broken or inactive.",
"type": "string"
},
"id": {
"description": "Unique identifier for a domain.",
"type": "string"
},
"status": {
"description": "The configuration status of the domain.",
"enum": [
"configured",
"not_configured"
],
"type": "string"
},
"updated_at": {
"description": "The date and time the domain was last updated.",
"type": "string"
}
},
"type": "object"
},
"domains": {
"properties": {
"domain": {
"$ref": "#/components/schemas/domain"
},
"error_redirect_link": {
"$ref": "#/components/schemas/error_redirect_link"
}
},
"required": [
"domain"
],
"type": "object"
},
"domains_response": {
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"properties": {
"data": {
"description": "List of domains.",
"items": {
"$ref": "#/components/schemas/domain_response"
},
"type": "array"
}
},
"type": "object"
}
]
},
"double_sided": {
"default": true,
"description": "Set this attribute to `true` for double sided printing, or `false` for for single sided printing. Defaults to `true`.",
"type": "boolean"
},
"dpv_footnote": {
"enum": [
"AA",
"A1",
"BB",
"CC",
"N1",
"F1",
"G1",
"U1",
"M1",
"M3",
"P1",
"P3",
"R1",
"R7",
"RR"
],
"example": "AA",
"type": "string"
},
"editable": {
"properties": {
"description": {
"$ref": "#/components/schemas/resource_description"
},
"mail_type": {
"$ref": "#/components/schemas/mail_type"
},
"merge_variables": {
"$ref": "#/components/schemas/merge_variables"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"print_speed": {
"$ref": "#/components/schemas/print_speed"
},
"send_date": {
"$ref": "#/components/schemas/send_date"
}
},
"type": "object"
},
"editable_no_mailtype": {
"properties": {
"description": {
"$ref": "#/components/schemas/resource_description"
},
"merge_variables": {
"$ref": "#/components/schemas/merge_variables"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"send_date": {
"$ref": "#/components/schemas/send_date"
}
},
"type": "object"
},
"engine": {
"default": "legacy",
"description": "The engine used to combine HTML template with merge variables.\n * `legacy` - Lob's original engine\n * `handlebars`\n",
"enum": [
"legacy",
"handlebars"
],
"nullable": true,
"type": "string"
},
"error": {
"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.",
"properties": {
"error": {
"properties": {
"code": {
"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",
"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"
},
"message": {
"description": "A human-readable message with more details about the error",
"example": "Rate limit exceeded. Please wait 5 seconds and try your request again.",
"type": "string"
},
"status_code": {
"$ref": "#/components/schemas/failure_status_code"
}
},
"required": [
"message",
"status_code",
"code"
],
"type": "object"
}
},
"required": [
"error"
],
"type": "object"
},
"error_redirect_link": {
"description": "URL to redirect customers if a short link is broken or inactive.",
"type": "string"
},
"event_type": {
"properties": {
"enabled_for_test": {
"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.",
"type": "boolean"
},
"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": {
"default": "event_type",
"description": "Value is resource type.",
"enum": [
"event_type"
],
"type": "string"
},
"resource": {
"enum": [
"postcards",
"self mailers",
"letters",
"checks",
"addresses",
"bank accounts"
],
"type": "string"
}
},
"required": [
"id",
"enabled_for_test",
"resource",
"object"
],
"type": "object"
},
"events": {
"properties": {
"body": {
"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)).",
"type": "object"
},
"date_created": {
"$ref": "#/components/schemas/date_created"
},
"event_type": {
"$ref": "#/components/schemas/event_type"
},
"id": {
"description": "Unique identifier prefixed with `evt_`.",
"pattern": "^evt_[a-zA-Z0-9_]+$",
"type": "string"
},
"object": {
"default": "event",
"description": "Value is resource type.",
"enum": [
"event"
],
"type": "string"
},
"reference_id": {
"description": "Unique identifier of the related resource for the event.",
"type": "string"
}
},
"required": [
"id",
"body",
"reference_id",
"event_type",
"date_created",
"object"
],
"type": "object"
},
"evnt_id": {
"description": "Unique identifier prefixed with `evnt_`.",
"pattern": "^evnt_[a-zA-Z0-9]+$",
"type": "string"
},
"ex_id": {
"description": "Unique identifier prefixed with `ex_`.",
"pattern": "^ex_[a-zA-Z0-9]+$",
"type": "string"
},
"expected_delivery_date": {
"description": "A date in YYYY-MM-DD format of the mailpiece's expected delivery date based on its `send_date`.",
"format": "date",
"type": "string"
},
"extra_service": {
"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",
"enum": [
"certified",
"certified_return_receipt",
"registered",
null
],
"nullable": true,
"type": "string"
},
"failure_reason": {
"description": "An object describing the reason for failure if the resource failed to render.",
"properties": {
"errors": {
"items": {
"$ref": "#/components/schemas/failure_reason_error"
},
"nullable": true,
"type": "array"
},
"failure_reason": {
"description": "Reason failure occurred",
"type": "string"
},
"remediation": {
"description": "Instructions on how to resolve the error",
"type": "string"
}
},
"type": "object"
},
"failure_reason_error": {
"description": "Failure error details",
"properties": {
"error_type": {
"description": "HTTP response status code message or service defined error",
"nullable": true,
"type": "string"
},
"host": {
"description": "URL host",
"nullable": true,
"type": "string"
},
"path": {
"description": "URL path",
"nullable": true,
"type": "string"
},
"protocol": {
"description": "Network protocol",
"nullable": true,
"type": "string"
},
"remediation": {
"description": "Instructions on how to resolve the error",
"nullable": true,
"type": "string"
},
"status_code": {
"description": "HTTP response status codes if the error is asset related",
"nullable": true,
"type": "number"
},
"url": {
"description": "Failed URL of asset",
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"failure_status_code": {
"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",
"enum": [
401,
403,
404,
413,
422,
429,
500
],
"type": "integer"
},
"from": {
"properties": {
"from": {
"$ref": "#/components/schemas/address"
}
},
"type": "object"
},
"from_attribute": {
"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.",
"oneOf": [
{
"$ref": "#/components/schemas/adr_id"
},
{
"$ref": "#/components/schemas/inline_address_us"
}
],
"title": "From"
},
"from_us": {
"properties": {
"from": {
"$ref": "#/components/schemas/address_us"
}
},
"type": "object"
},
"generated": {
"properties": {
"carrier": {
"default": "USPS",
"enum": [
"USPS"
],
"type": "string"
},
"date_created": {
"$ref": "#/components/schemas/date_created"
},
"date_modified": {
"$ref": "#/components/schemas/date_modified"
},
"deleted": {
"$ref": "#/components/schemas/deleted"
},
"expected_delivery_date": {
"$ref": "#/components/schemas/expected_delivery_date"
},
"thumbnails": {
"items": {
"$ref": "#/components/schemas/thumbnail"
},
"type": "array"
},
"to": {
"$ref": "#/components/schemas/address"
}
},
"required": [
"to",
"carrier"
],
"type": "object"
},
"html_string": {
"description": "An HTML string of under 10,000 characters.",
"maxLength": 10000,
"pattern": "<",
"type": "string"
},
"identity_validation": {
"oneOf": [
{
"$ref": "#/components/schemas/recipient_validation"
},
{
"$ref": "#/components/schemas/company_validation"
}
]
},
"identity_validation_company": {
"description": "The name of the company or firm.",
"maxLength": 500,
"nullable": true,
"type": "string"
},
"identity_validation_id": {
"description": "Unique identifier prefixed with `id_validation_`.",
"pattern": "^id_validation_[a-zA-Z0-9_]+$",
"type": "string"
},
"identity_validation_recipient": {
"description": "The name of the person whose identity is being validated.",
"maxLength": 500,
"nullable": true,
"type": "string"
},
"identity_validation_writable": {
"oneOf": [
{
"$ref": "#/components/schemas/recipient_input"
},
{
"$ref": "#/components/schemas/company_input"
}
]
},
"infd_id": {
"description": "Unique identifier prefixed with `infd_`.",
"example": "infd_23g423g4234g342",
"pattern": "^infd_[a-zA-Z0-9]+$",
"type": "string"
},
"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"
},
{
"required": [
"address_line1",
"address_country"
],
"type": "object"
},
{
"oneOf": [
{
"required": [
"address_city",
"address_state"
]
},
{
"required": [
"address_zip"
]
}
],
"type": "object"
}
]
},
"inline_address_us": {
"allOf": [
{
"$ref": "#/components/schemas/address_editable_us"
},
{
"required": [
"address_line1",
"address_city",
"address_state",
"address_zip"
],
"type": "object"
}
]
},
"inline_address_us_chk": {
"allOf": [
{
"anyOf": [
{
"required": [
"name"
],
"title": "address obj with `name` defined"
},
{
"required": [
"company"
],
"title": "address obj with `company` defined"
}
],
"properties": {
"address_city": {
"maxLength": 200,
"type": "string"
},
"address_country": {
"default": "US",
"enum": [
"US"
],
"type": "string"
},
"address_line1": {
"description": "The primary number, street name, and directional information.",
"maxLength": 50,
"type": "string"
},
"address_line2": {
"description": "An optional field for address unit information. Total string sum of this plus `address_line1` may not exceed 50 characters.",
"maxLength": 50,
"nullable": true,
"type": "string"
},
"address_state": {
"description": "2 letter state short-name code",
"pattern": "^[a-zA-Z]{2}$",
"type": "string"
},
"address_zip": {
"description": "Must follow the ZIP format of `12345` or ZIP+4 format of `12345-1234`.\n",
"pattern": "^\\d{5}(-\\d{4})?$",
"type": "string"
},
"company": {
"$ref": "#/components/schemas/company"
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"email": {
"description": "Must be no longer than 100 characters.",
"maxLength": 100,
"nullable": true,
"type": "string"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"name": {
"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",
"maxLength": 40,
"nullable": true,
"type": "string"
},
"phone": {
"description": "Must be no longer than 40 characters.",
"maxLength": 40,
"nullable": true,
"type": "string"
}
},
"required": [
"address_line1",
"address_city",
"address_state",
"address_zip"
],
"type": "object"
}
]
},
"input_from": {
"properties": {
"from": {
"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.",
"oneOf": [
{
"$ref": "#/components/schemas/adr_id"
},
{
"$ref": "#/components/schemas/inline_address"
}
]
}
},
"type": "object"
},
"input_from_us": {
"properties": {
"from": {
"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.",
"oneOf": [
{
"$ref": "#/components/schemas/adr_id"
},
{
"$ref": "#/components/schemas/inline_address_us"
}
]
}
},
"type": "object"
},
"input_to": {
"properties": {
"to": {
"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\u2019s <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>",
"oneOf": [
{
"$ref": "#/components/schemas/adr_id"
},
{
"$ref": "#/components/schemas/inline_address"
}
]
}
},
"type": "object"
},
"intl_components": {
"description": "A nested object containing a breakdown of each component of an address.",
"properties": {
"city": {
"$ref": "#/components/schemas/city"
},
"postal_code": {
"$ref": "#/components/schemas/postal_code"
},
"primary_number": {
"$ref": "#/components/schemas/primary_number"
},
"state": {
"$ref": "#/components/schemas/state"
},
"street_name": {
"$ref": "#/components/schemas/street_name"
}
},
"type": "object"
},
"intl_ver_id": {
"description": "Unique identifier prefixed with `intl_ver_`.",
"pattern": "^intl_ver_[a-zA-Z0-9]+$",
"type": "string"
},
"intl_verification": {
"allOf": [
{
"$ref": "#/components/schemas/intl_verification_base"
},
{
"properties": {
"components": {
"$ref": "#/components/schemas/intl_components"
},
"country": {
"$ref": "#/components/schemas/country_short"
},
"coverage": {
"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",
"enum": [
"SUBBUILDING",
"HOUSENUMBER/BUILDING",
"STREET",
"LOCALITY",
"SPARSE"
],
"type": "string"
},
"deliverability": {
"description": "Summarizes the deliverability of the `intl_verification` object. Possible values are:\n* `deliverable` \u2014 The address is deliverable.\n* `deliverable_missing_info` \u2014 The address is missing some information, but is most likely deliverable.\n* `undeliverable` \u2014 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` \u2014 This address is not deliverable. No matching street could be found within the city or postal code.\n",
"enum": [
"deliverable",
"deliverable_missing_info",
"undeliverable",
"no_match"
],
"type": "string"
},
"id": {
"$ref": "#/components/schemas/intl_ver_id"
},
"last_line": {
"description": "Combination of the following applicable `components`:\n* `city`\n* `state`\n* `zip_code`\n* `zip_code_plus_4`\n",
"type": "string"
},
"object": {
"default": "intl_verification",
"description": "Value is resource type.",
"enum": [
"intl_verification"
],
"type": "string"
},
"status": {
"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",
"enum": [
"LV4",
"LV3",
"LV2",
"LV1",
"LF4",
"LF3",
"LF2",
"LF1",
"LM4",
"LM3",
"LM2",
"LU1"
],
"type": "string"
}
},
"type": "object"
}
]
},
"intl_verification_base": {
"properties": {
"primary_line": {
"$ref": "#/components/schemas/primary_line"
},
"recipient": {
"$ref": "#/components/schemas/recipient"
},
"secondary_line": {
"$ref": "#/components/schemas/secondary_line"
}
},
"type": "object"
},
"intl_verification_writable": {
"oneOf": [
{
"$ref": "#/components/schemas/multiple_components_intl"
},
{
"$ref": "#/components/schemas/single_line_address_intl"
}
]
},
"intl_verifications": {
"properties": {
"addresses": {
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/intl_verification"
},
{
"$ref": "#/components/schemas/error"
}
]
},
"type": "array"
},
"errors": {
"description": "Indicates whether any errors occurred during the verification process.",
"type": "boolean"
}
},
"required": [
"addresses",
"errors"
],
"type": "object"
},
"intl_verifications_payload": {
"properties": {
"addresses": {
"items": {
"$ref": "#/components/schemas/multiple_components_intl"
},
"maxItems": 20,
"minItems": 1,
"type": "array"
}
},
"required": [
"addresses"
],
"type": "object"
},
"issue_entry": {
"properties": {
"code": {
"description": "A machine-readable error code.",
"type": "string"
},
"message": {
"description": "A human-readable description of the issue.",
"type": "string"
},
"urls": {
"description": "Relevant URLs for more information.",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"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": {
"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.",
"properties": {
"deleted": {
"$ref": "#/components/schemas/deleted"
},
"id": {
"$ref": "#/components/schemas/ltr_id"
}
}
},
"letter_editable": {
"allOf": [
{
"$ref": "#/components/schemas/input_to"
},
{
"$ref": "#/components/schemas/input_from"
},
{
"$ref": "#/components/schemas/editable"
},
{
"properties": {
"address_placement": {
"$ref": "#/components/schemas/address_placement"
},
"billing_group_id": {
"$ref": "#/components/schemas/billing_group_id"
},
"cards": {
"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.",
"items": {
"$ref": "#/components/schemas/card_id"
},
"maxItems": 1,
"minItems": 0,
"nullable": true,
"type": "array"
},
"color": {
"allOf": [
{
"$ref": "#/components/schemas/color"
},
{
"default": false
}
]
},
"custom_envelope": {
"$ref": "#/components/schemas/user_provided"
},
"double_sided": {
"$ref": "#/components/schemas/double_sided"
},
"extra_service": {
"$ref": "#/components/schemas/extra_service"
},
"file": {
"$ref": "#/components/schemas/ltr_file"
},
"fsc": {
"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.",
"type": "boolean"
},
"mail_type": {
"$ref": "#/components/schemas/mail_type"
},
"perforated_page": {
"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>.",
"nullable": true,
"type": "integer"
},
"print_speed": {
"$ref": "#/components/schemas/print_speed"
},
"qr_code": {
"$ref": "#/components/schemas/qr_code"
},
"return_envelope": {
"$ref": "#/components/schemas/user_provided-2"
},
"size": {
"$ref": "#/components/schemas/ltr_size"
},
"use_type": {
"$ref": "#/components/schemas/ltr_use_type"
}
},
"required": [
"to",
"from",
"file",
"color",
"use_type"
],
"type": "object"
}
]
},
"letter_generated_base": {
"allOf": [
{
"$ref": "#/components/schemas/generated"
},
{
"$ref": "#/components/schemas/from"
},
{
"properties": {
"campaign_id": {
"$ref": "#/components/schemas/campaign_id"
},
"failure_reason": {
"allOf": [
{
"$ref": "#/components/schemas/failure_reason"
},
{
"nullable": true
}
]
},
"fsc": {
"default": false,
"description": "This is in beta. Contact support@lob.com or your account contact to learn more. Not available for `A4` letter size.",
"type": "boolean"
},
"id": {
"$ref": "#/components/schemas/ltr_id"
},
"object": {
"default": "letter",
"description": "Value is resource type.",
"enum": [
"letter"
],
"type": "string"
},
"status": {
"$ref": "#/components/schemas/status"
},
"template_id": {
"allOf": [
{
"description": "The unique ID of the HTML template used for the letter."
},
{
"$ref": "#/components/schemas/tmpl_id"
}
]
},
"template_version_id": {
"allOf": [
{
"description": "The unique ID of the specific version of the HTML template used for the letter.",
"type": "string"
},
{
"$ref": "#/components/schemas/vrsn_id"
}
]
},
"url": {
"$ref": "#/components/schemas/signed_link"
},
"use_type": {
"$ref": "#/components/schemas/ltr_use_type"
}
},
"required": [
"id",
"from",
"use_type"
],
"type": "object"
}
]
},
"letter_resource_parameters": {
"allOf": [
{
"$ref": "#/components/schemas/input_to"
},
{
"$ref": "#/components/schemas/input_from"
},
{
"properties": {
"address_placement": {
"$ref": "#/components/schemas/address_placement"
},
"color": {
"allOf": [
{
"$ref": "#/components/schemas/color"
},
{
"default": false
}
]
},
"double_sided": {
"$ref": "#/components/schemas/double_sided"
},
"file": {
"$ref": "#/components/schemas/ltr_file"
},
"merge_variables": {
"$ref": "#/components/schemas/merge_variables"
},
"size": {
"$ref": "#/components/schemas/ltr_size"
}
},
"required": [
"to",
"from",
"file",
"color"
],
"type": "object"
}
]
},
"letter_types": {
"description": "Unique identifier referring to status of letter",
"enum": [
"letter.created",
"letter.rejected",
"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"
},
"link_delete_response": {
"properties": {
"deleted": {
"description": "Only returned if the link was successfully deleted.",
"type": "boolean"
},
"id": {
"description": "Unique identifier for a link.",
"type": "string"
}
},
"type": "object"
},
"link_response": {
"properties": {
"created_at": {
"description": "The date and time the link was created.",
"type": "string"
},
"domain_id": {
"description": "A unique identifier for the registered domain.",
"type": "string"
},
"id": {
"description": "Unique identifier prefixed with `lnk_`.",
"type": "string"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"redirect_link": {
"$ref": "#/components/schemas/redirect_link"
},
"short_link": {
"description": "The shortened URL for the associated original URL.",
"type": "string"
},
"title": {
"description": "The title of the URL.",
"type": "string"
},
"updated_at": {
"description": "The date and time the link was last updated.",
"type": "string"
}
},
"type": "object"
},
"link_single": {
"properties": {
"domain": {
"default": "lob.st",
"description": "The registered domain to be used for the short URL.",
"type": "string"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"redirect_link": {
"$ref": "#/components/schemas/redirect_link"
},
"slug": {
"description": "The unique path for the shortened URL, if empty a unique path will be used.",
"type": "string"
},
"title": {
"description": "The title of the URL.",
"type": "string"
}
},
"required": [
"redirect_link"
],
"type": "object"
},
"link_update": {
"properties": {
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"redirect_link": {
"$ref": "#/components/schemas/redirect_link"
},
"title": {
"description": "The title of the URL.",
"type": "string"
}
},
"required": [
"redirect_link"
],
"type": "object"
},
"links_response": {
"allOf": [
{
"$ref": "#/components/schemas/list"
},
{
"properties": {
"data": {
"description": "List of links",
"items": {
"$ref": "#/components/schemas/link_response"
},
"type": "array"
}
},
"type": "object"
}
]
},
"list": {
"description": "Multiple items returned in order",
"properties": {
"count": {
"$ref": "#/components/schemas/count"
},
"next_url": {
"description": "Url of next page of items in list.",
"nullable": true,
"type": "string"
},
"object": {
"$ref": "#/components/schemas/object"
},
"previous_url": {
"description": "Url of previous page of items in list.",
"nullable": true,
"type": "string"
},
"total_count": {
"description": "Indicates the total number of records. Provided when the request specifies an \"include\" query parameter",
"type": "integer"
}
},
"type": "object"
},
"lob_base": {
"properties": {
"date_created": {
"$ref": "#/components/schemas/date_created"
},
"date_modified": {
"$ref": "#/components/schemas/date_modified"
},
"deleted": {
"$ref": "#/components/schemas/deleted"
},
"object": {
"$ref": "#/components/schemas/object"
}
},
"required": [
"date_created",
"date_modified",
"object"
],
"type": "object"
},
"lob_confidence_score": {
"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\u2019s mail delivery data to over half of US households.",
"properties": {
"level": {
"description": "Indicates the likelihood that the address is a valid, mail-receiving address. Possible values are:\n - `high` \u2014 Over 70% of mailpieces Lob has sent to this address were delivered successfully and recent mailings were also successful.\n - `medium` \u2014 Between 40% and 70% of mailpieces Lob has sent to this address were delivered successfully.\n - `low` \u2014 Less than 40% of mailpieces Lob has sent to this address were delivered successfully and recent mailings weren't successful.\n - `\"\"` \u2014 No tracking data exists for this address or lob deliverability was unable to find a corresponding level of mail success.\n",
"enum": [
"high",
"medium",
"low",
""
],
"type": "string"
},
"score": {
"default": null,
"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",
"format": "float",
"maximum": 100,
"minimum": 0,
"nullable": true,
"type": "number"
}
},
"required": [
"score",
"level"
],
"type": "object"
},
"lob_credits_balance": {
"properties": {
"balance": {
"description": "Account's current balance of Lob Credits. Can be positive, negative, or zero.",
"example": 1000,
"type": "number"
}
},
"required": [
"balance"
],
"type": "object"
},
"local_file_path": {
"description": "The path to a local file.",
"pattern": "^(?!https://)[a-zA-Z0-9@:%._+~#=/]{1,256}.(html?|pdf|png|jpg)$",
"type": "string"
},
"location": {
"properties": {
"latitude": {
"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",
"format": "float",
"maximum": 90,
"minimum": -90,
"nullable": true,
"type": "number"
},
"longitude": {
"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",
"format": "float",
"maximum": 180,
"minimum": -180,
"nullable": true,
"type": "number"
}
},
"required": [
"latitude",
"longitude"
],
"type": "object"
},
"location_analysis": {
"description": "A nested object containing a breakdown of the analysis of a reverse geocoded location.",
"properties": {
"distance": {
"description": "The distance from the input location to this exact zip code in miles.\n",
"format": "float",
"type": "number"
},
"latitude": {
"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",
"format": "float",
"maximum": 90,
"minimum": -90,
"nullable": true,
"type": "number"
},
"longitude": {
"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",
"format": "float",
"maximum": 180,
"minimum": -180,
"nullable": true,
"type": "number"
}
},
"required": [
"latitude",
"longitude",
"distance"
],
"type": "object"
},
"ltr_file": {
"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.",
"oneOf": [
{
"$ref": "#/components/schemas/html_string"
},
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"$ref": "#/components/schemas/remote_file_url"
},
{
"pattern": "^(?!https://)[a-zA-Z0-9@:%._+~#=/]{1,256}.(html?|pdf)$",
"type": "string"
}
]
},
"ltr_id": {
"description": "Unique identifier prefixed with `ltr_`.",
"pattern": "^ltr_[a-zA-Z0-9]+$",
"type": "string"
},
"ltr_size": {
"default": "us_letter",
"description": "Specifies the size of the letter. It accepts two values `us_letter` and `us_legal`. If the [Lob-Version header](#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",
"enum": [
"us_letter",
"us_legal"
],
"type": "string"
},
"ltr_use_type": {
"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).",
"enum": [
"marketing",
"operational",
null
],
"nullable": true,
"type": "string"
},
"mail_type": {
"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",
"enum": [
"usps_first_class",
"usps_standard"
],
"type": "string"
},
"merge_variable_column_mapping": {
"default": null,
"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. The redirect URLs for QR codes can also be customized using this mapping. If the URL has a variable and the variable mapping existsing here, then data from the respective column in the audience file will be merged into the URL template.",
"example": {
"gift_code": "code",
"name": "recipient_name",
"qr_code_redirect_url": "redirect_url"
},
"nullable": true,
"title": "Merge Variable Mapping",
"type": "object"
},
"merge_variables": {
"description": "You can input a merge variable payload object to your template or QR code redirect URLs 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. These settings only apply on HTML templates and not on QR code redirect URLs.",
"maxLength": 25000,
"nullable": true,
"type": "object"
},
"metadata": {
"additionalProperties": {
"type": "string"
},
"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.",
"maxLength": 500,
"pattern": "[^\"\\\\]{0,500}",
"type": "object"
},
"multiple_components": {
"allOf": [
{
"anyOf": [
{
"required": [
"city",
"state"
],
"title": "US verification object with `city` and `state`"
},
{
"required": [
"zip_code"
],
"title": "US verification object with `zip_code`"
}
]
},
{
"properties": {
"city": {
"allOf": [
{
"$ref": "#/components/schemas/city_no_description"
},
{
"description": "The name of the city. `city` and `state` are required if no `zip_code` is passed.",
"type": "string"
}
]
},
"primary_line": {
"$ref": "#/components/schemas/primary_line_us"
},
"recipient": {
"$ref": "#/components/schemas/recipient"
},
"secondary_line": {
"$ref": "#/components/schemas/secondary_line"
},
"state": {
"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.",
"maxLength": 50,
"type": "string"
},
"urbanization": {
"$ref": "#/components/schemas/urbanization"
},
"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"
}
]
}
},
"required": [
"primary_line"
],
"type": "object"
}
]
},
"multiple_components_intl": {
"allOf": [
{
"$ref": "#/components/schemas/intl_verification_base"
},
{
"properties": {
"city": {
"$ref": "#/components/schemas/city"
},
"country": {
"$ref": "#/components/schemas/country_extended"
},
"postal_code": {
"$ref": "#/components/schemas/postal_code"
},
"state": {
"description": "The name of the state.",
"type": "string"
}
},
"required": [
"primary_line",
"country"
],
"type": "object"
}
]
},
"multiple_components_list": {
"properties": {
"addresses": {
"items": {
"$ref": "#/components/schemas/multiple_components"
},
"maxItems": 20,
"minItems": 1,
"type": "array"
}
},
"required": [
"addresses"
],
"type": "object"
},
"name": {
"description": "Name of the billing group.",
"maxLength": 255,
"type": "string"
},
"no_extra_service": {
"allOf": [
{
"properties": {
"address_placement": {
"$ref": "#/components/schemas/address_placement"
},
"buckslips": {
"description": "An array of buckslip(s) associated with a specific letter",
"items": {
"$ref": "#/components/schemas/buckslip"
},
"nullable": true,
"type": "array"
},
"cards": {
"description": "An array of cards associated with a specific letter",
"items": {
"$ref": "#/components/schemas/card"
},
"nullable": true,
"type": "array"
},
"color": {
"$ref": "#/components/schemas/color"
},
"custom_envelope": {
"$ref": "#/components/schemas/returned-2"
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"double_sided": {
"$ref": "#/components/schemas/double_sided"
},
"mail_type": {
"$ref": "#/components/schemas/mail_type"
},
"merge_variables": {
"$ref": "#/components/schemas/merge_variables"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"perforated_page": {
"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>.",
"nullable": true,
"type": "integer"
},
"return_address": {
"$ref": "#/components/schemas/return_address"
},
"return_envelope": {
"$ref": "#/components/schemas/returned-5"
},
"send_date": {
"$ref": "#/components/schemas/send_date"
},
"tracking_events": {
"description": "An array of tracking events ordered by ascending `time`.",
"items": {
"$ref": "#/components/schemas/tracking_event_normal"
},
"type": "array"
}
},
"required": [
"color"
],
"type": "object"
},
{
"$ref": "#/components/schemas/letter_generated_base"
}
]
},
"object": {
"description": "Value is resource type.",
"type": "string"
},
"optional_address_column_mapping": {
"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.",
"example": {
"address_country": "country,",
"address_line2": "secondary_line",
"company": "company"
},
"properties": {
"address_country": {
"default": null,
"description": "The column header from the csv file that should be mapped to the optional field \"address_country\"",
"nullable": true,
"type": "string"
},
"address_line2": {
"default": null,
"description": "The column header from the csv file that should be mapped to the optional field \"address_line2\"",
"nullable": true,
"type": "string"
},
"company": {
"default": null,
"description": "The column header from the csv file that should be mapped to the optional field \"company\"",
"nullable": true,
"type": "string"
}
},
"required": [
"address_line2",
"company",
"address_country"
],
"title": "Optional Address Columns",
"type": "object"
},
"postal_code": {
"description": "The postal code.",
"maxLength": 12,
"type": "string"
},
"postcard": {
"allOf": [
{
"$ref": "#/components/schemas/postcard_base"
},
{
"$ref": "#/components/schemas/generated"
},
{
"$ref": "#/components/schemas/from_us"
},
{
"properties": {
"back_template_id": {
"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.",
"nullable": true,
"pattern": "^tmpl_[a-zA-Z0-9]+$",
"type": "string"
},
"back_template_version_id": {
"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.",
"nullable": true,
"pattern": "^vrsn_[a-zA-Z0-9]+$",
"type": "string"
},
"campaign_id": {
"$ref": "#/components/schemas/campaign_id"
},
"failure_reason": {
"allOf": [
{
"$ref": "#/components/schemas/failure_reason"
},
{
"nullable": true
}
]
},
"front_template_id": {
"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.",
"nullable": true,
"pattern": "^tmpl_[a-zA-Z0-9]+$",
"type": "string"
},
"front_template_version_id": {
"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.",
"nullable": true,
"pattern": "^vrsn_[a-zA-Z0-9]+$",
"type": "string"
},
"fsc": {
"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.",
"type": "boolean"
},
"id": {
"$ref": "#/components/schemas/psc_id"
},
"object": {
"default": "postcard",
"description": "Value is resource type.",
"enum": [
"postcard"
],
"type": "string"
},
"status": {
"$ref": "#/components/schemas/status"
},
"tracking_events": {
"description": "An array of tracking_event objects ordered by ascending `time`. Will not be populated for postcards created in test mode.",
"items": {
"$ref": "#/components/schemas/tracking_event_normal"
},
"nullable": true,
"type": "array"
},
"url": {
"$ref": "#/components/schemas/signed_link"
},
"use_type": {
"$ref": "#/components/schemas/psc_use_type"
}
},
"required": [
"id",
"front_template_id",
"back_template_id",
"url"
],
"type": "object"
}
]
},
"postcard_base": {
"allOf": [
{
"$ref": "#/components/schemas/editable"
},
{
"properties": {
"size": {
"$ref": "#/components/schemas/postcard_size"
}
},
"type": "object"
}
]
},
"postcard_deletion": {
"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.",
"properties": {
"deleted": {
"$ref": "#/components/schemas/deleted"
},
"id": {
"$ref": "#/components/schemas/psc_id"
}
}
},
"postcard_editable": {
"allOf": [
{
"$ref": "#/components/schemas/postcard_base"
},
{
"$ref": "#/components/schemas/input_to"
},
{
"$ref": "#/components/schemas/input_from_us"
},
{
"properties": {
"back": {
"$ref": "#/components/schemas/psc_back"
},
"billing_group_id": {
"$ref": "#/components/schemas/billing_group_id"
},
"front": {
"$ref": "#/components/schemas/psc_front"
},
"fsc": {
"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.",
"type": "boolean"
},
"print_speed": {
"$ref": "#/components/schemas/print_speed"
},
"qr_code": {
"$ref": "#/components/schemas/qr_code"
},
"use_type": {
"$ref": "#/components/schemas/psc_use_type"
}
},
"required": [
"to",
"front",
"back",
"use_type"
],
"type": "object"
}
]
},
"postcard_resource_parameters": {
"allOf": [
{
"$ref": "#/components/schemas/input_to"
},
{
"$ref": "#/components/schemas/input_from_us"
},
{
"properties": {
"back": {
"$ref": "#/components/schemas/psc_back"
},
"front": {
"$ref": "#/components/schemas/psc_front"
},
"merge_variables": {
"$ref": "#/components/schemas/merge_variables"
},
"size": {
"$ref": "#/components/schemas/postcard_size"
}
},
"required": [
"to",
"front",
"back"
],
"type": "object"
}
]
},
"postcard_size": {
"default": "4x6",
"description": "Specifies the size of the postcard. Only `4x6` postcards can be sent to international destinations.\n",
"enum": [
"4x6",
"6x9",
"6x11"
],
"type": "string"
},
"postcard_types": {
"description": "Unique identifier referring to status of postcard",
"enum": [
"postcard.created",
"postcard.rejected",
"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"
},
"primary_line": {
"description": "The primary delivery line (usually the street address) of the address.\n",
"maxLength": 200,
"type": "string"
},
"primary_line_us": {
"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",
"maxLength": 200,
"type": "string"
},
"primary_number": {
"description": "The numeric or alphanumeric part of an address preceding the street name. Often the house, building, or PO Box number.",
"type": "string"
},
"print_speed": {
"default": "core",
"description": "A string designating the mail speed type:\n* `core` - 2 production business days\n",
"enum": [
"core"
],
"nullable": true,
"type": "string"
},
"psc_back": {
"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",
"oneOf": [
{
"$ref": "#/components/schemas/html_string"
},
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"$ref": "#/components/schemas/remote_file_url"
},
{
"$ref": "#/components/schemas/local_file_path"
}
]
},
"psc_front": {
"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",
"oneOf": [
{
"$ref": "#/components/schemas/html_string"
},
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"$ref": "#/components/schemas/remote_file_url"
},
{
"$ref": "#/components/schemas/local_file_path"
}
]
},
"psc_id": {
"description": "Unique identifier prefixed with `psc_`.",
"pattern": "^psc_[a-zA-Z0-9]+$",
"type": "string"
},
"psc_use_type": {
"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).",
"enum": [
"marketing",
"operational",
null
],
"nullable": true,
"type": "string"
},
"qr_code": {
"description": "Customize and place a QR code on the creative at the required position.",
"properties": {
"bottom": {
"description": "Vertical distance (in inches) to place QR code from the bottom. Only allowed if \"top\" isn't provided.",
"type": "number"
},
"left": {
"description": "Horizontal distance (in inches) to place QR code from the left. Only allowed if \"right\" isn't provided.",
"type": "number"
},
"logo": {
"description": "Allows specifying a logo to be placed over the center of the QR code. Logos must be in PNG or JPEG format and have a maximum file size of 1 MB.",
"properties": {
"url": {
"description": "The public URL of the logo image to be retrieved and placed over the center of the QR code.",
"pattern": "^https://[-a-zA-Z0-9@:%._+~#=/]{1,256}.(png|jpe?g)$",
"type": "string"
}
},
"type": "object"
},
"pages": {
"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 and snap packs, 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 and booklets, 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\").",
"type": "string"
},
"position": {
"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'.",
"enum": [
"relative"
],
"type": "string"
},
"redirect_url": {
"description": "The url to redirect the user when a QR code is scanned. The URL can be a literal URL, a template URL containing merge variables, or consist entirely of merge variables. For example, `https://www.example.com` or `https://www.example.com?q={{name}}` or `{{name}}`, respectively. When a merge variable exists in the URL, it is replaced with data from merge_variables. If the variable does not exist, then nothing with be replaced and the destination URL will be the same as the input URL. More details on merge variables can be found in <a href=\"https://help.lob.com/print-and-mail/designing-mail-creatives/adding-qr-codes#destination-url-and-redirects\" target=\"_blank\">our help center</a>.",
"type": "string"
},
"right": {
"description": "Horizontal distance (in inches) to place QR code from the right. Only allowed if \"left\" isn't provided.",
"type": "number"
},
"style": {
"description": "Customizes the appearance of the QR code.",
"properties": {
"background_color": {
"description": "The background color of the QR code in hexadecimal format. For example, `#000000` is black and `#FFFFFF` is white.",
"pattern": "^#[A-Fa-f0-9]{6}$",
"type": "string"
},
"foreground_color": {
"description": "The foreground color of the QR code in hexadecimal format. For example, `#000000` is black and `#FFFFFF` is white.",
"pattern": "^#[A-Fa-f0-9]{6}$",
"type": "string"
}
},
"type": "object"
},
"top": {
"description": "Vertical distance (in inches) to place QR code from the top. Only allowed if \"bottom\" isn't provided.",
"type": "number"
},
"width": {
"description": "The size (in inches) of the QR code with a minimum of 1 inch. All QR codes are generated as a square.",
"type": "number"
}
},
"required": [
"position",
"redirect_url",
"width"
],
"type": "object"
},
"qr_code_campaigns": {
"description": "Customize and place a QR code on all the postcards, letters or self mailers in a campaign. Redirect URLs are fully customizable i.e. they can be standard single URLs for the whole campaign, or variables can be used to customize them for each recipient. More details on customizing redirect URLs can be found in <a href=\"https://help.lob.com/print-and-mail/designing-mail-creatives/adding-qr-codes#destination-url-and-redirects\" target=\"_blank\">our help center.</a>",
"properties": {
"bottom": {
"description": "Vertical distance (in inches) to place QR code from the bottom. Only allowed if \"top\" isn't provided.",
"type": "string"
},
"left": {
"description": "Horizontal distance (in inches) to place QR code from the left. Only allowed if \"right\" isn't provided.",
"type": "string"
},
"pages": {
"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 and snap packs, 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 and booklets, 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\").",
"type": "string"
},
"position": {
"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'.",
"enum": [
"relative"
],
"type": "string"
},
"redirect_url": {
"description": "The url to redirect the user when a QR code is scanned. The URL can be a standard URL for all recipients in the campaign or customized per recipient. To customize for each recipient, use a mustache style template with merge variables enclosed in curly braces(for example, `https://www.example.com` or `{{name}}` or `https://www.example.com?q={{name}}`). If a merge variable is used in the URL, a mapping to that merge variable should be provided in the `mergeVariableColumnMapping` property when creating an upload. If the variable is not provided/does not exist, then the templated URL will be used. More details on customizing redirect URLs can be found in <a href=\"https://help.lob.com/print-and-mail/designing-mail-creatives/adding-qr-codes#destination-url-and-redirects\" target=\"_blank\">our help center.</a>.\nNote: Please use unique variable names between HTML templates and Redirect URLs to avoid conflicts. For example, if you are using `{{name}}` in the HTML template, use `{{name_redirect}}` in the Redirect URL. They can still be mapped to the same column in the audience file. Failing to set or map the redirect URL when using QR codes may lead to errors in generating mail pieces.\n"
},
"right": {
"description": "Horizontal distance (in inches) to place QR code from the right. Only allowed if \"left\" isn't provided.",
"type": "string"
},
"top": {
"description": "Vertical distance (in inches) to place QR code from the top. Only allowed if \"bottom\" isn't provided.",
"type": "string"
},
"width": {
"description": "The size (in inches) of the QR code with a minimum of 1 inch. All QR codes are generated as a square.",
"type": "string"
}
},
"required": [
"position",
"width"
],
"type": "object"
},
"qr_code_scans": {
"allOf": [
{
"properties": {
"date_created": {
"$ref": "#/components/schemas/date_created"
},
"number_of_scans": {
"description": "Number of times the QR Code associated with this mail piece was scanned.",
"type": "number"
},
"resource_id": {
"description": "Unique identifier for each mail piece.",
"type": "string"
},
"scans": {
"description": "Detailed scan information associated with each mail piece.",
"items": {
"$ref": "#/components/schemas/scans"
},
"type": "array"
}
},
"type": "object"
}
]
},
"recipient": {
"description": "The intended recipient, typically a person's or firm's name.",
"maxLength": 500,
"nullable": true,
"type": "string"
},
"recipient_input": {
"allOf": [
{
"anyOf": [
{
"required": [
"city",
"state"
],
"title": "Address object with `city` and `state`"
},
{
"required": [
"zip_code"
],
"title": "Address object with `zip_code`"
}
]
},
{
"properties": {
"city": {
"allOf": [
{
"$ref": "#/components/schemas/city_no_description"
},
{
"description": "The name of the city. `city` and `state` are required if no `zip_code` is passed.",
"type": "string"
}
]
},
"primary_line": {
"$ref": "#/components/schemas/primary_line_us"
},
"recipient": {
"$ref": "#/components/schemas/recipient"
},
"secondary_line": {
"$ref": "#/components/schemas/secondary_line"
},
"state": {
"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.",
"maxLength": 50,
"type": "string"
},
"urbanization": {
"$ref": "#/components/schemas/urbanization"
},
"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"
}
]
}
},
"required": [
"recipient",
"primary_line"
],
"type": "object"
}
]
},
"recipient_validation": {
"properties": {
"confidence": {
"description": "Indicates the likelihood the recipient name and address match based on our custom internal calculation. Possible values are:\n- `high` \u2014 Has a Lob confidence score greater than 70.\n- `medium` \u2014 Has a Lob confidence score between 40 and 70.\n- `low` \u2014 Has a Lob confidence score less than 40.\n- `\"\"` \u2014 No tracking data exists for this address.\n",
"enum": [
"high",
"medium",
"low",
""
],
"type": "string"
},
"id": {
"$ref": "#/components/schemas/identity_validation_id"
},
"last_line": {
"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",
"type": "string"
},
"object": {
"default": "id_validation",
"description": "Value is resource type.",
"enum": [
"id_validation"
],
"type": "string"
},
"primary_line": {
"$ref": "#/components/schemas/primary_line_us"
},
"recipient": {
"$ref": "#/components/schemas/identity_validation_recipient"
},
"score": {
"default": null,
"description": "A numerical score between 0 and 100 that represents the likelihood the provided name is associated with a physical address.\n",
"format": "float",
"maximum": 100,
"minimum": 0,
"nullable": true,
"type": "number"
},
"secondary_line": {
"$ref": "#/components/schemas/secondary_line"
},
"urbanization": {
"$ref": "#/components/schemas/urbanization"
}
},
"type": "object"
},
"redirect_link": {
"description": "The original target URL.",
"type": "string"
},
"registered": {
"allOf": [
{
"properties": {
"address_placement": {
"$ref": "#/components/schemas/address_placement"
},
"color": {
"$ref": "#/components/schemas/color"
},
"custom_envelope": {
"$ref": "#/components/schemas/returned-2"
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"double_sided": {
"$ref": "#/components/schemas/double_sided"
},
"extra_service": {
"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",
"enum": [
"registered"
],
"type": "string"
},
"mail_type": {
"$ref": "#/components/schemas/mail_type"
},
"merge_variables": {
"$ref": "#/components/schemas/merge_variables"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"perforated_page": {
"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>.",
"nullable": true,
"type": "integer"
},
"return_address": {
"$ref": "#/components/schemas/return_address"
},
"return_envelope": {
"$ref": "#/components/schemas/returned-5"
},
"send_date": {
"$ref": "#/components/schemas/send_date"
},
"tracking_events": {
"description": "Tracking events are not populated for registered letters.",
"items": {
"$ref": "#/components/schemas/tracking_event_normal"
},
"maxItems": 0,
"type": "array"
},
"tracking_number": {
"description": "The tracking number will appear here when it becomes available.\nDummy tracking numbers are not created in test mode.",
"nullable": true,
"type": "string"
}
},
"required": [
"extra_service",
"color"
],
"type": "object"
},
{
"$ref": "#/components/schemas/letter_generated_base"
}
]
},
"remote_file_url": {
"description": "The location of a remote file. Remote URLs have a 5 MB file size limit and must be downloaded within 40 seconds.\n",
"pattern": "^https://[-a-zA-Z0-9@:%._+~#=/]{1,256}.(html?|pdf|png|jpg)$",
"type": "string"
},
"required_address_column_mapping": {
"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.",
"example": {
"address_city": "city",
"address_line1": "primary_line",
"address_state": "state",
"address_zip": "zip_code",
"name": "recipient_name"
},
"properties": {
"address_city": {
"default": null,
"description": "The column header from the csv file that should be mapped to the required field `address_city`",
"nullable": true,
"type": "string"
},
"address_line1": {
"default": null,
"description": "The column header from the csv file that should be mapped to the required field `address_line1`",
"nullable": true,
"type": "string"
},
"address_state": {
"default": null,
"description": "The column header from the csv file that should be mapped to the required field `address_state`",
"nullable": true,
"type": "string"
},
"address_zip": {
"default": null,
"description": "The column header from the csv file that should be mapped to the required field `address_zip`",
"nullable": true,
"type": "string"
},
"name": {
"default": null,
"description": "The column header from the csv file that should be mapped to the required field `name`",
"nullable": true,
"type": "string"
}
},
"required": [
"name",
"address_line1",
"address_city",
"address_state",
"address_zip"
],
"title": "Required Address Columns",
"type": "object"
},
"res_prf_id": {
"description": "Unique identifier prefixed with `res_prf_`.",
"pattern": "^res_prf_[a-zA-Z0-9]+$",
"type": "string"
},
"res_prf_resource_type": {
"description": "The type of resource to generate a proof for.",
"enum": [
"postcard",
"letter",
"self_mailer"
],
"type": "string"
},
"res_prf_status": {
"description": "The processing status of the resource proof.",
"enum": [
"processing",
"completed",
"failed"
],
"type": "string"
},
"resource_description": {
"description": "An internal description that identifies this resource. Must be no longer than 255 characters.\n",
"maxLength": 255,
"nullable": true,
"type": "string"
},
"resource_proof": {
"allOf": [
{
"$ref": "#/components/schemas/resource_proof_base"
},
{
"properties": {
"date_created": {
"$ref": "#/components/schemas/date_created"
},
"date_modified": {
"$ref": "#/components/schemas/date_modified"
},
"id": {
"$ref": "#/components/schemas/res_prf_id"
},
"object": {
"default": "resource_proof",
"description": "Value is resource type.",
"type": "string"
}
},
"required": [
"id",
"resource_type",
"status",
"thumbnails",
"errors",
"date_created",
"date_modified",
"object"
],
"type": "object"
}
]
},
"resource_proof_base": {
"properties": {
"errors": {
"description": "Errors encountered during processing.",
"items": {
"$ref": "#/components/schemas/issue_entry"
},
"type": "array"
},
"resource_type": {
"$ref": "#/components/schemas/res_prf_resource_type"
},
"status": {
"$ref": "#/components/schemas/res_prf_status"
},
"template_id": {
"description": "The template ID associated with the resource proof, if any.",
"nullable": true,
"type": "string"
},
"thumbnails": {
"description": "Thumbnail images of the resource proof.",
"items": {
"$ref": "#/components/schemas/thumbnail"
},
"type": "array"
},
"url": {
"description": "A URL to the resource proof PDF.",
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"resource_proof_editable": {
"discriminator": {
"mapping": {
"letter": "#/components/schemas/1",
"postcard": "#/components/schemas/0",
"self_mailer": "#/components/schemas/2"
},
"propertyName": "resource_type"
},
"oneOf": [
{
"properties": {
"resource_parameters": {
"$ref": "#/components/schemas/postcard_resource_parameters"
},
"resource_type": {
"description": "The type of resource to generate a proof for.",
"enum": [
"postcard"
],
"type": "string"
},
"template_id": {
"description": "The template ID to associate with the resource proof.",
"nullable": true,
"type": "string"
}
},
"title": "Postcard Resource Proof",
"type": "object"
},
{
"properties": {
"resource_parameters": {
"$ref": "#/components/schemas/letter_resource_parameters"
},
"resource_type": {
"description": "The type of resource to generate a proof for.",
"enum": [
"letter"
],
"type": "string"
},
"template_id": {
"description": "The template ID to associate with the resource proof.",
"nullable": true,
"type": "string"
}
},
"title": "Letter Resource Proof",
"type": "object"
},
{
"properties": {
"resource_parameters": {
"$ref": "#/components/schemas/self_mailer_resource_parameters"
},
"resource_type": {
"description": "The type of resource to generate a proof for.",
"enum": [
"self_mailer"
],
"type": "string"
},
"template_id": {
"description": "The template ID to associate with the resource proof.",
"nullable": true,
"type": "string"
}
},
"title": "Self Mailer Resource Proof",
"type": "object"
}
],
"required": [
"resource_type",
"resource_parameters"
]
},
"resource_proof_updatable": {
"properties": {
"template_id": {
"description": "The template ID to associate with the resource proof.",
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"response": {
"allOf": [
{
"$ref": "#/components/schemas/common"
},
{
"properties": {
"account_id": {
"description": "Your Lob account id.",
"type": "string"
},
"campaign_code": {
"description": "The campaign code associated with the Informed Delivery campaign.",
"type": "string"
},
"date_created": {
"$ref": "#/components/schemas/date_created"
},
"date_modified": {
"$ref": "#/components/schemas/date_modified"
},
"deleted": {
"description": "Whether the resource has been deleted.",
"type": "boolean"
},
"end_date": {
"description": "A timestamp in ISO 8601 format of the date the campaign ends.",
"format": "date-time",
"type": "string"
},
"end_serial": {
"description": "The last serial number in the range of serial numbers for this campaign.\nOnly non-null when campaign is approved.\n",
"nullable": true,
"type": "integer"
},
"id": {
"$ref": "#/components/schemas/infd_id"
},
"mode": {
"description": "The mode of the Informed Delivery campaign. This is set by the API token you used to create the campaign.",
"enum": [
"live",
"test"
],
"type": "string"
},
"object": {
"description": "Value is the resource type.",
"enum": [
"informed_delivery_campaign"
],
"type": "string"
},
"representative_image_s3_link": {
"description": "A URL link to the campaigns representative image.",
"nullable": true,
"type": "string"
},
"ride_along_image_s3_link": {
"description": "A URL link to the campaigns ride along image.",
"type": "string"
},
"service_request_number": {
"description": "The USPS promotion service request number used to create this campaign (if there was one used).",
"nullable": true,
"type": "string"
},
"start_serial": {
"description": "The first serial number in the range of serial numbers for this campaign.\nOnly non-null when campaign is approved.\n",
"nullable": true,
"type": "integer"
},
"usps_campaign_id": {
"$ref": "#/components/schemas/usps_campaign_id"
}
},
"required": [
"id",
"object",
"account_id",
"quantity",
"usps_campaign_id",
"usps_title",
"start_date",
"end_date",
"start_serial",
"end_serial",
"ride_along_url",
"ride_along_image_s3_link",
"representative_image_s3_link",
"status",
"date_created",
"date_modified",
"mode",
"lob_campaign_id",
"deleted",
"campaign_code",
"brand_name",
"service_request_number"
],
"type": "object"
}
]
},
"return_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.",
"oneOf": [
{
"$ref": "#/components/schemas/adr_id"
},
{
"$ref": "#/components/schemas/inline_address"
}
]
},
"returned": {
"description": "Properties that the postcards in your Creative should have. See the `qr_code` attribute below to add a QR code to your creative.",
"properties": {
"back_original_url": {
"description": "The original URL of the `back` template.",
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"type": "string"
},
"front_original_url": {
"description": "The original URL of the `front` template.",
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"type": "string"
},
"mail_type": {
"$ref": "#/components/schemas/mail_type"
},
"size": {
"$ref": "#/components/schemas/postcard_size"
}
}
},
"returned-2": {
"description": "A nested custom envelope object containing more information about the custom envelope used or `null` if a custom envelope was not used.",
"nullable": true,
"properties": {
"id": {
"description": "The unique identifier of the custom envelope used.",
"maxLength": 40,
"type": "string"
},
"object": {
"default": "envelope",
"enum": [
"envelope"
],
"type": "string"
},
"url": {
"description": "The url of the envelope asset used.",
"type": "string"
}
},
"required": [
"id",
"url",
"object"
],
"type": "object"
},
"returned-3": {
"description": "Properties that the letters in your Creative should have. See the `qr_code` attribute below to add a QR code to your creative.",
"properties": {
"address_placement": {
"$ref": "#/components/schemas/address_placement"
},
"buckslips": {
"description": "A single-element array containing an existing buckslip id in a string format. See [buckslips](#tag/Buckslips) for more information.",
"items": {
"$ref": "#/components/schemas/buckslip_id"
},
"maxItems": 1,
"minItems": 0,
"nullable": true,
"type": "array"
},
"cards": {
"description": "A single-element array containing an existing card id in a string format. See [cards](#tag/Cards) for more information.",
"items": {
"$ref": "#/components/schemas/card_id"
},
"maxItems": 1,
"minItems": 0,
"nullable": true,
"type": "array"
},
"color": {
"$ref": "#/components/schemas/color"
},
"custom_envelope": {
"$ref": "#/components/schemas/returned-2"
},
"double_sided": {
"$ref": "#/components/schemas/double_sided"
},
"extra_service": {
"$ref": "#/components/schemas/extra_service"
},
"file_original_url": {
"description": "The original URL of the `file` template.",
"type": "string"
},
"mail_type": {
"$ref": "#/components/schemas/mail_type"
}
}
},
"returned-4": {
"description": "Properties that the self mailers in your Creative should have. See the `qr_code` attribute below to add a QR code to your creative.",
"properties": {
"inside_original_url": {
"description": "The original URL of the `inside` template.",
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"type": "string"
},
"mail_type": {
"$ref": "#/components/schemas/mail_type"
},
"outside_original_url": {
"description": "The original URL of the `outside` template.",
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"type": "string"
},
"size": {
"$ref": "#/components/schemas/self_mailer_size"
}
}
},
"returned-5": {
"oneOf": [
{
"type": "boolean"
},
{
"type": "object"
}
],
"properties": {
"alias": {
"description": "A quick reference name for the Return Envelope.",
"type": "string"
},
"id": {
"description": "The unique ID of the Return Envelope.",
"type": "string"
},
"object": {
"description": "Value is resource type.",
"type": "string"
},
"url": {
"description": "The url of the return envelope.",
"type": "string"
}
}
},
"returned_resource": {
"oneOf": [
{
"allOf": [
{
"properties": {
"details": {
"$ref": "#/components/schemas/returned"
},
"resource_type": {
"description": "Mailpiece type for the creative",
"enum": [
"postcard"
],
"type": "string"
}
},
"required": [
"resource_type",
"details"
],
"title": "Postcard Creative"
},
{
"$ref": "#/components/schemas/creative_base"
}
]
},
{
"allOf": [
{
"properties": {
"details": {
"$ref": "#/components/schemas/returned-3"
},
"resource_type": {
"description": "Mailpiece type for the creative",
"enum": [
"letter"
],
"type": "string"
}
},
"required": [
"from",
"resource_type",
"details"
],
"title": "Letter Creative"
},
{
"$ref": "#/components/schemas/creative_base"
}
]
},
{
"allOf": [
{
"properties": {
"details": {
"$ref": "#/components/schemas/returned-4"
},
"resource_type": {
"description": "Mailpiece type for the creative",
"enum": [
"self_mailer"
],
"type": "string"
}
},
"required": [
"resource_type",
"details"
],
"title": "Self Mailer Creative"
},
{
"$ref": "#/components/schemas/creative_base"
}
]
}
]
},
"reverse_geocode": {
"properties": {
"addresses": {
"description": "list of addresses\n",
"items": {
"$ref": "#/components/schemas/addresses"
},
"type": "array"
},
"id": {
"$ref": "#/components/schemas/reverse_geocode_id"
},
"object": {
"default": "us_reverse_geocode_lookup",
"description": "Value is resource type.",
"enum": [
"us_reverse_geocode_lookup"
],
"type": "string"
}
},
"type": "object"
},
"reverse_geocode_id": {
"description": "Unique identifier prefixed with `us_reverse_geocode_`.",
"pattern": "^us_reverse_geocode_[a-zA-Z0-9_]+$",
"type": "string"
},
"scans": {
"properties": {
"ip_location": {
"type": "string"
},
"scan_date": {
"type": "string"
}
},
"type": "object"
},
"secondary_line": {
"description": "The secondary delivery line of the address. This field is typically empty but may contain information if `primary_line` is too long.\n",
"maxLength": 200,
"type": "string"
},
"self_mailer": {
"allOf": [
{
"$ref": "#/components/schemas/self_mailer_base"
},
{
"$ref": "#/components/schemas/generated"
},
{
"$ref": "#/components/schemas/from_us"
},
{
"properties": {
"campaign_id": {
"$ref": "#/components/schemas/campaign_id"
},
"failure_reason": {
"allOf": [
{
"$ref": "#/components/schemas/failure_reason"
},
{
"nullable": true
}
]
},
"fsc": {
"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.",
"type": "boolean"
},
"id": {
"$ref": "#/components/schemas/sfm_id"
},
"inside_template_id": {
"allOf": [
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"nullable": true,
"type": "string"
}
],
"description": "The unique ID of the HTML template used for the inside of the self mailer."
},
"inside_template_version_id": {
"allOf": [
{
"$ref": "#/components/schemas/vrsn_id"
},
{
"nullable": true,
"type": "string"
}
],
"description": "The unique ID of the specific version of the HTML template used for the inside of the self mailer."
},
"object": {
"default": "self_mailer",
"description": "Value is resource type.",
"enum": [
"self_mailer"
],
"type": "string"
},
"outside_template_id": {
"allOf": [
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"nullable": true,
"type": "string"
}
],
"description": "The unique ID of the HTML template used for the outside of the self mailer."
},
"outside_template_version_id": {
"allOf": [
{
"$ref": "#/components/schemas/vrsn_id"
},
{
"nullable": true,
"type": "string"
}
],
"description": "The unique ID of the specific version of the HTML template used for the outside of the self mailer."
},
"status": {
"$ref": "#/components/schemas/status"
},
"tracking_events": {
"description": "An array of certified tracking events ordered by ascending `time`. Not populated in test mode.",
"items": {
"$ref": "#/components/schemas/tracking_event_certified"
},
"type": "array"
},
"url": {
"$ref": "#/components/schemas/signed_link"
},
"use_type": {
"$ref": "#/components/schemas/sfm_use_type"
}
},
"required": [
"id",
"url",
"use_type"
],
"type": "object"
}
]
},
"self_mailer_base": {
"allOf": [
{
"$ref": "#/components/schemas/editable"
},
{
"properties": {
"size": {
"$ref": "#/components/schemas/self_mailer_size"
}
},
"type": "object"
}
]
},
"self_mailer_deletion": {
"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.",
"properties": {
"deleted": {
"$ref": "#/components/schemas/deleted"
},
"id": {
"$ref": "#/components/schemas/sfm_id"
}
}
},
"self_mailer_editable": {
"allOf": [
{
"$ref": "#/components/schemas/self_mailer_base"
},
{
"$ref": "#/components/schemas/input_to"
},
{
"$ref": "#/components/schemas/input_from_us"
},
{
"properties": {
"billing_group_id": {
"$ref": "#/components/schemas/billing_group_id"
},
"fsc": {
"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.",
"type": "boolean"
},
"inside": {
"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",
"oneOf": [
{
"$ref": "#/components/schemas/html_string"
},
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"$ref": "#/components/schemas/remote_file_url"
},
{
"$ref": "#/components/schemas/local_file_path"
}
]
},
"outside": {
"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",
"oneOf": [
{
"$ref": "#/components/schemas/html_string"
},
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"$ref": "#/components/schemas/remote_file_url"
},
{
"$ref": "#/components/schemas/local_file_path"
}
]
},
"print_speed": {
"$ref": "#/components/schemas/print_speed"
},
"qr_code": {
"$ref": "#/components/schemas/qr_code"
},
"use_type": {
"$ref": "#/components/schemas/sfm_use_type"
}
},
"required": [
"to",
"inside",
"outside",
"use_type"
],
"type": "object"
}
]
},
"self_mailer_resource_parameters": {
"allOf": [
{
"$ref": "#/components/schemas/input_to"
},
{
"$ref": "#/components/schemas/input_from_us"
},
{
"properties": {
"inside": {
"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",
"oneOf": [
{
"$ref": "#/components/schemas/html_string"
},
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"$ref": "#/components/schemas/remote_file_url"
},
{
"$ref": "#/components/schemas/local_file_path"
}
]
},
"merge_variables": {
"$ref": "#/components/schemas/merge_variables"
},
"outside": {
"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",
"oneOf": [
{
"$ref": "#/components/schemas/html_string"
},
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"$ref": "#/components/schemas/remote_file_url"
},
{
"$ref": "#/components/schemas/local_file_path"
}
]
},
"size": {
"$ref": "#/components/schemas/self_mailer_size"
}
},
"required": [
"to",
"inside",
"outside"
],
"type": "object"
}
]
},
"self_mailer_size": {
"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.",
"enum": [
"6x18_bifold",
"11x9_bifold",
"12x9_bifold",
"17.75x9_trifold"
],
"type": "string"
},
"self_mailer_types": {
"description": "Unique identifier referring to status of self mailer",
"enum": [
"self_mailer.created",
"self_mailer.rejected",
"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"
},
"send_date": {
"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.",
"type": "string"
},
"sfm_id": {
"description": "Unique identifier prefixed with `sfm_`.",
"pattern": "^sfm_[a-zA-Z0-9]+$",
"type": "string"
},
"sfm_use_type": {
"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).",
"enum": [
"marketing",
"operational",
null
],
"nullable": true,
"type": "string"
},
"signed_link": {
"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.",
"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-_]+",
"type": "string"
},
"single_line_address": {
"properties": {
"address": {
"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",
"maxLength": 500,
"type": "string"
}
},
"required": [
"address"
],
"type": "object"
},
"single_line_address_intl": {
"properties": {
"address": {
"description": "The entire address in one string (e.g., \"370 Water St C1N 1C4\").\n",
"maxLength": 500,
"type": "string"
},
"country": {
"$ref": "#/components/schemas/country_extended"
}
},
"required": [
"address",
"country"
],
"type": "object"
},
"snap_pack": {
"allOf": [
{
"$ref": "#/components/schemas/snap_pack_base"
},
{
"$ref": "#/components/schemas/generated"
},
{
"$ref": "#/components/schemas/from_us"
},
{
"properties": {
"campaign_id": {
"$ref": "#/components/schemas/campaign_id"
},
"color": {
"$ref": "#/components/schemas/color"
},
"failure_reason": {
"allOf": [
{
"$ref": "#/components/schemas/failure_reason"
},
{
"nullable": true
}
]
},
"fsc": {
"default": false,
"description": "Contact support@lob.com or your account contact to learn more. Not available for snap_pack currently.",
"type": "boolean"
},
"id": {
"$ref": "#/components/schemas/snap_pack_id"
},
"inside_template_id": {
"allOf": [
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"nullable": true,
"type": "string"
}
],
"description": "The unique ID of the HTML template used for the inside of the snap pack."
},
"inside_template_version_id": {
"allOf": [
{
"$ref": "#/components/schemas/vrsn_id"
},
{
"nullable": true,
"type": "string"
}
],
"description": "The unique ID of the specific version of the HTML template used for the inside of the snap pack."
},
"object": {
"default": "snap_pack",
"description": "Value is resource type.",
"enum": [
"snap_pack"
],
"type": "string"
},
"outside_template_id": {
"allOf": [
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"nullable": true,
"type": "string"
}
],
"description": "The unique ID of the HTML template used for the outside of the snap pack."
},
"outside_template_version_id": {
"allOf": [
{
"$ref": "#/components/schemas/vrsn_id"
},
{
"nullable": true,
"type": "string"
}
],
"description": "The unique ID of the specific version of the HTML template used for the outside of the snap pack."
},
"status": {
"$ref": "#/components/schemas/status"
},
"tracking_events": {
"description": "An array of tracking events ordered by ascending `time`. Not populated in test mode.",
"items": {
"$ref": "#/components/schemas/tracking_event_normal"
},
"type": "array"
},
"url": {
"$ref": "#/components/schemas/signed_link"
},
"use_type": {
"$ref": "#/components/schemas/snap_pack_use_type"
}
},
"required": [
"id",
"url",
"use_type"
],
"type": "object"
}
]
},
"snap_pack_base": {
"allOf": [
{
"$ref": "#/components/schemas/editable"
},
{
"properties": {
"size": {
"$ref": "#/components/schemas/snap_pack_size"
}
},
"type": "object"
}
]
},
"snap_pack_deletion": {
"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.",
"properties": {
"deleted": {
"$ref": "#/components/schemas/deleted"
},
"id": {
"$ref": "#/components/schemas/snap_pack_id"
}
}
},
"snap_pack_editable": {
"allOf": [
{
"$ref": "#/components/schemas/snap_pack_base"
},
{
"$ref": "#/components/schemas/input_to"
},
{
"$ref": "#/components/schemas/input_from_us"
},
{
"properties": {
"billing_group_id": {
"$ref": "#/components/schemas/billing_group_id"
},
"color": {
"allOf": [
{
"$ref": "#/components/schemas/color"
},
{
"default": false
}
]
},
"inside": {
"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",
"oneOf": [
{
"$ref": "#/components/schemas/html_string"
},
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"$ref": "#/components/schemas/remote_file_url"
},
{
"$ref": "#/components/schemas/local_file_path"
}
]
},
"outside": {
"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",
"oneOf": [
{
"$ref": "#/components/schemas/html_string"
},
{
"$ref": "#/components/schemas/tmpl_id"
},
{
"$ref": "#/components/schemas/remote_file_url"
},
{
"$ref": "#/components/schemas/local_file_path"
}
]
},
"print_speed": {
"$ref": "#/components/schemas/print_speed"
},
"qr_code": {
"$ref": "#/components/schemas/qr_code"
},
"use_type": {
"$ref": "#/components/schemas/snap_pack_use_type"
}
},
"required": [
"to",
"inside",
"outside",
"use_type"
],
"type": "object"
}
]
},
"snap_pack_id": {
"description": "Unique identifier prefixed with `ord_`.",
"pattern": "^ord_[0-9a-f]{26}$",
"type": "string"
},
"snap_pack_size": {
"default": "8.5x11",
"description": "Specifies the size of the snap pack.",
"enum": [
"8.5x11"
],
"type": "string"
},
"snap_pack_use_type": {
"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).",
"enum": [
"marketing",
"operational",
null
],
"nullable": true,
"type": "string"
},
"state": {
"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",
"maxLength": 2,
"type": "string"
},
"status": {
"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",
"enum": [
"processed",
"rendered",
"failed"
],
"type": "string"
},
"street_name": {
"description": "The name of the street.",
"type": "string"
},
"suggestions": {
"properties": {
"city": {
"$ref": "#/components/schemas/city"
},
"object": {
"default": "us_autocompletion",
"description": "Value is resource type.",
"enum": [
"us_autocompletion"
],
"type": "string"
},
"primary_line": {
"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",
"type": "string"
},
"state": {
"$ref": "#/components/schemas/state"
},
"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"
}
]
}
},
"required": [
"primary_line",
"city",
"state",
"zip_code"
],
"type": "object"
},
"template": {
"properties": {
"date_created": {
"$ref": "#/components/schemas/date_created"
},
"date_modified": {
"$ref": "#/components/schemas/date_modified"
},
"deleted": {
"$ref": "#/components/schemas/deleted"
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"id": {
"$ref": "#/components/schemas/tmpl_id"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"object": {
"default": "template",
"description": "Value is resource type.",
"enum": [
"template"
],
"type": "string"
},
"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"
}
]
},
"versions": {
"description": "An array of all non-deleted [version objects](#tag/Template-Versions) associated with the template.",
"items": {
"$ref": "#/components/schemas/template_version"
},
"type": "array"
}
},
"required": [
"id",
"versions",
"published_version"
],
"type": "object"
},
"template_deletion": {
"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.",
"properties": {
"deleted": {
"$ref": "#/components/schemas/deleted"
},
"id": {
"$ref": "#/components/schemas/tmpl_id"
}
}
},
"template_html": {
"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",
"maxLength": 100000,
"type": "string"
},
"template_required_vars": {
"description": "An array of required variables to be used in a template. Only available for `handlebars` templates.\n",
"items": {
"type": "string"
},
"type": "array"
},
"template_update": {
"properties": {
"description": {
"$ref": "#/components/schemas/resource_description"
},
"published_version": {
"allOf": [
{
"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.",
"type": "string"
},
{
"$ref": "#/components/schemas/vrsn_id"
}
]
}
},
"type": "object"
},
"template_version": {
"allOf": [
{
"$ref": "#/components/schemas/template_version_writable"
},
{
"$ref": "#/components/schemas/lob_base"
},
{
"properties": {
"id": {
"$ref": "#/components/schemas/vrsn_id"
},
"merge_variables": {
"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",
"type": "object"
},
"object": {
"default": "version",
"description": "Value is resource type.",
"enum": [
"version"
],
"type": "string"
},
"suggest_json_editor": {
"description": "Used by frontend, true if the template uses advanced features.\n",
"type": "boolean"
}
},
"required": [
"id"
],
"type": "object"
}
]
},
"template_version_deletion": {
"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.",
"properties": {
"deleted": {
"$ref": "#/components/schemas/deleted"
},
"id": {
"$ref": "#/components/schemas/vrsn_id"
}
}
},
"template_version_updatable": {
"properties": {
"description": {
"$ref": "#/components/schemas/resource_description"
},
"engine": {
"$ref": "#/components/schemas/engine"
},
"required_vars": {
"$ref": "#/components/schemas/template_required_vars"
}
},
"type": "object"
},
"template_version_writable": {
"properties": {
"description": {
"$ref": "#/components/schemas/resource_description"
},
"engine": {
"$ref": "#/components/schemas/engine"
},
"html": {
"$ref": "#/components/schemas/template_html"
},
"required_vars": {
"$ref": "#/components/schemas/template_required_vars"
}
},
"required": [
"html"
],
"type": "object"
},
"template_writable": {
"properties": {
"description": {
"$ref": "#/components/schemas/resource_description"
},
"engine": {
"$ref": "#/components/schemas/engine"
},
"html": {
"$ref": "#/components/schemas/template_html"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"required_vars": {
"$ref": "#/components/schemas/template_required_vars"
}
},
"required": [
"html"
],
"type": "object"
},
"thumbnail": {
"properties": {
"large": {
"$ref": "#/components/schemas/signed_link"
},
"medium": {
"$ref": "#/components/schemas/signed_link"
},
"small": {
"$ref": "#/components/schemas/signed_link"
}
},
"type": "object"
},
"tmpl_id": {
"description": "Unique identifier prefixed with `tmpl_`. ID of a saved [HTML template](#section/HTML-Templates).",
"pattern": "^tmpl_[a-zA-Z0-9]+$",
"type": "string"
},
"to_address_us_chk": {
"allOf": [
{
"$ref": "#/components/schemas/lob_base"
},
{
"anyOf": [
{
"required": [
"name"
],
"title": "address obj with `name` defined"
},
{
"required": [
"company"
],
"title": "address obj with `company` defined"
}
],
"example": {
"address_city": "SAN FRANCISCO",
"address_country": "UNITED STATES",
"address_line1": "210 KING ST STE 6100",
"address_line2": null,
"address_state": "CA",
"address_zip": "94107-1741",
"company": "LOB",
"date_created": "2019-08-12T00:16:00.361Z",
"date_modified": "2019-08-12T00:16:00.361Z",
"description": "Harry - Office",
"email": "harry@lob.com",
"id": "adr_e68217bd744d65c8",
"metadata": {},
"name": "HARRY ZHANG",
"object": "address",
"phone": "5555555555",
"recipient_moved": false
},
"properties": {
"address_city": {
"maxLength": 200,
"type": "string"
},
"address_country": {
"description": "Full name of country",
"enum": [
"UNITED STATES"
],
"maxLength": 13,
"minLength": 13,
"type": "string"
},
"address_line1": {
"description": "The primary number, street name, and directional information.",
"maxLength": 50,
"type": "string"
},
"address_line2": {
"description": "An optional field containing any information which can't fit into line 1.",
"maxLength": 50,
"nullable": true,
"type": "string"
},
"address_state": {
"description": "2 letter state short-name code",
"pattern": "^[a-zA-Z]{2}$",
"type": "string"
},
"address_zip": {
"description": "Must follow the ZIP format of `12345` or ZIP+4 format of `12345-1234`.\n",
"pattern": "^\\d{5}(-\\d{4})?$",
"type": "string"
},
"company": {
"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",
"maxLength": 40,
"nullable": true,
"type": "string"
},
"description": {
"$ref": "#/components/schemas/resource_description"
},
"email": {
"description": "Must be no longer than 100 characters.",
"maxLength": 100,
"nullable": true,
"type": "string"
},
"id": {
"$ref": "#/components/schemas/adr_id"
},
"metadata": {
"$ref": "#/components/schemas/metadata"
},
"name": {
"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",
"maxLength": 40,
"nullable": true,
"type": "string"
},
"object": {
"default": "address",
"description": "Value is resource type.",
"enum": [
"address"
],
"type": "string"
},
"phone": {
"description": "Must be no longer than 40 characters.",
"maxLength": 40,
"nullable": true,
"type": "string"
},
"recipient_moved": {
"description": "Only returned for accounts on certain <a href=\"https://dashboard.lob.com/#/settings/editions\" target=\"_blank\">Print &amp; 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",
"nullable": true,
"type": "boolean"
}
},
"required": [
"id",
"address_line1",
"address_city",
"address_state",
"address_zip"
],
"type": "object"
}
]
},
"tracking_event_base": {
"description": "As mail pieces travel through the mail stream, USPS scans their unique barcodes, and Lob processes these mail scans to generate tracking events.",
"properties": {
"date_created": {
"$ref": "#/components/schemas/date_created"
},
"date_modified": {
"$ref": "#/components/schemas/date_modified"
},
"id": {
"$ref": "#/components/schemas/evnt_id"
},
"object": {
"allOf": [
{
"$ref": "#/components/schemas/object"
},
{
"default": "tracking_event",
"enum": [
"tracking_event"
],
"type": "string"
}
]
},
"time": {
"description": "A timestamp in ISO 8601 format of the date USPS registered the event.",
"format": "date-time",
"type": "string"
}
},
"required": [
"id",
"date_created",
"date_modified",
"object"
],
"type": "object"
},
"tracking_event_certified": {
"allOf": [
{
"$ref": "#/components/schemas/tracking_event_base"
},
{
"properties": {
"details": {
"$ref": "#/components/schemas/tracking_event_details"
},
"location": {
"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",
"nullable": true,
"type": "string"
},
"name": {
"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",
"enum": [
"Mailed",
"In Transit",
"In Local Area",
"Processed for Delivery",
"Pickup Available",
"Delivered",
"Re-Routed",
"Returned to Sender",
"Issue"
],
"type": "string"
},
"type": {
"description": "a Certified letter tracking event",
"enum": [
"certified"
],
"type": "string"
}
},
"required": [
"type",
"name"
],
"type": "object"
}
]
},
"tracking_event_details": {
"properties": {
"action_required": {
"description": "`true` if action is required by the end recipient, `false` otherwise.\n",
"type": "boolean"
},
"description": {
"description": "The description as listed in the description for event.",
"type": "string"
},
"event": {
"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",
"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"
},
"notes": {
"description": "Event-specific notes from USPS about the tracking event.",
"type": "string"
}
},
"required": [
"event",
"description",
"action_required"
],
"type": "object"
},
"tracking_event_normal": {
"allOf": [
{
"$ref": "#/components/schemas/tracking_event_base"
},
{
"properties": {
"details": {
"description": "Will be `null` for `type=normal` events",
"enum": [
null
],
"nullable": true,
"type": "object"
},
"location": {
"description": "The zip code in which the scan event occurred. Null for `Mailed` events.\n",
"nullable": true,
"type": "string"
},
"name": {
"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\u2019s 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",
"enum": [
"Mailed",
"In Transit",
"In Local Area",
"Processed for Delivery",
"Delivered",
"Re-Routed",
"Returned to Sender",
"International Exit"
],
"type": "string"
},
"type": {
"description": "non-Certified postcards, self mailers, letters, checks and snap packs",
"enum": [
"normal"
],
"type": "string"
}
},
"required": [
"type",
"name"
],
"type": "object"
}
]
},
"update": {
"allOf": [
{
"$ref": "#/components/schemas/writable_base"
},
{
"properties": {
"status": {
"description": "After setting an Informed Delivery campaign to \u201capproved\u201d said campaign will activate, and you can start sending mail using it.\nYou will no longer be able to edit an Informed Delivery campaign in this status.\n",
"enum": [
"approved"
],
"type": "string"
}
},
"type": "object"
}
]
},
"upl_id": {
"description": "Unique identifier prefixed with `upl_`.",
"pattern": "^upl_[a-zA-Z0-9]+$",
"type": "string"
},
"upload": {
"allOf": [
{
"$ref": "#/components/schemas/upload_writable"
},
{
"properties": {
"accountId": {
"description": "Account ID that made the request",
"example": "fa9ea650fc7b31a89f92",
"title": "Account ID",
"type": "string"
},
"bytesProcessed": {
"description": "Number of bytes processed in your CSV",
"example": 17268,
"title": "Bytes Processed",
"type": "integer"
},
"dateCreated": {
"description": "A timestamp in ISO 8601 format of the date the upload was created",
"format": "date-time",
"title": "Date Created",
"type": "string"
},
"dateModified": {
"description": "A timestamp in ISO 8601 format of the date the upload was last modified",
"format": "date-time",
"title": "Date Modified",
"type": "string"
},
"failedMailpieces": {
"description": "Number of mailpieces that failed to create",
"example": 5,
"title": "Failed Mailpieces",
"type": "integer"
},
"failuresUrl": {
"description": "Url where your campaign mailpiece failures can be retrieved",
"example": "https://www.example.com",
"title": "Failures URL",
"type": "string"
},
"id": {
"$ref": "#/components/schemas/upl_id"
},
"mode": {
"description": "The environment in which the mailpieces were created. Today, will only be `live`.",
"enum": [
"test",
"live"
],
"type": "string"
},
"originalFilename": {
"description": "Filename of the upload",
"example": "my_audience.csv",
"title": "Original Filename",
"type": "string"
},
"state": {
"$ref": "#/components/schemas/upload_state"
},
"totalMailpieces": {
"description": "Total number of recipients for the campaign",
"example": 100,
"title": "Total Mailpieces",
"type": "integer"
},
"validatedMailpieces": {
"description": "Number of mailpieces that were successfully created",
"example": 95,
"title": "Validated Mailpieces",
"type": "integer"
}
},
"required": [
"id",
"accountId",
"campaignId",
"requiredAddressColumnMapping",
"optionalAddressColumnMapping",
"metadata",
"mergeVariableColumnMapping",
"mode",
"state",
"totalMailpieces",
"failedMailpieces",
"validatedMailpieces",
"bytesProcessed",
"dateCreated",
"dateModified"
],
"type": "object"
}
]
},
"upload_create_export": {
"properties": {
"exportId": {
"example": "ex_2dafd758ed3da9c43",
"title": "Export ID",
"type": "string"
},
"message": {
"default": "Export is processing",
"enum": [
"Export is processing"
],
"title": "Message",
"type": "string"
}
},
"required": [
"message",
"exportId"
],
"type": "object"
},
"upload_file": {
"properties": {
"filename": {
"title": "Filename",
"type": "string"
},
"message": {
"default": "File uploaded successfully",
"enum": [
"File uploaded successfully"
],
"title": "Message",
"type": "string"
}
},
"required": [
"message",
"filename"
],
"type": "object"
},
"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).",
"enum": [
"Preprocessing",
"Draft",
"Ready for Validation",
"Validating",
"Scheduled",
"Cancelled",
"Errored"
],
"title": "Upload State",
"type": "string"
},
"upload_updatable": {
"properties": {
"mergeVariableColumnMapping": {
"$ref": "#/components/schemas/merge_variable_column_mapping"
},
"metadata": {
"$ref": "#/components/schemas/uploads_metadata"
},
"optionalAddressColumnMapping": {
"$ref": "#/components/schemas/optional_address_column_mapping"
},
"originalFilename": {
"description": "Original filename provided when the upload is created.",
"title": "Original Filename",
"type": "string"
},
"requiredAddressColumnMapping": {
"$ref": "#/components/schemas/required_address_column_mapping"
}
},
"type": "object"
},
"upload_writable": {
"properties": {
"campaignId": {
"allOf": [
{
"$ref": "#/components/schemas/cmp_id"
},
{
"description": "Associated Campaign ID",
"example": "cmp_1933ad629bae1408",
"type": "string"
}
]
},
"mergeVariableColumnMapping": {
"$ref": "#/components/schemas/merge_variable_column_mapping",
"description": "test"
},
"metadata": {
"$ref": "#/components/schemas/uploads_metadata"
},
"optionalAddressColumnMapping": {
"$ref": "#/components/schemas/optional_address_column_mapping"
},
"requiredAddressColumnMapping": {
"$ref": "#/components/schemas/required_address_column_mapping"
}
},
"required": [
"campaignId"
],
"type": "object"
},
"uploads_metadata": {
"default": {
"columns": []
},
"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.",
"example": {
"columns": [
"recipient_name"
]
},
"properties": {
"columns": {
"default": [],
"description": "The list of column names from the csv file which you want associated with each of your mailpieces",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"columns"
],
"title": "Metadata",
"type": "object"
},
"urbanization": {
"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",
"maxLength": 200,
"type": "string"
},
"us_auto_id": {
"description": "Unique identifier prefixed with `us_auto_`.",
"pattern": "^us_auto_[a-zA-Z0-9]+$",
"type": "string"
},
"us_autocompletions": {
"properties": {
"id": {
"$ref": "#/components/schemas/us_auto_id"
},
"object": {
"default": "us_autocompletion",
"description": "Value is resource type.",
"enum": [
"us_autocompletion"
],
"type": "string"
},
"suggestions": {
"description": "An array of objects representing suggested addresses.\n",
"items": {
"$ref": "#/components/schemas/suggestions"
},
"maxItems": 10,
"minItems": 0,
"type": "array"
}
},
"type": "object"
},
"us_autocompletions_writable": {
"properties": {
"address_prefix": {
"description": "Only accepts numbers and street names in an alphanumeric format.\n",
"type": "string"
},
"city": {
"description": "An optional city input used to filter suggestions. Case insensitive and does not match partial abbreviations.\n",
"type": "string"
},
"geo_ip_sort": {
"description": "If `true`, sort suggestions by proximity to the IP set in the `X-Forwarded-For` header.\n",
"type": "boolean"
},
"state": {
"description": "An optional state input used to filter suggestions. Case insensitive and does not match partial abbreviations.\n",
"type": "string"
},
"zip_code": {
"description": "An optional ZIP Code input used to filter suggestions. Matches partial entries.\n",
"type": "string"
}
},
"required": [
"address_prefix"
],
"type": "object"
},
"us_components": {
"description": "A nested object containing a breakdown of each component of an address.",
"properties": {
"address_type": {
"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` \u2013\u2013 The address is residential or a PO Box.\n* `commercial` \u2013\u2013 The address is commercial.\n* `''` \u2013\u2013 Not enough information provided to be determined.\n",
"enum": [
"residential",
"commercial",
""
],
"type": "string"
},
"carrier_route": {
"description": "A 4-character code assigned to a mail delivery route within a ZIP code.\n",
"type": "string"
},
"carrier_route_type": {
"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",
"enum": [
"city_delivery",
"rural_route",
"highway_contract",
"po_box",
"general_delivery"
],
"type": "string"
},
"city": {
"$ref": "#/components/schemas/city"
},
"county": {
"$ref": "#/components/schemas/county"
},
"county_fips": {
"$ref": "#/components/schemas/county_fips"
},
"default_building_address": {
"description": "Designates whether or not the address is the default address for a building containing multiple delivery points.\n",
"type": "boolean"
},
"delivery_point_barcode": {
"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",
"type": "string"
},
"extra_secondary_designator": {
"description": "An extra (often unnecessary) secondary designator provided with the input address.\n",
"type": "string"
},
"extra_secondary_number": {
"description": "An extra (often unnecessary) secondary number provided with the input address.\n",
"type": "string"
},
"latitude": {
"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",
"format": "float",
"nullable": true,
"type": "number"
},
"longitude": {
"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",
"format": "float",
"nullable": true,
"type": "number"
},
"pmb_designator": {
"description": "Designator of a <a href=\"https://en.wikipedia.org/wiki/Commercial_mail_receiving_agency\" target=\"_blank\">CMRA-authorized</a> private mailbox.\n",
"type": "string"
},
"pmb_number": {
"description": "Number of a <a href=\"https://en.wikipedia.org/wiki/Commercial_mail_receiving_agency\" target=\"_blank\">CMRA-authorized</a> private mailbox.\n",
"type": "string"
},
"po_box_only_flag": {
"description": "Indicates the mailing facility for an address only supports PO Box deliveries and other forms of mail delivery are not available.\n",
"enum": [
"Y",
"N",
""
],
"type": "string"
},
"primary_number": {
"$ref": "#/components/schemas/primary_number"
},
"record_type": {
"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",
"enum": [
"street",
"highrise",
"firm",
"po_box",
"rural_route",
"general_delivery",
""
],
"type": "string"
},
"secondary_designator": {
"description": "The standard USPS abbreviation describing the `components[secondary_number]` (`STE`, `APT`, `BLDG`, etc).\n",
"type": "string"
},
"secondary_number": {
"description": "Number of the apartment/unit/etc.\n",
"type": "string"
},
"state": {
"$ref": "#/components/schemas/state"
},
"street_name": {
"$ref": "#/components/schemas/street_name"
},
"street_postdirection": {
"description": "Geographic direction following a street name (`N`, `S`, `E`, `W`, `NE`, `SW`, `SE`, `NW`).\n",
"enum": [
"N",
"S",
"E",
"W",
"NE",
"SW",
"SE",
"NW",
""
],
"type": "string"
},
"street_predirection": {
"description": "Geographic direction preceding a street name (`N`, `S`, `E`, `W`, `NE`, `SW`, `SE`, `NW`).\n",
"enum": [
"N",
"S",
"E",
"W",
"NE",
"SW",
"SE",
"NW",
""
],
"type": "string"
},
"street_suffix": {
"description": "The standard USPS abbreviation for the street suffix (`ST`, `AVE`, `BLVD`, etc).\n",
"type": "string"
},
"zip_code": {
"description": "The 5-digit ZIP code",
"pattern": "^\\d{5}$",
"type": "string"
},
"zip_code_plus_4": {
"allOf": [
{
"description": "The 4-digit ZIP add-on code"
},
{
"$ref": "#/components/schemas/zip_code_plus_4"
}
]
},
"zip_code_type": {
"$ref": "#/components/schemas/zip_code_type"
}
},
"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"
],
"type": "object"
},
"us_ver_id": {
"description": "Unique identifier prefixed with `us_ver_`.",
"pattern": "^us_ver_[a-zA-Z0-9_]+$",
"type": "string"
},
"us_verification": {
"properties": {
"components": {
"$ref": "#/components/schemas/us_components"
},
"deliverability": {
"description": "Summarizes the deliverability of the `us_verification` object.\nFor full details, see the `deliverability_analysis` field. Possible values are:\n* `deliverable` \u2013 The address is deliverable by the USPS.\n* `deliverable_unnecessary_unit` \u2013 The address is deliverable, but the secondary unit information is unnecessary.\n* `deliverable_incorrect_unit` \u2013 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` \u2013 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` \u2013 The address is not deliverable according to the USPS.\n",
"enum": [
"deliverable",
"deliverable_unnecessary_unit",
"deliverable_incorrect_unit",
"deliverable_missing_unit",
"undeliverable"
],
"type": "string"
},
"deliverability_analysis": {
"$ref": "#/components/schemas/deliverability_analysis"
},
"id": {
"$ref": "#/components/schemas/us_ver_id"
},
"last_line": {
"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",
"type": "string"
},
"lob_confidence_score": {
"$ref": "#/components/schemas/lob_confidence_score"
},
"object": {
"default": "us_verification",
"description": "Value is resource type.",
"enum": [
"us_verification"
],
"type": "string"
},
"primary_line": {
"$ref": "#/components/schemas/primary_line_us"
},
"recipient": {
"$ref": "#/components/schemas/recipient"
},
"secondary_line": {
"$ref": "#/components/schemas/secondary_line"
},
"urbanization": {
"$ref": "#/components/schemas/urbanization"
},
"valid_address": {
"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",
"enum": [
true,
false
],
"type": "boolean"
}
},
"type": "object"
},
"us_verifications": {
"properties": {
"addresses": {
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/us_verification"
},
{
"$ref": "#/components/schemas/error"
}
]
},
"type": "array"
},
"errors": {
"description": "Indicates whether any errors occurred during the verification process.",
"type": "boolean"
}
},
"required": [
"addresses",
"errors"
],
"type": "object"
},
"us_verifications_writable": {
"oneOf": [
{
"$ref": "#/components/schemas/multiple_components"
},
{
"$ref": "#/components/schemas/single_line_address"
}
]
},
"user_provided": {
"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.",
"nullable": true,
"pattern": "^env_[a-zA-Z0-9]+$",
"type": "string"
},
"user_provided-2": {
"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.",
"oneOf": [
{
"type": "boolean"
},
{
"type": "string"
}
]
},
"usps_campaign_id": {
"description": "A numberical string up to 12 characters long.",
"example": "1200772869",
"pattern": "^[0-9]+$",
"type": "string"
},
"vrsn_id": {
"description": "Unique identifier prefixed with `vrsn_`.",
"pattern": "^vrsn_[a-zA-Z0-9]+$",
"type": "string"
},
"writable": {
"description": "Properties that the postcards in your Creative should have. See the `qr_code` attribute below to add a QR code to your creative.",
"properties": {
"mail_type": {
"$ref": "#/components/schemas/mail_type"
},
"qr_code": {
"$ref": "#/components/schemas/qr_code_campaigns"
},
"size": {
"$ref": "#/components/schemas/postcard_size"
}
},
"required": [
"color"
]
},
"writable-2": {
"description": "Properties that the letters in your Creative should have. See the `qr_code` attribute below to add a QR code to your creative.",
"properties": {
"add_on_types": {
"description": "An array containing the types of add-ons for the Letter Creative.",
"items": {
"$ref": "#/components/schemas/letter_add_on_types"
},
"maxItems": 3,
"minItems": 0,
"nullable": true,
"type": "array"
},
"address_placement": {
"$ref": "#/components/schemas/address_placement"
},
"buckslips": {
"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.",
"items": {
"$ref": "#/components/schemas/buckslip_id"
},
"maxItems": 1,
"minItems": 0,
"nullable": true,
"type": "array"
},
"cards": {
"description": "A single-element array containing an existing card id in a string format. See [cards](#tag/Cards) for more information.",
"items": {
"$ref": "#/components/schemas/card_id"
},
"maxItems": 1,
"minItems": 0,
"nullable": true,
"type": "array"
},
"color": {
"$ref": "#/components/schemas/color"
},
"custom_envelope": {
"$ref": "#/components/schemas/user_provided"
},
"double_sided": {
"$ref": "#/components/schemas/double_sided"
},
"extra_service": {
"$ref": "#/components/schemas/extra_service"
},
"mail_type": {
"$ref": "#/components/schemas/mail_type"
},
"qr_code": {
"$ref": "#/components/schemas/qr_code_campaigns"
}
},
"required": [
"color"
]
},
"writable-3": {
"description": "Properties that the self mailers in your Creative should have. See the `qr_code` attribute below to add a QR code to your creative.",
"properties": {
"mail_type": {
"$ref": "#/components/schemas/mail_type"
},
"qr_code": {
"$ref": "#/components/schemas/qr_code_campaigns"
},
"size": {
"$ref": "#/components/schemas/self_mailer_size"
}
},
"required": [
"color"
]
},
"writable_base": {
"allOf": [
{
"$ref": "#/components/schemas/common"
},
{
"properties": {
"representative_image": {
"description": "JPG Image. Maximum file size is 200 KBs. Maximum pixel size is 300 pixels wide x 200 pixels high",
"type": "object"
},
"ride_along_image": {
"description": "JPG Image. Maximum file size is 200 KBs. Maximum pixel size is 300 pixels wide x 200 pixels high",
"type": "object"
}
},
"type": "object"
}
]
},
"zip": {
"allOf": [
{
"$ref": "#/components/schemas/zip5"
},
{
"properties": {
"cities": {
"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",
"items": {
"$ref": "#/components/schemas/zip_lookup_city"
},
"type": "array"
},
"id": {
"$ref": "#/components/schemas/zip_id"
},
"object": {
"default": "us_zip_lookup",
"description": "Value is resource type.",
"enum": [
"us_zip_lookup"
],
"type": "string"
},
"zip_code_type": {
"$ref": "#/components/schemas/zip_code_type"
}
},
"required": [
"id",
"cities",
"zip_code_type",
"object"
],
"type": "object"
}
]
},
"zip5": {
"properties": {
"zip_code": {
"description": "A 5-digit ZIP code.",
"example": "94107",
"pattern": "^\\d{5}$",
"type": "string"
}
},
"required": [
"zip_code"
],
"type": "object"
},
"zip_code": {
"pattern": "^\\d{5}((-)?\\d{4})?$",
"type": "string"
},
"zip_code_plus_4": {
"pattern": "^\\d{4}$",
"type": "string"
},
"zip_code_type": {
"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",
"enum": [
"standard",
"po_box",
"unique",
"military",
""
],
"type": "string"
},
"zip_id": {
"description": "Unique identifier prefixed with `us_zip_`.",
"pattern": "^us_zip_[a-zA-Z0-9]+$",
"type": "string"
},
"zip_lookup_city": {
"properties": {
"city": {
"$ref": "#/components/schemas/city"
},
"county": {
"$ref": "#/components/schemas/county"
},
"county_fips": {
"$ref": "#/components/schemas/county_fips"
},
"preferred": {
"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",
"example": true,
"type": "boolean"
},
"state": {
"$ref": "#/components/schemas/state"
}
},
"required": [
"city",
"state",
"county",
"county_fips",
"preferred"
],
"type": "object"
}
},
"securitySchemes": {
"basicAuth": {
"scheme": "basic",
"type": "http"
}
}
},
"info": {
"contact": {
"email": "lob-openapi@lob.com",
"name": "Lob Developer Experience",
"url": "https://support.lob.com/"
},
"description": "The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p>\n",
"license": {
"name": "MIT",
"url": "https://mit-license.org/"
},
"termsOfService": "https://www.lob.com/legal",
"title": "Lob",
"version": "1.22.0"
},
"openapi": "3.0.3",
"paths": {
"/accounts": {
"get": {
"description": "Returns the account's current balance of Lob Credits.",
"operationId": "get_lob_credits_balance",
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/lob_credits_balance"
},
"description": "Returns a lob_credits_balance object."
}
},
"summary": "Get Lob Credits Balance",
"tags": [
"Accounts",
"Lob Credits"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/accounts/credits_balance \\\n -u <YOUR API KEY>:\n"
}
]
}
},
"/addresses": {
"get": {
"description": "Returns a list of your addresses. The addresses are returned sorted by creation date, with the most recently created addresses appearing first.",
"operationId": "addresses_list",
"parameters": [
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/before_after"
},
{
"$ref": "#/components/parameters/include"
},
{
"$ref": "#/components/parameters/date_created"
},
{
"$ref": "#/components/parameters/metadata"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/all_addresses"
},
"default": {
"$ref": "#/components/responses/address_error"
}
},
"summary": "List",
"tags": [
"Addresses"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X GET \"https://api.lob.com/v1/addresses?limit=2\" \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "try {\n const addresses = await new AddressesApi(config).list(2);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.addresses.list({limit: 2}, function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "addressesApi = AddressesApi.new(config)\n\nbegin\n addresses = addressesApi.list({ limit: 2 })\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = AddressesApi(api_client)\n\ntry:\n addresses = api.list(limit=2)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\AddressesApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->list(\n 2, // limit\n );\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "AddressesApi apiInstance = new AddressesApi(config);\n\ntry {\n AddressList response = apiInstance.list(\n 2, // limit\n null, // before\n null, // after\n null, // include\n null, // dateCreated\n null // metadata\n );\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.Address.list(%{limit: 2})\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "AddressesApi api = new AddressesApi(config);\n\nList<string> includeList = new List<string>();\nincludeList.Add(\"total_count\");\nDictionary<String, String> metadata = new Dictionary<String, String>();\nmetadata.Add(\"name\", \"Harry\");\nDictionary<String, DateTime> dateCreated = new Dictionary<String, DateTime>();\nDateTime dateCreatedDate = DateTime.Today.AddMonths(-1);\ndateCreated.Add(\"lt\", dateCreatedDate);\n\ntry {\n AddressList response = api.list(\n 2, // limit\n null, // before\n null, // after\n includeList, // include\n dateCreated, // dateCreated\n metadata // metadata\n );\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\nAddressList = apiClient.AddressesApi.List(context).Execute()\nif err != nil {\n return err\n}\n"
}
]
},
"post": {
"description": "Creates a new address given information",
"operationId": "address_create",
"requestBody": {
"content": {
"application/json": {
"examples": {
"full_intl": {
"value": {
"address_city": "SUMMERSIDE",
"address_country": "CA",
"address_line1": "370 WATER ST",
"address_line2": "",
"address_state": "PRINCE EDWARD ISLAND",
"address_zip": "C1N 1C4",
"company": "Lob",
"description": "Harry - Office",
"email": "harry@lob.com",
"name": "Harry Zhang",
"phone": "5555555555"
}
},
"full_us": {
"value": {
"address_city": "San Francisco",
"address_country": "US",
"address_line1": "210 King St",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107",
"company": "Lob",
"description": "Harry - Office",
"email": "harry@lob.com",
"name": "Harry Zhang",
"phone": "5555555555"
}
},
"ncoa_us_test": {
"value": {
"address_city": "San Francisco",
"address_country": "US",
"address_line1": "NCOA",
"address_line2": "#6100",
"address_state": "CA",
"address_zip": "94107",
"company": "Lob",
"description": "Harry - Office",
"email": "harry@lob.com",
"name": "Harry Zhang",
"phone": "5555555555"
}
}
},
"schema": {
"$ref": "#/components/schemas/address_editable"
}
},
"application/x-www-form-urlencoded": {
"encoding": {
"metadata": {
"explode": true,
"style": "deepObject"
}
},
"examples": {
"full_intl": {
"value": {
"address_city": "SUMMERSIDE",
"address_country": "CA",
"address_line1": "370 WATER ST",
"address_line2": "",
"address_state": "PRINCE EDWARD ISLAND",
"address_zip": "C1N 1C4",
"company": "Lob",
"description": "Harry - Office",
"email": "harry@lob.com",
"name": "Harry Zhang",
"phone": "5555555555"
}
},
"full_us": {
"value": {
"address_city": "San Francisco",
"address_country": "US",
"address_line1": "210 King St",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107",
"company": "Lob",
"description": "Harry - Office",
"email": "harry@lob.com",
"name": "Harry Zhang",
"phone": "5555555555"
}
},
"ncoa_us_test": {
"value": {
"address_city": "San Francisco",
"address_country": "US",
"address_line1": "NCOA",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107",
"company": "Lob",
"description": "Harry - Office",
"email": "harry@lob.com",
"name": "Harry Zhang",
"phone": "5555555555"
}
}
},
"schema": {
"$ref": "#/components/schemas/address_editable"
}
},
"multipart/form-data": {
"examples": {
"full_intl": {
"value": {
"address_city": "SUMMERSIDE",
"address_country": "CA",
"address_line1": "370 WATER ST",
"address_line2": "",
"address_state": "PRINCE EDWARD ISLAND",
"address_zip": "C1N 1C4",
"company": "Lob",
"description": "Harry - Office",
"email": "harry@lob.com",
"name": "Harry Zhang",
"phone": "5555555555"
}
},
"full_us": {
"value": {
"address_city": "San Francisco",
"address_country": "US",
"address_line1": "210 King St",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107",
"company": "Lob",
"description": "Harry - Office",
"email": "harry@lob.com",
"name": "Harry Zhang",
"phone": "5555555555"
}
},
"ncoa_us_test": {
"value": {
"address_city": "San Francisco",
"address_country": "US",
"address_line1": "NCOA",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107",
"company": "Lob",
"description": "Harry - Office",
"email": "harry@lob.com",
"name": "Harry Zhang",
"phone": "5555555555"
}
}
},
"schema": {
"$ref": "#/components/schemas/address_editable"
}
}
},
"required": true
},
"responses": {
"200": {
"$ref": "#/components/responses/post_address"
},
"default": {
"$ref": "#/components/responses/address_error"
}
},
"summary": "Create",
"tags": [
"Addresses"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/addresses \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -d \"description=Harry - Office\" \\\n -d \"name=Harry Zhang\" \\\n -d \"company=Lob\" \\\n -d \"email=harry@lob.com\" \\\n -d \"phone=5555555555\" \\\n -d \"address_line1=210 King St\" \\\n -d \"address_line2=# 6100\" \\\n -d \"address_city=San Francisco\" \\\n -d \"address_state=CA\" \\\n -d \"address_zip=94107\" \\\n -d \"address_country=US\"\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "const addressCreate = new AddressEditable({\n description: 'Harry - Office',\n name: 'Harry Zhang',\n company: 'Lob',\n email: 'harry@lob.com',\n phone: '5555555555',\n address_line1: '210 King St',\n address_line2: '# 6100',\n address_city: 'San Francisco',\n address_state: 'CA',\n address_zip: '94107',\n address_country: 'US'\n});\n\ntry {\n const myAddress = await new AddressesApi(config).create(addressCreate);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.addresses.create({\n description: 'Harry - Office',\n name: 'Harry Zhang',\n company: 'Lob',\n email: 'harry@lob.com',\n phone: '5555555555',\n address_line1: '210 King St',\n address_line2: '# 6100',\n address_city: 'San Francisco',\n address_state: 'CA',\n address_zip: '94107',\n address_country: 'US'\n}, function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "addressCreate = AddressEditable.new({\n description: \"Harry - Office\",\n name: \"Harry Zhang\",\n company: \"Lob\",\n email: \"harry@lob.com\",\n phone: \"5555555555\",\n address_line1: \"210 King St\",\n address_line2: \"# 6100\",\n address_city: \"San Francisco\",\n address_state: \"CA\",\n address_zip: \"94107\",\n address_country: \"US\",\n});\n\naddressApi = AddressesApi.new(config)\n\nbegin\n createdAddress = addressApi.create(addressCreate)\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "address_editable = AddressEditable(\n description = \"Harry - Office\",\n name = \"Harry Zhang\",\n company = \"Lob\",\n email = \"harry@lob.com\",\n phone = \"5555555555\",\n address_line1 = \"210 King St\",\n address_line2 = \"# 6100\",\n address_city = \"San Francisco\",\n address_state = \"CA\",\n address_zip = \"94107\",\n address_country = CountryExtended(\"US\"),\n)\n\nwith ApiClient(configuration) as api_client:\n api = AddressesApi(api_client)\n\ntry:\n created_address = api.create(address_editable)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\AddressesApi($config, new GuzzleHttp\\Client());\n\n$address_editable = new OpenAPI\\Client\\Model\\AddressEditable(\n array(\n \"description\" => \"Harry - Office\",\n \"name\" => \"Harry Zhang\",\n \"company\" => \"Lob\",\n \"email\" => \"harry@lob.com\",\n \"phone\" => \"5555555555\",\n \"address_line1\" => \"210 King St\",\n \"address_line2\" => \"# 6100\",\n \"address_city\" => \"San Francisco\",\n \"address_state\" => \"CA\",\n \"address_zip\" => \"94107\",\n \"address_country\" => \"US\",\n )\n);\n\ntry {\n $result = $apiInstance->create($address_editable);\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "AddressesApi apiInstance = new AddressesApi(config);\n\ntry {\n AddressEditable addressEditable = new AddressEditable();\n addressEditable.setDescription(\"Harry - Office\");\n addressEditable.setName(\"Harry Zhang\");\n addressEditable.setCompany(\"Lob\");\n addressEditable.setEmail(\"harry@lob.com\");\n addressEditable.setPhone(\"5555555555\");\n addressEditable.setAddressLine1(\"210 King St\");\n addressEditable.setAddressLine2(\"# 6100\");\n addressEditable.setAddressCity(\"San Francisco\");\n addressEditable.setAddressState(\"CA\");\n addressEditable.setAddressZip(\"94107\");\n addressEditable.setAddressCountry(CountryExtended.US);\n\n Address result = apiInstance.create(addressEditable);\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.Address.create(%{\n description: \"Harry - Office\",\n name: \"Harry Zhang\",\n company: \"Lob\",\n email: \"harry@lob.com\",\n phone: \"5555555555\",\n address_line1: \"210 King St\",\n address_line2: \"# 6100\",\n address_city: \"San Francisco\",\n address_state: \"CA\",\n address_country: \"US\",\n address_zip: \"94107\"\n})\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "AddressesApi api = new AddressesApi(config);\n\nAddressEditable addressEditable = new AddressEditable(\n \"210 King St\", // addressLine1\n \"# 6100\", // addressLine2\n \"San Francisco\", // addressCity\n \"CA\", // addressState\n \"94107\", // addressZip\n CountryExtended.US, // addressCountry\n \"Harry - Office\", // description\n \"Harry Zhang\", // name\n \"Lob\", // company\n \"5555555555\", // phone\n \"harry@lob.com\" // email\n);\n\ntry {\n Address result = api.create(addressEditable);\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\n\nvar addressCreate = *lob.NewAddressEditable()\naddressCreate.SetDescription(\"Harry - Office\")\naddressCreate.SetName(\"Harry Zhang\")\naddressCreate.SetCompany(\"Lob\")\naddressCreate.SetEmail(\"harry@lob.com\")\naddressCreate.SetPhone(\"5555555555\")\naddressCreate.SetAddressLine1(\"210 King St\")\naddressCreate.SetAddressLine2(\"# 6100\")\naddressCreate.SetAddressCity(\"San Francisco\")\naddressCreate.SetAddressState(\"CA\")\naddressCreate.SetAddressZip(\"94107\")\naddressCreate.SetAddressCountry(\"US\")\n\n\n\ncreatedaddress, _, err := apiClient.AddressesApi.Create(context).AddressEditable(addressCreate).Execute()\n\nif err != nil {\n return err\n}\n"
}
]
}
},
"/addresses/{adr_id}": {
"delete": {
"description": "Deletes the details of an existing address. You need only supply the unique identifier that was returned upon address creation.",
"operationId": "address_delete",
"responses": {
"200": {
"$ref": "#/components/responses/address_deleted"
},
"default": {
"$ref": "#/components/responses/address_error"
}
},
"summary": "Delete",
"tags": [
"Addresses"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X DELETE https://api.lob.com/v1/addresses/adr_43769b47aed248c2 \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "try {\n const deleteAddress = await new AddressesApi(config).delete('adr_xxxx');\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.addresses.delete('adr_43769b47aed248c2', function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "addressApi = AddressesApi.new(config)\n\nbegin\n deletedAddress = addressApi.delete(\"adr_43769b47aed248c2\")\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = AddressesApi(api_client)\n\ntry:\n deleted_resource = api.delete(\"adr_43769b47aed248c2\")\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\AddressesApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->delete(\"adr_43769b47aed248c2\");\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "AddressesApi apiInstance = new AddressesApi(config);\n\ntry {\n AddressDeletion response = apiInstance.delete(\"adr_43769b47aed248c2\");\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.Address.delete(\"adr_43769b47aed248c2\")\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "AddressesApi api = new AddressesApi(config);\n\ntry {\n AddressDeletion response = api.delete(\"adr_43769b47aed248c2\");\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\ndeletedAddress, _, err := apiClient.AddressesApi.Delete(context, \"adr_43769b47aed248c2\").Execute()\n\nif err != nil {\n return err\n}\n"
}
]
},
"get": {
"description": "Retrieves the details of an existing address. You need only supply the unique identifier that was returned upon address creation.",
"operationId": "address_retrieve",
"responses": {
"200": {
"$ref": "#/components/responses/address"
},
"default": {
"$ref": "#/components/responses/address_error"
}
},
"summary": "Retrieve",
"tags": [
"Addresses"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/addresses/adr_fa85158b26c3eb7c \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "try {\n const address = await new AddressesApi(config).get('adr_xxxx');\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.addresses.retrieve('adr_fa85158b26c3eb7c', function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "addressApi = AddressesApi.new(config)\n\nbegin\n retrievedAddress = addressApi.get(\"adr_fa85158b26c3eb7c\")\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = AddressesApi(api_client)\n\ntry:\n address = api.get(\"adr_fa85158b26c3eb7c\")\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\AddressesApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->get(\"adr_fa85158b26c3eb7c\");\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "AddressesApi apiInstance = new AddressesApi(config);\n\ntry {\n Address response = apiInstance.get(\"adr_fa85158b26c3eb7c\");\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.Address.retrieve(\"adr_fa85158b26c3eb7c\")\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "AddressesApi api = new AddressesApi(config);\n\ntry {\n Address response = api.get(\"adr_fa85158b26c3eb7c\");\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\nfetchedAddress, _, err := apiClient.AddressesApi.Get(context,\"adr_fa85158b26c3eb7c\").Execute()\n\nif err != nil {\n return err\n}\n"
}
]
},
"parameters": [
{
"description": "id of the address",
"in": "path",
"name": "adr_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/adr_id"
}
}
]
},
"/bank_accounts": {
"get": {
"description": "Returns a list of your bank accounts. The bank accounts are returned sorted by creation date, with the most recently created bank accounts appearing first.",
"operationId": "bank_accounts_list",
"parameters": [
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/before_after"
},
{
"$ref": "#/components/parameters/include"
},
{
"$ref": "#/components/parameters/date_created"
},
{
"$ref": "#/components/parameters/metadata"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/all_bank_accounts"
},
"default": {
"$ref": "#/components/responses/bank_account_error"
}
},
"summary": "List",
"tags": [
"Bank Accounts"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X GET \"https://api.lob.com/v1/bank_accounts?limit=2\" \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "try {\n const bankaccounts = await new BankaccountsApi(config).list(2);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.bankAccounts.list({limit: 2}, function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "bankAccountsApi = BankAccountsApi.new(config)\n\nbegin\n bankAccounts = bankAccountsApi.list({ limit: 2 })\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = BankAccountsApi(api_client)\n\ntry:\n bank_accounts = api.list(limit=2)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\BankAccountsApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->list(\n 2, // limit\n );\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "BankAccountsApi apiInstance = new BankAccountsApi(config);\n\ntry {\n BankAccountList response = apiInstance.list(\n 2, // limit\n null, // before\n null, // after\n null, // include\n null, // dateCreated\n null // metadata\n );\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.BankAccount.list(%{limit: 2})\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "BankAccountsApi api = new BankAccountsApi(config);\n\nList<string> includeList = new List<string>();\nincludeList.Add(\"total_count\");\nDictionary<String, String> metadata = new Dictionary<String, String>();\nmetadata.Add(\"name\", \"Harry\");\nDictionary<String, DateTime> dateCreated = new Dictionary<String, DateTime>();\nDateTime dateCreatedDate = DateTime.Today.AddMonths(-1);\ndateCreated.Add(\"lt\", dateCreatedDate);\n\ntry {\n BankAccountList response = api.list(\n 2, // limit\n null, // before\n null, // after\n includeList, // include\n dateCreated, // dateCreated\n metadata // metadata\n );\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\nBankAccountList = apiClient.BankAccountsApi.List(context).Execute()\nif err != nil {\n return err\n}\n"
}
]
},
"post": {
"description": "Creates a new bank account with the provided properties. Bank accounts created in live mode will need to be verified via micro deposits before being able to send live checks. The deposits will appear in the bank account in 2-3 business days and have the description \"VERIFICATION\".",
"operationId": "bank_account_create",
"requestBody": {
"content": {
"application/json": {
"example": {
"account_number": "123456789",
"account_type": "individual",
"description": "Test Bank Account",
"metadata": {
"spiffy": "true"
},
"routing_number": "322271627",
"signatory": "Jane Doe"
},
"schema": {
"$ref": "#/components/schemas/bank_account_base"
}
},
"application/x-www-form-urlencoded": {
"encoding": {
"metadata": {
"explode": true,
"style": "deepObject"
}
},
"example": {
"account_number": "123456789",
"account_type": "individual",
"description": "Test Bank Account",
"metadata": {
"spiffy": "true"
},
"routing_number": "322271627",
"signatory": "Jane Doe"
},
"schema": {
"$ref": "#/components/schemas/bank_account_base"
}
},
"multipart/form-data": {
"example": {
"account_number": "123456789",
"account_type": "individual",
"description": "Test Bank Account",
"metadata": {
"spiffy": "true"
},
"routing_number": "322271627",
"signatory": "Jane Doe"
},
"schema": {
"$ref": "#/components/schemas/bank_account_base"
}
}
},
"required": true
},
"responses": {
"200": {
"$ref": "#/components/responses/post_bank_account"
},
"default": {
"$ref": "#/components/responses/bank_account_error"
}
},
"summary": "Create",
"tags": [
"Bank Accounts"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/bank_accounts \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -d \"description=Test Bank Account\" \\\n -d \"routing_number=322271627\" \\\n -d \"account_number=123456789\" \\\n -d \"signatory=John Doe\" \\\n -d \"account_type=company\"\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "const bankAccountCreate = new BankAccountWritable({\n description: 'Test Bank Account',\n routing_number: '322271627',\n account_number: '123456789',\n signatory: 'Gomez Addams',\n account_type: BankTypeEnum.Individual\n});\n\ntry {\n const myBankAcount = await new BankAccountsApi(config).create(bankAccountCreate);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.bankAccounts.create({\n description: 'Test Bank Account',\n routing_number: 322271627,\n account_number: 123456789,\n signatory: 'John Doe',\n account_type: 'company'\n}, function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "bankAccountCreate = BankAccountWritable.new({\n description: \"Test Bank Account\",\n routing_number: \"322271627\",\n account_number: \"123456789\",\n signatory: \"John Doe\",\n account_type: BankTypeEnum::COMPANY,\n});\n\nbankAccountApi = BankAccountsApi.new(config)\n\nbegin\n createdBankAccount = bankAccountApi.create(bankAccountCreate)\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "bank_account_writable = BankAccountWritable(\n description = \"Test Bank Account\",\n routing_number = \"322271627\",\n account_number = \"123456789\",\n signatory = \"John Doe\",\n account_type = BankTypeEnum(\"company\"),\n)\n\nwith ApiClient(configuration) as api_client:\n api = BankAccountsApi(api_client)\n\ntry:\n created_bank_account = api.create(bank_account_writable)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\BankAccountsApi($config, new GuzzleHttp\\Client());\n$bank_account_writable = new OpenAPI\\Client\\Model\\BankAccountWritable(\n array(\n \"description\" => \"Test Bank Account\",\n \"routing_number\" => \"322271627\",\n \"account_number\" => \"123456789\",\n \"signatory\" => \"John Doe\",\n \"account_type\" => \"company\",\n )\n);\n\ntry {\n $result = $apiInstance->create($bank_account_writable);\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "BankAccountsApi apiInstance = new BankAccountsApi(config);\n\ntry {\n BankAccountWritable bankAccountWritable = new BankAccountWritable();\n bankAccountWritable.setDescription(\"Test Bank Account\");\n bankAccountWritable.setRoutingNumber(\"322271627\");\n bankAccountWritable.setAccountNumber(\"123456789\");\n bankAccountWritable.setSignatory(\"John Doe\");\n bankAccountWritable.setAccountType(BankTypeEnum.COMPANY);\n\n BankAccount result = apiInstance.create(bankAccountWritable);\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.BankAccount.create(%{\n description: \"Test Bank Account\",\n routing_number: \"322271627\",\n account_number: \"123456789\",\n signatory: \"John Doe\",\n account_type: \"company\"\n})\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "BankAccountsApi api = new BankAccountsApi(config);\n\nBankAccountWritable bankAccountWritable = new BankAccountWritable(\n \"Test Bank Account\", // description\n \"322271627\", // routingNumber\n \"123456789\", // accountNumber\n BankTypeEnum.Company, // accountType\n \"John Doe\" // signatory\n);\n\ntry {\n BankAccount result = api.create(bankAccountWritable);\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\n\nvar bankAccountCreate = *lob.NewBankAccountWritable()\nbankAccountCreate.SetDescription(\"Test Bank Account\")\nbankAccountCreate.SetRoutingNumber(\"322271627\")\nbankAccountCreate.SetAccountNumber(\"123456789\")\nbankAccountCreate.SetSignatory(\"John Doe\")\nbankAccountCreate.SetAccountType(\"company\")\n\n\n\ncreatedbankAccount, _, err := apiClient.BankAccountsApi.Create(context).BankAccountWritable(bankAccountCreate).Execute()\n\nif err != nil {\n return err\n}\n"
}
]
}
},
"/bank_accounts/{bank_id}": {
"delete": {
"description": "Permanently deletes a bank account. It cannot be undone.",
"operationId": "bank_account_delete",
"responses": {
"200": {
"$ref": "#/components/responses/bank_account_deleted"
},
"default": {
"$ref": "#/components/responses/bank_account_error"
}
},
"summary": "Delete",
"tags": [
"Bank Accounts"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X DELETE https://api.lob.com/v1/bank_accounts/bank_3e64d9904356b20 \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "try {\n const deleteBankAccount = await new BankAccountsApi(config).delete('bank_xxxx');\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.bankAccounts.delete('bank_3e64d9904356b20', function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "bankAccountApi = BankAccountsApi.new(config)\n\nbegin\n deletedBankAccount = bankAccountApi.delete(\"bank_3e64d9904356b20\")\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = BankAccountsApi(api_client)\n\ntry:\n deleted_resource = api.delete(\"bank_3e64d9904356b20\")\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\BankAccountsApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->delete(\"bank_3e64d9904356b20\");\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "BankAccountsApi apiInstance = new BankAccountsApi(config);\n\ntry {\n BankAccountDeletion response = apiInstance.delete(\"bank_3e64d9904356b20\");\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.BankAccount.destroy(\"bank_3e64d9904356b20\")\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "BankAccountsApi api = new BankAccountsApi(config);\n\ntry {\n BankAccountDeletion response = api.delete(\"bank_3e64d9904356b20\");\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\ndeletedBankAccount, _, err := apiClient.BankAccountsApi.Delete(context, \"bank_3e64d9904356b20\").Execute()\n\nif err != nil {\n return err\n}\n"
}
]
},
"get": {
"description": "Retrieves the details of an existing bank account. You need only supply the unique bank account identifier that was returned upon bank account creation.",
"operationId": "bank_account_retrieve",
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/bank_account"
},
"description": "Returns a bank account object"
},
"default": {
"$ref": "#/components/responses/bank_account_error"
}
},
"summary": "Retrieve",
"tags": [
"Bank Accounts"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/bank_accounts/bank_8cad8df5354d33f \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "try {\n const bankAccount = await new BankAccountsApi(config).get('bank_xxxx');\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.bankAccounts.retrieve('bank_8cad8df5354d33f', function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "bankAccountApi = BankAccountsApi.new(config)\n\nbegin\n retrievedBankAccount = bankAccountApi.get(\"bank_8cad8df5354d33f\")\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = BankAccountsApi(api_client)\n\ntry:\n bank_account = api.get(\"bank_8cad8df5354d33f\")\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\BankAccountsApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->get(\"bank_8cad8df5354d33f\");\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "BankAccountsApi apiInstance = new BankAccountsApi(config);\n\ntry {\n BankAccount response = apiInstance.get(\"bank_8cad8df5354d33f\");\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.BankAccount.find(\"bank_8cad8df5354d33f\")\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "BankAccountsApi api = new BankAccountsApi(config);\n\ntry {\n BankAccount response = api.get(\"bank_8cad8df5354d33f\");\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\nfetchedBankAccount, _, err := apiClient.BankAccountsApi.Get(context,\"bank_8cad8df5354d33f\").Execute()\n\nif err != nil {\n return err\n}\n"
}
]
},
"parameters": [
{
"description": "id of the bank account",
"in": "path",
"name": "bank_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/bank_id"
}
}
]
},
"/bank_accounts/{bank_id}/verify": {
"parameters": [
{
"description": "id of the bank account to be verified",
"in": "path",
"name": "bank_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/bank_id"
}
}
],
"post": {
"description": "Verify a bank account in order to create a check.\n\nCheck the `microdeposit_type` field returned by `GET /v1/bank_accounts/:id` to determine which parameter to submit:\n- `amounts` \u2014 provide the two microdeposit amounts (in cents) that appeared\n in the bank account statement.\n\n- `descriptor_code` \u2014 provide the 6-character code (beginning with `SM`)\n from the bank statement descriptor of the single $0.01 microdeposit.\n\n\nSubmitting the wrong parameter type for the account's `microdeposit_type` will return an error.",
"operationId": "bank_account_verify",
"requestBody": {
"content": {
"application/json": {
"examples": {
"amounts": {
"summary": "Verify with two deposit amounts",
"value": {
"amounts": [
25,
63
]
}
},
"descriptor_code": {
"summary": "Verify with a statement descriptor code",
"value": {
"descriptor_code": "SMABCD"
}
}
},
"schema": {
"$ref": "#/components/schemas/bank_account_verify"
}
},
"application/x-www-form-urlencoded": {
"examples": {
"amounts": {
"summary": "Verify with two deposit amounts",
"value": {
"amounts": [
25,
63
]
}
},
"descriptor_code": {
"summary": "Verify with a statement descriptor code",
"value": {
"descriptor_code": "SMABCD"
}
}
},
"schema": {
"$ref": "#/components/schemas/bank_account_verify"
}
},
"multipart/form-data": {
"examples": {
"amounts": {
"summary": "Verify with two deposit amounts",
"value": {
"amounts": [
25,
63
]
}
},
"descriptor_code": {
"summary": "Verify with a statement descriptor code",
"value": {
"descriptor_code": "SMABCD"
}
}
},
"schema": {
"$ref": "#/components/schemas/bank_account_verify"
}
}
},
"required": true
},
"responses": {
"200": {
"$ref": "#/components/responses/post_bank_account"
},
"default": {
"$ref": "#/components/responses/bank_account_error"
}
},
"summary": "Verify",
"tags": [
"Bank Accounts"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "# Check microdeposit_type from GET /v1/bank_accounts/:id to choose the right variant:\n\n# microdeposit_type: amounts\ncurl https://api.lob.com/v1/bank_accounts/bank_dfceb4a2a05b57e/verify \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -d \"amounts[]=25\" \\\n -d \"amounts[]=63\"\n\n# microdeposit_type: descriptor_code\ncurl https://api.lob.com/v1/bank_accounts/bank_dfceb4a2a05b57e/verify \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -d \"descriptor_code=SMABCD\"\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "// Check microdeposit_type from GET /v1/bank_accounts/:id to choose the right variant:\n\n// microdeposit_type: amounts\nconst verificationData = new BankAccountVerify({\n amounts: [25, 63],\n});\n\n// microdeposit_type: descriptor_code\n// const verificationData = new BankAccountVerify({\n// descriptor_code: 'SMABCD',\n// });\n\ntry {\n const verifiedAccount = await new BankAccountsApi(config).verify('bank_xxxx', verificationData);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "// Check microdeposit_type from GET /v1/bank_accounts/:id to choose the right variant:\n\n// microdeposit_type: amounts\nLob.bankAccounts.verify('bank_dfceb4a2a05b57e', {\n amounts: [25, 63]\n}, function (err, res) {\n console.log(err, res);\n});\n\n// microdeposit_type: descriptor_code\n// Lob.bankAccounts.verify('bank_dfceb4a2a05b57e', {\n// descriptor_code: 'SMABCD'\n// }, function (err, res) {\n// console.log(err, res);\n// });\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "# Check microdeposit_type from GET /v1/bank_accounts/:id to choose the right variant:\n\n# microdeposit_type: amounts\nverificationData = BankAccountVerify.new({\n amounts: [25, 63],\n})\n\n# microdeposit_type: descriptor_code\n# verificationData = BankAccountVerify.new({\n# descriptor_code: 'SMABCD',\n# })\n\nbankAccountsApi = BankAccountsApi.new(config)\n\nbegin\n verifiedAccount = bankAccountsApi.verify(\"bank_dfceb4a2a05b57e\", verificationData)\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "# Check microdeposit_type from GET /v1/bank_accounts/:id to choose the right variant:\n\n# microdeposit_type: amounts\nverification_data = BankAccountVerify(\n amounts=[25, 63],\n)\n\n# microdeposit_type: descriptor_code\n# verification_data = BankAccountVerify(\n# descriptor_code='SMABCD',\n# )\n\nwith ApiClient(configuration) as api_client:\n api = BankAccountsApi(api_client)\n\ntry:\n verified_account = api.verify(\"bank_dfceb4a2a05b57e\", verification_data)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\BankAccountsApi($config, new GuzzleHttp\\Client());\n\n// Check microdeposit_type from GET /v1/bank_accounts/:id to choose the right variant:\n\n// microdeposit_type: amounts\n$bankVerify = new OpenAPI\\Client\\Model\\BankAccountVerify();\n$bankVerify->setAmounts([25, 63]);\n\n// microdeposit_type: descriptor_code\n// $bankVerify = new OpenAPI\\Client\\Model\\BankAccountVerify();\n// $bankVerify->setDescriptorCode('SMABCD');\n\ntry {\n $result = $apiInstance->verify(\n \"bank_dfceb4a2a05b57e\", $bankVerify\n );\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "// Check microdeposit_type from GET /v1/bank_accounts/:id to choose the right variant:\n\n// microdeposit_type: amounts\nBankAccountVerify verification = new BankAccountVerify();\nverification.addAmountsItem(25);\nverification.addAmountsItem(63);\n\n// microdeposit_type: descriptor_code\n// BankAccountVerify verification = new BankAccountVerify();\n// verification.setDescriptorCode(\"SMABCD\");\n\nBankAccountsApi apiInstance = new BankAccountsApi(config);\n\ntry {\n apiInstance.verify(\"bank_dfceb4a2a05b57e\", verification);\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "# Check microdeposit_type from GET /v1/bank_accounts/:id to choose the right variant:\n\n# microdeposit_type: amounts\nLob.BankAccount.verify(\"bank_dfceb4a2a05b57e\", %{amounts: [25, 63]})\n\n# microdeposit_type: descriptor_code\n# Lob.BankAccount.verify(\"bank_dfceb4a2a05b57e\", %{descriptor_code: \"SMABCD\"})\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "// Check microdeposit_type from GET /v1/bank_accounts/:id to choose the right variant:\n\n// microdeposit_type: amounts\nList<int> amounts = new List<int>();\namounts.Add(25);\namounts.Add(63);\nBankAccountVerify verification = new BankAccountVerify(amounts);\n\n// microdeposit_type: descriptor_code\n// BankAccountVerify verification = new BankAccountVerify();\n// verification.DescriptorCode = \"SMABCD\";\n\nBankAccountsApi api = new BankAccountsApi(config);\n\ntry {\n BankAccount verified_account = api.verify(\"bank_dfceb4a2a05b57e\", verification);\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\nvar bankAccountWritable = *lob.NewBankAccountWritable(\"322271627\", \"123456789\", lob.BANKTYPEENUM_INDIVIDUAL, \"Sinead Connor\")\n\ncreatedBankAccount, _, _ := apiClient.BankAccountsApi.Create(context).BankAccountWritable(bankAccountWritable).Execute()\n\n// Check microdeposit_type from GET /v1/bank_accounts/:id to choose the right variant:\n\n// microdeposit_type: amounts\nverifyAmounts := []int32{25, 63}\nverify := *lob.NewBankAccountVerify(verifyAmounts)\n\n// microdeposit_type: descriptor_code\n// verify := *lob.NewBankAccountVerify(nil)\n// verify.DescriptorCode = lob.PtrString(\"SMABCD\")\n\nverifiedAccount, _, err := apiClient.BankAccountsApi.Verify(context, createdBankAccount.Id).BankAccountVerify(verify).Execute()\n\nif err != nil {\n return err\n}\n"
}
]
}
},
"/billing_groups": {
"get": {
"description": "Returns a list of your billing_groups. The billing_groups are returned sorted by creation date, with the most recently created billing_groups appearing first.",
"operationId": "billing_groups_list",
"parameters": [
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/offset"
},
{
"$ref": "#/components/parameters/include"
},
{
"$ref": "#/components/parameters/date_created"
},
{
"$ref": "#/components/parameters/date_modified"
},
{
"description": "Sorts items by ascending or descending dates. Use either `date_created` or `date_modified`, not both.\n",
"in": "query",
"name": "sort_by",
"schema": {
"allOf": [
{
"properties": {
"date_created": {
"enum": [
"asc",
"desc"
],
"type": "string"
},
"date_modified": {
"enum": [
"asc",
"desc"
],
"type": "string"
}
},
"type": "object"
},
{
"oneOf": [
{
"required": [
"date_created"
]
},
{
"required": [
"date_modified"
]
}
]
}
]
}
}
],
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/all_billing_groups"
},
"description": "Returns a list of billing_groups."
},
"default": {
"$ref": "#/components/responses/billing_group_list_error"
}
},
"summary": "List",
"tags": [
"Billing Groups"
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl -X GET \"https://api.lob.com/v1/billing_groups?limit=2\" \\\n-u <YOUR API KEY>:\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "billingGroupsApi = BillingGroupsApi.new(config)\n\nbegin\n billingGroups = billingGroupsApi.list({ limit: 2 })\nrescue => err\n p err.message\nend\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\nBillingGroupList = apiClient.BillingGroupsApi.List(context).Execute()\nif err != nil {\n return err\n}\n"
}
]
},
"post": {
"description": "Creates a new billing_group with the provided properties.",
"operationId": "billing_group_create",
"requestBody": {
"content": {
"application/json": {
"example": {
"description": "Usage group used for the Marketing Dept resource sends",
"name": "Marketing Dept"
},
"schema": {
"$ref": "#/components/schemas/billing_group_editable"
}
},
"application/x-www-form-urlencoded": {
"example": {
"description": "Usage group used for the Marketing Dept resource sends",
"name": "Marketing Dept"
},
"schema": {
"$ref": "#/components/schemas/billing_group_editable"
}
},
"multipart/form-data": {
"example": {
"description": "Usage group used for the Marketing Dept resource sends",
"name": "Marketing Dept"
},
"schema": {
"$ref": "#/components/schemas/billing_group_editable"
}
}
},
"required": true
},
"responses": {
"200": {
"$ref": "#/components/responses/post_billing_group"
},
"default": {
"$ref": "#/components/responses/billing_group_error"
}
},
"summary": "Create",
"tags": [
"Billing Groups"
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl https://api.lob.com/v1/billing_groups \\\n-u <YOUR API KEY>: \\\n-d \"name=Marketing Department\" \\\n-d \"description=Usage group used for the Marketing Department's resource sends\"\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "bgCreate = BillingGroupEditable.new({\n description: \"Usage group used for the Marketing Department's resource sends\",\n name: \"Marketing Department\",\n});\n\nbgApi = BillingGroupsApi.new(config)\n\nbegin\n createdBillingGroup = bgApi.create(bgCreate)\nrescue => err\n p err.message\nend\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\n\nvar bgCreate = *lob.NewBillingGroupEditable()\nbgCreate.SetDescription(\"Usage group used for the Marketing Department's resource sends\")\nbgCreate.SetName(\"Marketing Department\")\n\n\n\ncreatedbg, _, err := apiClient.BillingGroupsApi.Create(context).BillingGroupEditable(bgCreate).Execute()\n\nif err != nil {\n return err\n}\n"
}
]
}
},
"/billing_groups/{bg_id}": {
"get": {
"description": "Retrieves the details of an existing billing_group. You need only supply the unique billing_group identifier that was returned upon billing_group creation.",
"operationId": "billing_group_retrieve",
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/billing_group"
},
"description": "Returns a billing_group object."
},
"default": {
"$ref": "#/components/responses/billing_group_list_error"
}
},
"summary": "Retrieve",
"tags": [
"Billing Groups"
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl https://api.lob.com/v1/billing_groups/bg_4bb02b527a72667d0 \\\n-u <YOUR API KEY>:\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "billingGroupApi = BillingGroupsApi.new(config)\n\nbegin\n retrievedBillingGroup = billingGroupApi.get(\"bg_4bb02b527a72667d0\")\nrescue => err\n p err.message\nend\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\nfetchedBillingGroup, _, err := apiClient.BillingGroupsApi.Get(context,\"bg_4bb02b527a72667d0\").Execute()\n\nif err != nil {\n return err\n}\n"
}
]
},
"parameters": [
{
"description": "id of the billing_group",
"in": "path",
"name": "bg_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/bg_id"
}
}
],
"post": {
"description": "Updates all editable attributes of the billing_group with the given id.",
"operationId": "billing_group_update",
"requestBody": {
"content": {
"application/json": {
"example": {
"description": "Usage group used for the Marketing Dept resource sends",
"name": "Marketing Dept"
},
"schema": {
"$ref": "#/components/schemas/billing_group_base"
}
},
"application/x-www-form-urlencoded": {
"example": {
"description": "Usage group used for the Marketing Dept resource sends",
"name": "Marketing Dept"
},
"schema": {
"$ref": "#/components/schemas/billing_group_base"
}
},
"multipart/form-data": {
"example": {
"description": "Usage group used for the Marketing Dept resource sends",
"name": "Marketing Dept"
},
"schema": {
"$ref": "#/components/schemas/billing_group_base"
}
}
},
"required": true
},
"responses": {
"200": {
"$ref": "#/components/responses/post_billing_group"
},
"default": {
"$ref": "#/components/responses/billing_group_error"
}
},
"summary": "Update",
"tags": [
"Billing Groups"
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl https://api.lob.com/v1/billing_groups/bg_759954f540a1bfdb5 \\\n-u <YOUR API KEY>: \\\n-d \"description=demo replacement\" \\\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "billingGroupEditable = BillingGroupEditable.new({\n description: \"demo replacement\",\n})\n\nbgApi = BillingGroupsApi.new(config)\n\nbegin\n updatedBillingGroup = bgApi.update(\"bg_759954f540a1bfdb5\", billingGroupEditable)\nrescue => err\n p err.message\nend\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\nvar bgEditable = *lob.NewBillingGroupEditable(\"Test Billing group\")\ncreatedBillingGroup, _, _ := apiClient.BillingGroupsApi.Create(context).BillingGroupEditable(suite.bgEditable).Execute()\n\nbgEditable.SetDescription(\"BG updated\")\nresp, _, err := suite.apiClient.BillingGroupsApi.Update(context, createdBillingGroup.Id).BillingGroupEditable(suite.bgEditable).Execute()\n\nif err != nil {\n return err\n}\n"
}
]
}
},
"/booklets": {
"get": {
"description": "Returns a list of your booklets. The booklets are returned sorted by creation date, with the most recently created booklets appearing first.",
"operationId": "booklets_list",
"parameters": [
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/before_after"
},
{
"$ref": "#/components/parameters/include"
},
{
"$ref": "#/components/parameters/date_created"
},
{
"$ref": "#/components/parameters/metadata"
},
{
"$ref": "#/components/parameters/send_date"
},
{
"$ref": "#/components/parameters/mail_type"
},
{
"$ref": "#/components/parameters/sort_by"
},
{
"$ref": "#/components/parameters/campaign_id"
},
{
"$ref": "#/components/parameters/status"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/all_booklets"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "List",
"tags": [
"Booklets"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X GET \"https://api.lob.com/v1/booklets?limit=2\" \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
}
]
},
"post": {
"description": "Creates a new booklet.",
"operationId": "booklet_create",
"parameters": [
{
"$ref": "#/components/parameters/idem-header"
},
{
"$ref": "#/components/parameters/idem-query"
}
],
"requestBody": {
"content": {
"application/json": {
"example": {
"description": "demo",
"file": "<html style='padding-top: 3in; margin: .5in;'>HTML Booklet for {{name}}</html>",
"from": {
"address_city": "San Francisco",
"address_line1": "210 King St",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107",
"name": "Harry"
},
"fsc": true,
"mail_type": "usps_first_class",
"merge_variables": {
"name": "Harry"
},
"metadata": {
"spiffy": "true"
},
"print_speed": "core",
"qr_code": {
"pages": "1-2,4-5",
"position": "relative",
"redirect_url": "https://www.lob.com",
"right": "2",
"top": "2",
"width": "2"
},
"send_date": "2017-11-01T00:00:00.000Z",
"size": "8.375x5.375",
"to": {
"address_city": "San Francisco",
"address_country": "US",
"address_line1": "210 King St",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107",
"company": "Lob",
"description": "Harry - Office",
"email": "harry@lob.com",
"name": "Harry Zhang",
"phone": "5555555555"
},
"use_type": "marketing"
},
"schema": {
"$ref": "#/components/schemas/booklet_editable"
}
},
"application/x-www-form-urlencoded": {
"example": {
"description": "demo",
"file": "<html style='padding-top: 3in; margin: .5in;'>HTML Booklet for {{name}}</html>",
"from": {
"address_city": "San Francisco",
"address_line1": "210 King St",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107",
"name": "Harry"
},
"fsc": true,
"mail_type": "usps_first_class",
"merge_variables": {
"name": "Harry"
},
"metadata": {
"spiffy": "true"
},
"print_speed": "core",
"qr_code": {
"pages": "1-2,4-5",
"position": "relative",
"redirect_url": "https://www.lob.com",
"right": "2",
"top": "2",
"width": "2"
},
"send_date": "2017-11-01T00:00:00.000Z",
"size": "8.375x5.375",
"to": {
"address_city": "San Francisco",
"address_country": "US",
"address_line1": "210 King St",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107",
"company": "Lob",
"description": "Harry - Office",
"email": "harry@lob.com",
"name": "Harry Zhang",
"phone": "5555555555"
},
"use_type": "marketing"
},
"schema": {
"$ref": "#/components/schemas/booklet_editable"
}
},
"multipart/form-data": {
"example": {
"description": "demo",
"file": "<html style='padding-top: 3in; margin: .5in;'>HTML Booklet for {{name}}</html>",
"from": {
"address_city": "San Francisco",
"address_line1": "210 King St",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107",
"name": "Harry"
},
"fsc": true,
"mail_type": "usps_first_class",
"merge_variables": {
"name": "Harry"
},
"metadata": {
"spiffy": "true"
},
"print_speed": "core",
"qr_code": {
"pages": "1-2,4-5",
"position": "relative",
"redirect_url": "https://www.lob.com",
"right": "2",
"top": "2",
"width": "2"
},
"send_date": "2017-11-01T00:00:00.000Z",
"size": "8.375x5.375",
"to": {
"address_city": "San Francisco",
"address_country": "US",
"address_line1": "210 King St",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107",
"company": "Lob",
"description": "Harry - Office",
"email": "harry@lob.com",
"name": "Harry Zhang",
"phone": "5555555555"
},
"use_type": "marketing"
},
"schema": {
"$ref": "#/components/schemas/booklet_editable"
}
}
},
"required": true
},
"responses": {
"200": {
"$ref": "#/components/responses/post_booklet"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "Create",
"tags": [
"Booklets"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/booklets \\\n -u YOUR_API_KEY \\\n -d 'description=Demo Booklet' \\\n -d 'to[name]=Harry Zhang' \\\n -d 'to[address_line1]=210 King St' \\\n -d 'to[address_line2]=# 6100' \\\n -d 'to[address_city]=San Francisco' \\\n -d 'to[address_state]=CA' \\\n -d 'to[address_zip]=94107' \\\n -d 'from=adr_210a8d4b0b76d77b' \\\n --data-urlencode 'file=<html style=\"padding-top: 3in; margin: .5in;\">HTML Booklet for {{name}}</html>' \\\n -d 'merge_variables[name]=Harry' \\\n -d 'qr_code[position]=relative' \\\n -d 'qr_code[redirect_url]=https://www.lob.com' \\\n -d 'qr_code[width]=2' \\\n -d 'qr_code[bottom]=2' \\\n -d 'qr_code[left]=2' \\\n -d 'qr_code[pages]=3,4-5' \\\n -d 'fsc=true' \\\n -d 'print_speed=core'\n"
}
]
}
},
"/booklets/{booklet_id}": {
"delete": {
"description": "Completely removes a booklet from production. This can only be done if the booklet's `send_date` has not yet passed. If the booklet is successfully canceled, you will not be charged for it.",
"operationId": "booklet_delete",
"responses": {
"200": {
"$ref": "#/components/responses/booklet_deleted"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "Delete",
"tags": [
"Booklets"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X DELETE https://api.lob.com/v1/booklets/ord_0d6a16a3fff6318ac8f8008dc1 \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
}
]
},
"get": {
"description": "Retrieves the details of an existing booklet. You need to only supply the unique booklet identifier that was returned upon booklet creation.",
"operationId": "booklet_retrieve",
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/booklet"
},
"description": "Returns a booklet object"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "Retrieve",
"tags": [
"Booklets"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X GET \"https://api.lob.com/v1/booklets/ord_0d6a16a3fff6318ac8f8008dc1\" \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
}
]
},
"parameters": [
{
"description": "id of the booklet",
"in": "path",
"name": "booklet_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/booklet_id"
}
}
]
},
"/buckslips": {
"get": {
"description": "Returns a list of your buckslips. The buckslips are returned sorted by creation date, with the most recently created buckslips appearing first.",
"operationId": "buckslips_list",
"parameters": [
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/before_after"
},
{
"$ref": "#/components/parameters/include"
}
],
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/all_buckslips"
},
"description": "Returns a list of buckslip objects"
},
"default": {
"$ref": "#/components/responses/buckslip_error"
}
},
"summary": "List",
"tags": [
"Buckslips"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X GET \"https://api.lob.com/v1/buckslips?limit=2\" \\\n -u <YOUR API KEY>:\n"
}
]
},
"post": {
"description": "Creates a new buckslip given information",
"operationId": "buckslip_create",
"requestBody": {
"content": {
"application/json": {
"example": {
"back": "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/buckslip.pdf",
"description": "Test buckslip",
"front": "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/buckslip.pdf"
},
"schema": {
"$ref": "#/components/schemas/buckslip_editable"
}
},
"application/x-www-form-urlencoded": {
"example": {
"back": "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/buckslip.pdf",
"description": "Test buckslip",
"front": "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/buckslip.pdf"
},
"schema": {
"$ref": "#/components/schemas/buckslip_editable"
}
},
"multipart/form-data": {
"example": {
"back": "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/buckslip.pdf",
"description": "Test buckslip",
"front": "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/buckslip.pdf"
},
"schema": {
"$ref": "#/components/schemas/buckslip_editable"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/buckslip"
},
"description": "Buckslip created successfully"
},
"default": {
"$ref": "#/components/responses/buckslip_error"
}
},
"summary": "Create",
"tags": [
"Buckslips"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/buckslips \\\n -u <YOUR API KEY>: \\\n -d \"description=Test buckslip\" \\\n -d \"front=https://s3-us-west-2.amazonaws.com/public.lob.com/assets/buckslip.pdf\" \\\n -d \"back=https://s3-us-west-2.amazonaws.com/public.lob.com/assets/buckslip.pdf\"\n"
}
]
}
},
"/buckslips/{buckslip_id}": {
"delete": {
"description": "Delete an existing buckslip. You need only supply the unique identifier that was returned upon buckslip creation.",
"operationId": "buckslip_delete",
"responses": {
"200": {
"$ref": "#/components/responses/buckslip_deleted"
},
"default": {
"$ref": "#/components/responses/buckslip_error"
}
},
"summary": "Delete",
"tags": [
"Buckslips"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X DELETE https://api.lob.com/v1/buckslips/bck_7a6d73c5c8457fc \\\n -u <YOUR API KEY>:\n"
}
]
},
"get": {
"description": "Retrieves the details of an existing buckslip. You need only supply the unique customer identifier that was returned upon buckslip creation.",
"operationId": "buckslip_retrieve",
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/buckslip"
},
"description": "Returns a buckslip object"
},
"default": {
"$ref": "#/components/responses/buckslip_error"
}
},
"summary": "Retrieve",
"tags": [
"Buckslips"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/buckslips/bck_7a6d73c5c8457fc \\\n -u <YOUR API KEY>:\n"
}
]
},
"parameters": [
{
"description": "id of the buckslip",
"in": "path",
"name": "buckslip_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/buckslip_id"
}
}
],
"patch": {
"description": "Update the details of an existing buckslip. You need only supply the unique identifier that was returned upon buckslip creation.",
"operationId": "buckslip_update",
"requestBody": {
"content": {
"application/json": {
"example": {
"auto_reorder": true,
"description": "Test buckslip"
},
"schema": {
"$ref": "#/components/schemas/buckslip_updatable"
}
},
"application/x-www-form-urlencoded": {
"example": {
"auto_reorder": true,
"description": "Test buckslip"
},
"schema": {
"$ref": "#/components/schemas/buckslip_updatable"
}
},
"multipart/form-data": {
"example": {
"auto_reorder": true,
"description": "Test buckslip"
},
"schema": {
"$ref": "#/components/schemas/buckslip_updatable"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/buckslip"
},
"description": "Returns a buckslip object"
},
"default": {
"$ref": "#/components/responses/buckslip_error"
}
},
"summary": "Update",
"tags": [
"Buckslips"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X PATCH https://api.lob.com/v1/buckslips/bck_7a6d73c5c8457fc \\\n -u <YOUR API KEY>: \\\n -d \"description=Awesome buckslip\" \\\n -d \"auto_reorder=true\"\n"
}
]
}
},
"/buckslips/{buckslip_id}/orders": {
"get": {
"description": "Retrieves the buckslip orders associated with the given buckslip id.",
"operationId": "buckslip_orders_retrieve",
"parameters": [
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/offset"
}
],
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/all_buckslip_orders"
},
"description": "Returns the buckslip orders associated with the given buckslip id"
},
"default": {
"$ref": "#/components/responses/buckslip_order_error"
}
},
"summary": "Retrieve",
"tags": [
"Buckslip Orders"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/buckslips/bck_6afffd19045076c/orders/ \\\n -u <YOUR API KEY>:\n"
}
]
},
"parameters": [
{
"description": "The ID of the buckslip to which the buckslip orders belong.",
"in": "path",
"name": "buckslip_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/buckslip_id"
}
}
],
"post": {
"description": "Creates a new buckslip order given information",
"operationId": "buckslip_order_create",
"requestBody": {
"content": {
"application/json": {
"example": {
"quantity": 10000
},
"schema": {
"$ref": "#/components/schemas/buckslip_order_editable"
}
},
"application/x-www-form-urlencoded": {
"example": {
"quantity": 10000
},
"schema": {
"$ref": "#/components/schemas/buckslip_order_editable"
}
},
"multipart/form-data": {
"example": {
"quantity": 10000
},
"schema": {
"$ref": "#/components/schemas/buckslip_order_editable"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/buckslip_order"
},
"description": "Buckslip order created successfully"
},
"default": {
"$ref": "#/components/responses/buckslip_error"
}
},
"summary": "Create",
"tags": [
"Buckslip Orders"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/buckslips/bck_6afffd19045076c/orders \\\n -u <YOUR API KEY>: \\\n -d \"quantity=10000\"\n"
}
]
}
},
"/bulk/intl_verifications": {
"post": {
"description": "Verify a list of international (except US or US territories) address _with a live API key_. Requests to this endpoint with a test API key will return a dummy response based on the primary line you input.",
"operationId": "bulk_intl_verifications",
"requestBody": {
"content": {
"application/json": {
"example": {
"addresses": [
{
"city": "Summerside",
"country": "CA",
"postal_code": "C1N 1C4",
"primary_line": "370 Water St",
"recipient": "John Doe",
"secondary_line": "",
"state": "Prince Edwards Island"
},
{
"city": "MOSCOW",
"country": "RU",
"postal_code": "115569",
"primary_line": "UL. DOLSKAYA 1",
"recipient": "Jane Doe",
"secondary_line": "",
"state": "MOSCOW G"
}
]
},
"schema": {
"$ref": "#/components/schemas/intl_verifications_payload"
}
},
"multipart/form-data": {
"example": {
"addresses": [
{
"city": "Summerside",
"country": "CA",
"postal_code": "C1N 1C4",
"primary_line": "370 Water St",
"recipient": "John Doe",
"secondary_line": "",
"state": "Prince Edwards Island"
},
{
"city": "MOSCOW",
"country": "RU",
"postal_code": "115569",
"primary_line": "UL. DOLSKAYA 1",
"recipient": "Jane Doe",
"secondary_line": "",
"state": "MOSCOW G"
}
]
},
"schema": {
"$ref": "#/components/schemas/intl_verifications_payload"
}
}
},
"required": true
},
"responses": {
"200": {
"$ref": "#/components/responses/bulk_intl_verifications"
},
"default": {
"$ref": "#/components/responses/intl_verifications_error"
}
},
"summary": "Bulk Verify",
"tags": [
"Intl Verifications"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/bulk/intl_verifications \\\n-u <YOUR LIVE API KEY>: \\\n--header 'Content-Type: application/x-www-form-urlencoded' \\\n--data-urlencode 'addresses[0][primary_line]=370 WATER ST' \\\n--data-urlencode 'addresses[0][postal_code]=C1N 1C4' \\\n--data-urlencode 'addresses[0][country]=CA'\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "const IntlVerifications = new IntlVerificationsApi(av_config);\nlet verificationData1: IntlVerificationWritable = {\n primary_line: '370 WATER ST',\n postal_code: 'C1N 1C4',\n country: CountryExtended.Ca\n};\nconst verificationData2: IntlVerificationWritable = {\n primary_line: '012 PLACEHOLDER ST',\n postal_code: 'F0O 8A2',\n country: CountryExtended.Ca\n};\nlet addressList = new IntlVerificationsPayload({\n addresses: [verificationData1, verificationData2]\n});\n\ntry {\n const bulkVerified = await IntlVerifications.verifyBulk(addressList);\n\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.bulkIntlVerifications.verify({\n addresses: [{\n primary_line: '370 Water St',\n secondary_line: '',\n city: 'Summerside',\n state: 'Prince Edward Island',\n postal_code: 'C1N 1C4',\n country: 'CA'\n }]\n}), function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "intlVerificationsApi = IntlVerificationsApi.new(config)\n\nverificationData0 = MultipleComponentsIntl.new({\n primary_line: \"35 Tower Hill\",\n city: \"London\",\n postal_code: \"EC3N 4DR\",\n country: \"GB\",\n})\n\nverificationData1 = MultipleComponentsIntl.new({\n primary_line: \"370 Water St\",\n city: \"Summerside\",\n state: \"Prince Edward Island\",\n postal_code: \"C1N 1C4\",\n country: \"CA\",\n})\n\n\naddressList = IntlVerificationsPayload.new({\n addresses: [\n verificationData0,\n verificationData1,\n ],\n})\n\nbegin\n bulkVerifiedAddrs = intlVerificationsApi.verifyBulk(addressList)\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = IntlVerificationsApi(api_client)\n\nverification_data_0 = MultipleComponentsIntl(\n primary_line = \"35 Tower Hill\",\n city = \"London\",\n postal_code = \"EC3N 4DR\",\n country = CountryExtended(\"GB\"),\n)\n\nverification_data_1 = MultipleComponentsIntl(\n primary_line = \"370 Water St\",\n city = \"Summerside\",\n state = \"Prince Edward Island\",\n postal_code = \"C1N 1C4\",\n country = CountryExtended(\"CA\"),\n)\n\n\naddress_list = IntlVerificationsPayload(\n addresses = [\n verification_data_0,\n verification_data_1,\n ],\n)\n\ntry:\n bulk_verified = api.verifyBulk(address_list)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$verificationData0 = new OpenAPI\\Client\\Model\\MultipleComponentsIntl(array(\n 'primary_line' => '35 Tower Hill',\n 'city' => 'London',\n 'postal_code' => 'EC3N 4DR',\n 'country' => 'GB',\n));\n\n$verificationData1 = new OpenAPI\\Client\\Model\\MultipleComponentsIntl(array(\n 'primary_line' => '370 Water St',\n 'city' => 'Summerside',\n 'state' => 'Prince Edward Island',\n 'postal_code' => 'C1N 1C4',\n 'country' => 'CA',\n));\n\n$addressList = new OpenAPI\\Client\\Model\\IntlVerificationsPayload(array(\n 'addresses' => [\n $verificationData0,\n $verificationData1,\n ]\n));\n\ntry {\n $result = $apiInstance->verifyBulk($addressList);\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "List<IntlVerification.RequestBuilder> addresses = new ArrayList<IntlVerification.RequestBuilder>();\naddresses.add(new IntlVerification.RequestBuilder()\n .setPrimaryLine(\"370 Water St\")\n .setCity(\"Summerside\")\n .setState(\"Prince Edward Island\")\n .setPostalCode(\"C1N 1C4\")\n .setCountry(\"CA\"));\nLobResponse<BulkIntlVerification> response = new BulkIntlVerification.RequestBuilder()\n .setAddresses(addresses)\n .verify();\nBulkIntlVerification bulkIntlVerification = response.getResponseBody();\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.BulkIntlVerification.verify.verify(\n%{addresses:[\n {\n primary_line: '370 Water St',\n secondary_line: '',\n city: 'Summerside',\n state: 'Prince Edward Island',\n postal_code: 'C1N 1C4',\n country: 'CA'\n }\n ]\n})\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "List<MultipleComponentsIntl> addresses = new List<MultipleComponentsIntl>();\nMultipleComponentsIntl bulkAddress0 = new MultipleComponentsIntl(\n null, // recipient\n \"35 Tower Hill\", // primaryLine\n null, // secondaryLine\n \"London\", // city\n null, // state\n \"EC3N 4DR\", // postalCode\n CountryExtended.GB // country\n);\naddresses.Add(bulkAddress0);\n\nMultipleComponentsIntl bulkAddress1 = new MultipleComponentsIntl(\n null, // recipient\n \"370 Water St\", // primaryLine\n null, // secondaryLine\n \"Summerside\", // city\n \"Prince Edward Island\", // state\n \"C1N 1C4\", // postalCode\n CountryExtended.CA // country\n);\naddresses.Add(bulkAddress1);\n\nIntlVerificationsPayload bulkVerify = new IntlVerificationsPayload(addresses);\n\nIntlVerificationsApi api = new IntlVerificationsApi(config);\n\ntry {\n IntlVerifications bulkVerifyResponse = api.verifyBulk(bulkVerify);\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
}
]
}
},
"/bulk/us_verifications": {
"post": {
"description": "Verify a list of US or US territory addresses _with a live API key_. Requests to this endpoint with a test API key will return a dummy response based on the primary line you input.",
"operationId": "bulk_us_verifications",
"parameters": [
{
"description": "Casing of the verified address. Possible values are `upper` and `proper` for uppercased (e.g. \"PO BOX\") and proper-cased (e.g. \"PO Box\"), respectively. Only affects `recipient`, `primary_line`, `secondary_line`, `urbanization`, and `last_line`. Default casing is `upper`.",
"in": "query",
"name": "case",
"required": false,
"schema": {
"default": "upper",
"enum": [
"upper",
"proper"
],
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"example": {
"addresses": [
{
"city": "San Francisco",
"primary_line": "210 King Street",
"state": "CA",
"zip_code": "94107"
},
{
"city": "RIO PIEDRAS",
"primary_line": "Ave Wilson Churchill 123",
"recipient": "Walgreens",
"secondary_line": "",
"state": "PR",
"urbanization": "URB FAIR OAKS",
"zip_code": "00926"
}
]
},
"schema": {
"$ref": "#/components/schemas/multiple_components_list"
}
},
"application/x-www-form-urlencoded": {
"example": {
"addresses": [
{
"city": "San Francisco",
"primary_line": "210 King Street",
"state": "CA",
"zip_code": "94107"
},
{
"city": "RIO PIEDRAS",
"primary_line": "Ave Wilson Churchill 123",
"recipient": "Walgreens",
"secondary_line": "",
"state": "PR",
"urbanization": "URB FAIR OAKS",
"zip_code": "00926"
}
]
},
"schema": {
"$ref": "#/components/schemas/multiple_components_list"
}
},
"multipart/form-data": {
"example": {
"addresses": [
{
"city": "San Francisco",
"primary_line": "210 King Street",
"state": "CA",
"zip_code": "94107"
},
{
"city": "RIO PIEDRAS",
"primary_line": "Ave Wilson Churchill 123",
"recipient": "Walgreens",
"secondary_line": "",
"state": "PR",
"urbanization": "URB FAIR OAKS",
"zip_code": "00926"
}
]
},
"schema": {
"$ref": "#/components/schemas/multiple_components_list"
}
}
},
"required": true
},
"responses": {
"200": {
"$ref": "#/components/responses/bulk_us_verifications"
},
"default": {
"$ref": "#/components/responses/us_verifications_error"
}
},
"summary": "Bulk Verify",
"tags": [
"US Verifications"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/bulk/us_verifications \\\n-u <YOUR LIVE API KEY>: \\\n--header 'Content-Type: application/x-www-form-urlencoded' \\\n--data-urlencode 'addresses[0][primary_line]=210 King Street' \\\n--data-urlencode 'addresses[0][city]=San Francisco' \\\n--data-urlencode 'addresses[0][state]=CA' \\\n--data-urlencode 'addresses[0][zip_code]=94017'\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "const UsVerifications = new USVerificationsApi(av_config);\nconst verificationData1: UsVerificationsWritable = {\n primary_line: '210 King St',\n city: 'San Francisco',\n state: 'CA',\n zip_code: '94107'\n};\nconst verificationData2: UsVerificationsWritable = {\n primary_line: '185 BERRY ST STE 6600',\n city: 'SAN FRANCISCO',\n state: 'CA',\n zip_code: '94107'\n};\nconst addressList: MultipleComponentsList = {\n addresses: [verificationData1, verificationData2],\n};\n\ntry {\n const bulkVerified = await UsVerifications.verifyBulk(addressList);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.bulkUSVerifications.verify({\n addresses: [{\n primary_line: '210 King St',\n city: 'San Francisco',\n state: 'CA',\n zip_code: '94107'\n }]\n}), function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "usVerificationsApi = UsVerificationsApi.new(config)\n\nverificationData0 = MultipleComponents.new({\n primary_line: \"210 King Street\",\n city: \"San Francisco\",\n state: \"CA\",\n zip_code: \"94017\",\n})\n\nverificationData1 = MultipleComponents.new({\n primary_line: \"185 BERRY ST STE 6600\",\n city: \"SAN FRANCISCO\",\n state: \"CA\",\n zip_code: \"94017\",\n})\n\n\naddressList = MultipleComponentsList.new({\n addresses: [\n verificationData0,\n verificationData1,\n ],\n})\n\nbegin\n bulkVerifiedAddrs = usVerificationsApi.verifyBulk(addressList)\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = UsVerificationsApi(api_client)\n\nverification_data_0 = MultipleComponents(\n primary_line = \"210 King Street\",\n city = \"San Francisco\",\n state = \"CA\",\n zip_code = \"94017\",\n)\n\nverification_data_1 = MultipleComponents(\n primary_line = \"185 BERRY ST STE 6600\",\n city = \"SAN FRANCISCO\",\n state = \"CA\",\n zip_code = \"94017\",\n)\n\n\naddress_list = MultipleComponentsList(\n addresses = [\n verification_data_0,\n verification_data_1,\n ],\n)\n\ntry:\n bulk_verified = api.verifyBulk(address_list)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$verificationData0 = new OpenAPI\\Client\\Model\\MultipleComponents(array(\n 'primary_line' => '210 King Street',\n 'city' => 'San Francisco',\n 'state' => 'CA',\n 'zip_code' => '94017',\n));\n\n$verificationData1 = new OpenAPI\\Client\\Model\\MultipleComponents(array(\n 'primary_line' => '185 BERRY ST STE 6600',\n 'city' => 'SAN FRANCISCO',\n 'state' => 'CA',\n 'zip_code' => '94017',\n));\n\n$addressList = new OpenAPI\\Client\\Model\\MultipleComponentsList(array(\n 'addresses' => [\n $verificationData0,\n $verificationData1,\n ]\n));\n\ntry {\n $result = $apiInstance->verifyBulk($addressList);\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "MultipleComponentsList bulkVerify = new MultipleComponentsList();\nMultipleComponents bulkAddress0 = new MultipleComponents();\nbulkAddress0.setPrimaryLine(\"210 King Street\");\nbulkAddress0.setCity(\"San Francisco\");\nbulkAddress0.setState(\"CA\");\nbulkAddress0.setZipCode(\"94017\");\nbulkVerify.addAddressesItem(bulkAddress0);\n\nMultipleComponents bulkAddress1 = new MultipleComponents();\nbulkAddress1.setPrimaryLine(\"185 BERRY ST STE 6600\");\nbulkAddress1.setCity(\"SAN FRANCISCO\");\nbulkAddress1.setState(\"CA\");\nbulkAddress1.setZipCode(\"94017\");\nbulkVerify.addAddressesItem(bulkAddress1);\n\nUsVerificationsApi apiInstance = new UsVerificationsApi(config);\ntry {\n UsVerifications bulkVerifyResponse = apiInstance.verifyBulk(bulkVerify, null);\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.BulkUSVerification.verify.verify(\n%{\n addresses:[\n {\n primary_line: \"210 King Street\",\n city: \"San Francisco\",\n state: \"CA\",\n zip_code: \"94107\"\n }\n ]\n})\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "List<MultipleComponents> addresses = new List<MultipleComponents>();\nMultipleComponents bulkAddress0 = new MultipleComponents(\n null, // recipient\n \"210 King Street\", // primaryLine\n null, // secondaryLine\n null, // urbanization\n \"San Francisco\", // city\n \"CA\", // state\n \"94017\" // zipCode\n);\naddresses.Add(bulkAddress0);\n\nMultipleComponents bulkAddress1 = new MultipleComponents(\n null, // recipient\n \"185 BERRY ST STE 6600\", // primaryLine\n null, // secondaryLine\n null, // urbanization\n \"San Francisco\", // city\n \"CA\", // state\n \"94017\" // zipCode\n);\naddresses.Add(bulkAddress1);\n\nMultipleComponentsList bulkVerify = new MultipleComponentsList(addresses);\n\nUsVerificationsApi api = new UsVerificationsApi(config);\ntry {\n UsVerifications bulkVerifyResponse = api.verifyBulk(bulkVerify, null);\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
}
]
}
},
"/campaigns": {
"get": {
"description": "Returns a list of your campaigns. The campaigns are returned sorted by creation date, with the most recently created campaigns appearing first.",
"operationId": "campaigns_list",
"parameters": [
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/include"
},
{
"$ref": "#/components/parameters/before_after"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/all_campaigns"
}
},
"summary": "List",
"tags": [
"Campaigns"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/campaigns \\\n -u <YOUR API KEY>:\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "campaignsApi = CampaignsApi.new(config)\n\nbegin\n campaigns = campaignsApi.list({ limit: 2 })\nrescue => err\n p err.message\nend\n"
}
]
},
"post": {
"description": "Creates a new campaign with the provided properties. See how to launch your first campaign [here](https://help.lob.com/print-and-mail/building-a-mail-strategy/campaign-or-triggered-sends/launch-your-first-campaign).",
"operationId": "campaign_create",
"parameters": [
{
"$ref": "#/components/parameters/lang_spec"
}
],
"requestBody": {
"content": {
"application/json": {
"example": {
"description": "My Campaign's description",
"name": "My Demo Campaign",
"print_speed": "core",
"schedule_type": "immediate"
},
"schema": {
"$ref": "#/components/schemas/campaign_writable"
}
},
"application/x-www-form-urlencoded": {
"encoding": {
"example-prop": {
"explode": true,
"style": "deepObject"
}
},
"example": {
"description": "My Campaign's description",
"name": "My Demo Campaign",
"print_speed": "core",
"schedule_type": "immediate"
},
"schema": {
"$ref": "#/components/schemas/campaign_writable"
}
},
"multipart/form-data": {
"example": {
"description": "My Campaign's description",
"name": "My Demo Campaign",
"print_speed": "core",
"schedule_type": "immediate"
},
"schema": {
"$ref": "#/components/schemas/campaign_writable"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/campaign"
},
"description": "Campaign created successfully"
},
"default": {
"$ref": "#/components/responses/campaigns_error"
}
},
"summary": "Create",
"tags": [
"Campaigns"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/campaigns \\\n -u <YOUR API KEY>: \\\n -d \"name=My First Campaign\" \\\n -d \"schedule_type=immediate\" \\\n -d \"print_speed=core\"\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "campaignCreate = CampaignWritable.new({\n name: \"My First Campaign\",\n schedule_type: \"immediate\",\n print_speed: \"core\",\n});\n\ncampaignApi = CampaignsApi.new(config)\n\nbegin\n createdCampaign = campaignApi.create(campaignCreate)\nrescue => err\n p err.message\nend\n"
}
]
}
},
"/campaigns/{cmp_id}": {
"delete": {
"description": "Delete an existing campaign. You need only supply the unique identifier that was returned upon campaign creation. Deleting a campaign also deletes any associated mail pieces that have been created but not sent. A campaign's `send_date` matches its associated mail pieces' `send_date`s.",
"operationId": "campaign_delete",
"responses": {
"200": {
"$ref": "#/components/responses/campaign_deleted"
},
"default": {
"$ref": "#/components/responses/campaigns_error"
}
},
"summary": "Delete",
"tags": [
"Campaigns"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X DELETE https://api.lob.com/v1/campaigns/cmp_e05ee61ff80764b \\\n -u <YOUR API KEY>:\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "campaignApi = CampaignsApi.new(config)\n\nbegin\n deletedCampaign = campaignApi.delete(\"cmp_e05ee61ff80764b\")\nrescue => err\n p err.message\nend\n"
}
]
},
"get": {
"description": "Retrieves the details of an existing campaign. You need only supply the unique campaign identifier that was returned upon campaign creation.",
"operationId": "campaign_retrieve",
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/campaign"
},
"description": "Returns a campaign object"
},
"default": {
"$ref": "#/components/responses/campaigns_error"
}
},
"summary": "Retrieve",
"tags": [
"Campaigns"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/campaigns/cmp_e05ee61ff80764b \\\n -u <YOUR API KEY>:\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "campaignApi = CampaignsApi.new(config)\n\nbegin\n retrievedCampaign = campaignApi.get(\"cmp_e05ee61ff80764b\")\nrescue => err\n p err.message\nend\n"
}
]
},
"parameters": [
{
"description": "id of the campaign",
"in": "path",
"name": "cmp_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/cmp_id"
}
}
],
"patch": {
"description": "Update the details of an existing campaign. You need only supply the unique identifier that was returned upon campaign creation.",
"operationId": "campaign_update",
"requestBody": {
"content": {
"application/json": {
"example": {
"description": "Test campaign"
},
"schema": {
"$ref": "#/components/schemas/campaign_updatable"
}
},
"application/x-www-form-urlencoded": {
"example": {
"description": "Test campaign"
},
"schema": {
"$ref": "#/components/schemas/campaign_updatable"
}
},
"multipart/form-data": {
"example": {
"description": "Test campaign"
},
"schema": {
"$ref": "#/components/schemas/campaign_updatable"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/campaign"
},
"description": "Returns a campaign object"
},
"default": {
"$ref": "#/components/responses/campaigns_error"
}
},
"summary": "Update",
"tags": [
"Campaigns"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X PATCH https://api.lob.com/v1/campaigns/cmp_e05ee61ff80764b \\\n -u <YOUR API KEY>: \\\n -d \"description=Awesome campaign\"\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "campaign_updatable = CampaignUpdatable(\n description = \"Awesome campaign\",\n)\n\nwith ApiClient(configuration) as api_client:\n api = CampaignsApi(api_client)\n\ntry:\n updated_campaign = api.update(\"cmp_e05ee61ff80764b\", campaign_updatable)\nexcept ApiException as e:\n print(e)\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "campaignUpdatable = CampaignUpdatable.new({\n description: \"Awesome campaign\",\n})\n\ncampaignApi = CampaignsApi.new(config)\n\nbegin\n updatedCampaign = campaignApi.update(\"cmp_e05ee61ff80764b\", campaignUpdatable)\nrescue => err\n p err.message\nend\n"
}
]
}
},
"/campaigns/{cmp_id}/send": {
"parameters": [
{
"description": "id of the campaign",
"in": "path",
"name": "cmp_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/cmp_id"
}
}
],
"post": {
"description": "Sends a campaign. You need only supply the unique campaign identifier that was returned upon campaign creation.",
"operationId": "campaign_send",
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/campaign"
},
"description": "Returns a campaign object"
},
"default": {
"$ref": "#/components/responses/campaigns_error"
}
},
"summary": "Send Campaign",
"tags": [
"Campaigns"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/campaigns/cmp_e05ee61ff80764b/send \\\n -u <YOUR API KEY>:\n"
}
]
}
},
"/cards": {
"get": {
"description": "Returns a list of your cards. The cards are returned sorted by creation date, with the most recently created addresses appearing first.",
"operationId": "cards_list",
"parameters": [
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/before_after"
},
{
"$ref": "#/components/parameters/include"
}
],
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/all_cards"
},
"description": "Returns a list of card objects"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "List",
"tags": [
"Cards"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X GET \"https://api.lob.com/v1/cards?limit=2\" \\\n -u <YOUR API KEY>:\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "try {\n const cards = await new CardsApi(config).list(2);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.cards.list({limit: 2}, function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = CardsApi(api_client)\n\ntry:\n cards = api.list(limit=2)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$lob->cards()->all(array(\n 'limit' => 2\n));\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "CardsApi api = new CardsApi(config);\nList<string> includeList = new List<string>();\nincludeList.Add(\"total_count\");\n\ntry {\n CardList response = api.list(\n 2, // limit\n null, // before\n null, // after\n includeList // include\n );\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "cardsApi = CardsApi.new(config)\n\nbegin\n cards = cardsApi.list({ limit: 2 })\nrescue => err\n p err.message\nend\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\nCardList = apiClient.CardsApi.List(context).Execute()\nif err != nil {\n return err\n}\n"
}
]
},
"post": {
"description": "Creates a new card given information",
"operationId": "card_create",
"requestBody": {
"content": {
"application/json": {
"example": {
"back": "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf",
"description": "Test card",
"front": "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf",
"size": "2.125x3.375"
},
"schema": {
"$ref": "#/components/schemas/card_editable"
}
},
"application/x-www-form-urlencoded": {
"example": {
"back": "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf",
"description": "Test card",
"front": "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf",
"size": "2.125x3.375"
},
"schema": {
"$ref": "#/components/schemas/card_editable"
}
},
"multipart/form-data": {
"example": {
"back": "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf",
"description": "Test card",
"front": "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf",
"size": "2.125x3.375"
},
"schema": {
"$ref": "#/components/schemas/card_editable"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/card"
},
"description": "Card created successfully"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "Create",
"tags": [
"Cards"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/cards \\\n -u <YOUR API KEY>: \\\n -d \"description=Test card\" \\\n -d \"front=https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf\" \\\n -d \"back=https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf\" \\\n -d \"size=2.125x3.375\"\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "const cardsCreate = new CardEditable({\n front: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf',\n back: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf',\n size: CardEditableSizeEnum._2125x3375,\n description: 'Test card'\n});\n\ntry {\n const myCard = await new CardsApi(config).create(cardsCreate);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.cards.create({\n description: 'Test card',\n front: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf',\n back: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf',\n size: '2.125x3.375'\n}, function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "card_editable = CardEditable(\n front = \"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf\",\n back = \"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf\",\n size = \"2.125x3.375\",\n description = \"Test Card\",\n)\n\nwith ApiClient(configuration) as api_client:\n api = CardsApi(api_client)\n\ntry:\n created_card = api.create(card_editable)\nexcept ApiException as e:\n print(e)\n"
},
{
"label": "PHP",
"lang": "PHP",
"source": "$lob->cards()->create(array(\n 'description' => 'Test card',\n 'front' => 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf',\n 'back' => 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf',\n 'size' => => '2.125x3.375'\n));\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "CardsApi api = new CardsApi(config);\n\nCardEditable cardEditable = new CardEditable(\n \"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf\", // front\n \"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf\", // back\n CardEditable.SizeEnum._2125x3375, // size\n \"Test Card\" // description\n);\n\ntry {\n Card result = api.create(cardEditable);\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "cardCreate = CardEditable.new({\n front: \"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf\",\n back: \"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf\",\n size: \"2.125x3.375\",\n description: \"Test Card\",\n});\n\ncardApi = CardsApi.new(config)\n\nbegin\n createdCard = cardApi.create(cardCreate)\nrescue => err\n p err.message\nend\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\n\nvar cardCreate = *lob.NewCardEditable()\ncardCreate.SetFront(\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf\")\ncardCreate.SetBack(\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf\")\ncardCreate.SetSize(\"2.125x3.375\")\ncardCreate.SetDescription(\"Test Card\")\n\n\n\ncreatedcard, _, err := apiClient.CardsApi.Create(context).CardEditable(cardCreate).Execute()\n\nif err != nil {\n return err\n}\n"
}
]
}
},
"/cards/{card_id}": {
"delete": {
"description": "Delete an existing card. You need only supply the unique identifier that was returned upon card creation.",
"operationId": "card_delete",
"responses": {
"200": {
"$ref": "#/components/responses/card_deleted"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "Delete",
"tags": [
"Cards"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X DELETE https://api.lob.com/v1/cards/card_7a6d73c5c8457fc \\\n -u <YOUR API KEY>:\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "try {\n const deleteCard = await new CardsApi(config).delete('card_xxxx');\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.cards.delete('card_7a6d73c5c8457fc', function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = CardsApi(api_client)\n\ntry:\n deleted_resource = api.delete(\"card_6afffd19045076c\")\nexcept ApiException as e:\n print(e)\n"
},
{
"label": "PHP",
"lang": "PHP",
"source": "$lob->cards()->delete('card_7a6d73c5c8457fc');\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "CardsApi api = new CardsApi(config);\n\ntry {\n CardDeletion response = api.delete(\"card_6afffd19045076c\");\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "cardApi = CardsApi.new(config)\n\nbegin\n deletedCard = cardApi.delete(\"card_6afffd19045076c\")\nrescue => err\n p err.message\nend\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\ndeletedCard, _, err := apiClient.CardsApi.Delete(context, \"card_6afffd19045076c\").Execute()\n\nif err != nil {\n return err\n}\n"
}
]
},
"get": {
"description": "Retrieves the details of an existing card. You need only supply the unique customer identifier that was returned upon card creation.",
"operationId": "card_retrieve",
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/card"
},
"description": "Returns a card object"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "Retrieve",
"tags": [
"Cards"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/cards/card_7a6d73c5c8457fc \\\n -u <YOUR API KEY>:\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "try {\n const card = await new CardsApi(config).get('card_xxxx');\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.cards.retrieve('card_7a6d73c5c8457fc', function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = CardsApi(api_client)\n\ntry:\n card = api.get(\"card_7a6d73c5c8457fc\")\nexcept ApiException as e:\n print(e)\n"
},
{
"label": "PHP",
"lang": "PHP",
"source": "$lob->cards()->get('card_7a6d73c5c8457fc');\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "CardsApi api = new CardsApi(config);\n\ntry {\n Card response = api.get(\"card_7a6d73c5c8457fc\");\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "cardApi = CardsApi.new(config)\n\nbegin\n retrievedCard = cardApi.get(\"card_7a6d73c5c8457fc\")\nrescue => err\n p err.message\nend\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\nfetchedCard, _, err := apiClient.CardsApi.Get(context,\"card_7a6d73c5c8457fc\").Execute()\n\nif err != nil {\n return err\n}\n"
}
]
},
"parameters": [
{
"description": "id of the card",
"in": "path",
"name": "card_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/card_id"
}
}
],
"post": {
"description": "Update the details of an existing card. You need only supply the unique identifier that was returned upon card creation.",
"operationId": "card_update",
"requestBody": {
"content": {
"application/json": {
"example": {
"auto_reorder": true,
"description": "Test card"
},
"schema": {
"$ref": "#/components/schemas/card_updatable"
}
},
"application/x-www-form-urlencoded": {
"example": {
"auto_reorder": true,
"description": "Test card"
},
"schema": {
"$ref": "#/components/schemas/card_updatable"
}
},
"multipart/form-data": {
"example": {
"auto_reorder": true,
"description": "Test card"
},
"schema": {
"$ref": "#/components/schemas/card_updatable"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/card"
},
"description": "Returns a card object"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "Update",
"tags": [
"Cards"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X POST https://api.lob.com/v1/cards/card_7a6d73c5c8457fc \\\n -u <YOUR API KEY>: \\\n -d \"description=Awesome card\" \\\n -d \"auto_reorder=true\"\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "const cardUpdatable = new CardEditable ({\n description: 'Awesome card',\n auto_reorder: true\n});\n\ntry {\n await new CardsApi(config).update(cardUpdatable);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.cards.update('card_7a6d73c5c8457fc', {\n description: 'Awesome card',\n auto_reorder: true\n}, function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "CardsApi api = new CardsApi(config);\nCardUpdatable update = new CardUpdatable(\"Awesome card\", true, 15000);\n\ntry {\n api.update(\"card_6afffd19045076c\", update);\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "card_updatable = CardUpdatable(\n description = \"Awesome card\",\n auto_reorder = True,\n reorder_quantity = 10000,\n)\n\nwith ApiClient(configuration) as api_client:\n api = CardsApi(api_client)\n\ntry:\n updated_card = api.update(\"card_6afffd19045076c\", card_updatable)\nexcept ApiException as e:\n print(e)\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "cardUpdatable = CardUpdatable.new({\n description: \"Awesome card\",\n auto_reorder: \"true\",\n reorder_quantity: 10000,\n})\n\ncardApi = CardsApi.new(config)\n\nbegin\n updatedCard = cardApi.update(\"card_6afffd19045076c\", cardUpdatable)\nrescue => err\n p err.message\nend\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\ncardEditable = *lob.NewCardEditable(\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf()\")\ncreatedCard, _, _ := apiClient.CardsApi.Create(context).CardEditable(suite.cardEditable).Execute()\nvar updatedCard = *lob.NewCardUpdatable()\nupdatedCard.SetDescription(\"Card was updated\")\n\nresp, _, err := suite.apiClient.CardsApi.Update(context, createdCard.Id).CardUpdatable(updatedCard).Execute()\n\nif err != nil {\n return err\n}\n"
}
]
}
},
"/cards/{card_id}/orders": {
"get": {
"description": "Retrieves the card orders associated with the given card id.",
"operationId": "card_orders_retrieve",
"parameters": [
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/offset"
}
],
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/all_card_orders"
},
"description": "Returns the card orders associated with the given card id"
},
"default": {
"$ref": "#/components/responses/card_order_error"
}
},
"summary": "Retrieve",
"tags": [
"Card Orders"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/cards/card_6afffd19045076c/orders/ \\\n -u <YOUR API KEY>:\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "try {\n const cardOrders = await new CardOrdersApi(cofig).get( 'co_xxxx' );\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.cardOrders.list('card_6afffd19045076c', function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = CardOrdersApi(api_client)\n\ntry:\n card_order = api.get(\"card_6afffd19045076c\", limit = 2, offset = 1)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$lob->cardOrders('card_6afffd19045076c')->all();\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "CardOrdersApi api = new CardOrdersApi(config);\n\ntry {\n CardOrderList response = api.get(\"card_6afffd19045076c\", 2, 1);\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "cardOrderApi = CardOrdersApi.new(config)\n\nbegin\n retrievedCardOrderList = cardOrderApi.get(\"card_6afffd19045076c\", { limit: 2, offset: 1 })\nrescue => err\n p err.message\nend\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\nfetchedCardOrderList, _, err := apiClient.CardOrdersApi.Get(context, \"card_6afffd19045076c\").Execute()\n\nif err != nil {\n return err\n}\n"
}
]
},
"parameters": [
{
"description": "The ID of the card to which the card orders belong.",
"in": "path",
"name": "card_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/card_id"
}
}
],
"post": {
"description": "Creates a new card order given information",
"operationId": "card_order_create",
"requestBody": {
"content": {
"application/json": {
"example": {
"quantity": 10000
},
"schema": {
"$ref": "#/components/schemas/card_order_editable"
}
},
"application/x-www-form-urlencoded": {
"example": {
"quantity": 10000
},
"schema": {
"$ref": "#/components/schemas/card_order_editable"
}
},
"multipart/form-data": {
"example": {
"quantity": 10000
},
"schema": {
"$ref": "#/components/schemas/card_order_editable"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/card_order"
},
"description": "Card order created successfully"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "Create",
"tags": [
"Card Orders"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/cards/card_6afffd19045076c/orders \\\n -u <YOUR API KEY>: \\\n -d \"quantity=10000\"\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "const cardForCreate = new CardOrderEditable({\n quantity: 200\n});\n\ntry {\n const myCardOrder = await new CardOrdersApi(config).create('card_xxxx', cardForCreate);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.cardOrders.create('card_6afffd19045076c', {\n quantity: 10000\n}, function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "card_order_editable = CardOrderEditable(\n quantity = 10000,\n)\n\nwith ApiClient(configuration) as api_client:\n api = CardOrdersApi(api_client)\n\ntry:\n created_card_order = api.create(\"card_6afffd19045076c\", card_order_editable)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$lob->cardOrders('card_6afffd19045076c')->create(array(\n 'quantity' => 10000\n));\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "CardOrdersApi api = new CardOrdersApi(config);\n\nCardOrderEditable cardOrderEditable = new CardOrderEditable(\n 10000 // quantity\n);\n\ntry {\n CardOrder result = api.create(\"card_6afffd19045076c\", cardOrderEditable);\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "cardOrderCreate = CardOrderEditable.new({\n quantity: 10000,\n});\n\ncardOrderApi = CardOrdersApi.new(config)\n\nbegin\n createdCardOrder = cardOrderApi.create(\"card_6afffd19045076c\", cardOrderCreate)\nrescue => err\n p err.message\nend\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\n\nvar cardOrderCreate = *lob.NewCardOrderEditable()\ncardOrderCreate.SetQuantity(\"10000\")\n\n\n\ncreatedcardOrder, _, err := apiClient.CardOrdersApi.Create(context, \"card_6afffd19045076c\").CardOrderEditable(cardOrderCreate).Execute()\n\nif err != nil {\n return err\n}\n"
}
]
}
},
"/checks": {
"get": {
"description": "Returns a list of your checks. The checks are returned sorted by creation date, with the most recently created checks appearing first.",
"operationId": "checks_list",
"parameters": [
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/before_after"
},
{
"$ref": "#/components/parameters/include"
},
{
"$ref": "#/components/parameters/date_created"
},
{
"$ref": "#/components/parameters/metadata"
},
{
"$ref": "#/components/parameters/scheduled"
},
{
"$ref": "#/components/parameters/send_date"
},
{
"$ref": "#/components/parameters/mail_type"
},
{
"$ref": "#/components/parameters/sort_by"
},
{
"$ref": "#/components/parameters/status"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/all_checks"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "List",
"tags": [
"Checks"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X GET \"https://api.lob.com/v1/checks?limit=2\" \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
},
{
"label": "TYPESCRIPT",
"lang": "typescript",
"source": "try {\n const checks = await new ChecksApi(config).list(2);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.checks.list({limit: 2}, function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "checksApi = ChecksApi.new(config)\n\nbegin\n checks = checksApi.list({ limit: 2 })\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = ChecksApi(api_client)\n\ntry:\n checks = api.list(limit=2)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\ChecksApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->list(\n 2, // limit\n );\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "ChecksApi apiInstance = new ChecksApi(config);\n\ntry {\n CheckList response = apiInstance.list(\n 2, // limit\n null, // before\n null, // after\n null, // include\n null, // dateCreated\n null, // metadata\n null, // scheduled\n null, // sendDate\n null, // mailType\n null // sortBy\n );\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.Check.list(%{limit: 2})\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "ChecksApi api = new ChecksApi(config);\n\nList<string> includeList = new List<string>();\nincludeList.Add(\"total_count\");\nDictionary<String, String> metadata = new Dictionary<String, String>();\nmetadata.Add(\"name\", \"Harry\");\nDictionary<String, DateTime> dateCreated = new Dictionary<String, DateTime>();\nDateTime dateCreatedDate = DateTime.Today.AddMonths(-1);\ndateCreated.Add(\"lt\", dateCreatedDate);\nDictionary<String, String> sendDate = new Dictionary<String, String>();\nsendDate.Add(\"lt\", DateTime.Now.ToString(\"yyyy-MM-ddTHH\\\\:mm\\\\:ss.fffffffzzz\"));\nSortBy3 sortBy = new SortBy3(SortBy3.DateCreatedEnum.Asc);\n\ntry {\n CheckList response = api.list(\n 2, // limit\n null, // before\n null, // after\n includeList, // include\n dateCreated, // dateCreated\n metadata, // metadata\n true, // scheduled\n sendDate, // sendDate\n MailType.FirstClass, // mailType\n sortBy // sortBy\n );\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\nCheckList = apiClient.ChecksApi.List(context).Execute()\nif err != nil {\n return err\n}\n"
}
]
},
"post": {
"description": "Creates a new check with the provided properties.",
"operationId": "check_create",
"parameters": [
{
"$ref": "#/components/parameters/idem-header"
},
{
"$ref": "#/components/parameters/idem-query"
}
],
"requestBody": {
"content": {
"application/json": {
"example": {
"amount": 22.5,
"attachment": "./cool.pdf",
"bank_account": "bank_8cad8df5354d33f",
"check_bottom": "tmpl_23668b406d5afef",
"check_number": 10001,
"description": "Demo Check",
"from": {
"address_city": "San Francisco",
"address_line1": "210 King St",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107-1741",
"name": "Leore Avidar"
},
"logo": "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png",
"mail_type": "usps_first_class",
"memo": "rent",
"merge_variables": {
"name": "Harry"
},
"metadata": {
"memo": "rafting trip"
},
"print_speed": "core",
"send_date": "2017-11-01T00:00:00.000Z",
"to": {
"address_city": "San Francisco",
"address_country": "US",
"address_line1": "210 King St",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107",
"company": "Lob",
"description": "Harry - Office",
"email": "harry@lob.com",
"name": "Harry Zhang",
"phone": "5555555555"
},
"use_type": "operational"
},
"schema": {
"$ref": "#/components/schemas/check_editable"
}
},
"application/x-www-form-urlencoded": {
"encoding": {
"from": {
"explode": true,
"style": "deepObject"
},
"merge_variables": {
"explode": true,
"style": "deepObject"
},
"metadata": {
"explode": true,
"style": "deepObject"
},
"to": {
"explode": true,
"style": "deepObject"
}
},
"example": {
"amount": 22.5,
"attachment": "./cool.pdf",
"bank_account": "bank_8cad8df5354d33f",
"check_bottom": "tmpl_23668b406d5afef",
"check_number": 10001,
"description": "Demo Check",
"from": {
"address_city": "San Francisco",
"address_line1": "210 King St",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107-1741",
"name": "Leore Avidar"
},
"logo": "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png",
"mail_type": "usps_first_class",
"memo": "rent",
"merge_variables": {
"name": "Harry"
},
"metadata": {
"memo": "rafting trip"
},
"print_speed": "core",
"send_date": "2017-11-01T00:00:00.000Z",
"to": {
"address_city": "San Francisco",
"address_country": "US",
"address_line1": "210 King St",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107",
"company": "Lob",
"description": "Harry - Office",
"email": "harry@lob.com",
"name": "Harry Zhang",
"phone": "5555555555"
}
},
"schema": {
"$ref": "#/components/schemas/check_editable"
}
},
"multipart/form-data": {
"encoding": {
"logo": {
"contentType": "image/png, image/jpeg"
}
},
"example": {
"amount": 22.5,
"attachment": "./cool.pdf",
"bank_account": "bank_8cad8df5354d33f",
"check_bottom": "tmpl_23668b406d5afef",
"check_number": 10001,
"description": "Demo Check",
"from": {
"address_city": "San Francisco",
"address_line1": "210 King St",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107-1741",
"name": "Leore Avidar"
},
"logo": "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png",
"mail_type": "usps_first_class",
"memo": "rent",
"merge_variables": {
"name": "Harry"
},
"metadata": {
"memo": "rafting trip"
},
"print_speed": "core",
"send_date": "2017-11-01T00:00:00.000Z",
"to": {
"address_city": "San Francisco",
"address_country": "US",
"address_line1": "210 King St",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107",
"company": "Lob",
"description": "Harry - Office",
"email": "harry@lob.com",
"name": "Harry Zhang",
"phone": "5555555555"
},
"use_type": "operational"
},
"schema": {
"$ref": "#/components/schemas/check_editable"
}
}
},
"required": true
},
"responses": {
"200": {
"$ref": "#/components/responses/post_check"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "Create",
"tags": [
"Checks"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/checks \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -d 'description=Demo Check' \\\n -d 'to[name]=Harry Zhang' \\\n -d 'to[address_line1]=210 King St' \\\n -d 'to[address_line2]=# 6100' \\\n -d 'to[address_city]=San Francisco' \\\n -d 'to[address_state]=CA' \\\n -d 'to[address_zip]=94107' \\\n -d 'from=adr_210a8d4b0b76d77b' \\\n -d 'bank_account=bank_8cad8df5354d33f' \\\n -d 'amount=22.50' \\\n -d 'use_type=operational' \\\n -d 'memo=rent' \\\n --data-urlencode 'logo=https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png' \\\n --data-urlencode 'check_bottom=<h1 style=\"padding-top:4in;\">Demo Check for {{name}}</h1>' \\\n -d 'merge_variables[name]=Harry' \\\n -d 'print_speed=core'\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "const checkCreate = new CheckEditable({\nto: new AddressEditable({\n name: 'Harry Zhang',\n address_line1: '210 King St',\n address_line2: '# 6100',\n address_city: 'San Francisco',\n address_state: 'CA',\n address_zip: '94107',\n}),\nfrom: 'adr_xxxx',\nbank_account: 'bank_xxxx',\namount: 100,\nuse_type: 'operational',\nprint_speed: 'core'\n});\n\ntry {\n const myCheck = await new ChecksApi(config).create(checkCreate);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.checks.create({\n description: 'Demo Check',\n bank_account: 'bank_8cad8df5354d33f',\n to: {\n name: 'Harry Zhang',\n address_line1: '210 King St',\n address_line2: '# 6100',\n address_city: 'San Francisco',\n address_state: 'CA',\n address_zip: '94107'\n },\n from: 'adr_210a8d4b0b76d77b',\n amount: 22.50,\n use_type: 'operational', \n memo: 'rent',\n logo: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png',\n check_bottom: '<h1 style=\"padding-top:4in;\">Demo Check for {{name}}</h1>',\n merge_variables: {\n name: 'Harry'\n },\n print_speed: 'core'\n}, function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "checkCreate = CheckEditable.new({\n description: \"Demo Check\",\n bank_account: \"bank_8cad8df5354d33f\",\n amount: 22.5,\n memo: \"rent\",\n logo: \"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png\",\n check_bottom: \"<h1 style='padding-top:4in;'>Demo Check for {{name}}</h1>\",\n from: \"adr_210a8d4b0b76d77b\",\n to: AddressDomestic.new({\n name: \"Harry Zhang\",\n address_line1: \"210 King St\",\n address_line2: \"# 6100\",\n address_city: \"San Francisco\",\n address_state: \"CA\",\n address_zip: \"94107\",\n }),\n merge_variables: {\n name: \"Harry\"\n },\n use_type: \"operational\",\n print_speed: \"core\"\n});\n\ncheckApi = ChecksApi.new(config)\n\nbegin\n createdCheck = checkApi.create(checkCreate)\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "check_editable = CheckEditable(\n description = \"Demo Check\",\n bank_account = \"bank_8cad8df5354d33f\",\n amount = 22.5,\n memo = \"rent\",\n logo = \"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png\",\n check_bottom = \"<h1 style='padding-top:4in;'>Demo Check for {{name}}</h1>\",\n _from = \"adr_210a8d4b0b76d77b\",\n to = AddressDomestic(\n name = \"Harry Zhang\",\n address_line1 = \"210 King St\",\n address_line2 = \"# 6100\",\n address_city = \"San Francisco\",\n address_state = \"CA\",\n address_zip = \"94107\",\n ),\n merge_variables = MergeVariables(\n name = \"Harry\",\n ),\n use_type = \"operational\",\n print_speed = \"core\"\n)\n\nwith ApiClient(configuration) as api_client:\n api = ChecksApi(api_client)\n\ntry:\n created_check = api.create(check_editable)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$to = new OpenAPI\\Client\\Model\\AddressEditable(\n array(\n \"name\" => \"Harry Zhang\",\n \"address_line1\" => \"210 King St\",\n \"address_line2\" => \"# 6100\",\n \"address_city\" => \"San Francisco\",\n \"address_state\" => \"CA\",\n \"address_zip\" => \"94107\",\n )\n);\n\n$merge_variables = new stdClass;\n$merge_variables->name = \"Harry\";\n\n$use_type = \"operational\";\n\n$apiInstance = new OpenAPI\\Client\\Api\\ChecksApi($config, new GuzzleHttp\\Client());\n$check_editable = new OpenAPI\\Client\\Model\\CheckEditable(\n array(\n \"description\" => \"Demo Check\",\n \"bank_account\" => \"bank_8cad8df5354d33f\",\n \"amount\" => \"22.5\",\n \"memo\" => \"rent\",\n \"logo\" => \"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png\",\n \"check_bottom\" => \"<h1 style='padding-top:4in;'>Demo Check for {{name}}</h1>\",\n \"from\" => \"adr_210a8d4b0b76d77b\",\n \"to\" => $to,\n \"merge_variables\" => $merge_variables,\n \"use_type\" => $use_type,\n \"print_speed\" => \"core\"\n )\n);\n\ntry {\n $result = $apiInstance->create($check_editable);\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "Map<String, String> merge_variables = new HashMap<String, String>();\nmerge_variables.put(\"name\", \"Harry\");\n\nChecksApi apiInstance = new ChecksApi(config);\n\nAddressEditable to = new AddressEditable();\nto.setName(\"Harry Zhang\");\nto.setAddressLine1(\"210 King St\");\nto.setAddressLine2(\"# 6100\");\nto.setAddressCity(\"San Francisco\");\nto.setAddressState(\"CA\");\nto.setAddressZip(\"94107\");\n\ntry {\n CheckEditable checkEditable = new CheckEditable();\n checkEditable.setDescription(\"Demo Check\");\n checkEditable.setBankAccount(\"bank_8cad8df5354d33f\");\n checkEditable.setAmount(22.5f);\n checkEditable.setMemo(\"rent\");\n checkEditable.setLogo(\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png\");\n checkEditable.setCheckBottom(\"<h1 style='padding-top:4in;'>Demo Check for {{name}}</h1>\");\n checkEditable.setFrom(\"adr_210a8d4b0b76d77b\");\n checkEditable.setTo(to);\n checkEditable.setMergeVariables(merge_variables);\n checkEditable.setUseType(\"operational\");\n checkEditable.setPrintSpeed(\"core\");\n\n Check result = apiInstance.create(checkEditable, null);\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.Check.create(%{\n description: 'Demo Check',\n bank_account: 'bank_8cad8df5354d33f',\n to: %{\n name: 'Harry Zhang',\n address_line1: '210 King St',\n address_line2: '# 6100',\n address_city: 'San Francisco',\n address_state: 'CA',\n address_zip: '94107'\n },\n from: 'adr_210a8d4b0b76d77b',\n amount: 22.50,\n memo: 'rent',\n logo: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png',\n check_bottom: '<h1 style=\"padding-top:4in;\">Demo Check for {{name}}</h1>',\n merge_variables: %{\n name: 'Harry'\n },\n use_type: 'operational',\n print_speed: 'core'\n})\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "Dictionary<string, string> mergeVariables = new Dictionary<string, string>();\nmergeVariables.Add(\"name\", \"Harry\");\n\nChecksApi api = new ChecksApi(config);\n\nAddressEditable to = new AddressEditable(\n \"210 King St\", // addressLine1\n \"# 6100\", // addressLine2\n \"San Francisco\", // addressCity\n \"CA\", // addressState\n \"94107\", // addressZip\n default(CountryExtended), // addressCounty\n \"\", // description\n \"Harry Zhang\" // name\n);\n\nCheckEditable checkEditable = new CheckEditable(\n \"adr_249af768103d2810\", // from\n to.ToJson(), // to\n \"bank_8cad8df5354d33f\", // bank_account\n 22.5f, // amount\n \"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png\", // logo\n \"<h1 style='padding-top:4in;'>Demo Check for {{name}}</h1>\", // checkBottom\n default(string), // attachment\n \"Demo Check\", // description\n default(Dictionary<string, string>), // metadata\n mergeVariables, // mergeVariables\n default(DateTime), // sendDate\n CheckEditable.MailTypeEnum.UspsFirstClass, // mailType\n \"rent\", // memo\n \"operational\", // use_type\n \"core\" // print_speed\n);\n\ntry {\n Check result = api.create(checkEditable, null);\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\nvar to = *lob.NewAddressEditable()\nto.SetAddressLine1(\"210 King St\")\nto.SetAddressLine2(\"# 6100\")\nto.SetAddressCity(\"San Francisco\")\nto.SetAddressState(\"CA\")\nto.SetAddressZip(\"94107\")\nto.SetAddressCountry(lob.COUNTRYEXTENDED_US)\nto.SetDescription(\"\")\nto.SetName(\"Harry Zhang\")\n\nvar checkCreate = *lob.NewCheckEditable()\ncheckCreate.SetDescription(\"Demo Check\")\ncheckCreate.SetBankAccount(\"bank_8cad8df5354d33f\")\ncheckCreate.SetAmount(22.5)\ncheckCreate.SetMemo(\"rent\")\ncheckCreate.SetLogo(\"https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png\")\ncheckCreate.SetCheckBottom(\"<h1 style='padding-top:4in;'>Demo Check for {{name}}</h1>\")\ncheckCreate.SetFrom(\"adr_210a8d4b0b76d77b\")\ncheckCreate.SetTo(to)\ncheckCreate.SetPrintSpeed(\"core\")\n\n\ncreatedcheck, _, err := apiClient.ChecksApi.Create(context).CheckEditable(checkCreate).Execute()\n\nif err != nil {\n return err\n}\n"
}
]
}
},
"/checks/{chk_id}": {
"delete": {
"description": "Completely removes a check from production. This can only be done if the check has a `send_date` and the `send_date` has not yet passed. If the check is successfully canceled, you will not be charged for it. Read more on [cancellation windows](#section/Cancellation-Windows) and [scheduling](#section/Scheduled-Mailings). Scheduling and cancellation is a premium feature. Upgrade to the appropriate <a href=\"https://dashboard.lob.com/#/settings/editions\" target=\"_blank\">Print & Mail Edition</a> to gain access.",
"operationId": "check_cancel",
"responses": {
"200": {
"$ref": "#/components/responses/check_canceled"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "Cancel",
"tags": [
"Checks"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X DELETE https://api.lob.com/v1/checks/chk_534f10783683daa0 \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "try {\n const deleteCheck = await new ChecksApi(config).cancel('chk_xxxx');\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.checks.cancel('chk_534f10783683daa0', function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "checkApi = ChecksApi.new(config)\n\nbegin\n deletedCheck = checkApi.cancel(\"chk_534f10783683daa0\")\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = ChecksApi(api_client)\n\ntry:\n deleted_resource = api.cancel(\"chk_534f10783683daa0\")\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\ChecksApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->cancel(\"chk_534f10783683daa0\");\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "ChecksApi apiInstance = new ChecksApi(config);\n\ntry {\n CheckDeletion response = apiInstance.cancel(\"chk_534f10783683daa0\");\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.Check.destroy(\"chk_534f10783683daa0\")\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "ChecksApi api = new ChecksApi(config);\n\ntry {\n CheckDeletion response = api.cancel(\"chk_534f10783683daa0\");\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\ndeletedCheck, _, err := apiClient.ChecksApi.Cancel(context, \"chk_534f10783683daa0\").Execute()\n\nif err != nil {\n return err\n}\n"
}
]
},
"get": {
"description": "Retrieves the details of an existing check. You need only supply the unique check identifier that was returned upon check creation.",
"operationId": "check_retrieve",
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/check"
},
"description": "Returns a check object"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "Retrieve",
"tags": [
"Checks"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/checks/chk_534f10783683daa0 \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "try {\n const check = await new ChecksApi(config).get('chk_xxxx');\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.checks.retrieve('chk_534f10783683daa0', function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "checkApi = ChecksApi.new(config)\n\nbegin\n retrievedCheck = checkApi.get(\"chk_534f10783683daa0\")\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = ChecksApi(api_client)\n\ntry:\n check = api.get(\"chk_534f10783683daa0\")\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\ChecksApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->get(\"chk_534f10783683daa0\");\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "ChecksApi apiInstance = new ChecksApi(config);\n\ntry {\n Check response = apiInstance.get(\"chk_534f10783683daa0\");\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.Check.find(\"chk_534f10783683daa0\")\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "ChecksApi api = new ChecksApi(config);\n\ntry {\n Check response = api.get(\"chk_534f10783683daa0\");\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\nfetchedCheck, _, err := apiClient.ChecksApi.Get(context,\"chk_534f10783683daa0\").Execute()\n\nif err != nil {\n return err\n}\n"
}
]
},
"parameters": [
{
"description": "id of the check",
"in": "path",
"name": "chk_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/chk_id"
}
}
]
},
"/creatives": {
"post": {
"description": "Creates a new creative with the provided properties",
"operationId": "creative_create",
"parameters": [
{
"$ref": "#/components/parameters/lang_spec"
}
],
"requestBody": {
"content": {
"application/json": {
"example": {
"campaign_id": "cmp_e05ee61ff80764b",
"description": "Our 4x6 postcard creative",
"details": {},
"resource_type": "postcard"
},
"schema": {
"$ref": "#/components/schemas/creative_writable"
}
},
"application/x-www-form-urlencoded": {
"encoding": {
"example-prop": {
"explode": true,
"style": "deepObject"
}
},
"example": {
"campaign_id": "cmp_e05ee61ff80764b",
"description": "Our 4x6 postcard creative",
"details": {},
"resource_type": "postcard"
},
"schema": {
"$ref": "#/components/schemas/creative_writable"
}
},
"multipart/form-data": {
"example": {
"campaign_id": "cmp_e05ee61ff80764b",
"description": "Our 4x6 postcard creative",
"details": {},
"resource_type": "postcard"
},
"schema": {
"$ref": "#/components/schemas/creative_writable"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/creative"
},
"description": "Creative created successfully"
},
"default": {
"$ref": "#/components/responses/creatives_error"
}
},
"summary": "Create",
"tags": [
"Creatives"
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl https://api.lob.com/v1/creatives \\\n -u <YOUR API KEY>: \\\n -d \"campaign_id=cmp_e05ee61ff80764b\" \\\n -d \"resource_type=postcard\" \\\n -d \"details={}\"\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "creativeCreate = CreativeWritable.new({\n campaign_id: \"cmp_e05ee61ff80764b\",\n resource_type: \"postcard\",\n description: \"Our 4x6 postcard creative\",\n from: \"adr_210a8d4b0b76d77b\",\n front: \"tmpl_4aa14648113e45b\",\n back: \"tmpl_4aa14648113e45b\",\n details: PostcardDetailsWritable.new({\n mail_type: \"usps_first_class\",\n }),\n});\n\ncreativeApi = CreativesApi.new(config)\n\nbegin\n createdCreative = creativeApi.create(creativeCreate)\nrescue => err\n p err.message\nend\n"
}
]
}
},
"/creatives/{crv_id}": {
"get": {
"description": "Retrieves the details of an existing creative. You need only supply the unique creative identifier that was returned upon creative creation.",
"operationId": "creative_retrieve",
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/creative"
},
"description": "Returns a creative object"
},
"default": {
"$ref": "#/components/responses/creatives_error"
}
},
"summary": "Retrieve",
"tags": [
"Creatives"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/creatives/crv_2a3b096c409b32c \\\n -u <YOUR API KEY>:\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "creativeApi = CreativesApi.new(config)\n\nbegin\n retrievedCreative = creativeApi.get(\"crv_2a3b096c409b32c\")\nrescue => err\n p err.message\nend\n"
}
]
},
"parameters": [
{
"description": "id of the creative",
"in": "path",
"name": "crv_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/crv_id"
}
}
],
"patch": {
"description": "Update the details of an existing creative. You need only supply the unique identifier that was returned upon creative creation.",
"operationId": "creative_update",
"requestBody": {
"content": {
"application/json": {
"example": {
"description": "Test creative"
},
"schema": {
"$ref": "#/components/schemas/creative_base"
}
},
"application/x-www-form-urlencoded": {
"example": {
"description": "Test creative"
},
"schema": {
"$ref": "#/components/schemas/creative_base"
}
},
"multipart/form-data": {
"example": {
"description": "Test creative"
},
"schema": {
"$ref": "#/components/schemas/creative_base"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/creative"
},
"description": "Returns a creative object"
},
"default": {
"$ref": "#/components/responses/creatives_error"
}
},
"summary": "Update",
"tags": [
"Creatives"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X PATCH https://api.lob.com/v1/creatives/crv_2a3b096c409b32c \\\n -u <YOUR API KEY>: \\\n -d \"description=Our updated 4x6 postcard creative\"\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "creative_patch = CreativePatch(\n description = \"Our updated 4x6 postcard creative\",\n)\n\nwith ApiClient(configuration) as api_client:\n api = CreativesApi(api_client)\n\ntry:\n updated_creative = api.update(\"crv_2a3b096c409b32c\", creative_patch)\nexcept ApiException as e:\n print(e)\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "creativePatch = CreativePatch.new({\n description: \"Our updated 4x6 postcard creative\",\n})\n\ncreativeApi = CreativesApi.new(config)\n\nbegin\n updatedCreative = creativeApi.update(\"crv_2a3b096c409b32c\", creativePatch)\nrescue => err\n p err.message\nend\n"
}
]
}
},
"/domains": {
"get": {
"description": "Retrieve a list of all created domains.",
"operationId": "domain_list",
"parameters": [
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/before_after"
},
{
"description": "Filter domains by their configuration status.",
"in": "query",
"name": "status",
"schema": {
"enum": [
"configured",
"not_configured"
],
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/domains_response"
}
}
},
"description": "Returns a list of all domains."
},
"default": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error"
}
},
"summary": "List all domains",
"tags": [
"URL Shortener"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X GET \"https://api.lob.com/v1/domains?limit=2\" \\\n -u <YOUR_LIVE_API_KEY>:\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "try {\n const domains = await new DomainsApi(config).list(2);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.domains.list({limit: 2}, function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "domainsApi = DomainsApi.new(config)\n\nbegin\n domains = domainsApi.list({ limit: 2 })\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = DomainsApi(api_client)\n\ntry:\n domains = api.list(limit=2)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\DomainsApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->list(\n 2, // limit\n );\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "DomainsApi apiInstance = new DomainsApi(config);\n\ntry {\n DomainsList response = apiInstance.list(\n 2, // limit\n null, // before\n null, // after\n null, // include\n null, // dateCreated\n );\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.Domains.list(%{limit: 2})\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "DomainsApi api = new DomainsApi(config);\n\ntry {\n DomainsList response = api.list(\n 2, // limit\n null, // before\n null, // after\n null, // include\n null, // dateCreated\n );\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\nDomainsList = apiClient.DomainsApi.List(context).Execute()\nif err != nil {\n return err\n}\n"
}
]
},
"post": {
"description": "Add a new custom domain that can be used to create custom links.",
"operationId": "domain_create",
"requestBody": {
"content": {
"application/json": {
"examples": {
"basic": {
"value": {
"domain": "lob.st"
}
},
"test": {
"value": {
"domain": "lob.st"
}
}
},
"schema": {
"$ref": "#/components/schemas/domains"
}
},
"application/x-www-form-urlencoded": {
"examples": {
"basic": {
"value": {
"domain": "lob.st"
}
},
"test": {
"value": {
"domain": "lob.st"
}
}
},
"schema": {
"$ref": "#/components/schemas/domains"
}
},
"multipart/form-data": {
"examples": {
"basic": {
"value": {
"domain": "lob.st"
}
},
"test": {
"value": {
"domain": "lob.st"
}
}
},
"schema": {
"$ref": "#/components/schemas/domains"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/domain_response"
}
}
},
"description": "Returns a domain object with details."
},
"default": {
"content": {
"application/json": {
"example": {
"error": {
"code": "invalid",
"message": "domain is required",
"status_code": 422
}
},
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error"
}
},
"summary": "Create Domain",
"tags": [
"URL Shortener"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/domains \\\n -u <YOUR_LIVE_API_KEY>: \\\n -d \"domain=lob.st\"\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "const domainApi = await new DomainsApi(config);\nconst domainData: DomainsWritable = {\n domain: 'lob.st'\n}\ntry {\n const createdDomain = await domainApi.createDomain(domainData);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.domains.create({\n domain: 'lob.st'\n}, function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "domainsAPI = DomainsApi.new(config)\n\ndomainsData = DomainsWritable.new({\n domain: \"lob.st\"\n})\n\nbegin\n createdDomain = domainsAPI.create(domainsData)\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = DomainsApi(api_client)\n\ndomains_data = DomainsWritable(\n domain: \"lob.st\"\n)\n\ntry:\n domain = api.create(domains_data)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\DomainsApi($config, new GuzzleHttp\\Client());\n\n$domainsData = new OpenAPI\\Client\\Model\\DomainsWritable(array(\n 'domain' => 'lob.st',\n));\n\ntry {\n $result = $apiInstance->create($domainsData);\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "DomainsWritable domain = new DomainsWritable();\ndomain.setDomain(\"lob.st\");\n\nDomainsApi apiInstance = new DomainsApi(config);\n\ntry {\n apiInstance.create(domain);\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.Domain.create(%{\n domain: \"lob.st\"\n})\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "DomainsWritable domain = new DomainsWritable(\n \"lob.st\"\n)\n\nDomainsApi api = new DomainsApi(config);\n\ntry {\n api.create(domain, null);\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
}
]
}
},
"/domains/{domain_id}": {
"delete": {
"description": "Delete a registered domain. This operation can only be performed if all associated links with the domain are deleted.",
"operationId": "domain_delete",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/domain_delete"
}
}
},
"description": "Returns the deleted link object."
},
"default": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error"
}
},
"summary": "Delete a Domain",
"tags": [
"URL Shortener"
]
},
"get": {
"description": "Retrieve details for a single domain.",
"operationId": "domain_get",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/domain_response"
}
}
},
"description": "Returns domain related details."
},
"default": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error"
}
},
"summary": "Retrieve a domain",
"tags": [
"URL Shortener"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X GET \"https://api.lob.com/v1/domains/{domain_id}\" \\\n -u <YOUR_LIVE_API_KEY>:\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "try {\n const domain = await new DomainsApi(config).get('xxxxxx');\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.domains.retrieve('xxxxxx', function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "domainsAPI = DomainsApi.new(config)\n\nbegin\n retrievedDomain = domainsAPI.get(\"xxxxxx\")\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = DomainsApi(api_client)\n\ntry:\n domain = api.get(\"xxxxxx\")\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\DomainsApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->get(\"xxxxxx\");\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "DomainsApi apiInstance = new DomainsApi(config);\n\ntry {\n Domain response = apiInstance.get(\"xxxxxx\");\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.Domain.retrieve(\"xxxxxx\")\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "DomainsApi api = new DomainsApi(config);\n\ntry {\n Domain response = api.get(\"xxxxxx\");\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\nfetchedDomain, _, err := apiClient.DomainsApi.Get(context,\"xxxxxx\").Execute()\n\nif err != nil {\n return err\n}\n"
}
]
},
"parameters": [
{
"description": "Unique identifier for a domain.",
"in": "path",
"name": "domain_id",
"required": true,
"schema": {
"type": "string"
}
}
]
},
"/identity_validation": {
"post": {
"description": "Validates whether a given name is associated with an address.",
"operationId": "identity_validation",
"requestBody": {
"content": {
"application/json": {
"example": {
"city": "San Francisco",
"primary_line": "210 King St.",
"recipient": "Larry Lobster",
"secondary_line": "",
"state": "CA",
"zip_code": "94107"
},
"schema": {
"$ref": "#/components/schemas/identity_validation_writable"
}
},
"application/x-www-form-urlencoded": {
"example": {
"city": "San Francisco",
"primary_line": "210 King St.",
"recipient": "Larry Lobster",
"secondary_line": "",
"state": "CA",
"zip_code": "94107"
},
"schema": {
"$ref": "#/components/schemas/identity_validation_writable"
}
},
"multipart/form-data": {
"example": {
"city": "San Francisco",
"primary_line": "210 King St.",
"recipient": "Larry Lobster",
"secondary_line": "",
"state": "CA",
"zip_code": "94107"
},
"schema": {
"$ref": "#/components/schemas/identity_validation_writable"
}
}
},
"required": true
},
"responses": {
"200": {
"$ref": "#/components/responses/identity_validation"
},
"default": {
"$ref": "#/components/responses/identity_validation_error"
}
},
"summary": "Identity Validation",
"tags": [
"Identity Validation"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/identity_validation \\\n -u <YOUR_LIVE_API_KEY>: \\\n -d \"recipient=Larry Lobster\" \\\n -d \"primary_line=210 King St\" \\\n -d \"secondary_line=\" \\\n -d \"urbanization=\" \\\n -d \"city=San Francsico\" \\\n -d \"state=CA\" \\\n -d \"zip_code=94107\" \\\n"
}
]
}
},
"/informed_delivery_campaigns": {
"get": {
"description": "List Informed Delivery campaigns",
"operationId": "informed_delivery_campaign_list",
"responses": {
"200": {
"$ref": "#/components/responses/all_informed_delivery_campaigns"
}
},
"summary": "List",
"tags": [
"Informed Delivery Campaign"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/informed_delivery_campaign \\\n -u <YOUR API KEY>:\n"
}
]
},
"post": {
"description": "Creates a new Informed Delivery campaign",
"operationId": "informed_delivery_campaign_create",
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/create"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/informed_delivery_campaign"
},
"description": "Creative created successfully"
},
"422": {
"$ref": "#/components/responses/writeable_422"
}
},
"summary": "Create",
"tags": [
"Informed Delivery Campaign"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl --request POST \\\n --url https://api.lob.com/v1/informed_delivery_campaigns \\\n -u <YOUR API KEY>: \\\n --header 'Content-Type: multipart/form-data' \\\n --form ride_along_url=https://www.lob.com \\\n --form 'ride_along_image=@/path/to/ride_along.jpg' \\\n --form quantity=2 \\\n --form start_date=2024-01-01 \\\n --form status=pending_approval\n"
}
]
}
},
"/informed_delivery_campaigns/{usps_campaign_id}": {
"get": {
"description": "Retrieves the details of an existing Informed Delivery campaign. You need only supply the `usps_campaign_id` returned in the campaign creation request.",
"operationId": "informed_delivery_campaign_retrieve",
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/informed_delivery_campaign"
},
"description": "Returns a informed delivery campaign object"
},
"404": {
"$ref": "#/components/responses/404"
}
},
"summary": "Retrieve",
"tags": [
"Informed Delivery Campaign"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/informed_delivery_campaign/1200772869 \\\n -u <YOUR API KEY>:\n"
}
]
},
"parameters": [
{
"description": "usps_campaign_id of the Informed Delivery campaign",
"in": "path",
"name": "usps_campaign_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/usps_campaign_id"
}
}
],
"patch": {
"description": "Update the details of an existing Informed Delivery campaign.<br> **NOTE:** you can only update a campaign in the `pending_approval` status.",
"operationId": "informed_delivery_campaign_update",
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/update"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/informed_delivery_campaign"
},
"description": "Returns an Informed Delivery campaign object"
},
"404": {
"$ref": "#/components/responses/404"
},
"422": {
"$ref": "#/components/responses/writeable_422"
}
},
"summary": "Update",
"tags": [
"Informed Delivery Campaign"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X PATCH https://api.lob.com/v1/creatives/crv_2a3b096c409b32c \\\n -u <YOUR API KEY>: \\\n -d '{\"status\":\"approved\"}'\n"
}
]
}
},
"/intl_verifications": {
"post": {
"description": "Verify an international (except US or US territories) address _with a live API key_. Requests to this endpoint with a test API key will return a dummy response based on the primary line you input.",
"operationId": "intl_verification",
"parameters": [
{
"$ref": "#/components/parameters/lang_spec"
}
],
"requestBody": {
"content": {
"application/json": {
"examples": {
"basic": {
"value": {
"city": "Summerside",
"country": "CA",
"postal code": "C1N 1C4",
"primary_line": "370 Water St",
"recipient": "Harry Zhang",
"secondary_line": "",
"state": "Prince Edward Island"
}
},
"full_payload": {
"value": {
"city": "Summerside",
"country": "CA",
"postal code": "C1N 1C4",
"primary_line": "370 Water St",
"recipient": "Harry Zhang",
"secondary_line": "",
"state": "Prince Edward Island"
}
},
"single_line": {
"value": {
"address": "370 Water St C1N 1C4",
"country": "CA"
}
},
"test": {
"value": {
"country": "CA",
"primary_line": "deliverable"
}
}
},
"schema": {
"$ref": "#/components/schemas/intl_verification_writable"
}
},
"application/x-www-form-urlencoded": {
"examples": {
"basic": {
"value": {
"city": "Summerside",
"country": "CA",
"postal code": "C1N 1C4",
"primary_line": "370 Water St",
"recipient": "Harry Zhang",
"secondary_line": "",
"state": "Prince Edward Island"
}
},
"full_payload": {
"value": {
"city": "Summerside",
"country": "CA",
"postal code": "C1N 1C4",
"primary_line": "370 Water St",
"recipient": "Harry Zhang",
"secondary_line": "",
"state": "Prince Edward Island"
}
},
"single_line": {
"value": {
"address": "370 Water St C1N 1C4",
"country": "CA"
}
},
"test": {
"value": {
"country": "CA",
"primary_line": "deliverable"
}
}
},
"schema": {
"$ref": "#/components/schemas/intl_verification_writable"
}
},
"multipart/form-data": {
"examples": {
"basic": {
"value": {
"city": "Summerside",
"country": "CA",
"postal code": "C1N 1C4",
"primary_line": "370 Water St",
"recipient": "Harry Zhang",
"secondary_line": "",
"state": "Prince Edward Island"
}
},
"full_payload": {
"value": {
"city": "Summerside",
"country": "CA",
"postal code": "C1N 1C4",
"primary_line": "370 Water St",
"recipient": "Harry Zhang",
"secondary_line": "",
"state": "Prince Edward Island"
}
},
"single_line": {
"value": {
"address": "370 Water St C1N 1C4",
"country": "CA"
}
},
"test": {
"value": {
"country": "CA",
"primary_line": "deliverable"
}
}
},
"schema": {
"$ref": "#/components/schemas/intl_verification_writable"
}
}
},
"required": true
},
"responses": {
"200": {
"$ref": "#/components/responses/intl_verifications"
},
"default": {
"$ref": "#/components/responses/intl_verifications_error"
}
},
"summary": "Single Verify",
"tags": [
"Intl Verifications"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/intl_verifications \\\n -u <YOUR_LIVE_API_KEY>: \\\n -d \"primary_line=370 Water St\" \\\n -d \"city=Summerside\" \\\n -d \"state=Prince Edward Island\" \\\n -d \"postal_code=C1N 1C4\" \\\n -d \"country=CA\"\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "const IntlVerifications = new IntlVerificationsApi(av_config);\nlet verificationData1: IntlVerificationWritable = {\n primary_line: '370 WATER ST',\n postal_code: 'C1N 1C4',\n country: CountryExtended.Ca\n};\n\ntry {\n const singleVerified = await IntlVerifications.verifySingle(verificationData1);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.intlVerifications.verify({\n primary_line: '370 Water St',\n city: 'Summerside',\n state: 'Prince Edward Island',\n postal_code: 'C1N 1C4',\n country: 'CA'\n}, function (err, res) {\n console.log (err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "intlVerificationsApi = IntlVerificationsApi.new(config)\n\nverificationData = IntlVerificationWritable.new({\n primary_line: \"370 Water St\",\n city: \"Summerside\",\n state: \"Prince Edward Island\",\n postal_code: \"C1N 1C4\",\n country: CountryExtended::CA,\n})\n\nbegin\n verifiedAddr = intlVerificationsApi.verifySingle(verificationData)\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = IntlVerificationsApi(api_client)\nverification_data_1 = IntlVerificationWritable(\n primary_line = \"370 Water St\",\n city = \"Summerside\",\n state = \"Prince Edward Island\",\n postal_code = \"C1N 1C4\",\n country = CountryExtended(\"CA\"),\n)\n\ntry:\n single_verified = api.verifySingle(verification_data_1)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\IntlVerificationsApi($config, new GuzzleHttp\\Client());\n\n$verificationData = new OpenAPI\\Client\\Model\\IntlVerificationWritable(array(\n 'primary_line' => '370 Water St',\n 'city' => 'Summerside',\n 'state' => 'Prince Edward Island',\n 'postal_code' => 'C1N 1C4',\n 'country' => 'CA',\n));\n\ntry {\n $result = $apiInstance->verifySingle($verificationData);\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "LobResponse<IntlVerification> response = new IntlVerification.RequestBuilder()\n .setPrimaryLine(\"370 Water St\")\n .setCity(\"Summerside\")\n .setState(\"Prince Edward Island\")\n .setPostalCode(\"C1N 1C4\")\n .setCountry(\"CA\")\n .verify();\n\nIntlVerification intlVerification = response.getResponseBody();\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.IntlVerification.verify(%{\n primary_line: \"370 Water St\",\n city: \"Summerside\",\n state: \"Prince Edward Island\",\n postal_code: \"C1N 1C4\",\n country: \"CA\"\n})\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "IntlVerificationWritable singleVerify = new IntlVerificationWritable(\n null,\n \"370 Water St\",\n null,\n \"Summerside\",\n \"Prince Edward Island\",\n \"C1N 1C4\",\n CountryExtended.CA\n);\n\nIntlVerificationsApi api = new IntlVerificationsApi(config);\n\ntry {\n api.verifySingle(singleVerify, null);\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
}
]
}
},
"/letters": {
"get": {
"description": "Returns a list of your letters. The letters are returned sorted by creation date, with the most recently created letters appearing first.",
"operationId": "letters_list",
"parameters": [
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/before_after"
},
{
"$ref": "#/components/parameters/include"
},
{
"$ref": "#/components/parameters/date_created"
},
{
"$ref": "#/components/parameters/metadata"
},
{
"$ref": "#/components/parameters/campaign_id"
},
{
"$ref": "#/components/parameters/status"
},
{
"description": "Set to `true` to return only color letters. Set to `false` to return only black & white letters.",
"in": "query",
"name": "color",
"schema": {
"type": "boolean"
}
},
{
"$ref": "#/components/parameters/scheduled"
},
{
"$ref": "#/components/parameters/send_date"
},
{
"$ref": "#/components/parameters/mail_type"
},
{
"$ref": "#/components/parameters/sort_by"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/all_letters"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "List",
"tags": [
"Letters"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X GET \"https://api.lob.com/v1/letters?limit=2\" \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
},
{
"label": "TYPESCRIPT",
"lang": "typescript",
"source": "try {\n const letters = await new LettersApi(config).list(2);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.letters.list({limit: 2}, function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "lettersApi = LettersApi.new(config)\n\nbegin\n letters = lettersApi.list({ limit: 2 })\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = LettersApi(api_client)\n\ntry:\n letters = api.list(limit=2)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\LettersApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->list(\n 2, // limit\n );\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "LettersApi apiInstance = new LettersApi(config);\n\ntry {\n LetterList response = apiInstance.list(\n 2, // limit\n null, // before\n null, // after\n null, // include\n null, // dateCreated\n null, // metadata\n null, // color\n null, // scheduled\n null, // sendDate\n null, // mailType\n null // sortBy\n );\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.Letter.list(%{limit: 2})\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "LettersApi api = new LettersApi(config);\n\nList<string> includeList = new List<string>();\nincludeList.Add(\"total_count\");\nDictionary<String, String> metadata = new Dictionary<String, String>();\nmetadata.Add(\"name\", \"Harry\");\nDictionary<String, DateTime> dateCreated = new Dictionary<String, DateTime>();\nDateTime dateCreatedDate = DateTime.Today.AddMonths(-1);\ndateCreated.Add(\"lt\", dateCreatedDate);\nDictionary<String, String> sendDate = new Dictionary<String, String>();\nsendDate.Add(\"lt\", DateTime.Now.ToString(\"yyyy-MM-ddTHH\\\\:mm\\\\:ss.fffffffzzz\"));\nSortBy3 sortBy = new SortBy3(SortBy3.DateCreatedEnum.Asc);\n\ntry {\n LetterList response = api.list(\n 2, // limit\n null, // before\n null, // after\n includeList, // include\n dateCreated, // dateCreated\n metadata, // metadata\n true, // color\n true, // scheduled\n sendDate, // sendDate\n MailType.FirstClass, // mailType\n sortBy // sortBy\n );\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\nLetterList = apiClient.LettersApi.List(context).Execute()\nif err != nil {\n return err\n}\n"
}
]
},
"post": {
"description": "Creates a new letter given information",
"operationId": "letter_create",
"parameters": [
{
"$ref": "#/components/parameters/idem-header"
},
{
"$ref": "#/components/parameters/idem-query"
},
{
"$ref": "#/components/parameters/lob-version"
}
],
"requestBody": {
"content": {
"application/json": {
"example": {
"address_placement": "bottom_first_page",
"cards": [
"card_c51ae96f5cebf3e"
],
"color": true,
"custom_envelope": null,
"description": "demo",
"double_sided": false,
"extra_service": "registered",
"file": "<html style='padding-top: 3in; margin: .5in;'>HTML Letter for {{name}}</html>",
"from": {
"address_city": "San Francisco",
"address_line1": "210 King St",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107",
"name": "Harry"
},
"fsc": true,
"mail_type": "usps_first_class",
"merge_variables": {
"name": "Harry"
},
"metadata": {
"spiffy": "true"
},
"perforated_page": 1,
"print_speed": "core",
"qr_code": {
"pages": "1-2,4-5",
"position": "relative",
"redirect_url": "https://www.lob.com",
"right": "2",
"top": "2",
"width": "2"
},
"return_envelope": true,
"send_date": "2017-11-01T00:00:00.000Z",
"to": {
"address_city": "San Francisco",
"address_country": "US",
"address_line1": "210 King St",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107",
"company": "Lob",
"description": "Harry - Office",
"email": "harry@lob.com",
"name": "Harry Zhang",
"phone": "5555555555"
},
"use_type": "marketing"
},
"schema": {
"$ref": "#/components/schemas/letter_editable"
}
},
"application/x-www-form-urlencoded": {
"encoding": {
"from": {
"explode": true,
"style": "deepObject"
},
"merge_variables": {
"explode": true,
"style": "deepObject"
},
"metadata": {
"explode": true,
"style": "deepObject"
},
"to": {
"explode": true,
"style": "deepObject"
}
},
"example": {
"address_placement": "top_first_page",
"cards": [
"card_c51ae96f5cebf3e"
],
"color": true,
"custom_envelope": null,
"description": "demo",
"double_sided": false,
"extra_service": "registered",
"file": "<html style='padding-top: 3in; margin: .5in;'>HTML Letter for {{name}}</html>",
"from": {
"address_city": "San Francisco",
"address_line1": "210 King St",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107",
"name": "Harry"
},
"fsc": true,
"mail_type": "usps_first_class",
"merge_variables": {
"name": "Harry"
},
"metadata": {
"spiffy": "true"
},
"perforated_page": 1,
"print_speed": "core",
"qr_code": {
"bottom": "2",
"pages": "1,4",
"position": "relative",
"redirect_url": "https://www.lob.com",
"right": "2",
"width": "2"
},
"return_envelope": true,
"send_date": "2017-11-01T00:00:00.000Z",
"to": {
"address_city": "San Francisco",
"address_country": "US",
"address_line1": "210 King St",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107",
"company": "Lob",
"description": "Harry - Office",
"email": "harry@lob.com",
"name": "Harry Zhang",
"phone": "5555555555"
},
"use_type": "marketing"
},
"schema": {
"$ref": "#/components/schemas/letter_editable"
}
},
"multipart/form-data": {
"example": {
"address_placement": "top_first_page",
"cards": [
"card_c51ae96f5cebf3e"
],
"color": true,
"custom_envelope": null,
"description": "demo",
"double_sided": false,
"extra_service": "registered",
"file": "<html style='padding-top: 3in; margin: .5in;'>HTML Letter for {{name}}</html>",
"from": {
"address_city": "San Francisco",
"address_line1": "210 King St",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107",
"name": "Harry"
},
"fsc": "true,",
"mail_type": "usps_first_class",
"merge_variables": {
"name": "Harry"
},
"metadata": {
"spiffy": "true"
},
"perforated_page": 1,
"print_speed": "core",
"qr_code": {
"bottom": "2",
"left": "2",
"pages": "1,3-5",
"position": "relative",
"redirect_url": "https://www.lob.com",
"width": "2"
},
"return_envelope": true,
"send_date": "2017-11-01T00:00:00.000Z",
"to": {
"address_city": "San Francisco",
"address_country": "US",
"address_line1": "210 King St",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107",
"company": "Lob",
"description": "Harry - Office",
"email": "harry@lob.com",
"name": "Harry Zhang",
"phone": "5555555555"
},
"use_type": "marketing"
},
"schema": {
"$ref": "#/components/schemas/letter_editable"
}
}
},
"required": true
},
"responses": {
"200": {
"$ref": "#/components/responses/post_letter"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "Create",
"tags": [
"Letters"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/letters \\\n -u YOUR_API_KEY \\\n -d 'description=Demo Letter' \\\n -d 'to[name]=Harry Zhang' \\\n -d 'to[address_line1]=210 King St' \\\n -d 'to[address_line2]=# 6100' \\\n -d 'to[address_city]=San Francisco' \\\n -d 'to[address_state]=CA' \\\n -d 'to[address_zip]=94107' \\\n -d 'from=adr_210a8d4b0b76d77b' \\\n --data-urlencode 'file=<html style=\"padding-top: 3in; margin: .5in;\">HTML Letter for {{name}}</html>' \\\n -d 'merge_variables[name]=Harry' \\\n -d 'color=true' \\\n -d 'cards[]=card_c51ae96f5cebf3e' \\\n -d 'qr_code[position]=relative' \\\n -d 'qr_code[redirect_url]=https://www.lob.com' \\\n -d 'qr_code[width]=2' \\\n -d 'qr_code[bottom]=2' \\\n -d 'qr_code[left]=2' \\\n -d 'qr_code[pages]=3,4-5' \\\n -d 'fsc=true' \\\n -d 'print_speed=core'\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "const letterCreate = new LetterEditable({\n to: {\n name: 'Harry Zhang',\n address_line1: '210 King St',\n address_line2: '# 6100',\n address_city: 'San Francisco',\n address_state: 'CA',\n address_zip: '94107'\n },\n from: 'adr_xxxx',\n color: true,\n extra_service: LetterEditableExtraServiceEnum.Certified,\n file: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/us_letter_1pg.pdf',\n use_type: 'marketing',\n qr_code : {\n position: 'relative',\n redirect_url: 'https://www.lob.com',\n width: '2',\n bottom: '2',\n left: '2',\n pages: '2,5'\n },\n fsc: true,\n print_speed: 'core'\n});\n\ntry {\n const myLetter = await new LettersApi(config).create(letterCreate);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.letters.create({\n description: 'Demo Letter',\n to: {\n name: 'Harry Zhang',\n address_line1: '210 King St',\n address_line2: '# 6100',\n address_city: 'San Francisco',\n address_state: 'CA',\n address_zip: '94107'\n },\n from: 'adr_210a8d4b0b76d77b',\n file: '<html style=\"padding-top: 3in; margin: .5in;\">HTML Letter for {{name}}</html>',\n merge_variables: {\n name: 'Harry'\n },\n color: true,\n cards: ['card_c51ae96f5cebf3e'],\n use_type: 'marketing',\n qr_code : {\n position: 'relative',\n redirect_url: 'https://www.lob.com',\n width: '2',\n bottom: '2',\n left: '2',\n pages: '2,4-5'\n },\n fsc: true,\n print_speed: 'core'\n}, function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "letterCreate = LetterEditable.new({\n description: \"Demo Letter\",\n from: \"adr_210a8d4b0b76d77b\",\n file: \"<html style='padding-top: 3in; margin: .5in;'>HTML Letter for {{name}}</html>\",\n color: \"true\",\n to: AddressEditable.new({\n name: \"Harry Zhang\",\n address_line1: \"210 King St\",\n address_line2: \"# 6100\",\n address_city: \"San Francisco\",\n address_state: \"CA\",\n address_zip: \"94107\",\n }),\n merge_variables: {\n name: \"Harry\"\n },\n cards: [\n \"card_c51ae96f5cebf3e\",\n ],\n use_type: \"marketing\",\n fsc: true,\n print_speed: 'core'\n});\n\nletterApi = LettersApi.new(config)\n\nbegin\n createdLetter = letterApi.create(letterCreate)\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "letter_editable = LetterEditable(\n description = \"Demo Letter\",\n _from = \"adr_210a8d4b0b76d77b\",\n file = \"<html style='padding-top: 3in; margin: .5in;'>HTML Letter for {{name}}</html>\",\n color = True,\n to = AddressEditable(\n name = \"Harry Zhang\",\n address_line1 = \"210 King St\",\n address_line2 = \"# 6100\",\n address_city = \"San Francisco\",\n address_state = \"CA\",\n address_zip = \"94107\",\n ),\n merge_variables = MergeVariables(\n name = \"Harry\",\n ),\n cards = [\n \"card_c51ae96f5cebf3e\",\n ],\n use_type = \"marketing\",\n qr_code = {\n \"position\" : \"relative\",\n \"redirect_url\" : \"https://www.lob.com\",\n \"width\" : \"2\",\n \"bottom\" : \"2\",\n \"left\" : \"2\",\n \"pages\" : \"1,3\"\n },\n fsc = true,\n print_speed = 'core'\n)\n\nwith ApiClient(configuration) as api_client:\n api = LettersApi(api_client)\n\ntry:\n created_letter = api.create(letter_editable)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$to = new OpenAPI\\Client\\Model\\AddressEditable(\n array(\n \"name\" => \"Harry Zhang\",\n \"address_line1\" => \"210 King St\",\n \"address_line2\" => \"# 6100\",\n \"address_city\" => \"San Francisco\",\n \"address_state\" => \"CA\",\n \"address_zip\" => \"94107\",\n )\n);\n\n$qr_code = new OpenAPI\\Client\\Model\\QRCode(\n array(\n \"position\" => \"relative\",\n \"redirect_url\" => \"https://www.lob.com\",\n \"width\" => \"2\",\n \"bottom\" => \"2\",\n \"left\" => \"2\",\n \"pages\" => \"1,3,5\",\n )\n);\n\n$merge_variables = new stdClass;\n$merge_variables->name = \"Harry\";\n\n$use_type = \"marketing\";\n$fsc = true;\n$print_speed = 'core';\n\n$apiInstance = new OpenAPI\\Client\\Api\\LettersApi($config, new GuzzleHttp\\Client());\n$letter_editable = new OpenAPI\\Client\\Model\\LetterEditable(\n array(\n \"description\" => \"Demo Letter\",\n \"from\" => \"adr_210a8d4b0b76d77b\",\n \"file\" => \"<html style='padding-top: 3in; margin: .5in;'>HTML Letter for {{name}}</html>\",\n \"color\" => \"true\",\n \"to\" => $to,\n \"merge_variables\" => $merge_variables,\n \"cards\" => array(\n \"card_c51ae96f5cebf3e\",\n \"card_thingy\",\n ),\n \"use_type\" => $use_type;\n \"qr_code\" => $qr_code,\n \"fsc\" => $fsc,\n \"print_speed\" => $print_speed,\n )\n);\n\ntry {\n $result = $apiInstance->create($letter_editable);\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "Map<String, String> merge_variables = new HashMap<String, String>();\nmerge_variables.put(\"name\", \"Harry\");\n\nLettersApi apiInstance = new LettersApi(config);\n\nAddressEditable to = new AddressEditable();\nto.setName(\"Harry Zhang\");\nto.setAddressLine1(\"210 King St\");\nto.setAddressLine2(\"# 6100\");\nto.setAddressCity(\"San Francisco\");\nto.setAddressState(\"CA\");\nto.setAddressZip(\"94107\");\n\nQRCode qrCode = new QRCode();\nqrCode.setPosition(\"relative\");\nqrCode.setRedirectUrl(\"https://www.lob.com\");\nqrCode.setWidth(\"2\");\nqrCode.setLeft(\"2\");\nqrCode.setBottom(\"2\");\nqrCode.setPages(\"1,3,5\");\n\nList<String> cards = new ArrayList<String>();\ncards.add(\"card_c51ae96f5cebf3e\");\ncards.add(\"card_thingy\");\n\ntry {\n LetterEditable letterEditable = new LetterEditable();\n letterEditable.setDescription(\"Demo Letter\");\n letterEditable.setFrom(\"adr_210a8d4b0b76d77b\");\n letterEditable.setFile(\"<html style='padding-top: 3in; margin: .5in;'>HTML Letter for {{name}}</html>\");\n letterEditable.setColor(true);\n letterEditable.setTo(to);\n letterEditable.setMergeVariables(merge_variables);\n letterEditable.setCards(cards);\n letterEditable.setUseType(\"operational\");\n letterEditable.setQRCode(qrCode);\n letterEditable.setFsc(true);\n letterEditable.setPrintSpeed(\"core\");\n\n Letter result = apiInstance.create(letterEditable, null);\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.Letter.create(%{\n description: 'Demo Letter',\n to: %{\n name: 'Harry Zhang',\n address_line1: '210 King St',\n address_line2: '# 6100',\n address_city: 'San Francisco',\n address_state: 'CA',\n address_zip: '94107'\n },\n from: 'adr_210a8d4b0b76d77b',\n file: '<html style=\"padding-top: 3in; margin: .5in;\">HTML Letter for {{name}}</html>',\n merge_variables: %{\n name: 'Harry'\n },\n color: true,\n cards: ['card_c51ae96f5cebf3e'],\n use_type: 'marketing',\n qr_code: %{\n position: 'relative',\n redirect_url: 'https://www.lob.com',\n width: '2',\n bottom: '2',\n left: '2',\n pages: '1-2,5'\n },\n fsc: true,\n print_speed: 'core'\n})\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "Dictionary<string, string> mergeVariables = new Dictionary<string, string>();\nmergeVariables.Add(\"name\", \"Harry\");\n\nLettersApi api = new LettersApi(config);\n\nAddressEditable to = new AddressEditable(\n \"210 King St\", // addressLine1\n \"# 6100\", // addressLine2\n \"San Francisco\", // addressCity\n \"CA\", // addressState\n \"94107\", // addressZip\n default(CountryExtended), // addressCounty\n null, // description\n \"Harry Zhang\" // name\n);\n\nUseType usetype = new UseType(\"marketing\");\n\nQRCode qrCode = new QRCode(\n \"relative\", //position,\n \"https://www.lob.com\", //redirect_url\n \"2\", //width\n \"2\", //left\n \"2\", //bottom\n \"1-2,5\", //pages\n);\n\nFsc fsc = new Fsc(true);\nPrintSpeed printSpeed = new PrintSpeed(\"core\");\n\nList<String> cards = new List<String>();\ncards.Add(\"card_c51ae96f5cebf3e\");\n\nLetterEditable letterEditable = new LetterEditable(\n \"Demo Letter\", // description\n default(Dictionary<string, string>), // metadata\n default(MailType), // mailType\n mergeVariables, // mergeVariables\n default(DateTime), // sendDate\n true, // color\n true, // doubleSided\n LetterEditable.AddressPlacementEnum.TopFirstPage, // addressPlacement\n default(Object), // returnEnvelope\n default(int?), // perforatedPage\n default(LetterEditableCustomEnvelope), // customEnvelope\n to.ToJson(), // to\n \"adr_249af768103d2810\", // from\n \"<html style='padding-top: 3in; margin: .5in;'>HTML Letter for {{name}}</html>\", // file\n default(LetterEditable.ExtraServiceEnum?), // extraService\n cards, // cards\n usetype,\n qrCode,\n fsc,\n printSpeed\n);\n\ntry {\n Letter result = api.create(letterEditable, null);\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\nvar to = *lob.NewAddressEditable()\nto.SetAddressLine1(\"210 King St\")\nto.SetAddressLine2(\"# 6100\")\nto.SetAddressCity(\"San Francisco\")\nto.SetAddressState(\"CA\")\nto.SetAddressZip(\"94107\")\nto.SetAddressCountry(lob.COUNTRYEXTENDED_US)\nto.SetDescription(\"\")\nto.SetName(\"Harry Zhang\")\n\nvar letterCreate = *lob.NewLetterEditable()\nletterCreate.SetDescription(\"Demo Letter\")\nletterCreate.SetFrom(\"adr_210a8d4b0b76d77b\")\nletterCreate.SetFile(\"<html style='padding-top: 3in; margin: .5in;'>HTML Letter for {{name}}</html>\")\nletterCreate.SetColor(\"true\")\nletterCreate.SetTo(to)\nletterCreate.SetFsc(true)\nletterCreate.SetPrintSpeed(\"core\")\n\ncreatedletter, _, err := apiClient.LettersApi.Create(context).LetterEditable(letterCreate).Execute()\n\nif err != nil {\n return err\n}\n"
}
]
}
},
"/letters/{ltr_id}": {
"delete": {
"description": "Completely removes a letter from production. This can only be done if the letter has a `send_date` and the `send_date` has not yet passed. If the letter is successfully canceled, you will not be charged for it. Read more on [cancellation windows](#section/Cancellation-Windows) and [scheduling](#section/Scheduled-Mailings). Scheduling and cancellation is a premium feature. Upgrade to the appropriate <a href=\"https://dashboard.lob.com/#/settings/editions\" target=\"_blank\">Print & Mail Edition</a> to gain access.",
"operationId": "letter_cancel",
"responses": {
"200": {
"$ref": "#/components/responses/letter_deleted"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "Cancel",
"tags": [
"Letters"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X DELETE https://api.lob.com/v1/letters/ltr_4868c3b754655f90 \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "try {\n const deleteLetter = await new LettersApi(config).cancel('ltr_xxxx')\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.letters.cancel('ltr_4868c3b754655f90', function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "letterApi = LettersApi.new(config)\n\nbegin\n deletedLetter = letterApi.cancel(\"ltr_4868c3b754655f90\")\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = LettersApi(api_client)\n\ntry:\n deleted_resource = api.cancel(\"ltr_4868c3b754655f90\")\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\LettersApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->cancel(\"ltr_4868c3b754655f90\");\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "LettersApi apiInstance = new LettersApi(config);\n\ntry {\n LetterDeletion response = apiInstance.cancel(\"ltr_4868c3b754655f90\");\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.Letter.destroy(\"ltr_4868c3b754655f90\")\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "LettersApi api = new LettersApi(config);\n\ntry {\n LetterDeletion response = api.cancel(\"ltr_4868c3b754655f90\");\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\ndeletedLetter, _, err := apiClient.LettersApi.Cancel(context, \"ltr_4868c3b754655f90\").Execute()\n\nif err != nil {\n return err\n}\n"
}
]
},
"get": {
"description": "Retrieves the details of an existing letter. You need only supply the unique letter identifier that was returned upon letter creation.",
"operationId": "letter_retrieve",
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/letter"
},
"description": "Returns a letter object"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "Retrieve",
"tags": [
"Letters"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/letters/ltr_4868c3b754655f90 \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "try {\n const letter= await new LettersApi(config).get('ltr_xxxx');\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.letters.retrieve('ltr_4868c3b754655f90', function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "letterApi = LettersApi.new(config)\n\nbegin\n retrievedLetter = letterApi.get(\"ltr_4868c3b754655f90\")\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = LettersApi(api_client)\n\ntry:\n letter = api.get(\"ltr_4868c3b754655f90\")\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\LettersApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->get(\"ltr_4868c3b754655f90\");\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "LettersApi apiInstance = new LettersApi(config);\n\ntry {\n Letter response = apiInstance.get(\"ltr_4868c3b754655f90\");\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.Letter.find(\"ltr_4868c3b754655f90\")\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "LettersApi api = new LettersApi(config);\n\ntry {\n Letter response = api.get(\"ltr_4868c3b754655f90\");\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\nfetchedLetter, _, err := apiClient.LettersApi.Get(context,\"ltr_4868c3b754655f90\").Execute()\n\nif err != nil {\n return err\n}\n"
}
]
},
"parameters": [
{
"description": "id of the letter",
"in": "path",
"name": "ltr_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/ltr_id"
}
}
]
},
"/links": {
"get": {
"description": "Retrieves a list of shortened links. The list is sorted by creation date, with the most recently created appearing first.",
"operationId": "links_list",
"parameters": [
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/before_after"
},
{
"$ref": "#/components/parameters/campaign_id"
},
{
"description": "Filters links by the provided domain id.",
"in": "query",
"name": "domain_id",
"schema": {
"pattern": "^(dom)_[a-zA-Z0-9]+$",
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/links_response"
}
}
},
"description": "Returns the deleted link object."
},
"default": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error"
}
},
"summary": "List all links",
"tags": [
"URL Shortener"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X GET \"https://api.lob.com/v1/links?limit=2\" \\\n -u <YOUR_LIVE_API_KEY>:\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "try {\n const links = await new LinksApi(config).list(2);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.links.list({limit: 2}, function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "linksApi = LinksApi.new(config)\n\nbegin\n links = linksApi.list({ limit: 2 })\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = LinksApi(api_client)\n\ntry:\n links = api.list(limit=2)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\LinksApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->list(\n 2, // limit\n );\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "LinksApi apiInstance = new LinksApi(config);\n\ntry {\n LinksList response = apiInstance.list(\n 2, // limit\n null, // before\n null, // after\n null, // include\n null, // dateCreated\n );\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.Links.list(%{limit: 2})\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "LinksApi api = new LinksApi(config);\n\ntry {\n LinksList response = api.list(\n 2, // limit\n null, // before\n null, // after\n null, // include\n null, // dateCreated\n );\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\nLinksList = apiClient.LinksApi.List(context).Execute()\nif err != nil {\n return err\n}\n"
}
]
},
"post": {
"description": "Given a long URL, shorten your URL either by using a custom domain or Lob's own short domain.",
"operationId": "link_create",
"requestBody": {
"content": {
"application/json": {
"examples": {
"basic": {
"value": {
"redirect_link": "https://www.lob.com",
"slug": "a1b2c3"
}
},
"test": {
"value": {
"redirect_link": "https://www.lob.com",
"slug": "a1b2c3"
}
}
},
"schema": {
"$ref": "#/components/schemas/link_single"
}
},
"application/x-www-form-urlencoded": {
"examples": {
"basic": {
"value": {
"domain": "lob.st",
"redirect_link": "https://www.lob.com"
}
},
"test": {
"value": {
"domain": "lob.st",
"redirect_link": "https://www.lob.com"
}
}
},
"schema": {
"$ref": "#/components/schemas/link_single"
}
},
"multipart/form-data": {
"examples": {
"basic": {
"value": {
"redirect_link": "https://www.lob.com"
}
},
"test": {
"value": {
"redirect_link": "https://www.lob.com"
}
}
},
"schema": {
"$ref": "#/components/schemas/link_single"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/link_response"
}
}
},
"description": "Returns a successfully created link."
},
"default": {
"content": {
"application/json": {
"example": {
"error": {
"code": "invalid",
"message": "redirect_link is required",
"status_code": 422
}
},
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error"
}
},
"summary": "Create Link",
"tags": [
"URL Shortener"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/links/shorten \\\n -u <YOUR_LIVE_API_KEY>: \\\n -d \"redirect_link=https://www.lob.com\"\n"
}
]
}
},
"/links/{link_id}": {
"delete": {
"description": "Delete the shortened link.",
"operationId": "links_delete",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/link_delete_response"
}
}
},
"description": "Returns the deleted short link object"
},
"default": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error"
}
},
"summary": "Delete Link",
"tags": [
"URL Shortener"
]
},
"get": {
"description": "Retrieves a single shortened link.",
"operationId": "links_get",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/link_response"
}
}
},
"description": "Returns a single link."
},
"default": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error"
}
},
"summary": "Retrieve a link",
"tags": [
"URL Shortener"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X GET \"https://api.lob.com/v1/links/<link_id>\" \\\n -u <YOUR_LIVE_API_KEY>:\n"
}
]
},
"parameters": [
{
"description": "Unique identifier for a link.",
"in": "path",
"name": "link_id",
"required": true,
"schema": {
"type": "string"
}
}
],
"patch": {
"description": "Update any of the properties of a shortened link.",
"operationId": "link_update",
"requestBody": {
"content": {
"application/json": {
"examples": {
"basic": {
"value": {
"resource_id": "ltr_133"
}
},
"test": {
"value": {
"redirect_link": "ltr_133"
}
}
},
"schema": {
"$ref": "#/components/schemas/link_update"
}
},
"application/x-www-form-urlencoded": {
"examples": {
"basic": {
"value": {
"resource_id": "ltr_133"
}
},
"test": {
"value": {
"resource_id": "ltr_133"
}
}
},
"schema": {
"$ref": "#/components/schemas/link_update"
}
},
"multipart/form-data": {
"examples": {
"basic": {
"value": {
"resource_id": "ltr_133"
}
},
"test": {
"value": {
"resource_id": "ltr_133"
}
}
},
"schema": {
"$ref": "#/components/schemas/link_update"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/link_response"
}
}
},
"description": "Returns the updated link."
},
"default": {
"content": {
"application/json": {
"example": {
"error": {
"code": "invalid",
"message": "redirect_link is required",
"status_code": 422
}
},
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "Error"
}
},
"summary": "Update a Link",
"tags": [
"URL Shortener"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/links/<link_id> \\\n -u <YOUR_LIVE_API_KEY>: \\\n -d \"redirect_link=https://www.lob.com\"\n"
}
]
}
},
"/postcards": {
"get": {
"description": "Returns a list of your postcards. The addresses are returned sorted by creation date, with the most recently created addresses appearing first.",
"operationId": "postcards_list",
"parameters": [
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/before_after"
},
{
"$ref": "#/components/parameters/include"
},
{
"$ref": "#/components/parameters/date_created"
},
{
"$ref": "#/components/parameters/metadata"
},
{
"$ref": "#/components/parameters/campaign_id"
},
{
"$ref": "#/components/parameters/status"
},
{
"description": "Specifies the size of the postcard. Only `4x6` postcards can be sent to international destinations.",
"in": "query",
"name": "size",
"schema": {
"items": {
"$ref": "#/components/schemas/postcard_size"
},
"type": "array"
}
},
{
"$ref": "#/components/parameters/scheduled"
},
{
"$ref": "#/components/parameters/send_date"
},
{
"$ref": "#/components/parameters/mail_type"
},
{
"$ref": "#/components/parameters/sort_by"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/all_postcards"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "List",
"tags": [
"Postcards"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X GET \"https://api.lob.com/v1/postcards?limit=2\" \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
},
{
"label": "TYPESCRIPT",
"lang": "typescript",
"source": "try {\n const postcards = await new PostcardsApi(config).list(2);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.postcards.list({limit: 2}, function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "postcardsApi = PostcardsApi.new(config)\n\nbegin\n postcards = postcardsApi.list({ limit: 2 })\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = PostcardsApi(api_client)\n\ntry:\n postcards = api.list(limit=2)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\PostcardsApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->list(\n 2, // limit\n );\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "PostcardsApi apiInstance = new PostcardsApi(config);\n\ntry {\n PostcardList response = apiInstance.list(\n 2, // limit\n null, // before\n null, // after\n null, // include\n null, // dateCreated\n null, // metadata\n null, // size\n null, // scheduled\n null, // sendDate\n null, // mailType\n null // sortBy\n );\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.Postcard.list(%{limit: 2})\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "PostcardsApi api = new PostcardsApi(config);\n\nList<string> includeList = new List<string>();\nincludeList.Add(\"total_count\");\nDictionary<String, String> metadata = new Dictionary<String, String>();\nmetadata.Add(\"name\", \"Harry\");\nDictionary<String, DateTime> dateCreated = new Dictionary<String, DateTime>();\nDateTime dateCreatedDate = DateTime.Today.AddMonths(-1);\ndateCreated.Add(\"lt\", dateCreatedDate);\nDictionary<String, String> sendDate = new Dictionary<String, String>();\nsendDate.Add(\"lt\", DateTime.Now.ToString(\"yyyy-MM-ddTHH\\\\:mm\\\\:ss.fffffffzzz\"));\nSortBy3 sortBy = new SortBy3(SortBy3.DateCreatedEnum.Asc);\nList<PostcardSize> sizeArray = new List<PostcardSize>();\nsizeArray.Add(PostcardSize._4x6);\n\ntry {\n PostcardList response = api.list(\n 2, // limit\n null, // before\n null, // after\n includeList, // include\n dateCreated, // dateCreated\n metadata, // metadata\n sizeArray, // size\n true, // scheduled\n sendDate, // sendDate\n MailType.FirstClass, // mailType\n sortBy // sortBy\n );\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\nPostcardList = apiClient.PostcardsApi.List(context).Execute()\nif err != nil {\n return err\n}\n"
}
]
},
"post": {
"description": "Creates a new postcard given information",
"operationId": "postcard_create",
"parameters": [
{
"$ref": "#/components/parameters/idem-header"
},
{
"$ref": "#/components/parameters/idem-query"
}
],
"requestBody": {
"content": {
"application/json": {
"example": {
"back": "tmpl_a1234dddg",
"description": "demo",
"from": {
"address_city": "San Francisco",
"address_country": "US",
"address_line1": "210 King St",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107",
"company": "Lob",
"description": "Harry - Office",
"email": "harry@lob.com",
"name": "Harry Zhang",
"phone": "5555555555"
},
"front": "tmpl_a1234dddg",
"fsc": true,
"mail_type": "usps_first_class",
"merge_variables": {
"name": "Harry"
},
"metadata": {
"spiffy": "true"
},
"print_speed": "core",
"qr_code": {
"pages": "front,back",
"position": "relative",
"redirect_url": "https://www.lob.com",
"right": "2.5",
"top": "2.5",
"width": "2.5"
},
"send_date": "2017-11-01T00:00:00.000Z",
"size": "6x9",
"to": {
"address_city": "San Francisco",
"address_country": "US",
"address_line1": "210 King St",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107",
"company": "Lob",
"description": "Harry - Office",
"email": "harry@lob.com",
"name": "Harry Zhang",
"phone": "5555555555"
},
"use_type": "marketing"
},
"schema": {
"$ref": "#/components/schemas/postcard_editable"
}
},
"application/x-www-form-urlencoded": {
"encoding": {
"from": {
"explode": true,
"style": "deepObject"
},
"merge_variables": {
"explode": true,
"style": "deepObject"
},
"metadata": {
"explode": true,
"style": "deepObject"
},
"to": {
"explode": true,
"style": "deepObject"
}
},
"example": {
"back": "tmpl_c94e83ca2cd5121",
"description": "demo",
"from": {
"address_city": "San Francisco",
"address_country": "US",
"address_line1": "210 King St",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107",
"company": "Lob",
"description": "Harry - Office",
"email": "harry@lob.com",
"name": "Harry Zhang",
"phone": "5555555555"
},
"front": "tmpl_c94e83ca2cd5121",
"fsc": true,
"mail_type": "usps_first_class",
"merge_variables": {
"name": "Harry"
},
"metadata": {
"spiffy": "true"
},
"print_speed": "core",
"qr_code": {
"bottom": "2.5",
"pages": "back",
"position": "relative",
"redirect_url": "https://www.lob.com",
"right": "2.5",
"width": "2.5"
},
"send_date": "2017-11-01T00:00:00.000Z",
"size": "6x9",
"to": {
"address_city": "San Francisco",
"address_country": "US",
"address_line1": "210 King St",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107",
"company": "Lob",
"description": "Harry - Office",
"email": "harry@lob.com",
"name": "Harry Zhang",
"phone": "5555555555"
},
"use_type": "marketing"
},
"schema": {
"$ref": "#/components/schemas/postcard_editable"
}
},
"multipart/form-data": {
"example": {
"back": "tmpl_a1234dddg",
"description": "demo",
"from": {
"address_city": "San Francisco",
"address_country": "US",
"address_line1": "210 King St",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107",
"company": "Lob",
"description": "Harry - Office",
"email": "harry@lob.com",
"name": "Harry Zhang",
"phone": "5555555555"
},
"front": "tmpl_a1234dddg",
"fsc": true,
"mail_type": "usps_first_class",
"merge_variables": {
"name": "Harry"
},
"metadata": {
"spiffy": "true"
},
"print_speed": "core",
"qr_code": {
"bottom": "2.5",
"left": "2.5",
"pages": "front",
"position": "relative",
"redirect_url": "https://www.lob.com",
"width": "2.5"
},
"send_date": "2017-11-01T00:00:00.000Z",
"size": "6x9",
"to": {
"address_city": "San Francisco",
"address_country": "US",
"address_line1": "210 King St",
"address_line2": "# 6100",
"address_state": "CA",
"address_zip": "94107",
"company": "Lob",
"description": "Harry - Office",
"email": "harry@lob.com",
"name": "Harry Zhang",
"phone": "5555555555"
},
"use_type": "marketing"
},
"schema": {
"$ref": "#/components/schemas/postcard_editable"
}
}
},
"required": true
},
"responses": {
"200": {
"$ref": "#/components/responses/post_postcard"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "Create",
"tags": [
"Postcards"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/postcards \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -d 'description=Demo Postcard job' \\\n -d 'to[name]=Harry Zhang' \\\n -d 'to[address_line1]=210 King St' \\\n -d 'to[address_line2]=# 6100' \\\n -d 'to[address_city]=San Francisco' \\\n -d 'to[address_state]=CA' \\\n -d 'to[address_zip]=94107' \\\n -d 'from=adr_210a8d4b0b76d77b' \\\n --data-urlencode 'front=<html style=\"padding: 1in; font-size: 50;\">Front HTML for {{name}}</html>' \\\n --data-urlencode 'back=<html style=\"padding: 1in; font-size: 20;\">Back HTML for {{name}}</html>' \\\n -d 'merge_variables[name]=Harry' \\\n -d 'use_type=marketing' \\\n -d 'qr_code[position]=relative' \\\n -d 'qr_code[redirect_url]=https://www.lob.com' \\\n -d 'qr_code[width]=2.5' \\\n -d 'qr_code[bottom]=2.5' \\\n -d 'qr_code[left]=2.5' \\\n -d 'qr_code[pages]=front,back' \\\n -d 'fsc=true' \\\n -d 'print_speed=core'\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "const postcardCreate = new PostcardEditable({\nto: new AddressEditable({\n name: 'Harry Zhang',\n address_line1: '210 King St',\n address_line2: '# 6100',\n address_city: 'San Francisco',\n address_state: 'CA',\n address_zip: '94107'\n}),\nfrom: 'adr_xxxx',\nfront:\n'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/4x6_pc_template.pdf',\nback: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/4x6_pc_template.pdf',\nuse_type: 'marketing',\nqr_code : {\n position: 'relative',\n redirect_url: 'https://www.lob.com',\n width: '2.5',\n bottom: '2.5',\n left: '2.5',\n pages: 'front'\n},\nfsc: true,\nprint_speed: 'core'\n});\n\ntry {\n const myPostcard = await new PostcardsApi(config).create(postcardCreate);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.postcards.create({\n description: 'Demo Postcard job',\n to: {\n name: 'Harry Zhang',\n address_line1: '210 King St',\n address_line2: '# 6100',\n address_city: 'San Francisco',\n address_state: 'CA',\n address_zip: '94107'\n },\n from: 'adr_210a8d4b0b76d77b',\n front: '<html style=\"padding: 1in; font-size: 50;\">Front HTML for {{name}}</html>',\n back: '<html style=\"padding: 1in; font-size: 20;\">Back HTML for {{name}}</html>',\n merge_variables: {\n name: 'Harry'\n },\n use_type: 'marketing'\n qr_code : {\n position: 'relative',\n redirect_url: 'https://www.lob.com',\n width: '2.5',\n bottom: '2.5',\n left: '2.5',\n pages: 'back'\n },\n fsc: true,\n print_speed: 'core'\n}, function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "postcardCreate = PostcardEditable.new({\n description: \"Demo Postcard job\",\n from: \"adr_210a8d4b0b76d77b\",\n front: \"<html style='padding: 1in; font-size: 50;'>Front HTML for {{name}}</html>\",\n back: \"<html style='padding: 1in; font-size: 20;'>Back HTML for {{name}}</html>\",\n to: AddressEditable.new({\n name: \"Harry Zhang\",\n address_line1: \"210 King St\",\n address_line2: \"# 6100\",\n address_city: \"San Francisco\",\n address_state: \"CA\",\n address_zip: \"94107\",\n }),\n merge_variables: {\n name: \"Harry\"\n },\n fsc: true,\n print_speed: \"core\"\n});\n\npostcardApi = PostcardsApi.new(config)\n\nbegin\n createdPostcard = postcardApi.create(postcardCreate)\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "postcard_editable = PostcardEditable(\n description = \"Demo Postcard job\",\n _from = \"adr_210a8d4b0b76d77b\",\n front = \"<html style='padding: 1in; font-size: 50;'>Front HTML for {{name}}</html>\",\n back = \"<html style='padding: 1in; font-size: 20;'>Back HTML for {{name}}</html>\",\n to = AddressEditable(\n name = \"Harry Zhang\",\n address_line1 = \"210 King St\",\n address_line2 = \"# 6100\",\n address_city = \"San Francisco\",\n address_state = \"CA\",\n address_zip = \"94107\",\n ),\n merge_variables = MergeVariables(\n name = \"Harry\",\n ),\n use_type = \"marketing\",\n qr_code = {\n \"position\" : \"relative\",\n \"redirect_url\" : \"https://www.lob.com\",\n \"width\" : \"2.5\",\n \"bottom\" : \"2.5\",\n \"left\" : \"2.5\",\n \"pages\" : \"front\"\n },\n fsc = true,\n print_speed = \"core\"\n)\n\nwith ApiClient(configuration) as api_client:\n api = PostcardsApi(api_client)\n\ntry:\n created_postcard = api.create(postcard_editable)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$to = new OpenAPI\\Client\\Model\\AddressEditable(\n array(\n \"name\" => \"Harry Zhang\",\n \"address_line1\" => \"210 King St\",\n \"address_line2\" => \"# 6100\",\n \"address_city\" => \"San Francisco\",\n \"address_state\" => \"CA\",\n \"address_zip\" => \"94107\",\n )\n);\n\n$merge_variables = new stdClass;\n$merge_variables->name = \"Harry\";\n$use_type = \"marketing\";\n\n$qr_code = new OpenAPI\\Client\\Model\\QRCode(\n array(\n \"position\" => \"relative\",\n \"redirect_url\" => \"https://www.lob.com\",\n \"width\" => \"2\",\n \"bottom\" => \"2\",\n \"left\" => \"2\",\n \"pages\" => \"front,back\"\n )\n);\n\n$fsc = true;\n$print_speed = 'core';\n\n$apiInstance = new OpenAPI\\Client\\Api\\PostcardsApi($config, new GuzzleHttp\\Client());\n$postcard_editable = new OpenAPI\\Client\\Model\\PostcardEditable(\n array(\n \"description\" => \"Demo Postcard job\",\n \"from\" => \"adr_210a8d4b0b76d77b\",\n \"front\" => \"<html style='padding: 1in; font-size: 50;'>Front HTML for {{name}}</html>\",\n \"back\" => \"<html style='padding: 1in; font-size: 20;'>Back HTML for {{name}}</html>\",\n \"to\" => $to,\n \"merge_variables\" => $merge_variables,\n \"use_type\" => $use_type,\n \"qr_code\" => $qr_code,\n \"fsc\" => $fsc,\n \"print_speed\" => \"core\"\n )\n);\n\ntry {\n $result = $apiInstance->create($postcard_editable);\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "Map<String, String> merge_variables = new HashMap<String, String>();\nmerge_variables.put(\"name\", \"Harry\");\n\nPostcardsApi apiInstance = new PostcardsApi(config);\n\nAddressEditable to = new AddressEditable();\nto.setName(\"Harry Zhang\");\nto.setAddressLine1(\"210 King St\");\nto.setAddressLine2(\"# 6100\");\nto.setAddressCity(\"San Francisco\");\nto.setAddressState(\"CA\");\nto.setAddressZip(\"94107\");\n\nQRCode qrCode = new QRCode();\nqrCode.setPosition(\"relative\");\nqrCode.setRedirectUrl(\"https://www.lob.com\");\nqrCode.setWidth(\"2\");\nqrCode.setLeft(\"2\");\nqrCode.setBottom(\"2\");\nqrCode.setPages(\"back\");\n\ntry {\n PostcardEditable postcardEditable = new PostcardEditable();\n postcardEditable.setDescription(\"Demo Postcard job\");\n postcardEditable.setFrom(\"adr_210a8d4b0b76d77b\");\n postcardEditable.setFront(\"<html style='padding: 1in; font-size: 50;'>Front HTML for {{name}}</html>\");\n postcardEditable.setBack(\"<html style='padding: 1in; font-size: 20;'>Back HTML for {{name}}</html>\");\n postcardEditable.setTo(to);\n postcardEditable.setMergeVariables(merge_variables);\n postcardEditable.setUseType(\"operational\");\n postcardEditable.setQRCode(qrCode);\n postcardEditable.setFsc(true);\n postcardEditable.setPrintSpeed(\"core\");\n\n Postcard result = apiInstance.create(postcardEditable, null);\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.Postcard.create(%{\n description: 'Demo Postcard job',\n to: %{\n name: 'Harry Zhang',\n address_line1: '210 King St',\n address_line2: '# 6100',\n address_city: 'San Francisco',\n address_state: 'CA',\n address_zip: '94107'\n },\n from: 'adr_210a8d4b0b76d77b',\n front: '<html style=\"padding: 1in; font-size: 50;\">Front HTML for {{name}}</html>',\n back: '<html style=\"padding: 1in; font-size: 20;\">Back HTML for {{name}}</html>',\n merge_variables: %{\n name: 'Harry'\n },\n use_type: 'marketing'\n qr_code: %{\n position: 'relative',\n redirect_url: 'https://www.lob.com',\n width: '2',\n bottom: '2',\n left: '2',\n pages: 'front,back'\n },\n fsc: true,\n print_speed: 'core'\n})\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "Dictionary<string, string> mergeVariables = new Dictionary<string, string>();\nmergeVariables.Add(\"name\", \"Harry\");\n\nPostcardsApi api = new PostcardsApi(config);\n\nAddressEditable to = new AddressEditable(\n \"210 King St\", // addressLine1\n \"# 6100\", // addressLine2\n \"San Francisco\", // addressCity\n \"CA\", // addressState\n \"94107\", // addressZip\n CountryExtended.US, // addressCounty\n null, // description\n \"Harry Zhang\" // name\n);\n\nUseType usetype = new UseType('marketing');\n\nQRCode qrCode = new QRCode(\n \"relative\", //position,\n \"https://www.lob.com\", //redirect_url\n \"2\", //width\n \"2\", //left\n \"2\", //bottom\n \"front\", //pages\n);\n\nFsc fsc = new Fsc(true);\nPrintSpeed printSpeed = new PrintSpeed(\"core\");\n\nPostcardEditable postcardEditable = new PostcardEditable(\n to.ToJson(), // to\n \"adr_249af768103d2810\", // from\n default(PostcardSize), // size\n \"Demo Postcard Job\", // description\n null, // metadata\n default(MailType), // mailType\n mergeVariables, // mergeVariables\n default(DateTime), // sendDate\n \"<html style='padding: 1in; font-size: 20;'>Back HTML for {{name}}</html>\", // front\n \"<html style='padding: 1in; font-size: 20;'>Back HTML for {{name}}</html>\", // back\n usetype,\n qrCode,\n fsc,\n \"core\" // printSpeed\n);\n\ntry {\n Postcard result = api.create(postcardEditable, null);\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\nvar to = *lob.NewAddressEditable()\nto.SetAddressLine1(\"210 King St\")\nto.SetAddressLine2(\"# 6100\")\nto.SetAddressCity(\"San Francisco\")\nto.SetAddressState(\"CA\")\nto.SetAddressZip(\"94107\")\nto.SetAddressCountry(lob.COUNTRYEXTENDED_US)\nto.SetDescription(\"\")\nto.SetName(\"Harry Zhang\")\n\nvar postcardCreate = *lob.NewPostcardEditable()\npostcardCreate.SetDescription(\"Demo Postcard job\")\npostcardCreate.SetFrom(\"adr_210a8d4b0b76d77b\")\npostcardCreate.SetFront(\"<html style='padding: 1in; font-size: 50;'>Front HTML for {{name}}</html>\")\npostcardCreate.SetBack(\"<html style='padding: 1in; font-size: 20;'>Back HTML for {{name}}</html>\")\npostcardCreate.SetTo(to)\npostcardCreate.SetFsc(true)\npostcardCreate.SetPrintSpeed(\"core\")\n\n\ncreatedpostcard, _, err := apiClient.PostcardsApi.Create(context).PostcardEditable(postcardCreate).Execute()\n\nif err != nil {\n return err\n}\n"
}
]
}
},
"/postcards/{psc_id}": {
"delete": {
"description": "Completely removes a postcard from production. This can only be done if the postcard has a `send_date` and the `send_date` has not yet passed. If the postcard is successfully canceled, you will not be charged for it. Read more on [cancellation windows](#section/Cancellation-Windows) and [scheduling](#section/Scheduled-Mailings). Scheduling and cancellation is a premium feature. Upgrade to the appropriate <a href=\"https://dashboard.lob.com/#/settings/editions\" target=\"_blank\">Print & Mail Edition</a> to gain access.",
"operationId": "postcard_delete",
"responses": {
"200": {
"$ref": "#/components/responses/postcard_deleted"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "Cancel",
"tags": [
"Postcards"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X DELETE https://api.lob.com/v1/postcards/psc_5c002b86ce47537a \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "try {\n const deletePostcard = await new PostcardsApi(config).cancel('psc_xxxx');\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.postcards.cancel('psc_5c002b86ce47537a', function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "postcardApi = PostcardsApi.new(config)\n\nbegin\n deletedPostcard = postcardApi.cancel(\"psc_4868c3b754655f90\")\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = PostcardsApi(api_client)\n\ntry:\n deleted_resource = api.cancel(\"psc_5c002b86ce47537a\")\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\PostcardsApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->cancel(\"psc_5c002b86ce47537a\");\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "PostcardsApi apiInstance = new PostcardsApi(config);\n\ntry {\n PostcardDeletion response = apiInstance.cancel(\"psc_5c002b86ce47537a\");\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.Postcard.destroy(\"psc_5c002b86ce47537a\")\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "PostcardsApi api = new PostcardsApi(config);\n\ntry {\n PostcardDeletion response = api.cancel(\"psc_5c002b86ce47537a\");\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\ndeletedPostcard, _, err := apiClient.PostcardsApi.Cancel(context, \"psc_5c002b86ce47537a\").Execute()\n\nif err != nil {\n return err\n}\n"
}
]
},
"get": {
"description": "Retrieves the details of an existing postcard. You need only supply the unique customer identifier that was returned upon postcard creation.",
"operationId": "postcard_retrieve",
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/postcard"
},
"description": "Returns a postcard object"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "Retrieve",
"tags": [
"Postcards"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/postcards/psc_5c002b86ce47537a \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "try {\n const postcard = await new PostCardsApi(config).get('psc_xxxx');\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.postcards.retrieve('psc_5c002b86ce47537a', function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "letterApi = LettersApi.new(config)\n\nbegin\n retrievedLetter = letterApi.get(\"ltr_4868c3b754655f90\")\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = PostcardsApi(api_client)\n\ntry:\n postcard = api.get(\"psc_5c002b86ce47537a\")\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\PostcardsApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->get(\"psc_5c002b86ce47537a\");\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "PostcardsApi apiInstance = new PostcardsApi(config);\n\ntry {\n Postcard response = apiInstance.get(\"psc_5c002b86ce47537a\");\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.Postcard.find(\"psc_5c002b86ce47537a\")\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "PostcardsApi api = new PostcardsApi(config);\n\ntry {\n Postcard response = api.get(\"psc_5c002b86ce47537a\");\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\nfetchedPostcard, _, err := apiClient.PostcardsApi.Get(context,\"psc_5c002b86ce47537a\").Execute()\n\nif err != nil {\n return err\n}\n"
}
]
},
"parameters": [
{
"description": "id of the postcard",
"in": "path",
"name": "psc_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/psc_id"
}
}
]
},
"/qr_code_analytics": {
"get": {
"description": "Returns a list of your QR codes. The QR codes are returned sorted by scan date, with the most recently scanned QR codes appearing first.",
"operationId": "qr_codes_list",
"parameters": [
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/offset"
},
{
"$ref": "#/components/parameters/include"
},
{
"$ref": "#/components/parameters/date_created"
},
{
"description": "Filter list of responses to only include QR codes with at least one scan event.",
"in": "query",
"name": "scanned",
"schema": {
"type": "boolean"
}
},
{
"description": "Filter by the resource ID.",
"in": "query",
"name": "resource_ids",
"schema": {
"default": [],
"maxItems": 100,
"type": "array"
}
}
],
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/all_qr_codes"
},
"description": "Returns a list of QR Codes and their analytics."
}
},
"summary": "List",
"tags": [
"QR Codes"
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl -X GET \"https://api.lob.com/v1/qr_code_analytics?limit=2&scanned=true\" \\\n-u <YOUR API KEY>:\n"
}
]
}
},
"/resource_proofs": {
"post": {
"description": "Creates a new resource proof with the provided properties.",
"operationId": "resource_proof_create",
"requestBody": {
"content": {
"application/json": {
"example": {
"resource_parameters": {
"back": "tmpl_a1234dddg",
"front": "tmpl_a1234dddg",
"to": "adr_a1234dddg"
},
"resource_type": "postcard"
},
"schema": {
"$ref": "#/components/schemas/resource_proof_editable"
}
}
},
"required": true
},
"responses": {
"201": {
"$ref": "#/components/responses/post_resource_proof"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "Create",
"tags": [
"Resource Proofs"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/resource_proofs \\\n -u <YOUR API KEY>: \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"resource_type\": \"postcard\",\n \"resource_parameters\": {\n \"front\": \"tmpl_a1234dddg\",\n \"back\": \"tmpl_a1234dddg\",\n \"to\": \"adr_a1234dddg\"\n }\n }'\n"
}
]
}
},
"/resource_proofs/{res_prf_id}": {
"get": {
"description": "Retrieves the details of an existing resource proof. You need only supply the unique resource proof identifier.",
"operationId": "resource_proof_retrieve",
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/resource_proof"
},
"description": "Returns a resource proof object"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "Retrieve",
"tags": [
"Resource Proofs"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/resource_proofs/res_prf_example123 \\\n -u <YOUR API KEY>:\n"
}
]
},
"parameters": [
{
"description": "id of the resource proof",
"in": "path",
"name": "res_prf_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/res_prf_id"
}
}
],
"patch": {
"description": "Updates the specified resource proof.",
"operationId": "resource_proof_update",
"requestBody": {
"content": {
"application/json": {
"example": {
"template_id": "tmpl_a1234dddg"
},
"schema": {
"$ref": "#/components/schemas/resource_proof_updatable"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/resource_proof"
},
"description": "Returns an updated resource proof object"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "Update",
"tags": [
"Resource Proofs"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X PATCH https://api.lob.com/v1/resource_proofs/res_prf_example123 \\\n -u <YOUR API KEY>: \\\n -H \"Content-Type: application/json\" \\\n -d '{\"template_id\": \"tmpl_a1234dddg\"}'\n"
}
]
}
},
"/self_mailers": {
"get": {
"description": "Returns a list of your self_mailers. The self_mailers are returned sorted by creation date, with the most recently created self_mailers appearing first.",
"operationId": "self_mailers_list",
"parameters": [
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/before_after"
},
{
"$ref": "#/components/parameters/include"
},
{
"$ref": "#/components/parameters/date_created"
},
{
"$ref": "#/components/parameters/metadata"
},
{
"description": "The self mailer sizes to be returned.",
"in": "query",
"name": "size",
"schema": {
"items": {
"$ref": "#/components/schemas/self_mailer_size"
},
"type": "array"
}
},
{
"$ref": "#/components/parameters/scheduled"
},
{
"$ref": "#/components/parameters/send_date"
},
{
"$ref": "#/components/parameters/mail_type"
},
{
"$ref": "#/components/parameters/sort_by"
},
{
"$ref": "#/components/parameters/campaign_id"
},
{
"$ref": "#/components/parameters/status"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/all_self_mailers"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "List",
"tags": [
"Self Mailers"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X GET \"https://api.lob.com/v1/self_mailers?limit=2\" \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
},
{
"label": "TYPESCRIPT",
"lang": "typescript",
"source": "try {\n const selfMailers = await new selfMailersApi(config).list(2);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.selfMailers.list({limit: 2}, function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "selfMailersApi = SelfMailersApi.new(config)\n\nbegin\n selfMailers = selfMailersApi.list({ limit: 2 })\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = SelfMailersApi(api_client)\n\ntry:\n self_mailers = api.list(limit=2)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\SelfMailersApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->list(\n 2, // limit\n );\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "SelfMailersApi apiInstance = new SelfMailersApi(config);\n\ntry {\n SelfMailerList response = apiInstance.list(\n 2, // limit\n null, // before\n null, // after\n null, // include\n null, // dateCreated\n null, // metadata\n null, // size\n null, // scheduled\n null, // sendDate\n null, // mailType\n null // sortBy\n );\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.SelfMailer.list(%{limit: 2})\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "SelfMailersApi api = new SelfMailersApi(config);\n\nList<string> includeList = new List<string>();\nincludeList.Add(\"total_count\");\nDictionary<String, String> metadata = new Dictionary<String, String>();\nmetadata.Add(\"name\", \"Harry\");\nDictionary<String, DateTime> dateCreated = new Dictionary<String, DateTime>();\nDateTime dateCreatedDate = DateTime.Today.AddMonths(-1);\ndateCreated.Add(\"lt\", dateCreatedDate);\nDictionary<String, String> sendDate = new Dictionary<String, String>();\nsendDate.Add(\"lt\", DateTime.Now.ToString(\"yyyy-MM-ddTHH\\\\:mm\\\\:ss.fffffffzzz\"));\nSortBy3 sortBy = new SortBy3(SortBy3.DateCreatedEnum.Asc);\n\ntry {\n SelfMailerList response = api.list(\n 2, // limit\n null, // before\n null, // after\n includeList, // include\n dateCreated, // dateCreated\n metadata, // metadata\n null, // size\n true, // scheduled\n sendDate, // sendDate\n MailType.FirstClass, // mailType\n sortBy // sortBy\n );\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\nSelfMailerList = apiClient.SelfMailersApi.List(context).Execute()\nif err != nil {\n return err\n}\n"
}
]
},
"post": {
"description": "Creates a new self_mailer given information",
"operationId": "self_mailer_create",
"parameters": [
{
"$ref": "#/components/parameters/idem-header"
},
{
"$ref": "#/components/parameters/idem-query"
}
],
"requestBody": {
"content": {
"application/json": {
"example": {
"description": "Demo Self Mailer job",
"from": "adr_210a8d4b0b76d77b",
"fsc": true,
"inside": "https://lob.com/selfmailerinside.pdf",
"mail_type": "usps_standard",
"merge_variables": {
"name": "Harry"
},
"metadata": {
"spiffy": "true"
},
"outside": "https://lob.com/selfmaileroutside.pdf",
"print_speed": "core",
"qr_code": {
"pages": "inside,outside",
"position": "relative",
"redirect_url": "https://www.lob.com",
"right": "2.5",
"top": "2.5",
"width": "2.5"
},
"send_date": "2017-11-01T00:00:00.000Z",
"size": "12x9_bifold",
"to": "adr_bae820679f3f536b",
"use_type": "marketing"
},
"schema": {
"$ref": "#/components/schemas/self_mailer_editable"
}
},
"application/x-www-form-urlencoded": {
"encoding": {
"merge_variables": {
"explode": true,
"style": "deepObject"
},
"metadata": {
"explode": true,
"style": "deepObject"
}
},
"example": {
"description": "Demo Self Mailer job",
"from": "adr_210a8d4b0b76d77b",
"fsc": true,
"inside": "https://lob.com/selfmailerinside.pdf",
"mail_type": "usps_standard",
"merge_variables": {
"name": "Harry"
},
"metadata": {
"spiffy": "true"
},
"outside": "https://lob.com/selfmaileroutside.pdf",
"print_speed": "core",
"qr_code": {
"pages": "inside,outside",
"position": "relative",
"redirect_url": "https://www.lob.com",
"right": "2.5",
"top": "2.5",
"width": "2.5"
},
"send_date": "2017-11-01T00:00:00.000Z",
"size": "12x9_bifold",
"to": "adr_bae820679f3f536b",
"use_type": "marketing"
},
"schema": {
"$ref": "#/components/schemas/self_mailer_editable"
}
},
"multipart/form-data": {
"example": {
"description": "Demo Self Mailer job",
"from": "adr_210a8d4b0b76d77b",
"fsc": true,
"inside": "https://lob.com/selfmailerinside.pdf",
"mail_type": "usps_standard",
"merge_variables": {
"name": "Harry"
},
"metadata": {
"spiffy": "true"
},
"outside": "https://lob.com/selfmaileroutside.pdf",
"print_speed": "core",
"qr_code": {
"pages": "inside,outside",
"position": "relative",
"redirect_url": "https://www.lob.com",
"right": "2.5",
"top": "2.5",
"width": "2.5"
},
"send_date": "2017-11-01T00:00:00.000Z",
"size": "12x9_bifold",
"to": "adr_bae820679f3f536b",
"use_type": "marketing"
},
"schema": {
"$ref": "#/components/schemas/self_mailer_editable"
}
}
},
"required": true
},
"responses": {
"200": {
"$ref": "#/components/responses/post_self_mailer"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "Create",
"tags": [
"Self Mailers"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/self_mailers \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -d \"description=Demo Self Mailer job\" \\\n -d \"to[name]=Harry Zhang\" \\\n -d \"to[address_line1]=210 King St\" \\\n -d \"to[address_city]=San Francisco\" \\\n -d \"to[address_state]=CA\" \\\n -d \"to[address_zip]=94107\" \\\n -d \"from=adr_210a8d4b0b76d77b\" \\\n -d \"use_type=marketing\" \\\n -d 'qr_code[position]=relative' \\\n -d 'qr_code[redirect_url]=https://www.lob.com' \\\n -d 'qr_code[width]=2.5' \\\n -d 'qr_code[bottom]=2.5' \\\n -d 'qr_code[left]=2.5' \\\n -d 'qr_code[pages]=inside,outside'\n --data-urlencode \"inside=<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>\" \\\n --data-urlencode \"outside=<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>\" \\\n -d \"merge_variables[name]=Harry\" \\\n -d 'fsc=true' \\\n -d 'print_speed=core'\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "const selfMailerCreate = new SelfMailerEditable({\n to: {\n name: 'Harry Zhang',\n address_line1: '210 King St',\n address_line2: '# 6100',\n address_city: 'San Francisco',\n address_state: 'CA',\n address_zip: '94107',\n},\n from: 'adr_xxxx',\n inside:\n 'https://s3.us-west-2.amazonaws.com/public.lob.com/assets/templates/self_mailers/6x18_sfm_inside.pdf',\n outside:\n 'https://s3.us-west-2.amazonaws.com/public.lob.com/assets/templates/self_mailers/6x18_sfm_outside.pdf',\n use_type: 'marketing'\n qr_code : {\n position: 'relative',\n redirect_url: 'https://www.lob.com',\n width: '2.5',\n bottom: '2.5',\n left: '2.5',\n pages: 'inside'\n },\n fsc: true,\n print_speed: 'core'\n});\n\ntry {\n const mySelfMailer = await new SelfMailersApi(config).create(selfMailerCreate);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.selfMailers.create({\n description: 'Demo Self Mailer job',\n to: {\n name: 'Harry Zhang',\n address_line1: '210 King St',\n address_city: 'San Francisco',\n address_state: 'CA',\n address_zip: '94107'\n },\n from: 'adr_210a8d4b0b76d77b',\n inside: '<html style=\"padding: 1in; font-size: 50;\">Inside HTML for {{name}}</html>',\n outside: '<html style=\"padding: 1in; font-size: 20;\">Outside HTML for {{name}}</html>',\n merge_variables: {\n name: 'Harry'\n },\n use_type: 'marketing'\n qr_code : {\n position: 'relative',\n redirect_url: 'https://www.lob.com',\n width: '2.5',\n bottom: '2.5',\n left: '2.5',\n pages: 'inside'\n },\n fsc: true,\n print_speed: 'core'\n}, function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "selfMailerCreate = SelfMailerEditable.new({\n description: \"Demo Self Mailer job\",\n from: \"adr_210a8d4b0b76d77b\",\n inside: \"<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>\",\n outside: \"<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>\",\n to: AddressEditable.new({\n name: \"Harry Zhang\",\n address_line1: \"210 King St\",\n address_line2: \"# 6100\",\n address_city: \"San Francisco\",\n address_state: \"CA\",\n address_zip: \"94107\",\n }),\n merge_variables: {\n name: \"Harry\"\n },\n use_type: 'marketing'\n qr_code : {\n position: 'relative',\n redirect_url: 'https://www.lob.com',\n width: '2.5',\n bottom: '2.5',\n left: '2.5',\n pages: 'inside'\n },\n fsc: true,\n print_speed: \"core\"\n});\n\nselfMailerApi = SelfMailersApi.new(config)\n\nbegin\n createdSelfMailer = selfMailerApi.create(selfMailerCreate)\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "self_mailer_editable = SelfMailerEditable(\n description = \"Demo Self Mailer job\",\n _from = \"adr_210a8d4b0b76d77b\",\n inside = \"<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>\",\n outside = \"<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>\",\n to = AddressEditable(\n name = \"Harry Zhang\",\n address_line1 = \"210 King St\",\n address_line2 = \"# 6100\",\n address_city = \"San Francisco\",\n address_state = \"CA\",\n address_zip = \"94107\",\n ),\n merge_variables = MergeVariables(\n name = \"Harry\",\n ),\n use_type = \"marketing\"\n qr_code = {\n position: \"relative\",\n redirect_url: \"https://www.lob.com\",\n width: \"2.5\",\n bottom: \"2.5\",\n left: \"2.5\",\n pages: \"inside\"\n },\n fsc = true,\n print_speed = \"core\"\n)\n\nwith ApiClient(configuration) as api_client:\n api = SelfMailersApi(api_client)\n\ntry:\n created_self_mailer = api.create(self_mailer_editable)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$to = new OpenAPI\\Client\\Model\\AddressEditable(\n array(\n \"name\" => \"Harry Zhang\",\n \"address_line1\" => \"210 King St\",\n \"address_line2\" => \"# 6100\",\n \"address_city\" => \"San Francisco\",\n \"address_state\" => \"CA\",\n \"address_zip\" => \"94107\",\n )\n);\n\n$merge_variables = new stdClass;\n$merge_variables->name = \"Harry\";\n\n$use_type = \"marketing\";\n$fsc = true;\n$print_speed = 'core';\n\n$qr_code = new OpenAPI\\Client\\Model\\QRCode(\n array(\n \"position\" => \"relative\",\n \"redirect_url\" => \"https://www.lob.com\",\n \"width\" => \"2\",\n \"bottom\" => \"2\",\n \"left\" => \"2\",\n \"pages\" => \"inside,outside\"\n )\n);\n\n$apiInstance = new OpenAPI\\Client\\Api\\SelfMailersApi($config, new GuzzleHttp\\Client());\n$self_mailer_editable = new OpenAPI\\Client\\Model\\SelfMailerEditable(\n array(\n \"description\" => \"Demo Self Mailer job\",\n \"from\" => \"adr_210a8d4b0b76d77b\",\n \"inside\" => \"<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>\",\n \"outside\" => \"<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>\",\n \"to\" => $to,\n \"merge_variables\" => $merge_variables,\n \"use_type\" => $use_type,\n \"qr_code\" => $qr_code,\n \"fsc\" => $fsc,\n \"print_speed\" => \"core\"\n )\n);\n\ntry {\n $result = $apiInstance->create($self_mailer_editable);\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "Map<String, String> merge_variables = new HashMap<String, String>();\nmerge_variables.put(\"name\", \"Harry\");\n\nSelfMailersApi apiInstance = new SelfMailersApi(config);\n\nAddressEditable to = new AddressEditable();\nto.setName(\"Harry Zhang\");\nto.setAddressLine1(\"210 King St\");\nto.setAddressLine2(\"# 6100\");\nto.setAddressCity(\"San Francisco\");\nto.setAddressState(\"CA\");\nto.setAddressZip(\"94107\");\n\nQRCode qrCode = new QRCode();\nqrCode.setPosition(\"relative\");\nqrCode.setRedirectUrl(\"https://www.lob.com\");\nqrCode.setWidth(\"2\");\nqrCode.setLeft(\"2\");\nqrCode.setBottom(\"2\");\nqrCode.setPages(\"outside\");\n\ntry {\n SelfMailerEditable selfMailerEditable = new SelfMailerEditable();\n selfMailerEditable.setDescription(\"Demo Self Mailer job\");\n selfMailerEditable.setFrom(\"adr_210a8d4b0b76d77b\");\n selfMailerEditable.setInside(\"<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>\");\n selfMailerEditable.setOutside(\"<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>\");\n selfMailerEditable.setTo(to);\n selfMailerEditable.setMergeVariables(merge_variables);\n selfMailerEditable.setUseType(\"marketing\");\n selfMailerEditable.setQRCode(qrCode);\n selfMailerEditable.setFsc(true);\n selfMailerEditable.setPrintSpeed(\"core\");\n\n\n SelfMailer result = apiInstance.create(selfMailerEditable, null);\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.SelfMailer.create(%{\n description: \"Demo Self Mailer job\",\n to: %{\n name: \"Harry Zhang\",\n address_line1: \"210 King St\",\n address_city: \"San Francisco\",\n address_state: \"CA\",\n address_zip: \"94107\"\n },\n from: \"adr_210a8d4b0b76d77b\",\n inside: \"<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>\",\n outside: \"<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>\",\n merge_variables: %{\n name: \"Harry\"\n },\n use_type: \"marketing\"\n qr_code: %{\n position: 'relative',\n redirect_url: 'https://www.lob.com',\n width: '2',\n bottom: '2',\n left: '2',\n pages: 'inside,outside'\n },\n fsc: true,\n print_speed: 'core'\n})\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "Dictionary<string, string> mergeVariables = new Dictionary<string, string>();\nmergeVariables.Add(\"name\", \"Harry\");\n\nSelfMailersApi api = new SelfMailersApi(config);\n\nAddressEditable to = new AddressEditable(\n \"210 King St\", // addressLine1\n \"# 6100\", // addressLine2\n \"San Francisco\", // addressCity\n \"CA\", // addressState\n \"94107\", // addressZip\n default(CountryExtended), // addressCounty\n null, // description\n \"Harry Zhang\" // name\n);\n\nQRCode qrCode = new QRCode(\n \"relative\", //position,\n \"https://www.lob.com\", //redirect_url\n \"2\", //width\n \"2\", //left\n \"2\", //bottom\n \"inside\", //pages\n);\n\nFsc fsc = new Fsc(true);\nPrintSpeed printSpeed = new PrintSpeed(\"core\");\n\nSelfMailerEditable selfMailerEditable = new SelfMailerEditable(\n to.ToJson(), // to\n \"adr_249af768103d2810\", // from\n default(SelfMailerSize), // size\n \"Demo Self Mailer Job\", // description\n default(Dictionary<string, string>), // metadata\n default(MailType), // mailType\n mergeVariables, // mergeVariables\n default(DateTime), // sendDate\n \"<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>\", // inside\n \"<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>\", // outside\n \"marketing\", // use_type \n qrCode,\n fsc,\n \"core\" // print_speed\n);\n\ntry {\n SelfMailer result = api.create(selfMailerEditable, null);\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\nvar to = *lob.NewAddressEditable()\nto.SetAddressLine1(\"210 King St\")\nto.SetAddressLine2(\"# 6100\")\nto.SetAddressCity(\"San Francisco\")\nto.SetAddressState(\"CA\")\nto.SetAddressZip(\"94107\")\nto.SetAddressCountry(lob.COUNTRYEXTENDED_US)\nto.SetDescription(\"\")\nto.SetName(\"Harry Zhang\")\n\nvar selfMailerCreate = *lob.NewSelfMailerEditable()\nselfMailerCreate.SetDescription(\"Demo Self Mailer job\")\nselfMailerCreate.SetFrom(\"adr_210a8d4b0b76d77b\")\nselfMailerCreate.SetInside(\"<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>\")\nselfMailerCreate.SetOutside(\"<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>\")\nselfMailerCreate.SetTo(to)\nselfMailerCreate.SetFsc(true)\nselfMailerCreate.SetPrintSpeed(\"core\")\n\n\ncreatedselfMailer, _, err := apiClient.SelfMailersApi.Create(context).SelfMailerEditable(selfMailerCreate).Execute()\n\nif err != nil {\n return err\n}\n"
}
]
}
},
"/self_mailers/{sfm_id}": {
"delete": {
"description": "Completely removes a self mailer from production. This can only be done if the self mailer's `send_date` has not yet passed. If the self mailer is successfully canceled, you will not be charged for it. 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.",
"operationId": "self_mailer_delete",
"responses": {
"200": {
"$ref": "#/components/responses/self_mailer_deleted"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "Delete",
"tags": [
"Self Mailers"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X DELETE https://api.lob.com/v1/self_mailers/sfm_8ffbe811dea49dcf \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
},
{
"label": "TYPESCRIPT",
"lang": "typescript",
"source": "try {\n const deleteSelfMailer = await new SelfMailersApi(config).cancel('sfm_xxxx');\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.selfMailers.cancel('sfm_8ffbe811dea49dcf', function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "selfMailerApi = SelfMailersApi.new(config)\n\nbegin\n deletedSelfMailer = selfMailerApi.cancel(\"sfm_8ffbe811dea49dcf\")\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = SelfMailersApi(api_client)\n\ntry:\n deleted_resource = api.cancel(\"sfm_8ffbe811dea49dcf\")\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\SelfMailersApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->cancel(\"sfm_8ffbe811dea49dcf\");\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "SelfMailersApi apiInstance = new SelfMailersApi(config);\n\ntry {\n SelfMailerDeletion response = apiInstance.cancel(\"sfm_8ffbe811dea49dcf\");\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.SelfMailer.destroy(\"sfm_8ffbe811dea49dcf\")\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "SelfMailersApi api = new SelfMailersApi(config);\n\ntry {\n SelfMailerDeletion response = api.cancel(\"sfm_8ffbe811dea49dcf\");\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\ndeletedSelfMailer, _, err := apiClient.SelfMailersApi.Cancel(context, \"sfm_8ffbe811dea49dcf\").Execute()\n\nif err != nil {\n return err\n}\n"
}
]
},
"get": {
"description": "Retrieves the details of an existing self_mailer. You need only supply the unique self_mailer identifier that was returned upon self_mailer creation.",
"operationId": "self_mailer_retrieve",
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/self_mailer"
},
"description": "Returns a self_mailer object"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "Retrieve",
"tags": [
"Self Mailers"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X GET \"https://api.lob.com/v1/self_mailers/sfm_8ffbe811dea49dcf\" \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
},
{
"label": "TYPESCRIPT",
"lang": "typescript",
"source": "try {\n const selfMailer = await new SelfMailersApi(config).get('sfm_xxxx');\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.selfMailers.retrieve('sfm_8ffbe811dea49dcf', function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "selfMailerApi = SelfMailersApi.new(config)\n\nbegin\n retrievedSelfMailer = selfMailerApi.get(\"sfm_8ffbe811dea49dcf\")\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = SelfMailersApi(api_client)\n\ntry:\n self_mailer = api.get(\"sfm_8ffbe811dea49dcf\")\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\SelfMailersApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->get(\"sfm_8ffbe811dea49dcf\");\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "SelfMailersApi apiInstance = new SelfMailersApi(config);\n\ntry {\n SelfMailer response = apiInstance.get(\"sfm_8ffbe811dea49dcf\");\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.SelfMailer.find(\"sfm_8ffbe811dea49dcf\")\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "SelfMailersApi api = new SelfMailersApi(config);\n\ntry {\n SelfMailer response = api.get(\"sfm_8ffbe811dea49dcf\");\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\nfetchedSelfMailer, _, err := apiClient.SelfMailersApi.Get(context,\"sfm_8ffbe811dea49dcf\").Execute()\n\nif err != nil {\n return err\n}\n"
}
]
},
"parameters": [
{
"description": "id of the self_mailer",
"in": "path",
"name": "sfm_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/sfm_id"
}
}
]
},
"/snap_packs": {
"get": {
"description": "Returns a list of your snap_packs. The snap_packs are returned sorted by creation date, with the most recently created snap_packs appearing first.",
"operationId": "snap_packs_list",
"parameters": [
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/before_after"
},
{
"$ref": "#/components/parameters/include"
},
{
"$ref": "#/components/parameters/date_created"
},
{
"$ref": "#/components/parameters/metadata"
},
{
"$ref": "#/components/parameters/send_date"
},
{
"$ref": "#/components/parameters/mail_type"
},
{
"$ref": "#/components/parameters/sort_by"
},
{
"$ref": "#/components/parameters/campaign_id"
},
{
"$ref": "#/components/parameters/status"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/all_snap_packs"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "List",
"tags": [
"Snap Packs"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X GET \"https://api.lob.com/v1/snap_packs?limit=2\" \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
},
{
"label": "TYPESCRIPT",
"lang": "typescript",
"source": "try {\n const snapPacks = await new snapPacksApi(config).list(2);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.snapPacks.list({limit: 2}, function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "snapPacksApi = SnapPacksApi.new(config)\n\nbegin\n snapPacks = snapPacksApi.list({ limit: 2 })\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = SnapPacksApi(api_client)\n\ntry:\n snap_packs = api.list(limit=2)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\SnapPacksApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->list(\n 2, // limit\n );\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "SnapPacksApi apiInstance = new SnapPacksApi(config);\n\ntry {\n SnapPackList response = apiInstance.list(\n 2, // limit\n null, // before\n null, // after\n null, // include\n null, // dateCreated\n null, // metadata\n null, // size\n null, // scheduled\n null, // sendDate\n null, // mailType\n null // sortBy\n );\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.SnapPack.list(%{limit: 2})\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "SnapPacksApi api = new SnapPacksApi(config);\n\nList<string> includeList = new List<string>();\nincludeList.Add(\"total_count\");\nDictionary<String, String> metadata = new Dictionary<String, String>();\nmetadata.Add(\"name\", \"Harry\");\nDictionary<String, DateTime> dateCreated = new Dictionary<String, DateTime>();\nDateTime dateCreatedDate = DateTime.Today.AddMonths(-1);\ndateCreated.Add(\"lt\", dateCreatedDate);\nDictionary<String, String> sendDate = new Dictionary<String, String>();\nsendDate.Add(\"lt\", DateTime.Now.ToString(\"yyyy-MM-ddTHH\\\\:mm\\\\:ss.fffffffzzz\"));\nSortBy3 sortBy = new SortBy3(SortBy3.DateCreatedEnum.Asc);\n\ntry {\n SnapPackList response = api.list(\n 2, // limit\n null, // before\n null, // after\n includeList, // include\n dateCreated, // dateCreated\n metadata, // metadata\n null, // size\n true, // scheduled\n sendDate, // sendDate\n MailType.FirstClass, // mailType\n sortBy // sortBy\n );\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\nSnapPackList = apiClient.SnapPacksApi.List(context).Execute()\nif err != nil {\n return err\n}\n"
}
]
},
"post": {
"description": "Creates a new snap_pack given information",
"operationId": "snap_pack_create",
"parameters": [
{
"$ref": "#/components/parameters/idem-header"
},
{
"$ref": "#/components/parameters/idem-query"
}
],
"requestBody": {
"content": {
"application/json": {
"example": {
"description": "Demo Snap Pack Job",
"from": "adr_210a8d4b0b76d77b",
"inside": "https://lob.com/snappackinside.pdf",
"mail_type": "usps_standard",
"merge_variables": {
"name": "Harry"
},
"metadata": {
"spiffy": "true"
},
"outside": "https://lob.com/snappackoutside.pdf",
"print_speed": "core",
"send_date": "2017-11-01T00:00:00.000Z",
"size": "8.5x11",
"to": "adr_bae820679f3f536b",
"use_type": "marketing"
},
"schema": {
"$ref": "#/components/schemas/snap_pack_editable"
}
},
"multipart/form-data": {
"example": {
"description": "Demo Snap Pack job",
"from": "adr_210a8d4b0b76d77b",
"inside": "https://lob.com/snappackinside.pdf",
"mail_type": "usps_standard",
"merge_variables": {
"name": "Harry"
},
"metadata": {
"spiffy": "true"
},
"outside": "https://lob.com/snappackoutside.pdf",
"print_speed": "core",
"send_date": "2017-11-01T00:00:00.000Z",
"size": "8.5x11",
"to": "adr_bae820679f3f536b",
"use_type": "marketing"
},
"schema": {
"$ref": "#/components/schemas/snap_pack_editable"
}
}
},
"required": true
},
"responses": {
"200": {
"$ref": "#/components/responses/post_snap_pack"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "Create",
"tags": [
"Snap Packs"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/snap_packs \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -d \"description=Demo Snap Pack job\" \\\n -d \"to[name]=Harry Zhang\" \\\n -d \"to[address_line1]=210 King St\" \\\n -d \"to[address_city]=San Francisco\" \\\n -d \"to[address_state]=CA\" \\\n -d \"to[address_zip]=94107\" \\\n -d \"from=adr_210a8d4b0b76d77b\" \\\n -d \"use_type=marketing\" \\\n --data-urlencode \"inside=<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>\" \\\n --data-urlencode \"outside=<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>\" \\\n -d \"merge_variables[name]=Harry\" \\\n -d 'fsc=false' \\\n -d 'print_speed=core'\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "const snapPackCreate = new SnapPackEditable({\n to: {\n name: 'Harry Zhang',\n address_line1: '210 King St',\n address_line2: '# 6100',\n address_city: 'San Francisco',\n address_state: 'CA',\n address_zip: '94107',\n},\n from: 'adr_xxxx',\n inside:\n 'https://s3.us-west-2.amazonaws.com/public.lob.com/assets/8.5x11_Snappack_template_address.pdf',\n outside:\n 'https://s3.us-west-2.amazonaws.com/public.lob.com/assets/8.5x11_Snappack_template_address.pdf',\n use_type: 'marketing'\n fsc: false,\n print_speed: 'core'\n});\n\ntry {\n const mySnapPack = await new SnapPacksApi(config).create(snapPackCreate);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.snapPacks.create({\n description: 'Demo Snap Packs job',\n to: {\n name: 'Harry Zhang',\n address_line1: '210 King St',\n address_city: 'San Francisco',\n address_state: 'CA',\n address_zip: '94107'\n },\n from: 'adr_210a8d4b0b76d77b',\n inside: '<html style=\"padding: 1in; font-size: 50;\">Inside HTML for {{name}}</html>',\n outside: '<html style=\"padding: 1in; font-size: 20;\">Outside HTML for {{name}}</html>',\n merge_variables: {\n name: 'Harry'\n },\n use_type: 'marketing'\n fsc: false,\n print_speed: 'core'\n}, function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "snapPackCreate = SnapPackEditable.new({\n description: \"Demo Snap Pack job\",\n from: \"adr_210a8d4b0b76d77b\",\n inside: \"<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>\",\n outside: \"<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>\",\n to: AddressEditable.new({\n name: \"Harry Zhang\",\n address_line1: \"210 King St\",\n address_line2: \"# 6100\",\n address_city: \"San Francisco\",\n address_state: \"CA\",\n address_zip: \"94107\",\n }),\n merge_variables: {\n name: \"Harry\"\n },\n use_type: 'marketing',\n fsc: true,\n print_speed: \"core\"\n});\n\nsnapPackApi = SnapPacksApi.new(config)\n\nbegin\n createdSnapPack = snapPackApi.create(snapPackCreate)\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "snap_pack_editable = SnapPackEditable(\n description = \"Demo Snap Pack job\",\n _from = \"adr_210a8d4b0b76d77b\",\n inside = \"<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>\",\n outside = \"<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>\",\n to = AddressEditable(\n name = \"Harry Zhang\",\n address_line1 = \"210 King St\",\n address_line2 = \"# 6100\",\n address_city = \"San Francisco\",\n address_state = \"CA\",\n address_zip = \"94107\",\n ),\n merge_variables = MergeVariables(\n name = \"Harry\",\n ),\n use_type = \"marketing\",\n fsc = true,\n print_speed = \"core\"\n)\n\nwith ApiClient(configuration) as api_client:\n api = SnapPacksApi(api_client)\n\ntry:\n created_snap_pack = api.create(snap_pack_editable)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$to = new OpenAPI\\Client\\Model\\AddressEditable(\n array(\n \"name\" => \"Harry Zhang\",\n \"address_line1\" => \"210 King St\",\n \"address_line2\" => \"# 6100\",\n \"address_city\" => \"San Francisco\",\n \"address_state\" => \"CA\",\n \"address_zip\" => \"94107\",\n )\n);\n\n$merge_variables = new stdClass;\n$merge_variables->name = \"Harry\";\n\n$use_type = \"marketing\";\n$fsc = true;\n$print_speed = 'core';\n\n$apiInstance = new OpenAPI\\Client\\Api\\SnapPacksApi($config, new GuzzleHttp\\Client());\n$snap_pack_editable = new OpenAPI\\Client\\Model\\SnapPackEditable(\n array(\n \"description\" => \"Demo Snap Pack job\",\n \"from\" => \"adr_210a8d4b0b76d77b\",\n \"inside\" => \"<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>\",\n \"outside\" => \"<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>\",\n \"to\" => $to,\n \"merge_variables\" => $merge_variables,\n \"use_type\" => $use_type,\n \"fsc\" => $fsc,\n \"print_speed\" => \"core\"\n )\n);\n\ntry {\n $result = $apiInstance->create($snap_pack_editable);\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "Map<String, String> merge_variables = new HashMap<String, String>();\nmerge_variables.put(\"name\", \"Harry\");\n\nSnapPacksApi apiInstance = new SnapPacksApi(config);\n\nAddressEditable to = new AddressEditable();\nto.setName(\"Harry Zhang\");\nto.setAddressLine1(\"210 King St\");\nto.setAddressLine2(\"# 6100\");\nto.setAddressCity(\"San Francisco\");\nto.setAddressState(\"CA\");\nto.setAddressZip(\"94107\");\n\ntry {\n SnapPackEditable SnapPackEditable = new SnapPackEditable();\n SnapPackEditable.setDescription(\"Demo Snap Pack job\");\n SnapPackEditable.setFrom(\"adr_210a8d4b0b76d77b\");\n SnapPackEditable.setInside(\"<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>\");\n SnapPackEditable.setOutside(\"<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>\");\n SnapPackEditable.setTo(to);\n SnapPackEditable.setMergeVariables(merge_variables);\n SnapPackEditable.setUseType(\"marketing\");\n SnapPackEditable.setFsc(true);\n SnapPackEditable.setPrintSpeed(\"core\");\n\n\n SnapPack result = apiInstance.create(SnapPackEditable, null);\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.SnapPack.create(%{\n description: \"Demo Snap Pack job\",\n to: %{\n name: \"Harry Zhang\",\n address_line1: \"210 King St\",\n address_city: \"San Francisco\",\n address_state: \"CA\",\n address_zip: \"94107\"\n },\n from: \"adr_210a8d4b0b76d77b\",\n inside: \"<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>\",\n outside: \"<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>\",\n merge_variables: %{\n name: \"Harry\"\n },\n use_type: \"marketing\",\n fsc: true,\n print_speed: 'core'\n})\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "Dictionary<string, string> mergeVariables = new Dictionary<string, string>();\nmergeVariables.Add(\"name\", \"Harry\");\n\nSnapPacksApi api = new SnapPacksApi(config);\n\nAddressEditable to = new AddressEditable(\n \"210 King St\", // addressLine1\n \"# 6100\", // addressLine2\n \"San Francisco\", // addressCity\n \"CA\", // addressState\n \"94107\", // addressZip\n default(CountryExtended), // addressCounty\n null, // description\n \"Harry Zhang\" // name\n);\n\nFsc fsc = new Fsc(true);\nPrintSpeed printSpeed = new PrintSpeed(\"core\");\n\nSnapPackEditable SnapPackEditable = new SnapPackEditable(\n to.ToJson(), // to\n \"adr_249af768103d2810\", // from\n default(SnapPacksize), // size\n \"Demo Snap Pack Job\", // description\n default(Dictionary<string, string>), // metadata\n default(MailType), // mailType\n mergeVariables, // mergeVariables\n default(DateTime), // sendDate\n \"<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>\", // inside\n \"<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>\", // outside\n \"marketing\", // use_type\n fsc,\n \"core\" // print_speed\n);\n\ntry {\n SnapPack result = api.create(SnapPackEditable, null);\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\nvar to = *lob.NewAddressEditable()\nto.SetAddressLine1(\"210 King St\")\nto.SetAddressLine2(\"# 6100\")\nto.SetAddressCity(\"San Francisco\")\nto.SetAddressState(\"CA\")\nto.SetAddressZip(\"94107\")\nto.SetAddressCountry(lob.COUNTRYEXTENDED_US)\nto.SetDescription(\"\")\nto.SetName(\"Harry Zhang\")\n\nvar SnapPackCreate = *lob.NewSnapPackEditable()\nSnapPackCreate.SetDescription(\"Demo Snap Pack job\")\nSnapPackCreate.SetFrom(\"adr_210a8d4b0b76d77b\")\nSnapPackCreate.SetInside(\"<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>\")\nSnapPackCreate.SetOutside(\"<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>\")\nSnapPackCreate.SetTo(to)\nSnapPackCreate.SetFsc(true)\nSnapPackCreate.SetPrintSpeed(\"core\")\n\n\ncreatedSnapPack, _, err := apiClient.SnapPacksApi.Create(context).SnapPackEditable(SnapPackCreate).Execute()\n\nif err != nil {\n return err\n}\n"
}
]
}
},
"/snap_packs/{snap_pack_id}": {
"delete": {
"description": "Completely removes a snap pack from production. This can only be done if the snap pack's `send_date` has not yet passed. If the snap pack is successfully canceled, you will not be charged for it.",
"operationId": "snap_pack_delete",
"responses": {
"200": {
"$ref": "#/components/responses/snap_pack_deleted"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "Delete",
"tags": [
"Snap Packs"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X DELETE https://api.lob.com/v1/snap_packs/ord_0d6a16a3fff6318ac8f8008dc1 \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
},
{
"label": "TYPESCRIPT",
"lang": "typescript",
"source": "try {\n const deleteSnapPack = await new SnapPacksApi(config).delete('ord_xxxx');\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.snapPacks.delete('ord_0d6a16a3fff6318ac8f8008dc1', function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "snapPackApi = SnapPacksApi.new(config)\n\nbegin\n deletedSnapPack = snapPackApi.delete(\"ord_0d6a16a3fff6318ac8f8008dc1\")\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = SnapPacksApi(api_client)\n\ntry:\n deleted_resource = api.delete(\"ord_0d6a16a3fff6318ac8f8008dc1\")\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\SnapPacksApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->delete(\"ord_0d6a16a3fff6318ac8f8008dc1\");\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "SnapPacksApi apiInstance = new SnapPacksApi(config);\n\ntry {\n SnapPackDeletion response = apiInstance.delete(\"ord_0d6a16a3fff6318ac8f8008dc1\");\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.SnapPack.destroy(\"ord_0d6a16a3fff6318ac8f8008dc1\")\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "SnapPacksApi api = new SnapPacksApi(config);\n\ntry {\n SnapPackDeletion response = api.delete(\"ord_0d6a16a3fff6318ac8f8008dc1\");\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\ndeletedSnapPack, _, err := apiClient.SnapPacksApi.Delete(context, \"ord_0d6a16a3fff6318ac8f8008dc1\").Execute()\n\nif err != nil {\n return err\n}\n"
}
]
},
"get": {
"description": "Retrieves the details of an existing snap_pack. You need to only supply the unique snap_pack identifier that was returned upon snap_pack creation.",
"operationId": "snap_pack_retrieve",
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/snap_pack"
},
"description": "Returns a snap_pack object"
},
"default": {
"$ref": "#/components/responses/mailpiece_error"
}
},
"summary": "Retrieve",
"tags": [
"Snap Packs"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X GET \"https://api.lob.com/v1/snap_packs/ord_0d6a16a3fff6318ac8f8008dc1\" \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
},
{
"label": "TYPESCRIPT",
"lang": "typescript",
"source": "try {\n const snapPack = await new SnapPacksApi(config).get('ord_xxxx');\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.snapPacks.retrieve('ord_0d6a16a3fff6318ac8f8008dc1', function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "snapPackApi = SnapPacksApi.new(config)\n\nbegin\n retrievedSnapPack = snapPackApi.get(\"ord_0d6a16a3fff6318ac8f8008dc1\")\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = SnapPacksApi(api_client)\n\ntry:\n snap_pack = api.get(\"ord_0d6a16a3fff6318ac8f8008dc1\")\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\SnapPacksApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->get(\"ord_0d6a16a3fff6318ac8f8008dc1\");\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "SnapPacksApi apiInstance = new SnapPacksApi(config);\n\ntry {\n SnapPack response = apiInstance.get(\"ord_0d6a16a3fff6318ac8f8008dc1\");\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.SnapPack.find(\"ord_0d6a16a3fff6318ac8f8008dc1\")\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "SnapPacksApi api = new SnapPacksApi(config);\n\ntry {\n SnapPack response = api.get(\"ord_0d6a16a3fff6318ac8f8008dc1\");\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\nfetchedSnapPack, _, err := apiClient.SnapPacksApi.Get(context,\"ord_0d6a16a3fff6318ac8f8008dc1\").Execute()\n\nif err != nil {\n return err\n}\n"
}
]
},
"parameters": [
{
"description": "id of the snap_pack",
"in": "path",
"name": "snap_pack_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/snap_pack_id"
}
}
]
},
"/templates": {
"get": {
"description": "Returns a list of your templates. The templates are returned sorted by creation date, with the most recently created templates appearing first.",
"operationId": "templates_list",
"parameters": [
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/before_after"
},
{
"$ref": "#/components/parameters/include"
},
{
"$ref": "#/components/parameters/date_created"
},
{
"$ref": "#/components/parameters/metadata"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/all_templates"
},
"default": {
"$ref": "#/components/responses/template_error"
}
},
"summary": "List",
"tags": [
"Templates"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X GET \"https://api.lob.com/v1/templates?limit=2\" \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "try {\n const templates = await new TemplatesApi(config).list(2);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "This feature is not currently supported by this library.\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "templatesApi = TemplatesApi.new(config)\n\nbegin\n templates = templatesApi.list({ limit: 2 })\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = TemplatesApi(api_client)\n\ntry:\n templates = api.list(limit=2)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\TemplatesApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->list(\n 2, // limit\n );\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "TemplatesApi apiInstance = new TemplatesApi(config);\n\ntry {\n List response = apiInstance.list(\n 2, // limit\n null, // before\n null, // after\n null, // include\n null, // dateCreated\n null, // metadata\n null // size\n );\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "This feature is not currently supported by this library.\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "TemplatesApi api = new TemplatesApi(config);\n\nList<string> includeList = new List<string>();\nincludeList.Add(\"total_count\");\nDictionary<String, String> metadata = new Dictionary<String, String>();\nmetadata.Add(\"name\", \"Harry\");\nDictionary<String, DateTime> dateCreated = new Dictionary<String, DateTime>();\nDateTime dateCreatedDate = DateTime.Today.AddMonths(-1);\ndateCreated.Add(\"lt\", dateCreatedDate);\n\ntry {\n TemplateList response = api.list(\n 2, // limit\n null, // before\n null, // after\n includeList, // include\n dateCreated, // dateCreated\n metadata // metadata\n );\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\nTemplateList = apiClient.TemplatesApi.List(context).Execute()\nif err != nil {\n return err\n}\n"
}
]
},
"post": {
"description": "Creates a new template for use with the Print & Mail API. In Live mode, you can only have as many non-deleted templates as allotted in your current <a href=\"https://dashboard.lob.com/#/settings/editions\" target=\"_blank\">Print & Mail Edition</a>. If you attempt to create a template past your limit, you will receive a `403` error. There is no limit in Test mode.",
"operationId": "create_template",
"requestBody": {
"content": {
"application/json": {
"example": {
"description": "demo",
"engine": "handlebars",
"html": "<html>HTML for {{name}}</html>",
"metadata": {
"spiffy": "true"
}
},
"schema": {
"$ref": "#/components/schemas/template_writable"
}
},
"application/x-www-form-urlencoded": {
"example": {
"description": "demo",
"engine": "handlebars",
"html": "<html>HTML for {{name}}</html>",
"metadata": {
"spiffy": "true"
}
},
"schema": {
"$ref": "#/components/schemas/template_writable"
}
},
"multipart/form-data": {
"example": {
"description": "demo",
"engine": "handlebars",
"html": "<html>HTML for {{name}}</html>",
"metadata": {
"spiffy": "true"
}
},
"schema": {
"$ref": "#/components/schemas/template_writable"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/template"
},
"description": "Returns a template object",
"headers": {
"ratelimit-limit": {
"$ref": "#/components/headers/ratelimit-limit"
},
"ratelimit-remaining": {
"$ref": "#/components/headers/ratelimit-remaining"
},
"ratelimit-reset": {
"$ref": "#/components/headers/ratelimit-reset"
}
}
},
"default": {
"$ref": "#/components/responses/template_error"
}
},
"summary": "Create",
"tags": [
"Templates"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/templates \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -d \"description=Test Template\" \\\n --data-urlencode \"html=<html>HTML for {{name}}</html>\"\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "const templateCreate = new TemplateWritable({\n description: 'Newer Template',\n html: '<html>Updated HTML for {{name}}</html>'\n});\n\ntry {\n const myTemplate = await new TemplatesApi(config).create(templateCreate);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "This feature is not currently supported by this library.\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "templateCreate = TemplateWritable.new({\n description: \"Test Template\",\n html: \"<html>HTML for {{name}}</html>\",\n});\n\ntemplateApi = TemplatesApi.new(config)\n\nbegin\n createdTemplate = templateApi.create(templateCreate)\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "template_writable = TemplateWritable(\n description = \"Test Template\",\n html = \"<html>HTML for {{name}}</html>\",\n)\n\nwith ApiClient(configuration) as api_client:\n api = TemplatesApi(api_client)\n\ntry:\n created_template = api.create(template_writable)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\TemplatesApi($config, new GuzzleHttp\\Client());\n$template_writable = new OpenAPI\\Client\\Model\\TemplateWritable(\n array(\n \"description\" => \"Test Template\",\n \"html\" => \"<html>HTML for {{name}}</html>\",\n )\n);\n\ntry {\n $result = $apiInstance->create($template_writable);\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "TemplatesApi apiInstance = new TemplatesApi(config);\n\ntry {\n TemplateWritable = new TemplateWritable();\n .set(\"Test Template\");\n .set(\"<html>HTML for {{name}}</html>\");\n\n Template result = apiInstance.create();\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "This feature is not currently supported by this library.\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "TemplatesApi api = new TemplatesApi(config);\n\nTemplateWritable templateWritable = new TemplateWritable(\n \"Test Template\", // description\n \"<html>HTML for {{name}}</html>\" // html\n);\n\ntry {\n Template result = api.create(templateWritable);\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\n\nvar templateCreate = *lob.NewTemplateWritable()\ntemplateCreate.SetDescription(\"Test Template\")\ntemplateCreate.SetHtml(\"<html>HTML for {{name}}</html>\")\n\n\n\ncreatedtemplate, _, err := apiClient.TemplatesApi.Create(context).TemplateWritable(templateCreate).Execute()\n\nif err != nil {\n return err\n}\n"
}
]
}
},
"/templates/{tmpl_id}": {
"delete": {
"description": "Permanently deletes a template. Deleting a template also deletes its associated versions. Deleted templates can not be used to create postcard, letter, or check resources.",
"operationId": "template_delete",
"responses": {
"200": {
"$ref": "#/components/responses/template_deleted"
},
"default": {
"$ref": "#/components/responses/template_error"
}
},
"summary": "Delete",
"tags": [
"Templates"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X DELETE https://api.lob.com/v1/templates/tmpl_df934eeda694203 \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "try {\n const deleteTemplate = await new TemplatesApi(config).delete('tmpl_xxxx');\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "This feature is not currently supported by this library.\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "templateApi = TemplatesApi.new(config)\n\nbegin\n deletedTemplate = templateApi.delete(\"tmpl_df934eeda694203\")\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = TemplatesApi(api_client)\n\ntry:\n deleted_resource = api.delete(\"tmpl_df934eeda694203\")\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\TemplatesApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->delete(\"tmpl_df934eeda694203\");\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "TemplatesApi apiInstance = new TemplatesApi(config);\n\ntry {\n TemplateDeletion response = apiInstance.delete(\"tmpl_df934eeda694203\");\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "This feature is not currently supported by this library.\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "TemplatesApi api = new TemplatesApi(config);\n\ntry {\n TemplateDeletion response = api.delete(\"tmpl_df934eeda694203\");\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\ndeletedTemplate, _, err := apiClient.TemplatesApi.Delete(context, \"tmpl_df934eeda694203\").Execute()\n\nif err != nil {\n return err\n}\n"
}
]
},
"get": {
"description": "Retrieves the details of an existing template. You need only supply the unique template identifier that was returned upon template creation.",
"operationId": "template_retrieve",
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/template"
},
"description": "Returns a template object"
},
"default": {
"$ref": "#/components/responses/template_error"
}
},
"summary": "Retrieve",
"tags": [
"Templates"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/templates/tmpl_c94e83ca2cd5121 \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "try {\n const Template = await new TemplatesApi(config).get('tmpl_xxxx');\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "This feature is not currently supported by this library.\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "templateApi = TemplatesApi.new(config)\n\nbegin\n retrievedTemplate = templateApi.get(\"tmpl_c94e83ca2cd5121\")\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = TemplatesApi(api_client)\n\ntry:\n template = api.get(\"tmpl_c94e83ca2cd5121\")\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\TemplatesApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->get(\"tmpl_c94e83ca2cd5121\");\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "TemplatesApi apiInstance = new TemplatesApi(config);\n\ntry {\n Template response = apiInstance.get(\"tmpl_c94e83ca2cd5121\");\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "This feature is not currently supported by this library.\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "TemplatesApi api = new TemplatesApi(config);\n\ntry {\n Template response = api.get(\"tmpl_c94e83ca2cd5121\");\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\nfetchedTemplate, _, err := apiClient.TemplatesApi.Get(context,\"tmpl_c94e83ca2cd5121\").Execute()\n\nif err != nil {\n return err\n}\n"
}
]
},
"parameters": [
{
"description": "id of the template",
"in": "path",
"name": "tmpl_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/tmpl_id"
}
}
],
"post": {
"description": "Updates the description and/or published version of the template with the given id. To update the template's html, create a new version of the template.",
"operationId": "template_update",
"requestBody": {
"content": {
"application/json": {
"example": {
"description": "Updated Example",
"published_version": "vrsn_a"
},
"schema": {
"$ref": "#/components/schemas/template_update"
}
},
"application/x-www-form-urlencoded": {
"example": {
"description": "Updated Example",
"published_version": "vrsn_a"
},
"schema": {
"$ref": "#/components/schemas/template_update"
}
},
"multipart/form-data": {
"example": {
"description": "Updated Example",
"published_version": "vrsn_a"
},
"schema": {
"$ref": "#/components/schemas/template_update"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/template"
},
"description": "Returns the updated template object",
"headers": {
"ratelimit-limit": {
"$ref": "#/components/headers/ratelimit-limit"
},
"ratelimit-remaining": {
"$ref": "#/components/headers/ratelimit-remaining"
},
"ratelimit-reset": {
"$ref": "#/components/headers/ratelimit-reset"
}
}
},
"default": {
"$ref": "#/components/responses/template_error"
}
},
"summary": "Update",
"tags": [
"Templates"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/templates/tmpl_c94e83ca2cd5121 \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -d \"description=Updated description\" \\\n -d \"published_version=vrsn_362184d96d9b0c9\"\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "const Templates = new TemplatesApi(config);\n\ntry {\n const updateData = new TemplateUpdate ({\n description: 'updated template',\n published_version: 'vrsn_xxxx'\n});\n const updateTemplate = await Templates.update('tmpl_xxxx', updateData);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "This feature is not currently supported by this library.\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "templateUpdate = TemplateUpdate.new({\n description: \"updated template\",\n published_version: \"vrsn_362184d96d9b0c9\",\n})\n\ntemplateApi = TemplatesApi.new(config)\n\nbegin\n updatedTemplate = templateApi.update(\"tmpl_c94e83ca2cd5121\", templateUpdate)\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = TemplatesApi(api_client)\n\nupdate_data = TemplateUpdate(\n description = \"updated template\",\n published_version = \"vrsn_362184d96d9b0c9\"\n)\n\ntry:\n update_template = api.update(\"tmpl_c94e83ca2cd5121\", update_data)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\TemplatesApi($config, new GuzzleHttp\\Client());\n\n$templateUpdate = new OpenAPI\\Client\\Model\\TemplateUpdate(array(\n \"description\" => \"Updated description\",\n \"published_version\" => \"vrsn_362184d96d9b0c9\"\n));\n\ntry {\n $result = $apiInstance->update(\"tmpl_c94e83ca2cd5121\", $templateUpdate);\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "TemplatesApi apiInstance = new TemplatesApi(config);\nTemplateUpdate update = new TemplateUpdate();\n\nupdate.setDescription(\"update template\");\nupdate.setPublishedVersion(\"vrsn_362184d96d9b0c9\";\n\ntry {\n apiInstance.update(\"tmpl_c94e83ca2cd5121\", update);\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "This feature is not currently supported by this library.\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "TemplatesApi api = new TemplatesApi(config);\nTemplateUpdate update = new TemplateUpdate(\"update template\", \"vrsn_362184d96d9b0c9\");\n\ntry {\n api.update(\"tmpl_c94e83ca2cd5121\", update);\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\nvar templateWritable = *lob.NewTemplateWritable(\"<html>Updated HTML for Template 1/html>\")\ncreatedTemplate, _, _ := apiClient.TemplatesApi.Create(context).TemplateWritable(templateWritable).Execute()\n\ntemplateWritable.SetDescription(\"Template updated\")\nresp, _, err := apiClient.TemplatesApi.Update(context, createdTemplate.Id).TemplateWritable(templateWritable).Execute()\n\nif err != nil {\n return err\n}\n"
}
]
}
},
"/templates/{tmpl_id}/versions": {
"get": {
"description": "Returns a list of template versions for the given template ID. The template versions are sorted by creation date, with the most recently created appearing first.\n",
"operationId": "template_versions_list",
"parameters": [
{
"description": "The ID of the template associated with the retrieved versions",
"in": "path",
"name": "tmpl_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/tmpl_id"
}
},
{
"$ref": "#/components/parameters/limit"
},
{
"$ref": "#/components/parameters/before_after"
},
{
"$ref": "#/components/parameters/include"
},
{
"$ref": "#/components/parameters/date_created"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/all_template_versions"
},
"default": {
"$ref": "#/components/responses/template_error"
}
},
"summary": "List",
"tags": [
"Template Versions"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X GET \"https://api.lob.com/v1/templates/tmpl_ea6e6a1abf01703/versions?limit=2\" \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "try {\n const templateVersions = await new TemplateVersionsApi(config).list(tmpl_xxxx);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "This feature is not currently supported by this library.\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "templateVersionsApi = TemplateVersionsApi.new(config)\n\nbegin\n templateVersions = templateVersionsApi.list(\"tmpl_dadaaf7b76c9f25\", { limit: 2 })\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = TemplateVersionsApi(api_client)\n\ntry:\n template_versions = api.list(\"tmpl_dadaaf7b76c9f25\", limit=2)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\TemplateVersionsApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->list(\n tmpl_dadaaf7b76c9f25, // tmplId\n 2, // limit\n );\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "TemplateVersionsApi apiInstance = new TemplateVersionsApi(config);\n\ntry {\n List response = apiInstance.list(\n \"tmpl_dadaaf7b76c9f25\", // tmplId\n 2, // limit\n null, // before\n null, // after\n null, // include\n null // dateCreated\n );\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "This feature is not currently supported by this library.\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "TemplateVersionsApi api = new TemplateVersionsApi(config);\n\nList<string> includeList = new List<string>();\nincludeList.Add(\"total_count\");\nDictionary<String, DateTime> dateCreated = new Dictionary<String, DateTime>();\nDateTime dateCreatedDate = DateTime.Today.AddMonths(-1);\ndateCreated.Add(\"lt\", dateCreatedDate);\n\ntry {\n TemplateVersionList response = api.list(\n \"tmpl_dadaaf7b76c9f25\", // tmplId\n 2, // limit\n null, // before\n null, // after\n includeList, // include\n dateCreated // dateCreated\n );\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\nTemplateVersionList = apiClient.TemplateVersionsApi.List(context, \"tmpl_4aa14648113e45b\").Execute()\nif err != nil {\n return err\n}\n"
}
]
},
"post": {
"description": "Creates a new template version attached to the specified template.",
"operationId": "create_template_version",
"parameters": [
{
"description": "The ID of the template the new version will be attached to",
"in": "path",
"name": "tmpl_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/tmpl_id"
}
}
],
"requestBody": {
"content": {
"application/json": {
"example": {
"description": "Some Description",
"html": "<html>HTML for {{name}}</html>"
},
"schema": {
"$ref": "#/components/schemas/template_version_writable"
}
},
"application/x-www-form-urlencoded": {
"example": {
"description": "Some Description",
"html": "<html>HTML for {{name}}</html>"
},
"schema": {
"$ref": "#/components/schemas/template_version_writable"
}
},
"multipart/form-data": {
"example": {
"description": "Some Description",
"html": "<html>HTML for {{name}}</html>"
},
"schema": {
"$ref": "#/components/schemas/template_version_writable"
}
}
},
"required": true
},
"responses": {
"200": {
"$ref": "#/components/responses/post_template_version"
},
"default": {
"$ref": "#/components/responses/template_error"
}
},
"summary": "Create",
"tags": [
"Template Versions"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/templates/tmpl_4aa14648113e45b/versions \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -d \"description=Second Version\" \\\n --data-urlencode \"html=<html>Second HTML for {{name}}</html>\"\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "const templateVersionCreate = new TemplateVersionWritable({\n description: 'Newer Template',\n html: '<html>Updated HTML for {{name}}</html>'\n});\n\ntry {\n const myTemplateVersion = await new TemplateVersionsApi(config).create('tmpl_xxxx', templateVersionCreate);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "This feature is not currently supported by this library.\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "templateVersionCreate = TemplateVersionWritable.new({\n description: \"Second Version\",\n html: \"<html>Second HTML for {{name}}</html>\",\n});\n\ntemplateVersionApi = TemplateVersionsApi.new(config)\n\nbegin\n createdTemplateVersion = templateVersionApi.create(\"tmpl_4aa14648113e45b\", templateVersionCreate)\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "template_version_writable = TemplateVersionWritable(\n description = \"Second Version\",\n html = \"<html>Second HTML for {{name}}</html>\",\n)\n\nwith ApiClient(configuration) as api_client:\n api = TemplateVersionsApi(api_client)\n\ntry:\n created_template_version = api.create(\"tmpl_4aa14648113e45b\", template_version_writable)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\TemplateVersionsApi($config, new GuzzleHttp\\Client());\n$template_version_writable = new OpenAPI\\Client\\Model\\TemplateVersionWritable(\n array(\n \"description\" => \"Second Version\",\n \"html\" => \"<html>Second HTML for {{name}}</html>\",\n )\n);\n\ntry {\n $result = $apiInstance->create(\"tmpl_4aa14648113e45b\", $template_version_writable);\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "TemplateVersionsApi apiInstance = new TemplateVersionsApi(config);\n\ntry {\n TemplateVersionWritable = new TemplateVersionWritable();\n .set(\"Second Version\");\n .set(\"<html>Second HTML for {{name}}</html>\");\n\n TemplateVersion result = apiInstance.create();\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "This feature is not currently supported by this library.\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "TemplateVersionsApi api = new TemplateVersionsApi(config);\n\nTemplateVersionWritable templateVersionWritable = new TemplateVersionWritable(\n \"Second Version\", // description\n \"<html>Second HTML for {{name}}</html>\" // html\n);\n\ntry {\n TemplateVersion result = api.create(\"tmpl_4aa14648113e45b\", templateVersionWritable);\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\n\nvar templateVersionCreate = *lob.NewTemplateVersionWritable()\ntemplateVersionCreate.SetDescription(\"Second Version\")\ntemplateVersionCreate.SetHtml(\"<html>Second HTML for {{name}}</html>\")\n\n\n\ncreatedtemplateVersion, _, err := apiClient.TemplateVersionsApi.Create(context, \"tmpl_4aa14648113e45b\").TemplateVersionWritable(templateVersionCreate).Execute()\n\nif err != nil {\n return err\n}\n"
}
]
}
},
"/templates/{tmpl_id}/versions/{vrsn_id}": {
"delete": {
"description": "Permanently deletes a template version. A template's `published_version` can not be deleted.",
"operationId": "template_version_delete",
"responses": {
"200": {
"$ref": "#/components/responses/template_version_deleted"
},
"default": {
"$ref": "#/components/responses/template_error"
}
},
"summary": "Delete",
"tags": [
"Template Versions"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X DELETE https://api.lob.com/v1/templates/tmpl_4aa14648113e45b/versions/vrsn_534e339882d2282 \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "try {\n const deleteTemplateVersion = await new TemplateVersionsApi(config).delete(\"tmpl_xxxx\",\"vrsn_xxxx\");\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "This feature is not currently supported by this library.\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "templateVersionApi = TemplateVersionsApi.new(config)\n\nbegin\n deletedTemplateVersion = templateVersionApi.delete(\"tmpl_4aa14648113e45b\", \"vrsn_534e339882d2282\")\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = TemplateVersionsApi(api_client)\n\ntry:\n deleted_resource = api.delete(\"tmpl_4aa14648113e45b\", \"vrsn_534e339882d2282\")\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "This feature is not currently supported by this library.\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "This feature is not currently supported by this library.\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "This feature is not currently supported by this library.\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "TemplateVersionsApi api = new TemplateVersionsApi(config);\n\ntry {\n TemplateVersionDeletion response = api.delete(\"tmpl_xxx\", \"vrsn_xxx\");\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\ndeletedTemplateVersion, _, err := apiClient.TemplateVersionsApi.Delete(context, \"tmpl_4aa14648113e45b\", \"vrsn_534e339882d2282\").Execute()\n\nif err != nil {\n return err\n}\n"
}
]
},
"get": {
"description": "Retrieves the template version with the given template and version ids.",
"operationId": "template_version_retrieve",
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/template_version"
},
"description": "Returns the template version with the given template and version ids."
},
"default": {
"$ref": "#/components/responses/template_error"
}
},
"summary": "Retrieve",
"tags": [
"Template Versions"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/templates/tmpl_c94e83ca2cd5121/versions/vrsn_534e339882d2282 \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "try {\n const templateVersion = await new TemplateVersionsApi(config).get('tmpl_xxxx', 'vrsn_xxxx');\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "This feature is not currently supported by this library.\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "templateVersionApi = TemplateVersionsApi.new(config)\n\nbegin\n retrievedTemplateVersion = templateVersionApi.get(\"tmpl_c94e83ca2cd5121\", \"vrsn_534e339882d2282\")\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = TemplateVersionsApi(api_client)\n\ntry:\n template_version = api.get(\"tmpl_c94e83ca2cd5121\", \"vrsn_534e339882d2282\")\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\TemplateVersionsApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->get(\"tmpl_c94e83ca2cd5121\", \"vrsn_534e339882d2282\");\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "TemplateVersionsApi apiInstance = new TemplateVersionsApi(config);\n\ntry {\n TemplateVersion response = apiInstance.get(\"vrsn_534e339882d2282\");\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "This feature is not currently supported by this library.\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "TemplateVersionsApi api = new TemplateVersionsApi(config);\n\ntry {\n TemplateVersion response = api.get(\"tmpl_c94e83ca2cd5121\", \"vrsn_534e339882d2282\");\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\nfetchedTemplateVersion, _, err := apiClient.TemplateVersionsApi.Get(context,\"tmpl_c94e83ca2cd5121\", \"vrsn_534e339882d2282\").Execute()\n\nif err != nil {\n return err\n}\n"
}
]
},
"parameters": [
{
"description": "The ID of the template to which the version belongs.",
"in": "path",
"name": "tmpl_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/tmpl_id"
}
},
{
"description": "id of the template_version",
"in": "path",
"name": "vrsn_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/vrsn_id"
}
}
],
"post": {
"description": "Updates the template version with the given template and version ids.",
"operationId": "template_version_update",
"requestBody": {
"content": {
"application/json": {
"example": {
"description": "Some description"
},
"schema": {
"$ref": "#/components/schemas/template_version_updatable"
}
},
"application/x-www-form-urlencoded": {
"example": {
"description": "Some description"
},
"schema": {
"$ref": "#/components/schemas/template_version_updatable"
}
},
"multipart/form-data": {
"example": {
"description": "Some description"
},
"schema": {
"$ref": "#/components/schemas/template_version_updatable"
}
}
},
"required": true
},
"responses": {
"200": {
"$ref": "#/components/responses/post_template_version"
},
"default": {
"$ref": "#/components/responses/template_error"
}
},
"summary": "Update",
"tags": [
"Template Versions"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/templates/tmpl_c94e83ca2cd5121/versions/vrsn_534e339882d2282 \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -d \"description=Updated description\"\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "const TemplateVersions = new TemplateVersionsApi(config);\n\ntry {\n const updateData = new TemplateVersionUpdatable({\n description: 'updated template'\n });\n const updateTemplateVersion = await TemplateVersions.update('vrsn_xxxx', updateData);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "This feature is not currently supported by this library.\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "templateVersionUpdatable = TemplateUpdate.new({\n description: \"updated template version\",\n})\n\ntemplateVersionApi = TemplateVersionsApi.new(config)\n\nbegin\n updatedTemplateVersion = templateVersionApi.update(\"tmpl_c94e83ca2cd5121\", \"vrsn_534e339882d2282\", templateVersionUpdatable)\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = TemplateVersionsApi(api_client)\n\nupdate_data = TemplateVersionUpdatable(\n description = \"updated template\"\n)\n\ntry:\n update_template_version = api.update(\"tmpl_c94e83ca2cd5121\", \"vrsn_534e339882d2282\", update_data)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\TemplateVersionsApi($config, new GuzzleHttp\\Client());\n\n$templateVersionUpdate = new OpenAPI\\Client\\Model\\TemplateUpdate(array(\n \"description\" => \"Updated template version\"\n));\n\ntry {\n $result = $apiInstance->update(\"tmpl_c94e83ca2cd5121\", \"vrsn_534e339882d2282\", $templateVersionUpdate);\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "This feature is not currently supported by this library.\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "This feature is not currently supported by this library.\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "TemplateVersionsApi api = new TemplateVersionsApi(config);\nTemplateVersionUpdatable update = new TemplateVersionUpdatable(\"update template\", EngineHtml.Handlebars);\n\ntry {\n api.update(\"tmpl_c94e83ca2cd5121\", \"vrsn_534e339882d2282\", update);\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\nvar templateWritable = *lob.NewTemplateWritable(\"<html>Updated HTML for Template 1/html>\")\nvar templateVersionWritable = *lob.NewTemplateVersionWritable(\"<html>Updated HTML for Template 1/html>\")\ncreatedTemplate, _, _ := apiClient.TemplatesApi.Create(context).TemplateWritable(templateWritable).Execute()\n\ncreatedTemplateVersion, _, err := apiClient.TemplateVersionsApi.Create(context, createdTemplate.Id).TemplateVersionWritable(templateVersionWritable).Execute()\ncreatedTemplateVersion.SetDescription(\"New Template Version\")\nresp, _, err := apiClient.TemplatesApi.Update(context, createdTemplate.Id, createdTemplateVersion.Id).TemplateVersionWritable(templateVersionWritable).Execute()\n\nif err != nil {\n return err\n}\n"
}
]
}
},
"/uploads": {
"get": {
"description": "Returns a list of your uploads. Optionally, filter uploads by campaign.",
"operationId": "uploads_list",
"parameters": [
{
"description": "id of the campaign",
"in": "query",
"name": "campaignId",
"required": false,
"schema": {
"$ref": "#/components/schemas/cmp_id"
}
}
],
"responses": {
"200": {
"$ref": "#/components/responses/all_uploads"
}
},
"summary": "List",
"tags": [
"Uploads"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/uploads \\\n -u <YOUR API KEY>:\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "uploadsApi = UploadsApi.new(config)\n\nbegin\n uploads = uploadsApi.list_upload({ campaign_id: \"cmp_e05ee61ff80764b\" })\nrescue => err\n p err.message\nend\n"
}
]
},
"post": {
"description": "Creates a new upload with the provided properties.",
"operationId": "upload_create",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/upload_writable"
}
}
},
"required": true
},
"responses": {
"201": {
"content": {
"$ref": "#/components/mediaTypes/upload"
},
"description": "Upload created successfully"
},
"422": {
"$ref": "#/components/responses/upload_validation_error"
}
},
"summary": "Create",
"tags": [
"Uploads"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl --location --request POST 'https://api.lob.com/v1/uploads' \\\n--header 'Content-Type: application/json' \\\n-u YOUR_KEY_HERE: \\\n--data-raw '{\n \"campaignId\": \"cmp_f33809b18b6f3ea8\"\n}'\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "uploadCreate = UploadWritable.new({\n campaign_id: \"cmp_e05ee61ff80764b\",\n});\n\nuploadApi = UploadsApi.new(config)\n\nbegin\n createdUpload = uploadApi.create_upload(uploadCreate)\nrescue => err\n p err.message\nend\n"
}
]
}
},
"/uploads/{upl_id}": {
"delete": {
"description": "Delete an existing upload. You need only supply the unique identifier that was returned upon upload creation.",
"operationId": "upload_delete",
"responses": {
"204": {
"description": "Successful Response"
}
},
"summary": "Delete",
"tags": [
"Uploads"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X DELETE https://api.lob.com/v1/uploads/upl_71be866e430b11e9 \\\n -u <YOUR API KEY>:\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "uploadApi = UploadsApi.new(config)\n\nbegin\n deletedUpload = uploadApi.delete_upload(\"upl_71be866e430b11e9\")\nrescue => err\n p err.message\nend\n"
}
]
},
"get": {
"description": "Retrieves the details of an existing upload. You need only supply the unique upload identifier that was returned upon upload creation.",
"operationId": "upload_retrieve",
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/upload"
},
"description": "Returns an upload object"
},
"404": {
"$ref": "#/components/responses/upload_not_found"
},
"422": {
"$ref": "#/components/responses/upload_validation_error"
}
},
"summary": "Retrieve",
"tags": [
"Uploads"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/uploads/upl_71be866e430b11e9 \\\n -u <YOUR API KEY>: \\\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "uploadApi = UploadsApi.new(config)\n\nbegin\n retrievedUpload = uploadApi.get_upload(\"upl_71be866e430b11e9\")\nrescue => err\n p err.message\nend\n"
}
]
},
"parameters": [
{
"description": "id of the upload",
"in": "path",
"name": "upl_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/upl_id"
}
}
],
"patch": {
"description": "Update the details of an existing upload. You need only supply the unique identifier that was returned upon upload creation.",
"operationId": "upload_update",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/upload_updatable"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"$ref": "#/components/mediaTypes/upload"
},
"description": "Returns an upload object"
},
"404": {
"$ref": "#/components/responses/upload_not_found"
},
"422": {
"$ref": "#/components/responses/upload_validation_error"
}
},
"summary": "Update",
"tags": [
"Uploads"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X PATCH https://api.lob.com/v1/uploads/upl_71be866e430b11e9 \\\n -u <YOUR API KEY>: \\\n -d \"state=Ready for Validation\"\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "upload_updatable = UploadUpdatable(\n state = UploadState(\"Ready for Validation\"),\n)\n\nwith ApiClient(configuration) as api_client:\n api = UploadsApi(api_client)\n\ntry:\n updated_upload = api.update_upload(\"upl_71be866e430b11e9\", upload_updatable)\nexcept ApiException as e:\n print(e)\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "uploadUpdatable = UploadUpdatable.new({\n required_address_column_mapping: RequiredAddressColumnMapping.new({\n name: \"recipient\",\n address_line1: \"primary line\",\n address_city: \"city\",\n address_state: \"state\",\n address_zip: \"zip_code\",\n }),\n})\n\nuploadApi = UploadsApi.new(config)\n\nbegin\n updatedUpload = uploadApi.update_upload(\"upl_71be866e430b11e9\", uploadUpdatable)\nrescue => err\n p err.message\nend\n"
}
]
}
},
"/uploads/{upl_id}/exports": {
"parameters": [
{
"description": "ID of the upload",
"in": "path",
"name": "upl_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/upl_id"
}
}
],
"post": {
"description": "Campaign Exports can help you understand exactly which records in a campaign could not be created. By initiating and retrieving an export, you will get row-by-row errors for your campaign. For a step-by-step walkthrough of creating a campaign and exporting failures, see our [Campaigns Guide](https://help.lob.com/print-and-mail/building-a-mail-strategy/campaign-or-triggered-sends/launch-your-first-campaign).\n\nCreate an export file associated with an upload.",
"operationId": "upload_export_create",
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"type": {
"enum": [
"all",
"failures",
"successes"
],
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/upload_create_export"
}
}
},
"description": "Successful Response"
},
"4XX": {
"$ref": "#/components/responses/upload_export_error"
}
},
"summary": "Create Export",
"tags": [
"Uploads"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/uploads/upl_71be866e430b11e9/exports \\\n -u <YOUR API KEY>: \\\n -d \"type=failures\" \\\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = UploadsApi(api_client)\n\nexport_model = ExportModel(\n type = \"all\"\n)\n\ntry:\n created_export = api.create_export(\"upl_71be866e430b11e9\", export_model)\nexcept ApiException as e:\n print(e)\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "exportModel = ExportModel.new({\n type: \"all\"\n})\n\nuploadsApi = UploadsApi.new(config)\n\nbegin\n createdExport = uploadsApi.create_export(\"upl_71be866e430b11e9\", exportModel)\nrescue => err\n p err.message\nend\n"
}
]
}
},
"/uploads/{upl_id}/exports/{ex_id}": {
"get": {
"description": "Retrieves the details of an existing export. You need only supply the unique export identifier that was returned upon export creation. If you try retrieving an export immediately after creating one (i.e., before we're done processing the export), you will get back an export object with `state = in_progress`.",
"operationId": "export_retrieve",
"responses": {
"200": {
"content": {
"application/json": {
"example": {
"dateCreated": "2021-07-06T22:51:42.838Z",
"dateModified": "2022-07-06T22:51:42.838Z",
"deleted": false,
"id": "ex_6a94fe68fd151e0f8",
"s3Url": null,
"state": "in_progress",
"type": "failures",
"uploadId": "upl_71be866e430b11e9"
},
"schema": {
"properties": {
"dateCreated": {
"description": "A timestamp in ISO 8601 format of the date the export was created",
"format": "date-time",
"type": "string"
},
"dateModified": {
"description": "A timestamp in ISO 8601 format of the date the export was last modified",
"format": "date-time",
"type": "string"
},
"deleted": {
"description": "Returns as `true` if the resource has been successfully deleted.",
"type": "boolean"
},
"id": {
"$ref": "#/components/schemas/ex_id"
},
"s3Url": {
"description": "The URL for the generated export file.",
"type": "string"
},
"state": {
"description": "The state of the export file, which can be `in_progress`, `failed` or `succeeded`.",
"enum": [
"in_progress",
"failed",
"succeeded"
],
"type": "string"
},
"type": {
"description": "The export file type, which can be `all`, `failures` or `successes`.",
"enum": [
"all",
"failures",
"successes"
],
"type": "string"
},
"uploadId": {
"$ref": "#/components/schemas/upl_id"
}
},
"required": [
"id",
"dateCreated",
"dateModified",
"deleted",
"s3Url",
"state",
"type",
"uploadId"
],
"type": "object"
}
}
},
"description": "Returns an export object"
}
},
"summary": "Retrieve Export",
"tags": [
"Uploads"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/uploads/upl_71be866e430b11e9/exports/ex_6a94fe68fd151e0f8 \\\n -u <YOUR API KEY>:\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = UploadsApi(api_client)\n\ntry:\n retrieved_export = api.get_export(\"upl_71be866e430b11e9\", \"ex_6a94fe68fd151e0f8\")\nexcept ApiException as e:\n print(e)\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "uploadsApi = UploadsApi.new(config)\n\nbegin\n retrievedExport = uploadsApi.get_export(\"upl_71be866e430b11e9\", \"ex_6a94fe68fd151e0f8\")\nrescue => err\n p err.message\nend\n"
}
]
},
"parameters": [
{
"description": "ID of the upload",
"in": "path",
"name": "upl_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/upl_id"
}
},
{
"description": "ID of the export",
"in": "path",
"name": "ex_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/ex_id"
}
}
]
},
"/uploads/{upl_id}/file": {
"parameters": [
{
"description": "ID of the upload",
"in": "path",
"name": "upl_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/upl_id"
}
}
],
"post": {
"description": "Upload an [audience file](https://help.lob.com/print-and-mail/building-a-mail-strategy/campaign-or-triggered-sends/campaign-audience-guide) and associate it with an upload.",
"operationId": "upload_file",
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"properties": {
"file": {
"format": "binary",
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"responses": {
"202": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/upload_file"
}
}
},
"description": "Successful Response"
},
"422": {
"$ref": "#/components/responses/upload_validation_error"
}
},
"summary": "Upload file",
"tags": [
"Uploads"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl -X POST https://api.lob.com/v1/uploads/upl_71be866e430b11e9/file \\\n -u <YOUR API KEY>: \\\n -F file=@<YOUR FILE NAME HERE>\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = UploadsApi(api_client)\n\ntry:\n res = api.upload_file(\"upl_71be866e430b11e9\", open(\"<PATH_TO_CSV>\", \"rb\"))\nexcept ApiException as e:\n print(e)\n"
}
]
}
},
"/uploads/{upl_id}/report": {
"get": {
"description": "Retrieves the line item data for each row from the csv file associated with the upload id record. NOTE: This endpoint is currently feature flagged. Please reach out to Lob's support team if you would like access to this API endpoint.",
"operationId": "report_retrieve",
"responses": {
"200": {
"content": {
"application/json": {
"example": {
"dateCreated": "2021-07-06T22:51:42.838Z",
"dateModified": "2022-07-06T22:51:42.838Z",
"deleted": false,
"id": "ex_6a94fe68fd151e0f8",
"s3Url": null,
"state": "in_progress",
"type": "failures",
"uploadId": "upl_71be866e430b11e9"
},
"schema": {
"properties": {
"count": {
"$ref": "#/components/schemas/count"
},
"data": {
"items": {
"properties": {
"errorMessage": {
"description": "The error message detailing the reason why processing the line item failed.",
"nullable": true,
"type": "string"
},
"mailpieceId": {
"description": "The mailpiece id created from the line item when it was validated.",
"nullable": true,
"type": "string"
},
"originalData": {
"description": "Key-value pairs where each key is the column header and each value is the value of the column for the row.",
"type": "object"
},
"rowNumber": {
"description": "The row number of the csv file containing this data.",
"title": "Row Number",
"type": "number"
},
"status": {
"description": "The processing status of line item.",
"enum": [
"Validated",
"Failed",
"Processing"
],
"type": "string"
}
}
},
"type": "array"
},
"next_url": {
"description": "Url of next page of items in list.",
"nullable": true,
"type": "string"
},
"prev_url": {
"description": "Url of previous page of items in list.",
"nullable": true,
"type": "string"
},
"total_count": {
"description": "Indicates the total number of records. Provided when the request specifies an \"include\" query parameter",
"type": "integer"
}
},
"required": [
"data",
"count",
"offset",
"total_count"
],
"type": "object"
}
}
},
"description": "Returns an report object"
},
"404": {
"$ref": "#/components/responses/upload_not_found"
}
},
"summary": "Retrieve Line Item Report",
"tags": [
"Uploads"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/uploads/upl_71be866e430b11e9/report \\\n -u <YOUR API KEY>:\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = UploadsApi(api_client)\n\ntry:\n retrieved_report = api.get_report(\"upl_71be866e430b11e9\")\nexcept ApiException as e:\n print(e)\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "uploadsApi = UploadsApi.new(config)\n\nbegin\n retrievedreport = uploadsApi.get_report(\"upl_71be866e430b11e9\")\nrescue => err\n p err.message\nend\n"
}
]
},
"parameters": [
{
"description": "ID of the upload",
"in": "path",
"name": "upl_id",
"required": true,
"schema": {
"$ref": "#/components/schemas/upl_id"
}
},
{
"description": "The status of line items to filter and retrieve. By default all line items are returned.",
"in": "query",
"name": "status",
"required": false,
"schema": {
"enum": [
"Validated",
"Failed",
"Processing"
],
"type": "string"
}
},
{
"description": "How many results to return.",
"in": "query",
"name": "limit",
"required": false,
"schema": {
"default": 100,
"example": 10,
"maximum": 100,
"minimum": 1,
"type": "integer"
}
},
{
"$ref": "#/components/parameters/offset"
}
]
},
"/us_autocompletions": {
"post": {
"description": "Given an address prefix consisting of a partial primary line, as well as optional input of city, state, and zip code, this functionality returns up to 10 full US address suggestions. Not all of them will turn out to be valid addresses; they'll need to be [verified](#operation/verification_us).",
"operationId": "autocompletion",
"parameters": [
{
"description": "Casing of the verified address. Possible values are `upper` and `proper` for uppercased (e.g. \"PO BOX\") and proper-cased (e.g. \"PO Box\"), respectively. Only affects `primary_line`, `city`, and `state`. Default casing is `upper`.",
"in": "query",
"name": "case",
"required": false,
"schema": {
"default": "upper",
"enum": [
"upper",
"proper"
],
"type": "string"
}
},
{
"description": "Possible values are `true` and `false`. If false, not all of the suggestions in the response will be valid addresses; they'll need to be verified in order to determine the deliverability. The valid_addresses flag will greatly reduce the number of keystrokes needed before reaching an intended address.",
"in": "query",
"name": "valid_addresses",
"required": false,
"schema": {
"default": false,
"enum": [
true,
false
],
"type": "boolean"
}
}
],
"requestBody": {
"content": {
"application/json": {
"examples": {
"basic": {
"value": {
"address_prefix": "185 B",
"city": "San Francisco",
"geo_ip_sort": false,
"state": "CA",
"zip_code": "94107"
}
},
"test": {
"value": {
"address_prefix": "1 sugg"
}
}
},
"schema": {
"$ref": "#/components/schemas/us_autocompletions_writable"
}
},
"application/x-www-form-urlencoded": {
"examples": {
"basic": {
"value": {
"address_prefix": "185 B",
"city": "San Francisco",
"geo_ip_sort": false,
"state": "CA",
"zip_code": "94107"
}
},
"test": {
"value": {
"address_prefix": "1 sugg"
}
}
},
"schema": {
"$ref": "#/components/schemas/us_autocompletions_writable"
}
},
"multipart/form-data": {
"examples": {
"basic": {
"value": {
"address_prefix": "185 B",
"city": "San Francisco",
"geo_ip_sort": false,
"state": "CA",
"zip_code": "94107"
}
},
"test": {
"value": {
"address_prefix": "1 sugg"
}
}
},
"schema": {
"$ref": "#/components/schemas/us_autocompletions_writable"
}
}
},
"required": true
},
"responses": {
"200": {
"$ref": "#/components/responses/us_autocompletions"
},
"default": {
"$ref": "#/components/responses/us_autocompletions_error"
}
},
"summary": "Autocomplete",
"tags": [
"US Autocompletions"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/us_autocompletions \\\n -u <YOUR_LIVE_API_KEY>: \\\n -d \"address_prefix=185 B\" \\\n -d \"city=San Francisco\" \\\n -d \"state=CA\"\n -d \"zip_code=94107\"\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "const UsAutocompletions = new USAutocompletionsApi(av_config);\nconst autocompletionData: UsAutocompletionsWritable = {\n address_prefix: '185 B',\n city: 'SAN FRANCISCO'\n};\n\ntry {\n const autocompletedAddresses = await UsAutocompletions.autocomplete(autocompletionData);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.usAutocompletions.autocomplete({\n address_prefix: '185 B',\n city: 'San Francisco',\n state: 'CA',\n zip_code: '94107',\n}, function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "usAutocompletionsApi = UsAutocompletionsApi.new(config)\n\nautocompletionData = UsAutocompletionsWritable.new({\n address_prefix: \"185 B\",\n city: \"San Francisco\",\n state: \"CA\",\n zip_code: \"94017\",\n})\n\nbegin\n autocompletedAddress = usAutocompletionsApi.autocomplete(autocompletionData)\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = UsAutocompletionsApi(api_client)\n\nautocompletion_data = UsAutocompletionsWritable(\n address_prefix = \"185 B\",\n city = \"San Francisco\",\n state = \"CA\",\n zip_code = \"94017\",\n)\n\ntry:\n autocompleted_addresses = api.autocomplete(autocompletion_data)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\UsAutocompletionsApi($config, new GuzzleHttp\\Client());\n\n$autocompletionData = new OpenAPI\\Client\\Model\\UsAutocompletionsWritable(array(\n \"address_prefix\" => \"185 B\",\n \"city\" => \"San Francisco\",\n \"state\" => \"CA\",\n \"zip_code\" => \"94017\",\n));\n\ntry {\n $result = $apiInstance->autocomplete($autocompletionData);\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "UsAutocompletionsApi apiInstance = new UsAutocompletionsApi(config);\nUsAutocompletionsWritable autoCompletionWritable = new UsAutocompletionsWritable();\nautoCompletionWritable.setAddressPrefix(\"185 B\");\nautoCompletionWritable.setCity(\"San Francisco\");\nautoCompletionWritable.setState(\"CA\");\nautoCompletionWritable.setZipCode(\"94017\");\n\ntry {\n UsAutocompletions usAutocompletion = apiInstance.autocomplete(autoCompletionWritable);\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.USAutocompletion.autocomplete(%{\n address_prefix: \"185 B\",\n city: \"San Francisco\",\n state: \"CA\",\n zip_code: \"94107\"\n})\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "UsAutocompletionsApi api = new UsAutocompletionsApi(config);\nUsAutocompletionsWritable autoCompletionWritable = new UsAutocompletionsWritable(\n \"185 B\", // address_prefix\n \"San Francisco\", // city\n \"CA\", // state\n \"94017\" // zip_code\n);\n\ntry {\n UsAutocompletions usAutocompletion = api.autocomplete(autoCompletionWritable);\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(context, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\nvar usAutocomplationsWritable = *lob.NewUsAutocompletionsWritable(\"340 Wat\")\n\nresp, _, err := suite.apiClient.UsAutocompletionsApi.Autocomplete(suite.ctx).UsAutocompletionsWritable(suite.usAutocomplationsWritable).Execute()\n\nif err != nil {\n return err\n}\n"
}
]
}
},
"/us_reverse_geocode_lookups": {
"post": {
"description": "Reverse geocode a valid US location with a live API key.",
"operationId": "reverse_geocode_lookup",
"parameters": [
{
"description": "Determines the number of locations returned. Possible values are between 1 and 50 and any number higher will be rounded down to 50. Default size is a list of 5 reverse geocoded locations.",
"in": "query",
"name": "size",
"required": false,
"schema": {
"default": 5,
"example": 5,
"maximum": 50,
"minimum": 1,
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"example": {
"latitude": 37.7749,
"longitude": 122.4194
},
"schema": {
"$ref": "#/components/schemas/location"
}
},
"application/x-www-form-urlencoded": {
"example": {
"latitude": 37.7749,
"longitude": 122.4194
},
"schema": {
"$ref": "#/components/schemas/location"
}
},
"multipart/form-data": {
"example": {
"latitude": 37.7749,
"longitude": 122.4194
},
"schema": {
"$ref": "#/components/schemas/location"
}
}
},
"required": true
},
"responses": {
"200": {
"$ref": "#/components/responses/reverse_geocode_lookups"
},
"default": {
"$ref": "#/components/responses/reverse_geocode_lookups_error"
}
},
"summary": "Reverse Geocode Lookup",
"tags": [
"Reverse Geocode Lookups"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/us_reverse_geocode_lookups \\\n -u <YOUR_LIVE_API_KEY>: \\\n -d \"latitude=37.7749\" \\\n -d \"longitude=122.4194\" \\\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "const ReverseGeocodeLookup = new ReverseGeocodeLookupsApi(av_config);\nconst coordinates = new Location({\n latitude: 37.777456,\n longitude: -122.393039\n});\ntry {\n const geocode = await ReverseGeocodeLookup.lookup(coordinates);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.reverseGeocodeLookups.lookup({\n latitude: 37.7749,\n longitude: 122.4194\n}, function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "reverseGeocodeLookupsApi = ReverseGeocodeLookupsApi.new(config)\n\ncoordinates = Location.new({\n latitude: 37.777456,\n longitude: -122.393039,\n})\n\nbegin\n geocode = reverseGeocodeLookupsApi.lookup(coordinates)\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = ReverseGeocodeLookupsApi(api_client)\n\ncoordinates = Location(\n latitude = 37.777456,\n longitude = -122.393039,\n)\n\ntry:\n geocode = api.lookup(coordinates)\nexcept ApiException as e:\n print(e)\n"
},
{
"label": "PHP",
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\ReverseGeocodeLookupsApi($config, new GuzzleHttp\\Client());\n\n$coordinates = new OpenAPI\\Client\\Model\\Location(array(\n \"latitude\" => \"37.777456\",\n \"longitude\" => \"-122.393039\",\n));\n\ntry {\n $result = $apiInstance->lookup($coordinates);\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "ReverseGeocodeLookupsApi apiInstance = new ReverseGeocodeLookupsApi(config);\n\nLocation location = new Location();\nlocation.setlatitude(37.777456f);\nlocation.setlongitude(-122.393039f);\n\ntry {\n apiInstance.lookup(location, null);\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.ReverseGeocodeLookup.lookup(%{\n latitude: 37.7749,\n longitude: 122.4194\n})\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "ReverseGeocodeLookupsApi api = new ReverseGeocodeLookupsApi(config);\n\nLocation location = new Location(\n 37.777456f,\n -122.393039f\n);\n\ntry {\n api.lookup(location, null);\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(context, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\nvar location = *lob.NewLocationWithDefaults()\nlocation.SetLatitude(37.777456)\nlocation.SetLongitude(122.393039)\n\nresp, _, err := apiClient.ReverseGeocodeLookupsApi.Lookup(context).Location(location).Execute()\n\nif err != nil {\n return err\n}\n"
}
]
}
},
"/us_verifications": {
"post": {
"description": "Verify a US or US territory address _with a live API key_. The address can be in components (e.g. `primary_line` is \"210 King Street\", `zip_code` is \"94107\") or as a single string (e.g. \"210 King Street 94107\"), but not as both. Requests using a test API key validate required fields but return empty values unless specific `primary_line` values are provided. See the [US Verifications Test Environment](#section/US-Verifications-Test-Env) for details.",
"operationId": "us_verification",
"parameters": [
{
"description": "Casing of the verified address. Possible values are `upper` and `proper` for uppercased (e.g. \"PO BOX\") and proper-cased (e.g. \"PO Box\"), respectively. Only affects `recipient`, `primary_line`, `secondary_line`, `urbanization`, and `last_line`. Default casing is `upper`.",
"in": "query",
"name": "case",
"required": false,
"schema": {
"default": "upper",
"enum": [
"upper",
"proper"
],
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"examples": {
"basic": {
"value": {
"city": "San Francisco",
"primary_line": "210 King Street",
"state": "CA",
"zip_code": "94107"
}
},
"full_payload": {
"value": {
"city": "RIO PIEDRAS",
"primary_line": "Ave Wilson Churchill 123",
"recipient": "Walgreens",
"secondary_line": "",
"state": "PR",
"urbanization": "URB FAIR OAKS",
"zip_code": "00926"
}
},
"single_line": {
"value": {
"address": "210 King Street 94107"
}
},
"test": {
"value": {
"primary_line": "po box",
"zip_code": "11111"
}
}
},
"schema": {
"$ref": "#/components/schemas/us_verifications_writable"
}
},
"application/x-www-form-urlencoded": {
"examples": {
"basic": {
"value": {
"city": "San Francisco",
"primary_line": "210 King Street",
"state": "CA",
"zip_code": "94107"
}
},
"full_payload": {
"value": {
"city": "RIO PIEDRAS",
"primary_line": "Ave Wilson Churchill 123",
"recipient": "Walgreens",
"secondary_line": "",
"state": "PR",
"urbanization": "URB FAIR OAKS",
"zip_code": "00926"
}
},
"single_line": {
"value": {
"address": "210 King Street 94107"
}
},
"test": {
"value": {
"primary_line": "po box",
"zip_code": "11111"
}
}
},
"schema": {
"$ref": "#/components/schemas/us_verifications_writable"
}
},
"multipart/form-data": {
"examples": {
"basic": {
"value": {
"city": "San Francisco",
"primary_line": "210 King Street",
"state": "CA",
"zip_code": "94107"
}
},
"full_payload": {
"value": {
"city": "RIO PIEDRAS",
"primary_line": "Ave Wilson Churchill 123",
"recipient": "Walgreens",
"secondary_line": "",
"state": "PR",
"urbanization": "URB FAIR OAKS",
"zip_code": "00926"
}
},
"single_line": {
"value": {
"address": "210 King Street 94107"
}
},
"test": {
"value": {
"primary_line": "po box",
"zip_code": "11111"
}
}
},
"schema": {
"$ref": "#/components/schemas/us_verifications_writable"
}
}
},
"required": true
},
"responses": {
"200": {
"$ref": "#/components/responses/us_verifications"
},
"default": {
"$ref": "#/components/responses/us_verifications_error"
}
},
"summary": "Single Verify",
"tags": [
"US Verifications"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/us_verifications \\\n -u <YOUR_LIVE_API_KEY>: \\\n -d \"primary_line=210 King Street\" \\\n -d \"city=San Francisco\" \\\n -d \"state=CA\" \\\n -d \"zip_code=94107\"\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "const UsVerification = new USVerificationsApi(av_config);\nconst verificationData1: UsVerificationsWritable = {\n primary_line: '210 King Street',\n city: 'San Francisco',\n state: 'CA',\n zip_code: '94107'\n};\n\ntry {\n const singleVerified = await UsVerification.verifySingle(verificationData1);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.usVerifications.verify({\n primary_line: '210 King Street',\n city: 'San Francisco',\n state: 'CA',\n zip_code: '94107'\n}, function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "usVerificationsApi = UsVerificationsApi.new(config)\n\nverificationData = UsVerificationsWritable.new({\n primary_line: \"210 King Street\",\n city: \"San Francisco\",\n state: \"CA\",\n zip_code: \"94017\",\n})\n\nbegin\n singleVerifiedAddr = usVerificationsApi.verifySingle(verificationData)\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = UsVerificationsApi(api_client)\nverification_data_1 = UsVerificationsWritable(\n primary_line = \"210 King Street\",\n city = \"San Francisco\",\n state = \"CA\",\n zip_code = \"94017\",\n)\n\ntry:\n single_verified = api.verifySingle(verification_data_1)\nexcept ApiException as e:\n print(e)\n"
},
{
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\UsVerificationsApi($config, new GuzzleHttp\\Client());\n\n$verificationData = new OpenAPI\\Client\\Model\\UsVerificationsWritable(array(\n 'primary_line' => '210 King Street',\n 'city' => 'San Francisco',\n 'state' => 'CA',\n 'zip_code' => '94017',\n));\n\ntry {\n $result = $apiInstance->verifySingle($verificationData);\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "UsVerificationsWritable singleVerify = new UsVerificationsWritable();\nsingleVerify.setPrimaryLine(\"210 King Street\");\nsingleVerify.setCity(\"San Francisco\");\nsingleVerify.setState(\"CA\");\nsingleVerify.setZipCode(\"94017\");\n\nUsVerificationsApi apiInstance = new UsVerificationsApi(config);\ntry {\n apiInstance.verifySingle(singleVerify, null);\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.USVerification.verify(%{\n primary_line: \"210 King Street\",\n city: \"San Francisco\",\n state: \"CA\",\n zip_code: \"94107\"\n})\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "UsVerificationsWritable singleVerify = new UsVerificationsWritable(\n null,\n null,\n \"210 King Street\",\n null,\n null,\n \"San Francisco\",\n \"CA\",\n \"94017\"\n);\n\nUsVerificationsApi api = new UsVerificationsApi(config);\n\ntry {\n api.verifySingle(singleVerify, null);\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
}
]
}
},
"/us_zip_lookups": {
"post": {
"description": "Returns information about a ZIP code",
"operationId": "zip_lookup",
"requestBody": {
"content": {
"application/json": {
"example": {
"zip_code": "94107"
},
"schema": {
"$ref": "#/components/schemas/zip5"
}
},
"application/x-www-form-urlencoded": {
"example": {
"zip_code": "94107"
},
"schema": {
"$ref": "#/components/schemas/zip5"
}
},
"multipart/form-data": {
"example": {
"zip_code": "94107"
},
"schema": {
"$ref": "#/components/schemas/zip5"
}
}
},
"required": true
},
"responses": {
"200": {
"$ref": "#/components/responses/zip_lookups"
},
"default": {
"$ref": "#/components/responses/zip_lookups_error"
}
},
"summary": "Lookups",
"tags": [
"Zip Lookups"
],
"x-codeSamples": [
{
"label": "CURL",
"lang": "Shell",
"source": "curl https://api.lob.com/v1/us_zip_lookups \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -d \"zip_code=94107\"\n"
},
{
"label": "TYPESCRIPT",
"lang": "Typescript",
"source": "const ZipLookup = new ZipLookupsApi(av_config);\nconst zipRequest : ZipEditable = {\n zip_code: '07090'\n}\ntry {\n const zipLookup : Zip = await ZipLookup.lookup(zipRequest);\n} catch (err: any) {\n console.error(err);\n}\n"
},
{
"label": "NODE",
"lang": "Javascript",
"source": "Lob.usZipLookups.lookup({\n zip_code: '94107'\n}, function (err, res) {\n console.log(err, res);\n});\n"
},
{
"label": "RUBY",
"lang": "Ruby",
"source": "zipLookupsApi = ZipLookupsApi.new(config)\n\nzipRequest = ZipEditable.new({\n zip_code: \"94107\"\n})\n\nbegin\n zipLookup = zipLookupsApi.lookup(zipRequest)\nrescue => err\n p err.message\nend\n"
},
{
"label": "PYTHON",
"lang": "Python",
"source": "with ApiClient(configuration) as api_client:\n api = ZipLookupsApi(api_client)\n\nzip_request = ZipEditable(\n zip_code = \"94107\"\n)\n\ntry:\n zip_lookup = api.lookup(zip_request)\nexcept ApiException as e:\n print(e)\n"
},
{
"label": "PHP",
"lang": "PHP",
"source": "$apiInstance = new OpenAPI\\Client\\Api\\ZipLookupsApi($config, new GuzzleHttp\\Client());\n\n$zipRequest = new OpenAPI\\Client\\Model\\ZipEditable(array(\n \"zip_code\" => '94107'\n));\n\ntry {\n $result = $apiInstance->lookup($zipRequest);\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
},
{
"label": "JAVA",
"lang": "Java",
"source": "ZipEditable zipEditable = new ZipEditable();\nzipEditable.setZipCode(\"94107\");\n\nZipLookupsApi apiInstance = new ZipLookupsApi(config);\ntry {\n Zip response = apiInstance.lookup(zipEditable);\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
},
{
"label": "ELIXIR",
"lang": "Elixir",
"source": "Lob.USZipLookup.lookup(%{\n zip_code: \"94107\"\n})\n"
},
{
"label": "CSHARP",
"lang": "CSharp",
"source": "ZipEditable zipEditable = new ZipEditable(\"94107\");\n\nZipLookupsApi api = new ZipLookupsApi(config);\n\ntry {\n Zip response = api.lookup(zipEditable);\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
},
{
"label": "GO",
"lang": "Go",
"source": "var context = context.Background()\ncontext = context.WithValue(context, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\nvar zipEditable = *lob.NewZipEditable()\nzipEditable.SetZipCode(\"94107\")\n\nresp, _, err := apiClient.ZipLookupsApi.Lookup(context).ZipEditable(zipEditable).Execute()\n\nif err != nil {\n return err\n}\n"
}
]
}
}
},
"security": [
{
"basicAuth": []
}
],
"servers": [
{
"description": "production",
"url": "https://api.lob.com/v1"
}
],
"tags": [
{
"description": "To add an address to your address book, you create a new address object. You can retrieve and delete individual\naddresses as well as get a list of addresses. Addresses are identified by a unique random ID.\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Addresses"
},
{
"description": "Requests made to the API are protected with <a href=\"https://en.wikipedia.org/wiki/Basic_access_authentication\" target=\"_blank\">HTTP Basic authentication</a>.\nIn order to properly authenticate with the API you must use your API key as the username\nwhile leaving the password blank. Requests not properly authenticated will return a `401`\n[error code](#tag/Errors). You can find your account's API keys\nin your <a href=\"https://dashboard.lob.com/settings/api-keys\" target=\"_blank\">Dashboard Settings</a>.\n### Example Request\ncurl uses the -u flag to pass basic auth credentials (adding a colon after your API key will prevent it from asking you for a\npassword). One of our test API keys has been filled into all the examples on the page, so you can test out any example right away.\n```bash\ncurl https://api.lob.com/v1/addresses \\\n -u test_0dc8dXXXXXXXXXXXXXXXXXXXXXX5b0cc:\n```\n## API Keys\n Lob authenticates your API requests using your account's API keys.\n If you do not include your key when making an API request, or use\n one that is incorrect or outdated, Lob returns an error with a `401`\n HTTP response code. You can find all API keys in your dashboard\n under <a href=\"https://dashboard.lob.com/settings/api-keys\" target=\"_blank\">Settings</a>.\n There are two types of API keys: *secret* and *publishable*.\n - **Secret API keys** should be kept confidential and only stored on your own servers.\n Your account's secret API key can perform any API request to Lob without restriction.\n - **Publishable API keys** are limited to US verifications, international verifications,\n and US autocomplete requests. For maximum security, we encourage you to not expose your \n secret key. You can include the publishable keys in JavaScript code or in an Android or iPhone app\n without exposing your Lob Print and Mail account services or your secret key. Publishable keys are always\n prefixed with `[environment]_pub`.\n Every type comes with a pair of keys: one for the testing environment and one for the\n live environment. We recommend reading [Test and Live Environments](#tag/Test-and-Live-Environments)\n for more information.\n <br><br>\n <div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Authentication",
"x-traitTag": true
},
{
"description": "Bank Accounts allow you to store your bank account securely in our system. The API provides\nendpoints for creating bank accounts, deleting bank accounts, verifying bank accounts,\nretrieving individual bank accounts, and retrieving a list of bank accounts.\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Bank Accounts"
},
{
"description": "At Lob, we pride ourselves on building high quality platform capabilities rapidly\nand iteratively, so we can constantly be delivering additional value to our customers.\nWhen evaluating a new product or feature from Lob, you may see that it has been released in Beta.\n\nTypically, something in Beta means that the feature is early in its lifecycle here at\nLob. While we fully stand behind the quality of everything we release in Beta, we do\nanticipate receiving a higher level of customer feedback on Beta features, as well as a\nfaster pace of changes from our engineering team in response to that feedback.\n\nBy participating in a Lob Beta program, you will have the opportunity to get early access\nto a new product capability, as well as having a unique opportunity to influence the product's\ndirection with your feedback.\n\nYou should also anticipate that features in Beta may have functional or design limitations,\nand might change rapidly as we receive customer feedback and make improvements. In particular,\nnew APIs in Beta may also go through more frequent versioning and version deprecation cycles\nthan our more mature APIs.\n\nIf you are participating in a Beta program and want to provide feedback, please feel free to\n<a href=\"https://lob.com/support#contact\" target=\"_blank\">contact us</a>!\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Beta Program",
"x-traitTag": true
},
{
"description": "The Billing Groups API allows you to create and view labels that can be attached to certain consumption-based\nusages of Letters, Checks, Postcards and Self-Mailers to customize your bill. Please check each\nresource API section to learn more about how to access the Billing Groups API.\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Billing Groups"
},
{
"description": "The Buckslip Orders endpoint allows you to easily create buckslip orders for existing buckslips.\nThe API provides endpoints for creating buckslip orders and listing buckslip orders for a given buckslip.\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Buckslip Orders"
},
{
"description": "The Buckslips endpoint allows you to easily create buckslips that can later be used as add-ons for Letters Campaigns. Note that a Letter Campaign with Buckslip add-on requires a minimum send quantity of 5,000 letters.\nThe API provides endpoints for creating buckslips, retrieving individual buckslips, creating buckslip orders, and retrieving a list of buckslips.\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Buckslips"
},
{
"description": "Verify a list of non-US addresses.\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Bulk Intl Verifications"
},
{
"description": "Verify a list of US addresses.\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Bulk US Verifications"
},
{
"description": "The campaigns endpoint allows you to create and view campaigns that can be used to send multiple letters or postcards.\nThe API provides endpoints for creating campaigns, updating campaigns, retrieving individual campaigns, listing campaigns, and deleting\ncampaigns.\n",
"name": "Campaigns"
},
{
"description": "The card orders endpoint allows you to easily create card orders for existing cards.\nThe API provides endpoints for creating card orders and listing card orders for a given card.\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Card Orders"
},
{
"description": "The cards endpoint allows you to easily create cards that can later be affixed to Letters.\nThe API provides endpoints for creating cards, retrieving individual cards, creating card orders, and retrieving a list of cards.\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Cards"
},
{
"description": "Checks allow you to send payments via physical checks. The API provides endpoints\nfor creating checks, retrieving individual checks, canceling checks, and retrieving a list of checks.\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Checks"
},
{
"description": "The creatives endpoint allows you to create and view creatives. Creatives are used to create\nreusable letter and postcard templates. The API provides endpoints for creating creatives, updating creatives,\nretrieving individual creatives, and deleting creatives.\n",
"name": "Creatives"
},
{
"description": "Lob uses RESTful HTTP response codes to indicate success or failure of an API request - read below for more information. In general, 2xx indicates success, 4xx indicate an input error, and 5xx indicates an error on Lob's end.\n\n<table>\n <tr>\n <th style=\"white-space: nowrap\">ATTRIBUTE</th>\n <th style=\"white-space: nowrap\">DESCRIPTION</th>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>code</code></td>\n <td style=\"white-space: nowrap\">A consistent machine-keyable string identifying the error</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>status_code</code></td>\n <td style=\"white-space: nowrap\">A conventional HTTP status code</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>message</code></td>\n <td style=\"white-space: nowrap\">A human-readable, subject-to-change message with more details about the error</td>\n </tr>\n</table>\n\n### HTTP Status Code Summary\n\n<table>\n <tr>\n <th style=\"white-space: nowrap\">STATUS_CODE</th>\n <th style=\"white-space: nowrap\">CODE</th>\n <th style=\"white-space: nowrap\">MESSAGE</th>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>200</code></td>\n <td style=\"white-space: nowrap\">SUCCESS</td>\n <td style=\"white-space: nowrap\">Successful API request</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>401</code></td>\n <td style=\"white-space: nowrap\">UNAUTHORIZED</td>\n <td style=\"white-space: nowrap\">Authorization error with your API key or account</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>403</code></td>\n <td style=\"white-space: nowrap\">FORBIDDEN</td>\n <td style=\"white-space: nowrap\">Forbidden error with your API key or account</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>404</code></td>\n <td style=\"white-space: nowrap\">NOT FOUND</td>\n <td style=\"white-space: nowrap\">The requested item does not exist</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">BAD REQUEST</td>\n <td style=\"white-space: nowrap\">The query or body parameters did not pass validation</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>429</code></td>\n <td style=\"white-space: nowrap\">TOO MANY REQUESTS</td>\n <td style=\"white-space: nowrap\">Too many requests have been sent with an API key in a given amount of time</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>500</code></td>\n <td style=\"white-space: nowrap\">SERVER ERROR</td>\n <td style=\"white-space: nowrap\">An internal server error occurred, please contact support@lob.com</td>\n </tr>\n</table>\n\n### Error Codes - Generic\n\n<table>\n <tr>\n <th style=\"white-space: nowrap\">STATUS_CODE</th>\n <th style=\"white-space: nowrap\">CODE</th>\n <th style=\"white-space: nowrap\">MESSAGE</th>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">BAD_REQUEST</td>\n <td style=\"white-space: nowrap\">An invalid request was made. See error message for details.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>409/422</code></td>\n <td style=\"white-space: nowrap\">CONFLICT</td>\n <td style=\"white-space: nowrap\">This operation would leave data in a conflicted state.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>403</code></td>\n <td style=\"white-space: nowrap\">FEATURE_LIMIT_REACHED</td>\n <td style=\"white-space: nowrap\">The account has reached its resource limit and requires upgrading to add more.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>500</code></td>\n <td style=\"white-space: nowrap\">INTERNAL_SERVER_ERROR</td>\n <td style=\"white-space: nowrap\">An error has occured on Lob's servers. Please try request again.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">INVALID</td>\n <td style=\"white-space: nowrap\">An invalid request was made. See error message for details.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">NOT_DELETABLE</td>\n <td style=\"white-space: nowrap\">An attempt was made to delete a resource, but the resource cannot be deleted.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>404</code></td>\n <td style=\"white-space: nowrap\">NOT_FOUND</td>\n <td style=\"white-space: nowrap\">The requested resource was not found.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>408</code></td>\n <td style=\"white-space: nowrap\">REQUEST_TIMEOUT</td>\n <td style=\"white-space: nowrap\">The request took too long. Please try again.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>503</code></td>\n <td style=\"white-space: nowrap\">SERVICE_UNAVAILABLE</td>\n <td style=\"white-space: nowrap\">The Lob servers are temporarily unavailable. Please try again.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>404</code></td>\n <td style=\"white-space: nowrap\">UNRECOGNIZED_ENDPOINT</td>\n <td style=\"white-space: nowrap\">The requested endpoint doesn't exist.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">UNSUPPORTED_LOB_VERSION</td>\n <td style=\"white-space: nowrap\">An unsupported Lob API version was requested.</td>\n </tr>\n</table>\n\n### Error Codes - Authentication\n\n<table>\n <tr>\n <th style=\"white-space: nowrap\">STATUS_CODE</th>\n <th style=\"white-space: nowrap\">CODE</th>\n <th style=\"white-space: nowrap\">MESSAGE</th>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>401</code></td>\n <td style=\"white-space: nowrap\">EMAIL_REQUIRED</td>\n <td style=\"white-space: nowrap\">Account must have a verified email address before creating live resources.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>401</code></td>\n <td style=\"white-space: nowrap\">UNAUTHORIZED</td>\n <td style=\"white-space: nowrap\">The request isn't authorized.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>401</code></td>\n <td style=\"white-space: nowrap\">UNAUTHORIZED_TOKEN</td>\n <td style=\"white-space: nowrap\">Token isn't authorized.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>401/403</code></td>\n <td style=\"white-space: nowrap\">INVALID_API_KEY</td>\n <td style=\"white-space: nowrap\">The API key is invalid.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>403</code></td>\n <td style=\"white-space: nowrap\">PUBLISHABLE_KEY_NOT_ALLOWED</td>\n <td style=\"white-space: nowrap\">The requested operation needs a secret key, not a publishable key. See [API Keys](#tag/API-Keys) for more information.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>429</code></td>\n <td style=\"white-space: nowrap\">RATE_LIMIT_EXCEEDED</td>\n <td style=\"white-space: nowrap\">Requests were sent too quickly and must be slowed down.</td>\n </tr>\n</table>\n\n ### Error Codes - Advanced\n\n <table>\n <tr>\n <th style=\"white-space: nowrap\">STATUS_CODE</th>\n <th style=\"white-space: nowrap\">CODE</th>\n <th style=\"white-space: nowrap\">MESSAGE</th>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>401</code></td>\n <td style=\"white-space: nowrap\">PAYMENT_METHOD_UNVERIFIED</td>\n <td style=\"white-space: nowrap\">You must have a verified bank account or credit card to submit live requests.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>404</code></td>\n <td style=\"white-space: nowrap\">DELETED_BANK_ACCOUNT</td>\n <td style=\"white-space: nowrap\">Checks cannot be created with a deleted bank account.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">ADDRESS_LENGTH_EXCEEDS_LIMIT</td>\n <td style=\"white-space: nowrap\">The sum of to.address_line1 and to.address_line2 cannot surpass 50 characters.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">BANK_ACCOUNT_ALREADY_VERIFIED</td>\n <td style=\"white-space: nowrap\">The bank account has already been verified.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">BANK_ERROR</td>\n <td style=\"white-space: nowrap\">There's an issue with the bank account.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>403</code></td>\n <td style=\"white-space: nowrap\">BILLING_ADDRESS_REQUIRED</td>\n <td style=\"white-space: nowrap\">In order to create a live mail piece, your account needs to set up a billing address.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">CUSTOM_ENVELOPE_INVENTORY_DEPLETED</td>\n <td style=\"white-space: nowrap\">Custom envelope inventory is depleted, and more will need to be ordered.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">FAILED_DELIVERABILITY_STRICTNESS</td>\n <td style=\"white-space: nowrap\">The to address doesn't meet strictness requirements.\n See <a href=\"https://dashboard.lob.com/#/settings/account\" target=\"_blank\">Account Settings</a> to configure strictness.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">FILE_PAGES_BELOW_MIN</td>\n <td style=\"white-space: nowrap\">Not enough pages.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">FILE_PAGES_EXCEED_MAX</td>\n <td style=\"white-space: nowrap\">Too many pages.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">FILE_SIZE_EXCEEDS_LIMIT</td>\n <td style=\"white-space: nowrap\">The file size is too large. See description for details.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">FOREIGN_RETURN_ADDRESS</td>\n <td style=\"white-space: nowrap\">The 'from' address must be a US address.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">INCONSISTENT_PAGE_DIMENSIONS</td>\n <td style=\"white-space: nowrap\">All pages of the input file must have the same dimensions.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">INVALID_BANK_ACCOUNT</td>\n <td style=\"white-space: nowrap\">The provided bank routing number is invalid.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">INVALID_BANK_ACCOUNT_VERIFICATION</td>\n <td style=\"white-space: nowrap\">Verification amounts do not match.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">INVALID_CHECK_INTERNATIONAL</td>\n <td style=\"white-space: nowrap\">Checks cannot be sent internationally.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">INVALID_COUNTRY_COVID</td>\n <td style=\"white-space: nowrap\">The postal service in the specified country is currently unable to process the request due to COVID-19 restrictions.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">INVALID_FILE</td>\n <td style=\"white-space: nowrap\">The file is invalid.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">INVALID_FILE_DIMENSIONS</td>\n <td style=\"white-space: nowrap\">File dimensions are incorrect for the selected mail type.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">INVALID_FILE_DOWNLOAD_TIME</td>\n <td style=\"white-space: nowrap\">File download from remote server took too long.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">INVALID_FILE_URL</td>\n <td style=\"white-space: nowrap\">The file URL when creating a resource is invalid.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">INVALID_IMAGE_DPI</td>\n <td style=\"white-space: nowrap\">DPI must be at least 300.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">INVALID_INTERNATIONAL_FEATURE</td>\n <td style=\"white-space: nowrap\">The specified product cannot be sent to the destination.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">INVALID_PERFORATION_RETURN_ENVELOPE</td>\n <td style=\"white-space: nowrap\">Both `return_envelope` and `perforation` must be used together.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">INVALID_TEMPLATE_HTML</td>\n <td style=\"white-space: nowrap\">The provided HTML is invalid.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">MAIL_USE_TYPE_CAN_NOT_BE_NULL</td>\n <td style=\"white-space: nowrap\">`use_type` must be one of \"marketing\" or \"operational\". Alternatively, an admin can set the account default use type in Account Settings.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">MERGE_VARIABLE_REQUIRED</td>\n <td style=\"white-space: nowrap\">A required merge variable is missing.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">MERGE_VARIABLE_WHITESPACE</td>\n <td style=\"white-space: nowrap\">Merge variable names cannot contain whitespace.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">PDF_ENCRYPTED</td>\n <td style=\"white-space: nowrap\">An encrypted PDF was provided.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">SPECIAL_CHARACTERS_RESTRICTED</td>\n <td style=\"white-space: nowrap\">Cannot use special characters for merge variable names.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>422</code></td>\n <td style=\"white-space: nowrap\">UNEMBEDDED_FONTS</td>\n <td style=\"white-space: nowrap\">The provided PDF contains non-standard unembedded fonts. See description for details.</td>\n </tr>\n</table>\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Errors",
"x-traitTag": true
},
{
"description": "When various notable things happen within the Lob architecture, Events will be created. To get these events sent to your server\nautomatically when they occur, you can set up [Webhooks](#tag/Webhooks).\n\n<h3>Postcards</h3>\n\n<table>\n <tr>\n <th style=\"white-space: nowrap\">EVENT TYPE</th>\n <th style=\"white-space: nowrap\">LIVE-ONLY</th>\n <th style=\"white-space: nowrap\">WHEN EVENT TYPE OCCURS</th>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>postcard.created</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A postcard is successfully created (Lob returns a 200 status code).</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>postcard.rejected</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A postcard was not successfully created (Usually happens when one or more postcards fail the creation step during a batch request)</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>postcard.rendered_pdf</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A postcard's PDF proof is successfully rendered.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>postcard.rendered_thumbnails</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A postcard's thumbnails are successfully rendered.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>postcard.deleted</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A postcard is successfully canceled.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>postcard.mailed</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A postcard receives a \"Mailed\" <a href='#operation/tracking_event'>tracking event</a>. Only enabled for certain <a href='https://dashboard.lob.com/#/settings/editions' target=\"_blank\">Print & Mail Editions</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>postcard.in_transit</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A postcard receives an \"In Transit\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>postcard.in_local_area</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A postcard receives an \"In Local Area\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>postcard.processed_for_delivery</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A postcard receives a \"Processed for Delivery\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>postcard.delivered</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A postcard receives a \"Delivered\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>postcard.failed</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A postcard receives a \"Failed\" <a href=\"https://help.lob.com/print-and-mail/designing-mail-creatives/creative-formatting/rendering-errors\">rendering error</a> or <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>postcard.re-routed</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A postcard receives a \"Re-Routed\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>postcard.returned_to_sender</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A postcard receives a \"Returned to Sender\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>postcard.international_exit</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A postcard receives a \"International Exit\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>postcard.viewed</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A postcard QR code or URL was scanned or viewed by the recipient. </td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>postcard.informed_delivery.email_sent</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">An informed delivery email was sent to the recipient. </td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>postcard.informed_delivery.email_opened</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">An informed delivery email was opened by the recipient. </td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>postcard.informed_delivery.email_clicked_through</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">The link in an informed delivery email was clicked on. </td>\n </tr>\n</table>\n\n<h3>Self Mailers</h3>\n\n<table>\n <tr>\n <th style=\"white-space: nowrap\">EVENT TYPE</th>\n <th style=\"white-space: nowrap\">LIVE-ONLY</th>\n <th style=\"white-space: nowrap\">WHEN EVENT TYPE OCCURS</th>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>self_mailer.created</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A self_mailer is successfully created (Lob returns a 200 status code).</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>self_mailer.rejected</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A self_mailer was not successfully created (Usually happens when one or more self_mailers fail the creation step during a batch request)</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>self_mailer.rendered_pdf</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A self_mailer's PDF proof is successfully rendered.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>self_mailer.rendered_thumbnails</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A self_mailer's thumbnails are successfully rendered.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>self_mailer.deleted</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A self_mailer is successfully canceled.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>self_mailer.mailed</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A self_mailer receives a \"Mailed\" <a href='#operation/tracking_event'>tracking event</a>. Only enabled for certain\n <a href=\"https://dashboard.lob.com/#/settings/editions\" target=\"_blank\">Print & Mail Editions</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>self_mailer.in_transit</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A self_mailer receives an \"In Transit\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>self_mailer.in_local_area</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A self_mailer receives an \"In Local Area\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>self_mailer.processed_for_delivery</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A self_mailer receives a \"Processed for Delivery\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>self_mailer.delivered</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A self_mailer receives an \"Delivered\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>self_mailer.failed</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A self_mailer receives an \"Failed\" <a href=\"https://help.lob.com/print-and-mail/designing-mail-creatives/creative-formatting/rendering-errors\">rendering error</a> or <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>self_mailer.re-routed</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A self_mailer receives a \"Re-Routed\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>self_mailer.returned_to_sender</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A self_mailer receives a \"Returned to Sender\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>self_mailer.international_exit</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A self_mailer receives an \"International Exit\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>self_mailer.viewed</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A self_mailer's QR code or URL was scanned or viewed by the recipient. </td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>self_mailer.informed_delivery.email_sent</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">An informed delivery email was sent to the recipient. </td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>self_mailer.informed_delivery.email_opened</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">An informed delivery email was opened by the recipient. </td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>self_mailer.informed_delivery.email_clicked_through</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">The link in an informed delivery email was clicked on. </td>\n </tr>\n</table>\n\n<h3>Letters</h3>\n\n<table>\n <tr>\n <th style=\"white-space: nowrap\">EVENT TYPE</th>\n <th style=\"white-space: nowrap\">LIVE-ONLY</th>\n <th style=\"white-space: nowrap\">WHEN EVENT TYPE OCCURS</th>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.created</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A letter is successfully created (Lob returns a 200 status code).</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.rejected</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A letter was not successfully created (Usually happens when one or more letters fail the creation step during a batch request)</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.rendered_pdf</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A letter's PDF proof is successfully rendered.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.rendered_thumbnails</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A letter's thumbnails are successfully rendered.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.deleted</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A letter is successfully canceled.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.mailed</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A letter receives a \"Mailed\" <a href='#operation/tracking_event'>tracking event</a>. Only enabled for certain\n <a href=\"https://dashboard.lob.com/#/settings/editions\" target=\"_blank\">Print & Mail Editions</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.in_transit</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A letter receives an \"In Transit\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.in_local_area</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A letter receives an \"In Local Area\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.processed_for_delivery</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A letter receives a \"Processed for Delivery\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.delivered</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A letter receives a \"Delivered\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.failed</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A letter receives a \"Failed\" <a href=\"https://help.lob.com/print-and-mail/designing-mail-creatives/creative-formatting/rendering-errors\">rendering error</a> or <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.re-routed</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A letter receives a \"Re-Routed\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.returned_to_sender</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A letter receives a \"Returned to Sender\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.international_exit</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A letter receives a \"International Exit\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.viewed</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A letter's QR code or URL was scanned or viewed by the recipient. </td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.certified.mailed</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A certified letter receives a \"Mailed\" <a href='#operation/tracking_event'>tracking event</a>. Only enabled for certain\n <a href=\"https://dashboard.lob.com/#/settings/editions\" target=\"_blank\">Print & Mail Editions</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.certified.in_transit</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A certified letter receives an \"In Transit\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.certified.in_local_area</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A certified letter receives an \"In Transit\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.certified.processed_for_delivery</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A certified letter receives a \"Processed for Delivery\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.certified.re-routed</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A certified letter receives a \"Re-Routed\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.certified.returned_to_sender</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A certified letter receives a \"Returned to Sender\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.certified.delivered</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A certified letter receives a \"Delivered\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.certified.pickup_available</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A certified letter receives a \"Pickup Available\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.certified.issue</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A certified letter receives an \"Issue\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.return_envelope.created</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A return envelope is created (occurs simultaneously with letter creation).</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.return_envelope.in_transit</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A return envelope receives an \"In Transit\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.return_envelope.in_local_area</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A return envelope receives an \"In Local Area\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.return_envelope.processed_for_delivery</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A return envelope receives a \"Processed for Delivery\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.return_envelope.re-routed</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A return envelope receives a \"Re-Routed\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.return_envelope.returned_to_sender</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A return envelope receives a \"Returned to Sender\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.informed_delivery.email_sent</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">An informed delivery email was sent to the recipient. </td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.informed_delivery.email_opened</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">An informed delivery email was opened by the recipient. </td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>letter.informed_delivery.email_clicked_through</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">The link in an informed delivery email was clicked on. </td>\n </tr>\n</table>\n\n<h3>Checks</h3>\n\n<table>\n <tr>\n <th style=\"white-space: nowrap\">EVENT TYPE</th>\n <th style=\"white-space: nowrap\">LIVE-ONLY</th>\n <th style=\"white-space: nowrap\">WHEN EVENT TYPE OCCURS</th>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>check.created</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A check is successfully created (Lob returns a 200 status code).</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>check.rejected</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A check was not successfully created (Usually happens when one or more checks fail the creation step during a batch request)</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>check.rendered_pdf</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A check's PDF proof is successfully rendered.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>check.rendered_thumbnails</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A check's thumbnails are successfully rendered.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>check.deleted</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A check is successfully canceled.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>check.mailed</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A check receives a \"Mailed\" <a href='#operation/tracking_event'>tracking event</a>. Only enabled for certain <a href=\"https://dashboard.lob.com/#/settings/editions\" target=\"_blank\">Print & Mail Editions</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>check.in_transit</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A check receives an \"In Transit\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>check.in_local_area</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A check receives an \"In Local Area\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>check.processed_for_delivery</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A check receives a \"Processed for Delivery\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>check.delivered</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A check receives a \"Delivered\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>check.failed</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A check receives a \"Failed\" <a href=\"https://help.lob.com/print-and-mail/designing-mail-creatives/creative-formatting/rendering-errors\">rendering error</a> or <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>check.re-routed</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A check receives a \"Re-Routed\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>check.returned_to_sender</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">A check receives a \"Returned to Sender\" <a href='#operation/tracking_event'>tracking event</a>.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>check.informed_delivery.email_sent</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">An informed delivery email was sent to the recipient. </td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>check.informed_delivery.email_opened</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">An informed delivery email was opened by the recipient. </td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>check.informed_delivery.email_clicked_through</code></td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n <td style=\"white-space: nowrap\">The link in an informed delivery email was clicked on. </td>\n </tr>\n</table>\n\n<h3>Addresses</h3>\n\n<table>\n <tr>\n <th style=\"white-space: nowrap\">EVENT TYPE</th>\n <th style=\"white-space: nowrap\">LIVE-ONLY</th>\n <th style=\"white-space: nowrap\">WHEN EVENT TYPE OCCURS</th>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>address.created</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">An address is successfully created (Lob returns a 200 status code).</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>address.deleted</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">An address is successfully deleted.</td>\n </tr>\n</table>\n\n<h3>Bank Accounts</h3>\n\n<table>\n <tr>\n <th style=\"white-space: nowrap\">EVENT TYPE</th>\n <th style=\"white-space: nowrap\">LIVE-ONLY</th>\n <th style=\"white-space: nowrap\">WHEN EVENT TYPE OCCURS</th>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>bank_account.created</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A bank account is successfully created (Lob returns a 200 status code).</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>bank_account.deleted</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A bank account is successfully deleted.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>bank_account.verified</code></td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n <td style=\"white-space: nowrap\">A bank account is successfully verified.</td>\n </tr>\n</table>\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Events"
},
{
"description": "### 1. Get Setup\n* Create an account at <a href=\"https://dashboard.lob.com/#/register\" target=\"_blank\">Lob.com</a>\n* Obtain your API keys in the Lob dashboard <a href=\"https://dashboard.lob.com/settings/api-keys\" target=\"_blank\">settings</a>\n* You'll use the format, `test_*.` for your Test API key and `live_*.` for your Live API key.\n\n### 2. Explore\n* Try out in Postman:\n<div class=\"postman-run-button\"\ndata-postman-action=\"collection/fork\"\ndata-postman-var-1=\"16169677-975ecb9f-ea22-4d8f-a4f9-53a42f2aee03\"\ndata-postman-collection-url=\"entityId=16169677-975ecb9f-ea22-4d8f-a4f9-53a42f2aee03&entityType=collection&workspaceId=5404d3a5-5a84-4df6-b078-a1547e1a68a7\"\nstyle=\"background:#0099d7;color: white;display: flex;justify-content: center;align-items: center;\">\n Run in Postman\n</div>\n<script type=\"text/javascript\">\n (function (p,o,s,t,m,a,n) {\n !p[s] && (p[s] = function () { (p[t] || (p[t] = [])).push(arguments); });\n !o.getElementById(s+t) && o.getElementsByTagName(\"head\")[0].appendChild((\n (n = o.createElement(\"script\")),\n (n.id = s+t), (n.async = 1), (n.src = m), n\n ));\n }(window, document, \"_pm\", \"PostmanRunObject\", \"https://run.pstmn.io/button.js\"));\n</script>\n* Launch your terminal and copy/paste a CURL command.\n```bash\ncurl https://api.lob.com/v1/addresses \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n```\n* Download a [Lob SDK](#tag/SDKs-and-Tools) into your favorite IDE (integrated development environment)\n\n### 3. Learn more\nTry our quick start (TypeScript, Python, PHP, Java or Ruby):\n* <a href=\"https://help.lob.com/developer-docs/quickstart-guide\" target=\"_blank\">Send your first Postcards</a>\n\nUse Case guides\n* <a href=\"https://help.lob.com/developer-docs/use-case-guides/mass-deletion-setup\" target=\"_blank\">Mass Deletion Setup</a>\n* <a href=\"https://help.lob.com/developer-docs/use-case-guides/ncoa-restrictions\" target=\"_blank\">NCOA Restrictions</a>\n* <a href=\"https://help.lob.com/developer-docs/use-case-guides/override-cancellation-window\" target=\"_blank\">Override Cancellation Window</a>\n* <a href=\"https://help.lob.com/developer-docs/use-case-guides/visibility-of-address-changes\" target=\"_blank\">Visibility of Address Changes</a>\n* <a href=\"https://help.lob.com/developer-docs/use-case-guides/ingesting-tracking-events-with-webhooks\" target=\"_blank\">Ingesting Tracking Events with Webhooks</a>\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Getting Started",
"x-traitTag": true
},
{
"description": "Validates whether a given name is associated with an address.\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Identity Validation"
},
{
"description": "The Informed Delivery campaigns API allows you to create and view Informed Delivery campaigns.\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Informed Delivery Campaign"
},
{
"description": "Address verification for non-US addresses\n<br>\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n\n## Intl Verifications Test Env\n\nWhen verifying international addresses, you'll likely want to test against\na wide array of addresses to ensure you're handling responses correctly.\nWith your test API key, requests that use specific values for `primary_line`\nlet you explore the responses to many types of addresses:\n\n<table>\n <tr>\n <th style=\"white-space: nowrap\">DELIVERABILITY OF SAMPLE RESPONSE</th>\n <th style=\"white-space: nowrap\">SET <code>primary_line</code> TO</th>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>deliverable</code></td>\n <td style=\"white-space: nowrap\">deliverable</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>deliverable_missing_info</code></td>\n <td style=\"white-space: nowrap\">deliverable missing info</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>undeliverable</code></td>\n <td style=\"white-space: nowrap\">undeliverable</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>no_match</code></td>\n <td style=\"white-space: nowrap\">no match</td>\n </tr>\n</table>\n\nSee the `test` request & response examples under [Intl Verification Examples](#operation/intl_verification) within the\n\"Verify an international address section\" in Intl Verifications.\n\nYou can rely on the response from these examples generally matching the response\nyou'd see in the live environment with an address of that type (excluding the `recipient` field).\n\nThe test API key does not perform any verification, automatic correction, or standardization\nfor addresses. If you wish to try these features out, use our <a href=\"https://lob.com/address-verification\" target=\"_blank\">live demo</a>\nor the free plan (see <a href=\"https://lob.com/pricing/address-verification\" target=\"_blank\">our pricing</a> for details).\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Intl Verifications"
},
{
"description": "Lob's Print & Mail and Address Verification APIs help companies transform outdated,\nmanual print-and-mail processes; save 1,000s of hours in processing time by sending mail much more\nquickly; and increase ROI on offline communications.\n\nAutomate direct mail by triggering on-demand postcards, letters, and checks directly from your\nCRM or customer data systems.\n\nAddress Verification corrects, standardizes, and cleanses address data for assured delivery with\ninstant verification across 240+ countries and territories.\n\nLob's print delivery network eliminates the hassle of vendor management with automated\nproduction and postage across a global network of vetted commercial printers.\n\nTracking & Analytics gives you complete visibility of production and delivery for each piece of\nmail you send to meet compliance requirements and measure campaign performance.\n",
"name": "Introduction",
"x-traitTag": true
},
{
"description": "The letters endpoint allows you to easily print and mail letters. The API provides endpoints for\ncreating letters, retrieving individual letters, canceling letters, and retrieving a list of letters.\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Letters"
},
{
"description": "## Cancellation Windows\n\nBy default, all new accounts have a 5 minute cancellation window for postcards,\nself mailers, letters, and checks. Within that timeframe, you can cancel\nmailings from production, free of charge. Once the window has passed for a\npostcard, self mailer, letter, or check, the mailing is no longer cancelable.\nIn addition, certain customers can customize their cancellation windows by\nproduct in their <a href=\"https://dashboard.lob.com/#\" target=\"_blank\">Dashboard Settings</a>. Upgrade to\nthe appropriate <a href=\"https://dashboard.lob.com/#/settings/editions\" target=\"_blank\">Print & Mail Edition</a>\nto automatically gain access to this ability. For more details on this feature,\ncheck out our <a href=\"https://help.lob.com/print-and-mail/building-a-mail-strategy/managing-mail-settings#cancellation-windows-4\" target=\"_blank\">Cancellation Guide</a>.\n\nIf you schedule a postcard, self mailer, letter, or check for up to 180 days\nin the future by supplying the `send_date` parameter, that will override any\ncancellation window you may have for that product.\n<br>\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n\n## Scheduled Mailings\n\nPostcards, self mailers, letters, and checks can be scheduled to be sent up\nto 180 days in advance. You can use this feature to:\n- Create automated drip campaigns (e.g. send a postcard at 15, 30, and 60\ndays)\n- Schedule recurring sends\n- Plan your mailing schedule ahead of time\n\nUp until the time a mailing is scheduled for, it can also be canceled.\nIf you use this feature in conjunction with [a cancellation window](\nindex.html#section/Cancellation-Windows), the `send_date` parameter will always\ntake precedence.\n\nFor implementation details, see documentation below for each respective\nendpoint. For more help, see our <a href=\"https://help.lob.com/print-and-mail/building-a-mail-strategy/choosing-a-delivery-strategy#scheduled-mailings-15\" target=\"_blank\">Scheduled Mailings Guide</a>.\n\nThis feature is exclusive to certain customers. Upgrade to the appropriate\n<a href=\"https://dashboard.lob.com/#/settings/editions\" target=\"_blank\">Print & Mail Edition</a> to\ngain access.\n\n### Example Create Request using Send Date\n\n```bash\n curl https://api.lob.com/v1/postcards \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -d \"description=Demo Future Postcard\" \\\n -d \"to=adr_bae820679f3f536b\" \\\n -d \"from=adr_210a8d4b0b76d77b\" \\\n -d \"front=tmpl_b846a20859ae11a\" \\\n -d \"back=tmpl_01b0d396a10c268\" \\\n -d \"merge_variables[name]=Harry\" \\\n -d \"send_date=2021-07-26\"\n```\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Manage Mail",
"x-traitTag": true
},
{
"description": "National Change of Address Linkage (NCOALink) is a service offered by the USPS, which allows individuals\nor businesses who have recently moved to have any mail forwarded from their previous address\nto their new address.\n\nAs a CASS-certified Address Verification Provider, Lob also offers NCOALink\nfunctionality to our Print & Mail customers. With the Lob NCOALink feature enabled, Postcards,\nLetters, Checks and Addresses can automatically be corrected to reflect an individual's or business's\nnew address in the case that they have moved (only if they have registered for NCOALink with the USPS).\n\nDue to privacy concerns and USPS constraints, for customers with NCOALink enabled, our API responses\nfor a limited set of endpoints differ slightly in the case when an address has been changed through NCOALink.\n\n**NOTE**: This feature is exclusive to certain customers. Upgrade to the appropriate <a href='https://dashboard.lob.com/#/settings/editions' target=\"_blank\">Print & Mail Editions</a> to gain access.\n\nFor more information, see our <a href=\"https://help.lob.com/print-and-mail/all-about-addresses#national-change-of-address-ncoa-7\" target=\"_blank\">NCOALink guide</a>.\n<br>\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n\n## NCOALink Live Environment\nThough there are no changes to API requests, there are significant changes to our API responses, but\nonly in the event that an address has been changed through NCOALink. If an address has not been changed\nthrough NCOALink, the response would be identical to our standard responses, except the addition of a\n`recipient_moved` field, which is `false` for unchanged addresses.\n\nIf an address has been changed through NCOALink, we are required to suppress the following response\nfields for that address:\n- `address_line1`\n- `address_line2`\n- The +4 portion of the ZIP+4 (5-digit ZIP code will still be present)\n\nSee the `ncoa_us_live` example under [Response samples](#operation/address_create) within the \"Create an Address\" section in Addresses\n<br>\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n\n## NCOALink Test Environment\n\nIn addition to sending live requests, you may also want to simulate what an NCOALink response might\nlook like so that you can ensure your application behaves as expected. The behavior of NCOALink in\nLob's Test Environment is very similar to our [US Verifications Test Mode](#section/US-Verifications-Test-Env).\n\nTo simulate an NCOALink request, send a POST request to any of the four endpoints below with an `address_line1` field equal to `NCOA`:\n- `POST /v1/addresses`\n- `POST /v1/checks`\n- `POST /v1/letters`\n- `POST /v1/postcards`\n- `POST /v1/self_mailers`\n\nA static address will always be returned, as documented in the `ncoa_us_test` example under [Response samples](#operation/address_create) within the \"Create an Address\"\nsection in Addresses (along with the corresponding request under \"Request samples\").\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "National Change of Address",
"x-traitTag": true
},
{
"description": "The postcards endpoint allows you to easily print and mail postcards. The API provides endpoints for creating postcards,\nretrieving individual postcards, canceling postcards, and retrieving a list of postcards.\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Postcards"
},
{
"description": "\nLob QR codes allow you to generate a QR code that is unique to each mailpiece, thereby allowing each and every customers to receive a personalized link. See the Create endpoint for <a href=\"#tag/Letters/operation/letter_create\">Letters</a>, <a href=\"#tag/Postcards/operation/postcard_create\">Postcards</a> or <a href=\"#tag/Self-Mailers/operation/self_mailer_create\">Self Mailers</a> to learn how to embed a QR code into your mail piece.\n\nWebhooks can be used to integrate Lob QR code scans into your omni channel marketing strategy. See the <a href=\"#tag/Webhooks\">Webhooks</a> section of our documentation to learn how to enable the `letter.viewed`, `postcard.viewed` and `self_mailer.viewed` event notifications for your mail pieces.\n\nFurthermore, our QR code Analytics endpoint can be used to track the impact and engagement rate of your mail sends. Lob can tell you exactly which recipients opened your mailpiece. Our Analytics endpoint allows you to see exactly which recipient scanned a mailpiece, when they scanned it, and more!\n\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "QR Codes"
},
{
"description": "To prevent misuse, we enforce a rate limit on an API Key and endpoint basis, similar to the way many other APIs enforce rate limits. By default, all accounts and their corresponding Test and Live API Keys have a rate limit of 150 requests per 5 seconds per endpoint. The `POST /v1/us_verifications` and `POST /v1/us_autocompletions` endpoints have a limit of 300 requests per 5 seconds for all accounts.\n\nWhen your application exceeds the rate limit for a given API endpoint, the Lob API will return an HTTP 429 \"Too Many Requests\" response code instead of the variety of codes you would find across the other API endpoints.\n\n**HTTP Headers**\n\nHTTP headers are returned on each request to a rate limited endpoint. Ensure that you inspect these headers during your requests as they provide relevant data on how many more requests your application is allowed to make for the endpoint you just utilized.\n\nWhile the headers are documented here in titlecase, HTTP headers are case insensitive and certain libraries may transform them to lowercase. Please inspect your headers carefully to see how they will be represented in your chosen development scenario.\n<table>\n <tbody>\n <tr>\n <td>X-Rate-Limit-Limit:</td>\n <td>the rate limit ceiling for a given request</td>\n </tr>\n <tr>\n <td>X-Rate-Limit-Remaining:</td>\n <td>the number of requests remaining in this window</td>\n </tr>\n <tr>\n <td>X-Rate-Limit-Reset:</td>\n <td>the time at which the rate limit window resets (in <a href=\"https://en.wikipedia.org/wiki/Unix_time\" target=\"_blank\">UTC epoch seconds</a>)\n </td>\n </tr>\n </tbody>\n</table>\n\n### Example HTTP Headers\n\n```bash\n X-Rate-Limit-Limit:150\n X-Rate-Limit-Remaining:100\n X-Rate-Limit-Reset:1528749846\n```\n\n### Example Response\n\nIf you hit the rate limit on a given endpoint, this is the body of the HTTP 429 message that you will see:\n\n```javascript\n {\n \"error\": {\n \"message\": \"Rate limit exceeded. Please wait 5 seconds and try your request again.\",\n \"code\": \"rate_limit_exceeded\",\n \"status_code\": 429\n }\n }\n``` <div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>",
"name": "Rate Limiting",
"x-traitTag": true
},
{
"description": "## Asset URLs\n\nAll asset URLs returned by the Lob API (postcards, letters, thumbnails,\netc) are signed links served over HTTPS. All links returned will expire in\n30 days to prevent mis-sharing. Each time a GET request is initiated, a\nnew signed URL will be generated.\n<br>\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n\n## Query Parameters\n\nQuery parameters which consist of lists of strings require that all elements of\nthe list be double-quoted, as per query filter standards.\n<br>\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n\n## Idempotent Requests\n\nLob supports idempotency for safely retrying `POST` requests to create\npostcards, self mailers, letters, and checks without accidentally creating\nduplicates.\n\nFor example, if a request to create a check fails due to a network error,\nyou can safely retry the same request with the same idempotency key and\nguarantee that only one check will ultimately be created and sent. When a\nrequest is sent with an idempotency key for an already created resource,\nthe response object for the existing resource will be returned.\n\nTo perform an idempotent `POST` request to one of the mailpiece product\nendpoints, provide an additional `Idempotency-Key` header or an `idempotency_key`\nquery parameter to the request. If multiple idempotency keys are provided,\nthe request will fail. How you create unique keys is up to you, but we\nsuggest using random values, such as V4 UUIDs. Idempotency keys are intended\nto prevent issues over a short periods of time, therefore keys expire after\n24 hours. Keys are unique by mode (Test vs. Live) as well as by resource\n(postcard vs. letter, etc.).\n\nBy default, all `GET` and `DELETE` requests are idempotent by nature, so\nthey do not require an additional idempotency key.\n\nFor more help integrating idempotency keys, refer to our\n<a href=\"https://help.lob.com/print-and-mail/building-a-mail-strategy/managing-mail-settings#idempotent-requests-12\" target=\"_blank\">implementation guide</a>.\n\n**Headers**\n<table>\n <tbody>\n <tr>\n <td>Idempotency-Key:</td>\n <td>\n optional\n <p style=\"color:#888;margin-top:0px;\">\n <font size=\"-1\">\n A string of no longer than 256 characters\n that uniquely identifies this resource.\n </font>\n </p>\n </td>\n </tr>\n </tbody>\n</table>\n\n**Query Parameters**\n<table>\n <tbody>\n <tr>\n <td>idempotency-key:</td>\n <td>\n optional\n <p style=\"color:#888;margin-top:0px;\">\n <font size=\"-1\">\n A string of no longer than 256 characters\n that uniquely identifies this resource.\n </font>\n </p>\n </td>\n </tr>\n </tbody>\n</table>\n\n### Example Request\n\n```bash\n curl https://api.lob.com/v1/postcards \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -H \"Idempotency-Key: 026e7634-24d7-486c-a0bb-4a17fd0eebc5\" \\\n -d \"to=adr_bae820679f3f536b\" \\\n -d \"from=adr_210a8d4b0b76d77b\" \\\n --data-urlencode \"front=<html style='margin: 130px; font-size: 50;'>Front HTML for {{name}}</html>\" \\\n --data-urlencode \"back=<html style='margin: 130px; font-size: 50;'>Back HTML</html>\" \\\n -d \"merge_variables[name]=Harry\"\n```\n<br>\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n\n## Metadata\n\nWhen creating any Lob object, you can include a metadata object with up to 20 key-value pairs of\ncustom data. You can use metadata to store information like `metadata[customer_id] = \"987654\"` or\n`metadata[campaign] = \"NEWYORK2015\"`. This is especially useful for filtering and matching to internal\nsystems.\n\nEach metadata key must be less than 40 characters long and values must be less than 500 characters.\nMetadata does not support nested objects.\n\n### Example Create Request with Metadata\n\n```bash\n curl https://api.lob.com/v1/postcards \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -d \"description=Demo Postcard job\" \\\n -d \"metadata[campaign]=NEWYORK2015\" \\\n -d \"to=adr_bae820679f3f536b\" \\\n -d \"from=adr_210a8d4b0b76d77b\" \\\n --data-urlencode \"front=<html style='margin: 130px; font-size: 50;'>Front HTML for {{name}}</html>\" \\\n --data-urlencode \"back=<html style='margin: 130px; font-size: 50;'>Back HTML</html>\" \\\n -d \"merge_variables[name]=Harry\"\n```\n\n### Example List Request with Metadata Filter\n\n```bash\n curl -g \"https://api.lob.com/v1/postcards?metadata[campaign]=NEWYORK2015&limit=2\" \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n```\n<br>\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n\n\n## Request Body\n\nWhen manually sending a POST HTTP request directly to the Lob API, without\nthe use of a library, you may represent the body as either a Form URL\nEncoded request, a JSON document, or a Multipart Form Data request.\n\nHowever, if you're using one of our [SDKs](#tag/SDKs-and-Tools),\nthe generation of the request bodies is done for you automatically and you don't\nneed to worry about the format.\n\nFor fields that are intended to accept only string values, submitting JSON objects in string format (stringified JSON objects) is not supported. \nOur system automatically parses and validates incoming data according to their expected types. \nAs a result, providing a stringified JSON object in a field designated for string input can cause parsing errors or lead to unexpected validation results.\n\n### Form URL Encoded\n\nThis request body encoding is accompanied with the\n`Content-Type: application/x-www-form-urlencoded` header. The content is an\nexample of what the [Verify a US address](index.html#operation/us_verification)\nendpoint accepts. An example of a request body encoded in this format follows.\n\n\n```javascript\n primary_line=210 King Street&city=San Francisco&state=CA&zip_code=94107\n```\n\n### JSON\n\nThis request body encoding is accompanied with the `Content-Type: application/json` header.\nThe content is an example of what the [Verify a US address endpoint](index.html#operation/us_verification)\naccepts. An example of a request body encoded in this format follows.\n\n\n```javascript\n {\n \"primary_line\": \"210 King Street\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zip_code\": \"94107\"\n }\n```\n\n### Multipart Form Data\n\nThis request body encoding is accompanied with the `Content-Type: multipart/form-data`\nheader. This is the only format that can be used for uploading a file to the API. The\ncontent is an example of what the [Create a check](index.html#operation/check_create)\nendpoint accepts. An example of a request body encoded in this format follows.\n\n\n```javascript\n --------------------------7015ebe79c0a5f8c\n Content-Disposition: form-data; name=\"description\"\n\n Demo Letter\n --------------------------7015ebe79c0a5f8c\n Content-Disposition: form-data; name=\"to\"\n\n adr_bae820679f3f536b\n --------------------------7015ebe79c0a5f8c\n Content-Disposition: form-data; name=\"from\"\n\n adr_210a8d4b0b76d77b\n --------------------------7015ebe79c0a5f8c\n Content-Disposition: form-data; name=\"file\"; filename=\"file.pdf\"\n Content-Type: application/pdf\n\n <FILE CONTENT>\n --------------------------7015ebe79c0a5f8c\n Content-Disposition: form-data; name=\"color\"\n\n true\n --------------------------7015ebe79c0a5f8c--\n```\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Requests and Responses",
"x-traitTag": true
},
{
"description": "The resource proofs endpoint allows you to create a final rendering of any template. This is best practice to ensure that you are visually validating your creative before any mail pieces use the template. The API provides endpoints for creating, updating, and retrieving template proofs.\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Resource Proofs"
},
{
"description": "Find a list of zip codes associated with a valid US location via latitude and longitude. <br> <div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Reverse Geocode Lookups"
},
{
"description": "Please visit our <a href=\"https://www.github.com/lob\" target=\"_blank\">Github</a> for a list of our supported libraries.\n- <a href=\"https://github.com/lob/lob-typescript-sdk\" target=\"_blank\">Typescript</a>\n- <a href=\"https://github.com/lob/lob-php\" target=\"_blank\">PHP</a>\n- <a href=\"https://github.com/lob/lob-python\" target=\"_blank\">Python</a>\n- <a href=\"https://github.com/lob/lob-java\" target=\"_blank\">Java</a>\n- <a href=\"https://github.com/lob/lob-ruby/tree/main\" target=\"_blank\">Ruby</a>\n- <a href=\"https://github.com/lob/lob-dotnet\" target=\"_blank\">CSharp</a>\n- <a href=\"https://github.com/lob/lob-elixir\" target=\"_blank\">Elixir</a>\n- <a href=\"https://github.com/lob/lob-go\" target=\"_blank\">Go</a>\n- <a href=\"https://github.com/lob/lob-node\" target=\"_blank\">Node.js (legacy)</a>\n- <a href=\"https://github.com/lob/lob-java/tree/12.3.7-Legacy\" target=\"_blank\">Java (legacy)</a>\n- <a href=\"https://github.com/lob/lob-php/tree/v3-legacy\" target=\"_blank\">PHP (legacy)</a>\n- <a href=\"https://github.com/lob/lob-python/tree/legacy_v4\" target=\"_blank\">Python (Legacy)</a>\n- <a href=\"https://github.com/lob/lob-ruby/tree/legacy-v5\" target=\"_blank\">Ruby (Legacy)</a>\n\n<br><br>\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "SDKs and Tools",
"x-traitTag": true
},
{
"description": "The self mailer endpoint allows you to easily print and mail self mailers. The API provides endpoints\nfor creating self mailers, retrieving individual self mailers, canceling self mailers, and retrieving a list of self mailers.\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Self Mailers"
},
{
"description": "## HTML Templates\nYou can save commonly used HTML as templates within Lob to more easily manage them. You can reference\nyour saved templates in postcard, letter, and check requests instead of having to pass a long HTML\nstring on each request. Additionally, you can make changes to your HTML templates and update them\nindependently, without having to touch your API integration. Templates can be created, edited,\nand viewed on your <a href=\"https://dashboard.lob.com/#/templates\" target=\"_blank\">Dashboard</a>. To use a template in a postcard,\nletter, or check, see the documentation for each endpoint below. For help using templates, check out our\n<a href=\"https://help.lob.com/print-and-mail/designing-mail-creatives/dynamic-personalization#html-templates-1\" target=\"_blank\">HTML Templates Guide</a> or get started with a\n<a href=\"https://lob.com/template-gallery\" target=\"_blank\">pre-designed template from our gallery</a>. In Live mode, you can only have\nas many templates as allotted in your current\n<a href=\"https://dashboard.lob.com/#/settings/editions\" target=\"_blank\">Print & Mail Edition</a>. There is no limit in Test mode.\n\nIf you'd like to interact with templates programmatically, check out our Beta Program for API access\nto the [HTML Templates Endpoints](#tag/Templates).\n\n### Example Create Request using HTML Templates\n```bash\n curl https://api.lob.com/v1/postcards \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -d \"description=Demo Postcard job\" \\\n -d \"to=adr_78c304d54912c502\" \\\n -d \"from=adr_61a0865c8c573139\" \\\n -d \"front=tmpl_b846a20859ae11a\" \\\n -d \"back=tmpl_01b0d396a10c268\" \\\n -d \"merge_variables[name]=Harry\"\n```\n<br>\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n\n## HTML Examples\nUse a pre-designed template from our <a href=\"https://lob.com/resources/template-gallery\" target=\"_blank\">gallery</a> or follow these\nbasic <a href=\"https://github.com/lob/examples\" target=\"_blank\">guidelines</a> as starting points for creating custom Postcards,\nSelf Mailers, Letters, and Checks.\n\nPlease follow the standards used in these templates, such as:\n- For any linked assets, you must use a performant file hosting provider with no rate limits such as Amazon\nS3.\n- Use inline styles or an internal stylesheet, do not link to external stylesheets.\n- Link to images that are 300DPI and sized at the final desired size on the physical mailing. For example,\nfor a photo that is desired to be 1in x 1in on the final postcard, the image asset should be sized at 1in\nx 1in at 300DPI (which equates to 300px by 300px).\n- The sum of all linked assets should not exceed 5MB in file size.\n- Use `-webkit` prefixes for CSS properties when recommended <a href=\"http://shouldiprefix.com/\" target=\"_blank\">here</a>.\n\nBecause different browsers have varying user-agent styles, the HTML you see in your browser will not\nalways look identical to what is produced through the API. It is **strongly** recommended that you test all\nHTML requests by reviewing the final PDF files in your Test Environment, as these are the files that will be\nprinted.\n<br>\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n\n## Image Prepping\nCurrently we support the following file types for all endpoints:\n- PDF\n- PNG\n- JPEG\n\n**Templates**\n\nYou can find pre-made templates that already adhere to all of these guidelines here:\n- [Postcards](#tag/Postcards)\n- [Letters](#tag/Letters)\n- [Checks](#tag/Checks)\n- [Self Mailers](#tag/Self-Mailers)\n\n**Prepping All Images**\n\nThe following guidelines apply to image types:\n- Images should be 300 dpi or higher - PNG/JPEG files with less than 300 dpi will be rejected.\n- Your artwork should include a 1/8\" border around the final trim size. This means your final file size will be a total of 0.25\" larger than your expected printed piece (ie, a 4\"x6\" postcard should be submitted as 4.25\"x6.25\"). There is no need to include crop marks in your submitted content.\n- Include a safe zone \u2013 make sure no critical elements are within 1/8\" from the edge of the final size.\n- Do not include any additional postage marks or indicia.\n- File sizes should be no larger than 5MB.\n\n**Prepping PDFs**\n\nTo ensure that you are producing PDF's correctly please follow the guidelines [outlined in our help center here](https://help.lob.com/print-and-mail/designing-mail-creatives/creative-formatting/pdf-preflight-checklist#requirements-for-static-pdfs)\n\n**Prepping PNGs/JPEGs**\n\nTo ensure that you are producing PNG's/JPEG's correctly please follow the guidelines below:\n\n- Minimum 300 dpi. The dpi is calculated as (width of image in pixels) / (width of product in inches) and (length of image in pixels) / (length of product in inches). For Example: 1275px x 1875px image used to create a 4.25\" x 6.25\" postcard has a dpi of 300.\n- Submitted images must have the same length to width ratio as the chosen product. Images will not be cropped or stretched by the API.\n<br>\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n\n## Standard PDF Fonts\nIdeally, all fonts in provided PDFs should be embedded. Embedding a font in a PDF ensures that the final\nprinted product will look as it was designed. Fonts can vary greatly in size and shape, even within the\nsame family. If the exact font that was used to design the artwork is not used to print, the look and\nplacement of the text is not guaranteed to be the same.\n\nIn general, requests that provide PDFs with un-embedded fonts will be rejected. We make an exception for\n\"standard fonts\", a set of fonts that we have identified as being common. PDFs that contain un-embedded\nfonts that are found in the list, and match the accepted <a href=\"https://en.wikipedia.org/wiki/Category:Font_formats\" target=\"_blank\">font type</a>\nwill be accepted. Otherwise, the request will be rejected.\n\nFont embedding is an essential part of standard PDF workflows. Fonts should be embedded automatically by\nPDF editing software that are compliant with PDF standards.\n\nPlease note, only standard base14 fonts can be Type 1.\n\n<table>\n <tr>\n <th style=\"white-space: nowrap\">FONT NAME</th>\n <th style=\"white-space: nowrap\">TYPES</th>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>Arial</code></td>\n <td style=\"white-space: nowrap\">TrueType, CID TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>Arial,Bold</code></td>\n <td style=\"white-space: nowrap\">TrueType, CID TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>Arial,BoldItalic</code></td>\n <td style=\"white-space: nowrap\">TrueType, CID TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>Arial,Italic</code></td>\n <td style=\"white-space: nowrap\">TrueType, CID TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>ArialMT</code></td>\n <td style=\"white-space: nowrap\">TrueType, CID TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>Arial-BoldMT</code></td>\n <td style=\"white-space: nowrap\">TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>Arial-BoldItalicMT</code></td>\n <td style=\"white-space: nowrap\">TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>Arial-ItalicMT</code></td>\n <td style=\"white-space: nowrap\">TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>ArialNarrow</code></td>\n <td style=\"white-space: nowrap\">TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>ArialNarrow-Bold</code></td>\n <td style=\"white-space: nowrap\">TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>Calibri</code></td>\n <td style=\"white-space: nowrap\">TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>Calibri-Bold</code></td>\n <td style=\"white-space: nowrap\">TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>Calibri-Italic</code></td>\n <td style=\"white-space: nowrap\">TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>Courier</code></td>\n <td style=\"white-space: nowrap\">Type 1</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>Courier-Oblique</code></td>\n <td style=\"white-space: nowrap\">Type 1</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>Courier-Bold</code></td>\n <td style=\"white-space: nowrap\">Type 1</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>Courier-BoldOblique</code></td>\n <td style=\"white-space: nowrap\">Type 1</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>CourierNewPSMT</code></td>\n <td style=\"white-space: nowrap\">TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>CourierNewPS-ItalicMT</code></td>\n <td style=\"white-space: nowrap\">TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>CourierNewPS-BoldMT</code></td>\n <td style=\"white-space: nowrap\">TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>Helvetica</code></td>\n <td style=\"white-space: nowrap\">Type 1</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>Helvetica-Bold</code></td>\n <td style=\"white-space: nowrap\">Type 1</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>Helvetica-BoldOblique</code></td>\n <td style=\"white-space: nowrap\">Type 1</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>Helvetica-Oblique</code></td>\n <td style=\"white-space: nowrap\">Type 1</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>LucidaConsole</code></td>\n <td style=\"white-space: nowrap\">TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>MsSansSerif</code></td>\n <td style=\"white-space: nowrap\">TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>MsSansSerif,Bold</code></td>\n <td style=\"white-space: nowrap\">TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>Symbol</code></td>\n <td style=\"white-space: nowrap\">Type 1, TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>Tahoma</code></td>\n <td style=\"white-space: nowrap\">TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>Tahoma-Bold</code></td>\n <td style=\"white-space: nowrap\">TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>Times-Bold</code></td>\n <td style=\"white-space: nowrap\">Type 1</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>Times-BoldItalic</code></td>\n <td style=\"white-space: nowrap\">Type 1</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>Times-Italic</code></td>\n <td style=\"white-space: nowrap\">Type 1</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>Times-Roman</code></td>\n <td style=\"white-space: nowrap\">Type 1</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>TimesNewRomanPS-BoldItalicMT</code></td>\n <td style=\"white-space: nowrap\">TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>TimesNewRomanPS-BoldMT</code></td>\n <td style=\"white-space: nowrap\">TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>TimesNewRomanPS-ItalicMT</code></td>\n <td style=\"white-space: nowrap\">TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>TimesNewRomanPSMT</code></td>\n <td style=\"white-space: nowrap\">TrueType, CID TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>TimesNewRomanPSMT,Bold</code></td>\n <td style=\"white-space: nowrap\">TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>Verdana</code></td>\n <td style=\"white-space: nowrap\">TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>Verdana-Bold</code></td>\n <td style=\"white-space: nowrap\">TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>Verdana,Italic</code></td>\n <td style=\"white-space: nowrap\">TrueType</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>ZapfDingbats</code></td>\n <td style=\"white-space: nowrap\">Type 1</td>\n </tr>\n</table>\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Template Design",
"x-traitTag": true
},
{
"description": "These API endpoints allow you to create, retrieve, update and delete versions of reusable HTML templates for use with the Print & Mail API.\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Template Versions"
},
{
"description": "These API endpoints allow you to create, retrieve, update and delete reusable HTML templates for use with the Print & Mail API.\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Templates"
},
{
"description": "To make the API as explorable as possible, accounts have test and live\nenvironment API keys. You're not charged any fees in the test environment,\nso we encourage you to use it to try out services, perform quality\nassurance, and run automated testing. Objects\u2015addresses, letters, checks,\netc\u2015in one environment cannot be manipulated by objects in the other.\n\nIn general, a payment method (either credit card or ACH account) must be\nadded to your account to make live API requests. However, a payment method\nis not required for the first 300 live requests per month to the\n`/v1/us_verifications` endpoint. After the first 300 requests, you will\nbegin receiving errors with status code `403`.\n\nRequests made in the test environment always validate request arguments,\nsimulate live environment behavior, and enforce rate limits. _They never\nprint, mail nor, for verification services, verify addresses._ The US &\nInternational verification services trigger behavior with specific\nargument values, and, if you plan on using those, we recommend reading\n[US Verification Test Environment](#tag/US-Verifications-Test-Environment)\nand [Intl Verification Test Environment](#tag/Intl-Verifications-Test-Environment).\n\nTo switch between environments, use the appropriate key for that\nenvironment when performing a request. You can find each environment's API\nkey in your dashboard under Settings; test API keys are always prefixed\nwith `test_` and production API keys with `live_`.\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Test and Live Environments",
"x-traitTag": true
},
{
"description": "As mailpieces travel through the mail stream, USPS scans their unique barcodes, and Lob processes these mail scans to generate tracking events.\n\n<h3>Certified Tracking Event Details</h3>\n\nLetters sent with USPS Certified Mail are fully tracked by USPS, and\ntherefore their [tracking events](#operation/tracking_event) have an\nadditional `details` object with more detailed information about the\ntracking event. The following table shows the potential values for\nthe fields in the `details` object mapped to the tracking event `name`.\n\n<table>\n <tr>\n <th style=\"white-space: nowrap\">NAME</th>\n <th style=\"white-space: nowrap\">EVENT</th>\n <th style=\"white-space: nowrap\">DESCRIPTION</th>\n <th style=\"white-space: nowrap\">ACTION REQUIRED</th>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Mailed</td>\n <td style=\"white-space: nowrap\"><code>package_accepted</code></td>\n <td>Package has been accepted into the carrier network for delivery.</td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">In Transit</td>\n <td style=\"white-space: nowrap\"><code>package_arrived</code></td>\n <td>Package has arrived at an intermediate location in the carrier network.</td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">In Transit</td>\n <td style=\"white-space: nowrap\"><code>package_departed</code></td>\n <td>Package has departed from an intermediate location in the carrier network.</td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">In Transit</td>\n <td style=\"white-space: nowrap\"><code>package_processing</code></td>\n <td>Package is processing at an intermediate location in the carrier network.</td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">In Transit</td>\n <td style=\"white-space: nowrap\"><code>package_processed</code></td>\n <td>Package has been processed at an intermediate location.</td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">In Local Area</td>\n <td style=\"white-space: nowrap\"><code>package_in_local_area</code></td>\n <td>Package is at a location near the end destination.</td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Processed For Delivery</td>\n <td style=\"white-space: nowrap\"><code>delivery_scheduled</code></td>\n <td>Package is scheduled for delivery.</td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Processed For Delivery</td>\n <td style=\"white-space: nowrap\"><code>out_for_delivery</code></td>\n <td>Package is out for delivery.</td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Pickup Available</td>\n <td style=\"white-space: nowrap\"><code>pickup_available</code></td>\n <td>Package is available for pickup at carrier location.</td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Delivered</td>\n <td style=\"white-space: nowrap\"><code>delivered</code></td>\n <td>Package has been delivered.</td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Re-Routed</td>\n <td style=\"white-space: nowrap\"><code>package_forwarded</code></td>\n <td>Package has been forwarded.</td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Returned to Sender</td>\n <td style=\"white-space: nowrap\"><code>returned_to_sender</code></td>\n <td>Package is to be returned to sender.</td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Issue</td>\n <td style=\"white-space: nowrap\"><code>address_issue</code></td>\n <td>Address information is incorrect. Contact carrier to ensure delivery.</td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Issue</td>\n <td style=\"white-space: nowrap\"><code>contact_carrier</code></td>\n <td>Contact the carrier for more information.</td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Issue</td>\n <td style=\"white-space: nowrap\"><code>delayed</code></td>\n <td>Delivery of package is delayed.</td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Issue</td>\n <td style=\"white-space: nowrap\"><code>delivery_attempted</code></td>\n <td>Delivery of package has been attempted. Contact carrier to ensure delivery.</td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Issue</td>\n <td style=\"white-space: nowrap\"><code>delivery_rescheduled</code></td>\n <td>Delivery of package has been rescheduled.</td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Issue</td>\n <td style=\"white-space: nowrap\"><code>location_inaccessible</code></td>\n <td>Delivery location inaccessible to carrier. Contact carrier to ensure delivery.</td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Issue</td>\n <td style=\"white-space: nowrap\"><code>notice_left</code></td>\n <td>Carrier left notice during attempted delivery. Follow carrier instructions on notice.</td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Issue</td>\n <td style=\"white-space: nowrap\"><code>package_damaged</code></td>\n <td>Package has been damaged. Contact carrier for more details.</td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Issue</td>\n <td style=\"white-space: nowrap\"><code>package_disposed</code></td>\n <td>Package has been disposed.</td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Issue</td>\n <td style=\"white-space: nowrap\"><code>package_held</code></td>\n <td>Package held at carrier location. Contact carrier for more details.</td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Issue</td>\n <td style=\"white-space: nowrap\"><code>package_lost</code></td>\n <td>Package has been lost. Contact carrier for more details.</td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Issue</td>\n <td style=\"white-space: nowrap\"><code>package_unclaimed</code></td>\n <td>Package is unclaimed.</td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Issue</td>\n <td style=\"white-space: nowrap\"><code>package_undeliverable</code></td>\n <td>Package is not able to be delivered.</td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Issue</td>\n <td style=\"white-space: nowrap\"><code>reschedule_delivery</code></td>\n <td>Contact carrier to reschedule delivery.</td>\n <td style=\"white-space: nowrap\"><code>true</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Issue</td>\n <td style=\"white-space: nowrap\"><code>other</code></td>\n <td>Unrecognized carrier status.</td>\n <td style=\"white-space: nowrap\"><code>false</code></td>\n </tr>\n</table>\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Tracking Events"
},
{
"description": "The uploads endpoint allows you to upload audience files that are then associated with a given campaign.\nAt this time, only CSV files are allowed. The API provides endpoints for creating uploads, uploading audience files,\nand marking uploaded files as ready for processing. The API also provides endpoints for downloading files that\ndescribe the results, both successful and not, of the processing.\n",
"name": "Uploads"
},
{
"description": "Lob's URL shortener allows you to generate unique short links, either with Lob's own domain or your own custom domains. Each custom link enables Lob to track mail individually and provide customers the relevant tracking data in their dashboard.\n\nWebhooks can be used to integrate Lob's URL Shortener scans into your omni channel marketing stratergy. See the <a href=\"#tag/Webhooks\">Webhooks</a> section of our documentation to learn how to enable the `letter.viewed`, `postcard.viewed` and `self_mailer.viewed` event notifications for your mail pieces.\n\nFurthermore, you can use our Retrieve endpoints to track the impact and engagement rate of links created. \n\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "URL Shortener"
},
{
"description": "Given partial address information, this endpoint returns up to 10 address suggestions. <br> <div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n## Autocompletion Test Env\nYour test API key does not autocomplete US addresses and is used to simulate behavior. With your test API key, requests with specific values for `address_prefix` return predetermined values. When `address_prefix` is set to:\n- `0 suggestions` - Returns no suggestions - `[PRIMARY NUMBER] s[uggestion]` - Returns a maximum of ten predefined suggested addresses.\n `[PRIMARY NUMBER]` does not have to be a valid primary number when sending a test request.\n Each additional letter in `suggestion` reduces the number of suggestions by one (e.g.\n `1 su` returns 9 suggested addresses). `[PRIMARY NUMBER]` does not affect the number of\n suggestions returned.\n\nCity and state filters work as expected and filter the list of predetermined suggested addresses.\nSee the `test` request & response examples under [Autocomplete Examples](#operation/autocompletion) within the \"Autocomplete a partial address\" section in US Autocompletions. <div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "US Autocompletions"
},
{
"description": "These are detailed definitions for various fields in the [US verification object](#operation/us_verification).\n\n<h3>ZIP Code Types - <code>components[zip_code_type]</code></h3>\n\n<table>\n <tbody>\n <tr>\n <td style=\"white-space: nowrap\"><code>standard</code></td>\n <td>The default ZIP code type. Used when none of the other types apply.</td>\n </tr>\n <tr>\n <td><code>po_box</code></td>\n <td>The ZIP code contains only PO Boxes.</td>\n </tr>\n <tr>\n <td><code>unique</code></td>\n <td>The ZIP code is uniquely assigned to a single organization (such as a government agency) that receives a large volume of mail.</td>\n </tr>\n <tr>\n <td><code>military</code></td>\n <td>The ZIP code contains military addresses.</td>\n </tr>\n <tr>\n <td><i>empty string</i></td>\n <td>A match could not be made with the provided inputs.</td>\n </tr>\n </tbody>\n</table>\n\n<h3>Record Types - <code>components[record_type]</code></h3>\n\n<table>\n <tbody>\n <tr>\n <td><code>street</code></td>\n <td>The default address type.</td>\n </tr>\n <tr>\n <td><code>highrise</code></td>\n <td>The address is a commercial building, apartment complex, highrise, etc.</td>\n </tr>\n <tr>\n <td><code>firm</code></td>\n <td>The address is of an organizational entity which receives a minimum number of mailpieces per day.</td>\n </tr>\n <tr>\n <td><code>po_box</code></td>\n <td>The address is a PO Box.</td>\n </tr>\n <tr>\n <td><code>rural_route</code></td>\n <td>The address exists on a Rural Route. This is an older system of mail delivery which is still used in some parts of the country.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>general_delivery</code></td>\n <td>The address is part of the USPS General Delivery service, which allows individuals without permanent addresses to receive mail.</td>\n </tr>\n <tr>\n <td><i>empty string</i></td>\n <td>A match could not be made with the provided inputs.</td>\n </tr>\n </tbody>\n</table>\n\n<h3>Carrier Route Types - <code>components[carrier_route_type]</code></h3>\n\n<table class=\"table-docs table-docs-code\">\n <tbody>\n <tr>\n <td><code>city_delivery</code></td>\n <td>The default carrier route type. Used when none of the other types apply.</td>\n </tr>\n <tr>\n <td><code>rural_route</code></td>\n <td>The carrier route is a Rural Route. This is an older system of mail delivery which is still used in some parts of the country.</td>\n </tr>\n <tr>\n <td><code>highway_contract</code></td>\n <td>The carrier route is a Highway Contract Route. This is an older system of mail delivery which is still used in some parts of the country.</td>\n </tr>\n <tr>\n <td><code>po_box</code></td>\n <td>The carrier route consists of PO Boxes.</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\"><code>general_delivery</code></td>\n <td>The carrier route is part of the USPS General Delivery service, which allows individuals without permanent addresses to receive mail.</td>\n </tr>\n <tr>\n <td><i>empty string</i></td>\n <td>A match could not be made with the provided inputs.</td>\n </tr>\n </tbody>\n</table>\n\n<h3>DPV Footnotes - <code>deliverability_analysis[dpv_footnotes]</code></h3>\n\n<table class=\"table-docs table-docs-code\">\n <tbody>\n <tr>\n <td style=\"white-space: nowrap\"><code>AA</code></td>\n <td>Some parts of the address (such as the street and ZIP code) are valid.</td>\n </tr>\n <tr>\n <td><code>A1</code></td>\n <td>The address is invalid based on given inputs.</td>\n </tr>\n <tr>\n <td><code>BB</code></td>\n <td>The address is deliverable.</td>\n </tr>\n <tr>\n <td><code>CC</code></td>\n <td>The address is deliverable by removing the provided secondary unit designator.</td>\n </tr>\n <tr>\n <td><code>TA</code></td>\n <td>The address is deliverable by dropping a trailing alphabet from the primary number.</td>\n </tr>\n <tr>\n <td><code>IA</code></td>\n <td>The address is an <a href=\"https://www.usps.com/business/informed-address.htm\" target=\"_blank\">Informed Address</a>. The recipient and the street address is replaced with a special code provided by the USPS.</td>\n </tr>\n <tr>\n <td><code>N1</code></td>\n <td>The address is deliverable but is missing a secondary information (apartment, unit, etc).</td>\n </tr>\n <tr>\n <td><code>F1</code></td>\n <td>The address is a deliverable military address.</td>\n </tr>\n <tr>\n <td><code>G1</code></td>\n <td>The address is a deliverable General Delivery address. General Delivery is a USPS service which allows individuals without permanent addresses to receive mail.</td>\n </tr>\n <tr>\n <td><code>U1</code></td>\n <td>The address is a deliverable unique address. A unique ZIP code is assigned to a single organization (such as a government agency) that receives a large volume of mail.</td>\n </tr>\n <tr>\n <td><code>C1</code></td>\n <td>The primary number was confirmed whereas the secondary number is unconfirmed and required to be deliverable.</td>\n </tr>\n <tr>\n <td><code>M1</code></td>\n <td>The primary number is missing.</td>\n </tr>\n <tr>\n <td><code>M3</code></td>\n <td>The primary number is invalid.</td>\n </tr>\n <tr>\n <td><code>P1</code></td>\n <td>PO Box, Rural Route, or Highway Contract box number is missing.</td>\n </tr>\n <tr>\n <td><code>P3</code></td>\n <td>PO Box, Rural Route, or Highway Contract box number is invalid.</td>\n </tr>\n <tr>\n <td><code>PB</code></td>\n <td>The address is identified as PO Box street address.</td>\n </tr>\n <tr>\n <td><code>R1</code></td>\n <td>The address matched to a <a href=\"https://en.wikipedia.org/wiki/Commercial_mail_receiving_agency\" target=\"_blank\">CMRA</a> and private mailbox information is not present.</td>\n </tr>\n <tr>\n <td><code>R7</code></td>\n <td>The address matched to a Phantom Carrier Route (<code>carrier_route</code> of <code>R777</code>), which corresponds to physical addresses that are not eligible for delivery.</td>\n </tr>\n <tr>\n <td><code>RR</code></td>\n <td>The address matched to a <a href=\"https://en.wikipedia.org/wiki/Commercial_mail_receiving_agency\" target=\"_blank\">CMRA</a> and private mailbox information is present.</td>\n </tr>\n </tbody>\n</table>\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "US Verification Types",
"x-traitTag": true
},
{
"description": "Validate, automatically correct, and standardize the addresses in your\naddress book based on USPS's <a href=\"https://postalpro.usps.com/certifications/cass\" target=\"_blank\">Coding Accuracy Support System (CASS)</a>.\n<br>\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n\n## US Verifications Test Env\n\nWhen verifying US addresses, you'll likely want to test against a wide array of addresses to\nensure you're handling responses correctly. With your test API key, requests that use specific\nvalues for `address` or `primary_line` and (if using `primary_line`) an arbitrary five digit\nnumber for `zip_code` (e.g. \"11111\") let you explore the responses to many types of addresses:\n\n<table>\n <tr>\n <th style=\"white-space: nowrap\">ADDRESS TYPE FOR SAMPLE RESPONSE</th>\n <th style=\"white-space: nowrap\">DELIVERABILITY</th>\n <th style=\"white-space: nowrap\">SET <code>primary_line</code> OR <code>address</code> TO</th>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Commercial highrise</td>\n <td style=\"white-space: nowrap\"><code>deliverable</code></td>\n <td style=\"white-space: nowrap\"><code>commercial highrise</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Residential highrise</td>\n <td style=\"white-space: nowrap\"><code>deliverable</code></td>\n <td style=\"white-space: nowrap\"><code>residential highrise</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Residential house</td>\n <td style=\"white-space: nowrap\"><code>deliverable</code></td>\n <td style=\"white-space: nowrap\"><code>residential house</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">PO Box</td>\n <td style=\"white-space: nowrap\"><code>deliverable</code></td>\n <td style=\"white-space: nowrap\"><code>po box</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Rural route</td>\n <td style=\"white-space: nowrap\"><code>deliverable</code></td>\n <td style=\"white-space: nowrap\"><code>rural route</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Puerty Rico address w/ urbanization</td>\n <td style=\"white-space: nowrap\"><code>deliverable</code></td>\n <td style=\"white-space: nowrap\"><code>puerto rico</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Military address</td>\n <td style=\"white-space: nowrap\"><code>deliverable</code></td>\n <td style=\"white-space: nowrap\"><code>military</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Department of state</td>\n <td style=\"white-space: nowrap\"><code>deliverable</code></td>\n <td style=\"white-space: nowrap\"><code>department of state</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Generic deliverable</td>\n <td style=\"white-space: nowrap\"><code>deliverable</code></td>\n <td style=\"white-space: nowrap\"><code>deliverable</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Missing a suite number</td>\n <td style=\"white-space: nowrap\"><code>deliverable_missing_unit</code></td>\n <td style=\"white-space: nowrap\"><code>missing unit</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Suite number doesn't exist</td>\n <td style=\"white-space: nowrap\"><code>deliverable_incorrect_unit</code></td>\n <td style=\"white-space: nowrap\"><code>incorrect unit</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Residential house with unnecessary suite number</td>\n <td style=\"white-space: nowrap\"><code>deliverable_unnecessary_unit</code></td>\n <td style=\"white-space: nowrap\"><code>unnecessary unit</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Undeliverable and block matched</td>\n <td style=\"white-space: nowrap\"><code>undeliverable</code></td>\n <td style=\"white-space: nowrap\"><code>undeliverable block match</code></td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap\">Undeliverable and no block matched</td>\n <td style=\"white-space: nowrap\"><code>undeliverable</code></td>\n <td style=\"white-space: nowrap\"><code>undeliverable no match</code></td>\n </tr>\n</table>\n\nSee the `test` request & response examples under [US Verification Examples](#operation/us_verification) within the\n\"Verify a US or US territory address\" section in US Verifications.\n\nYou can rely on the response from these examples generally matching the response you'd see in the live environment with an\naddress of that type (excluding the `recipient` field).\n\nThe test API key does not perform any verification, automatic correction, or standardization for addresses. If you wish to\ntry these features out, use our <a href=\"https://lob.com/address-verification\" target=\"_blank\">live demo</a> or the free plan (see <a href=\"https://lob.com/pricing/address-verification\" target=\"_blank\">our pricing</a> for details).\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "US Verifications"
},
{
"description": "### API Versioning\n\nWhen backwards-incompatible changes are made to the API, a new dated version\nis released. The latest available version of the API is version **2020-02-11**. \nAll versions prior to, and inclusive of, 2019-02-11 have been sunsetted. You can\nview your version and upgrade to the latest version in your\n<a href=\"https://dashboard.lob.com/settings/api-keys\" target=\"_blank\">Dashboard Settings</a>. You will\nonly need to specify a version if you would like to test a newer version of\nthe API without doing a full upgrade. The API will return an error if a\nversion older than your current one is passed in.\n\n### Example Request\n\n```bash\n curl https://api.lob.com/v1/addresses \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -H \"Lob-Version: 2020-02-11\"\n```\n\n### Specification Versioning\nYou might be wondering why our API and specification use different versioning schemes.\nLob's API predates our specification and follows the <a href=\"https://stripe.com/blog/api-versioning\" target=\"_blank\">Stripe versioning</a>\napproach. This works well to manage backwards-incompatible changes to our API.\n\nFor our API specification (used to create this documentation), we've chosen <a href=\"https://semver.org/\" target=\"_blank\">semantic\nversioning</a>. This versioning reflects the backward-compatible\nchanges that do not require a versioning of Lob's API.\n\nLob's API specification will be used to generate artifacts like documentation, client SDKs,\nand other developer tooling. Semantic versioning of our specification will inform how we\nversion those artifacts like SDKs. It is helpful to know the version of a specification\nused to produce an artifact in order reference the specification release notes.\n\n\n### Changelog\n We are in the process of renovating our changelog, and will link it here shortly.\n",
"name": "Versioning and Changelog",
"x-traitTag": true
},
{
"description": "Webhooks are an easy way to get notifications on events happening asynchronously\nwithin Lob's architecture. For example, when a postcard gets a \"Processed For\nDelivery\" tracking event, an event object of type `postcard.processed_for_delivery`\nwill be created. If you are subscribed to that event type in that Environment\n(Test vs. Live), Lob will send that event to any URLs you've specified via an\nHTTP POST request. In Live mode, you can only have as many webhooks as allotted\nin your current <a href=\"https://dashboard.lob.com/#/settings/editions\" target=\"_blank\">Print & Mail Edition</a>.\nThere is no limit in Test mode.\nYou can view and create <a href=\"https://dashboard.lob.com/#/webhooks\" target=\"_blank\">webhooks</a> on the\nLob Dashboard, as well as view your <a href=\"https://dashboard.lob.com/#/events\" target=\"_blank\">events</a>.\nSee our <a href=\"https://help.lob.com/print-and-mail/getting-data-and-results/using-webhooks\" target=\"_blank\">Webhooks Integration Guide</a> for more\ndetails on how to integrate. Please see the full list of event types available for\nsubscription here.\n<div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Webhooks",
"x-traitTag": true
},
{
"description": "Find a list of cities, states and associated information about a US ZIP code. <div class=\"back-to-top\" ><a href=\"#\" onclick=\"toTopLink()\">back to top</a></div>\n",
"name": "Zip Lookups"
}
],
"x-tagGroups": [
{
"name": "Overview",
"tags": [
"Introduction",
"Authentication",
"Getting Started",
"SDKs and Tools"
]
},
{
"name": "Address Book",
"tags": [
"Addresses",
"National Change of Address"
]
},
{
"name": "Print and Mail API",
"tags": [
"Postcards",
"Self Mailers",
"Letters",
"Checks",
"Snap Packs",
"Booklets",
"Bank Accounts",
"Templates",
"Resource Proofs",
"Template Versions",
"Template Design",
"Manage Mail"
]
},
{
"name": "Campaigns API (BETA)",
"tags": [
"Campaigns",
"Creatives",
"Uploads"
]
},
{
"name": "Informed Delivery Campaign API",
"tags": [
"Informed Delivery Campaign"
]
},
{
"name": "Address Verification API",
"tags": [
"US Verifications",
"US Verification Types",
"US Autocompletions",
"Reverse Geocode Lookups",
"Zip Lookups",
"Identity Validation",
"Intl Verifications"
]
},
{
"name": "Webhooks",
"tags": [
"Webhooks",
"Events",
"Tracking Events"
]
},
{
"name": "Special Features",
"tags": [
"Billing Groups",
"Buckslips",
"Buckslip Orders",
"Cards",
"Card Orders",
"QR Codes",
"URL Shortener"
]
},
{
"name": "Appendix",
"tags": [
"Beta Program",
"Errors",
"Rate Limiting",
"Requests and Responses",
"Test and Live Environments",
"Versioning and Changelog"
]
}
],
"x-webhooks": {
"events": {
"post": {
"description": "Information about an event",
"operationId": "event",
"responses": {
"200": {
"$ref": "#/components/responses/events"
}
},
"summary": "Events",
"tags": [
"Events"
]
}
},
"tracking_events": {
"post": {
"description": "Information about tracking events",
"operationId": "tracking_event",
"responses": {
"200": {
"$ref": "#/components/responses/tracking_events"
}
},
"summary": "Tracking Events",
"tags": [
"Tracking Events"
]
}
}
}
}