Lob Ltr_id API
The Ltr_id API from Lob — 1 operation(s) for ltr_id.
The Ltr_id API from Lob — 1 operation(s) for ltr_id.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/lob-ltr-id-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Lob Ltr ID API
version: 1.20.2
description: Experience direct mail like never before, with unmatched personalization and scalability all in one intuitive platform.
license:
name: MIT
url: https://mit-license.org/
contact:
name: Lob Developer Experience
url: https://support.lob.com/
email: lob-openapi@lob.com
termsOfService: https://www.lob.com/legal
servers:
- url: https://api.lob.com/v1
description: production
security:
- basicAuth: []
tags:
- name: Ltr_id
paths:
/letters/{ltr_id}:
parameters:
- in: path
name: ltr_id
description: id of the letter
required: true
schema:
$ref: '#/components/schemas/ltr_id'
get:
operationId: letter_retrieve
summary: Retrieve
description: Retrieves the details of an existing letter. You need only supply the unique letter identifier that was returned upon letter creation.
tags:
- Ltr_id
responses:
'200':
description: Returns a letter object
content:
application/json:
schema:
$ref: '#/components/schemas/letter'
example:
id: ltr_4868c3b754655f90
description: Demo Letter
metadata: {}
to:
id: adr_d3489cd64c791ab5
description: null
name: HARRY ZHANG
company: null
phone: null
email: null
address_line1: 210 KING ST STE 6100
address_line2: null
address_city: SAN FRANCISCO
address_state: CA
address_zip: 94107-1741
address_country: UNITED STATES
metadata: {}
date_created: '2017-09-05T15:54:53.264Z'
date_modified: '2017-09-05T15:54:53.264Z'
deleted: true
object: address
from:
id: adr_b8fb5acf3a2b55db
description: null
name: LEORE AVIDAR
company: null
phone: null
email: null
address_line1: 210 KING ST STE 6100
address_line2: null
address_city: SAN FRANCISCO
address_state: CA
address_zip: 94107-1741
address_country: UNITED STATES
metadata: {}
date_created: '2017-09-05T15:54:53.264Z'
date_modified: '2017-09-05T15:54:53.264Z'
deleted: true
object: address
color: true
double_sided: true
address_placement: top_first_page
return_envelope: false
perforated_page: null
custom_envelope: null
extra_service: null
mail_type: usps_first_class
url: https://lob-assets.com/letters/ltr_4868c3b754655f90.pdf?expires=1540372221&signature=8r94fse8uam7wGWmW5baxXulU88X2CA
carrier: USPS
tracking_number: null
tracking_events: []
thumbnails:
- small: https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_small_1.png?expires=1540372221&signature=a5fRBJ22ZA78Vgpg34M9UfmHWTS3eha
medium: https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_medium_1.png?expires=1540372221&signature=bAzL8sv935PY09FWSkpDpWKkyvGSWYF
large: https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_large_1.png?expires=1540372221&signature=gsKvxXgrm4v4iZD3bOibK7jApNkEMdW
merge_variables:
name: Harry
expected_delivery_date: '2017-09-12'
date_created: '2017-09-05T15:54:53.346Z'
date_modified: '2017-09-05T15:54:53.346Z'
send_date: '2017-09-05T15:54:53.346Z'
cards:
- id: card_c51ae96f5cebf3e
account_id: fa9ea650fc7b31a89f92
description: null
url: https://lob-assets.com/cards/card_c51ae96f5cebf3e.pdf?version=v1&expires=1636910992&signature=mnsDH2DAxdkN9VibdlLMxJC86sME5WYDqkNtmvGwdNsAaUWfbnv0rJhJ1mR8Ol4uxQq61j5wYZ0r3s-lBkQfDA
size: 2.125x3.375
auto_reorder: false
reorder_quantity: null
raw_url: https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw
front_original_url: https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw
back_original_url: https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw
thumbnails:
- small: https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_small_1.png?version=v1&expires=1636910992&signature=mrv8JDvpZK4I8WUGH0tPdtK-My5oes0Ltj_gL7BDw96SpCTTeZFHkz81SzclyFP9dQRtlsvAsjcuGcTBvCvOCg
medium: https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_medium_1.png?version=v1&expires=1636910992&signature=VgL_2Ckm_kxKiWGgWtdNoy9HHOn8dGYSVOn7UqyCbwdbVlUtx28TRN4Bo8Iru3n0keKp9He0YhKT1ILotznMDA
large: https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_large_1.png?version=v1&expires=1636910992&signature=FKSzymA13j-CQ0uk20cGHZTzT3vimzNBYrgp-xifLFg4mMdo1BZALR5O0aF_jVhsX614hKP35ONdYl47TQxXAw
- small: https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_small_2.png?version=v1&expires=1636910992&signature=IWsmPa_ULlv2yyqjX564d_YfHHY_M7i9YxDnw-WXDr2jtOFcArmRZQbnHeE9g_rYxnddJbgosuv8-c2utiu7Cg
medium: https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_medium_2.png?version=v1&expires=1636910992&signature=zxK7VKGiTvz5Ywrkaydd0v3GcYf58R7A08J4tNfI7-aiNODDcTF3l0MqY13n9Pyc8RXSdD0XVBY-OpbA1VM-Ag
large: https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_large_2.png?version=v1&expires=1636910992&signature=r0OFUhh315ZwN0raMZdIwJd2oCIEYsz0BABaMxIuO1PKTD0ckGWrhcGdzk2dlWQ6vSvp0CUQ5k1RXGqkIIqkDw
available_quantity: 10000
pending_quantity: 0
countries: null
status: rendered
mode: test
orientation: horizontal
threshold_amount: 0
date_created: '2017-08-05T15:54:53.346Z'
date_modified: '2017-08-05T15:54:53.346Z'
object: card
use_type: marketing
fsc: false
object: letter
default:
$ref: '#/components/responses/mailpiece_error'
x-codeSamples:
- lang: Shell
source: "curl https://api.lob.com/v1/letters/ltr_4868c3b754655f90 \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
label: CURL
- 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: TYPESCRIPT
- lang: Javascript
source: "Lob.letters.retrieve('ltr_4868c3b754655f90', function (err, res) {\n console.log(err, res);\n});\n"
label: NODE
- lang: Ruby
source: "letterApi = LettersApi.new(config)\n\nbegin\n retrievedLetter = letterApi.get(\"ltr_4868c3b754655f90\")\nrescue => err\n p err.message\nend\n"
label: RUBY
- 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"
label: PYTHON
- 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"
- 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: JAVA
- lang: Elixir
source: 'Lob.Letter.find("ltr_4868c3b754655f90")
'
label: ELIXIR
- 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: CSHARP
- 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"
label: GO
delete:
operationId: letter_cancel
summary: Cancel
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.
tags:
- Ltr_id
responses:
'200':
$ref: '#/components/responses/letter_deleted'
default:
$ref: '#/components/responses/mailpiece_error'
x-codeSamples:
- lang: Shell
source: "curl -X DELETE https://api.lob.com/v1/letters/ltr_4868c3b754655f90 \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
label: CURL
- 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: TYPESCRIPT
- lang: Javascript
source: "Lob.letters.cancel('ltr_4868c3b754655f90', function (err, res) {\n console.log(err, res);\n});\n"
label: NODE
- lang: Ruby
source: "letterApi = LettersApi.new(config)\n\nbegin\n deletedLetter = letterApi.cancel(\"ltr_4868c3b754655f90\")\nrescue => err\n p err.message\nend\n"
label: RUBY
- 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"
label: PYTHON
- 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"
- 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: JAVA
- lang: Elixir
source: 'Lob.Letter.destroy("ltr_4868c3b754655f90")
'
label: ELIXIR
- 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: CSHARP
- 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"
label: GO
components:
schemas:
expected_delivery_date:
type: string
description: A date in YYYY-MM-DD format of the mailpiece's expected delivery date based on its `send_date`.
format: date
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).
type:
- string
- 'null'
enum:
- marketing
- operational
- null
address_editable_us:
allOf:
- $ref: '#/components/schemas/address_fields_us'
- type: object
anyOf:
- title: address obj with `name` defined
required:
- name
- title: address obj with `company` defined
required:
- company
properties:
description:
$ref: '#/components/schemas/resource_description'
name:
type:
- string
- 'null'
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.
'
maxLength: 40
company:
$ref: '#/components/schemas/company'
phone:
type:
- string
- 'null'
description: Must be no longer than 40 characters.
maxLength: 40
email:
type:
- string
- 'null'
description: Must be no longer than 100 characters.
maxLength: 100
address_country:
type: string
enum:
- US
default: US
metadata:
$ref: '#/components/schemas/metadata'
buckslip:
allOf:
- $ref: '#/components/schemas/lob_base'
- $ref: '#/components/schemas/buckslip_base'
- required:
- description
- type: object
required:
- id
- auto_reorder
- reorder_quantity
- threshold_amount
- url
- raw_url
- front_original_url
- back_original_url
- thumbnails
- available_quantity
- allocated_quantity
- onhand_quantity
- pending_quantity
- projected_quantity
- buckslip_orders
- stock
- weight
- finish
- status
- object
properties:
id:
$ref: '#/components/schemas/buckslip_id'
auto_reorder:
description: True if the buckslips should be auto-reordered.
type: boolean
default: false
reorder_quantity:
description: The number of buckslips to be reordered.
type:
- integer
- 'null'
threshold_amount:
description: The threshold amount of the buckslip
type: integer
default: 0
url:
description: The signed link for the buckslip.
maxLength: 2083
minLength: 1
type: string
format: uri
raw_url:
description: The raw URL of the buckslip.
maxLength: 2083
minLength: 1
type: string
format: uri
front_original_url:
description: The original URL of the front template.
maxLength: 2083
minLength: 1
type: string
format: uri
back_original_url:
description: The original URL of the back template.
maxLength: 2083
minLength: 1
type: string
format: uri
thumbnails:
type: array
items:
$ref: '#/components/schemas/thumbnail'
available_quantity:
description: The available quantity of buckslips.
type: number
default: 0
allocated_quantity:
description: The allocated quantity of buckslips.
type: number
default: 0
onhand_quantity:
description: The onhand quantity of buckslips.
type: number
default: 0
pending_quantity:
description: The pending quantity of buckslips.
type: number
default: 0
projected_quantity:
description: The sum of pending and onhand quantities of buckslips.
type: number
default: 0
buckslip_orders:
description: An array of buckslip orders that are associated with the buckslip.
type: array
items:
$ref: '#/components/schemas/buckslip_order'
minItems: 0
stock:
title: The stock of the buckslip.
enum:
- text
- cover
type: string
weight:
title: The weight of the buckslip.
enum:
- 80#
type: string
finish:
title: The finish of the buckslip.
enum:
- gloss
- matte
type: string
status:
title: The status of the buckslip.
enum:
- processed
- rendered
- failed
type: string
object:
description: object
enum:
- buckslip
type: string
default: buckslip
signed_link:
type: string
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-_]+
failure_status_code:
type: integer
enum:
- 401
- 403
- 404
- 413
- 422
- 429
- 500
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"
evnt_id:
type: string
description: Unique identifier prefixed with `evnt_`.
pattern: ^evnt_[a-zA-Z0-9]+$
tracking_event_normal:
allOf:
- $ref: '#/components/schemas/tracking_event_base'
- type: object
required:
- type
- name
properties:
type:
description: non-Certified postcards, self mailers, letters, checks and snap packs
type: string
enum:
- normal
name:
type: string
enum:
- Mailed
- In Transit
- In Local Area
- Processed for Delivery
- Delivered
- Re-Routed
- Returned to Sender
- International Exit
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 recipients 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"
details:
description: Will be `null` for `type=normal` events
type:
- object
- 'null'
enum:
- null
location:
type:
- string
- 'null'
description: 'The zip code in which the scan event occurred. Null for `Mailed` events.
'
tracking_event_certified:
allOf:
- $ref: '#/components/schemas/tracking_event_base'
- type: object
required:
- type
- name
properties:
type:
description: a Certified letter tracking event
type: string
enum:
- certified
name:
type: string
enum:
- Mailed
- In Transit
- In Local Area
- Processed for Delivery
- Pickup Available
- Delivered
- Re-Routed
- Returned to Sender
- Issue
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"
details:
$ref: '#/components/schemas/tracking_event_details'
location:
type:
- string
- 'null'
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.
'
merge_variables:
type:
- object
- 'null'
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
company:
type:
- string
- 'null'
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).
'
maxLength: 40
generated:
type: object
required:
- to
- carrier
properties:
to:
$ref: '#/components/schemas/address'
carrier:
type: string
enum:
- USPS
default: USPS
thumbnails:
type: array
items:
$ref: '#/components/schemas/thumbnail'
expected_delivery_date:
$ref: '#/components/schemas/expected_delivery_date'
date_created:
$ref: '#/components/schemas/date_created'
date_modified:
$ref: '#/components/schemas/date_modified'
deleted:
$ref: '#/components/schemas/deleted'
metadata:
type: object
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}'
tracking_event_details:
type: object
required:
- event
- description
- action_required
properties:
event:
type: string
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
description: 'Find the full table [here](#tag/Tracking-Events). A detailed substatus about the event:
* `package_accepted` - Package has been accepted into the carrier network for delivery.
* `package_arrived` - Package has arrived at an intermediate location in the carrier network.
* `package_departed` - Package has departed from an intermediate location in the carrier network.
* `package_processing` - Package is processing at an intermediate location in the carrier network.
* `package_processed` - Package has been processed at an intermediate location.
* `package_in_local_area` - Package is at a location near the end destination.
* `delivery_scheduled` - Package is scheduled for delivery.
* `out_for_delivery` - Package is out for delivery.
* `pickup_available` - Package is available for pickup at carrier location.
* `delivered` - Package has been delivered.
* `package_forwarded` - Package has been forwarded.
* `returned_to_sender` - Package is to be returned to sender.
* `address_issue` - Address information is incorrect. Contact carrier to ensure delivery.
* `contact_carrier` - Contact the carrier for more information.
* `delayed` - Delivery of package is delayed.
* `delivery_attempted` - Delivery of package has been attempted. Contact carrier to ensure delivery.
* `delivery_rescheduled` - Delivery of package has been rescheduled.
* `location_inaccessible` - Delivery location inaccessible to carrier. Contact carrier to ensure delivery.
* `notice_left` - Carrier left notice during attempted delivery. Follow carrier instructions on notice.
* `package_damaged` - Package has been damaged. Contact carrier for more details.
* `package_disposed` - Package has been disposed.
* `package_held` - Package held at carrier location. Contact carrier for more details.
* `package_lost` - Package has been lost. Contact carrier for more details.
* `package_unclaimed` - Package is unclaimed.
* `package_undeliverable` - Package is not able to be delivered.
* `reschedule_delivery` - Contact carrier to reschedule delivery.
* `other` - Unrecognized carrier status.
'
description:
type: string
description: The description as listed in the description for event.
notes:
type: string
description: Event-specific notes from USPS about the tracking event.
action_required:
type: boolean
description: '`true` if action is required by the end recipient, `false` otherwise.
'
error:
type: object
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.
required:
- error
properties:
error:
type: object
required:
- message
- status_code
- code
properties:
message:
type: string
description: A human-readable message with more details about the error
example: Rate limit exceeded. Please wait 5 seconds and try your request again.
status_code:
$ref: '#/components/schemas/failure_status_code'
code:
type: string
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
# --- truncated at 32 KB (83 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/lob/refs/heads/main/openapi/lob-ltr-id-api-openapi.yml