From ebcbc1d7f8f46083219b979cf00ba3a3a14db45e Mon Sep 17 00:00:00 2001 From: Edward Kim Date: Mon, 9 Sep 2024 16:45:44 -0700 Subject: [PATCH 1/2] added rejected event to docs --- dist/lob-api-bundled.yml | 24 +++++++++++++++++++ dist/lob-api-postman.json | 2 +- docs/index.html | 22 ++++++++++++++++- lob-api-public.yml | 20 ++++++++++++++++ resources/events/attributes/check_types.yml | 1 + resources/events/attributes/letter_types.yml | 1 + .../events/attributes/postcard_types.yml | 1 + .../events/attributes/self_mailer_types.yml | 1 + 8 files changed, 70 insertions(+), 2 deletions(-) diff --git a/dist/lob-api-bundled.yml b/dist/lob-api-bundled.yml index 99166c1c..653fdc35 100644 --- a/dist/lob-api-bundled.yml +++ b/dist/lob-api-bundled.yml @@ -615,6 +615,11 @@ tags: false A postcard is successfully created (Lob returns a 200 status code). + + postcard.rejected + false + A postcard was not successfully created (Usually happens when one or more postcards fail the creation step during a batch request) + postcard.rendered_pdf false @@ -697,6 +702,11 @@ tags: false A self_mailer is successfully created (Lob returns a 200 status code). + + self_mailer.rejected + false + A self_mailer was not successfully created (Usually happens when one or more self_mailers fail the creation step during a batch request) + self_mailer.rendered_pdf false @@ -780,6 +790,11 @@ tags: false A letter is successfully created (Lob returns a 200 status code). + + letter.rejected + false + A letter was not successfully created (Usually happens when one or more letters fail the creation step during a batch request) + letter.rendered_pdf false @@ -939,6 +954,11 @@ tags: false A check is successfully created (Lob returns a 200 status code). + + check.rejected + false + A check was not successfully created (Usually happens when one or more checks fail the creation step during a batch request) + check.rendered_pdf false @@ -10498,6 +10518,7 @@ components: description: Unique identifier referring to status of postcard enum: - postcard.created + - postcard.rejected - postcard.rendered_pdf - postcard.rendered_thumbnails - postcard.deleted @@ -10516,6 +10537,7 @@ components: 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 @@ -10534,6 +10556,7 @@ components: description: Unique identifier referring to status of letter enum: - letter.created + - letter.rejected - letter.rendered_pdf - letter.rendered_thumbnails - letter.deleted @@ -10569,6 +10592,7 @@ components: description: Unique identifier referring to status of check enum: - check.created + - check.rejected - check.rendered_pdf - check.rendered_thumbnails - check.deleted diff --git a/dist/lob-api-postman.json b/dist/lob-api-postman.json index 085e3560..cf08995b 100644 --- a/dist/lob-api-postman.json +++ b/dist/lob-api-postman.json @@ -7769,7 +7769,7 @@ "id": "4c37aca2-bbda-4548-85b6-64f5e204da86", "name": "Events", "description": { - "content": "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

Postcards

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
EVENT TYPELIVE-ONLYWHEN EVENT TYPE OCCURS
postcard.createdfalseA postcard is successfully created (Lob returns a 200 status code).
postcard.rendered_pdffalseA postcard's PDF proof is successfully rendered.
postcard.rendered_thumbnailsfalseA postcard's thumbnails are successfully rendered.
postcard.deletedfalseA postcard is successfully canceled.
postcard.mailedtrueA postcard receives a \"Mailed\" tracking event. Only enabled for certain Print & Mail Editions.
postcard.in_transittrueA postcard receives an \"In Transit\" tracking event.
postcard.in_local_areatrueA postcard receives an \"In Local Area\" tracking event.
postcard.processed_for_deliverytrueA postcard receives a \"Processed for Delivery\" tracking event.
postcard.deliveredfalseA postcard receives a \"Delivered\" tracking event.
postcard.failedfalseA postcard receives a \"Failed\" rendering error or tracking event.
postcard.re-routedtrueA postcard receives a \"Re-Routed\" tracking event.
postcard.returned_to_sendertrueA postcard receives a \"Returned to Sender\" tracking event.
postcard.international_exittrueA postcard receives a \"International Exit\" tracking event.
postcard.viewedfalseA postcard QR code or URL was scanned or viewed by the recipient.
\n\n

Self Mailers

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
EVENT TYPELIVE-ONLYWHEN EVENT TYPE OCCURS
self_mailer.createdfalseA self_mailer is successfully created (Lob returns a 200 status code).
self_mailer.rendered_pdffalseA self_mailer's PDF proof is successfully rendered.
self_mailer.rendered_thumbnailsfalseA self_mailer's thumbnails are successfully rendered.
self_mailer.deletedfalseA self_mailer is successfully canceled.
self_mailer.mailedtrueA self_mailer receives a \"Mailed\" tracking event. Only enabled for certain\n Print & Mail Editions.
self_mailer.in_transittrueA self_mailer receives an \"In Transit\" tracking event.
self_mailer.in_local_areatrueA self_mailer receives an \"In Local Area\" tracking event.
self_mailer.processed_for_deliverytrueA self_mailer receives a \"Processed for Delivery\" tracking event.
self_mailer.deliveredtrueA self_mailer receives an \"Delivered\" tracking event.
self_mailer.failedfalseA self_mailer receives an \"Failed\" rendering error or tracking event.
self_mailer.re-routedtrueA self_mailer receives a \"Re-Routed\" tracking event.
self_mailer.returned_to_sendertrueA self_mailer receives a \"Returned to Sender\" tracking event.
self_mailer.international_exittrueA self_mailer receives an \"International Exit\" tracking event.
self_mailer.viewedfalseA self_mailer's QR code or URL was scanned or viewed by the recipient.
\n\n

Letters

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
EVENT TYPELIVE-ONLYWHEN EVENT TYPE OCCURS
letter.createdfalseA letter is successfully created (Lob returns a 200 status code).
letter.rendered_pdffalseA letter's PDF proof is successfully rendered.
letter.rendered_thumbnailsfalseA letter's thumbnails are successfully rendered.
letter.deletedfalseA letter is successfully canceled.
letter.mailedtrueA letter receives a \"Mailed\" tracking event. Only enabled for certain\n Print & Mail Editions.
letter.in_transittrueA letter receives an \"In Transit\" tracking event.
letter.in_local_areatrueA letter receives an \"In Local Area\" tracking event.
letter.processed_for_deliverytrueA letter receives a \"Processed for Delivery\" tracking event.
letter.deliveredtrueA letter receives a \"Delivered\" tracking event.
letter.failedfalseA letter receives a \"Failed\" rendering error or tracking event.
letter.re-routedtrueA letter receives a \"Re-Routed\" tracking event.
letter.returned_to_sendertrueA letter receives a \"Returned to Sender\" tracking event.
letter.international_exittrueA letter receives a \"International Exit\" tracking event.
letter.viewedfalseA letter's QR code or URL was scanned or viewed by the recipient.
letter.certified.mailedtrueA certified letter receives a \"Mailed\" tracking event. Only enabled for certain\n Print & Mail Editions.
letter.certified.in_transittrueA certified letter receives an \"In Transit\" tracking event.
letter.certified.in_local_areatrueA certified letter receives an \"In Transit\" tracking event.
letter.certified.processed_for_deliverytrueA certified letter receives a \"Processed for Delivery\" tracking event.
letter.certified.re-routedtrueA certified letter receives a \"Re-Routed\" tracking event.
letter.certified.returned_to_sendertrueA certified letter receives a \"Returned to Sender\" tracking event.
letter.certified.deliveredtrueA certified letter receives a \"Delivered\" tracking event.
letter.certified.pickup_availabletrueA certified letter receives a \"Pickup Available\" tracking event.
letter.certified.issuetrueA certified letter receives an \"Issue\" tracking event.
letter.return_envelope.createdfalseA return envelope is created (occurs simultaneously with letter creation).
letter.return_envelope.in_transittrueA return envelope receives an \"In Transit\" tracking event.
letter.return_envelope.in_local_areatrueA return envelope receives an \"In Local Area\" tracking event.
letter.return_envelope.processed_for_deliverytrueA return envelope receives a \"Processed for Delivery\" tracking event.
letter.return_envelope.re-routedtrueA return envelope receives a \"Re-Routed\" tracking event.
letter.return_envelope.returned_to_sendertrueA return envelope receives a \"Returned to Sender\" tracking event.
\n\n

Checks

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
EVENT TYPELIVE-ONLYWHEN EVENT TYPE OCCURS
check.createdfalseA check is successfully created (Lob returns a 200 status code).
check.rendered_pdffalseA check's PDF proof is successfully rendered.
check.rendered_thumbnailsfalseA check's thumbnails are successfully rendered.
check.deletedfalseA check is successfully canceled.
check.mailedtrueA check receives a \"Mailed\" tracking event. Only enabled for certain Print & Mail Editions.
check.in_transittrueA check receives an \"In Transit\" tracking event.
check.in_local_areatrueA check receives an \"In Local Area\" tracking event.
check.processed_for_deliverytrueA check receives a \"Processed for Delivery\" tracking event.
check.deliveredtrueA check receives a \"Delivered\" tracking event.
check.failedfalseA check receives a \"Failed\" rendering error or tracking event.
check.re-routedtrueA check receives a \"Re-Routed\" tracking event.
check.returned_to_sendertrueA check receives a \"Returned to Sender\" tracking event.
\n\n

Addresses

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
EVENT TYPELIVE-ONLYWHEN EVENT TYPE OCCURS
address.createdfalseAn address is successfully created (Lob returns a 200 status code).
address.deletedfalseAn address is successfully deleted.
\n\n

Bank Accounts

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
EVENT TYPELIVE-ONLYWHEN EVENT TYPE OCCURS
bank_account.createdfalseA bank account is successfully created (Lob returns a 200 status code).
bank_account.deletedfalseA bank account is successfully deleted.
bank_account.verifiedfalseA bank account is successfully verified.
\n
back to top
\n", + "content": "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

Postcards

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
EVENT TYPELIVE-ONLYWHEN EVENT TYPE OCCURS
postcard.rejectedfalseA postcard was not successfully created (Usually happens when one or more postcards fail the creation step during a batch request)
postcard.createdfalseA postcard is successfully created (Lob returns a 200 status code).
postcard.rendered_pdffalseA postcard's PDF proof is successfully rendered.
postcard.rendered_thumbnailsfalseA postcard's thumbnails are successfully rendered.
postcard.deletedfalseA postcard is successfully canceled.
postcard.mailedtrueA postcard receives a \"Mailed\" tracking event. Only enabled for certain Print & Mail Editions.
postcard.in_transittrueA postcard receives an \"In Transit\" tracking event.
postcard.in_local_areatrueA postcard receives an \"In Local Area\" tracking event.
postcard.processed_for_deliverytrueA postcard receives a \"Processed for Delivery\" tracking event.
postcard.deliveredfalseA postcard receives a \"Delivered\" tracking event.
postcard.failedfalseA postcard receives a \"Failed\" rendering error or tracking event.
postcard.re-routedtrueA postcard receives a \"Re-Routed\" tracking event.
postcard.returned_to_sendertrueA postcard receives a \"Returned to Sender\" tracking event.
postcard.international_exittrueA postcard receives a \"International Exit\" tracking event.
postcard.viewedfalseA postcard QR code or URL was scanned or viewed by the recipient.
\n\n

Self Mailers

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
EVENT TYPELIVE-ONLYWHEN EVENT TYPE OCCURS
self_mailer.createdfalseA self_mailer is successfully created (Lob returns a 200 status code).
self_mailer.rejectedfalseA self_mailer was not successfully created (Usually happens when one or more self_mailers fail the creation step during a batch request)
self_mailer.rendered_pdffalseA self_mailer's PDF proof is successfully rendered.
self_mailer.rendered_thumbnailsfalseA self_mailer's thumbnails are successfully rendered.
self_mailer.deletedfalseA self_mailer is successfully canceled.
self_mailer.mailedtrueA self_mailer receives a \"Mailed\" tracking event. Only enabled for certain\n Print & Mail Editions.
self_mailer.in_transittrueA self_mailer receives an \"In Transit\" tracking event.
self_mailer.in_local_areatrueA self_mailer receives an \"In Local Area\" tracking event.
self_mailer.processed_for_deliverytrueA self_mailer receives a \"Processed for Delivery\" tracking event.
self_mailer.deliveredtrueA self_mailer receives an \"Delivered\" tracking event.
self_mailer.failedfalseA self_mailer receives an \"Failed\" rendering error or tracking event.
self_mailer.re-routedtrueA self_mailer receives a \"Re-Routed\" tracking event.
self_mailer.returned_to_sendertrueA self_mailer receives a \"Returned to Sender\" tracking event.
self_mailer.international_exittrueA self_mailer receives an \"International Exit\" tracking event.
self_mailer.viewedfalseA self_mailer's QR code or URL was scanned or viewed by the recipient.
\n\n

Letters

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
EVENT TYPELIVE-ONLYWHEN EVENT TYPE OCCURS
letter.createdfalseA letter is successfully created (Lob returns a 200 status code).
letter.rejectedfalseA letter was not successfully created (Usually happens when one or more letters fail the creation step during a batch request)
letter.rendered_pdffalseA letter's PDF proof is successfully rendered.
letter.rendered_thumbnailsfalseA letter's thumbnails are successfully rendered.
letter.deletedfalseA letter is successfully canceled.
letter.mailedtrueA letter receives a \"Mailed\" tracking event. Only enabled for certain\n Print & Mail Editions.
letter.in_transittrueA letter receives an \"In Transit\" tracking event.
letter.in_local_areatrueA letter receives an \"In Local Area\" tracking event.
letter.processed_for_deliverytrueA letter receives a \"Processed for Delivery\" tracking event.
letter.deliveredtrueA letter receives a \"Delivered\" tracking event.
letter.failedfalseA letter receives a \"Failed\" rendering error or tracking event.
letter.re-routedtrueA letter receives a \"Re-Routed\" tracking event.
letter.returned_to_sendertrueA letter receives a \"Returned to Sender\" tracking event.
letter.international_exittrueA letter receives a \"International Exit\" tracking event.
letter.viewedfalseA letter's QR code or URL was scanned or viewed by the recipient.
letter.certified.mailedtrueA certified letter receives a \"Mailed\" tracking event. Only enabled for certain\n Print & Mail Editions.
letter.certified.in_transittrueA certified letter receives an \"In Transit\" tracking event.
letter.certified.in_local_areatrueA certified letter receives an \"In Transit\" tracking event.
letter.certified.processed_for_deliverytrueA certified letter receives a \"Processed for Delivery\" tracking event.
letter.certified.re-routedtrueA certified letter receives a \"Re-Routed\" tracking event.
letter.certified.returned_to_sendertrueA certified letter receives a \"Returned to Sender\" tracking event.
letter.certified.deliveredtrueA certified letter receives a \"Delivered\" tracking event.
letter.certified.pickup_availabletrueA certified letter receives a \"Pickup Available\" tracking event.
letter.certified.issuetrueA certified letter receives an \"Issue\" tracking event.
letter.return_envelope.createdfalseA return envelope is created (occurs simultaneously with letter creation).
letter.return_envelope.in_transittrueA return envelope receives an \"In Transit\" tracking event.
letter.return_envelope.in_local_areatrueA return envelope receives an \"In Local Area\" tracking event.
letter.return_envelope.processed_for_deliverytrueA return envelope receives a \"Processed for Delivery\" tracking event.
letter.return_envelope.re-routedtrueA return envelope receives a \"Re-Routed\" tracking event.
letter.return_envelope.returned_to_sendertrueA return envelope receives a \"Returned to Sender\" tracking event.
\n\n

Checks

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
EVENT TYPELIVE-ONLYWHEN EVENT TYPE OCCURS
check.createdfalseA check is successfully created (Lob returns a 200 status code).
check.rejectedfalseA check was not successfully created (Usually happens when one or more checks fail the creation step during a batch request)
check.rendered_pdffalseA check's PDF proof is successfully rendered.
check.rendered_thumbnailsfalseA check's thumbnails are successfully rendered.
check.deletedfalseA check is successfully canceled.
check.mailedtrueA check receives a \"Mailed\" tracking event. Only enabled for certain Print & Mail Editions.
check.in_transittrueA check receives an \"In Transit\" tracking event.
check.in_local_areatrueA check receives an \"In Local Area\" tracking event.
check.processed_for_deliverytrueA check receives a \"Processed for Delivery\" tracking event.
check.deliveredtrueA check receives a \"Delivered\" tracking event.
check.failedfalseA check receives a \"Failed\" rendering error or tracking event.
check.re-routedtrueA check receives a \"Re-Routed\" tracking event.
check.returned_to_sendertrueA check receives a \"Returned to Sender\" tracking event.
\n\n

Addresses

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
EVENT TYPELIVE-ONLYWHEN EVENT TYPE OCCURS
address.createdfalseAn address is successfully created (Lob returns a 200 status code).
address.deletedfalseAn address is successfully deleted.
\n\n

Bank Accounts

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
EVENT TYPELIVE-ONLYWHEN EVENT TYPE OCCURS
bank_account.createdfalseA bank account is successfully created (Lob returns a 200 status code).
bank_account.deletedfalseA bank account is successfully deleted.
bank_account.verifiedfalseA bank account is successfully verified.
\n
back to top
\n", "type": "text/plain" }, "item": [], diff --git a/docs/index.html b/docs/index.html index 9c3d5159..bbc0ecca 100644 --- a/docs/index.html +++ b/docs/index.html @@ -5944,6 +5944,11 @@

Postcards

false A postcard is successfully created (Lob returns a 200 status code). + + postcard.rejected + false + A postcard was not successfully created (Usually happens when one or more postcards fail the creation step during a batch request) + postcard.rendered_pdf false @@ -6024,6 +6029,11 @@

Self Mailers

false A self_mailer is successfully created (Lob returns a 200 status code). + + self_mailer.rejected + false + A self_mailer was not successfully created (Usually happens when one or more self_mailers fail the creation step during a batch request) + self_mailer.rendered_pdf false @@ -6105,6 +6115,11 @@

Letters

false A letter is successfully created (Lob returns a 200 status code). + + letter.rejected + false + A letter was not successfully created (Usually happens when one or more letters fail the creation step during a batch request) + letter.rendered_pdf false @@ -6262,6 +6277,11 @@

Checks

false A check is successfully created (Lob returns a 200 status code). + + check.rejected + false + A check was not successfully created (Usually happens when one or more checks fail the creation step during a batch request) + check.rendered_pdf false @@ -7687,7 +7707,7 @@

Changelog

View our Changelog here.

- * Launch your terminal and copy/paste a CURL command. - ```bash - curl https://api.lob.com/v1/addresses \ -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: ``` - - * Download a [Lob SDK](#tag/SDKs-and-Tools) into your favorite IDE - (integrated development environment) - + * Download a [Lob SDK](#tag/SDKs-and-Tools) into your favorite IDE (integrated development environment) ### 3. Learn more - Try our quick start (TypeScript, Python, PHP, Java or Ruby): - - * Send your first Postcards - + * Send your first Postcards Use Case guides - - * Mass Deletion Setup - - * NCOA Restrictions - - * Override Cancellation Window - - * Visibility of Address Changes - - * Ingesting Tracking Events with Webhooks - -
back to - top
+ * Mass Deletion Setup + * NCOA Restrictions + * Override Cancellation Window + * Visibility of Address Changes + * Ingesting Tracking Events with Webhooks +
back to top
- name: Identity Validation - description: > + description: | Validates whether a given name is associated with an address. - -
back to - top
+
back to top
- name: Intl Autocompletions - description: > - Address autocompletion for non-US addresses. Given partial address - information, this endpoint returns up to 10 address suggestions. - + description: | + Address autocompletion for non-US addresses. Given partial address information, this endpoint returns up to 10 address suggestions. ## Autocompletion Test Env - - Your test API key does not autocomplete international addresses and is - used to simulate - - behavior. With your test API key, requests with specific values for - `address_prefix` - + Your test API key does not autocomplete international 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: - - `0 suggestions` - Returns no suggestions - - - `[PRIMARY NUMBER] s[uggestion]` - Returns a maximum of ten predefined - suggested addresses. + - `[PRIMARY NUMBER] s[uggestion]` - Returns a maximum of ten predefined suggested addresses. `[PRIMARY NUMBER]` does not have to be a valid primary number when sending a test request. Each additional letter in `suggestion` reduces the number of suggestions by one (e.g. `1 su` returns 9 suggested addresses). `[PRIMARY NUMBER]` does not affect the number of suggestions returned. Country is a required field. - - City and state filters work as expected and filter the list of - predetermined suggested addresses. - - See the `test` request & response examples under [Autocomplete - Examples](#operation/intl_autocompletions) within the "Autocomplete - + City and state filters work as expected and filter the list of predetermined suggested addresses. + See the `test` request & response examples under [Autocomplete Examples](#operation/intl_autocompletions) within the "Autocomplete a partial address" section in Intl Autocompletions. - -
back to - top
+
back to top
- name: Intl Verifications - description: > + description: | Address verification for non-US addresses -
- -
back to - top
- +
back to top
## Intl Verifications Test Env - When verifying international addresses, you'll likely want to test against - a wide array of addresses to ensure you're handling responses correctly. - - With your test API key, requests that use specific values for - `primary_line` - + With your test API key, requests that use specific values for `primary_line` let you explore the responses to many types of addresses: - @@ -1241,169 +1036,83 @@ tags:
DELIVERABILITY OF SAMPLE RESPONSE
- - See the `test` request & response examples under [Intl Verification - Examples](#operation/intl_verification) within the - + See the `test` request & response examples under [Intl Verification Examples](#operation/intl_verification) within the "Verify an international address section" in Intl Verifications. + You can rely on the response from these examples generally matching the response + you'd see in the live environment with an address of that type (excluding the `recipient` field). - You can rely on the response from these examples generally matching the - response - - you'd see in the live environment with an address of that type (excluding - the `recipient` field). - - - The test API key does not perform any verification, automatic correction, - or standardization - - for addresses. If you wish to try these features out, use our live demo - - or the free plan (see our - pricing for details). - -
back to - top
+ The test API key does not perform any verification, automatic correction, or standardization + for addresses. If you wish to try these features out, use our live demo + or the free plan (see our pricing for details). +
back to top
- name: Introduction x-traitTag: true - description: > - Lob’s Print & Mail and Address Verification APIs help companies transform - outdated, - - manual print-and-mail processes; save 1,000s of hours in processing time - by sending mail much more - + description: | + Lob’s Print & Mail and Address Verification APIs help companies transform outdated, + manual print-and-mail processes; save 1,000s of hours in processing time by sending mail much more quickly; and increase ROI on offline communications. - - Automate direct mail by triggering on-demand postcards, letters, and - checks directly from your - + Automate direct mail by triggering on-demand postcards, letters, and checks directly from your CRM or customer data systems. - - Address Verification corrects, standardizes, and cleanses address data for - assured delivery with - + Address Verification corrects, standardizes, and cleanses address data for assured delivery with instant verification across 240+ countries and territories. + Lob's print delivery network eliminates the hassle of vendor management with automated + production and postage across a global network of vetted commercial printers. - Lob's print delivery network eliminates the hassle of vendor management - with automated - - production and postage across a global network of vetted commercial - printers. - - - Tracking & Analytics gives you complete visibility of production and - delivery for each piece of - - mail you send to meet compliance requirements and measure campaign - performance. + Tracking & Analytics gives you complete visibility of production and delivery for each piece of + mail you send to meet compliance requirements and measure campaign performance. - name: Letters - description: > - The letters endpoint allows you to easily print and mail letters. The API - provides endpoints for - - creating letters, retrieving individual letters, canceling letters, and - retrieving a list of letters. - -
back to - top
+ description: | + The letters endpoint allows you to easily print and mail letters. The API provides endpoints for + creating letters, retrieving individual letters, canceling letters, and retrieving a list of letters. +
back to top
- name: Manage Mail x-traitTag: true - description: > + description: | ## Cancellation Windows - - By default, all new accounts have a 5 minute cancellation window for - postcards, - + By default, all new accounts have a 5 minute cancellation window for postcards, self mailers, letters, and checks. Within that timeframe, you can cancel - mailings from production, free of charge. Once the window has passed for a - - postcard, self mailer, letter, or check, the mailing is no longer - cancelable. - + postcard, self mailer, letter, or check, the mailing is no longer cancelable. In addition, certain customers can customize their cancellation windows by + product in their Dashboard Settings. Upgrade to + the appropriate Print & Mail Edition + to automatically gain access to this ability. For more details on this feature, + check out our Cancellation Guide. - product in their Dashboard Settings. Upgrade to - - the appropriate Print & Mail Edition - - to automatically gain access to this ability. For more details on this - feature, - - check out our Cancellation Guide. - - - If you schedule a postcard, self mailer, letter, or check for up to 180 - days - - in the future by supplying the `send_date` parameter, that will override - any - + If you schedule a postcard, self mailer, letter, or check for up to 180 days + in the future by supplying the `send_date` parameter, that will override any cancellation window you may have for that product. -
- -
back to - top
- +
back to top
## Scheduled Mailings - - Postcards, self mailers, letters, and checks can be scheduled to be sent - up - + Postcards, self mailers, letters, and checks can be scheduled to be sent up to 180 days in advance. You can use this feature to: - - Create automated drip campaigns (e.g. send a postcard at 15, 30, and 60 - days) - - Schedule recurring sends - - Plan your mailing schedule ahead of time - Up until the time a mailing is scheduled for, it can also be canceled. - If you use this feature in conjunction with [a cancellation window]( - - index.html#section/Cancellation-Windows), the `send_date` parameter will - always - + index.html#section/Cancellation-Windows), the `send_date` parameter will always take precedence. - For implementation details, see documentation below for each respective - - endpoint. For more help, see our Scheduled Mailings Guide. - + endpoint. For more help, see our Scheduled Mailings Guide. This feature is exclusive to certain customers. Upgrade to the appropriate - - Print & Mail Edition to - + Print & Mail Edition to gain access. - ### Example Create Request using Send Date - ```bash curl https://api.lob.com/v1/postcards \ -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \ @@ -1415,196 +1124,87 @@ tags: -d "merge_variables[name]=Harry" \ -d "send_date=2021-07-26" ``` - -
back to - top
+
back to top
- name: National Change of Address x-traitTag: true - description: > - National Change of Address Linkage (NCOALink) is a service offered by the - USPS, which allows individuals - - or businesses who have recently moved to have any mail forwarded from - their previous address - + description: | + National Change of Address Linkage (NCOALink) is a service offered by the USPS, which allows individuals + or businesses who have recently moved to have any mail forwarded from their previous address to their new address. + As a CASS-certified Address Verification Provider, Lob also offers NCOALink + functionality to our Print & Mail customers. With the Lob NCOALink feature enabled, Postcards, + Letters, Checks and Addresses can automatically be corrected to reflect an individual's or business's + new address in the case that they have moved (only if they have registered for NCOALink with the USPS). - As a CASS-certified Address Verification Provider, Lob also offers - NCOALink - - functionality to our Print & Mail customers. With the Lob NCOALink feature - enabled, Postcards, + Due to privacy concerns and USPS constraints, for customers with NCOALink enabled, our API responses + for a limited set of endpoints differ slightly in the case when an address has been changed through NCOALink. - Letters, Checks and Addresses can automatically be corrected to reflect an - individual's or business's - - new address in the case that they have moved (only if they have registered - for NCOALink with the USPS). - - - Due to privacy concerns and USPS constraints, for customers with NCOALink - enabled, our API responses - - for a limited set of endpoints differ slightly in the case when an address - has been changed through NCOALink. - - - **NOTE**: This feature is exclusive to certain customers. Upgrade to the - appropriate Print & Mail Editions to gain access. - - - For more information, see our NCOALink guide. + **NOTE**: This feature is exclusive to certain customers. Upgrade to the appropriate Print & Mail Editions to gain access. + For more information, see our NCOALink guide.
- -
back to - top
- +
back to top
## NCOALink Live Environment - - Though there are no changes to API requests, there are significant changes - to our API responses, but - - only in the event that an address has been changed through NCOALink. If an - address has not been changed - - through NCOALink, the response would be identical to our standard - responses, except the addition of a - + Though there are no changes to API requests, there are significant changes to our API responses, but + only in the event that an address has been changed through NCOALink. If an address has not been changed + through NCOALink, the response would be identical to our standard responses, except the addition of a `recipient_moved` field, which is `false` for unchanged addresses. - - If an address has been changed through NCOALink, we are required to - suppress the following response - + If an address has been changed through NCOALink, we are required to suppress the following response fields for that address: - - `address_line1` - - `address_line2` - - The +4 portion of the ZIP+4 (5-digit ZIP code will still be present) - - See the `ncoa_us_live` example under [Response - samples](#operation/address_create) within the "Create an Address" section - in Addresses - + See the `ncoa_us_live` example under [Response samples](#operation/address_create) within the "Create an Address" section in Addresses
- -
back to - top
- +
back to top
## NCOALink Test Environment + In addition to sending live requests, you may also want to simulate what an NCOALink response might + look like so that you can ensure your application behaves as expected. The behavior of NCOALink in + Lob's Test Environment is very similar to our [US Verifications Test Mode](#section/US-Verifications-Test-Env). - In addition to sending live requests, you may also want to simulate what - an NCOALink response might - - look like so that you can ensure your application behaves as expected. The - behavior of NCOALink in - - Lob's Test Environment is very similar to our [US Verifications Test - Mode](#section/US-Verifications-Test-Env). - - - To simulate an NCOALink request, send a POST request to any of the four - endpoints below with an `address_line1` field equal to `NCOA`: - + To simulate an NCOALink request, send a POST request to any of the four endpoints below with an `address_line1` field equal to `NCOA`: - `POST /v1/addresses` - - `POST /v1/checks` - - `POST /v1/letters` - - `POST /v1/postcards` - - `POST /v1/self_mailers` - - A 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" - - section in Addresses (along with the corresponding request under "Request - samples"). - -
back to - top
+ A 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" + section in Addresses (along with the corresponding request under "Request samples"). +
back to top
- name: Postcards - description: > - The postcards endpoint allows you to easily print and mail postcards. The - API provides endpoints for creating postcards, - - retrieving individual postcards, canceling postcards, and retrieving a - list of postcards. - -
back to - top
+ description: | + The postcards endpoint allows you to easily print and mail postcards. The API provides endpoints for creating postcards, + retrieving individual postcards, canceling postcards, and retrieving a list of postcards. +
back to top
- name: QR Codes - description: > - - Lob 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 Letters, Postcards or Self Mailers to - learn how to embed a QR code into your mail piece. - - - Webhooks can be used to integrate Lob QR code scans into your omni channel - marketing strategy. See the Webhooks section - of our documentation to learn how to enable the `letter.viewed`, - `postcard.viewed` and `self_mailer.viewed` event notifications for your - mail pieces. + description: | + Lob 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 Letters, Postcards or Self Mailers to learn how to embed a QR code into your mail piece. - Furthermore, 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! + Webhooks can be used to integrate Lob QR code scans into your omni channel marketing strategy. See the Webhooks section of our documentation to learn how to enable the `letter.viewed`, `postcard.viewed` and `self_mailer.viewed` event notifications for your mail pieces. + Furthermore, 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! -
back to - top
+
back to top
- name: Rate Limiting x-traitTag: true - 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. - - - When 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. + 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. + When 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. **HTTP Headers** + HTTP 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. - HTTP 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. - - - While 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. - + While 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. @@ -1623,23 +1223,17 @@ tags:
- ### Example HTTP Headers - ```bash X-Rate-Limit-Limit:150 X-Rate-Limit-Remaining:100 X-Rate-Limit-Reset:1528749846 ``` - ### Example Response - - If you hit the rate limit on a given endpoint, this is the body of the - HTTP 429 message that you will see: - + If you hit the rate limit on a given endpoint, this is the body of the HTTP 429 message that you will see: ```javascript { @@ -1649,97 +1243,54 @@ tags: "status_code": 429 } } - ```
back to - top
+ ```
back to top
- name: Requests and Responses x-traitTag: true - description: > + description: | ## Asset URLs - All asset URLs returned by the Lob API (postcards, letters, thumbnails, - etc) are signed links served over HTTPS. All links returned will expire in - 30 days to prevent mis-sharing. Each time a GET request is initiated, a - new signed URL will be generated. -
- -
back to - top
- +
back to top
## Query Parameters - - Query parameters which consist of lists of strings require that all - elements of - + Query parameters which consist of lists of strings require that all elements of the list be double-quoted, as per query filter standards. -
- -
back to - top
- +
back to top
## Idempotent Requests - Lob supports idempotency for safely retrying `POST` requests to create - postcards, self mailers, letters, and checks without accidentally creating - duplicates. - For example, if a request to create a check fails due to a network error, - you can safely retry the same request with the same idempotency key and - guarantee that only one check will ultimately be created and sent. When a - request is sent with an idempotency key for an already created resource, - the response object for the existing resource will be returned. - To perform an idempotent `POST` request to one of the mailpiece product - - endpoints, provide an additional `Idempotency-Key` header or an - `idempotency_key` - + endpoints, provide an additional `Idempotency-Key` header or an `idempotency_key` query parameter to the request. If multiple idempotency keys are provided, - the request will fail. How you create unique keys is up to you, but we - - suggest using random values, such as V4 UUIDs. Idempotency keys are - intended - - to prevent issues over a short periods of time, therefore keys expire - after - + suggest using random values, such as V4 UUIDs. Idempotency keys are intended + to prevent issues over a short periods of time, therefore keys expire after 24 hours. Keys are unique by mode (Test vs. Live) as well as by resource - (postcard vs. letter, etc.). - By default, all `GET` and `DELETE` requests are idempotent by nature, so - they do not require an additional idempotency key. - For more help integrating idempotency keys, refer to our - - implementation guide. - + implementation guide. **Headers** - @@ -1757,9 +1308,7 @@ tags:
- **Query Parameters** - @@ -1777,10 +1326,8 @@ tags:
- ### Example Request - ```bash curl https://api.lob.com/v1/postcards \ -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \ @@ -1791,37 +1338,21 @@ tags: --data-urlencode "back=Back HTML" \ -d "merge_variables[name]=Harry" ``` -
- -
back to - top
- +
back to top
## Metadata - - When creating any Lob object, you can include a metadata object with up to - 20 key-value pairs of - - custom data. You can use metadata to store information like - `metadata[customer_id] = "987654"` or - - `metadata[campaign] = "NEWYORK2015"`. This is especially useful for - filtering and matching to internal - + When creating any Lob object, you can include a metadata object with up to 20 key-value pairs of + custom data. You can use metadata to store information like `metadata[customer_id] = "987654"` or + `metadata[campaign] = "NEWYORK2015"`. This is especially useful for filtering and matching to internal systems. - - Each metadata key must be less than 40 characters long and values must be - less than 500 characters. - + Each metadata key must be less than 40 characters long and values must be less than 500 characters. Metadata does not support nested objects. - ### Example Create Request with Metadata - ```bash curl https://api.lob.com/v1/postcards \ -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \ @@ -1834,85 +1365,49 @@ tags: -d "merge_variables[name]=Harry" ``` - ### Example List Request with Metadata Filter - ```bash curl -g "https://api.lob.com/v1/postcards?metadata[campaign]=NEWYORK2015&limit=2" \ -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: ``` -
- -
back to - top
- +
back to top
## Request Body - When manually sending a POST HTTP request directly to the Lob API, without - the use of a library, you may represent the body as either a Form URL - Encoded request, a JSON document, or a Multipart Form Data request. - However, if you're using one of our [SDKs](#tag/SDKs-and-Tools), - - the generation of the request bodies is done for you automatically and you - don't - + the generation of the request bodies is done for you automatically and you don't need to worry about the format. - - For fields that are intended to accept only string values, submitting JSON - objects in string format (stringified JSON objects) is not supported. - - Our system automatically parses and validates incoming data according to - their expected types. - - As a result, providing a stringified JSON object in a field designated for - string input can cause parsing errors or lead to unexpected validation - results. - + For fields that are intended to accept only string values, submitting JSON objects in string format (stringified JSON objects) is not supported. + Our system automatically parses and validates incoming data according to their expected types. + As a result, providing a stringified JSON object in a field designated for string input can cause parsing errors or lead to unexpected validation results. ### Form URL Encoded - This request body encoding is accompanied with the - - `Content-Type: application/x-www-form-urlencoded` header. The content is - an - - example of what the [Verify a US - address](index.html#operation/us_verification) - - endpoint accepts. An example of a request body encoded in this format - follows. - + `Content-Type: application/x-www-form-urlencoded` header. The content is an + example of what the [Verify a US address](index.html#operation/us_verification) + endpoint accepts. An example of a request body encoded in this format follows. ```javascript primary_line=210 King Street&city=San Francisco&state=CA&zip_code=94107 ``` - ### JSON - - This request body encoding is accompanied with the `Content-Type: - application/json` header. - - The content is an example of what the [Verify a US address - endpoint](index.html#operation/us_verification) - + This request body encoding is accompanied with the `Content-Type: application/json` header. + The content is an example of what the [Verify a US address endpoint](index.html#operation/us_verification) accepts. An example of a request body encoded in this format follows. - ```javascript { "primary_line": "210 King Street", @@ -1922,22 +1417,12 @@ tags: } ``` - ### Multipart Form Data - - This request body encoding is accompanied with the `Content-Type: - multipart/form-data` - - header. This is the only format that can be used for uploading a file to - the API. The - - content is an example of what the [Create a - check](index.html#operation/check_create) - - endpoint accepts. An example of a request body encoded in this format - follows. - + This request body encoding is accompanied with the `Content-Type: multipart/form-data` + header. This is the only format that can be used for uploading a file to the API. The + content is an example of what the [Create a check](index.html#operation/check_create) + endpoint accepts. An example of a request body encoded in this format follows. ```javascript @@ -1964,112 +1449,54 @@ tags: true --------------------------7015ebe79c0a5f8c-- ``` - -
back to - top
+
back to top
- name: Reverse Geocode Lookups - description: > - Find a list of zip codes associated with a valid US location via latitude - and longitude.
back to top
+ description: | + Find a list of zip codes associated with a valid US location via latitude and longitude.
back to top
- name: SDKs and Tools x-traitTag: true - description: > - Please visit our Github for a list of our supported libraries. - - - Typescript - + description: | + Please visit our Github for a list of our supported libraries. + - Typescript - PHP - - Python - - Java - - - Ruby - + - Ruby - CSharp - - Elixir - - Go - - - Node.js - (legacy) - - - Java (legacy) - - - PHP (legacy) - - - Python (Legacy) - - - Ruby (Legacy) - + - Node.js (legacy) + - Java (legacy) + - PHP (legacy) + - Python (Legacy) + - Ruby (Legacy)

- -
back to - top
+
back to top
- name: Self Mailers - description: > - The self mailer endpoint allows you to easily print and mail self mailers. - The API provides endpoints - - for creating self mailers, retrieving individual self mailers, canceling - self mailers, and retrieving a list of self mailers. - -
back to - top
+ description: | + The self mailer endpoint allows you to easily print and mail self mailers. The API provides endpoints + for creating self mailers, retrieving individual self mailers, canceling self mailers, and retrieving a list of self mailers. +
back to top
- name: Template Design x-traitTag: true - description: > + description: | ## HTML Templates - - You can save commonly used HTML as templates within Lob to more easily - manage them. You can reference - - your saved templates in postcard, letter, and check requests instead of - having to pass a long HTML - - string on each request. Additionally, you can make changes to your HTML - templates and update them - - independently, without having to touch your API integration. Templates can - be created, edited, - - and viewed on your Dashboard. To use a template in a postcard, - - letter, or check, see the documentation for each endpoint below. For help - using templates, check out our - - HTML Templates Guide or get started with a - - pre-designed - template from our gallery. In Live mode, you can only have - + You can save commonly used HTML as templates within Lob to more easily manage them. You can reference + your saved templates in postcard, letter, and check requests instead of having to pass a long HTML + string on each request. Additionally, you can make changes to your HTML templates and update them + independently, without having to touch your API integration. Templates can be created, edited, + and viewed on your Dashboard. To use a template in a postcard, + letter, or check, see the documentation for each endpoint below. For help using templates, check out our + HTML Templates Guide or get started with a + pre-designed template from our gallery. In Live mode, you can only have as many templates as allotted in your current + Print & Mail Edition. There is no limit in Test mode. - Print & Mail Edition. There is no limit in Test mode. - - - If you'd like to interact with templates programmatically, check out our - Beta Program for API access - + If you'd like to interact with templates programmatically, check out our Beta Program for API access to the [HTML Templates Endpoints](#tag/Templates). - ### Example Create Request using HTML Templates - ```bash curl https://api.lob.com/v1/postcards \ -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \ @@ -2080,180 +1507,83 @@ tags: -d "back=tmpl_01b0d396a10c268" \ -d "merge_variables[name]=Harry" ``` -
- -
back to - top
- +
back to top
## HTML Examples - - Use a pre-designed template from our gallery or follow these - - basic guidelines as starting points for creating custom - Postcards, - + Use a pre-designed template from our gallery or follow these + basic guidelines as starting points for creating custom Postcards, Self Mailers, Letters, and Checks. - Please follow the standards used in these templates, such as: - - - For any linked assets, you must use a performant file hosting provider - with no rate limits such as Amazon - + - For any linked assets, you must use a performant file hosting provider with no rate limits such as Amazon S3. - - - Use inline styles or an internal stylesheet, do not link to external - stylesheets. - - - Link to images that are 300DPI and sized at the final desired size on - the physical mailing. For example, - - for a photo that is desired to be 1in x 1in on the final postcard, the - image asset should be sized at 1in - + - Use inline styles or an internal stylesheet, do not link to external stylesheets. + - Link to images that are 300DPI and sized at the final desired size on the physical mailing. For example, + for a photo that is desired to be 1in x 1in on the final postcard, the image asset should be sized at 1in x 1in at 300DPI (which equates to 300px by 300px). - - The sum of all linked assets should not exceed 5MB in file size. + - Use `-webkit` prefixes for CSS properties when recommended here. - - Use `-webkit` prefixes for CSS properties when recommended here. - - - Because different browsers have varying user-agent styles, the HTML you - see in your browser will not - - always look identical to what is produced through the API. It is - **strongly** recommended that you test all - - HTML requests by reviewing the final PDF files in your Test Environment, - as these are the files that will be - + Because different browsers have varying user-agent styles, the HTML you see in your browser will not + always look identical to what is produced through the API. It is **strongly** recommended that you test all + HTML requests by reviewing the final PDF files in your Test Environment, as these are the files that will be printed. -
- -
back to - top
- +
back to top
## Image Prepping - Currently we support the following file types for all endpoints: - - PDF - - PNG - - JPEG - **Templates** - - You can find pre-made templates that already adhere to all of these - guidelines here: - + You can find pre-made templates that already adhere to all of these guidelines here: - [Postcards](#tag/Postcards) - - [Letters](#tag/Letters) - - [Checks](#tag/Checks) - - [Self Mailers](#tag/Self-Mailers) - **Prepping All Images** - The following guidelines apply to image types: - - - Images should be 300 dpi or higher - PNG/JPEG files with less than 300 - dpi will be rejected. - - - 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. - - - Include a safe zone – make sure no critical elements are within 1/8" - from the edge of the final size. - + - Images should be 300 dpi or higher - PNG/JPEG files with less than 300 dpi will be rejected. + - 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. + - Include a safe zone – make sure no critical elements are within 1/8" from the edge of the final size. - Do not include any additional postage marks or indicia. - - File sizes should be no larger than 5MB. - **Prepping PDFs** - - To 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) - + To 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) **Prepping PNGs/JPEGs** + To ensure that you are producing PNG's/JPEG's correctly please follow the guidelines below: - To ensure that you are producing PNG's/JPEG's correctly please follow the - guidelines below: - - - - 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. - - - Submitted images must have the same length to width ratio as the chosen - product. Images will not be cropped or stretched by the API. - + - 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. + - Submitted images must have the same length to width ratio as the chosen product. Images will not be cropped or stretched by the API.
- -
back to - top
- +
back to top
## Standard PDF Fonts - - Ideally, all fonts in provided PDFs should be embedded. Embedding a font - in a PDF ensures that the final - - printed product will look as it was designed. Fonts can vary greatly in - size and shape, even within the - - same family. If the exact font that was used to design the artwork is not - used to print, the look and - + Ideally, all fonts in provided PDFs should be embedded. Embedding a font in a PDF ensures that the final + printed product will look as it was designed. Fonts can vary greatly in size and shape, even within the + same family. If the exact font that was used to design the artwork is not used to print, the look and placement of the text is not guaranteed to be the same. - - In general, requests that provide PDFs with un-embedded fonts will be - rejected. We make an exception for - - "standard fonts", a set of fonts that we have identified as being common. - PDFs that contain un-embedded - - fonts that are found in the list, and match the accepted font type - + In general, requests that provide PDFs with un-embedded fonts will be rejected. We make an exception for + "standard fonts", a set of fonts that we have identified as being common. PDFs that contain un-embedded + fonts that are found in the list, and match the accepted font type will be accepted. Otherwise, the request will be rejected. - - Font embedding is an essential part of standard PDF workflows. Fonts - should be embedded automatically by - + Font embedding is an essential part of standard PDF workflows. Fonts should be embedded automatically by PDF editing software that are compliant with PDF standards. - Please note, only standard base14 fonts can be Type 1. - @@ -2432,94 +1762,55 @@ tags:
FONT NAMEType 1
- -
back to - top
+
back to top
- name: Template Versions - description: > - These API endpoints allow you to create, retrieve, update and delete - versions of reusable HTML templates for use with the Print & Mail API. - -
back to - top
+ description: | + These API endpoints allow you to create, retrieve, update and delete versions of reusable HTML templates for use with the Print & Mail API. +
back to top
- name: Templates - description: > - These API endpoints allow you to create, retrieve, update and delete - reusable HTML templates for use with the Print & Mail API. - -
back to - top
+ description: | + These API endpoints allow you to create, retrieve, update and delete reusable HTML templates for use with the Print & Mail API. +
back to top
- name: Test and Live Environments x-traitTag: true - description: > + description: | To make the API as explorable as possible, accounts have test and live - environment API keys. You're not charged any fees in the test environment, - so we encourage you to use it to try out services, perform quality - assurance, and run automated testing. Objects―addresses, letters, checks, - etc―in one environment cannot be manipulated by objects in the other. - In general, a payment method (either credit card or ACH account) must be - added to your account to make live API requests. However, a payment method - is not required for the first 300 live requests per month to the - `/v1/us_verifications` endpoint. After the first 300 requests, you will - begin receiving errors with status code `403`. - Requests made in the test environment always validate request arguments, - simulate live environment behavior, and enforce rate limits. _They never - print, mail nor, for verification services, verify addresses._ The US & - International verification services trigger behavior with specific - argument values, and, if you plan on using those, we recommend reading - [US Verification Test Environment](#tag/US-Verifications-Test-Environment) - - and [Intl Verification Test - Environment](#tag/Intl-Verifications-Test-Environment). - + and [Intl Verification Test Environment](#tag/Intl-Verifications-Test-Environment). To switch between environments, use the appropriate key for that - environment when performing a request. You can find each environment's API - key in your dashboard under Settings; test API keys are always prefixed - with `test_` and production API keys with `live_`. - -
back to - top
+
back to top
- name: Tracking Events - description: > - As mailpieces travel through the mail stream, USPS scans their unique - barcodes, and Lob processes these mail scans to generate tracking events. - + description: | + As mailpieces travel through the mail stream, USPS scans their unique barcodes, and Lob processes these mail scans to generate tracking events.

Certified Tracking Event Details

- Letters sent with USPS Certified Mail are fully tracked by USPS, and - therefore their [tracking events](#operation/tracking_event) have an - additional `details` object with more detailed information about the - tracking event. The following table shows the potential values for - the fields in the `details` object mapped to the tracking event `name`. - @@ -2690,79 +1981,42 @@ tags:
NAMEfalse
- -
back to - top
+
back to top
- name: Uploads - description: > - The uploads endpoint allows you to upload audience files that are then - associated with a given campaign. - - At this time, only CSV files are allowed. The API provides endpoints for - creating uploads, uploading audience files, - - and marking uploaded files as ready for processing. The API also provides - endpoints for downloading files that - + description: | + The uploads endpoint allows you to upload audience files that are then associated with a given campaign. + At this time, only CSV files are allowed. The API provides endpoints for creating uploads, uploading audience files, + and marking uploaded files as ready for processing. The API also provides endpoints for downloading files that describe the results, both successful and not, of the processing. - name: URL Shortener - 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. - - - Webhooks can be used to integrate Lob's URL Shortener scans into your omni - channel marketing stratergy. See the Webhooks - section of our documentation to learn how to enable the `letter.viewed`, - `postcard.viewed` and `self_mailer.viewed` event notifications for your - mail pieces. - + 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. - Furthermore, you can use our Retrieve endpoints to track the impact and - engagement rate of links created. + Webhooks can be used to integrate Lob's URL Shortener scans into your omni channel marketing stratergy. See the Webhooks section of our documentation to learn how to enable the `letter.viewed`, `postcard.viewed` and `self_mailer.viewed` event notifications for your mail pieces. + Furthermore, you can use our Retrieve endpoints to track the impact and engagement rate of links created. -
back to - top
+
back to top
- name: US Autocompletions - description: > - Given partial address information, this endpoint returns up to 10 address - suggestions.
back to top
- + description: | + Given partial address information, this endpoint returns up to 10 address suggestions.
back to top
## Autocompletion Test Env - - Your 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: - - - `0 suggestions` - Returns no suggestions - `[PRIMARY NUMBER] - s[uggestion]` - Returns a maximum of ten predefined suggested addresses. + Your 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: + - `0 suggestions` - Returns no suggestions - `[PRIMARY NUMBER] s[uggestion]` - Returns a maximum of ten predefined suggested addresses. `[PRIMARY NUMBER]` does not have to be a valid primary number when sending a test request. Each additional letter in `suggestion` reduces the number of suggestions by one (e.g. `1 su` returns 9 suggested addresses). `[PRIMARY NUMBER]` does not affect the number of suggestions returned. - City and state filters work as expected and filter the list of - predetermined suggested addresses. - - See the `test` request & response examples under [Autocomplete - Examples](#operation/autocompletion) within the "Autocomplete a partial - address" section in US Autocompletions.
back to top
+ City and state filters work as expected and filter the list of predetermined suggested addresses. + See the `test` request & response examples under [Autocomplete Examples](#operation/autocompletion) within the "Autocomplete a partial address" section in US Autocompletions.
back to top
- name: US Verification Types x-traitTag: true - description: > - These are detailed definitions for various fields in the [US verification - object](#operation/us_verification). - + description: | + These are detailed definitions for various fields in the [US verification object](#operation/us_verification).

ZIP Code Types - components[zip_code_type]

- @@ -2788,10 +2042,8 @@ tags:
-

Record Types - components[record_type]

- @@ -2825,10 +2077,8 @@ tags:
-

Carrier Route Types - components[carrier_route_type]

- @@ -2858,10 +2108,7 @@ tags:
- -

DPV Footnotes - - deliverability_analysis[dpv_footnotes]

- +

DPV Footnotes - deliverability_analysis[dpv_footnotes]

@@ -2943,38 +2190,20 @@ tags:
- -
back to - top
+
back to top
- name: US Verifications - description: > + description: | Validate, automatically correct, and standardize the addresses in your - - address book based on USPS's Coding Accuracy Support System (CASS). - + address book based on USPS's Coding Accuracy Support System (CASS).
- -
back to - top
- +
back to top
## US Verifications Test Env - - When verifying US addresses, you'll likely want to test against a wide - array of addresses to - - ensure you're handling responses correctly. With your test API key, - requests that use specific - - values for `address` or `primary_line` and (if using `primary_line`) an - arbitrary five digit - - number for `zip_code` (e.g. "11111") let you explore the responses to many - types of addresses: - + When verifying US addresses, you'll likely want to test against a wide array of addresses to + ensure you're handling responses correctly. With your test API key, requests that use specific + values for `address` or `primary_line` and (if using `primary_line`) an arbitrary five digit + number for `zip_code` (e.g. "11111") let you explore the responses to many types of addresses: @@ -3054,11288 +2283,701 @@ tags:
- - See the `test` request & response examples under [US Verification - Examples](#operation/us_verification) within the - + See the `test` request & response examples under [US Verification Examples](#operation/us_verification) within the "Verify a US or US territory address" section in US Verifications. - - You can rely on the response from these examples generally matching the - response you'd see in the live environment with an - + You can rely on the response from these examples generally matching the response you'd see in the live environment with an address of that type (excluding the `recipient` field). - - The test API key does not perform any verification, automatic correction, - or standardization for addresses. If you wish to - - try these features out, use our live demo - or the free plan (see our - pricing for details). - -
back to - top
+ The test API key does not perform any verification, automatic correction, or standardization for addresses. If you wish to + try these features out, use our live demo or the free plan (see our pricing for details). +
back to top
- name: Versioning and Changelog x-traitTag: true - description: > + description: | ### API Versioning - - When backwards-incompatible changes are made to the API, a new dated - version - + When backwards-incompatible changes are made to the API, a new dated version is released. The latest version of the API is version **2024-01-01**. - - All versions prior to, and inclusive of, 2019-02-11 have been sunsetted. - You can - + All versions prior to, and inclusive of, 2019-02-11 have been sunsetted. You can view your version and upgrade to the latest version in your - - Dashboard Settings. You will - - only need to specify a version if you would like to test a newer version - of - + Dashboard Settings. You will + only need to specify a version if you would like to test a newer version of the API without doing a full upgrade. The API will return an error if a - version older than your current one is passed in. - ### Example Request - ```bash curl https://api.lob.com/v1/addresses \ -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \ -H "Lob-Version: 2024-01-01" ``` - ### Specification Versioning + You might be wondering why our API and specification use different versioning schemes. + Lob's API predates our specification and follows the Stripe versioning + approach. This works well to manage backwards-incompatible changes to our API. - You might be wondering why our API and specification use different - versioning schemes. - - Lob's API predates our specification and follows the Stripe - versioning - - approach. This works well to manage backwards-incompatible changes to our - API. - - - For our API specification (used to create this documentation), we've - chosen semantic - + For our API specification (used to create this documentation), we've chosen semantic versioning. This versioning reflects the backward-compatible - changes that do not require a versioning of Lob's API. - - Lob's API specification will be used to generate artifacts like - documentation, client SDKs, - - and other developer tooling. Semantic versioning of our specification will - inform how we - - version those artifacts like SDKs. It is helpful to know the version of a - specification - - used to produce an artifact in order reference the specification release - notes. - + Lob's API specification will be used to generate artifacts like documentation, client SDKs, + and other developer tooling. Semantic versioning of our specification will inform how we + version those artifacts like SDKs. It is helpful to know the version of a specification + used to produce an artifact in order reference the specification release notes. ### Changelog View our Changelog here. - name: Webhooks x-traitTag: true - description: > - Webhooks are an easy way to get notifications on events happening - asynchronously - - within Lob's architecture. For example, when a postcard gets a "Processed - For - - Delivery" tracking event, an event object of type - `postcard.processed_for_delivery` - - will be created. If you are subscribed to that event type in that - Environment - - (Test vs. Live), Lob will send that event to any URLs you've specified via - an - - HTTP POST request. In Live mode, you can only have as many webhooks as - allotted - - in your current Print & Mail Edition. - + description: | + Webhooks are an easy way to get notifications on events happening asynchronously + within Lob's architecture. For example, when a postcard gets a "Processed For + Delivery" tracking event, an event object of type `postcard.processed_for_delivery` + will be created. If you are subscribed to that event type in that Environment + (Test vs. Live), Lob will send that event to any URLs you've specified via an + HTTP POST request. In Live mode, you can only have as many webhooks as allotted + in your current Print & Mail Edition. There is no limit in Test mode. - - You can view and create webhooks on the - - Lob Dashboard, as well as view your events. - - See our Webhooks Integration Guide for more - - details on how to integrate. Please see the full list of event types - available for - + You can view and create webhooks on the + Lob Dashboard, as well as view your events. + See our Webhooks Integration Guide for more + details on how to integrate. Please see the full list of event types available for subscription here. - -
back to - top
+
back to top
- name: Zip Lookups - description: > - Find a list of cities, states and associated information about a US ZIP - code.
back to - top
-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 - - Bank Accounts - - Templates - - Template Versions - - Template Design - - Manage Mail - - name: Campaigns API (BETA) - tags: - - Campaigns - - Creatives - - Uploads - - name: Address Verification API - tags: - - US Verifications - - US Verification Types - - US Autocompletions - - Reverse Geocode Lookups - - Zip Lookups - - Identity Validation - - Intl Autocompletions - - 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 -components: - securitySchemes: - basicAuth: - type: http - scheme: basic - schemas: - lob_credits_balance: - type: object - required: - - balance - properties: - balance: - type: number - description: >- - Account's current balance of Lob Credits. Can be positive, negative, - or zero. - example: 1000 - date_filter: - type: object - 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 ≥, and - `lte` is ≤. - 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}' - failure_status_code: - type: integer - enum: - - 401 - - 403 - - 404 - - 413 - - 422 - - 429 - - 500 - description: | - A conventional HTTP status code: - * `401` - Authorization error with your API key or account - * `403` - Forbidden error with your API key or account - * `404` - The requested item does not exist - * `413` - Payload too large - * `422` - The query or body parameters did not pass validation - * `429` - Too many requests have been sent with an API key in a given amount of time - * `500` - An internal server error occurred, please contact support@lob.com - 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 - - 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 - description: > - A pre-defined string identifying an error. Error codes fall into - three categories: - - - **GENERIC** - - * `bad_request` - 422: an invalid request was made. See error - message for details. - - * `conflict` - 409/422: this operation would leave data in a - conflicted state. - - * `feature_limit_reached` - 403: the account has reached its - resource limit and requires upgrading to add more. - - * `internal_server_error` - 500: an error has occured on Lob's - servers. Please try request again. + description: | + Find a list of cities, states and associated information about a US ZIP code.
back to top
+paths: + /accounts: + get: + operationId: get_lob_credits_balance + summary: Get Lob Credits Balance + description: Returns the account's current balance of Lob Credits. + tags: + - Accounts + - Lob Credits + responses: + '200': + description: Returns a lob_credits_balance object. + content: + application/json: + schema: + $ref: '#/components/schemas/lob_credits_balance' + examples: + empty: + value: + balance: 0 + negative: + value: + balance: -1234.56 + positive: + value: + balance: 1000 + x-codeSamples: + - lang: Shell + source: | + curl https://api.lob.com/v1/accounts/credits_balance \ + -u : + label: CURL + /addresses: + get: + operationId: addresses_list + summary: List + description: Returns a list of your addresses. The addresses are returned sorted by creation date, with the most recently created addresses appearing first. + tags: + - Addresses + 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' + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://api.lob.com/v1/addresses?limit=2" \ + -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: + label: CURL + - lang: Typescript + source: | + try { + const addresses = await new AddressesApi(config).list(2); + } catch (err: any) { + console.error(err); + } + label: TYPESCRIPT + - lang: Javascript + source: | + Lob.addresses.list({limit: 2}, function (err, res) { + console.log(err, res); + }); + label: NODE + - lang: Ruby + source: | + addressesApi = AddressesApi.new(config) - * `invalid` - 422: an invalid request was made. See error - message for details. + begin + addresses = addressesApi.list({ limit: 2 }) + rescue => err + p err.message + end + label: RUBY + - lang: Python + source: | + with ApiClient(configuration) as api_client: + api = AddressesApi(api_client) - * `not_deletable` - 422: an attempt was made to delete a - resource, but the resource cannot be deleted. + try: + addresses = api.list(limit=2) + except ApiException as e: + print(e) + label: PYTHON + - lang: PHP + source: | + $apiInstance = new OpenAPI\Client\Api\AddressesApi($config, new GuzzleHttp\Client()); - * `not_found` - 404: the requested resource was not found. - - * `request_timeout` - 408: the request took too long. Please try - again. - - * `service_unavailable` - 503: the Lob servers are temporarily - unavailable. Please try agian. - - * `unrecognized_endpoint` - 404: the requested endpoint doesn't - exist. - - * `unsupported_lob_version` - 422: an unsupported Lob API - version was requested. - - - **ADVANCED** - - * `address_length_exceeds_limit` - 422: the sum of - to.address_line1 and to.address_line2 cannot surpass 50 - characters. - - * `bank_account_already_verified` - 422: the bank account has - already been verified. - - * `bank_error` - 422: there's an issue with the bank account. - - * `billing_address_required` - 403: in order to create a live - mail piece, your account needs to set up a billing address. - - * `custom_envelope_inventory_depleted` - 422: custom envelope - inventory is depleted, and more will need to be ordered. - - * `deleted_bank_account` - 404: checks cannot be created with a - deleted bank account. - - * `failed_deliverability_strictness` - 422: the `to` address - doesn't meet strictness requirements. See Account Settings to configure strictness. - - * `file_pages_below_min` - 422: not enough pages. - - * `file_pages_exceed_max` - 422: too many pages. - - * `file_size_exceeds_limit` - 422: the file size is too large. - See description for details. + try { + $result = $apiInstance->list( + 2, // limit + ); + } catch (Exception $e) { + echo $e->getMessage(), PHP_EOL; + } + - lang: Java + source: | + AddressesApi apiInstance = new AddressesApi(config); - * `foreign_return_address` - 422: the `from` address must be a - US address. + try { + AddressList response = apiInstance.list( + 2, // limit + null, // before + null, // after + null, // include + null, // dateCreated + null // metadata + ); + } catch (ApiException e) { + e.printStackTrace(); + } + label: JAVA + - lang: Elixir + source: | + Lob.Address.list(%{limit: 2}) + label: ELIXIR + - lang: CSharp + source: | + AddressesApi api = new AddressesApi(config); - * `inconsistent_page_dimensions` - 422: all pages of the input - file must have the same dimensions. + List includeList = new List(); + includeList.Add("total_count"); + Dictionary metadata = new Dictionary(); + metadata.Add("name", "Harry"); + Dictionary dateCreated = new Dictionary(); + DateTime dateCreatedDate = DateTime.Today.AddMonths(-1); + dateCreated.Add("lt", dateCreatedDate); - * `invalid_bank_account` - 422: the provided bank routing number - is invalid. + try { + AddressList response = api.list( + 2, // limit + null, // before + null, // after + includeList, // include + dateCreated, // dateCreated + metadata // metadata + ); + } catch (ApiException e) { + Console.WriteLine(e.ToString()); + } + label: CSHARP + - lang: Go + source: | + var context = context.Background() + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) - * `invalid_bank_account_verification` - 422: verification - amounts do not match. + var apiClient = *lob.NewAPIClient(configuration) + AddressList = apiClient.AddressesApi.List(context).Execute() + if err != nil { + return err + } + label: GO + post: + operationId: address_create + summary: Create + description: Creates a new address given information + tags: + - Addresses + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/address_editable' + examples: + full_us: + value: + description: Harry - Office + name: Harry Zhang + company: Lob + email: harry@lob.com + phone: '5555555555' + address_line1: 210 King St + address_line2: '# 6100' + address_city: San Francisco + address_state: CA + address_zip: '94107' + address_country: US + ncoa_us_test: + value: + description: Harry - Office + name: Harry Zhang + company: Lob + email: harry@lob.com + phone: '5555555555' + address_line1: NCOA + address_line2: '#6100' + address_city: San Francisco + address_state: CA + address_zip: '94107' + address_country: US + full_intl: + value: + description: Harry - Office + name: Harry Zhang + company: Lob + email: harry@lob.com + phone: '5555555555' + address_line1: 370 WATER ST + address_line2: '' + address_city: SUMMERSIDE + address_state: PRINCE EDWARD ISLAND + address_zip: C1N 1C4 + address_country: CA + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/address_editable' + examples: + full_us: + value: + description: Harry - Office + name: Harry Zhang + company: Lob + email: harry@lob.com + phone: '5555555555' + address_line1: 210 King St + address_line2: '# 6100' + address_city: San Francisco + address_state: CA + address_zip: '94107' + address_country: US + ncoa_us_test: + value: + description: Harry - Office + name: Harry Zhang + company: Lob + email: harry@lob.com + phone: '5555555555' + address_line1: NCOA + address_line2: '# 6100' + address_city: San Francisco + address_state: CA + address_zip: '94107' + address_country: US + full_intl: + value: + description: Harry - Office + name: Harry Zhang + company: Lob + email: harry@lob.com + phone: '5555555555' + address_line1: 370 WATER ST + address_line2: '' + address_city: SUMMERSIDE + address_state: PRINCE EDWARD ISLAND + address_zip: C1N 1C4 + address_country: CA + encoding: + metadata: + style: deepObject + explode: true + multipart/form-data: + schema: + $ref: '#/components/schemas/address_editable' + examples: + full_us: + value: + description: Harry - Office + name: Harry Zhang + company: Lob + email: harry@lob.com + phone: '5555555555' + address_line1: 210 King St + address_line2: '# 6100' + address_city: San Francisco + address_state: CA + address_zip: '94107' + address_country: US + ncoa_us_test: + value: + description: Harry - Office + name: Harry Zhang + company: Lob + email: harry@lob.com + phone: '5555555555' + address_line1: NCOA + address_line2: '# 6100' + address_city: San Francisco + address_state: CA + address_zip: '94107' + address_country: US + full_intl: + value: + description: Harry - Office + name: Harry Zhang + company: Lob + email: harry@lob.com + phone: '5555555555' + address_line1: 370 WATER ST + address_line2: '' + address_city: SUMMERSIDE + address_state: PRINCE EDWARD ISLAND + address_zip: C1N 1C4 + address_country: CA + responses: + '200': + $ref: '#/components/responses/post_address' + default: + $ref: '#/components/responses/address_error' + x-codeSamples: + - lang: Shell + source: | + curl https://api.lob.com/v1/addresses \ + -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \ + -d "description=Harry - Office" \ + -d "name=Harry Zhang" \ + -d "company=Lob" \ + -d "email=harry@lob.com" \ + -d "phone=5555555555" \ + -d "address_line1=210 King St" \ + -d "address_line2=# 6100" \ + -d "address_city=San Francisco" \ + -d "address_state=CA" \ + -d "address_zip=94107" \ + -d "address_country=US" + label: CURL + - lang: Typescript + source: | + const addressCreate = new AddressEditable({ + description: 'Harry - Office', + name: 'Harry Zhang', + company: 'Lob', + email: 'harry@lob.com', + phone: '5555555555', + address_line1: '210 King St', + address_line2: '# 6100', + address_city: 'San Francisco', + address_state: 'CA', + address_zip: '94107', + address_country: 'US' + }); - * `invalid_check_international` - 422: checks cannot be sent - internationally. - - * `invalid_country_covid` - 422: the postal service in the - specified country is currently unable to process the request due - to COVID-19 restrictions. + try { + const myAddress = await new AddressesApi(config).create(addressCreate); + } catch (err: any) { + console.error(err); + } + label: TYPESCRIPT + - lang: Javascript + source: | + Lob.addresses.create({ + description: 'Harry - Office', + name: 'Harry Zhang', + company: 'Lob', + email: 'harry@lob.com', + phone: '5555555555', + address_line1: '210 King St', + address_line2: '# 6100', + address_city: 'San Francisco', + address_state: 'CA', + address_zip: '94107', + address_country: 'US' + }, function (err, res) { + console.log(err, res); + }); + label: NODE + - lang: Ruby + source: | + addressCreate = AddressEditable.new({ + description: "Harry - Office", + name: "Harry Zhang", + company: "Lob", + email: "harry@lob.com", + phone: "5555555555", + address_line1: "210 King St", + address_line2: "# 6100", + address_city: "San Francisco", + address_state: "CA", + address_zip: "94107", + address_country: "US", + }); - * `invalid_file` - 422: the file is invalid. + addressApi = AddressesApi.new(config) - * `invalid_file_dimensions` - 422: file dimensions are incorrect - for the selected mail type. + begin + createdAddress = addressApi.create(addressCreate) + rescue => err + p err.message + end + label: RUBY + - lang: Python + source: | + address_editable = AddressEditable( + description = "Harry - Office", + name = "Harry Zhang", + company = "Lob", + email = "harry@lob.com", + phone = "5555555555", + address_line1 = "210 King St", + address_line2 = "# 6100", + address_city = "San Francisco", + address_state = "CA", + address_zip = "94107", + address_country = CountryExtended("US"), + ) - * `invalid_file_download_time` - 422: file download from remote - server took too long. + with ApiClient(configuration) as api_client: + api = AddressesApi(api_client) - * `invalid_file_url` - 422: the file URL when creating a - resource is invalid. + try: + created_address = api.create(address_editable) + except ApiException as e: + print(e) + label: PYTHON + - lang: PHP + source: | + $apiInstance = new OpenAPI\Client\Api\AddressesApi($config, new GuzzleHttp\Client()); - * `invalid_image_dpi` - 422: DPI must be at least 300. + $address_editable = new OpenAPI\Client\Model\AddressEditable( + array( + "description" => "Harry - Office", + "name" => "Harry Zhang", + "company" => "Lob", + "email" => "harry@lob.com", + "phone" => "5555555555", + "address_line1" => "210 King St", + "address_line2" => "# 6100", + "address_city" => "San Francisco", + "address_state" => "CA", + "address_zip" => "94107", + "address_country" => "US", + ) + ); - * `invalid_international_feature` - 422: the specified product - cannot be sent to the destination. + try { + $result = $apiInstance->create($address_editable); + } catch (Exception $e) { + echo $e->getMessage(), PHP_EOL; + } + - lang: Java + source: | + AddressesApi apiInstance = new AddressesApi(config); - * `invalid_perforation_return_envelope` - 422: both - `return_envelope` and `perforation` must be used together. + try { + AddressEditable addressEditable = new AddressEditable(); + addressEditable.setDescription("Harry - Office"); + addressEditable.setName("Harry Zhang"); + addressEditable.setCompany("Lob"); + addressEditable.setEmail("harry@lob.com"); + addressEditable.setPhone("5555555555"); + addressEditable.setAddressLine1("210 King St"); + addressEditable.setAddressLine2("# 6100"); + addressEditable.setAddressCity("San Francisco"); + addressEditable.setAddressState("CA"); + addressEditable.setAddressZip("94107"); + addressEditable.setAddressCountry(CountryExtended.US); - * `invalid_template_html` - 422: the provided HTML is invalid. + Address result = apiInstance.create(addressEditable); + } catch (ApiException e) { + e.printStackTrace(); + } + label: JAVA + - lang: Elixir + source: | + Lob.Address.create(%{ + description: "Harry - Office", + name: "Harry Zhang", + company: "Lob", + email: "harry@lob.com", + phone: "5555555555", + address_line1: "210 King St", + address_line2: "# 6100", + address_city: "San Francisco", + address_state: "CA", + address_country: "US", + address_zip: "94107" + }) + label: ELIXIR + - lang: CSharp + source: | + AddressesApi api = new AddressesApi(config); - * `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. + AddressEditable addressEditable = new AddressEditable( + "210 King St", // addressLine1 + "# 6100", // addressLine2 + "San Francisco", // addressCity + "CA", // addressState + "94107", // addressZip + CountryExtended.US, // addressCountry + "Harry - Office", // description + "Harry Zhang", // name + "Lob", // company + "5555555555", // phone + "harry@lob.com" // email + ); - * `merge_variable_required` - 422: a required merge variable is - missing. + try { + Address result = api.create(addressEditable); + } catch (ApiException e) { + Console.WriteLine(e.ToString()); + } + label: CSHARP + - lang: Go + source: | + var context = context.Background() + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) - * `merge_variable_whitespace` - 422: merge variable names cannot - contain whitespace. + var apiClient = *lob.NewAPIClient(configuration) - * `payment_method_unverified` - 401: you must have a verified - bank account or credit card to submit live requests. - * `pdf_encrypted` - 422: an encrypted PDF was provided. + var addressCreate = *lob.NewAddressEditable() + addressCreate.SetDescription("Harry - Office") + addressCreate.SetName("Harry Zhang") + addressCreate.SetCompany("Lob") + addressCreate.SetEmail("harry@lob.com") + addressCreate.SetPhone("5555555555") + addressCreate.SetAddressLine1("210 King St") + addressCreate.SetAddressLine2("# 6100") + addressCreate.SetAddressCity("San Francisco") + addressCreate.SetAddressState("CA") + addressCreate.SetAddressZip("94107") + addressCreate.SetAddressCountry("US") - * `special_characters_restricted` - 422: cannot use special - characters for merge variable names. - * `unembedded_fonts` - 422: the provided PDF contains - non-standard unembedded fonts. See description for details. + createdaddress, _, err := apiClient.AddressesApi.Create(context).AddressEditable(addressCreate).Execute() - **AUTHENTICATION** + if err != nil { + return err + } + label: GO + /addresses/{adr_id}: + parameters: + - in: path + name: adr_id + description: id of the address + required: true + schema: + $ref: '#/components/schemas/adr_id' + get: + operationId: address_retrieve + summary: Retrieve + description: Retrieves the details of an existing address. You need only supply the unique identifier that was returned upon address creation. + tags: + - Addresses + responses: + '200': + $ref: '#/components/responses/address' + default: + $ref: '#/components/responses/address_error' + x-codeSamples: + - lang: Shell + source: | + curl https://api.lob.com/v1/addresses/adr_fa85158b26c3eb7c \ + -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: + label: CURL + - lang: Typescript + source: | + try { + const address = await new AddressesApi(config).get('adr_xxxx'); + } catch (err: any) { + console.error(err); + } + label: TYPESCRIPT + - lang: Javascript + source: | + Lob.addresses.retrieve('adr_fa85158b26c3eb7c', function (err, res) { + console.log(err, res); + }); + label: NODE + - lang: Ruby + source: | + addressApi = AddressesApi.new(config) - * `email_required` - 401: account must have a verified email - address before creating live resources. + begin + retrievedAddress = addressApi.get("adr_fa85158b26c3eb7c") + rescue => err + p err.message + end + label: RUBY + - lang: Python + source: | + with ApiClient(configuration) as api_client: + api = AddressesApi(api_client) - * `invalid_api_key` - 401/403: the API key is invalid. + try: + address = api.get("adr_fa85158b26c3eb7c") + except ApiException as e: + print(e) + label: PYTHON + - lang: PHP + source: | + $apiInstance = new OpenAPI\Client\Api\AddressesApi($config, new GuzzleHttp\Client()); - * `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. + try { + $result = $apiInstance->get("adr_fa85158b26c3eb7c"); + } catch (Exception $e) { + echo $e->getMessage(), PHP_EOL; + } + - lang: Java + source: | + AddressesApi apiInstance = new AddressesApi(config); - * `rate_limit_exceeded` - 429: requests were sent too quickly - and must be slowed down. - - * `unauthorized` - 401: the request isn't authorized. - - * `unauthorized_token` - 401: token isn't authorized. - object: - type: string - description: Value is resource type. - count: - type: integer - description: number of resources in a set - list: - type: object - description: Multiple items returned in order - properties: - object: - $ref: '#/components/schemas/object' - next_url: - type: string - description: Url of next page of items in list. - nullable: true - previous_url: - type: string - description: Url of previous page of items in list. - nullable: true - count: - $ref: '#/components/schemas/count' - total_count: - type: integer - description: >- - Indicates the total number of records. Provided when the request - specifies an "include" query parameter - date_created: - type: string - format: date-time - description: A timestamp in ISO 8601 format of the date the resource was created. - date_modified: - type: string - format: date-time - description: >- - A timestamp in ISO 8601 format of the date the resource was last - modified. - deleted: - type: boolean - description: Only returned if the resource has been successfully deleted. - lob_base: - type: object - required: - - date_created - - date_modified - - object - 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' - adr_id: - type: string - description: Unique identifier prefixed with `adr_`. - pattern: ^adr_[a-zA-Z0-9]+$ - resource_description: - type: string - description: > - An internal description that identifies this resource. Must be no longer - than 255 characters. - maxLength: 255 - nullable: true - address_us: - allOf: - - $ref: '#/components/schemas/lob_base' - - type: object - required: - - id - - address_line1 - - address_city - - address_state - - address_zip - anyOf: - - title: address obj with `name` defined - required: - - name - - title: address obj with `company` defined - required: - - company - properties: - id: - $ref: '#/components/schemas/adr_id' - object: - type: string - description: Value is resource type. - enum: - - address - default: address - description: - $ref: '#/components/schemas/resource_description' - name: - type: string - 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 - nullable: true - company: - type: string - 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 - nullable: true - phone: - type: string - description: Must be no longer than 40 characters. - maxLength: 40 - nullable: true - email: - type: string - description: Must be no longer than 100 characters. - maxLength: 100 - nullable: true - address_line1: - type: string - description: The primary number, street name, and directional information. - maxLength: 64 - address_line2: - type: string - description: >- - An optional field containing any information which can't fit - into line 1. - maxLength: 64 - nullable: true - address_city: - type: string - maxLength: 200 - address_state: - type: string - description: 2 letter state short-name code - pattern: ^[a-zA-Z]{2}$ - address_zip: - type: string - description: > - Must follow the ZIP format of `12345` or ZIP+4 format of - `12345-1234`. - pattern: ^\d{5}(-\d{4})?$ - address_country: - type: string - enum: - - UNITED STATES - description: Full name of country - minLength: 13 - maxLength: 13 - metadata: - $ref: '#/components/schemas/metadata' - recipient_moved: - type: boolean - description: > - Only returned for accounts on certain Print & Mail Editions. Value is `true` - if the address was altered because the recipient filed for a National Change of - Address Linkage (NCOALink), `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. - nullable: true - example: - id: adr_e68217bd744d65c8 - description: Harry - Office - name: HARRY ZHANG - company: LOB - phone: '5555555555' - email: harry@lob.com - 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: {} - recipient_moved: false - date_created: '2019-08-12T00:16:00.361Z' - date_modified: '2019-08-12T00:16:00.361Z' - object: address - company: - type: string - 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 - nullable: true - address_intl: - allOf: - - $ref: '#/components/schemas/lob_base' - - type: object - required: - - id - - address_line1 - - address_country - anyOf: - - title: address obj with `name` defined - required: - - name - - title: address obj with `company` defined - required: - - company - properties: - id: - $ref: '#/components/schemas/adr_id' - description: - $ref: '#/components/schemas/resource_description' - name: - type: string - 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 - nullable: true - company: - $ref: '#/components/schemas/company' - phone: - type: string - description: Must be no longer than 40 characters. - maxLength: 40 - nullable: true - email: - type: string - description: Must be no longer than 100 characters. - maxLength: 100 - nullable: true - metadata: - $ref: '#/components/schemas/metadata' - address_line1: - type: string - maxLength: 200 - address_line2: - type: string - maxLength: 200 - nullable: true - address_city: - type: string - maxLength: 200 - nullable: true - address_state: - description: Will be returned as a full string - type: string - maxLength: 200 - nullable: true - address_zip: - type: string - description: Optional postal code. - maxLength: 40 - nullable: true - address_country: - description: Full name of country - type: string - maxLength: 200 - enum: - - AFGHANISTAN - - ALBANIA - - ALGERIA - - AMERICAN SAMOA - - ANDORRA - - ANGOLA - - ANGUILLA - - ANTARCTICA - - ANTIGUA AND BARBUDA - - ARGENTINA - - ARUBA - - AUSTRALIA - - AUSTRIA - - AZERBAIJAN - - BAHRAIN - - BANGLADESH - - BARBADOS - - BELARUS - - BELGIUM - - BELIZE - - BENIN - - BERMUDA - - BHUTAN - - BOLIVIA (PLURINATIONAL STATE OF) - - BONAIRE, SAINT EUSTATIUS AND SABA - - BOSNIA AND HERZEGOVINA - - BOTSWANA - - BRAZIL - - BRITISH INDIAN OCEAN TERRITORY - - BRITISH VIRGIN ISLANDS - - BRUNEI DARUSSALAM - - BULGARIA - - BURKINA FASO - - BURUNDI - - CABO VERDE - - CAMBODIA - - CAMEROON - - CANADA - - CAYMAN ISLANDS - - CENTRAL AFRICAN REPUBLIC - - CHAD - - CHILE - - CHINA - - COLOMBIA - - COMOROS - - CONGO - - CONGO, DEMOCRATIC REPUBLIC OF THE - - COOK ISLANDS - - COSTA RICA - - CÔTE D'IVOIRE - - CROATIA - - CUBA - - CURAÇAO - - CYPRUS - - CZECH REPUBLIC - - DENMARK - - DJIBOUTI - - DOMINICA - - DOMINICAN REPUBLIC - - ECUADOR - - EGYPT - - EL SALVADOR - - EQUATORIAL GUINEA - - ERITREA - - ESTONIA - - ESWATINI - - ETHIOPIA - - FALKLAND ISLANDS (MALVINAS) - - FAROE ISLANDS - - FIJI - - FINLAND - - FRANCE - - GABON - - GAMBIA - - GEORGIA - - GERMANY - - GHANA - - GIBRALTAR - - GREECE - - GREENLAND - - GRENADA - - GUATEMALA - - GUINEA - - GUINEA-BISSAU - - GUYANA - - HAITI - - HOLY SEE - - HONDURAS - - HONG KONG - - HUNGARY - - ICELAND - - INDIA - - INDONESIA - - IRAN (ISLAMIC REPUBLIC OF) - - IRAQ - - IRELAND - - ISRAEL - - ITALY - - JAMAICA - - JAPAN - - JORDAN - - KAZAKHSTAN - - KENYA - - KIRIBATI - - KOREA (DEMOCRATIC PEOPLE’S REPUBLIC OF) - - KOREA, REPUBLIC OF - - KUWAIT - - KYRGYZSTAN - - LAO PEOPLE’S DEMOCRATIC REPUBLIC - - LATVIA - - LEBANON - - LESOTHO - - LIBERIA - - LIBYA - - LIECHTENSTEIN - - LITHUANIA - - LUXEMBOURG - - MACAO - - MACEDONIA - - MADAGASCAR - - MALAWI - - MALAYSIA - - MALDIVES - - MALI - - MALTA - - MAURITANIA - - MAURITIUS - - MEXICO - - MOLDOVA, REPUBLIC OF - - MONACO - - MONGOLIA - - MONTENEGRO - - MONTSERRAT - - MOROCCO - - MOZAMBIQUE - - MYANMAR - - NAMIBIA - - NAURU - - NEPAL - - NETHERLAND ANTILLES - - NETHERLANDS - - NEW ZEALAND - - NICARAGUA - - NIGER - - NIGERIA - - NIUE - - NORFOLK ISLAND - - NORWAY - - OMAN - - PAKISTAN - - PANAMA - - PAPUA NEW GUINEA - - PARAGUAY - - PERU - - PHILIPPINES - - PITCAIRN - - POLAND - - PORTUGAL - - QATAR - - ROMANIA - - RUSSIAN FEDERATION - - RWANDA - - SAINT HELENA - - SAINT KITTS AND NEVIS - - SAINT LUCIA - - SAINT VINCENT AND THE GRENADINES - - SAMOA - - SAN MARINO - - SAO TOME AND PRINCIPE - - SAUDI ARABIA - - SENEGAL - - SERBIA - - SEYCHELLES - - SIERRA LEONE - - SINGAPORE - - SINT MAARTEN - - SLOVAKIA - - SLOVENIA - - SOLOMON ISLANDS - - SOMALIA - - SOUTH AFRICA - - SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS - - SOUTH SUDAN - - SPAIN - - SRI LANKA - - SUDAN - - SURINAME - - SWEDEN - - SWITZERLAND - - SYRIAN ARAB REPUBLIC - - TAIWAN - - TAJIKISTAN - - TANZANIA - - THAILAND - - THE BAHAMAS - - TIMOR-LESTE - - TOGO - - TOKELAU - - TONGA - - TRINIDAD AND TOBAGO - - TUNISIA - - TURKEY - - TURKMENISTAN - - TURKS AND CAICOS ISLANDS - - TUVALU - - UGANDA - - UKRAINE - - UNITED ARAB EMIRATES - - UNITED KINGDOM - - URUGUAY - - UZBEKISTAN - - VANUATU - - VENEZUELA - - VIET NAM - - WESTERN SAHARA - - YEMEN - - ZAMBIA - - ZIMBABWE - object: - type: string - description: Value is resource type. - enum: - - address - default: address - example: - id: adr_e68217bd744d65c8 - description: Harry - Office - name: Harry Zhang - company: Lob - phone: '5555555555' - email: harry@lob.com - metadata: {} - address_line1: 370 WATER ST - address_line2: '' - address_city: SUMMERSIDE - address_state: PRINCE EDWARD ISLAND - address_zip: C1N 1C4 - address_country: CANADA - address: - oneOf: - - $ref: '#/components/schemas/address_us' - - $ref: '#/components/schemas/address_intl' - address_fields_us: - type: object - required: - - address_line1 - - address_city - - address_state - - address_zip - properties: - address_line1: - type: string - description: The primary number, street name, and directional information. - maxLength: 64 - address_line2: - type: string - description: >- - An optional field containing any information which can't fit into - line 1. - maxLength: 64 - nullable: true - address_city: - type: string - maxLength: 200 - address_state: - type: string - description: 2 letter state short-name code - pattern: ^[a-zA-Z]{2}$ - address_zip: - type: string - description: > - Must follow the ZIP format of `12345` or ZIP+4 format of - `12345-1234`. - pattern: ^\d{5}(-\d{4})?$ - 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 - 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 - nullable: true - company: - $ref: '#/components/schemas/company' - phone: - type: string - description: Must be no longer than 40 characters. - maxLength: 40 - nullable: true - email: - type: string - description: Must be no longer than 100 characters. - maxLength: 100 - nullable: true - address_country: - type: string - enum: - - US - default: US - metadata: - $ref: '#/components/schemas/metadata' - address_fields_intl: - type: object - required: - - address_line1 - - address_country - properties: - address_line1: - type: string - description: The primary number, street name, and directional information. - maxLength: 200 - address_line2: - type: string - description: >- - An optional field containing any information which can't fit into - line 1. - maxLength: 200 - nullable: true - address_city: - type: string - maxLength: 200 - nullable: true - address_state: - type: string - maxLength: 200 - nullable: true - address_zip: - type: string - description: Optional postal code. - maxLength: 40 - nullable: true - country_extended: - type: string - description: >- - Must be a 2 letter country short-name code (ISO 3166). Does not accept - `US`, `AS`, `PR`, `FM`, `GU`, `MH`, `MP`, `PW`, or `VI`. For these - addresses, please use the US verification API. Also does not accept - `PS`, which is not currently supported. - 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 - address_editable_intl: - allOf: - - $ref: '#/components/schemas/address_fields_intl' - - type: object - anyOf: - - title: address obj with `name` defined - required: - - name - - title: address obj with `company` defined - required: - - company - properties: - description: - $ref: '#/components/schemas/resource_description' - name: - type: string - 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 - nullable: true - company: - $ref: '#/components/schemas/company' - phone: - type: string - description: Must be no longer than 40 characters. - maxLength: 40 - nullable: true - email: - type: string - description: Must be no longer than 100 characters. - maxLength: 100 - nullable: true - address_country: - $ref: '#/components/schemas/country_extended' - metadata: - $ref: '#/components/schemas/metadata' - address_editable: - oneOf: - - $ref: '#/components/schemas/address_editable_us' - - $ref: '#/components/schemas/address_editable_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: - id: - $ref: '#/components/schemas/adr_id' - deleted: - $ref: '#/components/schemas/deleted' - bank_id_no_description: - type: string - pattern: ^bank_[a-zA-Z0-9]+$ - bank_id: - allOf: - - $ref: '#/components/schemas/bank_id_no_description' - - type: string - description: Unique identifier prefixed with `bank_`. - cents: - type: integer - minimum: 1 - maximum: 100 - bank_account_verify: - type: object - required: - - amounts - properties: - amounts: - description: >- - In live mode, an array containing the two micro deposits (in cents) - placed in the bank account. In test mode, no micro deposits will be - placed, so any two integers between `1` and `100` will work. - type: array - minItems: 2 - maxItems: 2 - items: - $ref: '#/components/schemas/cents' - bank_account_base: - type: object - required: - - routing_number - - account_number - - account_type - - signatory - properties: - description: - $ref: '#/components/schemas/resource_description' - routing_number: - description: >- - Must be a valid US routing number. - type: string - minLength: 9 - maxLength: 9 - account_number: - type: string - maxLength: 17 - account_type: - type: string - enum: - - company - - individual - description: The type of entity that holds the account. - 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 Dashboard. - type: string - maxLength: 30 - check_template: - type: string - enum: - - common - - jpm - 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. - fractional_routing_number: - type: string - description: >- - The fractional routing number for your home bank account. Required - for the `jpm` check template only. Please contact a bank - representative if you do not know the fractional routing number - associated with your home bank institution. - city: - type: string - description: >- - The city associated with your home bank account. Required for the - `jpm` check template only. Please contact a bank representative if - you do not know the city associated with your home bank institution. - state: - type: string - description: >- - The state associated with your home bank account. Required for the - `jpm` check template only. Please contact a bank representative if - you do not know the state associated with your home bank - institution. - zipcode: - type: string - description: >- - The zipcode associated with your home bank account. Required for the - `jpm` check template only. Please contact a bank representative if - you do not know the zipcode associated with your home bank - institution. - metadata: - $ref: '#/components/schemas/metadata' - 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-_]+ - bank_account: - allOf: - - $ref: '#/components/schemas/bank_account_base' - - $ref: '#/components/schemas/lob_base' - - type: object - required: - - id - properties: - id: - $ref: '#/components/schemas/bank_id' - signature_url: - allOf: - - type: string - nullable: true - description: A [signed link](#section/Asset-URLs) to the signature image. - - $ref: '#/components/schemas/signed_link' - bank_name: - description: >- - The name of the bank based on the provided routing number, e.g. - `JPMORGAN CHASE BANK`. - type: string - verified: - description: >- - A bank account must be verified before a check can be created. - More info [here](#operation/bank_account_verify). - type: boolean - default: false - object: - type: string - description: Value is resource type. - enum: - - bank_account - default: bank_account - example: - id: bank_a - signature_url: >- - https://lob-assets.com/bank-accounts/asd_asdfghjkqwertyui.pdf?expires=1234567890&signature=aksdf - bank_name: JPMORGAN CHASE BANK - verified: true - object: bank_account - description: Test Bank Account - routing_number: '322271627' - account_number: '123456789' - signatory: Jane Doe - account_type: individual - metadat: - spiffy: 'true' - date_created: '2019-08-08T19:34:47.571Z' - date_modified: '2019-08-08T19:34:47.571Z' - 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: - id: - $ref: '#/components/schemas/bank_id' - deleted: - $ref: '#/components/schemas/deleted' - bg_id: - type: string - description: Unique identifier prefixed with `bg_`. - pattern: ^bg_[a-zA-Z0-9]+$ - bg_description: - type: string - description: Description of the billing group. - maxLength: 255 - name: - type: string - description: Name of the billing group. - maxLength: 255 - billing_group_base: - type: object - properties: - description: - $ref: '#/components/schemas/bg_description' - name: - $ref: '#/components/schemas/name' - billing_group: - allOf: - - $ref: '#/components/schemas/billing_group_base' - - type: object - properties: - id: - $ref: '#/components/schemas/bg_id' - date_created: - $ref: '#/components/schemas/date_created' - date_modified: - $ref: '#/components/schemas/date_modified' - object: - type: string - description: Value is resource type. - enum: - - billing_group - default: billing_group - billing_group_editable: - allOf: - - $ref: '#/components/schemas/billing_group_base' - - required: - - name - buckslip_description: - type: string - description: Description of the buckslip. - maxLength: 255 - nullable: true - buckslip_base: - type: object - properties: - description: - $ref: '#/components/schemas/buckslip_description' - size: - description: The size of the buckslip - enum: - - 8.75x3.75 - type: string - default: 8.75x3.75 - buckslip_id: - type: string - description: Unique identifier prefixed with `bck_`. - pattern: ^bck_[a-zA-Z0-9]+$ - thumbnail: - type: object - properties: - small: - $ref: '#/components/schemas/signed_link' - medium: - $ref: '#/components/schemas/signed_link' - large: - $ref: '#/components/schemas/signed_link' - bo_id: - type: string - description: Unique identifier prefixed with `bo_`. - pattern: ^bo_[a-zA-Z0-9]+$ - buckslip_order: - allOf: - - $ref: '#/components/schemas/lob_base' - - type: object - properties: - id: - $ref: '#/components/schemas/bo_id' - buckslip_id: - $ref: '#/components/schemas/buckslip_id' - status: - description: The status of the buckslip order. - enum: - - pending - - printing - - available - - cancelled - - depleted - type: string - quantity_ordered: - description: The quantity of buckslips ordered. - type: number - default: 0 - unit_price: - description: The unit price for the buckslip order. - type: number - default: 0 - inventory: - description: The inventory of the buckslip order. - type: number - default: 0 - cancelled_reason: - description: The reason for cancellation. - type: string - availability_date: - type: string - format: date-time - description: >- - A timestamp in ISO 8601 format of the date the resource was - created. - expected_availability_date: - type: string - format: date-time - description: The fixed deadline for the buckslips to be printed. - buckslip: - 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 - nullable: true - 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 - remote_file_url: - type: string - description: > - The location of a remote file. Remote URLs have a 20 MB file size limit - and must be downloaded within 40 seconds. - pattern: ^https://[-a-zA-Z0-9@:%._+~#=/]{1,256}.(html?|pdf|png|jpg)$ - local_file_path: - type: string - description: The path to a local file. - pattern: ^(?!https://)[a-zA-Z0-9@:%._+~#=/]{1,256}.(html?|pdf|png|jpg)$ - buckslip_editable: - allOf: - - $ref: '#/components/schemas/buckslip_base' - - type: object - required: - - front - properties: - front: - description: A PDF template for the front of the buckslip - oneOf: - - $ref: '#/components/schemas/remote_file_url' - - $ref: '#/components/schemas/local_file_path' - back: - description: A PDF template for the back of the buckslip - oneOf: - - $ref: '#/components/schemas/remote_file_url' - - $ref: '#/components/schemas/local_file_path' - 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: - id: - $ref: '#/components/schemas/buckslip_id' - deleted: - $ref: '#/components/schemas/deleted' - buckslip_updatable: - type: object - properties: - description: - $ref: '#/components/schemas/buckslip_description' - auto_reorder: - description: Allows for auto reordering - type: boolean - reorder_quantity: - description: >- - The quantity of items to be reordered (only required when - auto_reorder is true). - type: number - minimum: 5000 - maximum: 10000000 - buckslip_order_editable: - type: object - required: - - quantity - properties: - quantity: - type: integer - description: The quantity of buckslips in the order (minimum 5,000). - minimum: 5000 - maximum: 10000000 - recipient: - type: string - description: The intended recipient, typically a person's or firm's name. - nullable: true - maxLength: 500 - primary_line_us: - type: string - description: | - The primary delivery line (usually the street address) of the address. - Combination of the following applicable `components`: - * `primary_number` - * `street_predirection` - * `street_name` - * `street_suffix` - * `street_postdirection` - * `secondary_designator` - * `secondary_number` - * `pmb_designator` - * `pmb_number` - maxLength: 200 - secondary_line: - type: string - description: > - The secondary delivery line of the address. This field is typically - empty but may contain information if `primary_line` is too long. - maxLength: 200 - urbanization: - type: string - description: > - Only present for addresses in Puerto Rico. An urbanization refers to an - area, sector, or development within a city. See USPS documentation for clarification. - maxLength: 200 - city_no_description: - type: string - maxLength: 200 - zip_code: - type: string - pattern: ^\d{5}((-)?\d{4})?$ - multiple_components: - allOf: - - anyOf: - - title: US verification object with `city` and `state` - required: - - city - - state - - title: US verification object with `zip_code` - required: - - zip_code - - type: object - required: - - primary_line - properties: - recipient: - $ref: '#/components/schemas/recipient' - primary_line: - $ref: '#/components/schemas/primary_line_us' - secondary_line: - $ref: '#/components/schemas/secondary_line' - urbanization: - $ref: '#/components/schemas/urbanization' - city: - allOf: - - $ref: '#/components/schemas/city_no_description' - - type: string - description: >- - The name of the city. `city` and `state` are required if no - `zip_code` is passed. - state: - type: string - description: >- - The ISO 3166-2 two letter code or subdivision - name for the state. `city` and `state` are required if no - `zip_code` is passed. - maxLength: 50 - 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' - multiple_components_list: - type: object - required: - - addresses - properties: - addresses: - type: array - minItems: 1 - maxItems: 20 - items: - $ref: '#/components/schemas/multiple_components' - us_ver_id: - type: string - description: Unique identifier prefixed with `us_ver_`. - pattern: ^us_ver_[a-zA-Z0-9_]+$ - primary_number: - type: string - description: >- - The numeric or alphanumeric part of an address preceding the street - name. Often the house, building, or PO Box number. - street_name: - type: string - description: The name of the street. - city: - allOf: - - $ref: '#/components/schemas/city_no_description' - - type: string - description: The name of the city. - state: - type: string - description: > - The ISO 3166-2 two letter code for the state. - maxLength: 2 - zip_code_plus_4: - type: string - pattern: ^\d{4}$ - zip_code_type: - type: string - enum: - - standard - - po_box - - unique - - military - - '' - description: > - A description of the ZIP code type. For more detailed information about - - each ZIP code type, see [US Verification - Details](#tag/US-Verification-Types). - county: - type: string - description: County name of the address city. - county_fips: - type: string - description: > - A 5-digit FIPS county code which uniquely identifies - `components[county]`. It consists of a 2-digit state code and a 3-digit - county code. - pattern: \d{5} - us_components: - type: object - description: A nested object containing a breakdown of each component of an address. - required: - - primary_number - - street_predirection - - street_name - - street_suffix - - street_postdirection - - secondary_designator - - secondary_number - - pmb_designator - - pmb_number - - extra_secondary_designator - - extra_secondary_number - - city - - state - - zip_code - - zip_code_plus_4 - - zip_code_type - - delivery_point_barcode - - address_type - - record_type - - default_building_address - - county - - county_fips - - carrier_route - - carrier_route_type - - po_box_only_flag - properties: - primary_number: - $ref: '#/components/schemas/primary_number' - street_predirection: - type: string - enum: - - 'N' - - S - - E - - W - - NE - - SW - - SE - - NW - - '' - description: > - Geographic direction preceding a street name (`N`, `S`, `E`, `W`, - `NE`, `SW`, `SE`, `NW`). - street_name: - $ref: '#/components/schemas/street_name' - street_suffix: - type: string - description: > - The standard USPS abbreviation for the street suffix (`ST`, `AVE`, - `BLVD`, etc). - street_postdirection: - type: string - enum: - - 'N' - - S - - E - - W - - NE - - SW - - SE - - NW - - '' - description: > - Geographic direction following a street name (`N`, `S`, `E`, `W`, - `NE`, `SW`, `SE`, `NW`). - secondary_designator: - type: string - description: > - The standard USPS abbreviation describing the - `components[secondary_number]` (`STE`, `APT`, `BLDG`, etc). - secondary_number: - type: string - description: | - Number of the apartment/unit/etc. - pmb_designator: - type: string - description: > - Designator of a CMRA-authorized private mailbox. - pmb_number: - type: string - description: > - Number of a CMRA-authorized private mailbox. - extra_secondary_designator: - type: string - description: > - An extra (often unnecessary) secondary designator provided with the - input address. - extra_secondary_number: - type: string - description: > - An extra (often unnecessary) secondary number provided with the - input address. - city: - $ref: '#/components/schemas/city' - state: - $ref: '#/components/schemas/state' - zip_code: - type: string - description: The 5-digit ZIP code - pattern: ^\d{5}$ - 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' - delivery_point_barcode: - type: string - description: > - A 12-digit identifier that uniquely identifies a delivery point - (location where mail can be sent and received). It consists of the - 5-digit ZIP code (`zip_code`), 4-digit ZIP+4 add-on - (`zip_code_plus_4`), 2-digit delivery point, and 1-digit delivery - point check digit. - address_type: - type: string - enum: - - residential - - commercial - - '' - description: > - Uses USPS's Residential Delivery Indicator (RDI) to identify - - whether an address is classified as residential or - - business. Possible values are: - - * `residential` –– The address is residential or a PO Box. - - * `commercial` –– The address is commercial. - - * `''` –– Not enough information provided to be determined. - record_type: - type: string - enum: - - street - - highrise - - firm - - po_box - - rural_route - - general_delivery - - '' - description: > - A description of the type of address. Populated if a DPV match is - made (`deliverability_analysis[dpv_confirmation]` - - is `Y`, `S`, or `D`). For more detailed information about each - record type, see - - [US Verification Details](#tag/US-Verification-Types). - default_building_address: - type: boolean - description: > - Designates whether or not the address is the default address for a - building containing multiple delivery points. - county: - $ref: '#/components/schemas/county' - county_fips: - $ref: '#/components/schemas/county_fips' - carrier_route: - type: string - description: > - A 4-character code assigned to a mail delivery route within a ZIP - code. - carrier_route_type: - type: string - enum: - - city_delivery - - rural_route - - highway_contract - - po_box - - general_delivery - description: > - The type of `components[carrier_route]`. For more detailed - information about - - each carrier route type, see [US Verification - Details](#tag/US-Verification-Types). - po_box_only_flag: - type: string - enum: - - 'Y' - - 'N' - - '' - description: > - Indicates the mailing facility for an address only supports PO Box - deliveries and other forms of mail delivery are not available. - latitude: - type: number - format: float - 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`). - nullable: true - longitude: - type: number - format: float - 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`). - nullable: true - dpv_footnote: - type: string - enum: - - AA - - A1 - - BB - - CC - - N1 - - F1 - - G1 - - U1 - - M1 - - M3 - - P1 - - P3 - - R1 - - R7 - - RR - example: AA - deliverability_analysis: - type: object - description: >- - A nested object containing a breakdown of the deliverability of an - address. - required: - - dpv_confirmation - - dpv_cmra - - dpv_vacant - - dpv_active - - dpv_inactive_reason - - dpv_throwback - - dpv_non_delivery_day_flag - - dpv_non_delivery_day_values - - dpv_no_secure_location - - dpv_door_not_accessible - - dpv_footnotes - - ews_match - - lacs_indicator - - lacs_return_code - - suite_return_code - properties: - dpv_confirmation: - type: string - enum: - - 'Y' - - S - - D - - 'N' - - '' - description: > - Result of Delivery Point Validation (DPV), which determines whether - or not the address is deliverable by the USPS. Possible values are: - - * `Y` –– The address is deliverable by the USPS. - - * `S` –– The address is deliverable by removing the provided - secondary unit designator. This information may be incorrect or - unnecessary. - - * `D` –– The address is deliverable to the building's default - address but is missing a secondary unit designator and/or number. - There is a chance the mail will not reach the intended recipient. - * `N` –– The address is not deliverable according to the USPS, but - parts of the address are valid (such as the street and ZIP code). - - * `''` –– This address is not deliverable. No matching street could - be found within the city or ZIP code. - example: 'Y' - dpv_cmra: - type: string - enum: - - 'Y' - - 'N' - - '' - description: > - Indicates whether or not the address is CMRA-authorized. Possible values are: - - * `Y` –– Address is CMRA-authorized. - - * `N` –– Address is not CMRA-authorized. - - * `''` –– A DPV match is not made - (`deliverability_analysis[dpv_confirmation]` is `N` or an empty - string). - example: 'N' - dpv_vacant: - type: string - enum: - - 'Y' - - 'N' - - '' - description: > - Indicates that an address was once deliverable, but has become - vacant and is no longer receiving deliveries. Possible values are: - - * `Y` –– Address is vacant. - - * `N` –– Address is not vacant. - - * `''` –– A DPV match is not made - (`deliverability_analysis[dpv_confirmation]` is `N` or an empty - string). - example: 'N' - dpv_active: - type: string - enum: - - 'Y' - - 'N' - - '' - 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: - - * `Y` –– Address is active. - - * `N` –– Address is not active. - - * `''` –– A DPV match is not made - (`deliverability_analysis[dpv_confirmation]` is `N` or an empty - string). - example: 'Y' - dpv_inactive_reason: - type: string - enum: - - '01' - - '02' - - '03' - - '04' - - '05' - - '06' - - '' - description: > - Indicates the reason why an address is vacant or no longer receiving - deliveries. Possible values are: - - * `01` –– Address does not receive mail from the USPS directly, but - is serviced by a drop address. - - * `02` –– Address not yet deliverable. - - * `03` –– A DPV match is not made - (`deliverability_analysis[dpv_confirmation]` is `N` or an empty - string). - - * `04` –– Address is a College, Military Zone, or other type. - - * `05` –– Address no longer receives deliveries. - - * `06` –– Address is missing required secondary information. - - * `''` –– A DPV match is not made or the address is active. - example: '06' - dpv_throwback: - type: string - enum: - - 'Y' - - 'N' - - '' - description: > - Indicates a street address for which mail is delivered to a PO Box. - Possible values are: - - * `Y` –– Address is a PO Box throwback delivery point. - - * `N` –– Address is not a PO Box throwback delivery point. - - * `''` –– A DPV match is not made - (`deliverability_analysis[dpv_confirmation]` is `N` or an empty - string). - example: 'N' - dpv_non_delivery_day_flag: - type: string - enum: - - 'Y' - - 'N' - - '' - description: > - Indicates whether deliveries are not performed on one or more days - of the week at an address. Possible values are: - - * `Y` –– Mail delivery does not occur on some days of the week. - - * `N` –– Mail delivery occurs every day of the week. - - * `''` –– A DPV match is not made - (`deliverability_analysis[dpv_confirmation]` is `N` or an empty - string). - example: 'N' - dpv_non_delivery_day_values: - type: string - description: > - Indicates days of the week (starting on Sunday) deliveries are not - performed at an address. For example: - - * `YNNNNNN` –– Mail delivery does not occur on Sunday's. - - * `NYNNNYN` –– Mail delivery does not occur on Monday's or Friday's. - - * `''` –– 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). - example: YNNNNNN - dpv_no_secure_location: - type: string - enum: - - 'Y' - - 'N' - - '' - description: > - Indicates packages to this address will not be left due to security - concerns. Possible values are: - - * `Y` –– Address does not have a secure mailbox. - - * `N` –– Address has a secure mailbox. - - * `''` –– A DPV match is not made - (`deliverability_analysis[dpv_confirmation]` is `N` or an empty - string). - example: 'N' - dpv_door_not_accessible: - type: string - enum: - - 'Y' - - 'N' - - '' - description: > - Indicates the door of the address is not accessible for mail - delivery. Possible values are: - - * `Y` –– Door is not accessible. - - * `N` –– Door is accessible. - - * `''` –– A DPV match is not made - (`deliverability_analysis[dpv_confirmation]` is `N` or an empty - string). - example: 'N' - dpv_footnotes: - type: array - 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). - items: - $ref: '#/components/schemas/dpv_footnote' - example: - - AA - - BB - ews_match: - type: boolean - description: > - Indicates whether or not an address has been flagged in the Early Warning System, meaning the address is - under development and not yet ready to receive mail. However, it - should become available in a few months. - example: false - lacs_indicator: - type: string - enum: - - 'Y' - - 'N' - - '' - description: > - Indicates whether this address has been converted by - - LACSLink. - - LACSLink corrects outdated addresses into their modern - counterparts. - - Possible values are: - - * `Y` –– New address produced with a matching record in - LACSLink. - - * `N` –– New address could not be produced with a matching record in - LACSLink. - - * `''` –– A DPV match is not made - (`deliverability_analysis[dpv_confirmation]` is `N` or an empty - string). - example: '' - lacs_return_code: - type: string - description: > - A code indicating how `deliverability_analysis[lacs_indicator]` was - determined. - - Possible values are: - - * `A` — A new address was produced because a match was found in - LACSLink. - - * `92` — A LACSLink record was matched after dropping - secondary information. - - * `14` — A match was found in LACSLink, but could not be - converted to a deliverable address. - - * `00` — A match was not found in LACSLink, and no new - address was produced. - - * `''` — LACSLink was not attempted. - example: '' - suite_return_code: - type: string - enum: - - A - - '00' - - '' - description: > - A return code that indicates whether the address was matched and - corrected by - - SuiteLink. - - SuiteLink attempts to provide secondary information to - business addresses. - - Possible values are: - - * `A` –– A SuiteLink match was found and secondary - information was added. - - * `00` –– A SuiteLink match could not be found and no - secondary information was added. - - * `''` –– SuiteLink lookup was not attempted. - example: '' - lob_confidence_score: - type: object - description: >- - Lob Confidence Score is a nested object that provides a numerical value - between 0-100 of the likelihood that an address is deliverable based on - Lob’s mail delivery data to over half of US households. - required: - - score - - level - properties: - score: - type: number - nullable: true - format: float - 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. - default: null - minimum: 0 - maximum: 100 - level: - type: string - enum: - - high - - medium - - low - - '' - description: > - Indicates the likelihood that the address is a valid, mail-receiving - address. Possible values are: - - `high` — Over 70% of mailpieces Lob has sent to this address were delivered successfully and recent mailings were also successful. - - `medium` — Between 40% and 70% of mailpieces Lob has sent to this address were delivered successfully. - - `low` — Less than 40% of mailpieces Lob has sent to this address were delivered successfully and recent mailings weren't successful. - - `""` — No tracking data exists for this address or lob deliverability was unable to find a corresponding level of mail success. - us_verification: - type: object - properties: - id: - $ref: '#/components/schemas/us_ver_id' - recipient: - $ref: '#/components/schemas/recipient' - primary_line: - $ref: '#/components/schemas/primary_line_us' - secondary_line: - $ref: '#/components/schemas/secondary_line' - urbanization: - $ref: '#/components/schemas/urbanization' - last_line: - type: string - description: | - Combination of the following applicable `components`: - * City (`city`) - * State (`state`) - * ZIP code (`zip_code`) - * ZIP+4 (`zip_code_plus_4`) - deliverability: - type: string - enum: - - deliverable - - deliverable_unnecessary_unit - - deliverable_incorrect_unit - - deliverable_missing_unit - - undeliverable - description: > - Summarizes the deliverability of the `us_verification` object. - - For full details, see the `deliverability_analysis` field. Possible - values are: - - * `deliverable` – The address is deliverable by the USPS. - - * `deliverable_unnecessary_unit` – The address is deliverable, but - the secondary unit information is unnecessary. - - * `deliverable_incorrect_unit` – The address is deliverable to the - building's default address but the secondary unit provided may not - exist. There is a chance the mail will not reach the intended - recipient. - - * `deliverable_missing_unit` – The address is deliverable to the - building's default address but is missing secondary unit - information. There is a chance the mail will not reach the intended - recipient. - - * `undeliverable` – The address is not deliverable according to the - USPS. - valid_address: - type: boolean - enum: - - true - - false - 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. - - This 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. - components: - $ref: '#/components/schemas/us_components' - deliverability_analysis: - $ref: '#/components/schemas/deliverability_analysis' - lob_confidence_score: - $ref: '#/components/schemas/lob_confidence_score' - object: - type: string - description: Value is resource type. - enum: - - us_verification - default: us_verification - us_verifications: - type: object - required: - - addresses - - errors - properties: - addresses: - type: array - items: - oneOf: - - $ref: '#/components/schemas/us_verification' - - $ref: '#/components/schemas/error' - errors: - description: >- - Indicates whether any errors occurred during the verification - process. - type: boolean - primary_line: - type: string - description: | - The primary delivery line (usually the street address) of the address. - maxLength: 200 - intl_verification_base: - type: object - properties: - recipient: - $ref: '#/components/schemas/recipient' - primary_line: - $ref: '#/components/schemas/primary_line' - secondary_line: - $ref: '#/components/schemas/secondary_line' - postal_code: - type: string - description: The postal code. - maxLength: 12 - multiple_components_intl: - allOf: - - $ref: '#/components/schemas/intl_verification_base' - - type: object - required: - - primary_line - - country - properties: - city: - $ref: '#/components/schemas/city' - state: - type: string - description: The name of the state. - postal_code: - $ref: '#/components/schemas/postal_code' - country: - $ref: '#/components/schemas/country_extended' - intl_verifications_payload: - type: object - required: - - addresses - properties: - addresses: - type: array - minItems: 1 - maxItems: 20 - items: - $ref: '#/components/schemas/multiple_components_intl' - intl_ver_id: - type: string - description: Unique identifier prefixed with `intl_ver_`. - pattern: ^intl_ver_[a-zA-Z0-9]+$ - country_short: - type: string - description: >- - The country of the address. Will be returned as a 2 letter country - short-name code (ISO 3166). - example: CA - intl_components: - type: object - description: A nested object containing a breakdown of each component of an address. - properties: - primary_number: - $ref: '#/components/schemas/primary_number' - street_name: - $ref: '#/components/schemas/street_name' - city: - $ref: '#/components/schemas/city' - state: - $ref: '#/components/schemas/state' - postal_code: - $ref: '#/components/schemas/postal_code' - intl_verification: - allOf: - - $ref: '#/components/schemas/intl_verification_base' - - type: object - properties: - id: - $ref: '#/components/schemas/intl_ver_id' - last_line: - type: string - description: | - Combination of the following applicable `components`: - * `city` - * `state` - * `zip_code` - * `zip_code_plus_4` - country: - $ref: '#/components/schemas/country_short' - coverage: - type: string - enum: - - SUBBUILDING - - HOUSENUMBER/BUILDING - - STREET - - LOCALITY - - SPARSE - description: > - The coverage level for the country. This represents the maximum - level of - - accuracy an input address can be verified to. - - - * `SUBBUILDING` - Coverage down to unit numbers. For example, in - an apartment or a large building - - * `HOUSENUMBER/BUILDING` - Coverage down to house number. For - example, the address where a house or building may be located - - * `STREET` - Coverage down to street. This means that we can - verify that an street exists in a city, state, country - - * `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. - - * `SPARSE` - Some addresses for this country exist in our - databases - deliverability: - type: string - enum: - - deliverable - - deliverable_missing_info - - undeliverable - - no_match - description: > - Summarizes the deliverability of the `intl_verification` object. - Possible values are: - - * `deliverable` — The address is deliverable. - - * `deliverable_missing_info` — The address is missing some - information, but is most likely deliverable. - - * `undeliverable` — The address is most likely not deliverable. - Some components of the address (such as city or postal code) may - have been found. - - * `no_match` — This address is not deliverable. No matching - street could be found within the city or postal code. - status: - type: string - enum: - - LV4 - - LV3 - - LV2 - - LV1 - - LF4 - - LF3 - - LF2 - - LF1 - - LM4 - - LM3 - - LM2 - - LU1 - description: > - The status level for the country. This represents the maximum - level of - - accuracy an input address can be verified to. - - - * `LV4` - Verified. The input data is correct. All input data - was able to match in databases. - - * `LV3` - Verified. The input data is correct. All input data - was able to match in databases after some or all - elements were standarized. The input data may also be using - outdated city, state, or country names. - - * `LV2` - Verified. The input data is correct although some - input data is unverifiable due to incomplete data. - - * `LV1` - Verified. The input data is acceptable but in an - attempt to standarize user input, errors were introduced. - - * `LF4` - Fixed. The input data is matched and fixed. (Example: - Brighon, UK -> Brighton, UK) - - * `LF3` - Fixed. The input data is matched and fixed but some - elements such as Subbuilding number and house number cannot be - checked. - - * `LF2` - Fixed. The input data is matched but some elements - such as Street cannot be checked. - - * `LF1` - Fixed. The input data is acceptable but in an attempt - to standarize user input, errors were introduced. - - * `LM4` - Missing Info. The input data cannot be corrected - completely. - - * `LM3` - Missing Info. The input data cannot be corrected - completely and there were multiple matches found in databases. - - * `LM2` - Missing Info. The input data cannot be corrected - completely and only some elements were found. - - * `LU1` - Unverified. The input data cannot be corrected or - matched. - components: - $ref: '#/components/schemas/intl_components' - object: - type: string - description: Value is resource type. - enum: - - intl_verification - default: intl_verification - intl_verifications: - type: object - required: - - addresses - - errors - properties: - addresses: - type: array - items: - oneOf: - - $ref: '#/components/schemas/intl_verification' - - $ref: '#/components/schemas/error' - errors: - description: >- - Indicates whether any errors occurred during the verification - process. - type: boolean - cmp_schedule_type: - description: >- - How the campaign should be scheduled. Only value available today is - `immediate`. - type: string - enum: - - immediate - 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). - type: string - enum: - - marketing - - operational - - null - nullable: true - campaign_writable: - type: object - required: - - name - - schedule_type - - use_type - properties: - billing_group_id: - type: string - description: Unique identifier prefixed with `bg_`. - pattern: ^bg_[a-zA-Z0-9]+$ - nullable: true - name: - description: Name of the campaign. - type: string - description: - $ref: '#/components/schemas/resource_description' - schedule_type: - $ref: '#/components/schemas/cmp_schedule_type' - target_delivery_date: - description: >- - If `schedule_type` is `target_delivery_date`, provide a targeted - delivery date for mail pieces in this campaign. - type: string - format: date-time - nullable: true - send_date: - description: >- - If `schedule_type` is `scheduled_send_date`, provide a date to send - this campaign. - type: string - format: date-time - nullable: true - cancel_window_campaign_minutes: - description: A window, in minutes, within which the campaign can be canceled. - type: integer - nullable: true - metadata: - $ref: '#/components/schemas/metadata' - use_type: - $ref: '#/components/schemas/cmp_use_type' - 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 - cmp_id: - type: string - title: Campaign id - description: Unique identifier prefixed with `cmp_`. - pattern: ^cmp_[a-zA-Z0-9]+$ - mail_type: - type: string - enum: - - usps_first_class - - usps_standard - description: > - A string designating the mail postage type: - - * `usps_first_class` - (default) - - * `usps_standard` - a cheaper option 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. - default: usps_first_class - postcard_size: - type: string - enum: - - 4x6 - - 6x9 - - 6x11 - description: > - Specifies the size of the postcard. Only `4x6` postcards can be sent to - international destinations. - default: 4x6 - 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: - mail_type: - $ref: '#/components/schemas/mail_type' - size: - $ref: '#/components/schemas/postcard_size' - 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 - inline_address_us: - allOf: - - $ref: '#/components/schemas/address_editable_us' - - type: object - required: - - address_line1 - - address_city - - address_state - - address_zip - from_attribute: - title: From - description: >- - Must either be an address ID or an inline object with correct address - parameters. All addresses will be standardized into uppercase without - being modified by verification. - oneOf: - - $ref: '#/components/schemas/adr_id' - - $ref: '#/components/schemas/inline_address_us' - creative_base: - type: object - properties: - from: - $ref: '#/components/schemas/from_attribute' - description: - $ref: '#/components/schemas/resource_description' - metadata: - $ref: '#/components/schemas/metadata' - address_placement: - type: string - enum: - - top_first_page - - insert_blank_page - - bottom_first_page_center - - bottom_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. - - Some values are exclusive to certain customers. Upgrade to the - appropriate Print & Mail Edition to gain access. - * `top_first_page` - (default) print address information at the top of your provided first page - * `insert_blank_page` - insert a blank address page at the beginning of your file (you will be charged for the extra page) - * `bottom_first_page_center` - **(exclusive, deprecation planned within a few months)** print address information at the bottom center of your provided first page - * `bottom_first_page` - **(exclusive)** print address information at the bottom of your provided first page - default: top_first_page - card_id: - type: string - description: Unique identifier prefixed with `card_`. - pattern: ^card_[a-zA-Z0-9]+$ - custom_envelope_returned: - type: object - description: >- - A nested custom envelope object containing more information about the - custom envelope used or `null` if a custom envelope was not used. - required: - - id - - url - - object - properties: - id: - type: string - description: The unique identifier of the custom envelope used. - maxLength: 40 - url: - type: string - description: The url of the envelope asset used. - object: - type: string - enum: - - envelope - default: envelope - nullable: true - color: - type: boolean - description: >- - Set this key to `true` if you would like to print in color. Set to - `false` if you would like to print in black and white. - double_sided: - type: boolean - description: >- - Set this attribute to `true` for double sided printing, or `false` for - for single sided printing. Defaults to `true`. - default: true - extra_service: - type: string - enum: - - certified - - certified_return_receipt - - registered - - null - description: > - Add an extra service to your letter. Can only be non-`null` if - `mail_type` isn't `usps_standard`. See pricing for extra costs incurred. - * `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: #10 envelope and flat envelope (used for letters over 6 pages single-sided or 12 pages double-sided). You will not be charged for this extra sheet. - * `certified_return_receipt` - request an electronic copy of the recipient's signature to prove delivery of your certified letter - * `registered` - provides tracking and confirmation for international addresses - - Not available for `us_legal` letter size. - nullable: true - letter_details_returned: - 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. - type: array - items: - $ref: '#/components/schemas/buckslip_id' - minItems: 0 - maxItems: 1 - nullable: true - cards: - description: >- - A single-element array containing an existing card id in a string - format. See [cards](#tag/Cards) for more information. - type: array - items: - $ref: '#/components/schemas/card_id' - minItems: 0 - maxItems: 1 - nullable: true - custom_envelope: - $ref: '#/components/schemas/custom_envelope_returned' - color: - $ref: '#/components/schemas/color' - 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' - self_mailer_size: - type: string - enum: - - 6x18_bifold - - 11x9_bifold - - 12x9_bifold - - 17.75x9_trifold - 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. - default: 6x18_bifold - self_mailer_details_returned: - 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' - size: - $ref: '#/components/schemas/self_mailer_size' - inside_original_url: - description: The original URL of the `inside` template. - maxLength: 2083 - minLength: 1 - type: string - format: uri - outside_original_url: - description: The original URL of the `outside` template. - maxLength: 2083 - minLength: 1 - type: string - format: uri - returned_resource: - oneOf: - - allOf: - - title: Postcard Creative - required: - - resource_type - - details - properties: - resource_type: - type: string - description: Mailpiece type for the creative - enum: - - postcard - details: - $ref: '#/components/schemas/returned' - - $ref: '#/components/schemas/creative_base' - - allOf: - - title: Letter Creative - required: - - from - - resource_type - - details - properties: - resource_type: - type: string - description: Mailpiece type for the creative - enum: - - letter - details: - $ref: '#/components/schemas/letter_details_returned' - - $ref: '#/components/schemas/creative_base' - - allOf: - - title: Self Mailer Creative - required: - - resource_type - - details - properties: - resource_type: - type: string - description: Mailpiece type for the creative - enum: - - self_mailer - details: - $ref: '#/components/schemas/self_mailer_details_returned' - - $ref: '#/components/schemas/creative_base' - crv_id: - type: string - description: Unique identifier prefixed with `crv_`. - pattern: ^crv_[a-zA-Z0-9]+$ - example: crv_2a3b096c409b32c - campaign_item: - allOf: - - $ref: '#/components/schemas/campaign_writable' - - type: object - required: - - id - - name - - description - - schedule_type - - use_type - - is_draft - - creatives - - uploads - - auto_cancel_if_ncoa - - date_created - - date_modified - - object - properties: - id: - $ref: '#/components/schemas/cmp_id' - is_draft: - description: Whether or not the campaign is still a draft. - type: boolean - default: true - creatives: - description: >- - An array of creatives that have been associated with this - campaign. - type: array - uploads: - description: >- - A single-element array containing the upload object that is - assocated with this campaign. - type: array - minItems: 0 - maxItems: 1 - object: - type: string - description: Value is resource type. - enum: - - campaign - default: campaign - date_created: - $ref: '#/components/schemas/date_created' - date_modified: - $ref: '#/components/schemas/date_modified' - deleted: - $ref: '#/components/schemas/deleted' - campaign_list: - type: array - description: Array of campaigns associated with the creative ID - items: - $ref: '#/components/schemas/campaign_item' - example: - - id: cmp_ed76e33e7ac4d0bd - name: My postman Campaign 2 - description: Created via postman again - schedule_type: immediate - send_date: null - target_delivery_date: null - cancel_window_campaign_minutes: null - metadata: {} - use_type: null - is_draft: true - deleted: false - creatives: [] - uploads: [] - auto_cancel_if_ncoa: false - date_created: '2022-07-26T20:20:25.016Z' - date_modified: '2022-07-26T20:20:25.016Z' - object: campaign - creative: - allOf: - - $ref: '#/components/schemas/lob_base' - - $ref: '#/components/schemas/returned_resource' - - type: object - required: - - id - - description - - from - - resource_type - - details - - metadata - - template_preview_urls - - template_previews - - campaigns - - date_created - - date_modified - - object - - deleted - properties: - deleted: - type: boolean - description: Whether the resource has been deleted. - id: - $ref: '#/components/schemas/crv_id' - template_preview_urls: - title: Template Preview URLs - type: object - 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. - template_previews: - title: Template Previews - type: array - items: - type: object - 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. - campaigns: - $ref: '#/components/schemas/campaign_list' - object: - type: string - description: Value is resource type. - enum: - - creative - default: creative - required_address_column_mapping: - title: Required Address Columns - type: object - required: - - name - - address_line1 - - address_city - - address_state - - address_zip - properties: - name: - type: string - nullable: true - default: null - description: >- - The column header from the csv file that should be mapped to the - required field `name` - address_line1: - type: string - nullable: true - default: null - description: >- - The column header from the csv file that should be mapped to the - required field `address_line1` - address_city: - type: string - nullable: true - default: null - description: >- - The column header from the csv file that should be mapped to the - required field `address_city` - address_state: - type: string - nullable: true - default: null - description: >- - The column header from the csv file that should be mapped to the - required field `address_state` - address_zip: - type: string - nullable: true - default: null - description: >- - The column header from the csv file that should be mapped to the - required field `address_zip` - example: - name: recipient_name - address_line1: primary_line - address_city: city - address_state: state - address_zip: zip_code - description: >- - The mapping of column headers in your file to Lob-required fields for - the resource created. See our Campaign Audience Guide for additional details. - optional_address_column_mapping: - title: Optional Address Columns - type: object - required: - - address_line2 - - company - - address_country - properties: - address_line2: - type: string - nullable: true - default: null - description: >- - The column header from the csv file that should be mapped to the - optional field "address_line2" - company: - type: string - nullable: true - default: null - description: >- - The column header from the csv file that should be mapped to the - optional field "company" - address_country: - type: string - nullable: true - default: null - description: >- - The column header from the csv file that should be mapped to the - optional field "address_country" - example: - address_line2: secondary_line - company: company - address_country: country, - description: >- - The mapping of column headers in your file to Lob-optional fields for - the resource created. See our Campaign Audience Guide for additional details. - uploads_metadata: - title: Metadata - type: object - required: - - columns - properties: - columns: - type: array - description: >- - The list of column names from the csv file which you want associated - with each of your mailpieces - default: [] - items: - type: string - default: - columns: [] - example: - columns: - - recipient_name - description: >- - The list of column headers in your file as an array that you want as - metadata associated with each mailpiece. See our Campaign Audience Guide for additional details. - merge_variable_column_mapping: - title: Merge Variable Mapping - type: object - nullable: true - default: null - example: - name: recipient_name - gift_code: code - qr_code_redirect_url: redirect_url - description: >- - The mapping of column headers in your file to the merge variables - present in your creative. See our Campaign Audience Guide for additional details.
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. - upload_writable: - type: object - required: - - campaignId - properties: - campaignId: - allOf: - - $ref: '#/components/schemas/cmp_id' - - description: Associated Campaign ID - type: string - example: cmp_1933ad629bae1408 - requiredAddressColumnMapping: - $ref: '#/components/schemas/required_address_column_mapping' - optionalAddressColumnMapping: - $ref: '#/components/schemas/optional_address_column_mapping' - metadata: - $ref: '#/components/schemas/uploads_metadata' - mergeVariableColumnMapping: - $ref: '#/components/schemas/merge_variable_column_mapping' - description: test - upl_id: - type: string - description: Unique identifier prefixed with `upl_`. - pattern: ^upl_[a-zA-Z0-9]+$ - upload_state: - title: Upload State - enum: - - Preprocessing - - Draft - - Ready for Validation - - Validating - - Scheduled - - Cancelled - - Errored - default: Draft - type: string - description: >- - The `state` property on the `upload` object. As the file is processed, - the `state` will change from `Ready for Validation` to `Validating` and - then will be either `Scheduled` (successfully processed) or `Errored` - (Unsuccessfully processed). - upload: - allOf: - - $ref: '#/components/schemas/upload_writable' - - type: object - required: - - id - - accountId - - campaignId - - requiredAddressColumnMapping - - optionalAddressColumnMapping - - metadata - - mergeVariableColumnMapping - - mode - - state - - totalMailpieces - - failedMailpieces - - validatedMailpieces - - bytesProcessed - - dateCreated - - dateModified - properties: - id: - $ref: '#/components/schemas/upl_id' - accountId: - title: Account ID - type: string - description: Account ID that made the request - example: fa9ea650fc7b31a89f92 - mode: - enum: - - test - - live - type: string - description: >- - The environment in which the mailpieces were created. Today, - will only be `live`. - failuresUrl: - title: Failures URL - type: string - example: https://www.example.com - description: Url where your campaign mailpiece failures can be retrieved - originalFilename: - title: Original Filename - type: string - example: my_audience.csv - description: Filename of the upload - state: - $ref: '#/components/schemas/upload_state' - totalMailpieces: - title: Total Mailpieces - type: integer - example: 100 - description: Total number of recipients for the campaign - failedMailpieces: - title: Failed Mailpieces - type: integer - example: 5 - description: Number of mailpieces that failed to create - validatedMailpieces: - title: Validated Mailpieces - type: integer - example: 95 - description: Number of mailpieces that were successfully created - bytesProcessed: - title: Bytes Processed - type: integer - example: 17268 - description: Number of bytes processed in your CSV - dateCreated: - title: Date Created - type: string - format: date-time - description: >- - A timestamp in ISO 8601 format of the date the upload was - created - dateModified: - title: Date Modified - type: string - format: date-time - description: >- - A timestamp in ISO 8601 format of the date the upload was last - modified - campaign: - allOf: - - $ref: '#/components/schemas/lob_base' - - $ref: '#/components/schemas/campaign_writable' - - type: object - required: - - id - - name - - description - - schedule_type - - use_type - - is_draft - - creatives - - uploads - - auto_cancel_if_ncoa - - date_created - - date_modified - - object - properties: - id: - $ref: '#/components/schemas/cmp_id' - is_draft: - description: Whether or not the campaign is still a draft. - type: boolean - default: true - creatives: - description: >- - An array of creatives that have been associated with this - campaign. - type: array - items: - $ref: '#/components/schemas/creative' - minItems: 0 - uploads: - description: >- - A single-element array containing the upload object that is - assocated with this campaign. - type: array - items: - $ref: '#/components/schemas/upload' - minItems: 0 - maxItems: 1 - object: - type: string - description: Value is resource type. - enum: - - campaign - default: campaign - use_type: - $ref: '#/components/schemas/cmp_use_type' - campaign_updatable: - type: object - properties: - name: - title: Name - type: string - description: - $ref: '#/components/schemas/resource_description' - schedule_type: - $ref: '#/components/schemas/cmp_schedule_type' - target_delivery_date: - description: >- - If `schedule_type` is `target_delivery_date`, provide a targeted - delivery date for mail pieces in this campaign. - type: string - format: date-time - send_date: - description: >- - If `schedule_type` is `scheduled_send_date`, provide a date to send - this campaign. - type: string - format: date-time - cancel_window_campaign_minutes: - description: A window, in minutes, within which the campaign can be canceled. - type: integer - metadata: - $ref: '#/components/schemas/metadata' - is_draft: - description: >- - Whether or not the campaign is still a draft. Can either be excluded - or `false`. - type: boolean - use_type: - $ref: '#/components/schemas/cmp_use_type' - 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 - card_description: - type: string - description: Description of the card. - maxLength: 255 - nullable: true - card_base: - type: object - properties: - description: - $ref: '#/components/schemas/card_description' - size: - description: The size of the card - enum: - - 3.375x2.125 - - 2.125x3.375 - type: string - default: 2.125x3.375 - card: - allOf: - - $ref: '#/components/schemas/lob_base' - - $ref: '#/components/schemas/card_base' - - required: - - description - - type: object - required: - - id - - url - - auto_reorder - - reorder_quantity - - raw_url - - front_original_url - - back_original_url - - thumbnails - - available_quantity - - pending_quantity - - status - - orientation - - threshold_amount - - object - properties: - id: - $ref: '#/components/schemas/card_id' - url: - description: The signed link for the card. - maxLength: 2083 - minLength: 1 - type: string - format: uri - auto_reorder: - description: True if the cards should be auto-reordered. - type: boolean - default: false - reorder_quantity: - description: The number of cards to be reordered. - type: integer - nullable: true - raw_url: - description: The raw URL of the card. - 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 cards. - type: integer - default: 0 - pending_quantity: - description: The pending quantity of cards. - type: integer - default: 0 - status: - title: The status of the card. - enum: - - processed - - rendered - type: string - orientation: - description: The orientation of the card. - enum: - - horizontal - - vertical - type: string - default: horizontal - threshold_amount: - description: The threshold amount of the card - type: integer - default: 0 - object: - description: object - enum: - - card - type: string - default: card - card_editable: - allOf: - - $ref: '#/components/schemas/card_base' - - type: object - required: - - front - properties: - front: - description: A PDF template for the front of the card - oneOf: - - $ref: '#/components/schemas/remote_file_url' - - $ref: '#/components/schemas/local_file_path' - back: - description: A PDF template for the back of the card - oneOf: - - $ref: '#/components/schemas/remote_file_url' - - $ref: '#/components/schemas/local_file_path' - default: >- - https://s3.us-west-2.amazonaws.com/public.lob.com/assets/card_blank_horizontal.pdf - card_updatable: - type: object - properties: - description: - $ref: '#/components/schemas/card_description' - auto_reorder: - description: Allows for auto reordering - type: boolean - reorder_quantity: - description: >- - The quantity of items to be reordered (only required when - auto_reorder is true). - type: number - minimum: 10000 - maximum: 10000000 - 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: - id: - $ref: '#/components/schemas/card_id' - deleted: - $ref: '#/components/schemas/deleted' - co_id: - type: string - description: Unique identifier prefixed with `co_`. - pattern: ^co_[a-zA-Z0-9]+$ - card_order: - allOf: - - $ref: '#/components/schemas/lob_base' - - type: object - properties: - id: - $ref: '#/components/schemas/co_id' - card_id: - $ref: '#/components/schemas/card_id' - status: - description: The status of the card order. - enum: - - pending - - printing - - available - - cancelled - - depleted - type: string - inventory: - description: The inventory of the card order. - type: number - default: 0 - quantity_ordered: - description: The quantity of cards ordered - type: number - default: 0 - unit_price: - description: The unit price for the card order. - type: number - default: 0 - cancelled_reason: - description: The reason for cancellation. - type: string - availability_date: - type: string - format: date-time - description: >- - A timestamp in ISO 8601 format of the date the resource was - created. - expected_availability_date: - type: string - format: date-time - description: The fixed deadline for the cards to be printed. - card_order_editable: - type: object - required: - - quantity - properties: - quantity: - type: integer - description: The quantity of cards in the order (minimum 10,000). - minimum: 10000 - maximum: 10000000 - send_date: - type: string - 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. - anyOf: - - format: date-time - - format: date - status: - type: string - enum: - - processed - - rendered - - failed - description: > - A string describing the PDF render status: - - * `processed` - the rendering process is currently in progress. - - * `rendered` - a PDF has been successfully rendered of the mailpiece. - - * `failed` - one or more issues has caused the rendering process to - fail. - merge_variables: - type: object - 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 our guide to using html and merge variables. - Depending on your Merge Variable strictness 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 - editable_no_mailtype: - type: object - properties: - description: - $ref: '#/components/schemas/resource_description' - metadata: - $ref: '#/components/schemas/metadata' - merge_variables: - $ref: '#/components/schemas/merge_variables' - send_date: - $ref: '#/components/schemas/send_date' - 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). - type: string - enum: - - marketing - - operational - - null - nullable: true - check_base: - allOf: - - $ref: '#/components/schemas/editable_no_mailtype' - - type: object - properties: - mail_type: - description: Checks must be sent `usps_first_class` - type: string - enum: - - usps_first_class - default: usps_first_class - memo: - description: Text to include on the memo line of the check. - type: string - maxLength: 40 - nullable: true - check_number: - description: >- - An integer that designates the check number. - - If `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`. - - A provided `check_number` overrides the defaults. Subsequent - checks created with the same `bank_account` will increment from - the provided check number. - type: integer - minimum: 1 - maximum: 500000000 - message: - description: >- - Max of 400 characters to be included at the bottom of the check - page. - type: string - maxLength: 400 - use_type: - $ref: '#/components/schemas/chk_use_type' - from_us: - type: object - properties: - from: - $ref: '#/components/schemas/address_us' - chk_id: - type: string - description: Unique identifier prefixed with `chk_`. - pattern: ^chk_[a-zA-Z0-9]+$ - tmpl_id: - type: string - description: >- - Unique identifier prefixed with `tmpl_`. ID of a saved [HTML - template](#section/HTML-Templates). - pattern: ^tmpl_[a-zA-Z0-9]+$ - vrsn_id: - type: string - description: Unique identifier prefixed with `vrsn_`. - pattern: ^vrsn_[a-zA-Z0-9]+$ - to_address_us_chk: - allOf: - - $ref: '#/components/schemas/lob_base' - - type: object - required: - - id - - address_line1 - - address_city - - address_state - - address_zip - anyOf: - - title: address obj with `name` defined - required: - - name - - title: address obj with `company` defined - required: - - company - properties: - id: - $ref: '#/components/schemas/adr_id' - object: - type: string - description: Value is resource type. - enum: - - address - default: address - description: - $ref: '#/components/schemas/resource_description' - name: - type: string - 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 - nullable: true - company: - type: string - 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 - nullable: true - phone: - type: string - description: Must be no longer than 40 characters. - maxLength: 40 - nullable: true - email: - type: string - description: Must be no longer than 100 characters. - maxLength: 100 - nullable: true - address_line1: - type: string - description: The primary number, street name, and directional information. - maxLength: 50 - address_line2: - type: string - description: >- - An optional field containing any information which can't fit - into line 1. - maxLength: 50 - nullable: true - address_city: - type: string - maxLength: 200 - address_state: - type: string - description: 2 letter state short-name code - pattern: ^[a-zA-Z]{2}$ - address_zip: - type: string - description: > - Must follow the ZIP format of `12345` or ZIP+4 format of - `12345-1234`. - pattern: ^\d{5}(-\d{4})?$ - address_country: - type: string - enum: - - UNITED STATES - description: Full name of country - minLength: 13 - maxLength: 13 - metadata: - $ref: '#/components/schemas/metadata' - recipient_moved: - type: boolean - description: > - Only returned for accounts on certain Print & Mail Editions. Value is `true` - if the address was altered because the recipient filed for a National Change of - Address Linkage (NCOALink), `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. - nullable: true - example: - id: adr_e68217bd744d65c8 - description: Harry - Office - name: HARRY ZHANG - company: LOB - phone: '5555555555' - email: harry@lob.com - 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: {} - recipient_moved: false - date_created: '2019-08-12T00:16:00.361Z' - date_modified: '2019-08-12T00:16:00.361Z' - object: address - 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 - evnt_id: - type: string - description: Unique identifier prefixed with `evnt_`. - pattern: ^evnt_[a-zA-Z0-9]+$ - tracking_event_base: - type: object - description: >- - As mail pieces travel through the mail stream, USPS scans their unique - barcodes, and Lob processes these mail scans to generate tracking - events. - required: - - id - - date_created - - date_modified - - object - properties: - id: - $ref: '#/components/schemas/evnt_id' - time: - type: string - format: date-time - description: >- - A timestamp in ISO 8601 format of the date USPS registered the - event. - date_created: - $ref: '#/components/schemas/date_created' - date_modified: - $ref: '#/components/schemas/date_modified' - object: - allOf: - - $ref: '#/components/schemas/object' - - type: string - enum: - - tracking_event - default: tracking_event - 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): - - * `Mailed` - The mailpiece has been handed off to and accepted by USPS - and is en route. More about - Mailed. - Note this data is only available in Enterprise editions of - Lob. Contact Sales if - you want access to this feature. - - * `In Transit` - The mailpiece is being processed at the entry/origin facility. - - * `In Local Area` - The mailpiece is being processed at the destination facility. - - * `Processed for Delivery` - The mailpiece has been greenlit for - delivery at the recipient's nearest postal facility. The mailpiece - should reach the mailbox within 1 business day of this tracking - event. - - * `Delivered` - The mail piece has been delivered to - the recipient’s address. The final scan is generated when the mail - carrier's GPS unit leaves the delivery area. - - * `Re-Routed` - The mailpiece is re-routed due to recipient change of - address, address errors, or USPS relabeling of barcode/ID tag - area. - - * `Returned to Sender` - The mailpiece is being returned to sender due - to barcode, ID tag area, or address errors. - - * `International Exit` - The mail piece has been processed to - ship to a destination abroad. This is typically the last - scan a US-originated international mail piece will receive - from the USPS. - - More about tracking - details: - description: Will be `null` for `type=normal` events - type: object - enum: - - null - nullable: true - location: - type: string - description: > - The zip code in which the scan event occurred. Null for `Mailed` - events. - nullable: true - failure_reason_error: - type: object - description: Failure error details - properties: - url: - type: string - description: Failed URL of asset - nullable: true - host: - type: string - description: URL host - nullable: true - path: - type: string - description: URL path - nullable: true - protocol: - type: string - description: Network protocol - nullable: true - remediation: - type: string - description: Instructions on how to resolve the error - nullable: true - error_type: - type: string - description: HTTP response status code message or service defined error - nullable: true - status_code: - type: number - description: HTTP response status codes if the error is asset related - nullable: true - failure_reason: - type: object - description: >- - An object describing the reason for failure if the resource failed to - render. - properties: - remediation: - type: string - description: Instructions on how to resolve the error - failure_reason: - type: string - description: Reason failure occurred - errors: - type: array - nullable: true - items: - $ref: '#/components/schemas/failure_reason_error' - check: - allOf: - - $ref: '#/components/schemas/check_base' - - $ref: '#/components/schemas/from_us' - - type: object - required: - - bank_account - - id - - amount - - to - - url - - carrier - - date_created - - date_modified - - use_type - properties: - id: - $ref: '#/components/schemas/chk_id' - amount: - description: The payment amount to be sent in US dollars. - type: number - format: float - multipleOf: 0.01 - maximum: 999999.99 - bank_account: - $ref: '#/components/schemas/bank_account' - check_bottom_template_id: - allOf: - - description: >- - The unique ID of the HTML template used for the check - bottom. - - $ref: '#/components/schemas/tmpl_id' - attachment_template_id: - allOf: - - description: The unique ID of the HTML template used for the attachment. - - $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' - 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' - url: - $ref: '#/components/schemas/signed_link' - to: - $ref: '#/components/schemas/to_address_us_chk' - carrier: - type: string - enum: - - USPS - default: USPS - thumbnails: - type: array - items: - $ref: '#/components/schemas/thumbnail' - expected_delivery_date: - $ref: '#/components/schemas/expected_delivery_date' - tracking_events: - description: >- - An array of tracking_event objects ordered by ascending `time`. - Will not be populated for checks created in test mode. - type: array - items: - $ref: '#/components/schemas/tracking_event_normal' - nullable: true - use_type: - $ref: '#/components/schemas/chk_use_type' - status: - $ref: '#/components/schemas/status' - failure_reason: - allOf: - - $ref: '#/components/schemas/failure_reason' - - nullable: true - object: - type: string - description: Value is resource type. - enum: - - check - default: check - date_created: - $ref: '#/components/schemas/date_created' - date_modified: - $ref: '#/components/schemas/date_modified' - deleted: - $ref: '#/components/schemas/deleted' - inline_address_us_chk: - allOf: - - type: object - required: - - address_line1 - - address_city - - address_state - - address_zip - 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 - 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 - nullable: true - company: - $ref: '#/components/schemas/company' - address_line1: - type: string - description: The primary number, street name, and directional information. - maxLength: 50 - address_line2: - type: string - 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 - address_city: - type: string - maxLength: 200 - address_state: - type: string - description: 2 letter state short-name code - pattern: ^[a-zA-Z]{2}$ - address_zip: - type: string - description: > - Must follow the ZIP format of `12345` or ZIP+4 format of - `12345-1234`. - pattern: ^\d{5}(-\d{4})?$ - phone: - type: string - description: Must be no longer than 40 characters. - maxLength: 40 - nullable: true - email: - type: string - description: Must be no longer than 100 characters. - maxLength: 100 - nullable: true - address_country: - type: string - enum: - - US - default: US - metadata: - $ref: '#/components/schemas/metadata' - check_input_to: - type: object - 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 Print & Mail Edition, addresses may also be run - through [National Change of Address - (NCOALink)](#tag/National-Change-of-Address). If an address used - does not meet your account’s US Mail Strictness Setting, the request will - fail. More about verification of mailing addresses - oneOf: - - $ref: '#/components/schemas/adr_id' - - $ref: '#/components/schemas/inline_address_us_chk' - html_string: - type: string - description: An HTML string of under 10,000 characters. - maxLength: 10000 - pattern: < - check_bottom: - description: >- - The artwork to use on the bottom of the check page. - - - Notes: - - - HTML merge variables should not include delimiting whitespace. - - - 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. - - - The check bottom will always be printed in black & white. - - - Must conform to this template. - - - 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' - billing_group_id: - type: string - description: >- - An optional string with the billing group ID to tag your usage with. Is - used for billing purposes. Requires special activation to use. See Billing Group API for more information. - check_editable_props: - allOf: - - $ref: '#/components/schemas/check_base' - - $ref: '#/components/schemas/check_input_to' - - type: object - required: - - bank_account - - to - - from - - amount - - use_type - properties: - from: - 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' - bank_account: - allOf: - - $ref: '#/components/schemas/bank_id_no_description' - - type: string - description: The id for a verified bank account. - amount: - description: >- - The payment amount to be sent in US dollars. Amounts will be - rounded to two decimal places. - type: number - format: float - maximum: 999999.99 - 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: - - * RGB or CMYK - - * square - - * minimum size: 100px x 100px - - * transparent backgrond - - * `png` or `jpg` - oneOf: - - type: string - pattern: ^https://[-a-zA-Z0-9@:%._+~#=/]{1,256}.(png|jpg)$ - - type: string - pattern: ^(?!https://)[a-zA-Z0-9@:%._+~#=/]{1,256}.(png|jpg)$ - check_bottom: - $ref: '#/components/schemas/check_bottom' - attachment: - description: >- - A document to include with the check. - - - Notes: - - - HTML merge variables should not include delimiting whitespace. - - - 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. - - - If a PDF is provided, it must be 6 pages or fewer. - - - The attachment will be printed double-sided in black & white - and will be included in the envelope after the check page. - - - Please follow these design guidelines. - - - See pricing 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' - billing_group_id: - $ref: '#/components/schemas/billing_group_id' - use_type: - $ref: '#/components/schemas/chk_use_type' - check_editable: - oneOf: - - title: words at check bottom - allOf: - - required: - - message - - $ref: '#/components/schemas/check_editable_props' - - title: image at check bottom - allOf: - - required: - - check_bottom - - $ref: '#/components/schemas/check_editable_props' - 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: - id: - $ref: '#/components/schemas/chk_id' - deleted: - $ref: '#/components/schemas/deleted' - crv_front: - description: > - The artwork to use as the front of your postcard. - - - Notes: - - - HTML merge variables should not include delimiting whitespace. - - - 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`. - - - See [here](#section/HTML-Examples) for HTML examples. - oneOf: - - $ref: '#/components/schemas/tmpl_id' - - $ref: '#/components/schemas/local_file_path' - crv_back: - description: > - The artwork to use as the back of your postcard creative. - - - Notes: - - - HTML merge variables should not include delimiting whitespace. - - - 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`. - - - Be sure to leave room for address and postage information by following - the templates provided here: - - 4x6 template - - 6x9 template - - 6x11 template - - - See [here](#section/HTML-Examples) for HTML examples. - oneOf: - - $ref: '#/components/schemas/tmpl_id' - - $ref: '#/components/schemas/local_file_path' - qr_code_campaigns: - type: object - 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 our help center. - required: - - position - - width - properties: - position: - type: string - enum: - - relative - 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'. - top: - type: string - description: >- - Vertical distance (in inches) to place QR code from the top. Only - allowed if "bottom" isn't provided. - right: - type: string - description: >- - Horizontal distance (in inches) to place QR code from the right. - Only allowed if "left" isn't provided. - left: - type: string - description: >- - Horizontal distance (in inches) to place QR code from the left. Only - allowed if "right" isn't provided. - bottom: - type: string - description: >- - Vertical distance (in inches) to place QR code from the bottom. Only - allowed if "top" isn't provided. - 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 our help center.. - - Note: 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. - width: - type: string - description: >- - The size (in inches) of the QR code with a minimum of 1 inch. All QR - codes are generated as a square. - pages: - type: string - description: >- - Specify the pages where the QR code should be stamped in a comma - separated format. Your QR code can be printed in the same position - on multiple pages. For postcards, the values should either be - "front", "back" (for either front or back) or "front,back" (for the - QR code to be printed on both sides). For self-mailers, the values - should either be "inside", "outside" (for either inside or outside) - or "inside,outside" (for the QR code to be printed on both sides). - For letters, the values can be specific page numbers ("1", "3"), - page number ranges such as "1-3", or a comma separated combination - of both ("1,3,5-7"). - 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. - required: - - color - properties: - mail_type: - $ref: '#/components/schemas/mail_type' - size: - $ref: '#/components/schemas/postcard_size' - qr_code: - $ref: '#/components/schemas/qr_code_campaigns' - letter_add_on_types: - type: string - enum: - - buckslips - - cards - - custom_envelope - user_provided: - type: string - 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 Print & Mail Edition to gain access. - nullable: true - pattern: ^env_[a-zA-Z0-9]+$ - letter_details_writable: - description: >- - Properties that the letters in your Creative should have. See the - `qr_code` attribute below to add a QR code to your creative. - required: - - color - properties: - address_placement: - $ref: '#/components/schemas/address_placement' - add_on_types: - description: An array containing the types of add-ons for the Letter Creative. - type: array - items: - $ref: '#/components/schemas/letter_add_on_types' - minItems: 0 - maxItems: 3 - nullable: true - 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. - type: array - items: - $ref: '#/components/schemas/buckslip_id' - minItems: 0 - maxItems: 1 - nullable: true - cards: - description: >- - A single-element array containing an existing card id in a string - format. See [cards](#tag/Cards) for more information. - type: array - items: - $ref: '#/components/schemas/card_id' - minItems: 0 - maxItems: 1 - nullable: true - 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' - crv_file: - description: >- - Notes: - - - HTML merge variables should not include delimiting whitespace. - - - 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. - - - For design specifications, please see our PDF and [HTML](#section/HTML-Examples) templates. - - - If a `custom_envelope` is used, follow this template. - - - 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. - - - Any letters over 6 pages single-sided or 12 pages double-sided will be - placed in a flat envelope instead of the standard double window - envelope. - - - See pricing for extra costs incurred. - oneOf: - - $ref: '#/components/schemas/tmpl_id' - - $ref: '#/components/schemas/local_file_path' - crv_inside: - description: > - The artwork to use as the inside of your self mailer creative. - - Notes: - - - HTML merge variables should not include delimiting whitespace. - - - 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`. - - - Be sure to leave room for address and postage information by following - the templates provided here: - - 6x18 bifold template - - 11x9 bifold template - - 12x9 bifold template - - - See [here](#section/HTML-Examples) for HTML examples. - 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. - - Notes: - - - HTML merge variables should not include delimiting whitespace. - - - 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`. - - - Be sure to leave room for address and postage information by following - the templates provided here: - - 6x18 bifold template - - 11x9 bifold template - - 12x9 bifold template - - - See [here](#section/HTML-Examples) for HTML examples. - oneOf: - - $ref: '#/components/schemas/tmpl_id' - - $ref: '#/components/schemas/local_file_path' - self_mailer_details_writable: - 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. - required: - - color - properties: - mail_type: - $ref: '#/components/schemas/mail_type' - size: - $ref: '#/components/schemas/self_mailer_size' - qr_code: - $ref: '#/components/schemas/qr_code_campaigns' - creative_writable: - oneOf: - - allOf: - - title: Postcard Creative - required: - - front - - back - - campaign_id - - resource_type - - details - properties: - resource_type: - type: string - description: Mailpiece type for the creative - enum: - - postcard - campaign_id: - $ref: '#/components/schemas/cmp_id' - front: - $ref: '#/components/schemas/crv_front' - back: - $ref: '#/components/schemas/crv_back' - details: - $ref: '#/components/schemas/writable' - - $ref: '#/components/schemas/creative_base' - - allOf: - - title: Letter Creative - required: - - file - - from - - campaign_id - - resource_type - - details - properties: - resource_type: - type: string - description: Mailpiece type for the creative - enum: - - letter - campaign_id: - $ref: '#/components/schemas/cmp_id' - details: - $ref: '#/components/schemas/letter_details_writable' - file: - $ref: '#/components/schemas/crv_file' - - $ref: '#/components/schemas/creative_base' - - allOf: - - title: Self Mailer Creative - required: - - inside - - outside - - campaign_id - - resource_type - - details - properties: - resource_type: - type: string - description: Mailpiece type for the creative - enum: - - self_mailer - campaign_id: - $ref: '#/components/schemas/cmp_id' - inside: - $ref: '#/components/schemas/crv_inside' - outside: - $ref: '#/components/schemas/crv_outside' - details: - $ref: '#/components/schemas/self_mailer_details_writable' - - $ref: '#/components/schemas/creative_base' - recipient_input: - allOf: - - anyOf: - - title: Address object with `city` and `state` - required: - - city - - state - - title: Address object with `zip_code` - required: - - zip_code - - type: object - required: - - recipient - - primary_line - properties: - recipient: - $ref: '#/components/schemas/recipient' - primary_line: - $ref: '#/components/schemas/primary_line_us' - secondary_line: - $ref: '#/components/schemas/secondary_line' - urbanization: - $ref: '#/components/schemas/urbanization' - city: - allOf: - - $ref: '#/components/schemas/city_no_description' - - type: string - description: >- - The name of the city. `city` and `state` are required if no - `zip_code` is passed. - state: - type: string - description: >- - The ISO 3166-2 two letter code or subdivision - name for the state. `city` and `state` are required if no - `zip_code` is passed. - maxLength: 50 - 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' - identity_validation_company: - type: string - description: The name of the company or firm. - nullable: true - maxLength: 500 - company_input: - allOf: - - anyOf: - - title: Address object with `city` and `state` - required: - - city - - state - - title: Address object with `zip_code` - required: - - zip_code - - type: object - required: - - company - - primary_line - properties: - company: - $ref: '#/components/schemas/identity_validation_company' - primary_line: - $ref: '#/components/schemas/primary_line_us' - secondary_line: - $ref: '#/components/schemas/secondary_line' - urbanization: - $ref: '#/components/schemas/urbanization' - city: - allOf: - - $ref: '#/components/schemas/city_no_description' - - type: string - description: >- - The name of the city. `city` and `state` are required if no - `zip_code` is passed. - state: - type: string - description: >- - The ISO 3166-2 two letter code or subdivision - name for the state. `city` and `state` are required if no - `zip_code` is passed. - maxLength: 50 - zip_code: - allOf: - - type: string - description: >- - Required if `city` and `state` are not passed in. If - included, must be formatted as a US ZIP or ZIP+4 (e.g. - `94107`, `941072282`, `94107-2282`). - - $ref: '#/components/schemas/zip_code' - identity_validation_writable: - oneOf: - - $ref: '#/components/schemas/recipient_input' - - $ref: '#/components/schemas/company_input' - identity_validation_id: - type: string - description: Unique identifier prefixed with `id_validation_`. - pattern: ^id_validation_[a-zA-Z0-9_]+$ - identity_validation_recipient: - type: string - description: The name of the person whose identity is being validated. - nullable: true - maxLength: 500 - recipient_validation: - type: object - properties: - id: - $ref: '#/components/schemas/identity_validation_id' - recipient: - $ref: '#/components/schemas/identity_validation_recipient' - primary_line: - $ref: '#/components/schemas/primary_line_us' - secondary_line: - $ref: '#/components/schemas/secondary_line' - urbanization: - $ref: '#/components/schemas/urbanization' - last_line: - type: string - description: | - Combination of the following applicable `components`: - * City (`city`) - * State (`state`) - * ZIP code (`zip_code`) - * ZIP+4 (`zip_code_plus_4`) - score: - type: number - nullable: true - format: float - description: > - A numerical score between 0 and 100 that represents the likelihood - the provided name is associated with a physical address. - default: null - minimum: 0 - maximum: 100 - confidence: - type: string - enum: - - high - - medium - - low - - '' - description: > - Indicates the likelihood the recipient name and address match based - on our custom internal calculation. Possible values are: - - - `high` — Has a Lob confidence score greater than 70. - - - `medium` — Has a Lob confidence score between 40 and 70. - - - `low` — Has a Lob confidence score less than 40. - - - `""` — No tracking data exists for this address. - object: - type: string - description: Value is resource type. - enum: - - id_validation - default: id_validation - company_validation: - type: object - properties: - id: - $ref: '#/components/schemas/identity_validation_id' - company: - $ref: '#/components/schemas/identity_validation_company' - primary_line: - $ref: '#/components/schemas/primary_line_us' - secondary_line: - $ref: '#/components/schemas/secondary_line' - urbanization: - $ref: '#/components/schemas/urbanization' - last_line: - type: string - description: | - Combination of the following applicable `components`: - * City (`city`) - * State (`state`) - * ZIP code (`zip_code`) - * ZIP+4 (`zip_code_plus_4`) - score: - type: number - nullable: true - format: float - description: > - A numerical score between 0 and 100 that represents the likelihood - the provided name is associated with a physical address. - default: null - minimum: 0 - maximum: 100 - confidence: - type: string - enum: - - high - - medium - - low - - '' - description: > - Indicates the likelihood the recipient name and address match based - on our custom internal calculation. Possible values are: - - - `high` — Has a Lob confidence score greater than 70. - - - `medium` — Has a Lob confidence score between 40 and 70. - - - `low` — Has a Lob confidence score less than 40. - - - `""` — No tracking data exists for this address. - object: - type: string - description: Value is resource type. - enum: - - id_validation - default: id_validation - identity_validation: - oneOf: - - $ref: '#/components/schemas/recipient_validation' - - $ref: '#/components/schemas/company_validation' - intl_autocompletions_writable: - type: object - required: - - address_prefix - - country - properties: - address_prefix: - type: string - description: | - Only accepts numbers and street names in an alphanumeric format. - city: - type: string - description: > - An optional city input used to filter suggestions. Case insensitive - and does not match partial abbreviations. - state: - type: string - description: > - An optional state input used to filter suggestions. Case insensitive - and does not match partial abbreviations. - zip_code: - type: string - description: > - An optional Zip Code input used to filter suggestions. Matches - partial entries. - country: - $ref: '#/components/schemas/country_extended' - geo_ip_sort: - type: boolean - description: > - If `true`, sort suggestions by proximity to the IP set in the - `X-Forwarded-For` header. - intl_auto_id: - type: string - description: Unique identifier prefixed with `intl_auto_`. - pattern: ^intl_auto_[a-zA-Z0-9]+$ - intl_suggestions: - type: object - required: - - primary_number_range - - primary_line - - city - - country - - state - - zip_code - properties: - primary_number_range: - type: string - description: > - The primary number range of the address that identifies a building - at street level. - primary_line: - type: string - description: > - The primary delivery line (usually the street address) of the - address. - - Combination of the following applicable `components` (primary number - & - - secondary information may be missing or inaccurate): - - * `primary_number` - - * `street_predirection` - - * `street_name` - - * `street_suffix` - - * `street_postdirection` - - * `secondary_designator` - - * `secondary_number` - - * `pmb_designator` - - * `pmb_number` - city: - $ref: '#/components/schemas/city' - country: - $ref: '#/components/schemas/country_extended' - state: - $ref: '#/components/schemas/state' - zip_code: - $ref: '#/components/schemas/postal_code' - intl_autocompletions: - type: object - properties: - id: - $ref: '#/components/schemas/intl_auto_id' - suggestions: - type: array - description: | - An array of objects representing suggested addresses. - minItems: 0 - maxItems: 10 - items: - $ref: '#/components/schemas/intl_suggestions' - single_line_address_intl: - type: object - required: - - address - - country - properties: - address: - type: string - description: | - The entire address in one string (e.g., "370 Water St C1N 1C4"). - maxLength: 500 - country: - $ref: '#/components/schemas/country_extended' - intl_verification_writable: - oneOf: - - $ref: '#/components/schemas/multiple_components_intl' - - $ref: '#/components/schemas/single_line_address_intl' - ltr_id: - type: string - description: Unique identifier prefixed with `ltr_`. - pattern: ^ltr_[a-zA-Z0-9]+$ - inline_address_intl: - allOf: - - $ref: '#/components/schemas/address_editable_intl' - - type: object - required: - - address_line1 - - address_country - - type: object - oneOf: - - required: - - address_city - - address_state - - required: - - address_zip - inline_address: - oneOf: - - $ref: '#/components/schemas/inline_address_us' - - $ref: '#/components/schemas/inline_address_intl' - 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' - return_envelope_returned: - oneOf: - - type: boolean - - type: object - properties: - id: - type: string - description: The unique ID of the Return Envelope. - alias: - type: string - description: A quick reference name for the Return Envelope. - url: - type: string - description: The url of the return envelope. - object: - type: string - description: Value is resource type. - 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' - from: - type: object - properties: - from: - $ref: '#/components/schemas/address' - campaign_id: - title: campaign_id - description: >- - Denotes resources created by the provided campaign id, prefixed with - `cmp_`. In the case of snap packs and letters with size `us_legal`, the - campaign id is prefixed with `camp_` instead of `cmp_`. - type: string - pattern: ^(cmp|camp)_[a-zA-Z0-9]+$ - nullable: true - 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 - enum: - - marketing - - operational - - null - nullable: true - letter_generated_base: - allOf: - - $ref: '#/components/schemas/generated' - - $ref: '#/components/schemas/from' - - type: object - required: - - id - - from - - use_type - properties: - url: - $ref: '#/components/schemas/signed_link' - id: - $ref: '#/components/schemas/ltr_id' - 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' - campaign_id: - $ref: '#/components/schemas/campaign_id' - use_type: - $ref: '#/components/schemas/ltr_use_type' - fsc: - type: boolean - description: >- - This is in beta. Contact support@lob.com or your account contact - to learn more. Not available for `A4` letter size. - default: false - status: - $ref: '#/components/schemas/status' - failure_reason: - allOf: - - $ref: '#/components/schemas/failure_reason' - - nullable: true - object: - type: string - description: Value is resource type. - enum: - - letter - default: letter - no_extra_service: - allOf: - - type: object - required: - - color - properties: - tracking_events: - description: An array of tracking events ordered by ascending `time`. - type: array - items: - $ref: '#/components/schemas/tracking_event_normal' - cards: - description: An array of cards associated with a specific letter - type: array - items: - $ref: '#/components/schemas/card' - nullable: true - buckslips: - description: An array of buckslip(s) associated with a specific letter - type: array - items: - $ref: '#/components/schemas/buckslip' - nullable: true - return_address: - $ref: '#/components/schemas/return_address' - description: - $ref: '#/components/schemas/resource_description' - metadata: - $ref: '#/components/schemas/metadata' - merge_variables: - $ref: '#/components/schemas/merge_variables' - send_date: - $ref: '#/components/schemas/send_date' - mail_type: - $ref: '#/components/schemas/mail_type' - color: - $ref: '#/components/schemas/color' - double_sided: - $ref: '#/components/schemas/double_sided' - address_placement: - $ref: '#/components/schemas/address_placement' - return_envelope: - $ref: '#/components/schemas/return_envelope_returned' - perforated_page: - type: integer - 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 perforation guide. - nullable: true - custom_envelope: - $ref: '#/components/schemas/custom_envelope_returned' - - $ref: '#/components/schemas/letter_generated_base' - registered: - allOf: - - type: object - required: - - extra_service - - color - properties: - extra_service: - type: string - enum: - - registered - description: > - Add an extra service to your letter. See pricing for extra costs incurred. - * registered - provides tracking and confirmation for international addresses - tracking_number: - type: string - description: |- - The tracking number will appear here when it becomes available. - Dummy tracking numbers are not created in test mode. - nullable: true - tracking_events: - description: Tracking events are not populated for registered letters. - type: array - items: - $ref: '#/components/schemas/tracking_event_normal' - maxItems: 0 - return_address: - $ref: '#/components/schemas/return_address' - description: - $ref: '#/components/schemas/resource_description' - metadata: - $ref: '#/components/schemas/metadata' - merge_variables: - $ref: '#/components/schemas/merge_variables' - send_date: - $ref: '#/components/schemas/send_date' - mail_type: - $ref: '#/components/schemas/mail_type' - color: - $ref: '#/components/schemas/color' - double_sided: - $ref: '#/components/schemas/double_sided' - address_placement: - $ref: '#/components/schemas/address_placement' - return_envelope: - $ref: '#/components/schemas/return_envelope_returned' - perforated_page: - type: integer - 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 perforation guide. - nullable: true - custom_envelope: - $ref: '#/components/schemas/custom_envelope_returned' - - $ref: '#/components/schemas/letter_generated_base' - 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. - 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. - - * `Mailed` - Package has been accepted into the carrier network for delivery. - - * `In Transit` - Maps to four distinct stages of transit. - - * `In Local Area` - Package is at a location near the end destination. - - * `Processed for Delivery` - Maps to two distinct stages of delivery. - - * `Pickup Available` - Package is available for pickup at carrier location. - - * `Delivered` - Package has been delivered. - - * `Re-Routed` - Package has been forwarded. - - * `Returned to Sender` - Package is to be returned to sender. - - * `Issue` - Maps to (at least) 15 possible issues, some of which are actionable. - details: - $ref: '#/components/schemas/tracking_event_details' - location: - type: string - 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. - nullable: true - certified: - allOf: - - type: object - required: - - extra_service - - tracking_events - - color - properties: - extra_service: - type: string - enum: - - certified - - certified_return_receipt - description: > - Add an extra service to your letter. See pricing for extra costs incurred. - * `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: #10 envelope and flat envelope (used for letters over 6 pages single-sided or 12 pages double-sided). You will not be charged for this extra sheet. - * `certified_return_receipt` - request an electronic copy of the recipient's signature to prove delivery of your certified letter - tracking_number: - type: string - description: |- - The tracking number will be here immediately upon creation. - Dummy tracking numbers are created in test mode. - nullable: true - tracking_events: - description: >- - An array of certified tracking events ordered by ascending - `time`. Not populated in test mode. - type: array - items: - $ref: '#/components/schemas/tracking_event_certified' - return_address: - $ref: '#/components/schemas/return_address' - description: - $ref: '#/components/schemas/resource_description' - metadata: - $ref: '#/components/schemas/metadata' - merge_variables: - $ref: '#/components/schemas/merge_variables' - send_date: - $ref: '#/components/schemas/send_date' - mail_type: - $ref: '#/components/schemas/mail_type' - color: - $ref: '#/components/schemas/color' - double_sided: - $ref: '#/components/schemas/double_sided' - address_placement: - $ref: '#/components/schemas/address_placement' - return_envelope: - $ref: '#/components/schemas/return_envelope_returned' - perforated_page: - type: integer - 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 perforation guide. - nullable: true - custom_envelope: - $ref: '#/components/schemas/custom_envelope_returned' - - $ref: '#/components/schemas/letter_generated_base' - 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_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: - id: - $ref: '#/components/schemas/ltr_id' - deleted: - $ref: '#/components/schemas/deleted' - input_to: - type: object - 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 Print & Mail Edition, US addresses may also be - run through National - Change of Address Linkage(NCOALink). Non-US addresses will be - standardized into uppercase only. If a US address used does not meet - your account’s US Mail strictness setting, the request will - fail. Lob Guide: Verification of Mailing Addresses - oneOf: - - $ref: '#/components/schemas/adr_id' - - $ref: '#/components/schemas/inline_address' - input_from: - type: object - 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' - editable: - type: object - properties: - description: - $ref: '#/components/schemas/resource_description' - metadata: - $ref: '#/components/schemas/metadata' - mail_type: - $ref: '#/components/schemas/mail_type' - merge_variables: - $ref: '#/components/schemas/merge_variables' - send_date: - $ref: '#/components/schemas/send_date' - ltr_file: - description: >- - Notes: - - - HTML merge variables should not include delimiting whitespace. - - - 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. - - - For design specifications, please see our PDF and [HTML](#section/HTML-Examples) templates. - - - If a `custom_envelope` is used, follow this template. - - - 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. - - - Any letters over 6 pages single-sided or 12 pages double-sided will be - placed in a flat envelope instead of the standard double window - envelope. - - - See pricing for extra costs incurred. - oneOf: - - $ref: '#/components/schemas/html_string' - - $ref: '#/components/schemas/tmpl_id' - - $ref: '#/components/schemas/remote_file_url' - - type: string - pattern: ^(?!https://)[a-zA-Z0-9@:%._+~#=/]{1,256}.(html?|pdf)$ - return_envelope_user_provided: - oneOf: - - type: boolean - - type: string - 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. - - - To include a return envelope with your letter, set to `true` and specify - the `perforated_page`. See pricing for extra costs incurred. - default: false - qr_code: - type: object - description: Customize and place a QR code on the creative at the required position. - required: - - position - - redirect_url - - width - properties: - position: - type: string - enum: - - relative - 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'. - top: - type: number - description: >- - Vertical distance (in inches) to place QR code from the top. Only - allowed if "bottom" isn't provided. - right: - type: number - description: >- - Horizontal distance (in inches) to place QR code from the right. - Only allowed if "left" isn't provided. - left: - type: number - description: >- - Horizontal distance (in inches) to place QR code from the left. Only - allowed if "right" isn't provided. - bottom: - type: number - description: >- - Vertical distance (in inches) to place QR code from the bottom. Only - allowed if "top" isn't provided. - redirect_url: - type: string - 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 our help center. - width: - type: number - description: >- - The size (in inches) of the QR code with a minimum of 1 inch. All QR - codes are generated as a square. - pages: - type: string - description: >- - Specify the pages where the QR code should be stamped in a comma - separated format. Your QR code can be printed in the same position - on multiple pages. For postcards, the values should either be - "front", "back" (for either front or back) or "front,back" (for the - QR code to be printed on both sides). For self-mailers, the values - should either be "inside", "outside" (for either inside or outside) - or "inside,outside" (for the QR code to be printed on both sides). - For letters, the values can be specific page numbers ("1", "3"), - page number ranges such as "1-3", or a comma separated combination - of both ("1,3,5-7"). - logo: - type: object - 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: - type: string - 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)$ - style: - type: object - description: Customizes the appearance of the QR code. - properties: - background_color: - type: string - 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}$ - foreground_color: - type: string - 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}$ - ltr_size: - type: string - enum: - - us_letter - - us_legal - 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. - - - Please 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. - default: us_letter - letter_editable: - allOf: - - $ref: '#/components/schemas/input_to' - - $ref: '#/components/schemas/input_from' - - $ref: '#/components/schemas/editable' - - type: object - required: - - to - - from - - file - - color - - use_type - properties: - file: - $ref: '#/components/schemas/ltr_file' - extra_service: - $ref: '#/components/schemas/extra_service' - 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. - type: array - items: - $ref: '#/components/schemas/card_id' - minItems: 0 - maxItems: 1 - nullable: true - mail_type: - $ref: '#/components/schemas/mail_type' - color: - allOf: - - $ref: '#/components/schemas/color' - - default: false - double_sided: - $ref: '#/components/schemas/double_sided' - address_placement: - $ref: '#/components/schemas/address_placement' - return_envelope: - $ref: '#/components/schemas/return_envelope_user_provided' - perforated_page: - type: integer - 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 perforation guide. - nullable: true - custom_envelope: - $ref: '#/components/schemas/user_provided' - billing_group_id: - $ref: '#/components/schemas/billing_group_id' - qr_code: - $ref: '#/components/schemas/qr_code' - use_type: - $ref: '#/components/schemas/ltr_use_type' - fsc: - type: boolean - 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. - default: false - size: - $ref: '#/components/schemas/ltr_size' - psc_id: - type: string - description: Unique identifier prefixed with `psc_`. - pattern: ^psc_[a-zA-Z0-9]+$ - postcard_base: - allOf: - - $ref: '#/components/schemas/editable' - - type: object - properties: - size: - $ref: '#/components/schemas/postcard_size' - 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). - type: string - enum: - - marketing - - operational - - null - nullable: true - postcard: - allOf: - - $ref: '#/components/schemas/postcard_base' - - $ref: '#/components/schemas/generated' - - $ref: '#/components/schemas/from_us' - - type: object - required: - - id - - front_template_id - - back_template_id - - url - properties: - id: - $ref: '#/components/schemas/psc_id' - front_template_id: - type: string - 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. - pattern: ^tmpl_[a-zA-Z0-9]+$ - nullable: true - back_template_id: - type: string - 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. - pattern: ^tmpl_[a-zA-Z0-9]+$ - nullable: true - front_template_version_id: - type: string - 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. - pattern: ^vrsn_[a-zA-Z0-9]+$ - nullable: true - back_template_version_id: - type: string - 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. - pattern: ^vrsn_[a-zA-Z0-9]+$ - nullable: true - tracking_events: - description: >- - An array of tracking_event objects ordered by ascending `time`. - Will not be populated for postcards created in test mode. - type: array - items: - $ref: '#/components/schemas/tracking_event_normal' - nullable: true - url: - $ref: '#/components/schemas/signed_link' - campaign_id: - $ref: '#/components/schemas/campaign_id' - use_type: - $ref: '#/components/schemas/psc_use_type' - fsc: - type: boolean - description: >- - This is in beta. Contact support@lob.com or your account contact - to learn more. Not available for `4x6` or `A5` postcard sizes. - default: false - status: - $ref: '#/components/schemas/status' - failure_reason: - allOf: - - $ref: '#/components/schemas/failure_reason' - - nullable: true - object: - type: string - description: Value is resource type. - enum: - - postcard - default: postcard - 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: - id: - $ref: '#/components/schemas/psc_id' - deleted: - $ref: '#/components/schemas/deleted' - input_from_us: - type: object - 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' - psc_front: - description: > - The artwork to use as the front of your postcard. - - - Notes: - - - HTML merge variables should not include delimiting whitespace. - - - 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`. - - - See [here](#section/HTML-Examples) for 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' - psc_back: - description: > - The artwork to use as the back of your postcard. - - - Notes: - - - HTML merge variables should not include delimiting whitespace. - - - 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`. - - - Be sure to leave room for address and postage information by following - the templates provided here: - - 4x6 template - - 6x9 template - - 6x11 template - - - See [here](#section/HTML-Examples) for 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' - postcard_editable: - allOf: - - $ref: '#/components/schemas/postcard_base' - - $ref: '#/components/schemas/input_to' - - $ref: '#/components/schemas/input_from_us' - - type: object - required: - - to - - front - - back - - use_type - properties: - front: - $ref: '#/components/schemas/psc_front' - back: - $ref: '#/components/schemas/psc_back' - billing_group_id: - $ref: '#/components/schemas/billing_group_id' - qr_code: - $ref: '#/components/schemas/qr_code' - use_type: - $ref: '#/components/schemas/psc_use_type' - fsc: - type: boolean - description: >- - This is in beta. Contact support@lob.com or your account contact - to learn more. Not available for `4x6` or `A5` postcard sizes. - default: false - scans: - type: object - properties: - ip_location: - type: string - scan_date: - type: string - qr_code_scans: - allOf: - - type: object - properties: - resource_id: - type: string - description: Unique identifier for each mail piece. - date_created: - $ref: '#/components/schemas/date_created' - number_of_scans: - type: number - description: >- - Number of times the QR Code associated with this mail piece was - scanned. - scans: - type: array - description: Detailed scan information associated with each mail piece. - items: - $ref: '#/components/schemas/scans' - domain_response: - type: object - properties: - id: - description: Unique identifier for a domain. - type: string - domain: - description: The registered domain/hostname. - type: string - account_id: - description: >- - Unique identifier associated with the account the domain is - registered for. - type: string - domains_response: - type: object - properties: - data: - type: array - description: List of domains. - items: - $ref: '#/components/schemas/domain_response' - domain: - type: string - description: The registered domain/hostname. - domains: - type: object - required: - - domain - properties: - domain: - $ref: '#/components/schemas/domain' - redirect_link: - type: string - description: The original target URL. - link_response: - type: object - properties: - id: - description: Unique identifier prefixed with `lnk_`. - type: string - campaign_id: - $ref: '#/components/schemas/cmp_id' - domain_id: - description: A unique identifier for the registered domain. - type: string - resource_id: - description: The unique ID of the associated resource where the link was used. - type: string - redirect_link: - $ref: '#/components/schemas/redirect_link' - short_link: - description: The shortened URL for the associated original URL. - type: string - metadata_tag: - $ref: '#/components/schemas/metadata' - billing_group_id: - $ref: '#/components/schemas/billing_group_id' - links_response: - type: object - properties: - count: - type: integer - description: The number of results in the current response. - limit: - type: integer - description: How many results to return. - offset: - type: integer - description: >- - An integer that designates the offset at which to begin returning - results. Defaults to 0. - data: - type: array - description: | - list of links - items: - $ref: '#/components/schemas/link_response' - link_single: - type: object - required: - - redirect_link - properties: - redirect_link: - $ref: '#/components/schemas/redirect_link' - domain: - description: The registered domain to be used for the short URL. - type: string - slug: - description: >- - The unique path for the shortened URL, if empty a unique path will - be used. - type: string - metadata_tag: - $ref: '#/components/schemas/metadata' - billing_group_id: - $ref: '#/components/schemas/billing_group_id' - link_list: - type: array - description: Array of links to shorten. - minItems: 1 - maxItems: 1000 - items: - $ref: '#/components/schemas/link_single' - sfm_id: - type: string - description: Unique identifier prefixed with `sfm_`. - pattern: ^sfm_[a-zA-Z0-9]+$ - self_mailer_base: - allOf: - - $ref: '#/components/schemas/editable' - - type: object - properties: - size: - $ref: '#/components/schemas/self_mailer_size' - 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). - type: string - enum: - - marketing - - operational - - null - nullable: true - self_mailer: - allOf: - - $ref: '#/components/schemas/self_mailer_base' - - $ref: '#/components/schemas/generated' - - $ref: '#/components/schemas/from_us' - - type: object - required: - - id - - url - - use_type - properties: - id: - $ref: '#/components/schemas/sfm_id' - outside_template_id: - description: >- - The unique ID of the HTML template used for the outside of the - self mailer. - allOf: - - $ref: '#/components/schemas/tmpl_id' - - type: string - nullable: true - inside_template_id: - description: >- - The unique ID of the HTML template used for the inside of the - self mailer. - allOf: - - $ref: '#/components/schemas/tmpl_id' - - type: string - nullable: true - outside_template_version_id: - description: >- - The unique ID of the specific version of the HTML template used - for the outside of the self mailer. - allOf: - - $ref: '#/components/schemas/vrsn_id' - - type: string - nullable: true - inside_template_version_id: - description: >- - The unique ID of the specific version of the HTML template used - for the inside of the self mailer. - allOf: - - $ref: '#/components/schemas/vrsn_id' - - type: string - nullable: true - object: - type: string - description: Value is resource type. - enum: - - self_mailer - default: self_mailer - tracking_events: - description: >- - An array of certified tracking events ordered by ascending - `time`. Not populated in test mode. - type: array - items: - $ref: '#/components/schemas/tracking_event_certified' - use_type: - $ref: '#/components/schemas/sfm_use_type' - url: - $ref: '#/components/schemas/signed_link' - fsc: - type: boolean - description: >- - This is in beta. Contact support@lob.com or your account contact - to learn more. Not available for `11x9_bifold` self-mailer size. - default: false - status: - $ref: '#/components/schemas/status' - campaign_id: - $ref: '#/components/schemas/campaign_id' - failure_reason: - allOf: - - $ref: '#/components/schemas/failure_reason' - - nullable: true - 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: - id: - $ref: '#/components/schemas/sfm_id' - deleted: - $ref: '#/components/schemas/deleted' - self_mailer_editable: - allOf: - - $ref: '#/components/schemas/self_mailer_base' - - $ref: '#/components/schemas/input_to' - - $ref: '#/components/schemas/input_from_us' - - type: object - required: - - to - - inside - - outside - - use_type - properties: - inside: - description: > - The artwork to use as the inside of your self mailer. - - - Notes: - - - HTML merge variables should not include delimiting whitespace. - - - PDF, PNG, and JPGs must be sized at 6"x18" at 300 DPI, while - supplied HTML will be rendered to the specified `size`. - - - Be sure to leave room for address and postage information by - following the templates provided here: - - 6x18 bifold template - - 12x9 bifold template - - 17.75x9 trifold template - - - See [here](#section/HTML-Examples) for 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' - outside: - description: > - The artwork to use as the outside of your self mailer. - - - Notes: - - - HTML merge variables should not include delimiting whitespace. - - - PDF, PNG, and JPGs must be sized at 6"x18" at 300 DPI, while - supplied HTML will be rendered to the specified `size`. - - - See [here](#section/HTML-Examples) for 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' - billing_group_id: - $ref: '#/components/schemas/billing_group_id' - qr_code: - $ref: '#/components/schemas/qr_code' - use_type: - $ref: '#/components/schemas/sfm_use_type' - fsc: - type: boolean - description: >- - This is in beta. Contact support@lob.com or your account contact - to learn more. Not available for `11x9_bifold` self-mailer size. - default: false - snap_pack_size: - type: string - enum: - - 8.5x11 - description: Specifies the size of the snap pack. - default: 8.5x11 - snap_pack_base: - allOf: - - $ref: '#/components/schemas/editable' - - type: object - properties: - size: - $ref: '#/components/schemas/snap_pack_size' - 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). - type: string - enum: - - marketing - - operational - - null - nullable: true - snap_pack_editable: - allOf: - - $ref: '#/components/schemas/snap_pack_base' - - $ref: '#/components/schemas/input_to' - - $ref: '#/components/schemas/input_from_us' - - type: object - required: - - to - - inside - - outside - - use_type - properties: - inside: - description: > - The artwork to use as the inside of your snap pack. - - - Notes: - - - HTML merge variables should not include delimiting whitespace. - - - PDF, PNG, and JPGs must be sized at 8.5"x11" at 300 DPI, while - supplied HTML will be rendered to the specified `size`. - - - Be sure to leave room for address and postage information by - following the template provided here: - - 8.5x11 snap pack template - - - See [here](#section/HTML-Examples) for 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' - outside: - description: > - The artwork to use as the outside of your snap pack. - - - Notes: - - - HTML merge variables should not include delimiting whitespace. - - - PDF, PNG, and JPGs must be sized at 6"x18" at 300 DPI, while - supplied HTML will be rendered to the specified `size`. - - - See [here](#section/HTML-Examples) for 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' - billing_group_id: - $ref: '#/components/schemas/billing_group_id' - use_type: - $ref: '#/components/schemas/snap_pack_use_type' - color: - allOf: - - $ref: '#/components/schemas/color' - - default: false - qr_code: - $ref: '#/components/schemas/qr_code' - snap_pack_id: - type: string - description: Unique identifier prefixed with `ord_`. - pattern: ^ord_[0-9a-f]{26}$ - snap_pack: - allOf: - - $ref: '#/components/schemas/snap_pack_base' - - $ref: '#/components/schemas/generated' - - $ref: '#/components/schemas/from_us' - - type: object - required: - - id - - url - - use_type - properties: - id: - $ref: '#/components/schemas/snap_pack_id' - outside_template_id: - description: >- - The unique ID of the HTML template used for the outside of the - snap pack. - allOf: - - $ref: '#/components/schemas/tmpl_id' - - type: string - nullable: true - inside_template_id: - description: >- - The unique ID of the HTML template used for the inside of the - snap pack. - allOf: - - $ref: '#/components/schemas/tmpl_id' - - type: string - nullable: true - outside_template_version_id: - description: >- - The unique ID of the specific version of the HTML template used - for the outside of the snap pack. - allOf: - - $ref: '#/components/schemas/vrsn_id' - - type: string - nullable: true - inside_template_version_id: - description: >- - The unique ID of the specific version of the HTML template used - for the inside of the snap pack. - allOf: - - $ref: '#/components/schemas/vrsn_id' - - type: string - nullable: true - object: - type: string - description: Value is resource type. - enum: - - snap_pack - default: snap_pack - tracking_events: - description: >- - An array of tracking events ordered by ascending `time`. Not - populated in test mode. - type: array - items: - $ref: '#/components/schemas/tracking_event_normal' - use_type: - $ref: '#/components/schemas/snap_pack_use_type' - url: - $ref: '#/components/schemas/signed_link' - fsc: - type: boolean - description: >- - Contact support@lob.com or your account contact to learn more. - Not available for snap_pack currently. - default: false - status: - $ref: '#/components/schemas/status' - campaign_id: - $ref: '#/components/schemas/campaign_id' - failure_reason: - allOf: - - $ref: '#/components/schemas/failure_reason' - - nullable: true - color: - $ref: '#/components/schemas/color' - template_html: - type: string - 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: - - - [Postcards](#operation/postcard_create) - `front` and `back` - - - [Self Mailers](#operation/self_mailer_create) - `inside` and `outside` - - - [Letters](#operation/letter_create) - `file` - - - [Checks](#operation/check_create) - `check_bottom` and `attachment` - - - [Cards](#operation/card_create) - `front` and `back` - - - If 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}}`. - maxLength: 100000 - engine: - type: string - description: | - The engine used to combine HTML template with merge variables. - * `legacy` - Lob's original engine - * `handlebars` - enum: - - legacy - - handlebars - nullable: true - default: legacy - template_required_vars: - type: array - items: - type: string - description: > - An array of required variables to be used in a template. Only available - for `handlebars` templates. - template_version_writable: - type: object - required: - - html - properties: - description: - $ref: '#/components/schemas/resource_description' - html: - $ref: '#/components/schemas/template_html' - engine: - $ref: '#/components/schemas/engine' - required_vars: - $ref: '#/components/schemas/template_required_vars' - template_version: - allOf: - - $ref: '#/components/schemas/template_version_writable' - - $ref: '#/components/schemas/lob_base' - - type: object - required: - - id - properties: - id: - $ref: '#/components/schemas/vrsn_id' - suggest_json_editor: - type: boolean - description: | - Used by frontend, true if the template uses advanced features. - merge_variables: - type: object - description: > - Object representing the keys of every merge variable present in - the template. It has one key named 'keys', and its value is an - array of strings. - object: - type: string - description: Value is resource type. - enum: - - version - default: version - template_version_updatable: - type: object - properties: - description: - $ref: '#/components/schemas/resource_description' - engine: - $ref: '#/components/schemas/engine' - required_vars: - $ref: '#/components/schemas/template_required_vars' - 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: - id: - $ref: '#/components/schemas/vrsn_id' - deleted: - $ref: '#/components/schemas/deleted' - template: - type: object - required: - - id - - versions - - published_version - properties: - description: - $ref: '#/components/schemas/resource_description' - id: - $ref: '#/components/schemas/tmpl_id' - versions: - type: array - description: >- - An array of all non-deleted [version - objects](#tag/Template-Versions) associated with the template. - items: - $ref: '#/components/schemas/template_version' - 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' - object: - type: string - description: Value is resource type. - enum: - - template - default: template - metadata: - $ref: '#/components/schemas/metadata' - date_created: - $ref: '#/components/schemas/date_created' - date_modified: - $ref: '#/components/schemas/date_modified' - deleted: - $ref: '#/components/schemas/deleted' - template_update: - type: object - 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' - 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: - id: - $ref: '#/components/schemas/tmpl_id' - deleted: - $ref: '#/components/schemas/deleted' - template_writable: - type: object - required: - - html - properties: - description: - $ref: '#/components/schemas/resource_description' - html: - $ref: '#/components/schemas/template_html' - metadata: - $ref: '#/components/schemas/metadata' - engine: - $ref: '#/components/schemas/engine' - required_vars: - $ref: '#/components/schemas/template_required_vars' - upload_updatable: - type: object - properties: - originalFilename: - title: Original Filename - type: string - description: Original filename provided when the upload is created. - requiredAddressColumnMapping: - $ref: '#/components/schemas/required_address_column_mapping' - optionalAddressColumnMapping: - $ref: '#/components/schemas/optional_address_column_mapping' - metadata: - $ref: '#/components/schemas/uploads_metadata' - mergeVariableColumnMapping: - $ref: '#/components/schemas/merge_variable_column_mapping' - upload_file: - type: object - required: - - message - - filename - properties: - message: - title: Message - enum: - - File uploaded successfully - type: string - default: File uploaded successfully - filename: - title: Filename - type: string - upload_create_export: - type: object - required: - - message - - exportId - properties: - message: - title: Message - enum: - - Export is processing - type: string - default: Export is processing - exportId: - title: Export ID - type: string - example: ex_2dafd758ed3da9c43 - ex_id: - type: string - description: Unique identifier prefixed with `ex_`. - pattern: ^ex_[a-zA-Z0-9]+$ - us_autocompletions_writable: - type: object - required: - - address_prefix - properties: - address_prefix: - type: string - description: | - Only accepts numbers and street names in an alphanumeric format. - city: - type: string - description: > - An optional city input used to filter suggestions. Case insensitive - and does not match partial abbreviations. - state: - type: string - description: > - An optional state input used to filter suggestions. Case insensitive - and does not match partial abbreviations. - zip_code: - type: string - description: > - An optional ZIP Code input used to filter suggestions. Matches - partial entries. - geo_ip_sort: - type: boolean - description: > - If `true`, sort suggestions by proximity to the IP set in the - `X-Forwarded-For` header. - us_auto_id: - type: string - description: Unique identifier prefixed with `us_auto_`. - pattern: ^us_auto_[a-zA-Z0-9]+$ - suggestions: - type: object - required: - - primary_line - - city - - state - - zip_code - properties: - primary_line: - type: string - description: > - The primary delivery line (usually the street address) of the - address. - - Combination of the following applicable `components` (primary number - & - - secondary information may be missing or inaccurate): - - * `primary_number` - - * `street_predirection` - - * `street_name` - - * `street_suffix` - - * `street_postdirection` - - * `secondary_designator` - - * `secondary_number` - - * `pmb_designator` - - * `pmb_number` - city: - $ref: '#/components/schemas/city' - 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`). - - $ref: '#/components/schemas/zip_code' - object: - type: string - description: Value is resource type. - enum: - - us_autocompletion - default: us_autocompletion - us_autocompletions: - type: object - properties: - id: - $ref: '#/components/schemas/us_auto_id' - suggestions: - type: array - description: | - An array of objects representing suggested addresses. - minItems: 0 - maxItems: 10 - items: - $ref: '#/components/schemas/suggestions' - object: - type: string - description: Value is resource type. - enum: - - us_autocompletion - default: us_autocompletion - location: - type: object - required: - - latitude - - longitude - properties: - latitude: - type: number - minimum: -90 - maximum: 90 - format: float - 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. - nullable: true - longitude: - type: number - minimum: -180 - maximum: 180 - format: float - 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. - nullable: true - reverse_geocode_id: - type: string - description: Unique identifier prefixed with `us_reverse_geocode_`. - pattern: ^us_reverse_geocode_[a-zA-Z0-9_]+$ - components: - type: object - description: >- - A nested object containing a breakdown of each component of a reverse - geocoded response. - required: - - zip_code - - zip_code_plus_4 - properties: - zip_code: - type: string - description: The 5-digit ZIP code - pattern: ^\d{5}$ - zip_code_plus_4: - allOf: - - description: A 4-digit ZIP add-on code - - $ref: '#/components/schemas/zip_code_plus_4' - location_analysis: - type: object - description: >- - A nested object containing a breakdown of the analysis of a reverse - geocoded location. - required: - - latitude - - longitude - - distance - properties: - latitude: - type: number - minimum: -90 - maximum: 90 - format: float - 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`). - nullable: true - longitude: - type: number - minimum: -180 - maximum: 180 - format: float - 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`). - nullable: true - distance: - type: number - format: float - description: > - The distance from the input location to this exact zip code in - miles. - addresses: - type: object - properties: - components: - $ref: '#/components/schemas/components' - location_analysis: - $ref: '#/components/schemas/location_analysis' - reverse_geocode: - type: object - properties: - id: - $ref: '#/components/schemas/reverse_geocode_id' - addresses: - type: array - description: | - list of addresses - items: - $ref: '#/components/schemas/addresses' - object: - type: string - description: Value is resource type. - enum: - - us_reverse_geocode_lookup - default: us_reverse_geocode_lookup - single_line_address: - type: object - required: - - address - properties: - address: - type: string - 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._ - maxLength: 500 - us_verifications_writable: - oneOf: - - $ref: '#/components/schemas/multiple_components' - - $ref: '#/components/schemas/single_line_address' - zip5: - type: object - required: - - zip_code - properties: - zip_code: - type: string - description: A 5-digit ZIP code. - pattern: ^\d{5}$ - example: '94107' - zip_id: - type: string - description: Unique identifier prefixed with `us_zip_`. - pattern: ^us_zip_[a-zA-Z0-9]+$ - zip_lookup_city: - type: object - required: - - city - - state - - county - - county_fips - - preferred - properties: - city: - $ref: '#/components/schemas/city' - state: - $ref: '#/components/schemas/state' - county: - $ref: '#/components/schemas/county' - county_fips: - $ref: '#/components/schemas/county_fips' - preferred: - type: boolean - description: > - Indicates whether or not the city is the USPS default city (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. - example: true - zip: - allOf: - - $ref: '#/components/schemas/zip5' - - type: object - required: - - id - - cities - - zip_code_type - - object - properties: - id: - $ref: '#/components/schemas/zip_id' - cities: - type: array - items: - $ref: '#/components/schemas/zip_lookup_city' - description: > - An array of city objects containing valid cities for the - `zip_code`. Multiple cities will be returned if more than one - city is associated with the input ZIP code. - zip_code_type: - $ref: '#/components/schemas/zip_code_type' - object: - type: string - description: Value is resource type. - enum: - - us_zip_lookup - default: us_zip_lookup - postcard_types: - type: string - 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 - self_mailer_types: - type: string - 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 - letter_types: - type: string - 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 - check_types: - type: string - 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 - address_types: - type: string - description: Unique identifier referring to status of address - enum: - - address.created - - address.deleted - bank_account_types: - type: string - description: Unique identifier referring to status of bank account - enum: - - bank_account.created - - bank_account.deleted - - bank_account.verified - event_type: - type: object - required: - - id - - enabled_for_test - - resource - - object - properties: - id: - oneOf: - - $ref: '#/components/schemas/postcard_types' - - $ref: '#/components/schemas/self_mailer_types' - - $ref: '#/components/schemas/letter_types' - - $ref: '#/components/schemas/check_types' - - $ref: '#/components/schemas/address_types' - - $ref: '#/components/schemas/bank_account_types' - enabled_for_test: - type: boolean - description: >- - Value is `true` if the event type is enabled in both the test and - live environments and `false` if it is only enabled in the live - environment. - resource: - type: string - enum: - - postcards - - self mailers - - letters - - checks - - addresses - - bank accounts - object: - type: string - description: Value is resource type. - enum: - - event_type - default: event_type - events: - type: object - required: - - id - - body - - reference_id - - event_type - - date_created - - object - properties: - id: - type: string - description: Unique identifier prefixed with `evt_`. - pattern: ^evt_[a-zA-Z0-9_]+$ - body: - type: object - description: >- - The body of the associated resource as they were at the time of the - event, i.e. the [postcard object](#operation/postcard_retrieve), - [the letter object](#operation/letter_retrieve), [the check - object](#operation/check_retrieve), [the address - object](#operation/address_retrieve), or [the bank account - object](#operation/bank_account_retrieve). For `.deleted` events, - the body matches the response for the corresponding delete endpoint - for that resource (e.g. the [postcard delete - response](#operation/postcard_delete)). - reference_id: - description: Unique identifier of the related resource for the event. - type: string - event_type: - $ref: '#/components/schemas/event_type' - date_created: - $ref: '#/components/schemas/date_created' - object: - type: string - description: Value is resource type. - enum: - - event - default: event - parameters: - limit: - in: query - name: limit - required: false - description: How many results to return. - schema: - type: integer - minimum: 1 - default: 10 - maximum: 100 - example: 10 - before_after: - in: query - name: before/after - required: false - description: > - `before` and `after` are both optional but only one of them can be in - the query at a time. - schema: - allOf: - - type: object - properties: - before: - type: string - 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. - after: - type: string - 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. - - oneOf: - - required: - - before - - required: - - after - include: - in: query - name: include - description: > - Request that the response include the total count by specifying - `include=["total_count"]`. - schema: - type: array - items: - type: string - explode: true - date_created: - in: query - name: 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 ≥, and `lte` is ≤. - schema: - $ref: '#/components/schemas/date_filter' - style: deepObject - explode: true - metadata: - in: query - name: metadata - description: Filter by metadata key-value pair`. - schema: - $ref: '#/components/schemas/metadata' - style: deepObject - explode: true - offset: - in: query - name: offset - required: false - description: >- - An integer that designates the offset at which to begin returning - results. Defaults to 0. - schema: - type: integer - default: 0 - date_modified: - in: query - name: 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 ≥, and `lte` is ≤. - schema: - $ref: '#/components/schemas/date_filter' - style: deepObject - explode: true - lang_spec: - in: header - name: x-lang-output - required: false - description: > - * `native` - Translate response to the native language of the country in - the request - - * `match` - match the response to the language in the request - - - Default response is in English. - schema: - type: string - enum: - - native - - match - scheduled: - in: query - name: scheduled - description: > - * `true` - only return orders (past or future) where `send_date` is - - greater than `date_created` - - * `false` - only return orders where `send_date` is equal to - `date_created` - schema: - type: boolean - send_date: - in: query - name: 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 ≥, and - `lte` is ≤. - schema: - $ref: '#/components/schemas/send_date' - mail_type: - in: query - name: mail_type - description: > - A string designating the mail postage type: * `usps_first_class` - - (default) * `usps_standard` - a cheaper option 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. - schema: - $ref: '#/components/schemas/mail_type' - sort_by: - in: query - name: sort_by - description: > - Sorts items by ascending or descending dates. Use either `date_created` - or `send_date`, not both. - schema: - allOf: - - type: object - properties: - date_created: - type: string - enum: - - asc - - desc - send_date: - type: string - enum: - - asc - - desc - - oneOf: - - required: - - date_created - - required: - - send_date - status: - in: query - name: status - description: | - A string describing the render status: - * `processed` - the rendering process is currently underway. - * `rendered` - the rendering process has completed successfully. - * `failed` - the rendering process has failed. - schema: - $ref: '#/components/schemas/status' - idem-header: - in: header - name: Idempotency-Key - required: false - description: > - A string of no longer than 256 characters that uniquely identifies this - resource. For more help integrating idempotency keys, refer to our implementation guide. - schema: - type: string - maxLength: 256 - example: 026e7634-24d7-486c-a0bb-4a17fd0eebc5 - idem-query: - in: query - name: idempotency_key - required: false - description: > - A string of no longer than 256 characters that uniquely identifies this - resource. For more help integrating idempotency keys, refer to our implementation guide. - schema: - type: string - maxLength: 256 - example: 026e7634-24d7-486c-a0bb-4a17fd0eebc5 - campaign_id: - in: query - name: campaign_id - required: false - description: >- - Filters resources created by the provided campaign id, prefixed with - `cmp_`. - schema: - $ref: '#/components/schemas/campaign_id' - lob-version: - in: header - name: Lob-Version - required: false - description: > - A string representing the version of the API being used. For more - information on versioning, refer to our [Versioning and - Changelog](#tag/Versioning-and-Changelog) documentation. - schema: - type: string - example: '2024-01-01' - pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ - responses: - address_error: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' - example: - error: - code: not_found - message: address not found - status_code: 404 - all_addresses: - 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.
If no more addresses are - available beyond the current set of returned results, the `next_url` - field will be empty. - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/list' - - type: object - properties: - data: - type: array - description: list of addresses - items: - $ref: '#/components/schemas/address' - example: - data: - - id: adr_e68217bd744d65c8 - description: Harry - Office - name: HARRY ZHANG - company: LOB - phone: '5555555555' - email: harry@lob.com - 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: '2019-08-12T00:16:00.361Z' - date_modified: '2019-08-12T00:16:00.361Z' - object: address - - id: adr_asdi2y3riuasasoi - description: Harry - Office - name: Harry Zhang - company: Lob - phone: '5555555555' - email: harry@lob.com - metadata: {} - address_line1: 370 WATER ST - address_line2: '' - address_city: SUMMERSIDE - address_state: PRINCE EDWARD ISLAND - address_zip: C1N 1C4 - address_country: CANADA - date_created: '2019-09-20T00:14:00.361Z' - date_modified: '2019-09-20T00:14:00.361Z' - object: address - object: list - next_url: >- - https://api.lob.com/v1/addresses?limit=2&after=eyJkYXRlT2Zmc2V0IjoiMjAxOS0wOC0wN1QyMTo1OTo0Ni43NjRaIiwiaWRPZmZzZXQiOiJhZHJfODMwYmYwZWFiZGFhYTQwOSJ9 - previous_url: null - count: 2 - post_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' - content: - application/json: - schema: - $ref: '#/components/schemas/address' - examples: - full_us: - value: - id: adr_d3489cd64c791ab5 - description: Harry - Office - name: HARRY ZHANG - company: LOB - phone: '5555555555' - email: harry@lob.com - address_line1: 210 KING ST STE 6100 - address_city: SAN FRANCISCO - address_state: CA - address_zip: '94107' - address_country: UNITED STATES - metadata: {} - date_created: '2017-09-05T17:47:53.767Z' - date_modified: '2017-09-05T17:47:53.767Z' - object: address - full_intl: - value: - id: adr_b9f49f464c836203 - description: Harry - Office - name: HARRY ZHANG - company: LOB - phone: '5555555555' - email: harry@lob.com - address_line1: 370 WATER ST - address_city: SUMMERSIDE - address_state: PRINCE EDWARD ISLAND - address_zip: C1N 1C4 - address_country: CANADA - metadata: {} - date_created: '2021-11-29T20:55:46.843Z' - date_modified: '2021-11-29T20:56:46.843Z' - object: address - ncoa_us_live: - value: - id: adr_d3489cd64c791ab5 - description: Harry - Office - name: HARRY ZHANG - company: LOB - phone: '5555555555' - email: harry@lob.com - address_line1: ████ - address_line2: ████ - address_city: SAN FRANCISCO - address_state: CA - address_zip: '94107' - address_country: UNITED STATES - metadata: {} - date_created: '2017-09-05T17:47:53.767Z' - date_modified: '2017-09-05T17:47:53.767Z' - recipient_moved: true - inline: false - object: address - ncoa_us_test: - value: - id: adr_e463565030210e12 - description: null - name: TEST KEYS DO NOT VERIFY ADDRESSES - company: null - phone: null - email: null - address_line1: ████ - address_line2: ████ - address_city: SAN FRANCISCO - address_state: CA - address_zip: '94107' - address_country: UNITED STATES - metadata: {} - date_created: '2019-12-05T19:39:19.932Z' - date_modified: '2019-12-05T19:39:19.932Z' - recipient_moved: true - inline: false - object: address - address: - description: Returns an address object if a valid identifier was provided. - content: - application/json: - schema: - $ref: '#/components/schemas/address' - address_deleted: - description: Deleted - content: - application/json: - schema: - $ref: '#/components/schemas/address_deletion' - example: - id: adr_123456789 - deleted: true - bank_account_error: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' - example: - error: - code: invalid - message: routing_number is required - status_code: 422 - post_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' - content: - application/json: - schema: - $ref: '#/components/schemas/bank_account' - example: - id: bank_8cad8df5354d33f - signature_url: >- - https://lob-assets.com/letters/asd_asdfghjklqwertyu.pdf?version=45&expires=1234567890&signature=a - description: Test Bank Account - metadata: {} - routing_number: '322271627' - fractional_routing_number: 25-3/440 - check_template: jpm - account_number: '123456789' - account_type: company - signatory: John Doe - bank_name: J.P. MORGAN CHASE BANK, N.A., - bank_city: Columbus - bank_state: OH - bank_zip: '43240' - verified: false - date_created: '2015-11-06T19:24:24.440Z' - date_modified: '2015-11-06T19:24:24.440Z' - object: bank_account - bank_account_deleted: - description: Deleted - content: - application/json: - schema: - $ref: '#/components/schemas/bank_deletion' - example: - id: bank_123456789 - deleted: true - all_bank_accounts: - 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.
If no more - bank_accounts are available beyond the current set of returned results, - the `next_url` field will be empty. - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/list' - - type: object - properties: - data: - type: array - description: list of bank_accounts - items: - $ref: '#/components/schemas/bank_account' - example: - data: - - id: bank_0e3fb07eba0b35b - signature_url: >- - https://lob-assets.com/letters/asd_asdfghjklqwertyu.pdf?version=45&expires=1234567890&signature=a - description: Example bank account - metadata: {} - routing_number: '122100024' - account_number: '1234564789' - account_type: company - signatory: John Doe - bank_name: JPMORGAN CHASE BANK, NA - verified: true - date_created: '2019-03-30T13:13:22.200Z' - date_modified: '2019-03-30T13:13:23.385Z' - object: bank_account - - id: bank_eba93f7de3c02d9 - description: Example bank account - metadata: {} - routing_number: '122100024' - account_number: '1234564789' - account_type: company - signatory: John Doe - bank_name: JPMORGAN CHASE BANK, NA - verified: true - date_created: '2019-03-30T13:11:06.809Z' - date_modified: '2019-03-30T13:11:07.872Z' - object: bank_account - object: list - next_url: >- - https://api.lob.com/v1/bank_accounts?limit=2&after=eyJkYXRlT2Zmc2V0IjoiMjAxOS0wMy0zMFQxMzoxMTowNi44MDlaIiwiaWRPZmZzZXQiOiJiYW5rX2ViYTkzZjdkZTNjMDJkOSJ9 - previous_url: null - count: 2 - billing_group_list_error: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' - example: - error: - code: not_found - message: billing_group not found - status_code: 404 - billing_group_error: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' - example: - error: - code: invalid - message: message about incorrect parameter - status_code: 422 - post_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' - content: - application/json: - schema: - $ref: '#/components/schemas/billing_group' - example: - id: bg_c94e83ca2cd5121 - name: Marketing Dept - description: Usage group used for the Marketing Dept resource sends - date_created: '2017-11-07T22:56:10.962Z' - date_modified: '2017-11-07T22:56:10.962Z' - object: billing_group - buckslip_error: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' - example: - error: - code: invalid - message: message about incorrect parameter - status_code: 422 - buckslip_deleted: - description: Deleted the buckslip - content: - application/json: - schema: - $ref: '#/components/schemas/buckslip_deletion' - example: - id: buckslip_123456789 - deleted: true - buckslip_order_error: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' - example: - error: - code: not_found - message: buckslip not found - status_code: 404 - us_verifications_error: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' - example: - error: - code: invalid - message: primary_line is required or address is required - status_code: 422 - bulk_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' - content: - application/json: - schema: - $ref: '#/components/schemas/us_verifications' - example: - addresses: - - id: us_ver_c7cb63d68f8d6 - recipient: LOB.COM - primary_line: 210 KING ST - secondary_line: '' - urbanization: '' - last_line: SAN FRANCISCO CA 94107-1702 - deliverability: deliverable - valid_address: true - components: - primary_number: '210' - street_predirection: '' - street_name: KING - street_suffix: ST - street_postdirection: '' - secondary_designator: '' - secondary_number: '' - pmb_designator: '' - pmb_number: '' - extra_secondary_designator: '' - extra_secondary_number: '' - city: SAN FRANCISCO - state: CA - zip_code: '94107' - zip_code_plus_4: '1702' - zip_code_type: standard - delivery_point_barcode: '941071728506' - address_type: commercial - record_type: street - default_building_address: false - county: SAN FRANCISCO - county_fips: '06075' - carrier_route: C032 - carrier_route_type: city_delivery - po_box_only_flag: 'N' - latitude: 37.77597542841264 - longitude: -122.3929557343685 - deliverability_analysis: - dpv_confirmation: 'Y' - dpv_cmra: 'N' - dpv_vacant: 'N' - dpv_active: 'Y' - dpv_inactive_reason: '' - dpv_throwback: 'N' - dpv_non_delivery_day_flag: 'N' - dpv_non_delivery_day_values: '' - dpv_no_secure_location: 'N' - dpv_door_not_accessible: 'N' - dpv_footnotes: - - AA - - BB - ews_match: false - lacs_indicator: '' - lacs_return_code: '' - suite_return_code: '' - lob_confidence_score: - score: 100 - level: high - object: us_verification - errors: false - intl_verifications_error: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' - example: - error: - code: invalid - message: country is required - status_code: 422 - bulk_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' - content: - application/json: - schema: - $ref: '#/components/schemas/intl_verifications' - example: - addresses: - - id: intl_ver_c7cb63d68f8d6 - recipient: null - primary_line: 370 WATER ST - secondary_line: '' - last_line: SUMMERSIDE PE C1N 1C4 - country: CA - coverage: SUBBUILDING - deliverability: deliverable - status: LV4 - components: - primary_number: '370' - street_name: WATER ST - city: SUMMERSIDE - state: PE - postal_code: C1N 1C4 - object: intl_verification - errors: false - all_campaigns: - 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.
If no more campaigns are available beyond - the current set of returned results, the `next_url` field will be empty. - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/list' - - type: object - properties: - data: - type: array - description: list of campaigns - items: - $ref: '#/components/schemas/campaign' - example: - data: - - id: cmp_e05ee61ff80764b - billing_group_id: bg_fe3079dcdd80e5ae - name: My Campaign - description: My Campaign's description - schedule_type: immediate - send_date: null - target_delivery_date: null - cancel_window_campaign_minutes: 60 - metadata: {} - use_type: marketing - is_draft: true - deleted: false - creatives: [] - uploads: [] - auto_cancel_if_ncoa: false - date_created: '2017-09-05T17:47:53.767Z' - date_modified: '2017-09-05T17:47:53.767Z' - object: campaign - object: list - previous_url: null - next_url: null - count: 1 - campaigns_error: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' - example: - error: - code: not_found - message: campaign not found - status_code: 404 - campaign_deleted: - description: Deleted the campaign. - content: - application/json: - 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: - id: - $ref: '#/components/schemas/cmp_id' - deleted: - type: boolean - description: True if the resource has been successfully deleted. - example: - id: cmp_e05ee61ff80764b - deleted: true - mailpiece_error: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' - example: - error: - code: not_found - message: to address not found - status_code: 404 - card_deleted: - description: Deleted the card - content: - application/json: - schema: - $ref: '#/components/schemas/card_deletion' - example: - id: card_123456789 - deleted: true - card_order_error: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' - example: - error: - code: not_found - message: card not found - status_code: 404 - all_checks: - 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.
If no more checks are available beyond the - current set of returned results, the `next_url` field will be empty. - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/list' - - type: object - properties: - data: - type: array - description: list of checks - items: - $ref: '#/components/schemas/check' - example: - data: - - id: chk_0176bf6197100185 - description: Demo Check - metadata: {} - check_number: 12559 - memo: rent - amount: 22.5 - url: >- - https://lob-assets.com/checks/chk_0176bf6197100185.pdf?version=v1&expires=1568239682&signature=aqKV5lmg_ktxzyl-qEwIf8-7DbvcguLO0LrfFcyMrUDDt6hxX_da0MEEpElxKR876VUaZrpHq_i_ayDWrsK3BA - to: - id: adr_bae820679f3f536b - description: Harry - Office - name: HARRY ZHANG - company: LOB - email: harry@lob.com - phone: '5555555555' - address_line1: 210 KING ST STE 6100 - address_line2: '' - address_city: SAN FRANCISCO - address_state: CA - address_zip: 94107-1741 - address_country: UNITED STATES - metadata: {} - date_created: '2018-12-08T03:08:43.446Z' - date_modified: '2018-12-08T03:08:43.446Z' - object: address - recipient_moved: false - from: - id: adr_210a8d4b0b76d77b - name: LEORE AVIDAR - address_line1: 210 KING ST STE 6100 - address_city: SAN FRANCISCO - address_state: CA - address_zip: 94107-1741 - address_country: UNITED STATES - metadata: {} - date_created: '2018-12-08T03:01:07.651Z' - date_modified: '2018-12-08T03:01:07.651Z' - object: address - bank_account: - id: bank_8cad8df5354d33f - description: Test Bank Account - metadata: {} - routing_number: '322271627' - account_number: '123456789' - account_type: individual - signatory: John Doe - bank_name: J.P. MORGAN CHASE BANK, N.A. - verified: true - date_created: '2015-11-06T19:24:24.440Z' - date_modified: '2015-11-06T19:41:28.312Z' - object: bank_account - signature_url: >- - https://lob-assets.com/bank-accounts/asd_asdfghjkqwertyui.pdf?expires=1234567890&signature=aksdf - carrier: USPS - tracking_events: [] - thumbnails: - - small: >- - https://lob-assets.com/checks/chk_0176bf6197100185_thumb_small_1.png?version=v1&expires=1568239682&signature=T8DfMm_mxJJzIPgm8I0lvYY4Z6I8aFjsGsrEAicEqw8Ei_FaOtiGQKGeY16rdugAt8lmS_iX0lveBoG2RgWDDw - medium: >- - https://lob-assets.com/checks/chk_0176bf6197100185_thumb_medium_1.png?version=v1&expires=1568239682&signature=-iJD7C58xOCD8eQ01StqSlw9WbDymL0Ygze9twfTs9s17zQppr2Zx363_Z4bP3ATHNhF3osjHuAxIasI2Wf6DQ - large: >- - https://lob-assets.com/checks/chk_0176bf6197100185_thumb_large_1.png?version=v1&expires=1568239682&signature=VJlOkVDPKZThstdd632r3Grm2WhoyPkC-pffpcePTw1i1NkpAObDSRaItKMOQgeWkAcUud3SH0tYcVOadaNiCw - - small: >- - https://lob-assets.com/checks/chk_0176bf6197100185_thumb_small_2.png?version=v1&expires=1568239682&signature=XpCkOjy2zIKXkuc0s-UAYGNwpD_pgt7c9FKTDUCYbyqXupAg1MV1l2tdqevr0L0LT5FJqrGZH9khD5QRMQTkAA - medium: >- - https://lob-assets.com/checks/chk_0176bf6197100185_thumb_medium_2.png?version=v1&expires=1568239682&signature=sdgnJMzusEfndu7dNmk37eKc0AV7Hmqev6TQAqkCESs5pg7j6dDTsp7v4pnDvhsj8d7SIMcahl1aGiysoom0CA - large: >- - https://lob-assets.com/checks/chk_0176bf6197100185_thumb_large_2.png?version=v1&expires=1568239682&signature=ybe8ovBh8Gf-AWKGRs4CB4XkU-erPVbY66umXARhTiJG2Dg1QlyCb9WmBXWt0tBCwD5NGMl20mHeAgHwecLxBA - expected_delivery_date: '2019-08-16' - mail_type: usps_first_class - date_created: '2019-08-08T19:34:47.571Z' - date_modified: '2019-08-08T19:34:49.612Z' - send_date: '2019-08-08' - message: pancakes are good - object: check - check_bottom_template_id: tmpl_a - attachment_template_id: tmpl_a - check_bottom_template_version_id: vrsn_a - attachment_template_version_id: vrsn_a - merge_variables: {} - use_type: operational - deleted: true - - id: chk_92b9a6714bc0557c - description: Demo Check - metadata: {} - check_number: 12558 - memo: rent - amount: 22.5 - url: >- - https://lob-assets.com/checks/chk_92b9a6714bc0557c.pdf?version=v1&expires=1568239682&signature=jCct5PvzU58Iz2pSo58nf6rgsMRcJfMbUWThmm6lztFl5Vn2Y204b9h7gvw0vJvkDK2ThfaYqaUbWc0KzTpvAg - to: - id: adr_bae820679f3f536b - name: HARRY ZHANG - address_line1: 210 KING ST STE 6100 - address_city: SAN FRANCISCO - address_state: CA - address_zip: 94107-1741 - address_country: UNITED STATES - metadata: {} - date_created: '2018-12-08T03:08:43.446Z' - date_modified: '2018-12-08T03:08:43.446Z' - object: address - from: - id: adr_210a8d4b0b76d77b - name: LEORE AVIDAR - address_line1: 210 KING ST STE 6100 - address_city: SAN FRANCISCO - address_state: CA - address_zip: 94107-1741 - address_country: UNITED STATES - metadata: {} - date_created: '2018-12-08T03:01:07.651Z' - date_modified: '2018-12-08T03:01:07.651Z' - object: address - bank_account: - id: bank_8cad8df5354d33f - description: Test Bank Account - metadata: {} - routing_number: '322271627' - account_number: '123456789' - account_type: individual - signatory: John Doe - bank_name: J.P. MORGAN CHASE BANK, N.A. - verified: true - date_created: '2015-11-06T19:24:24.440Z' - date_modified: '2015-11-06T19:41:28.312Z' - object: bank_account - carrier: USPS - tracking_events: [] - thumbnails: - - small: >- - https://lob-assets.com/checks/chk_92b9a6714bc0557c_thumb_small_1.png?version=v1&expires=1568239682&signature=ublquO_xAdvAkAwGJuOjgZQwcz7c3Ao4NHWHeDVTBEBjcrQr8LavxWEwUc1KU105Zex3SajRQLd6hqJOrDl0Bw - medium: >- - https://lob-assets.com/checks/chk_92b9a6714bc0557c_thumb_medium_1.png?version=v1&expires=1568239682&signature=vHyuOtsanX4HnY_0LNft6ZJ8C67JnbI8ZVCjA2d9nR0Rd6lCl0Nk1s6BAhefbBkzecX9Yp0B8NWN9Q5v1Z4ICw - large: >- - https://lob-assets.com/checks/chk_92b9a6714bc0557c_thumb_large_1.png?version=v1&expires=1568239682&signature=SzCLKJ5m_TKJPLlL9PMw-zW9wo5mVYEK1jCtHwWRwwEaNU2v4Aehy-YHtus3TFJIt8RD2M-0Y3MtCxHwhqSABg - - small: >- - https://lob-assets.com/checks/chk_92b9a6714bc0557c_thumb_small_2.png?version=v1&expires=1568239682&signature=iElagODaOCkF_lCUxIw-lK50GhEU1ar_odmslCazZqD4Fsd_rQLx3M4Q5HzYWp4evfzuCoFvk4oAQVuIAaguAw - medium: >- - https://lob-assets.com/checks/chk_92b9a6714bc0557c_thumb_medium_2.png?version=v1&expires=1568239682&signature=2vwvm_QsfmdtkAa-_F4uk-0yeUPRascyhfwOr-OX1ya9i_8gdFQAxMTrP-FfNBVSYFXeknFm6IUPJHggfgeiBg - large: >- - https://lob-assets.com/checks/chk_92b9a6714bc0557c_thumb_large_2.png?version=v1&expires=1568239682&signature=NQf7tP9F4rP66S16hQ8duFpZSbTjaGBGK61Sr3H5D4CWtRyaPdoQlIpT2Jw-eKRcuYRkDEtQse_oWtL5gPqXDQ - - small: >- - https://lob-assets.com/checks/chk_92b9a6714bc0557c_thumb_small_3.png?version=v1&expires=1568239682&signature=dbjFd44H9TyZsc3d0fqKon5e0GqZ6GA1dT26MH6WnoX8lrQor2CA6sZJ5qmu0Z4SAFlMKAzb-twqN7faLjEbDQ - medium: >- - https://lob-assets.com/checks/chk_92b9a6714bc0557c_thumb_medium_3.png?version=v1&expires=1568239682&signature=vSgwVs7T9E6KKBK7XU-6jRL9i0jvgTqvNxkdRARFf0UNlryJFm8l_t_x5mPH0sCTFZcLp7ouRaR5hhdHC6vZBQ - large: >- - https://lob-assets.com/checks/chk_92b9a6714bc0557c_thumb_large_3.png?version=v1&expires=1568239682&signature=If4tXlN13WYy7JDPpFkWw0HAQpYNJHqi2UstiPHxUA_8IAj6vXORb-22acI124Pd1bR1QSjBHAW1gbiJ0kjiAQ - merge_variables: null - expected_delivery_date: '2019-08-16' - mail_type: usps_first_class - date_created: '2019-08-08T19:34:27.802Z' - date_modified: '2019-08-08T19:34:30.582Z' - send_date: '2019-08-08T19:34:27.802Z' - use_type: operational - object: check - object: list - next_url: >- - https://api.lob.com/v1/checks?limit=2&after=eyJkYXRlT2Zmc2V0IjoiMjAxOS0wOC0wOFQxOTozNDoyNy44MDJaIiwiaWRPZmZzZXQiOiJjaGtfOTJiOWE2NzE0YmMwNTU3YyJ9 - previous_url: null - count: 2 - post_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' - content: - application/json: - schema: - $ref: '#/components/schemas/check' - example: - id: chk_534f10783683daa0 - description: Demo Check - metadata: {} - check_number: 10062 - memo: rent - amount: 22.5 - url: >- - https://lob-assets.com/checks/chk_534f10783683daa0.pdf?expires=1540372221&signature=Ty3IV2bGPEoQfrdraYHlNYTaarnHLXb - to: - id: adr_bae820679f3f536b - description: Harry - Office - name: HARRY ZHANG - company: LOB - email: harry@lob.com - phone: '5555555555' - address_line1: 210 KING ST STE 6100 - address_line2: '' - address_city: SAN FRANCISCO - address_state: CA - address_zip: 94107-1741 - address_country: UNITED STATES - metadata: {} - date_created: '2018-12-08T03:08:43.446Z' - date_modified: '2018-12-08T03:08:43.446Z' - object: address - recipient_moved: false - from: - id: adr_b8fb5acf3a2b55db - name: LEORE AVIDAR - address_line1: 210 KING ST STE 6100 - address_city: SAN FRANCISCO - address_state: CA - address_zip: 94107-1741 - address_country: UNITED STATES - metadata: {} - date_created: '2017-09-05T17:47:53.767Z' - date_modified: '2017-09-05T17:47:53.767Z' - object: address - bank_account: - id: bank_8cad8df5354d33f - description: Test Bank Account - metadata: {} - routing_number: '322271627' - account_number: '123456789' - signatory: John Doe - bank_name: J.P. MORGAN CHASE BANK, N.A. - verified: true - account_type: company - date_created: '2015-11-06T19:24:24.440Z' - date_modified: '2015-11-06T19:41:28.312Z' - object: bank_account - signature_url: >- - https://lob-assets.com/bank-accounts/asd_asdfghjkqwertyui.pdf?expires=1234567890&signature=aksdf - carrier: USPS - tracking_events: [] - thumbnails: - - small: >- - https://lob-assets.com/checks/chk_534f10783683daa0_thumb_small_1.png?expires=1540372221&signature=ShhPpH74wYkNiAj7Il9B6q8ZKkzlGd4 - medium: >- - https://lob-assets.com/checks/chk_534f10783683daa0_thumb_medium_1.png?expires=1540372221&signature=tmIOq6aAyKgzAECp7STj1rvJuMS5Svd - large: >- - https://lob-assets.com/checks/chk_534f10783683daa0_thumb_large_1.png?expires=1540372221&signature=04nLEwE9d2qgQJNgJYWSOgPnU0FZbEv - merge_variables: - name: Harry - expected_delivery_date: '2017-09-12' - mail_type: usps_first_class - date_created: '2017-09-05T17:47:53.896Z' - date_modified: '2017-09-05T17:47:53.896Z' - send_date: '2017-09-05T17:47:53.896Z' - object: check - message: pancakes are good - check_bottom_template_id: tmpl_a - attachment_template_id: tmpl_a - check_bottom_template_version_id: vrsn_a - attachment_template_version_id: vrsn_a - use_type: operational - deleted: true - check_canceled: - description: Deleted - content: - application/json: - schema: - $ref: '#/components/schemas/check_deletion' - example: - id: chk_123456789 - deleted: true - creatives_error: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' - example: - error: - code: not_found - message: creative not found - status_code: 404 - identity_validation_error: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' - example: - error: - code: invalid - message: recipient is required - status_code: 422 - 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' - content: - application/json: - schema: - $ref: '#/components/schemas/identity_validation' - example: - id: id_validation_8a013f3e - recipient: LARRY LOBSTER - primary_line: 210 KING ST. - secondary_line: '' - urbanization: '' - last_line: SAN FRANCISCO CA 94107-1728 - score: 100 - confidence: high - object: id_validation - intl_autocompletions_error: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' - example: - error: - code: invalid - message: address_prefix is required - status_code: 422 - intl_autocompletions: - description: Returns an international autocompletions object. - headers: - ratelimit-limit: - $ref: '#/components/headers/ratelimit-limit' - ratelimit-remaining: - $ref: '#/components/headers/ratelimit-remaining' - ratelimit-reset: - $ref: '#/components/headers/ratelimit-reset' - content: - application/json: - schema: - $ref: '#/components/schemas/intl_autocompletions' - examples: - basic: - value: - id: intl_auto_a3ac97bcfbb2460ab20c - suggestions: - - primary_number_range: '' - primary_line: 340 WATERSTONE PL SE - city: AIRDRIE - state: AB - country: CA - zip_code: T4B 2G7 - - primary_number_range: '' - primary_line: 340 WATT BLVD SW - city: EDMONTON - state: AB - country: CA - zip_code: T6X 1R7 - - primary_number_range: '' - primary_line: 340 WATROUS ST - city: PRINCE GEORGE - state: BC - country: CA - zip_code: V2M 2B6 - - primary_number_range: '' - primary_line: 340 WATERS RD - city: QUALICUM BEACH - state: BC - country: CA - zip_code: V9K 2B8 - - primary_number_range: '' - primary_line: SUITE 340, 1510 WATT DR SW - city: EDMONTON - state: AB - country: CA - zip_code: T6X 2E6 - - primary_number_range: '' - primary_line: WATERFRONT POINTE WEST SUITE 340, 5212 25 AVE NW - city: EDMONTON - state: AB - country: CA - zip_code: T6L 6R7 - - primary_number_range: '' - primary_line: WATERFRONT POINTE EAST SUITE 340, 2520 52 ST NW - city: EDMONTON - state: AB - country: CA - zip_code: T6L 6S2 - - primary_number_range: '' - primary_line: WATERSTONE SUITE 340, 6079 MAYNARD WAY NW - city: EDMONTON - state: AB - country: CA - zip_code: T6R 0S4 - - primary_number_range: '' - primary_line: WATSON APTS. SUITE 340, 5207 39 ST - city: RED DEER - state: AB - country: CA - zip_code: T4N 0Z9 - - primary_number_range: '' - primary_line: WATERS EDGE SUITE 3400..3409, 2600 FERGUSON RD - city: SAANICHTON - state: BC - country: CA - zip_code: V8M 2C1 - object: intl_autocompletion - test: - value: - id: intl_auto_a3ac97bcfbb2460ab20c - suggestions: - - primary_number_range: '' - primary_line: 1 TWIN OAKS CT - city: GREENVILLE - state: SC - country: CA - zip_code: '29615' - - primary_number_range: '' - primary_line: 1 TEVA DR - city: STAR CITY - state: CA - country: CA - zip_code: '91355' - - primary_number_range: '' - primary_line: 1 TELEGRAM AVE - city: ELMONT - state: NY - country: CA - zip_code: '11003' - - primary_number_range: '' - primary_line: 1 TELEGRAM AVE - city: GARDEN CITY - state: KS - country: CA - zip_code: '67846' - - primary_number_range: '' - primary_line: 1 TELEGRAPH HILL RD - city: HOLMDEL - state: NJ - country: CA - zip_code: '07733' - - primary_number_range: '' - primary_line: 1 TELEGRAPH HILL RD S - city: HOLMDEL - state: NJ - country: CA - zip_code: '07733' - - primary_number_range: '' - primary_line: 1 TELEGRAPH HILL BLVD - city: SAN FRANCISCO - state: CA - country: CA - zip_code: '94133' - object: intl_autocompletion - intl_verifications: - 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' - content: - application/json: - schema: - $ref: '#/components/schemas/intl_verification' - examples: - full: - value: - id: intl_ver_c7cb63d68f8d6 - recipient: null - primary_line: 370 WATER ST - secondary_line: '' - last_line: SUMMERSIDE PE C1N 1C4 - country: CA - coverage: SUBBUILDING - deliverability: deliverable - status: LV4 - components: - primary_number: '370' - street_name: WATER ST - city: SUMMERSIDE - state: PE - postal_code: C1N 1C4 - object: intl_verification - test: - value: - id: intl_ver_c7cb63d68f8d6 - recipient: TEST KEYS DO NOT VERIFY ADDRESSES - primary_line: 370 WATER ST - secondary_line: '' - last_line: SUMMERSIDE PE C1N 1C4 - country: CA - coverage: SUBBUILDING - deliverability: deliverable - status: LV4 - components: - primary_number: '370' - street_name: WATER ST - city: SUMMERSIDE - state: PE - postal_code: C1N 1C4 - object: intl_verification - letter_deleted: - description: Deleted - content: - application/json: - schema: - $ref: '#/components/schemas/letter_deletion' - example: - id: ltr_123456789 - deleted: true - all_letters: - 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. - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/list' - - type: object - properties: - data: - type: array - description: list of letters - items: - $ref: '#/components/schemas/letter' - example: - data: - - id: ltr_5ba44b462c79f07c - description: Demo Letter - metadata: {} - to: - id: adr_asdi2y3riuasasoi - description: Harry - Office - name: Harry Zhang - company: Lob - phone: '5555555555' - email: harry@lob.com - metadata: {} - address_line1: 370 WATER ST - address_line2: '' - address_city: SUMMERSIDE - address_state: PRINCE EDWARD ISLAND - address_zip: C1N 1C4 - address_country: CANADA - recipient_moved: false - date_created: '2019-09-20T00:14:00.361Z' - date_modified: '2019-09-20T00:14:00.361Z' - object: address - from: - id: adr_210a8d4b0b76d77b - 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: '2018-12-08T03:01:07.651Z' - date_modified: '2018-12-08T03:01:07.651Z' - object: address - color: true - double_sided: false - address_placement: top_first_page - return_envelope: false - perforated_page: null - extra_service: certified - custom_envelope: null - template_id: tmpl_a - template_version_id: vrsn_a - mail_type: usps_first_class - url: >- - https://lob-assets.com/letters/ltr_5ba44b462c79f07c.pdf?version=v1&expires=1568239830&signature=Ob-DUPLJLM4scWQeCDNadPJ4j33MZw16pykOxwv2us-bA7utTYi6oZ8WrEtBYDBBo09XkapR3gdJf0NEr90xAA - merge_variables: null - carrier: USPS - tracking_number: '92071902358909000011275538' - tracking_events: - - id: evnt_9e84094c9368cfb - type: certified - name: Delivered - details: - event: delivered - description: Package has been delivered. - notes: Delivered, Front Desk/Reception/Mail Room - action_required: false - location: '33408' - time: '2019-10-08T19:41:00Z' - date_created: '2019-10-08T19:41:00Z' - date_modified: '2019-10-08T19:41:00Z' - object: tracking_event - thumbnails: - - small: >- - https://lob-assets.com/letters/ltr_5ba44b462c79f07c_thumb_small_1.png?version=v1&expires=1568239830&signature=xZUmE8rq8wSECHPEb9c37cUDZBzGUO3XK5LsIPZhI6dOXgm6zJEn8_7tKuZ3JWBmvNJNXdTl_ufkNu4avjQUDw - medium: >- - https://lob-assets.com/letters/ltr_5ba44b462c79f07c_thumb_medium_1.png?version=v1&expires=1568239830&signature=H7354Qpcm9S4aXbrMsBe6QJ6lSNi9IWPgMJtLWLi4Kyx9tHF8Mp9YEc_IL9x89Jfw4-yRzKDXA410X4W0PssBQ - large: >- - https://lob-assets.com/letters/ltr_5ba44b462c79f07c_thumb_large_1.png?version=v1&expires=1568239830&signature=54LUIDKZyItA9pnC87d1pJVAuw8bhKLCsMpNWkB3LgdVWxPxxb_c1IyIWAbSR-dyOYEOlDBCc40J4Kns-O_mAg - expected_delivery_date: '2019-08-16' - date_created: '2019-08-08T17:09:14.514Z' - date_modified: '2019-08-08T17:09:16.850Z' - send_date: '2019-08-08' - use_type: marketing - fsc: false - object: letter - - id: ltr_da8267c6a6545cd6 - description: Demo Letter - metadata: {} - to: - id: adr_210a8d4b0b76d77b - 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: '2018-12-08T03:01:07.651Z' - date_modified: '2018-12-08T03:01:07.651Z' - object: address - from: - id: adr_210a8d4b0b76d77b - 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: '2018-12-08T03:01:07.651Z' - date_modified: '2018-12-08T03:01:07.651Z' - object: address - color: true - double_sided: false - address_placement: top_first_page - return_envelope: false - perforated_page: null - extra_service: null - custom_envelope: null - mail_type: usps_first_class - url: >- - https://lob-assets.com/letters/ltr_da8267c6a6545cd6.pdf?version=v1&expires=1568239830&signature=HH-5RnbD4x0eJcnEC9HhqKSvQGsbkjovzvqSKgBijUHKIXwEKQJ4CbYhKs_U2q2A1k20Xefcaw7bfdPKozuqCQ - merge_variables: null - carrier: USPS - tracking_number: null - tracking_events: [] - thumbnails: - - small: >- - https://lob-assets.com/letters/ltr_da8267c6a6545cd6_thumb_small_1.png?version=v1&expires=1568239830&signature=C1Rs83187HpWGhsg_pJIOhDIKlDtC_IgBBxHiocCEzJ8CncJwqrq5yHke-p97Dv7o81G_pfhFmirai589O6DCw - medium: >- - https://lob-assets.com/letters/ltr_da8267c6a6545cd6_thumb_medium_1.png?version=v1&expires=1568239830&signature=gz63l0yi3sK_sXjYfIVdLSvkknJFr_O5TWRulo_iKIgS-PosIl6J0tDR6bx_Tv5Ab_w7DABg3qdKZ846MZ7TCw - large: >- - https://lob-assets.com/letters/ltr_da8267c6a6545cd6_thumb_large_1.png?version=v1&expires=1568239830&signature=4Y1OIymaWkSO3aBIHCeshFAVnF-pDcF2FFqkx_jovaUFuk4FT1SI24L7_POwTRXQHlETMGlzkP_CGgqselRUAA - expected_delivery_date: '2019-08-16' - date_created: '2019-08-08T17:08:12.224Z' - date_modified: '2019-08-08T17:08:13.990Z' - send_date: '2019-08-08T17:08:12.224Z' - cards: null - use_type: marketing - fsc: true - object: letter - object: list - next_url: >- - https://api.lob.com/v1/letters?limit=2&after=eyJkYXRlT2Zmc2V0IjoiMjAxOS0wOC0wOFQxNzowODoxMi4yMjRaIiwiaWRPZmZzZXQiOiJsdHJfZGE4MjY3YzZhNjU0NWNkNiJ9 - previous_url: null - count: 2 - post_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' - 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 - postcard_deleted: - description: Deleted - content: - application/json: - schema: - $ref: '#/components/schemas/postcard_deletion' - example: - id: psc_123456789 - deleted: true - all_postcards: - 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.
If no more postcards are available beyond - the current set of returned results, the `next_url` field will be empty. - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/list' - - type: object - properties: - data: - type: array - description: list of postcards - items: - $ref: '#/components/schemas/postcard' - example: - data: - - id: psc_208e45e48d271294 - description: null - metadata: {} - to: - id: adr_210a8d4b0b76d77b - 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: '2018-12-08T03:01:07.651Z' - date_modified: '2018-12-08T03:01:07.651Z' - object: address - url: >- - https://lob-assets.com/postcards/psc_208e45e48d271294.pdf?version=v1&expires=1619218302&signature=NfHHLBSr5tOHA_Z4kij4dKqZG8f3vMDtwvuFVeeF9pV_lylcjLsVVODhNCE5hR6-2slUr6t9WMNsi429Pj7_DA - carrier: USPS - front_template_id: null - back_template_id: null - front_template_version_id: null - back_template_version_id: null - date_created: '2021-03-24T22:51:42.838Z' - date_modified: '2021-03-24T22:51:42.838Z' - send_date: '2021-03-24T22:51:42.838Z' - use_type: marketing - fsc: false - object: postcard - - id: psc_0e03d1ad7d31f151 - description: null - metadata: {} - to: - id: adr_c7cb63d68f8d6 - description: null - name: JANE DOE - company: LOB - phone: '5555555555' - email: jane.doe@lob.com - address_line1: 370 WATER ST - address_line2: '' - address_city: SUMMERSIDE - address_state: PE - address_zip: C1N 1C4 - address_country: CANADA - metadata: {} - date_created: '2018-12-08T03:01:07.651Z' - date_modified: '2018-12-08T03:01:07.651Z' - object: address - recipient_moved: false - from: - id: adr_210a8d4b0b76d77b - 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: '2018-12-08T03:01:07.651Z' - date_modified: '2018-12-08T03:01:07.651Z' - object: address - url: >- - https://lob-assets.com/postcards/psc_208e45e48d271294.pdf?version=v1&expires=1619218302&signature=NfHHLBSr5tOHA_Z4kij4dKqZG8f3vMDtwvuFVeeF9pV_lylcjLsVVODhNCE5hR6-2slUr6t9WMNsi429Pj7_DA - carrier: USPS - front_template_id: null - back_template_id: null - front_template_version_id: null - back_template_version_id: null - tracking_events: [] - size: 6x11 - mail_type: usps_first_class - merge_variables: {} - 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 - expected_delivery_date: '2021-03-30' - date_created: '2021-03-24T22:51:42.838Z' - date_modified: '2021-03-24T22:51:42.838Z' - send_date: '2021-03-24T22:51:42.838Z' - use_type: marketing - fsc: false - object: postcard - object: list - previous_url: null - next_url: null - count: 2 - post_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' - content: - application/json: - schema: - $ref: '#/components/schemas/postcard' - examples: - basic: - value: - id: psc_208e45e48d271294 - description: null - metadata: {} - to: - id: adr_210a8d4b0b76d77b - description: null - name: null - company: LOB - 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: '2018-12-08T03:01:07.651Z' - date_modified: '2018-12-08T03:01:07.651Z' - object: address - url: >- - https://lob-assets.com/postcards/psc_208e45e48d271294.pdf?version=v1&expires=1619218302&signature=NfHHLBSr5tOHA_Z4kij4dKqZG8f3vMDtwvuFVeeF9pV_lylcjLsVVODhNCE5hR6-2slUr6t9WMNsi429Pj7_DA - carrier: USPS - front_template_id: null - back_template_id: null - date_created: '2021-03-24T22:51:42.838Z' - date_modified: '2021-03-24T22:51:42.838Z' - send_date: '2021-03-24T22:51:42.838Z' - use_type: marketing - fsc: false - object: postcard - full: - value: - id: psc_0e03d1ad7d31f151 - description: null - metadata: {} - to: - id: adr_c7cb63d68f8d6 - description: null - name: JANE DOE - company: LOB - phone: '5555555555' - email: jane.doe@lob.com - address_line1: 370 WATER ST - address_line2: '' - address_city: SUMMERSIDE - address_state: PE - address_zip: C1N 1C4 - address_country: CANADA - metadata: {} - date_created: '2018-12-08T03:01:07.651Z' - date_modified: '2018-12-08T03:01:07.651Z' - object: address - recipient_moved: false - from: - id: adr_210a8d4b0b76d77b - 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: '2018-12-08T03:01:07.651Z' - date_modified: '2018-12-08T03:01:07.651Z' - object: address - url: >- - https://lob-assets.com/postcards/psc_208e45e48d271294.pdf?version=v1&expires=1619218302&signature=NfHHLBSr5tOHA_Z4kij4dKqZG8f3vMDtwvuFVeeF9pV_lylcjLsVVODhNCE5hR6-2slUr6t9WMNsi429Pj7_DA - carrier: USPS - front_template_id: tmpl_93c369f06171958 - back_template_id: tmpl_93c369f06171958 - front_template_version_id: vrsn_a83e044941c393b - back_template_version_id: vrsn_a83e044941c393b - tracking_events: [] - size: 6x11 - mail_type: usps_first_class - merge_variables: {} - 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 - expected_delivery_date: '2021-03-30' - date_created: '2021-03-24T22:51:42.838Z' - date_modified: '2021-03-24T22:51:42.838Z' - send_date: '2021-03-24T22:51:42.838Z' - use_type: marketing - fsc: false - object: postcard - self_mailer_deleted: - description: Deleted - content: - application/json: - schema: - $ref: '#/components/schemas/self_mailer_deletion' - example: - id: sfm_123456789 - deleted: true - all_self_mailers: - 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.
If no more self_mailers are available - beyond the current set of returned results, the `next_url` field will be - empty. - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/list' - - type: object - properties: - data: - type: array - description: list of self_mailers - items: - $ref: '#/components/schemas/self_mailer' - example: - data: - - id: sfm_7239rhwqkrfaskas - description: April Campaign - metadata: {} - to: - id: adr_asdi2y3riuasasoi - description: Harry - Office - name: Harry Zhang - company: Lob - phone: '5555555555' - email: harry@lob.com - metadata: {} - address_line1: 370 WATER ST - address_line2: '' - address_city: SUMMERSIDE - address_state: PRINCE EDWARD ISLAND - address_zip: C1N 1C4 - address_country: CANADA - recipient_moved: false - date_created: '2019-09-20T00:14:00.361Z' - date_modified: '2019-09-20T00:14:00.361Z' - object: address - from: - id: adr_210a8d4b0b76d77b - description: null - name: null - company: LOB - 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: '2018-12-08T03:01:07.651Z' - date_modified: '2018-12-08T03:01:07.651Z' - object: address - url: >- - https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf.pdf?version=v1&expires=1618781264&signature=YP_bCwrgVA2lz1Gr1YVCJN1f-WspUGsH0aJp2ihjfLXU7lDUV12_xRv4uPch0mfWeOOxEqpyP8hGpgvjmQKNAw - outside_template_id: tmpl_a3cb937f26d7eec - inside_template_id: tmpl_a3cb937f26d7eec - inside_template_version_id: vrsn_bfdf70893b00a85 - outside_template_version_id: vrsn_bfdf70893b00a85 - carrier: USPS - tracking_events: [] - thumbnails: - - small: >- - https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_1.png?version=v1&expires=1618781264&signature=A7q5HbRO53sUYYnwGlmP5mTS6ylLE7kS2mYhfcEOdexjyqG7UseK0MD26DppE4Q0aE4u2msDVMxd5ukjMerYCg - 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 - large: >- - https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_1.png?version=v1&expires=1618781264&signature=g2jifhCselPqIj8au6lsbJMNFN8ZX3aM6GkLoAXiHBCS8X5mF9nhVbmO0odpnmwNlV1CWIp-MXVsZkC3NmxqBQ - - small: >- - https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_2.png?version=v1&expires=1618781264&signature=biJY4-ZbNNRydPYg3cZkq7wxjILbPBK_nIVyoyQsg5X5q4jlsa-2fzeMa48V9jprUetsC6WEuYvasHosRfG_DQ - medium: >- - https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_2.png?version=v1&expires=1618781264&signature=xEAX7bURyc8fSphacuo5yb7iVIpT8Xvq05KgMaNQS4r3aCpx0z1p42wbPmW758B5Ae0li1YDYvVyzS7qJIoWAw - large: >- - https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_2.png?version=v1&expires=1618781264&signature=NieHDnoQ7STZUvofHrFt7S987CzIkUJWpaSgpVQPZw-C3_wwTPsIrvxYdXEuFrr6ciTUcxRBFPlE0lurmMkyCA - merge_variables: - name: null - size: 6x18_bifold - mail_type: usps_first_class - expected_delivery_date: '2021-03-24' - date_created: '2021-03-16T18:40:40.504Z' - date_modified: '2021-03-16T18:41:06.691Z' - send_date: '2021-03-16T18:45:40.493Z' - deleted: true - use_type: marketing - fsc: false - object: self_mailer - - id: sfm_8ffbe811dea49dcf - description: April Campaign - metadata: {} - to: - id: adr_f9228b743884ff98 - description: null - name: AYA - company: null - phone: null - email: null - address_line1: 2812 PARK RD - address_line2: null - address_city: CHARLOTTE - address_state: NC - address_zip: 28209-1314 - address_country: UNITED STATES - metadata: {} - date_created: '2021-03-16T18:40:40.410Z' - date_modified: '2021-03-16T18:40:40.410Z' - deleted: true - object: address - from: - id: adr_210a8d4b0b76d77b - description: null - name: null - company: LOB - 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: '2018-12-08T03:01:07.651Z' - date_modified: '2018-12-08T03:01:07.651Z' - object: address - url: >- - https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf.pdf?version=v1&expires=1618781264&signature=YP_bCwrgVA2lz1Gr1YVCJN1f-WspUGsH0aJp2ihjfLXU7lDUV12_xRv4uPch0mfWeOOxEqpyP8hGpgvjmQKNAw - outside_template_id: tmpl_a3cb937f26d7eec - inside_template_id: tmpl_a3cb937f26d7eec - inside_template_version_id: vrsn_bfdf70893b00a85 - outside_template_version_id: vrsn_bfdf70893b00a85 - carrier: USPS - tracking_events: [] - thumbnails: - - small: >- - https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_1.png?version=v1&expires=1618781264&signature=A7q5HbRO53sUYYnwGlmP5mTS6ylLE7kS2mYhfcEOdexjyqG7UseK0MD26DppE4Q0aE4u2msDVMxd5ukjMerYCg - 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 - large: >- - https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_1.png?version=v1&expires=1618781264&signature=g2jifhCselPqIj8au6lsbJMNFN8ZX3aM6GkLoAXiHBCS8X5mF9nhVbmO0odpnmwNlV1CWIp-MXVsZkC3NmxqBQ - - small: >- - https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_2.png?version=v1&expires=1618781264&signature=biJY4-ZbNNRydPYg3cZkq7wxjILbPBK_nIVyoyQsg5X5q4jlsa-2fzeMa48V9jprUetsC6WEuYvasHosRfG_DQ - medium: >- - https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_2.png?version=v1&expires=1618781264&signature=xEAX7bURyc8fSphacuo5yb7iVIpT8Xvq05KgMaNQS4r3aCpx0z1p42wbPmW758B5Ae0li1YDYvVyzS7qJIoWAw - large: >- - https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_2.png?version=v1&expires=1618781264&signature=NieHDnoQ7STZUvofHrFt7S987CzIkUJWpaSgpVQPZw-C3_wwTPsIrvxYdXEuFrr6ciTUcxRBFPlE0lurmMkyCA - merge_variables: - name: null - size: 6x18_bifold - mail_type: usps_first_class - expected_delivery_date: '2021-03-24' - date_created: '2021-03-16T18:40:40.504Z' - date_modified: '2021-03-16T18:41:06.691Z' - send_date: '2021-03-16T18:45:40.493Z' - deleted: true - use_type: marketing - fsc: true - object: self_mailer - object: list - next_url: null - previous_url: null - count: 2 - post_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' - content: - application/json: - schema: - $ref: '#/components/schemas/self_mailer' - example: - id: sfm_8ffbe811dea49dcf - description: April Campaign - metadata: {} - to: - id: adr_bae820679f3f536b - 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-05T17:47:53.767Z' - date_modified: '2017-09-05T17:47:53.767Z' - deleted: true - object: address - from: - id: adr_210a8d4b0b76d77b - 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-05T17:47:53.767Z' - date_modified: '2017-09-05T17:47:53.767Z' - deleted: true - object: address - url: >- - https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA - outside_template_id: tmpl_a3cb937f26d7eec - inside_template_id: tmpl_a3cb937f26d7eec - inside_template_version_id: vrsn_bfdf70893b00a85 - outside_template_version_id: vrsn_bfdf70893b00a85 - carrier: USPS - tracking_events: [] - thumbnails: - - small: >- - https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA - medium: >- - https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_1.png?version=v1&expires=1618512040&signature=ryxN7bsXGtw_GRFSP3Cs3A3IYjxZi3cW9BHDCNgMt6p3nobVmsc_iFHt2e-S7ndAXhhN7nP-MQVov3bt3r37BQ - large: >- - https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg - - small: >- - https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_2.png?version=v1&expires=1618512040&signature=3gTgU7Fd3KoT_vNlQnTGptRps5ZgnkhSnPrAwk7L98higIzSwfKoLvuu_DIpMM48dHbxckKT9waR8euJ4KSDBQ - medium: >- - https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_2.png?version=v1&expires=1618512040&signature=Ue1lw5CMj7KRx6cMQL8xPeazaHCdJzWcACd1w3acuYPnWkVIpSt62OIO7hAtpAQK9xm1dhhlFj0rqRZMdRMMBA - large: >- - https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_2.png?version=v1&expires=1618512040&signature=cICc7HEm1xG_eyM4a_wtvPk2FqoLRmtgGa29kJisWnMIYBL0OkyzG4ZCYGMhp-5cZpJlSpXfTgGKh_Qmeo1TDw - merge_variables: - name: null - size: 6x18_bifold - mail_type: usps_first_class - expected_delivery_date: '2021-03-24' - date_created: '2021-03-16T18:40:40.504Z' - date_modified: '2021-03-16T18:40:40.504Z' - send_date: '2021-03-16T18:45:40.493Z' - use_type: marketing - fsc: false - object: self_mailer - post_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' - content: - application/json: - schema: - $ref: '#/components/schemas/snap_pack' - example: - id: ord_0d6a16a3fff6318ac8f8008dc1 - description: April Campaign - to: - id: adr_bae820679f3f536b - 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-05T17:47:53.767Z' - date_modified: '2017-09-05T17:47:53.767Z' - deleted: true - object: address - from: - id: adr_210a8d4b0b76d77b - 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-05T17:47:53.767Z' - date_modified: '2017-09-05T17:47:53.767Z' - deleted: true - object: address - url: >- - https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA - outside_template_id: tmpl_a3cb937f26d7eec - inside_template_id: tmpl_a3cb937f26d7eec - inside_template_version_id: vrsn_bfdf70893b00a85 - outside_template_version_id: vrsn_bfdf70893b00a85 - carrier: USPS - tracking_events: [] - thumbnails: - - small: >- - https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA - 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 - large: >- - https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg - - small: >- - https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_small_2.png?version=v1&expires=1618512040&signature=3gTgU7Fd3KoT_vNlQnTGptRps5ZgnkhSnPrAwk7L98higIzSwfKoLvuu_DIpMM48dHbxckKT9waR8euJ4KSDBQ - medium: >- - https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_medium_2.png?version=v1&expires=1618512040&signature=Ue1lw5CMj7KRx6cMQL8xPeazaHCdJzWcACd1w3acuYPnWkVIpSt62OIO7hAtpAQK9xm1dhhlFj0rqRZMdRMMBA - 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 - merge_variables: - name: null - size: 8.5x11 - mail_type: usps_first_class - expected_delivery_date: '2021-03-24' - date_created: '2021-03-16T18:40:40.504Z' - date_modified: '2021-03-16T18:40:40.504Z' - send_date: '2021-03-16T18:45:40.493Z' - use_type: marketing - fsc: false - color: false - object: snap_pack - template_error: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' - example: - error: - code: invalid - message: html is required - status_code: 422 - post_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' - content: - application/json: - schema: - $ref: '#/components/schemas/template_version' - example: - id: vrsn_534e339882d2282 - description: Second Version - html: Second HTML for {{name}} - date_created: '2017-11-09T04:49:38.016Z' - date_modified: '2017-11-09T04:49:38.016Z' - object: version - template_version_deleted: - description: Deleted - content: - application/json: - schema: - $ref: '#/components/schemas/template_version_deletion' - example: - value: - id: vrsn_123456789 - deleted: true - all_template_versions: - 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.
If no more - template versions are available beyond the current set of returned - results, the `next_url` field will be empty. - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/list' - - type: object - properties: - data: - type: array - description: list of template versions - items: - $ref: '#/components/schemas/template_version' - example: - data: - - id: vrsn_4d6ff5d868bf630 - description: Second Version - html: 'Second HTML for ' - date_created: '2017-11-09T05:09:03.665Z' - date_modified: '2018-05-22T22:01:10.479Z' - object: version - - id: vrsn_2a17159c1911919 - description: Test Template - html: 'HTML for ' - date_created: '2017-11-09T05:08:40.004Z' - date_modified: '2018-05-22T22:01:11.309Z' - object: version - object: list - count: 2 - template_deleted: - description: Deleted - content: - application/json: - schema: - $ref: '#/components/schemas/template_deletion' - example: - value: - id: tmpl_123456789 - deleted: true - all_templates: - 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.
If no more templates are available beyond - the current set of returned results, the `next_url` field will be empty. - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/list' - - type: object - properties: - data: - type: array - description: list of templates - items: - $ref: '#/components/schemas/template' - example: - data: - - id: tmpl_d5a5a89da9106f8 - description: Test Template - versions: - - id: vrsn_232a02fb8224791 - suggest_json_editor: true - description: Test Template - engine: legacy - html: 'HTML for ' - date_created: '2019-07-27T23:49:01.512Z' - date_modified: '2019-07-27T23:49:01.512Z' - object: version - published_version: - id: vrsn_232a02fb8224791 - suggest_json_editor: false - description: Test Template - engine: handlebars - html: 'HTML for ' - date_created: '2019-07-27T23:49:01.512Z' - date_modified: '2019-07-27T23:49:01.512Z' - object: version - metadata: {} - date_created: '2019-07-27T23:49:01.511Z' - date_modified: '2019-07-27T23:49:01.511Z' - object: template - - id: tmpl_59b2150ae120887 - description: Test Template - versions: - - id: vrsn_2a7eb63ccb795b9 - description: Test Template - html: 'HTML for ' - date_created: '2019-03-29T10:22:34.643Z' - date_modified: '2019-03-29T10:22:34.643Z' - object: version - published_version: - id: vrsn_2a7eb63ccb795b9 - description: Test Template - html: 'HTML for ' - date_created: '2019-03-29T10:22:34.643Z' - date_modified: '2019-03-29T10:22:34.643Z' - object: version - metadata: {} - date_created: '2019-03-29T10:22:34.642Z' - date_modified: '2019-03-29T10:22:34.642Z' - object: template - object: list - previous_url: null - next_url: >- - https://api.lob.com/v1/templates?limit=2&after=eyJkYXRlT2Zmc2V0IjoiMjAxOS0wMy0yOVQxMDoyMjozNC42NDJaIiwiaWRPZmZzZXQiOiJ0bXBsXzU5YjIxNTBhZTEyMDg4NyJ9 - count: 2 - all_uploads: - description: >- - An array of matching uploads. Each entry in the array is a separate - upload. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/upload' - example: - - id: upl_71be866e430b11e9 - accountId: fa9ea650fc7b31a89f92 - campaignId: cmp_1933ad629bae1408 - mode: test - failuresUrl: https://www.example.com - originalFilename: my_audience.csv - state: Draft - totalMailpieces: 100 - failedMailpieces: 5 - validatedMailpieces: 95 - bytesProcessed: 17268 - dateCreated: '2017-09-05T17:47:53.767Z' - dateModified: '2017-09-05T17:47:53.767Z' - requiredAddressColumnMapping: - name: recipient_name - address_line1: primary_line - address_city: city - address_state: state - address_zip: zip_code - optionalAddressColumnMapping: - address_line2: secondary_line - company: company - address_country: country - mergeVariableColumnMapping: - gift_code: code - metadata: - columns: - - recipient_name - - zip_code - upload_validation_error: - description: Validation Error - content: - application/json: - schema: - title: HTTPValidationError - type: object - properties: - detail: - title: Detail - type: array - items: - title: ValidationError - required: - - loc - - msg - - type - type: object - properties: - loc: - title: Location - type: array - items: - anyOf: - - type: string - - type: integer - msg: - title: Message - type: string - type: - title: Error Type - type: string - upload_not_found: - description: Not Found Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' - example: - error: - code: not_found - message: upload not found - status_code: 404 - upload_export_error: - description: Create Export Error - content: - application/json: - schema: - type: object - required: - - code - - message - - errors - properties: - code: - description: A conventional HTTP status code - type: number - enum: - - 400 - - 404 - message: - description: A human-readable message with more details about the error - type: string - errors: - description: An array of pre-defined strings that identify an error - type: array - items: - type: string - example: - code: 400 - message: Invalid body, check 'errors' property for more info. - errors: - - type must be a string - feature_flag_disabled: - description: Forbidden Error - content: - application/json: - schema: - type: object - properties: - code: - description: The error code - type: number - message: - type: string - description: >- - Details of the error message with the feature flagged - mentioned. - example: - message: 'This feature is not enabled for this account: access_upload_report' - code: 403 - us_autocompletions_error: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' - example: - error: - code: invalid - message: address_prefix is required - status_code: 422 - 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' - content: - application/json: - schema: - $ref: '#/components/schemas/us_autocompletions' - examples: - basic: - value: - id: us_auto_a3ac97bcfbb2460ab20c - suggestions: - - primary_line: 185 BAYSIDE VILLAGE PL - city: SAN FRANCISCO - state: CA - zip_code: '94107' - - primary_line: 185 BRANNAN ST - city: SAN FRANCISCO - state: CA - zip_code: '94107' - - primary_line: 185 BONIFACIO ST - city: SAN FRANCISCO - state: CA - zip_code: '94107' - - primary_line: 185 BLAIR TER - city: SAN FRANCISCO - state: CA - zip_code: '94107' - - primary_line: 185 BLUXOME ST - city: SAN FRANCISCO - state: CA - zip_code: '94107' - - primary_line: 210 KING ST - city: SAN FRANCISCO - state: CA - zip_code: '94107' - - primary_line: 185 BRYANT ST - city: SAN FRANCISCO - state: CA - zip_code: '94107' - object: us_autocompletion - test: - value: - id: us_auto_a3ac97bcfbb2460ab20c - suggestions: - - primary_line: 1 TELEPHONE RD - city: OXFORD - state: AR - zip_code: '72565' - - primary_line: 1 TELEGA PL - city: PALMDALE - state: CA - zip_code: '93550' - - primary_line: 1 TELEGRAM AVE - city: ELMONT - state: NY - zip_code: '11003' - - primary_line: 1 TELEGRAM AVE - city: GARDEN CITY - state: KS - zip_code: '67846' - - primary_line: 1 TELEGRAPH HILL RD - city: HOLMDEL - state: NJ - zip_code: '07733' - - primary_line: 1 TELEGRAPH HILL RD S - city: HOLMDEL - state: NJ - zip_code: '07733' - - primary_line: 1 TELEGRAPH HILL BLVD - city: SAN FRANCISCO - state: CA - zip_code: '94133' - object: us_autocompletion - reverse_geocode_lookups_error: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' - example: - error: - code: invalid - message: latitude is required - status_code: 422 - reverse_geocode_lookups: - 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' - content: - application/json: - schema: - $ref: '#/components/schemas/reverse_geocode' - example: - id: us_reverse_geocode_8a013f3e - addresses: - - components: - zip_code: '94107' - zip_code_plus_4: '1702' - location_analysis: - latitude: 37.78271 - longitude: -122.416202 - distance: 1.32 - - components: - zip_code: '94107' - zip_code_plus_4: '1702' - location_analysis: - latitude: 37.782917 - longitude: -122.416131 - distance: 1.33 - us_verifications: - 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' - content: - application/json: - schema: - $ref: '#/components/schemas/us_verification' - examples: - basic: - value: - id: us_ver_c7cb63d68f8d6 - recipient: LOB.COM - primary_line: 210 KING ST - secondary_line: '' - urbanization: '' - last_line: SAN FRANCISCO CA 94107-1702 - deliverability: deliverable - valid_address: true - components: - primary_number: '210' - street_predirection: '' - street_name: KING - street_suffix: ST - street_postdirection: '' - secondary_designator: '' - secondary_number: '' - pmb_designator: '' - pmb_number: '' - extra_secondary_designator: '' - extra_secondary_number: '' - city: SAN FRANCISCO - state: CA - zip_code: '94107' - zip_code_plus_4: '1702' - zip_code_type: standard - delivery_point_barcode: '941071702108' - address_type: commercial - record_type: street - default_building_address: false - county: SAN FRANCISCO - county_fips: '06075' - carrier_route: C032 - carrier_route_type: city_delivery - po_box_only_flag: 'N' - latitude: 37.77597542841264 - longitude: -122.3929557343685 - deliverability_analysis: - dpv_confirmation: 'Y' - dpv_cmra: 'N' - dpv_vacant: 'N' - dpv_active: 'Y' - dpv_inactive_reason: '' - dpv_throwback: 'N' - dpv_non_delivery_day_flag: 'N' - dpv_non_delivery_day_values: '' - dpv_no_secure_location: 'N' - dpv_door_not_accessible: 'N' - dpv_footnotes: - - AA - - BB - ews_match: false - lacs_indicator: '' - lacs_return_code: '' - suite_return_code: '' - lob_confidence_score: - score: 100 - level: high - object: us_verification - test: - value: - id: us_ver_po_box - recipient: TEST KEYS DO NOT VERIFY ADDRESSES - primary_line: PO BOX 720114 - secondary_line: '' - urbanization: '' - last_line: SAN FRANCISCO CA 94172-0114 - deliverability: deliverable - valid_address: true - components: - primary_number: '720114' - street_predirection: '' - street_name: PO BOX - street_suffix: '' - street_postdirection: '' - secondary_designator: '' - secondary_number: '' - pmb_designator: '' - pmb_number: '' - extra_secondary_designator: '' - extra_secondary_number: '' - city: SAN FRANCISCO - state: CA - zip_code: '94172' - zip_code_plus_4: '0114' - zip_code_type: po_box - delivery_point_barcode: '941720114146' - address_type: residential - record_type: po_box - default_building_address: false - county: SAN FRANCISCO - county_fips: '06075' - carrier_route: BOO2 - carrier_route_type: po_box - po_box_only_flag: '' - latitude: 37.75971500260575 - longitude: -122.69397561170017 - deliverability_analysis: - dpv_confirmation: 'Y' - dpv_cmra: 'N' - dpv_vacant: 'N' - dpv_active: 'Y' - 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: - - AA - - BB - ews_match: false - lacs_indicator: '' - lacs_return_code: '' - suite_return_code: '' - object: us_verification - zip_lookups_error: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' - example: - error: - code: invalid - message: zip_code is required - status_code: 422 - zip_lookups: - 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' - content: - application/json: - schema: - $ref: '#/components/schemas/zip' - example: - id: us_zip_c7cb63d68f8d6 - cities: - - city: SAN FRANCISCO - state: CA - county: SAN FRANCISCO - county_fips: '06075' - preferred: true - zip_code_type: standard - object: us_zip_lookup - zip_code: '94107' - events: - description: Returns an `event` object to the specified server. - content: - application/json: - schema: - $ref: '#/components/schemas/events' - example: - event_type: - resource: postcards - enabled_for_test: true - id: postcard.created - object: event_type - reference_id: psc_d2d10a2e9cba991c - id: evt_d95ff8ffd2b5cfb4 - date_created: '2016-12-04T22:50:08.180Z' - body: - id: psc_d2d10a2e9cba991c - description: Test Postcard - metadata: {} - to: - id: adr_8e783523dd7f0e70 - description: Test Recipient Address - name: Harry Zhang - company: LOB - phone: null - email: null - address_line1: 123 TEST ST - address_line2: UNIT 1 - address_city: SAN FRANCISCO - address_state: CA - address_zip: '94107' - address_country: UNITED STATES - metadata: {} - date_created: '2016-12-04T10:51:51.844Z' - date_modified: '2016-12-04T10:51:51.844Z' - object: address - from: - id: adr_d2e26faf793ed422 - description: Test Sender Address - name: Harry Zhang - company: LOB - phone: null - email: null - address_line1: 123 TEST ST - address_line2: UNIT 1 - address_city: SAN FRANCISCO - address_state: CA - address_zip: '94107' - address_country: UNITED STATES - metadata: {} - date_created: '2016-12-04T10:51:51.845Z' - date_modified: '2016-12-04T10:51:51.845Z' - object: address - url: >- - https://lob-assets.com/postcards/psc_d2d10a2e9cba991c.pdf?expires=1540372221&signature=dNE8OtbDymujUxBIMYle4H1cv1aZNFk - front_template_id: null - back_template_id: null - carrier: USPS - tracking_events: [] - thumbnails: - - small: >- - https://lob-assets.com/postcards/psc_d2d10a2e9cba991c_thumb_small_1.png?expires=1540372221&signature=McmqScxPgbe7yQY5X31U3vhU8VUlfA1 - medium: >- - https://lob-assets.com/postcards/psc_d2d10a2e9cba991c_thumb_medium_1.png?expires=1540372221&signature=VBClptOuCcj9Ybay6gE5aetT5j3C7KS - large: >- - https://lob-assets.com/postcards/psc_d2d10a2e9cba991c_thumb_large_1.png?expires=1540372221&signature=RAHpIwoYKYM17f0bbaoOiamCkjpzYfH - - small: >- - https://lob-assets.com/postcards/psc_d2d10a2e9cba991c_thumb_small_1.png?expires=1540372221&signature=5biHoaCmkphQaGJymOZxmTF0hHdiH4N - medium: >- - https://lob-assets.com/postcards/psc_d2d10a2e9cba991c_thumb_medium_1.png?expires=1540372221&signature=1ApGx0kn5EO4qQKGJzCe6zEPnQpzpRY - large: >- - https://lob-assets.com/postcards/psc_d2d10a2e9cba991c_thumb_large_1.png?expires=1540372221&signature=z80p90RBak6T26IAfg5yg7a6qKF53a8 - merge_variables: null - mail_type: usps_first_class - size: 4x6 - expected_delivery_date: '2016-12-09' - date_created: '2016-12-04T10:51:51.843Z' - date_modified: '2016-12-04T10:51:51.843Z' - send_date: '2016-12-04T10:56:51.843Z' - object: postcard - object: event - tracking_events: - description: Returns a `tracking_event` object to the specified server. - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/tracking_event_normal' - - $ref: '#/components/schemas/tracking_event_certified' - examples: - normal: - value: - id: evnt_9e84094c9368cfb - type: normal - name: In Local Area - details: null - location: '72231' - time: '2016-06-30T15:51:41.000Z' - date_created: '2016-06-30T17:41:59.771Z' - date_modified: '2016-06-30T17:41:59.771Z' - object: tracking_event - certified: - value: - id: evnt_9e84094c9368cfb - type: certified - name: Delivered - details: - event: delivered - description: Package has been delivered. - notes: Delivered, Front Desk/Reception/Mail Room - action_required: false - location: '33408' - time: '2019-10-08T19:41:00Z' - date_created: '2019-10-08T19:41:00Z' - date_modified: '2019-10-08T19:41:00Z' - object: tracking_event - headers: - ratelimit-limit: - description: The rate limit for a given endpoint. - schema: - type: integer - example: 150 - ratelimit-remaining: - description: The number of requests remaining in the current window. - schema: - type: integer - example: 100 - ratelimit-reset: - description: > - The time at which the rate limit window resets in UTC epoch - seconds - schema: - type: integer - example: 1528749846 -security: - - basicAuth: [] -x-webhooks: - events: - post: - summary: Events - description: Information about an event - operationId: event - tags: - - Events - responses: - '200': - $ref: '#/components/responses/events' - tracking_events: - post: - summary: Tracking Events - description: Information about tracking events - operationId: tracking_event - tags: - - Tracking Events - responses: - '200': - $ref: '#/components/responses/tracking_events' -paths: - /accounts: - get: - operationId: get_lob_credits_balance - summary: Get Lob Credits Balance - description: Returns the account's current balance of Lob Credits. - tags: - - Accounts - - Lob Credits - responses: - '200': - description: Returns a lob_credits_balance object. - content: - application/json: - schema: - $ref: '#/components/schemas/lob_credits_balance' - examples: - empty: - value: - balance: 0 - negative: - value: - balance: -1234.56 - positive: - value: - balance: 1000 - x-codeSamples: - - lang: Shell - source: | - curl https://api.lob.com/v1/accounts/credits_balance \ - -u : - label: CURL - /addresses: - get: - operationId: addresses_list - summary: List - description: >- - Returns a list of your addresses. The addresses are returned sorted by - creation date, with the most recently created addresses appearing first. - tags: - - Addresses - 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' - x-codeSamples: - - lang: Shell - source: | - curl -X GET "https://api.lob.com/v1/addresses?limit=2" \ - -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: - label: CURL - - lang: Typescript - source: | - try { - const addresses = await new AddressesApi(config).list(2); - } catch (err: any) { - console.error(err); - } - label: TYPESCRIPT - - lang: Javascript - source: | - Lob.addresses.list({limit: 2}, function (err, res) { - console.log(err, res); - }); - label: NODE - - lang: Ruby - source: | - addressesApi = AddressesApi.new(config) - - begin - addresses = addressesApi.list({ limit: 2 }) - rescue => err - p err.message - end - label: RUBY - - lang: Python - source: | - with ApiClient(configuration) as api_client: - api = AddressesApi(api_client) - - try: - addresses = api.list(limit=2) - except ApiException as e: - print(e) - label: PYTHON - - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\AddressesApi($config, new - GuzzleHttp\Client()); - - - try { - $result = $apiInstance->list( - 2, // limit - ); - } catch (Exception $e) { - echo $e->getMessage(), PHP_EOL; - } - - lang: Java - source: | - AddressesApi apiInstance = new AddressesApi(config); - - try { - AddressList response = apiInstance.list( - 2, // limit - null, // before - null, // after - null, // include - null, // dateCreated - null // metadata - ); - } catch (ApiException e) { - e.printStackTrace(); - } - label: JAVA - - lang: Elixir - source: | - Lob.Address.list(%{limit: 2}) - label: ELIXIR - - lang: CSharp - source: > - AddressesApi api = new AddressesApi(config); - - - List includeList = new List(); - - includeList.Add("total_count"); - - Dictionary metadata = new Dictionary(); - - metadata.Add("name", "Harry"); - - Dictionary dateCreated = new Dictionary(); - - DateTime dateCreatedDate = DateTime.Today.AddMonths(-1); - - dateCreated.Add("lt", dateCreatedDate); - - - try { - AddressList response = api.list( - 2, // limit - null, // before - null, // after - includeList, // include - dateCreated, // dateCreated - metadata // metadata - ); - } catch (ApiException e) { - Console.WriteLine(e.ToString()); - } - label: CSHARP - - lang: Go - source: > - var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - - - var apiClient = *lob.NewAPIClient(configuration) - - AddressList = apiClient.AddressesApi.List(context).Execute() - - if err != nil { - return err - } - label: GO - post: - operationId: address_create - summary: Create - description: Creates a new address given information - tags: - - Addresses - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/address_editable' - examples: - full_us: - value: - description: Harry - Office - name: Harry Zhang - company: Lob - email: harry@lob.com - phone: '5555555555' - address_line1: 210 King St - address_line2: '# 6100' - address_city: San Francisco - address_state: CA - address_zip: '94107' - address_country: US - ncoa_us_test: - value: - description: Harry - Office - name: Harry Zhang - company: Lob - email: harry@lob.com - phone: '5555555555' - address_line1: NCOA - address_line2: '#6100' - address_city: San Francisco - address_state: CA - address_zip: '94107' - address_country: US - full_intl: - value: - description: Harry - Office - name: Harry Zhang - company: Lob - email: harry@lob.com - phone: '5555555555' - address_line1: 370 WATER ST - address_line2: '' - address_city: SUMMERSIDE - address_state: PRINCE EDWARD ISLAND - address_zip: C1N 1C4 - address_country: CA - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/address_editable' - examples: - full_us: - value: - description: Harry - Office - name: Harry Zhang - company: Lob - email: harry@lob.com - phone: '5555555555' - address_line1: 210 King St - address_line2: '# 6100' - address_city: San Francisco - address_state: CA - address_zip: '94107' - address_country: US - ncoa_us_test: - value: - description: Harry - Office - name: Harry Zhang - company: Lob - email: harry@lob.com - phone: '5555555555' - address_line1: NCOA - address_line2: '# 6100' - address_city: San Francisco - address_state: CA - address_zip: '94107' - address_country: US - full_intl: - value: - description: Harry - Office - name: Harry Zhang - company: Lob - email: harry@lob.com - phone: '5555555555' - address_line1: 370 WATER ST - address_line2: '' - address_city: SUMMERSIDE - address_state: PRINCE EDWARD ISLAND - address_zip: C1N 1C4 - address_country: CA - encoding: - metadata: - style: deepObject - explode: true - multipart/form-data: - schema: - $ref: '#/components/schemas/address_editable' - examples: - full_us: - value: - description: Harry - Office - name: Harry Zhang - company: Lob - email: harry@lob.com - phone: '5555555555' - address_line1: 210 King St - address_line2: '# 6100' - address_city: San Francisco - address_state: CA - address_zip: '94107' - address_country: US - ncoa_us_test: - value: - description: Harry - Office - name: Harry Zhang - company: Lob - email: harry@lob.com - phone: '5555555555' - address_line1: NCOA - address_line2: '# 6100' - address_city: San Francisco - address_state: CA - address_zip: '94107' - address_country: US - full_intl: - value: - description: Harry - Office - name: Harry Zhang - company: Lob - email: harry@lob.com - phone: '5555555555' - address_line1: 370 WATER ST - address_line2: '' - address_city: SUMMERSIDE - address_state: PRINCE EDWARD ISLAND - address_zip: C1N 1C4 - address_country: CA - responses: - '200': - $ref: '#/components/responses/post_address' - default: - $ref: '#/components/responses/address_error' - x-codeSamples: - - lang: Shell - source: | - curl https://api.lob.com/v1/addresses \ - -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \ - -d "description=Harry - Office" \ - -d "name=Harry Zhang" \ - -d "company=Lob" \ - -d "email=harry@lob.com" \ - -d "phone=5555555555" \ - -d "address_line1=210 King St" \ - -d "address_line2=# 6100" \ - -d "address_city=San Francisco" \ - -d "address_state=CA" \ - -d "address_zip=94107" \ - -d "address_country=US" - label: CURL - - lang: Typescript - source: | - const addressCreate = new AddressEditable({ - description: 'Harry - Office', - name: 'Harry Zhang', - company: 'Lob', - email: 'harry@lob.com', - phone: '5555555555', - address_line1: '210 King St', - address_line2: '# 6100', - address_city: 'San Francisco', - address_state: 'CA', - address_zip: '94107', - address_country: 'US' - }); - - try { - const myAddress = await new AddressesApi(config).create(addressCreate); - } catch (err: any) { - console.error(err); - } - label: TYPESCRIPT - - lang: Javascript - source: | - Lob.addresses.create({ - description: 'Harry - Office', - name: 'Harry Zhang', - company: 'Lob', - email: 'harry@lob.com', - phone: '5555555555', - address_line1: '210 King St', - address_line2: '# 6100', - address_city: 'San Francisco', - address_state: 'CA', - address_zip: '94107', - address_country: 'US' - }, function (err, res) { - console.log(err, res); - }); - label: NODE - - lang: Ruby - source: | - addressCreate = AddressEditable.new({ - description: "Harry - Office", - name: "Harry Zhang", - company: "Lob", - email: "harry@lob.com", - phone: "5555555555", - address_line1: "210 King St", - address_line2: "# 6100", - address_city: "San Francisco", - address_state: "CA", - address_zip: "94107", - address_country: "US", - }); - - addressApi = AddressesApi.new(config) - - begin - createdAddress = addressApi.create(addressCreate) - rescue => err - p err.message - end - label: RUBY - - lang: Python - source: | - address_editable = AddressEditable( - description = "Harry - Office", - name = "Harry Zhang", - company = "Lob", - email = "harry@lob.com", - phone = "5555555555", - address_line1 = "210 King St", - address_line2 = "# 6100", - address_city = "San Francisco", - address_state = "CA", - address_zip = "94107", - address_country = CountryExtended("US"), - ) - - with ApiClient(configuration) as api_client: - api = AddressesApi(api_client) - - try: - created_address = api.create(address_editable) - except ApiException as e: - print(e) - label: PYTHON - - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\AddressesApi($config, new - GuzzleHttp\Client()); - - - $address_editable = new OpenAPI\Client\Model\AddressEditable( - array( - "description" => "Harry - Office", - "name" => "Harry Zhang", - "company" => "Lob", - "email" => "harry@lob.com", - "phone" => "5555555555", - "address_line1" => "210 King St", - "address_line2" => "# 6100", - "address_city" => "San Francisco", - "address_state" => "CA", - "address_zip" => "94107", - "address_country" => "US", - ) - ); - - - try { - $result = $apiInstance->create($address_editable); - } catch (Exception $e) { - echo $e->getMessage(), PHP_EOL; - } - - lang: Java - source: | - AddressesApi apiInstance = new AddressesApi(config); - - try { - AddressEditable addressEditable = new AddressEditable(); - addressEditable.setDescription("Harry - Office"); - addressEditable.setName("Harry Zhang"); - addressEditable.setCompany("Lob"); - addressEditable.setEmail("harry@lob.com"); - addressEditable.setPhone("5555555555"); - addressEditable.setAddressLine1("210 King St"); - addressEditable.setAddressLine2("# 6100"); - addressEditable.setAddressCity("San Francisco"); - addressEditable.setAddressState("CA"); - addressEditable.setAddressZip("94107"); - addressEditable.setAddressCountry(CountryExtended.US); - - Address result = apiInstance.create(addressEditable); - } catch (ApiException e) { - e.printStackTrace(); - } - label: JAVA - - lang: Elixir - source: | - Lob.Address.create(%{ - description: "Harry - Office", - name: "Harry Zhang", - company: "Lob", - email: "harry@lob.com", - phone: "5555555555", - address_line1: "210 King St", - address_line2: "# 6100", - address_city: "San Francisco", - address_state: "CA", - address_country: "US", - address_zip: "94107" - }) - label: ELIXIR - - lang: CSharp - source: | - AddressesApi api = new AddressesApi(config); - - AddressEditable addressEditable = new AddressEditable( - "210 King St", // addressLine1 - "# 6100", // addressLine2 - "San Francisco", // addressCity - "CA", // addressState - "94107", // addressZip - CountryExtended.US, // addressCountry - "Harry - Office", // description - "Harry Zhang", // name - "Lob", // company - "5555555555", // phone - "harry@lob.com" // email - ); - - try { - Address result = api.create(addressEditable); - } catch (ApiException e) { - Console.WriteLine(e.ToString()); - } - label: CSHARP - - lang: Go - source: > - var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - - - var apiClient = *lob.NewAPIClient(configuration) - - - - var addressCreate = *lob.NewAddressEditable() - - addressCreate.SetDescription("Harry - Office") - - addressCreate.SetName("Harry Zhang") - - addressCreate.SetCompany("Lob") - - addressCreate.SetEmail("harry@lob.com") - - addressCreate.SetPhone("5555555555") - - addressCreate.SetAddressLine1("210 King St") - - addressCreate.SetAddressLine2("# 6100") - - addressCreate.SetAddressCity("San Francisco") - - addressCreate.SetAddressState("CA") - - addressCreate.SetAddressZip("94107") - - addressCreate.SetAddressCountry("US") - - - - - createdaddress, _, err := - apiClient.AddressesApi.Create(context).AddressEditable(addressCreate).Execute() - - - if err != nil { - return err - } - label: GO - /addresses/{adr_id}: - parameters: - - in: path - name: adr_id - description: id of the address - required: true - schema: - $ref: '#/components/schemas/adr_id' - get: - operationId: address_retrieve - summary: Retrieve - description: >- - Retrieves the details of an existing address. You need only supply the - unique identifier that was returned upon address creation. - tags: - - Addresses - responses: - '200': - $ref: '#/components/responses/address' - default: - $ref: '#/components/responses/address_error' - x-codeSamples: - - lang: Shell - source: | - curl https://api.lob.com/v1/addresses/adr_fa85158b26c3eb7c \ - -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: - label: CURL - - lang: Typescript - source: | - try { - const address = await new AddressesApi(config).get('adr_xxxx'); - } catch (err: any) { - console.error(err); - } - label: TYPESCRIPT - - lang: Javascript - source: | - Lob.addresses.retrieve('adr_fa85158b26c3eb7c', function (err, res) { - console.log(err, res); - }); - label: NODE - - lang: Ruby - source: | - addressApi = AddressesApi.new(config) - - begin - retrievedAddress = addressApi.get("adr_fa85158b26c3eb7c") - rescue => err - p err.message - end - label: RUBY - - lang: Python - source: | - with ApiClient(configuration) as api_client: - api = AddressesApi(api_client) - - try: - address = api.get("adr_fa85158b26c3eb7c") - except ApiException as e: - print(e) - label: PYTHON - - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\AddressesApi($config, new - GuzzleHttp\Client()); - - - try { - $result = $apiInstance->get("adr_fa85158b26c3eb7c"); - } catch (Exception $e) { - echo $e->getMessage(), PHP_EOL; - } - - lang: Java - source: | - AddressesApi apiInstance = new AddressesApi(config); - - try { - Address response = apiInstance.get("adr_fa85158b26c3eb7c"); - } catch (ApiException e) { - e.printStackTrace(); - } - label: JAVA - - lang: Elixir - source: | - Lob.Address.retrieve("adr_fa85158b26c3eb7c") - label: ELIXIR - - lang: CSharp - source: | - AddressesApi api = new AddressesApi(config); - - try { - Address response = api.get("adr_fa85158b26c3eb7c"); - } catch (ApiException e) { - Console.WriteLine(e.ToString()); - } - label: CSHARP - - lang: Go - source: > - var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) + try { + Address response = apiInstance.get("adr_fa85158b26c3eb7c"); + } catch (ApiException e) { + e.printStackTrace(); + } + label: JAVA + - lang: Elixir + source: | + Lob.Address.retrieve("adr_fa85158b26c3eb7c") + label: ELIXIR + - lang: CSharp + source: | + AddressesApi api = new AddressesApi(config); + try { + Address response = api.get("adr_fa85158b26c3eb7c"); + } catch (ApiException e) { + Console.WriteLine(e.ToString()); + } + label: CSHARP + - lang: Go + source: | + var context = context.Background() + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - - fetchedAddress, _, err := - apiClient.AddressesApi.Get(context,"adr_fa85158b26c3eb7c").Execute() - + fetchedAddress, _, err := apiClient.AddressesApi.Get(context,"adr_fa85158b26c3eb7c").Execute() if err != nil { return err @@ -14344,9 +2986,7 @@ paths: delete: operationId: address_delete summary: Delete - description: >- - Deletes the details of an existing address. You need only supply the - unique identifier that was returned upon address creation. + description: Deletes the details of an existing address. You need only supply the unique identifier that was returned upon address creation. tags: - Addresses responses: @@ -14356,9 +2996,8 @@ paths: $ref: '#/components/responses/address_error' x-codeSamples: - lang: Shell - source: > - curl -X DELETE https://api.lob.com/v1/addresses/adr_43769b47aed248c2 - \ + source: | + curl -X DELETE https://api.lob.com/v1/addresses/adr_43769b47aed248c2 \ -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: label: CURL - lang: Typescript @@ -14396,10 +3035,8 @@ paths: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\AddressesApi($config, new - GuzzleHttp\Client()); - + source: | + $apiInstance = new OpenAPI\Client\Api\AddressesApi($config, new GuzzleHttp\Client()); try { $result = $apiInstance->delete("adr_43769b47aed248c2"); @@ -14431,19 +3068,13 @@ paths: } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - - deletedAddress, _, err := apiClient.AddressesApi.Delete(context, - "adr_43769b47aed248c2").Execute() - + deletedAddress, _, err := apiClient.AddressesApi.Delete(context, "adr_43769b47aed248c2").Execute() if err != nil { return err @@ -14494,9 +3125,8 @@ paths: $ref: '#/components/responses/bank_account_error' x-codeSamples: - lang: Shell - source: > - curl - https://api.lob.com/v1/bank_accounts/bank_dfceb4a2a05b57e/verify \ + source: | + curl https://api.lob.com/v1/bank_accounts/bank_dfceb4a2a05b57e/verify \ -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \ -d "amounts[]=25" \ -d "amounts[]=63" @@ -14556,19 +3186,15 @@ paths: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\BankAccountsApi($config, new - GuzzleHttp\Client()); - + source: | + $apiInstance = new OpenAPI\Client\Api\BankAccountsApi($config, new GuzzleHttp\Client()); $bankVerify = new OpenAPI\Client\Model\BankAccountVerify(); - $bankVerify->setAmounts([ 25, 63, ]); - try { $result = $apiInstance->verify( "bank_dfceb4a2a05b57e", $bankVerify @@ -14611,32 +3237,20 @@ paths: } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) + var bankAccountWritable = *lob.NewBankAccountWritable("322271627", "123456789", lob.BANKTYPEENUM_INDIVIDUAL, "Sinead Connor") - var bankAccountWritable = *lob.NewBankAccountWritable("322271627", - "123456789", lob.BANKTYPEENUM_INDIVIDUAL, "Sinead Connor") - - - createdBankAccount, _, _ := - apiClient.BankAccountsApi.Create(context).BankAccountWritable(bankAccountWritable).Execute() - + createdBankAccount, _, _ := apiClient.BankAccountsApi.Create(context).BankAccountWritable(bankAccountWritable).Execute() verifyAmounts := []int32{11, 35} - verify := *lob.NewBankAccountVerify(verifyAmounts) - - verifiedAccount, _, err := apiClient.BankAccountsApi.Verify(context, - createdBankAccount.Id).BankAccountVerify(verify).Execute() - + verifiedAccount, _, err := apiClient.BankAccountsApi.Verify(context, createdBankAccount.Id).BankAccountVerify(verify).Execute() if err != nil { return err @@ -14653,10 +3267,7 @@ paths: get: operationId: bank_account_retrieve summary: Retrieve - 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. + 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. tags: - Bank Accounts responses: @@ -14668,8 +3279,7 @@ paths: $ref: '#/components/schemas/bank_account' example: id: bank_8cad8df5354d33f - signature_url: >- - https://lob-assets.com/letters/asd_asdfghjklqwertyu.pdf?version=45&expires=1234567890&signature=a + signature_url: https://lob-assets.com/letters/asd_asdfghjklqwertyu.pdf?version=45&expires=1234567890&signature=a description: Test Bank Account metadata: {} routing_number: '322271627' @@ -14703,9 +3313,8 @@ paths: } label: TYPESCRIPT - lang: Javascript - source: > - Lob.bankAccounts.retrieve('bank_8cad8df5354d33f', function (err, - res) { + source: | + Lob.bankAccounts.retrieve('bank_8cad8df5354d33f', function (err, res) { console.log(err, res); }); label: NODE @@ -14730,10 +3339,8 @@ paths: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\BankAccountsApi($config, new - GuzzleHttp\Client()); - + source: | + $apiInstance = new OpenAPI\Client\Api\BankAccountsApi($config, new GuzzleHttp\Client()); try { $result = $apiInstance->get("bank_8cad8df5354d33f"); @@ -14765,19 +3372,13 @@ paths: } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - - fetchedBankAccount, _, err := - apiClient.BankAccountsApi.Get(context,"bank_8cad8df5354d33f").Execute() - + fetchedBankAccount, _, err := apiClient.BankAccountsApi.Get(context,"bank_8cad8df5354d33f").Execute() if err != nil { return err @@ -14796,9 +3397,8 @@ paths: $ref: '#/components/responses/bank_account_error' x-codeSamples: - lang: Shell - source: > - curl -X DELETE - https://api.lob.com/v1/bank_accounts/bank_3e64d9904356b20 \ + source: | + curl -X DELETE https://api.lob.com/v1/bank_accounts/bank_3e64d9904356b20 \ -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: label: CURL - lang: Typescript @@ -14810,9 +3410,8 @@ paths: } label: TYPESCRIPT - lang: Javascript - source: > - Lob.bankAccounts.delete('bank_3e64d9904356b20', function (err, res) - { + source: | + Lob.bankAccounts.delete('bank_3e64d9904356b20', function (err, res) { console.log(err, res); }); label: NODE @@ -14837,10 +3436,8 @@ paths: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\BankAccountsApi($config, new - GuzzleHttp\Client()); - + source: | + $apiInstance = new OpenAPI\Client\Api\BankAccountsApi($config, new GuzzleHttp\Client()); try { $result = $apiInstance->delete("bank_3e64d9904356b20"); @@ -14872,20 +3469,13 @@ paths: } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - - deletedBankAccount, _, err := - apiClient.BankAccountsApi.Delete(context, - "bank_3e64d9904356b20").Execute() - + deletedBankAccount, _, err := apiClient.BankAccountsApi.Delete(context, "bank_3e64d9904356b20").Execute() if err != nil { return err @@ -14895,10 +3485,7 @@ paths: get: operationId: bank_accounts_list summary: List - 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. + 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. tags: - Bank Accounts parameters: @@ -14953,10 +3540,8 @@ paths: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\BankAccountsApi($config, new - GuzzleHttp\Client()); - + source: | + $apiInstance = new OpenAPI\Client\Api\BankAccountsApi($config, new GuzzleHttp\Client()); try { $result = $apiInstance->list( @@ -14987,27 +3572,17 @@ paths: Lob.BankAccount.list(%{limit: 2}) label: ELIXIR - lang: CSharp - source: > + source: | BankAccountsApi api = new BankAccountsApi(config); - List includeList = new List(); - includeList.Add("total_count"); - - Dictionary metadata = new Dictionary(); - + Dictionary metadata = new Dictionary(); metadata.Add("name", "Harry"); - - Dictionary dateCreated = new Dictionary(); - + Dictionary dateCreated = new Dictionary(); DateTime dateCreatedDate = DateTime.Today.AddMonths(-1); - dateCreated.Add("lt", dateCreatedDate); - try { BankAccountList response = api.list( 2, // limit @@ -15022,17 +3597,12 @@ paths: } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - BankAccountList = apiClient.BankAccountsApi.List(context).Execute() - if err != nil { return err } @@ -15040,11 +3610,7 @@ paths: post: operationId: bank_account_create summary: Create - 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". + 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". tags: - Bank Accounts requestBody: @@ -15168,12 +3734,9 @@ paths: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\BankAccountsApi($config, new - GuzzleHttp\Client()); - - $bank_account_writable = new - OpenAPI\Client\Model\BankAccountWritable( + source: | + $apiInstance = new OpenAPI\Client\Api\BankAccountsApi($config, new GuzzleHttp\Client()); + $bank_account_writable = new OpenAPI\Client\Model\BankAccountWritable( array( "description" => "Test Bank Account", "routing_number" => "322271627", @@ -15183,7 +3746,6 @@ paths: ) ); - try { $result = $apiInstance->create($bank_account_writable); } catch (Exception $e) { @@ -15235,35 +3797,23 @@ paths: } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - var bankAccountCreate = *lob.NewBankAccountWritable() - bankAccountCreate.SetDescription("Test Bank Account") - bankAccountCreate.SetRoutingNumber("322271627") - bankAccountCreate.SetAccountNumber("123456789") - bankAccountCreate.SetSignatory("John Doe") - bankAccountCreate.SetAccountType("company") - - createdbankAccount, _, err := - apiClient.BankAccountsApi.Create(context).BankAccountWritable(bankAccountCreate).Execute() - + createdbankAccount, _, err := apiClient.BankAccountsApi.Create(context).BankAccountWritable(bankAccountCreate).Execute() if err != nil { return err @@ -15280,10 +3830,7 @@ paths: get: operationId: billing_group_retrieve summary: Retrieve - 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. + 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. tags: - Billing Groups responses: @@ -15318,19 +3865,13 @@ paths: end label: RUBY - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - - fetchedBillingGroup, _, err := - apiClient.BillingGroupsApi.Get(context,"bg_4bb02b527a72667d0").Execute() - + fetchedBillingGroup, _, err := apiClient.BillingGroupsApi.Get(context,"bg_4bb02b527a72667d0").Execute() if err != nil { return err @@ -15384,27 +3925,17 @@ paths: end label: RUBY - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - var bgEditable = *lob.NewBillingGroupEditable("Test Billing group") - - createdBillingGroup, _, _ := - apiClient.BillingGroupsApi.Create(context).BillingGroupEditable(suite.bgEditable).Execute() - + createdBillingGroup, _, _ := apiClient.BillingGroupsApi.Create(context).BillingGroupEditable(suite.bgEditable).Execute() bgEditable.SetDescription("BG updated") - - resp, _, err := suite.apiClient.BillingGroupsApi.Update(context, - createdBillingGroup.Id).BillingGroupEditable(suite.bgEditable).Execute() - + resp, _, err := suite.apiClient.BillingGroupsApi.Update(context, createdBillingGroup.Id).BillingGroupEditable(suite.bgEditable).Execute() if err != nil { return err @@ -15419,10 +3950,7 @@ paths: get: operationId: billing_groups_list summary: List - 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. + 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. tags: - Billing Groups parameters: @@ -15433,9 +3961,8 @@ paths: - $ref: '#/components/parameters/date_modified' - in: query name: sort_by - description: > - Sorts items by ascending or descending dates. Use either - `date_created` or `date_modified`, not both. + description: | + Sorts items by ascending or descending dates. Use either `date_created` or `date_modified`, not both. schema: allOf: - type: object @@ -15506,18 +4033,12 @@ paths: end label: RUBY - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - - BillingGroupList = - apiClient.BillingGroupsApi.List(context).Execute() - + BillingGroupList = apiClient.BillingGroupsApi.List(context).Execute() if err != nil { return err } @@ -15556,15 +4077,11 @@ paths: $ref: '#/components/responses/billing_group_error' x-codeSamples: - lang: Shell - source: > + source: | curl https://api.lob.com/v1/billing_groups \ - -u : \ - -d "name=Marketing Department" \ - - -d "description=Usage group used for the Marketing Department's - resource sends" + -d "description=Usage group used for the Marketing Department's resource sends" - lang: Ruby source: | bgCreate = BillingGroupEditable.new({ @@ -15581,42 +4098,329 @@ paths: end label: RUBY - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - var bgCreate = *lob.NewBillingGroupEditable() - - bgCreate.SetDescription("Usage group used for the Marketing - Department's resource sends") - + bgCreate.SetDescription("Usage group used for the Marketing Department's resource sends") bgCreate.SetName("Marketing Department") - - createdbg, _, err := - apiClient.BillingGroupsApi.Create(context).BillingGroupEditable(bgCreate).Execute() - + createdbg, _, err := apiClient.BillingGroupsApi.Create(context).BillingGroupEditable(bgCreate).Execute() if err != nil { return err } label: GO + /booklets/{booklet_id}: + parameters: + - in: path + name: booklet_id + description: id of the booklet + required: true + schema: + $ref: '#/components/schemas/booklet_id' + get: + operationId: booklet_retrieve + summary: Retrieve + description: Retrieves the details of an existing booklet. You need to only supply the unique booklet identifier that was returned upon booklet creation. + tags: + - Booklets + responses: + '200': + description: Returns a booklet object + content: + application/json: + schema: + $ref: '#/components/schemas/booklet' + example: + id: ord_0d6a16a3fff6318ac8f8008dc1 + description: April Campaign + 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 + mail_type: usps_first_class + url: https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA + carrier: USPS + tracking_number: null + tracking_events: [] + thumbnails: + - small: https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA + 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 + large: https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg + merge_variables: + name: Harry + size: 8.375x5.375 + pages: 8 + source_material: 60# Gloss Text + expected_delivery_date: '2021-03-24' + date_created: '2021-03-16T18:40:40.504Z' + date_modified: '2021-03-16T18:40:40.504Z' + send_date: '2021-03-16T18:45:40.493Z' + use_type: marketing + fsc: false + object: booklet + default: + $ref: '#/components/responses/mailpiece_error' + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://api.lob.com/v1/booklets/ord_0d6a16a3fff6318ac8f8008dc1" \ + -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: + label: CURL + delete: + operationId: booklet_delete + summary: 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. + tags: + - Booklets + responses: + '200': + $ref: '#/components/responses/booklet_deleted' + default: + $ref: '#/components/responses/mailpiece_error' + x-codeSamples: + - lang: Shell + source: | + curl -X DELETE https://api.lob.com/v1/booklets/ord_0d6a16a3fff6318ac8f8008dc1 \ + -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: + label: CURL + /booklets: + get: + operationId: booklets_list + summary: List + description: Returns a list of your booklets. The booklets are returned sorted by creation date, with the most recently created booklets appearing first. + tags: + - Booklets + 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' + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://api.lob.com/v1/booklets?limit=2" \ + -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: + label: CURL + post: + operationId: booklet_create + summary: Create + description: Creates a new booklet. + tags: + - Booklets + parameters: + - $ref: '#/components/parameters/idem-header' + - $ref: '#/components/parameters/idem-query' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/booklet_editable' + example: + description: demo + to: + description: Harry - Office + name: Harry Zhang + company: Lob + email: harry@lob.com + phone: '5555555555' + address_line1: 210 King St + address_line2: '# 6100' + address_city: San Francisco + address_state: CA + address_zip: '94107' + address_country: US + from: + name: Harry + address_line1: 210 King St + address_line2: '# 6100' + address_city: San Francisco + address_state: CA + address_zip: '94107' + file: 'HTML Booklet for {{name}}' + mail_type: usps_first_class + merge_variables: + name: Harry + metadata: + spiffy: 'true' + send_date: '2017-11-01T00:00:00.000Z' + use_type: marketing + qr_code: + position: relative + redirect_url: https://www.lob.com + width: '2' + top: '2' + right: '2' + pages: 1-2,4-5 + fsc: true + size: 8.375x5.375 + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/booklet_editable' + example: + description: demo + to: + description: Harry - Office + name: Harry Zhang + company: Lob + email: harry@lob.com + phone: '5555555555' + address_line1: 210 King St + address_line2: '# 6100' + address_city: San Francisco + address_state: CA + address_zip: '94107' + address_country: US + from: + name: Harry + address_line1: 210 King St + address_line2: '# 6100' + address_city: San Francisco + address_state: CA + address_zip: '94107' + file: 'HTML Booklet for {{name}}' + mail_type: usps_first_class + merge_variables: + name: Harry + metadata: + spiffy: 'true' + send_date: '2017-11-01T00:00:00.000Z' + use_type: marketing + qr_code: + position: relative + redirect_url: https://www.lob.com + width: '2' + top: '2' + right: '2' + pages: 1-2,4-5 + fsc: true + size: 8.375x5.375 + multipart/form-data: + schema: + $ref: '#/components/schemas/booklet_editable' + example: + description: demo + to: + description: Harry - Office + name: Harry Zhang + company: Lob + email: harry@lob.com + phone: '5555555555' + address_line1: 210 King St + address_line2: '# 6100' + address_city: San Francisco + address_state: CA + address_zip: '94107' + address_country: US + from: + name: Harry + address_line1: 210 King St + address_line2: '# 6100' + address_city: San Francisco + address_state: CA + address_zip: '94107' + file: 'HTML Booklet for {{name}}' + mail_type: usps_first_class + merge_variables: + name: Harry + metadata: + spiffy: 'true' + send_date: '2017-11-01T00:00:00.000Z' + use_type: marketing + qr_code: + position: relative + redirect_url: https://www.lob.com + width: '2' + top: '2' + right: '2' + pages: 1-2,4-5 + fsc: true + size: 8.375x5.375 + responses: + '200': + $ref: '#/components/responses/post_booklet' + default: + $ref: '#/components/responses/mailpiece_error' + x-codeSamples: + - lang: Shell + source: | + curl https://api.lob.com/v1/booklets \ + -u YOUR_API_KEY \ + -d 'description=Demo Booklet' \ + -d 'to[name]=Harry Zhang' \ + -d 'to[address_line1]=210 King St' \ + -d 'to[address_line2]=# 6100' \ + -d 'to[address_city]=San Francisco' \ + -d 'to[address_state]=CA' \ + -d 'to[address_zip]=94107' \ + -d 'from=adr_210a8d4b0b76d77b' \ + --data-urlencode 'file=HTML Booklet for {{name}}' \ + -d 'merge_variables[name]=Harry' \ + -d 'qr_code[position]=relative' \ + -d 'qr_code[redirect_url]=https://www.lob.com' \ + -d 'qr_code[width]=2' \ + -d 'qr_code[bottom]=2' \ + -d 'qr_code[left]=2' \ + -d 'qr_code[pages]=3,4-5' \ + -d 'fsc=true' + label: CURL /buckslips: get: operationId: buckslips_list summary: List - description: >- - Returns a list of your buckslips. The buckslips are returned sorted by - creation date, with the most recently created buckslips appearing first. + description: Returns a list of your buckslips. The buckslips are returned sorted by creation date, with the most recently created buckslips appearing first. tags: - Buckslips parameters: @@ -15643,27 +4447,20 @@ paths: - id: bck_7a6d73c5c8457fc account_id: fa9ea650fc7b31a89f92 description: null - url: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e.pdf?version=v1&expires=1636910992&signature=mnsDH2DAxdkN9VibdlLMxJC86sME5WYDqkNtmvGwdNsAaUWfbnv0rJhJ1mR8Ol4uxQq61j5wYZ0r3s-lBkQfDA + url: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e.pdf?version=v1&expires=1636910992&signature=mnsDH2DAxdkN9VibdlLMxJC86sME5WYDqkNtmvGwdNsAaUWfbnv0rJhJ1mR8Ol4uxQq61j5wYZ0r3s-lBkQfDA size: 8.75x3.75 has_front: true has_back: true auto_reorder: false reorder_quantity: null threshold_amount: 0 - raw_url: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw - front_original_url: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw - back_original_url: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw + raw_url: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw + front_original_url: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw + back_original_url: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw thumbnails: - - small: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_small_1.png?version=v1&expires=1636910992&signature=mrv8JDvpZK4I8WUGH0tPdtK-My5oes0Ltj_gL7BDw96SpCTTeZFHkz81SzclyFP9dQRtlsvAsjcuGcTBvCvOCg - medium: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_medium_1.png?version=v1&expires=1636910992&signature=VgL_2Ckm_kxKiWGgWtdNoy9HHOn8dGYSVOn7UqyCbwdbVlUtx28TRN4Bo8Iru3n0keKp9He0YhKT1ILotznMDA - large: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_large_1.png?version=v1&expires=1636910992&signature=FKSzymA13j-CQ0uk20cGHZTzT3vimzNBYrgp-xifLFg4mMdo1BZALR5O0aF_jVhsX614hKP35ONdYl47TQxXAw + - small: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_small_1.png?version=v1&expires=1636910992&signature=mrv8JDvpZK4I8WUGH0tPdtK-My5oes0Ltj_gL7BDw96SpCTTeZFHkz81SzclyFP9dQRtlsvAsjcuGcTBvCvOCg + medium: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_medium_1.png?version=v1&expires=1636910992&signature=VgL_2Ckm_kxKiWGgWtdNoy9HHOn8dGYSVOn7UqyCbwdbVlUtx28TRN4Bo8Iru3n0keKp9He0YhKT1ILotznMDA + large: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_large_1.png?version=v1&expires=1636910992&signature=FKSzymA13j-CQ0uk20cGHZTzT3vimzNBYrgp-xifLFg4mMdo1BZALR5O0aF_jVhsX614hKP35ONdYl47TQxXAw available_quantity: 0 allocated_quantity: 0 onhand_quantity: 0 @@ -15705,28 +4502,22 @@ paths: $ref: '#/components/schemas/buckslip_editable' example: description: Test buckslip - front: >- - https://s3-us-west-2.amazonaws.com/public.lob.com/assets/buckslip.pdf - back: >- - https://s3-us-west-2.amazonaws.com/public.lob.com/assets/buckslip.pdf + front: https://s3-us-west-2.amazonaws.com/public.lob.com/assets/buckslip.pdf + back: https://s3-us-west-2.amazonaws.com/public.lob.com/assets/buckslip.pdf application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/buckslip_editable' example: description: Test buckslip - front: >- - https://s3-us-west-2.amazonaws.com/public.lob.com/assets/buckslip.pdf - back: >- - https://s3-us-west-2.amazonaws.com/public.lob.com/assets/buckslip.pdf + front: https://s3-us-west-2.amazonaws.com/public.lob.com/assets/buckslip.pdf + back: https://s3-us-west-2.amazonaws.com/public.lob.com/assets/buckslip.pdf multipart/form-data: schema: $ref: '#/components/schemas/buckslip_editable' example: description: Test buckslip - front: >- - https://s3-us-west-2.amazonaws.com/public.lob.com/assets/buckslip.pdf - back: >- - https://s3-us-west-2.amazonaws.com/public.lob.com/assets/buckslip.pdf + front: https://s3-us-west-2.amazonaws.com/public.lob.com/assets/buckslip.pdf + back: https://s3-us-west-2.amazonaws.com/public.lob.com/assets/buckslip.pdf responses: '200': description: Buckslip created successfully @@ -15740,31 +4531,21 @@ paths: id: bck_7a6d73c5c8457fc account_id: fa9ea650fc7b31a89f92 description: Test buckslip - url: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e.pdf?version=v1&expires=1636910992&signature=mnsDH2DAxdkN9VibdlLMxJC86sME5WYDqkNtmvGwdNsAaUWfbnv0rJhJ1mR8Ol4uxQq61j5wYZ0r3s-lBkQfDA + url: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e.pdf?version=v1&expires=1636910992&signature=mnsDH2DAxdkN9VibdlLMxJC86sME5WYDqkNtmvGwdNsAaUWfbnv0rJhJ1mR8Ol4uxQq61j5wYZ0r3s-lBkQfDA size: 8.75x3.755 auto_reorder: false reorder_quantity: null threshold_amount: 0 - raw_url: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw - front_original_url: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw - back_original_url: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw + raw_url: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw + front_original_url: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw + back_original_url: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw thumbnails: - - small: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_small_1.png?version=v1&expires=1636910992&signature=mrv8JDvpZK4I8WUGH0tPdtK-My5oes0Ltj_gL7BDw96SpCTTeZFHkz81SzclyFP9dQRtlsvAsjcuGcTBvCvOCg - medium: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_medium_1.png?version=v1&expires=1636910992&signature=VgL_2Ckm_kxKiWGgWtdNoy9HHOn8dGYSVOn7UqyCbwdbVlUtx28TRN4Bo8Iru3n0keKp9He0YhKT1ILotznMDA - large: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_large_1.png?version=v1&expires=1636910992&signature=FKSzymA13j-CQ0uk20cGHZTzT3vimzNBYrgp-xifLFg4mMdo1BZALR5O0aF_jVhsX614hKP35ONdYl47TQxXAw - - small: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_small_2.png?version=v1&expires=1636910992&signature=IWsmPa_ULlv2yyqjX564d_YfHHY_M7i9YxDnw-WXDr2jtOFcArmRZQbnHeE9g_rYxnddJbgosuv8-c2utiu7Cg - medium: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_medium_2.png?version=v1&expires=1636910992&signature=zxK7VKGiTvz5Ywrkaydd0v3GcYf58R7A08J4tNfI7-aiNODDcTF3l0MqY13n9Pyc8RXSdD0XVBY-OpbA1VM-Ag - large: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_large_2.png?version=v1&expires=1636910992&signature=r0OFUhh315ZwN0raMZdIwJd2oCIEYsz0BABaMxIuO1PKTD0ckGWrhcGdzk2dlWQ6vSvp0CUQ5k1RXGqkIIqkDw + - small: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_small_1.png?version=v1&expires=1636910992&signature=mrv8JDvpZK4I8WUGH0tPdtK-My5oes0Ltj_gL7BDw96SpCTTeZFHkz81SzclyFP9dQRtlsvAsjcuGcTBvCvOCg + medium: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_medium_1.png?version=v1&expires=1636910992&signature=VgL_2Ckm_kxKiWGgWtdNoy9HHOn8dGYSVOn7UqyCbwdbVlUtx28TRN4Bo8Iru3n0keKp9He0YhKT1ILotznMDA + large: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_large_1.png?version=v1&expires=1636910992&signature=FKSzymA13j-CQ0uk20cGHZTzT3vimzNBYrgp-xifLFg4mMdo1BZALR5O0aF_jVhsX614hKP35ONdYl47TQxXAw + - small: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_small_2.png?version=v1&expires=1636910992&signature=IWsmPa_ULlv2yyqjX564d_YfHHY_M7i9YxDnw-WXDr2jtOFcArmRZQbnHeE9g_rYxnddJbgosuv8-c2utiu7Cg + medium: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_medium_2.png?version=v1&expires=1636910992&signature=zxK7VKGiTvz5Ywrkaydd0v3GcYf58R7A08J4tNfI7-aiNODDcTF3l0MqY13n9Pyc8RXSdD0XVBY-OpbA1VM-Ag + large: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_large_2.png?version=v1&expires=1636910992&signature=r0OFUhh315ZwN0raMZdIwJd2oCIEYsz0BABaMxIuO1PKTD0ckGWrhcGdzk2dlWQ6vSvp0CUQ5k1RXGqkIIqkDw available_quantity: 0 allocated_quantity: 0 onhand_quantity: 0 @@ -15802,9 +4583,7 @@ paths: get: operationId: buckslip_retrieve summary: Retrieve - description: >- - Retrieves the details of an existing buckslip. You need only supply the - unique customer identifier that was returned upon buckslip creation. + description: Retrieves the details of an existing buckslip. You need only supply the unique customer identifier that was returned upon buckslip creation. tags: - Buckslips responses: @@ -15820,31 +4599,21 @@ paths: id: bck_7a6d73c5c8457fc account_id: fa9ea650fc7b31a89f92 description: Test buckslip - url: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e.pdf?version=v1&expires=1636910992&signature=mnsDH2DAxdkN9VibdlLMxJC86sME5WYDqkNtmvGwdNsAaUWfbnv0rJhJ1mR8Ol4uxQq61j5wYZ0r3s-lBkQfDA + url: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e.pdf?version=v1&expires=1636910992&signature=mnsDH2DAxdkN9VibdlLMxJC86sME5WYDqkNtmvGwdNsAaUWfbnv0rJhJ1mR8Ol4uxQq61j5wYZ0r3s-lBkQfDA size: 8.75x3.755 auto_reorder: false reorder_quantity: null threshold_amount: 0 - raw_url: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw - front_original_url: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw - back_original_url: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw + raw_url: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw + front_original_url: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw + back_original_url: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw thumbnails: - - small: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_small_1.png?version=v1&expires=1636910992&signature=mrv8JDvpZK4I8WUGH0tPdtK-My5oes0Ltj_gL7BDw96SpCTTeZFHkz81SzclyFP9dQRtlsvAsjcuGcTBvCvOCg - medium: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_medium_1.png?version=v1&expires=1636910992&signature=VgL_2Ckm_kxKiWGgWtdNoy9HHOn8dGYSVOn7UqyCbwdbVlUtx28TRN4Bo8Iru3n0keKp9He0YhKT1ILotznMDA - large: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_large_1.png?version=v1&expires=1636910992&signature=FKSzymA13j-CQ0uk20cGHZTzT3vimzNBYrgp-xifLFg4mMdo1BZALR5O0aF_jVhsX614hKP35ONdYl47TQxXAw - - small: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_small_2.png?version=v1&expires=1636910992&signature=IWsmPa_ULlv2yyqjX564d_YfHHY_M7i9YxDnw-WXDr2jtOFcArmRZQbnHeE9g_rYxnddJbgosuv8-c2utiu7Cg - medium: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_medium_2.png?version=v1&expires=1636910992&signature=zxK7VKGiTvz5Ywrkaydd0v3GcYf58R7A08J4tNfI7-aiNODDcTF3l0MqY13n9Pyc8RXSdD0XVBY-OpbA1VM-Ag - large: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_large_2.png?version=v1&expires=1636910992&signature=r0OFUhh315ZwN0raMZdIwJd2oCIEYsz0BABaMxIuO1PKTD0ckGWrhcGdzk2dlWQ6vSvp0CUQ5k1RXGqkIIqkDw + - small: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_small_1.png?version=v1&expires=1636910992&signature=mrv8JDvpZK4I8WUGH0tPdtK-My5oes0Ltj_gL7BDw96SpCTTeZFHkz81SzclyFP9dQRtlsvAsjcuGcTBvCvOCg + medium: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_medium_1.png?version=v1&expires=1636910992&signature=VgL_2Ckm_kxKiWGgWtdNoy9HHOn8dGYSVOn7UqyCbwdbVlUtx28TRN4Bo8Iru3n0keKp9He0YhKT1ILotznMDA + large: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_large_1.png?version=v1&expires=1636910992&signature=FKSzymA13j-CQ0uk20cGHZTzT3vimzNBYrgp-xifLFg4mMdo1BZALR5O0aF_jVhsX614hKP35ONdYl47TQxXAw + - small: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_small_2.png?version=v1&expires=1636910992&signature=IWsmPa_ULlv2yyqjX564d_YfHHY_M7i9YxDnw-WXDr2jtOFcArmRZQbnHeE9g_rYxnddJbgosuv8-c2utiu7Cg + medium: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_medium_2.png?version=v1&expires=1636910992&signature=zxK7VKGiTvz5Ywrkaydd0v3GcYf58R7A08J4tNfI7-aiNODDcTF3l0MqY13n9Pyc8RXSdD0XVBY-OpbA1VM-Ag + large: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_large_2.png?version=v1&expires=1636910992&signature=r0OFUhh315ZwN0raMZdIwJd2oCIEYsz0BABaMxIuO1PKTD0ckGWrhcGdzk2dlWQ6vSvp0CUQ5k1RXGqkIIqkDw available_quantity: 0 allocated_quantity: 0 onhand_quantity: 0 @@ -15871,9 +4640,7 @@ paths: patch: operationId: buckslip_update summary: Update - description: >- - Update the details of an existing buckslip. You need only supply the - unique identifier that was returned upon buckslip creation. + description: Update the details of an existing buckslip. You need only supply the unique identifier that was returned upon buckslip creation. tags: - Buckslips requestBody: @@ -15910,31 +4677,21 @@ paths: id: bck_7a6d73c5c8457fc account_id: fa9ea650fc7b31a89f92 description: Test buckslip - url: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e.pdf?version=v1&expires=1636910992&signature=mnsDH2DAxdkN9VibdlLMxJC86sME5WYDqkNtmvGwdNsAaUWfbnv0rJhJ1mR8Ol4uxQq61j5wYZ0r3s-lBkQfDA + url: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e.pdf?version=v1&expires=1636910992&signature=mnsDH2DAxdkN9VibdlLMxJC86sME5WYDqkNtmvGwdNsAaUWfbnv0rJhJ1mR8Ol4uxQq61j5wYZ0r3s-lBkQfDA size: 8.75x3.755 auto_reorder: false reorder_quantity: null threshold_amount: 0 - raw_url: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw - front_original_url: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw - back_original_url: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw + raw_url: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw + front_original_url: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw + back_original_url: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw thumbnails: - - small: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_small_1.png?version=v1&expires=1636910992&signature=mrv8JDvpZK4I8WUGH0tPdtK-My5oes0Ltj_gL7BDw96SpCTTeZFHkz81SzclyFP9dQRtlsvAsjcuGcTBvCvOCg - medium: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_medium_1.png?version=v1&expires=1636910992&signature=VgL_2Ckm_kxKiWGgWtdNoy9HHOn8dGYSVOn7UqyCbwdbVlUtx28TRN4Bo8Iru3n0keKp9He0YhKT1ILotznMDA - large: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_large_1.png?version=v1&expires=1636910992&signature=FKSzymA13j-CQ0uk20cGHZTzT3vimzNBYrgp-xifLFg4mMdo1BZALR5O0aF_jVhsX614hKP35ONdYl47TQxXAw - - small: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_small_2.png?version=v1&expires=1636910992&signature=IWsmPa_ULlv2yyqjX564d_YfHHY_M7i9YxDnw-WXDr2jtOFcArmRZQbnHeE9g_rYxnddJbgosuv8-c2utiu7Cg - medium: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_medium_2.png?version=v1&expires=1636910992&signature=zxK7VKGiTvz5Ywrkaydd0v3GcYf58R7A08J4tNfI7-aiNODDcTF3l0MqY13n9Pyc8RXSdD0XVBY-OpbA1VM-Ag - large: >- - https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_large_2.png?version=v1&expires=1636910992&signature=r0OFUhh315ZwN0raMZdIwJd2oCIEYsz0BABaMxIuO1PKTD0ckGWrhcGdzk2dlWQ6vSvp0CUQ5k1RXGqkIIqkDw + - small: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_small_1.png?version=v1&expires=1636910992&signature=mrv8JDvpZK4I8WUGH0tPdtK-My5oes0Ltj_gL7BDw96SpCTTeZFHkz81SzclyFP9dQRtlsvAsjcuGcTBvCvOCg + medium: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_medium_1.png?version=v1&expires=1636910992&signature=VgL_2Ckm_kxKiWGgWtdNoy9HHOn8dGYSVOn7UqyCbwdbVlUtx28TRN4Bo8Iru3n0keKp9He0YhKT1ILotznMDA + large: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_large_1.png?version=v1&expires=1636910992&signature=FKSzymA13j-CQ0uk20cGHZTzT3vimzNBYrgp-xifLFg4mMdo1BZALR5O0aF_jVhsX614hKP35ONdYl47TQxXAw + - small: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_small_2.png?version=v1&expires=1636910992&signature=IWsmPa_ULlv2yyqjX564d_YfHHY_M7i9YxDnw-WXDr2jtOFcArmRZQbnHeE9g_rYxnddJbgosuv8-c2utiu7Cg + medium: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_medium_2.png?version=v1&expires=1636910992&signature=zxK7VKGiTvz5Ywrkaydd0v3GcYf58R7A08J4tNfI7-aiNODDcTF3l0MqY13n9Pyc8RXSdD0XVBY-OpbA1VM-Ag + large: https://lob-assets.com/buckslips/bck_c51ae96f5cebf3e_thumb_large_2.png?version=v1&expires=1636910992&signature=r0OFUhh315ZwN0raMZdIwJd2oCIEYsz0BABaMxIuO1PKTD0ckGWrhcGdzk2dlWQ6vSvp0CUQ5k1RXGqkIIqkDw available_quantity: 0 allocated_quantity: 0 onhand_quantity: 0 @@ -15963,9 +4720,7 @@ paths: delete: operationId: buckslip_delete summary: Delete - description: >- - Delete an existing buckslip. You need only supply the unique identifier - that was returned upon buckslip creation. + description: Delete an existing buckslip. You need only supply the unique identifier that was returned upon buckslip creation. tags: - Buckslips responses: @@ -15975,9 +4730,8 @@ paths: $ref: '#/components/responses/buckslip_error' x-codeSamples: - lang: Shell - source: > - curl -X DELETE https://api.lob.com/v1/buckslips/bck_7a6d73c5c8457fc - \ + source: | + curl -X DELETE https://api.lob.com/v1/buckslips/bck_7a6d73c5c8457fc \ -u : label: CURL /buckslips/{buckslip_id}/orders: @@ -16095,10 +4849,7 @@ paths: post: operationId: bulk_us_verifications summary: Bulk Verify - 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. + 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. tags: - US Verifications parameters: @@ -16110,12 +4861,7 @@ paths: - upper - proper default: upper - 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`. + 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`. required: false requestBody: required: true @@ -16287,34 +5033,28 @@ paths: print(e) label: PYTHON - lang: PHP - source: > - $verificationData0 = new - OpenAPI\Client\Model\MultipleComponents(array( + source: | + $verificationData0 = new OpenAPI\Client\Model\MultipleComponents(array( 'primary_line' => '210 King Street', 'city' => 'San Francisco', 'state' => 'CA', 'zip_code' => '94017', )); - - $verificationData1 = new - OpenAPI\Client\Model\MultipleComponents(array( + $verificationData1 = new OpenAPI\Client\Model\MultipleComponents(array( 'primary_line' => '185 BERRY ST STE 6600', 'city' => 'SAN FRANCISCO', 'state' => 'CA', 'zip_code' => '94017', )); - - $addressList = new - OpenAPI\Client\Model\MultipleComponentsList(array( + $addressList = new OpenAPI\Client\Model\MultipleComponentsList(array( 'addresses' => [ $verificationData0, $verificationData1, ] )); - try { $result = $apiInstance->verifyBulk($addressList); } catch (Exception $e) { @@ -16346,705 +5086,1342 @@ paths: label: JAVA - lang: Elixir source: | - Lob.BulkUSVerification.verify.verify( - %{ - addresses:[ + Lob.BulkUSVerification.verify.verify( + %{ + addresses:[ + { + primary_line: "210 King Street", + city: "San Francisco", + state: "CA", + zip_code: "94107" + } + ] + }) + label: ELIXIR + - lang: CSharp + source: | + List addresses = new List(); + MultipleComponents bulkAddress0 = new MultipleComponents( + null, // recipient + "210 King Street", // primaryLine + null, // secondaryLine + null, // urbanization + "San Francisco", // city + "CA", // state + "94017" // zipCode + ); + addresses.Add(bulkAddress0); + + MultipleComponents bulkAddress1 = new MultipleComponents( + null, // recipient + "185 BERRY ST STE 6600", // primaryLine + null, // secondaryLine + null, // urbanization + "San Francisco", // city + "CA", // state + "94017" // zipCode + ); + addresses.Add(bulkAddress1); + + MultipleComponentsList bulkVerify = new MultipleComponentsList(addresses); + + UsVerificationsApi api = new UsVerificationsApi(config); + try { + UsVerifications bulkVerifyResponse = api.verifyBulk(bulkVerify, null); + } catch (ApiException e) { + Console.WriteLine(e.ToString()); + } + label: CSHARP + /bulk/intl_verifications: + post: + operationId: bulk_intl_verifications + summary: Bulk Verify + 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. + tags: + - Intl Verifications + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/intl_verifications_payload' + example: + addresses: + - recipient: John Doe + primary_line: 370 Water St + secondary_line: '' + city: Summerside + state: Prince Edwards Island + postal_code: C1N 1C4 + country: CA + - recipient: Jane Doe + primary_line: UL. DOLSKAYA 1 + secondary_line: '' + city: MOSCOW + state: MOSCOW G + postal_code: '115569' + country: RU + multipart/form-data: + schema: + $ref: '#/components/schemas/intl_verifications_payload' + example: + addresses: + - recipient: John Doe + primary_line: 370 Water St + secondary_line: '' + city: Summerside + state: Prince Edwards Island + postal_code: C1N 1C4 + country: CA + - recipient: Jane Doe + primary_line: UL. DOLSKAYA 1 + secondary_line: '' + city: MOSCOW + state: MOSCOW G + postal_code: '115569' + country: RU + responses: + '200': + $ref: '#/components/responses/bulk_intl_verifications' + default: + $ref: '#/components/responses/intl_verifications_error' + x-codeSamples: + - lang: Shell + source: | + curl https://api.lob.com/v1/bulk/intl_verifications \ + -u : \ + --header 'Content-Type: application/x-www-form-urlencoded' \ + --data-urlencode 'addresses[0][primary_line]=370 WATER ST' \ + --data-urlencode 'addresses[0][postal_code]=C1N 1C4' \ + --data-urlencode 'addresses[0][country]=CA' + label: CURL + - lang: Typescript + source: | + const IntlVerifications = new IntlVerificationsApi(av_config); + let verificationData1: IntlVerificationWritable = { + primary_line: '370 WATER ST', + postal_code: 'C1N 1C4', + country: CountryExtended.Ca + }; + const verificationData2: IntlVerificationWritable = { + primary_line: '012 PLACEHOLDER ST', + postal_code: 'F0O 8A2', + country: CountryExtended.Ca + }; + let addressList = new IntlVerificationsPayload({ + addresses: [verificationData1, verificationData2] + }); + + try { + const bulkVerified = await IntlVerifications.verifyBulk(addressList); + + } catch (err: any) { + console.error(err); + } + label: TYPESCRIPT + - lang: Javascript + source: | + Lob.bulkIntlVerifications.verify({ + addresses: [{ + primary_line: '370 Water St', + secondary_line: '', + city: 'Summerside', + state: 'Prince Edward Island', + postal_code: 'C1N 1C4', + country: 'CA' + }] + }), function (err, res) { + console.log(err, res); + }); + label: NODE + - lang: Ruby + source: | + intlVerificationsApi = IntlVerificationsApi.new(config) + + verificationData0 = MultipleComponentsIntl.new({ + primary_line: "35 Tower Hill", + city: "London", + postal_code: "EC3N 4DR", + country: "GB", + }) + + verificationData1 = MultipleComponentsIntl.new({ + primary_line: "370 Water St", + city: "Summerside", + state: "Prince Edward Island", + postal_code: "C1N 1C4", + country: "CA", + }) + + + addressList = IntlVerificationsPayload.new({ + addresses: [ + verificationData0, + verificationData1, + ], + }) + + begin + bulkVerifiedAddrs = intlVerificationsApi.verifyBulk(addressList) + rescue => err + p err.message + end + label: RUBY + - lang: Python + source: | + with ApiClient(configuration) as api_client: + api = IntlVerificationsApi(api_client) + + verification_data_0 = MultipleComponentsIntl( + primary_line = "35 Tower Hill", + city = "London", + postal_code = "EC3N 4DR", + country = CountryExtended("GB"), + ) + + verification_data_1 = MultipleComponentsIntl( + primary_line = "370 Water St", + city = "Summerside", + state = "Prince Edward Island", + postal_code = "C1N 1C4", + country = CountryExtended("CA"), + ) + + + address_list = IntlVerificationsPayload( + addresses = [ + verification_data_0, + verification_data_1, + ], + ) + + try: + bulk_verified = api.verifyBulk(address_list) + except ApiException as e: + print(e) + label: PYTHON + - lang: PHP + source: | + $verificationData0 = new OpenAPI\Client\Model\MultipleComponentsIntl(array( + 'primary_line' => '35 Tower Hill', + 'city' => 'London', + 'postal_code' => 'EC3N 4DR', + 'country' => 'GB', + )); + + $verificationData1 = new OpenAPI\Client\Model\MultipleComponentsIntl(array( + 'primary_line' => '370 Water St', + 'city' => 'Summerside', + 'state' => 'Prince Edward Island', + 'postal_code' => 'C1N 1C4', + 'country' => 'CA', + )); + + $addressList = new OpenAPI\Client\Model\IntlVerificationsPayload(array( + 'addresses' => [ + $verificationData0, + $verificationData1, + ] + )); + + try { + $result = $apiInstance->verifyBulk($addressList); + } catch (Exception $e) { + echo $e->getMessage(), PHP_EOL; + } + - lang: Java + source: | + List addresses = new ArrayList(); + addresses.add(new IntlVerification.RequestBuilder() + .setPrimaryLine("370 Water St") + .setCity("Summerside") + .setState("Prince Edward Island") + .setPostalCode("C1N 1C4") + .setCountry("CA")); + LobResponse response = new BulkIntlVerification.RequestBuilder() + .setAddresses(addresses) + .verify(); + BulkIntlVerification bulkIntlVerification = response.getResponseBody(); + label: JAVA + - lang: Elixir + source: | + Lob.BulkIntlVerification.verify.verify( + %{addresses:[ { - primary_line: "210 King Street", - city: "San Francisco", - state: "CA", - zip_code: "94107" + primary_line: '370 Water St', + secondary_line: '', + city: 'Summerside', + state: 'Prince Edward Island', + postal_code: 'C1N 1C4', + country: 'CA' } - ] + ] }) label: ELIXIR - lang: CSharp - source: > - List addresses = new List(); - - MultipleComponents bulkAddress0 = new MultipleComponents( + source: | + List addresses = new List(); + MultipleComponentsIntl bulkAddress0 = new MultipleComponentsIntl( null, // recipient - "210 King Street", // primaryLine + "35 Tower Hill", // primaryLine null, // secondaryLine - null, // urbanization - "San Francisco", // city - "CA", // state - "94017" // zipCode + "London", // city + null, // state + "EC3N 4DR", // postalCode + CountryExtended.GB // country ); - addresses.Add(bulkAddress0); - - MultipleComponents bulkAddress1 = new MultipleComponents( + MultipleComponentsIntl bulkAddress1 = new MultipleComponentsIntl( null, // recipient - "185 BERRY ST STE 6600", // primaryLine + "370 Water St", // primaryLine null, // secondaryLine - null, // urbanization - "San Francisco", // city - "CA", // state - "94017" // zipCode + "Summerside", // city + "Prince Edward Island", // state + "C1N 1C4", // postalCode + CountryExtended.CA // country ); - addresses.Add(bulkAddress1); + IntlVerificationsPayload bulkVerify = new IntlVerificationsPayload(addresses); - MultipleComponentsList bulkVerify = new - MultipleComponentsList(addresses); - - - UsVerificationsApi api = new UsVerificationsApi(config); + IntlVerificationsApi api = new IntlVerificationsApi(config); try { - UsVerifications bulkVerifyResponse = api.verifyBulk(bulkVerify, null); + IntlVerifications bulkVerifyResponse = api.verifyBulk(bulkVerify); } catch (ApiException e) { Console.WriteLine(e.ToString()); } label: CSHARP - /bulk/intl_verifications: + /campaigns: + get: + operationId: campaigns_list + summary: List + description: Returns a list of your campaigns. The campaigns are returned sorted by creation date, with the most recently created campaigns appearing first. + tags: + - Campaigns + parameters: + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/include' + - $ref: '#/components/parameters/before_after' + responses: + '200': + $ref: '#/components/responses/all_campaigns' + x-codeSamples: + - lang: Shell + source: | + curl https://api.lob.com/v1/campaigns \ + -u : + label: CURL + - lang: Ruby + source: | + campaignsApi = CampaignsApi.new(config) + + begin + campaigns = campaignsApi.list({ limit: 2 }) + rescue => err + p err.message + end + label: RUBY post: - operationId: bulk_intl_verifications - summary: Bulk Verify - 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: campaign_create + summary: Create + 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). tags: - - Intl Verifications + - Campaigns + parameters: + - $ref: '#/components/parameters/lang_spec' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/intl_verifications_payload' + $ref: '#/components/schemas/campaign_writable' example: - addresses: - - recipient: John Doe - primary_line: 370 Water St - secondary_line: '' - city: Summerside - state: Prince Edwards Island - postal_code: C1N 1C4 - country: CA - - recipient: Jane Doe - primary_line: UL. DOLSKAYA 1 - secondary_line: '' - city: MOSCOW - state: MOSCOW G - postal_code: '115569' - country: RU + name: My Demo Campaign + description: My Campaign's description + schedule_type: immediate + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/campaign_writable' + encoding: + example-prop: + style: deepObject + explode: true + example: + name: My Demo Campaign + description: My Campaign's description + schedule_type: immediate + multipart/form-data: + schema: + $ref: '#/components/schemas/campaign_writable' + example: + name: My Demo Campaign + description: My Campaign's description + schedule_type: immediate + responses: + '200': + description: Campaign created successfully + content: + application/json: + schema: + $ref: '#/components/schemas/campaign' + example: + id: cmp_e05ee61ff80764b + billing_group_id: bg_fe3079dcdd80e5ae + name: My Campaign + description: My Campaign's description + schedule_type: immediate + cancel_window_campaign_minutes: 60 + metadata: {} + use_type: marketing + is_draft: true + deleted: false + creatives: [] + uploads: [] + auto_cancel_if_ncoa: false + date_created: '2017-09-05T17:47:53.767Z' + date_modified: '2017-09-05T17:47:53.767Z' + object: campaign + default: + $ref: '#/components/responses/campaigns_error' + x-codeSamples: + - lang: Shell + source: | + curl https://api.lob.com/v1/campaigns \ + -u : \ + -d "name=My First Campaign" \ + -d "schedule_type=immediate" + label: CURL + - lang: Ruby + source: | + campaignCreate = CampaignWritable.new({ + name: "My First Campaign", + schedule_type: "immediate", + }); + + campaignApi = CampaignsApi.new(config) + + begin + createdCampaign = campaignApi.create(campaignCreate) + rescue => err + p err.message + end + label: RUBY + /campaigns/{cmp_id}: + parameters: + - in: path + name: cmp_id + description: id of the campaign + required: true + schema: + $ref: '#/components/schemas/cmp_id' + get: + operationId: campaign_retrieve + summary: Retrieve + description: Retrieves the details of an existing campaign. You need only supply the unique campaign identifier that was returned upon campaign creation. + tags: + - Campaigns + responses: + '200': + description: Returns a campaign object + content: + application/json: + schema: + $ref: '#/components/schemas/campaign' + example: + id: cmp_e05ee61ff80764b + billing_group_id: bg_fe3079dcdd80e5ae + name: My Campaign + description: My Campaign's description + schedule_type: immediate + cancel_window_campaign_minutes: 60 + metadata: {} + use_type: marketing + is_draft: true + deleted: false + creatives: [] + uploads: [] + auto_cancel_if_ncoa: false + date_created: '2017-09-05T17:47:53.767Z' + date_modified: '2017-09-05T17:47:53.767Z' + object: campaign + default: + $ref: '#/components/responses/campaigns_error' + x-codeSamples: + - lang: Shell + source: | + curl https://api.lob.com/v1/campaigns/cmp_e05ee61ff80764b \ + -u : + label: CURL + - lang: Ruby + source: | + campaignApi = CampaignsApi.new(config) + + begin + retrievedCampaign = campaignApi.get("cmp_e05ee61ff80764b") + rescue => err + p err.message + end + label: RUBY + patch: + operationId: campaign_update + summary: Update + description: Update the details of an existing campaign. You need only supply the unique identifier that was returned upon campaign creation. + tags: + - Campaigns + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/campaign_updatable' + example: + description: Test campaign + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/campaign_updatable' + example: + description: Test campaign multipart/form-data: schema: - $ref: '#/components/schemas/intl_verifications_payload' + $ref: '#/components/schemas/campaign_updatable' example: - addresses: - - recipient: John Doe - primary_line: 370 Water St - secondary_line: '' - city: Summerside - state: Prince Edwards Island - postal_code: C1N 1C4 - country: CA - - recipient: Jane Doe - primary_line: UL. DOLSKAYA 1 - secondary_line: '' - city: MOSCOW - state: MOSCOW G - postal_code: '115569' - country: RU + description: Test campaign responses: '200': - $ref: '#/components/responses/bulk_intl_verifications' + description: Returns a campaign object + content: + application/json: + schema: + $ref: '#/components/schemas/campaign' + example: + id: cmp_e05ee61ff80764b + billing_group_id: bg_fe3079dcdd80e5ae + name: My Campaign + description: My Campaign's description + schedule_type: immediate + cancel_window_campaign_minutes: 60 + metadata: {} + use_type: marketing + is_draft: true + deleted: false + creatives: [] + uploads: [] + auto_cancel_if_ncoa: false + date_created: '2017-09-05T17:47:53.767Z' + date_modified: '2017-09-05T17:47:53.767Z' + object: campaign default: - $ref: '#/components/responses/intl_verifications_error' + $ref: '#/components/responses/campaigns_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/bulk/intl_verifications \ - -u : \ - --header 'Content-Type: application/x-www-form-urlencoded' \ - --data-urlencode 'addresses[0][primary_line]=370 WATER ST' \ - --data-urlencode 'addresses[0][postal_code]=C1N 1C4' \ - --data-urlencode 'addresses[0][country]=CA' + curl -X PATCH https://api.lob.com/v1/campaigns/cmp_e05ee61ff80764b \ + -u : \ + -d "description=Awesome campaign" label: CURL - - lang: Typescript + - lang: Python source: | - const IntlVerifications = new IntlVerificationsApi(av_config); - let verificationData1: IntlVerificationWritable = { - primary_line: '370 WATER ST', - postal_code: 'C1N 1C4', - country: CountryExtended.Ca - }; - const verificationData2: IntlVerificationWritable = { - primary_line: '012 PLACEHOLDER ST', - postal_code: 'F0O 8A2', - country: CountryExtended.Ca - }; - let addressList = new IntlVerificationsPayload({ - addresses: [verificationData1, verificationData2] - }); + campaign_updatable = CampaignUpdatable( + description = "Awesome campaign", + ) - try { - const bulkVerified = await IntlVerifications.verifyBulk(addressList); + with ApiClient(configuration) as api_client: + api = CampaignsApi(api_client) - } catch (err: any) { - console.error(err); - } - label: TYPESCRIPT - - lang: Javascript - source: | - Lob.bulkIntlVerifications.verify({ - addresses: [{ - primary_line: '370 Water St', - secondary_line: '', - city: 'Summerside', - state: 'Prince Edward Island', - postal_code: 'C1N 1C4', - country: 'CA' - }] - }), function (err, res) { - console.log(err, res); - }); - label: NODE + try: + updated_campaign = api.update("cmp_e05ee61ff80764b", campaign_updatable) + except ApiException as e: + print(e) + label: PYTHON - lang: Ruby source: | - intlVerificationsApi = IntlVerificationsApi.new(config) - - verificationData0 = MultipleComponentsIntl.new({ - primary_line: "35 Tower Hill", - city: "London", - postal_code: "EC3N 4DR", - country: "GB", - }) - - verificationData1 = MultipleComponentsIntl.new({ - primary_line: "370 Water St", - city: "Summerside", - state: "Prince Edward Island", - postal_code: "C1N 1C4", - country: "CA", + campaignUpdatable = CampaignUpdatable.new({ + description: "Awesome campaign", }) + campaignApi = CampaignsApi.new(config) - addressList = IntlVerificationsPayload.new({ - addresses: [ - verificationData0, - verificationData1, - ], - }) + begin + updatedCampaign = campaignApi.update("cmp_e05ee61ff80764b", campaignUpdatable) + rescue => err + p err.message + end + label: RUBY + delete: + operationId: campaign_delete + summary: 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. + tags: + - Campaigns + responses: + '200': + $ref: '#/components/responses/campaign_deleted' + default: + $ref: '#/components/responses/campaigns_error' + x-codeSamples: + - lang: Shell + source: | + curl -X DELETE https://api.lob.com/v1/campaigns/cmp_e05ee61ff80764b \ + -u : + label: CURL + - lang: Ruby + source: | + campaignApi = CampaignsApi.new(config) begin - bulkVerifiedAddrs = intlVerificationsApi.verifyBulk(addressList) + deletedCampaign = campaignApi.delete("cmp_e05ee61ff80764b") rescue => err p err.message end label: RUBY + /campaigns/{cmp_id}/send: + parameters: + - in: path + name: cmp_id + description: id of the campaign + required: true + schema: + $ref: '#/components/schemas/cmp_id' + post: + operationId: campaign_send + summary: Send Campaign + description: Sends a campaign. You need only supply the unique campaign identifier that was returned upon campaign creation. + tags: + - Campaigns + responses: + '200': + description: Returns a campaign object + content: + application/json: + schema: + $ref: '#/components/schemas/campaign' + example: + id: cmp_e05ee61ff80764b + billing_group_id: bg_fe3079dcdd80e5ae + name: My Campaign + description: My Campaign's description + schedule_type: immediate + cancel_window_campaign_minutes: 60 + metadata: {} + use_type: marketing + is_draft: true + deleted: false + creatives: [] + uploads: [] + auto_cancel_if_ncoa: false + date_created: '2017-09-05T17:47:53.767Z' + date_modified: '2017-09-05T17:47:53.767Z' + object: campaign + default: + $ref: '#/components/responses/campaigns_error' + x-codeSamples: + - lang: Shell + source: | + curl https://api.lob.com/v1/campaigns/cmp_e05ee61ff80764b/send \ + -u : + label: CURL + /cards: + get: + operationId: cards_list + summary: List + description: Returns a list of your cards. The cards are returned sorted by creation date, with the most recently created addresses appearing first. + tags: + - Cards + parameters: + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/before_after' + - $ref: '#/components/parameters/include' + responses: + '200': + description: Returns a list of card objects + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/list' + - type: object + properties: + data: + type: array + description: list of cards + items: + $ref: '#/components/schemas/card' + example: + data: + - id: card_7a6d73c5c8457fc + 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 + available_quantity: 10000 + pending_quantity: 0 + countries: null + status: rendered + mode: test + orientation: horizontal + threshold_amount: 0 + date_created: '2021-03-24T22:51:42.838Z' + date_modified: '2021-03-24T22:51:42.838Z' + send_date: '2021-03-24T22:51:42.838Z' + object: card + object: list + previous_url: null + next_url: null + count: 1 + default: + $ref: '#/components/responses/mailpiece_error' + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://api.lob.com/v1/cards?limit=2" \ + -u : + label: CURL + - lang: Typescript + source: | + try { + const cards = await new CardsApi(config).list(2); + } catch (err: any) { + console.error(err); + } + label: TYPESCRIPT + - lang: Javascript + source: | + Lob.cards.list({limit: 2}, function (err, res) { + console.log(err, res); + }); + label: NODE - lang: Python source: | with ApiClient(configuration) as api_client: - api = IntlVerificationsApi(api_client) - - verification_data_0 = MultipleComponentsIntl( - primary_line = "35 Tower Hill", - city = "London", - postal_code = "EC3N 4DR", - country = CountryExtended("GB"), - ) - - verification_data_1 = MultipleComponentsIntl( - primary_line = "370 Water St", - city = "Summerside", - state = "Prince Edward Island", - postal_code = "C1N 1C4", - country = CountryExtended("CA"), - ) - - - address_list = IntlVerificationsPayload( - addresses = [ - verification_data_0, - verification_data_1, - ], - ) + api = CardsApi(api_client) try: - bulk_verified = api.verifyBulk(address_list) + cards = api.list(limit=2) except ApiException as e: print(e) label: PYTHON - lang: PHP - source: > - $verificationData0 = new - OpenAPI\Client\Model\MultipleComponentsIntl(array( - 'primary_line' => '35 Tower Hill', - 'city' => 'London', - 'postal_code' => 'EC3N 4DR', - 'country' => 'GB', - )); - - - $verificationData1 = new - OpenAPI\Client\Model\MultipleComponentsIntl(array( - 'primary_line' => '370 Water St', - 'city' => 'Summerside', - 'state' => 'Prince Edward Island', - 'postal_code' => 'C1N 1C4', - 'country' => 'CA', - )); - - - $addressList = new - OpenAPI\Client\Model\IntlVerificationsPayload(array( - 'addresses' => [ - $verificationData0, - $verificationData1, - ] - )); - - - try { - $result = $apiInstance->verifyBulk($addressList); - } catch (Exception $e) { - echo $e->getMessage(), PHP_EOL; - } - - lang: Java - source: > - List addresses = new - ArrayList(); - - addresses.add(new IntlVerification.RequestBuilder() - .setPrimaryLine("370 Water St") - .setCity("Summerside") - .setState("Prince Edward Island") - .setPostalCode("C1N 1C4") - .setCountry("CA")); - LobResponse response = new - BulkIntlVerification.RequestBuilder() - .setAddresses(addresses) - .verify(); - BulkIntlVerification bulkIntlVerification = - response.getResponseBody(); - label: JAVA - - lang: Elixir source: | - Lob.BulkIntlVerification.verify.verify( - %{addresses:[ - { - primary_line: '370 Water St', - secondary_line: '', - city: 'Summerside', - state: 'Prince Edward Island', - postal_code: 'C1N 1C4', - country: 'CA' - } - ] - }) - label: ELIXIR + $lob->cards()->all(array( + 'limit' => 2 + )); - lang: CSharp - source: > - List addresses = new - List(); - - MultipleComponentsIntl bulkAddress0 = new MultipleComponentsIntl( - null, // recipient - "35 Tower Hill", // primaryLine - null, // secondaryLine - "London", // city - null, // state - "EC3N 4DR", // postalCode - CountryExtended.GB // country - ); - - addresses.Add(bulkAddress0); - - - MultipleComponentsIntl bulkAddress1 = new MultipleComponentsIntl( - null, // recipient - "370 Water St", // primaryLine - null, // secondaryLine - "Summerside", // city - "Prince Edward Island", // state - "C1N 1C4", // postalCode - CountryExtended.CA // country - ); - - addresses.Add(bulkAddress1); - - - IntlVerificationsPayload bulkVerify = new - IntlVerificationsPayload(addresses); - - - IntlVerificationsApi api = new IntlVerificationsApi(config); - + source: | + CardsApi api = new CardsApi(config); + List includeList = new List(); + includeList.Add("total_count"); try { - IntlVerifications bulkVerifyResponse = api.verifyBulk(bulkVerify); + CardList response = api.list( + 2, // limit + null, // before + null, // after + includeList // include + ); } catch (ApiException e) { Console.WriteLine(e.ToString()); } label: CSHARP - /campaigns: - get: - operationId: campaigns_list - summary: List - description: >- - Returns a list of your campaigns. The campaigns are returned sorted by - creation date, with the most recently created campaigns appearing first. - tags: - - Campaigns - parameters: - - $ref: '#/components/parameters/limit' - - $ref: '#/components/parameters/include' - - $ref: '#/components/parameters/before_after' - responses: - '200': - $ref: '#/components/responses/all_campaigns' - x-codeSamples: - - lang: Shell - source: | - curl https://api.lob.com/v1/campaigns \ - -u : - label: CURL - lang: Ruby source: | - campaignsApi = CampaignsApi.new(config) + cardsApi = CardsApi.new(config) begin - campaigns = campaignsApi.list({ limit: 2 }) + cards = cardsApi.list({ limit: 2 }) rescue => err p err.message end label: RUBY + - lang: Go + source: | + var context = context.Background() + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) + + var apiClient = *lob.NewAPIClient(configuration) + CardList = apiClient.CardsApi.List(context).Execute() + if err != nil { + return err + } + label: GO post: - operationId: campaign_create + operationId: card_create summary: Create - 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). + description: Creates a new card given information tags: - - Campaigns - parameters: - - $ref: '#/components/parameters/lang_spec' + - Cards requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/campaign_writable' + $ref: '#/components/schemas/card_editable' example: - name: My Demo Campaign - description: My Campaign's description - schedule_type: immediate + description: Test card + front: https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf + back: https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf + size: 2.125x3.375 application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/campaign_writable' - encoding: - example-prop: - style: deepObject - explode: true + $ref: '#/components/schemas/card_editable' example: - name: My Demo Campaign - description: My Campaign's description - schedule_type: immediate + description: Test card + front: https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf + back: https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf + size: 2.125x3.375 multipart/form-data: schema: - $ref: '#/components/schemas/campaign_writable' + $ref: '#/components/schemas/card_editable' example: - name: My Demo Campaign - description: My Campaign's description - schedule_type: immediate + description: Test card + front: https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf + back: https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf + size: 2.125x3.375 responses: '200': - description: Campaign created successfully + description: Card created successfully content: application/json: schema: - $ref: '#/components/schemas/campaign' - example: - id: cmp_e05ee61ff80764b - billing_group_id: bg_fe3079dcdd80e5ae - name: My Campaign - description: My Campaign's description - schedule_type: immediate - cancel_window_campaign_minutes: 60 - metadata: {} - use_type: marketing - is_draft: true - deleted: false - creatives: [] - uploads: [] - auto_cancel_if_ncoa: false - date_created: '2017-09-05T17:47:53.767Z' - date_modified: '2017-09-05T17:47:53.767Z' - object: campaign + $ref: '#/components/schemas/card' + examples: + basic: + value: + id: card_7a6d73c5c8457fc + account_id: fa9ea650fc7b31a89f92 + description: Test card + 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: '2021-03-24T22:51:42.838Z' + date_modified: '2021-03-24T22:51:42.838Z' + send_date: '2021-03-24T22:51:42.838Z' + object: card default: - $ref: '#/components/responses/campaigns_error' + $ref: '#/components/responses/mailpiece_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/campaigns \ - -u : \ - -d "name=My First Campaign" \ - -d "schedule_type=immediate" - label: CURL + curl https://api.lob.com/v1/cards \ + -u : \ + -d "description=Test card" \ + -d "front=https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf" \ + -d "back=https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf" \ + -d "size=2.125x3.375" + label: CURL + - lang: Typescript + source: | + const cardsCreate = new CardEditable({ + front: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf', + back: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf', + size: CardEditableSizeEnum._2125x3375, + description: 'Test card' + }); + + try { + const myCard = await new CardsApi(config).create(cardsCreate); + } catch (err: any) { + console.error(err); + } + label: TYPESCRIPT + - lang: Javascript + source: | + Lob.cards.create({ + description: 'Test card', + front: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf', + back: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf', + size: '2.125x3.375' + }, function (err, res) { + console.log(err, res); + }); + label: NODE + - lang: Python + source: | + card_editable = CardEditable( + front = "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf", + back = "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf", + size = "2.125x3.375", + description = "Test Card", + ) + + with ApiClient(configuration) as api_client: + api = CardsApi(api_client) + + try: + created_card = api.create(card_editable) + except ApiException as e: + print(e) + label: PYTHON + - lang: PHP + source: | + $lob->cards()->create(array( + 'description' => 'Test card', + 'front' => 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf', + 'back' => 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf', + 'size' => => '2.125x3.375' + )); + label: PHP + - lang: CSharp + source: | + CardsApi api = new CardsApi(config); + + CardEditable cardEditable = new CardEditable( + "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf", // front + "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf", // back + CardEditable.SizeEnum._2125x3375, // size + "Test Card" // description + ); + + try { + Card result = api.create(cardEditable); + } catch (ApiException e) { + Console.WriteLine(e.ToString()); + } + label: CSHARP - lang: Ruby source: | - campaignCreate = CampaignWritable.new({ - name: "My First Campaign", - schedule_type: "immediate", + cardCreate = CardEditable.new({ + front: "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf", + back: "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf", + size: "2.125x3.375", + description: "Test Card", }); - campaignApi = CampaignsApi.new(config) + cardApi = CardsApi.new(config) begin - createdCampaign = campaignApi.create(campaignCreate) + createdCard = cardApi.create(cardCreate) rescue => err p err.message end label: RUBY - /campaigns/{cmp_id}: + - lang: Go + source: | + var context = context.Background() + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) + + var apiClient = *lob.NewAPIClient(configuration) + + + var cardCreate = *lob.NewCardEditable() + cardCreate.SetFront("https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf") + cardCreate.SetBack("https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf") + cardCreate.SetSize("2.125x3.375") + cardCreate.SetDescription("Test Card") + + + + createdcard, _, err := apiClient.CardsApi.Create(context).CardEditable(cardCreate).Execute() + + if err != nil { + return err + } + label: GO + /cards/{card_id}: parameters: - in: path - name: cmp_id - description: id of the campaign + name: card_id + description: id of the card required: true schema: - $ref: '#/components/schemas/cmp_id' + $ref: '#/components/schemas/card_id' get: - operationId: campaign_retrieve + operationId: card_retrieve summary: Retrieve - description: >- - Retrieves the details of an existing campaign. You need only supply the - unique campaign identifier that was returned upon campaign creation. + description: Retrieves the details of an existing card. You need only supply the unique customer identifier that was returned upon card creation. tags: - - Campaigns + - Cards responses: '200': - description: Returns a campaign object + description: Returns a card object content: application/json: schema: - $ref: '#/components/schemas/campaign' - example: - id: cmp_e05ee61ff80764b - billing_group_id: bg_fe3079dcdd80e5ae - name: My Campaign - description: My Campaign's description - schedule_type: immediate - cancel_window_campaign_minutes: 60 - metadata: {} - use_type: marketing - is_draft: true - deleted: false - creatives: [] - uploads: [] - auto_cancel_if_ncoa: false - date_created: '2017-09-05T17:47:53.767Z' - date_modified: '2017-09-05T17:47:53.767Z' - object: campaign + $ref: '#/components/schemas/card' + examples: + basic: + value: + id: card_7a6d73c5c8457fc + account_id: fa9ea650fc7b31a89f92 + description: Test card + 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: '2021-03-24T22:51:42.838Z' + date_modified: '2021-03-24T22:51:42.838Z' + send_date: '2021-03-24T22:51:42.838Z' + object: card default: - $ref: '#/components/responses/campaigns_error' + $ref: '#/components/responses/mailpiece_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/campaigns/cmp_e05ee61ff80764b \ + curl https://api.lob.com/v1/cards/card_7a6d73c5c8457fc \ -u : label: CURL + - lang: Typescript + source: | + try { + const card = await new CardsApi(config).get('card_xxxx'); + } catch (err: any) { + console.error(err); + } + label: TYPESCRIPT + - lang: Javascript + source: | + Lob.cards.retrieve('card_7a6d73c5c8457fc', function (err, res) { + console.log(err, res); + }); + label: NODE + - lang: Python + source: | + with ApiClient(configuration) as api_client: + api = CardsApi(api_client) + + try: + card = api.get("card_7a6d73c5c8457fc") + except ApiException as e: + print(e) + label: PYTHON + - lang: PHP + source: | + $lob->cards()->get('card_7a6d73c5c8457fc'); + label: PHP + - lang: CSharp + source: | + CardsApi api = new CardsApi(config); + + try { + Card response = api.get("card_7a6d73c5c8457fc"); + } catch (ApiException e) { + Console.WriteLine(e.ToString()); + } + label: CSHARP - lang: Ruby source: | - campaignApi = CampaignsApi.new(config) + cardApi = CardsApi.new(config) begin - retrievedCampaign = campaignApi.get("cmp_e05ee61ff80764b") + retrievedCard = cardApi.get("card_7a6d73c5c8457fc") rescue => err p err.message end label: RUBY - patch: - operationId: campaign_update + - lang: Go + source: | + var context = context.Background() + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) + + var apiClient = *lob.NewAPIClient(configuration) + + fetchedCard, _, err := apiClient.CardsApi.Get(context,"card_7a6d73c5c8457fc").Execute() + + if err != nil { + return err + } + label: GO + post: + operationId: card_update summary: Update - description: >- - Update the details of an existing campaign. You need only supply the - unique identifier that was returned upon campaign creation. + description: Update the details of an existing card. You need only supply the unique identifier that was returned upon card creation. tags: - - Campaigns + - Cards requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/campaign_updatable' + $ref: '#/components/schemas/card_updatable' example: - description: Test campaign + description: Test card + auto_reorder: true application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/campaign_updatable' - example: - description: Test campaign - multipart/form-data: - schema: - $ref: '#/components/schemas/campaign_updatable' + $ref: '#/components/schemas/card_updatable' example: - description: Test campaign - responses: - '200': - description: Returns a campaign object - content: - application/json: - schema: - $ref: '#/components/schemas/campaign' - example: - id: cmp_e05ee61ff80764b - billing_group_id: bg_fe3079dcdd80e5ae - name: My Campaign - description: My Campaign's description - schedule_type: immediate - cancel_window_campaign_minutes: 60 - metadata: {} - use_type: marketing - is_draft: true - deleted: false - creatives: [] - uploads: [] - auto_cancel_if_ncoa: false - date_created: '2017-09-05T17:47:53.767Z' - date_modified: '2017-09-05T17:47:53.767Z' - object: campaign + description: Test card + auto_reorder: true + multipart/form-data: + schema: + $ref: '#/components/schemas/card_updatable' + example: + description: Test card + auto_reorder: true + responses: + '200': + description: Returns a card object + content: + application/json: + schema: + $ref: '#/components/schemas/card' + examples: + basic: + value: + id: card_7a6d73c5c8457fc + account_id: fa9ea650fc7b31a89f92 + description: Test card + 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: '2021-03-24T22:51:42.838Z' + date_modified: '2021-03-24T22:51:42.838Z' + send_date: '2021-03-24T22:51:42.838Z' + object: card default: - $ref: '#/components/responses/campaigns_error' + $ref: '#/components/responses/mailpiece_error' x-codeSamples: - lang: Shell source: | - curl -X PATCH https://api.lob.com/v1/campaigns/cmp_e05ee61ff80764b \ + curl -X POST https://api.lob.com/v1/cards/card_7a6d73c5c8457fc \ -u : \ - -d "description=Awesome campaign" + -d "description=Awesome card" \ + -d "auto_reorder=true" label: CURL + - lang: Typescript + source: | + const cardUpdatable = new CardEditable ({ + description: 'Awesome card', + auto_reorder: true + }); + + try { + await new CardsApi(config).update(cardUpdatable); + } catch (err: any) { + console.error(err); + } + label: TYPESCRIPT + - lang: Javascript + source: | + Lob.cards.update('card_7a6d73c5c8457fc', { + description: 'Awesome card', + auto_reorder: true + }, function (err, res) { + console.log(err, res); + }); + label: NODE + - lang: CSharp + source: | + CardsApi api = new CardsApi(config); + CardUpdatable update = new CardUpdatable("Awesome card", true, 15000); + + try { + api.update("card_6afffd19045076c", update); + } catch (ApiException e) { + Console.WriteLine(e.ToString()); + } + label: CSHARP - lang: Python source: | - campaign_updatable = CampaignUpdatable( - description = "Awesome campaign", + card_updatable = CardUpdatable( + description = "Awesome card", + auto_reorder = True, + reorder_quantity = 10000, ) with ApiClient(configuration) as api_client: - api = CampaignsApi(api_client) + api = CardsApi(api_client) try: - updated_campaign = api.update("cmp_e05ee61ff80764b", campaign_updatable) + updated_card = api.update("card_6afffd19045076c", card_updatable) except ApiException as e: print(e) label: PYTHON - lang: Ruby source: | - campaignUpdatable = CampaignUpdatable.new({ - description: "Awesome campaign", + cardUpdatable = CardUpdatable.new({ + description: "Awesome card", + auto_reorder: "true", + reorder_quantity: 10000, }) - campaignApi = CampaignsApi.new(config) + cardApi = CardsApi.new(config) begin - updatedCampaign = campaignApi.update("cmp_e05ee61ff80764b", campaignUpdatable) + updatedCard = cardApi.update("card_6afffd19045076c", cardUpdatable) rescue => err p err.message end label: RUBY + - lang: Go + source: | + var context = context.Background() + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) + + var apiClient = *lob.NewAPIClient(configuration) + + cardEditable = *lob.NewCardEditable("https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf()") + createdCard, _, _ := apiClient.CardsApi.Create(context).CardEditable(suite.cardEditable).Execute() + var updatedCard = *lob.NewCardUpdatable() + updatedCard.SetDescription("Card was updated") + + resp, _, err := suite.apiClient.CardsApi.Update(context, createdCard.Id).CardUpdatable(updatedCard).Execute() + + if err != nil { + return err + } + label: GO delete: - operationId: campaign_delete + operationId: card_delete summary: 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. + description: Delete an existing card. You need only supply the unique identifier that was returned upon card creation. tags: - - Campaigns + - Cards responses: '200': - $ref: '#/components/responses/campaign_deleted' + $ref: '#/components/responses/card_deleted' default: - $ref: '#/components/responses/campaigns_error' + $ref: '#/components/responses/mailpiece_error' x-codeSamples: - lang: Shell - source: > - curl -X DELETE https://api.lob.com/v1/campaigns/cmp_e05ee61ff80764b - \ + source: | + curl -X DELETE https://api.lob.com/v1/cards/card_7a6d73c5c8457fc \ -u : label: CURL + - lang: Typescript + source: | + try { + const deleteCard = await new CardsApi(config).delete('card_xxxx'); + } catch (err: any) { + console.error(err); + } + label: TYPESCRIPT + - lang: Javascript + source: | + Lob.cards.delete('card_7a6d73c5c8457fc', function (err, res) { + console.log(err, res); + }); + label: NODE + - lang: Python + source: | + with ApiClient(configuration) as api_client: + api = CardsApi(api_client) + + try: + deleted_resource = api.delete("card_6afffd19045076c") + except ApiException as e: + print(e) + label: PYTHON + - lang: PHP + source: | + $lob->cards()->delete('card_7a6d73c5c8457fc'); + label: PHP + - lang: CSharp + source: | + CardsApi api = new CardsApi(config); + + try { + CardDeletion response = api.delete("card_6afffd19045076c"); + } catch (ApiException e) { + Console.WriteLine(e.ToString()); + } + label: CSHARP - lang: Ruby source: | - campaignApi = CampaignsApi.new(config) + cardApi = CardsApi.new(config) begin - deletedCampaign = campaignApi.delete("cmp_e05ee61ff80764b") + deletedCard = cardApi.delete("card_6afffd19045076c") rescue => err p err.message end label: RUBY - /campaigns/{cmp_id}/send: + - lang: Go + source: | + var context = context.Background() + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) + + var apiClient = *lob.NewAPIClient(configuration) + + deletedCard, _, err := apiClient.CardsApi.Delete(context, "card_6afffd19045076c").Execute() + + if err != nil { + return err + } + label: GO + /cards/{card_id}/orders: parameters: - in: path - name: cmp_id - description: id of the campaign + name: card_id + description: The ID of the card to which the card orders belong. required: true schema: - $ref: '#/components/schemas/cmp_id' - post: - operationId: campaign_send - summary: Send Campaign - description: >- - Sends a campaign. You need only supply the unique campaign identifier - that was returned upon campaign creation. - tags: - - Campaigns - responses: - '200': - description: Returns a campaign object - content: - application/json: - schema: - $ref: '#/components/schemas/campaign' - example: - id: cmp_e05ee61ff80764b - billing_group_id: bg_fe3079dcdd80e5ae - name: My Campaign - description: My Campaign's description - schedule_type: immediate - cancel_window_campaign_minutes: 60 - metadata: {} - use_type: marketing - is_draft: true - deleted: false - creatives: [] - uploads: [] - auto_cancel_if_ncoa: false - date_created: '2017-09-05T17:47:53.767Z' - date_modified: '2017-09-05T17:47:53.767Z' - object: campaign - default: - $ref: '#/components/responses/campaigns_error' - x-codeSamples: - - lang: Shell - source: | - curl https://api.lob.com/v1/campaigns/cmp_e05ee61ff80764b/send \ - -u : - label: CURL - /cards: + $ref: '#/components/schemas/card_id' get: - operationId: cards_list - summary: List - description: >- - Returns a list of your cards. The cards are returned sorted by creation - date, with the most recently created addresses appearing first. + operationId: card_orders_retrieve + summary: Retrieve + description: Retrieves the card orders associated with the given card id. tags: - - Cards + - Card Orders parameters: - $ref: '#/components/parameters/limit' - - $ref: '#/components/parameters/before_after' - - $ref: '#/components/parameters/include' + - $ref: '#/components/parameters/offset' responses: '200': - description: Returns a list of card objects + description: Returns the card orders associated with the given card id content: application/json: schema: @@ -17054,1815 +6431,1739 @@ paths: properties: data: type: array - description: list of cards + description: List of card orders items: - $ref: '#/components/schemas/card' + $ref: '#/components/schemas/card_order' example: data: - - id: card_7a6d73c5c8457fc - 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 - available_quantity: 10000 - pending_quantity: 0 - countries: null - status: rendered - mode: test - orientation: horizontal - threshold_amount: 0 - date_created: '2021-03-24T22:51:42.838Z' - date_modified: '2021-03-24T22:51:42.838Z' - send_date: '2021-03-24T22:51:42.838Z' - object: card + - id: co_e0f8a0562a06bea7f + card_id: card_6afffd19045076c + status: available + inventory: 9500 + quantity_ordered: 10000 + unit_price: 0.75 + cancelled_reason: No longer needed + availability_date: '2021-10-12T21:41:48.326Z' + expected_availability_date: '2021-11-04T21:03:18.871Z' + date_created: '2021-10-07T21:03:18.871Z' + date_modified: '2021-10-16T01:00:30.144Z' + object: card_order object: list - previous_url: null next_url: null + previous_url: null count: 1 default: - $ref: '#/components/responses/mailpiece_error' + $ref: '#/components/responses/card_order_error' x-codeSamples: - lang: Shell source: | - curl -X GET "https://api.lob.com/v1/cards?limit=2" \ + curl https://api.lob.com/v1/cards/card_6afffd19045076c/orders/ \ -u : label: CURL - lang: Typescript source: | try { - const cards = await new CardsApi(config).list(2); + const cardOrders = await new CardOrdersApi(cofig).get( 'co_xxxx' ); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.cards.list({limit: 2}, function (err, res) { + Lob.cardOrders.list('card_6afffd19045076c', function (err, res) { console.log(err, res); }); label: NODE - lang: Python source: | with ApiClient(configuration) as api_client: - api = CardsApi(api_client) + api = CardOrdersApi(api_client) try: - cards = api.list(limit=2) + card_order = api.get("card_6afffd19045076c", limit = 2, offset = 1) except ApiException as e: print(e) label: PYTHON - lang: PHP source: | - $lob->cards()->all(array( - 'limit' => 2 - )); + $lob->cardOrders('card_6afffd19045076c')->all(); - lang: CSharp source: | - CardsApi api = new CardsApi(config); - List includeList = new List(); - includeList.Add("total_count"); + CardOrdersApi api = new CardOrdersApi(config); try { - CardList response = api.list( - 2, // limit - null, // before - null, // after - includeList // include - ); + CardOrderList response = api.get("card_6afffd19045076c", 2, 1); } catch (ApiException e) { Console.WriteLine(e.ToString()); } label: CSHARP - lang: Ruby source: | - cardsApi = CardsApi.new(config) + cardOrderApi = CardOrdersApi.new(config) begin - cards = cardsApi.list({ limit: 2 }) + retrievedCardOrderList = cardOrderApi.get("card_6afffd19045076c", { limit: 2, offset: 1 }) rescue => err p err.message end label: RUBY - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - CardList = apiClient.CardsApi.List(context).Execute() + fetchedCardOrderList, _, err := apiClient.CardOrdersApi.Get(context, "card_6afffd19045076c").Execute() if err != nil { return err } label: GO post: - operationId: card_create + operationId: card_order_create summary: Create - description: Creates a new card given information + description: Creates a new card order given information tags: - - Cards + - Card Orders requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/card_editable' + $ref: '#/components/schemas/card_order_editable' example: - description: Test card - front: >- - https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf - back: >- - https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf - size: 2.125x3.375 + quantity: 10000 application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/card_editable' + $ref: '#/components/schemas/card_order_editable' example: - description: Test card - front: >- - https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf - back: >- - https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf - size: 2.125x3.375 + quantity: 10000 multipart/form-data: schema: - $ref: '#/components/schemas/card_editable' + $ref: '#/components/schemas/card_order_editable' example: - description: Test card - front: >- - https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf - back: >- - https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf - size: 2.125x3.375 + quantity: 10000 responses: '200': - description: Card created successfully + description: Card order created successfully content: application/json: schema: - $ref: '#/components/schemas/card' + $ref: '#/components/schemas/card_order' examples: basic: value: - id: card_7a6d73c5c8457fc - account_id: fa9ea650fc7b31a89f92 - description: Test card - 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: '2021-03-24T22:51:42.838Z' - date_modified: '2021-03-24T22:51:42.838Z' - send_date: '2021-03-24T22:51:42.838Z' - object: card + id: co_e0f8a0562a06bea7f + card_id: card_6afffd19045076c + status: available + inventory: 9500 + quantity_ordered: 10000 + unit_price: 0.75 + cancelled_reason: No longer needed + availability_date: '2021-10-12T21:41:48.326Z' + expected_availability_date: '2021-11-04T21:03:18.871Z' + date_created: '2021-10-07T21:03:18.871Z' + date_modified: '2021-10-16T01:00:30.144Z' + object: card_order default: $ref: '#/components/responses/mailpiece_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/cards \ + curl https://api.lob.com/v1/cards/card_6afffd19045076c/orders \ -u : \ - -d "description=Test card" \ - -d "front=https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf" \ - -d "back=https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf" \ - -d "size=2.125x3.375" + -d "quantity=10000" label: CURL - lang: Typescript source: | - const cardsCreate = new CardEditable({ - front: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf', - back: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf', - size: CardEditableSizeEnum._2125x3375, - description: 'Test card' + const cardForCreate = new CardOrderEditable({ + quantity: 200 }); try { - const myCard = await new CardsApi(config).create(cardsCreate); + const myCardOrder = await new CardOrdersApi(config).create('card_xxxx', cardForCreate); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.cards.create({ - description: 'Test card', - front: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf', - back: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf', - size: '2.125x3.375' + Lob.cardOrders.create('card_6afffd19045076c', { + quantity: 10000 }, function (err, res) { console.log(err, res); }); label: NODE - lang: Python source: | - card_editable = CardEditable( - front = "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf", - back = "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf", - size = "2.125x3.375", - description = "Test Card", + card_order_editable = CardOrderEditable( + quantity = 10000, ) with ApiClient(configuration) as api_client: - api = CardsApi(api_client) + api = CardOrdersApi(api_client) try: - created_card = api.create(card_editable) + created_card_order = api.create("card_6afffd19045076c", card_order_editable) except ApiException as e: print(e) label: PYTHON - lang: PHP source: | - $lob->cards()->create(array( - 'description' => 'Test card', - 'front' => 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf', - 'back' => 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf', - 'size' => => '2.125x3.375' + $lob->cardOrders('card_6afffd19045076c')->create(array( + 'quantity' => 10000 )); - label: PHP - lang: CSharp source: | - CardsApi api = new CardsApi(config); + CardOrdersApi api = new CardOrdersApi(config); - CardEditable cardEditable = new CardEditable( - "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf", // front - "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf", // back - CardEditable.SizeEnum._2125x3375, // size - "Test Card" // description + CardOrderEditable cardOrderEditable = new CardOrderEditable( + 10000 // quantity ); try { - Card result = api.create(cardEditable); + CardOrder result = api.create("card_6afffd19045076c", cardOrderEditable); } catch (ApiException e) { Console.WriteLine(e.ToString()); } label: CSHARP - lang: Ruby source: | - cardCreate = CardEditable.new({ - front: "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf", - back: "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf", - size: "2.125x3.375", - description: "Test Card", + cardOrderCreate = CardOrderEditable.new({ + quantity: 10000, }); - cardApi = CardsApi.new(config) + cardOrderApi = CardOrdersApi.new(config) begin - createdCard = cardApi.create(cardCreate) + createdCardOrder = cardOrderApi.create("card_6afffd19045076c", cardOrderCreate) rescue => err p err.message end label: RUBY - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - - var cardCreate = *lob.NewCardEditable() - - cardCreate.SetFront("https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf") - - cardCreate.SetBack("https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf") - - cardCreate.SetSize("2.125x3.375") - - cardCreate.SetDescription("Test Card") - - + var cardOrderCreate = *lob.NewCardOrderEditable() + cardOrderCreate.SetQuantity("10000") - createdcard, _, err := - apiClient.CardsApi.Create(context).CardEditable(cardCreate).Execute() + createdcardOrder, _, err := apiClient.CardOrdersApi.Create(context, "card_6afffd19045076c").CardOrderEditable(cardOrderCreate).Execute() if err != nil { return err } label: GO - /cards/{card_id}: - parameters: - - in: path - name: card_id - description: id of the card - required: true - schema: - $ref: '#/components/schemas/card_id' + /checks: get: - operationId: card_retrieve - summary: Retrieve - description: >- - Retrieves the details of an existing card. You need only supply the - unique customer identifier that was returned upon card creation. + operationId: checks_list + summary: List + description: Returns a list of your checks. The checks are returned sorted by creation date, with the most recently created checks appearing first. tags: - - Cards + - Checks + 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': - description: Returns a card object - content: - application/json: - schema: - $ref: '#/components/schemas/card' - examples: - basic: - value: - id: card_7a6d73c5c8457fc - account_id: fa9ea650fc7b31a89f92 - description: Test card - 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: '2021-03-24T22:51:42.838Z' - date_modified: '2021-03-24T22:51:42.838Z' - send_date: '2021-03-24T22:51:42.838Z' - object: card + $ref: '#/components/responses/all_checks' default: $ref: '#/components/responses/mailpiece_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/cards/card_7a6d73c5c8457fc \ - -u : + curl -X GET "https://api.lob.com/v1/checks?limit=2" \ + -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: label: CURL - - lang: Typescript + - lang: typescript source: | try { - const card = await new CardsApi(config).get('card_xxxx'); + const checks = await new ChecksApi(config).list(2); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.cards.retrieve('card_7a6d73c5c8457fc', function (err, res) { + Lob.checks.list({limit: 2}, function (err, res) { console.log(err, res); }); label: NODE + - lang: Ruby + source: | + checksApi = ChecksApi.new(config) + + begin + checks = checksApi.list({ limit: 2 }) + rescue => err + p err.message + end + label: RUBY - lang: Python source: | with ApiClient(configuration) as api_client: - api = CardsApi(api_client) + api = ChecksApi(api_client) try: - card = api.get("card_7a6d73c5c8457fc") + checks = api.list(limit=2) except ApiException as e: print(e) label: PYTHON - lang: PHP source: | - $lob->cards()->get('card_7a6d73c5c8457fc'); - label: PHP + $apiInstance = new OpenAPI\Client\Api\ChecksApi($config, new GuzzleHttp\Client()); + + try { + $result = $apiInstance->list( + 2, // limit + ); + } catch (Exception $e) { + echo $e->getMessage(), PHP_EOL; + } + - lang: Java + source: | + ChecksApi apiInstance = new ChecksApi(config); + + try { + CheckList response = apiInstance.list( + 2, // limit + null, // before + null, // after + null, // include + null, // dateCreated + null, // metadata + null, // scheduled + null, // sendDate + null, // mailType + null // sortBy + ); + } catch (ApiException e) { + e.printStackTrace(); + } + label: JAVA + - lang: Elixir + source: | + Lob.Check.list(%{limit: 2}) + label: ELIXIR - lang: CSharp source: | - CardsApi api = new CardsApi(config); + ChecksApi api = new ChecksApi(config); + + List includeList = new List(); + includeList.Add("total_count"); + Dictionary metadata = new Dictionary(); + metadata.Add("name", "Harry"); + Dictionary dateCreated = new Dictionary(); + DateTime dateCreatedDate = DateTime.Today.AddMonths(-1); + dateCreated.Add("lt", dateCreatedDate); + Dictionary sendDate = new Dictionary(); + sendDate.Add("lt", DateTime.Now.ToString("yyyy-MM-ddTHH\\:mm\\:ss.fffffffzzz")); + SortBy3 sortBy = new SortBy3(SortBy3.DateCreatedEnum.Asc); try { - Card response = api.get("card_7a6d73c5c8457fc"); + CheckList response = api.list( + 2, // limit + null, // before + null, // after + includeList, // include + dateCreated, // dateCreated + metadata, // metadata + true, // scheduled + sendDate, // sendDate + MailType.FirstClass, // mailType + sortBy // sortBy + ); } catch (ApiException e) { Console.WriteLine(e.ToString()); } label: CSHARP - - lang: Ruby - source: | - cardApi = CardsApi.new(config) - - begin - retrievedCard = cardApi.get("card_7a6d73c5c8457fc") - rescue => err - p err.message - end - label: RUBY - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - - - fetchedCard, _, err := - apiClient.CardsApi.Get(context,"card_7a6d73c5c8457fc").Execute() - - + CheckList = apiClient.ChecksApi.List(context).Execute() if err != nil { return err } label: GO post: - operationId: card_update - summary: Update - description: >- - Update the details of an existing card. You need only supply the unique - identifier that was returned upon card creation. + operationId: check_create + summary: Create + description: Creates a new check with the provided properties. tags: - - Cards + - Checks + parameters: + - $ref: '#/components/parameters/idem-header' + - $ref: '#/components/parameters/idem-query' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/card_updatable' + $ref: '#/components/schemas/check_editable' example: - description: Test card - auto_reorder: true + description: Demo Check + to: + description: Harry - Office + name: Harry Zhang + company: Lob + email: harry@lob.com + phone: '5555555555' + address_line1: 210 King St + address_line2: '# 6100' + address_city: San Francisco + address_state: CA + address_zip: '94107' + address_country: US + from: + name: Leore Avidar + address_line1: 210 King St + address_line2: '# 6100' + address_city: San Francisco + address_state: CA + address_zip: 94107-1741 + bank_account: bank_8cad8df5354d33f + amount: 22.5 + memo: rent + logo: https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png + check_bottom: tmpl_23668b406d5afef + merge_variables: + name: Harry + metadata: + memo: rafting trip + attachment: ./cool.pdf + send_date: '2017-11-01T00:00:00.000Z' + use_type: operational + mail_type: usps_first_class + check_number: 10001 application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/card_updatable' + $ref: '#/components/schemas/check_editable' example: - description: Test card - auto_reorder: true + description: Demo Check + to: + description: Harry - Office + name: Harry Zhang + company: Lob + email: harry@lob.com + phone: '5555555555' + address_line1: 210 King St + address_line2: '# 6100' + address_city: San Francisco + address_state: CA + address_zip: '94107' + address_country: US + from: + name: Leore Avidar + address_line1: 210 King St + address_line2: '# 6100' + address_city: San Francisco + address_state: CA + address_zip: 94107-1741 + bank_account: bank_8cad8df5354d33f + amount: 22.5 + memo: rent + logo: https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png + check_bottom: tmpl_23668b406d5afef + merge_variables: + name: Harry + metadata: + memo: rafting trip + attachment: ./cool.pdf + send_date: '2017-11-01T00:00:00.000Z' + mail_type: usps_first_class + check_number: 10001 + encoding: + to: + style: deepObject + explode: true + from: + style: deepObject + explode: true + merge_variables: + style: deepObject + explode: true + metadata: + style: deepObject + explode: true multipart/form-data: schema: - $ref: '#/components/schemas/card_updatable' + $ref: '#/components/schemas/check_editable' example: - description: Test card - auto_reorder: true + description: Demo Check + to: + description: Harry - Office + name: Harry Zhang + company: Lob + email: harry@lob.com + phone: '5555555555' + address_line1: 210 King St + address_line2: '# 6100' + address_city: San Francisco + address_state: CA + address_zip: '94107' + address_country: US + from: + name: Leore Avidar + address_line1: 210 King St + address_line2: '# 6100' + address_city: San Francisco + address_state: CA + address_zip: 94107-1741 + bank_account: bank_8cad8df5354d33f + amount: 22.5 + memo: rent + logo: https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png + check_bottom: tmpl_23668b406d5afef + merge_variables: + name: Harry + metadata: + memo: rafting trip + attachment: ./cool.pdf + send_date: '2017-11-01T00:00:00.000Z' + use_type: operational + mail_type: usps_first_class + check_number: 10001 + encoding: + logo: + contentType: image/png, image/jpeg responses: '200': - description: Returns a card object - content: - application/json: - schema: - $ref: '#/components/schemas/card' - examples: - basic: - value: - id: card_7a6d73c5c8457fc - account_id: fa9ea650fc7b31a89f92 - description: Test card - 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: '2021-03-24T22:51:42.838Z' - date_modified: '2021-03-24T22:51:42.838Z' - send_date: '2021-03-24T22:51:42.838Z' - object: card + $ref: '#/components/responses/post_check' default: $ref: '#/components/responses/mailpiece_error' x-codeSamples: - lang: Shell source: | - curl -X POST https://api.lob.com/v1/cards/card_7a6d73c5c8457fc \ - -u : \ - -d "description=Awesome card" \ - -d "auto_reorder=true" + curl https://api.lob.com/v1/checks \ + -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \ + -d 'description=Demo Check' \ + -d 'to[name]=Harry Zhang' \ + -d 'to[address_line1]=210 King St' \ + -d 'to[address_line2]=# 6100' \ + -d 'to[address_city]=San Francisco' \ + -d 'to[address_state]=CA' \ + -d 'to[address_zip]=94107' \ + -d 'from=adr_210a8d4b0b76d77b' \ + -d 'bank_account=bank_8cad8df5354d33f' \ + -d 'amount=22.50' \ + -d 'use_type=operational' \ + -d 'memo=rent' \ + --data-urlencode 'logo=https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png' \ + --data-urlencode 'check_bottom=

Demo Check for {{name}}

' \ + -d 'merge_variables[name]=Harry' label: CURL - lang: Typescript source: | - const cardUpdatable = new CardEditable ({ - description: 'Awesome card', - auto_reorder: true + const checkCreate = new CheckEditable({ + to: new AddressEditable({ + name: 'Harry Zhang', + address_line1: '210 King St', + address_line2: '# 6100', + address_city: 'San Francisco', + address_state: 'CA', + address_zip: '94107', + }), + from: 'adr_xxxx', + bank_account: 'bank_xxxx', + amount: 100, + use_type: 'operational' }); try { - await new CardsApi(config).update(cardUpdatable); + const myCheck = await new ChecksApi(config).create(checkCreate); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.cards.update('card_7a6d73c5c8457fc', { - description: 'Awesome card', - auto_reorder: true + Lob.checks.create({ + description: 'Demo Check', + bank_account: 'bank_8cad8df5354d33f', + to: { + name: 'Harry Zhang', + address_line1: '210 King St', + address_line2: '# 6100', + address_city: 'San Francisco', + address_state: 'CA', + address_zip: '94107' + }, + from: 'adr_210a8d4b0b76d77b', + amount: 22.50, + use_type: 'operational', + memo: 'rent', + logo: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png', + check_bottom: '

Demo Check for {{name}}

', + merge_variables: { + name: 'Harry' + } }, function (err, res) { console.log(err, res); }); label: NODE - - lang: CSharp - source: > - CardsApi api = new CardsApi(config); - - CardUpdatable update = new CardUpdatable("Awesome card", true, - 15000); + - lang: Ruby + source: | + checkCreate = CheckEditable.new({ + description: "Demo Check", + bank_account: "bank_8cad8df5354d33f", + amount: 22.5, + memo: "rent", + logo: "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png", + check_bottom: "

Demo Check for {{name}}

", + from: "adr_210a8d4b0b76d77b", + to: AddressDomestic.new({ + name: "Harry Zhang", + address_line1: "210 King St", + address_line2: "# 6100", + address_city: "San Francisco", + address_state: "CA", + address_zip: "94107", + }), + merge_variables: { + name: "Harry" + }, + use_type: "operational" + }); + checkApi = ChecksApi.new(config) - try { - api.update("card_6afffd19045076c", update); - } catch (ApiException e) { - Console.WriteLine(e.ToString()); - } - label: CSHARP + begin + createdCheck = checkApi.create(checkCreate) + rescue => err + p err.message + end + label: RUBY - lang: Python source: | - card_updatable = CardUpdatable( - description = "Awesome card", - auto_reorder = True, - reorder_quantity = 10000, + check_editable = CheckEditable( + description = "Demo Check", + bank_account = "bank_8cad8df5354d33f", + amount = 22.5, + memo = "rent", + logo = "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png", + check_bottom = "

Demo Check for {{name}}

", + _from = "adr_210a8d4b0b76d77b", + to = AddressDomestic( + name = "Harry Zhang", + address_line1 = "210 King St", + address_line2 = "# 6100", + address_city = "San Francisco", + address_state = "CA", + address_zip = "94107", + ), + merge_variables = MergeVariables( + name = "Harry", + ), + use_type = "operational" ) with ApiClient(configuration) as api_client: - api = CardsApi(api_client) + api = ChecksApi(api_client) try: - updated_card = api.update("card_6afffd19045076c", card_updatable) + created_check = api.create(check_editable) except ApiException as e: print(e) label: PYTHON - - lang: Ruby + - lang: PHP source: | - cardUpdatable = CardUpdatable.new({ - description: "Awesome card", - auto_reorder: "true", - reorder_quantity: 10000, - }) + $to = new OpenAPI\Client\Model\AddressEditable( + array( + "name" => "Harry Zhang", + "address_line1" => "210 King St", + "address_line2" => "# 6100", + "address_city" => "San Francisco", + "address_state" => "CA", + "address_zip" => "94107", + ) + ); - cardApi = CardsApi.new(config) + $merge_variables = new stdClass; + $merge_variables->name = "Harry"; - begin - updatedCard = cardApi.update("card_6afffd19045076c", cardUpdatable) - rescue => err - p err.message - end - label: RUBY - - lang: Go - source: > - var context = context.Background() + $use_type = "operational"; + + $apiInstance = new OpenAPI\Client\Api\ChecksApi($config, new GuzzleHttp\Client()); + $check_editable = new OpenAPI\Client\Model\CheckEditable( + array( + "description" => "Demo Check", + "bank_account" => "bank_8cad8df5354d33f", + "amount" => "22.5", + "memo" => "rent", + "logo" => "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png", + "check_bottom" => "

Demo Check for {{name}}

", + "from" => "adr_210a8d4b0b76d77b", + "to" => $to, + "merge_variables" => $merge_variables, + "use_type" => $use_type + ) + ); + + try { + $result = $apiInstance->create($check_editable); + } catch (Exception $e) { + echo $e->getMessage(), PHP_EOL; + } + - lang: Java + source: | + Map merge_variables = new HashMap(); + merge_variables.put("name", "Harry"); - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) + ChecksApi apiInstance = new ChecksApi(config); + AddressEditable to = new AddressEditable(); + to.setName("Harry Zhang"); + to.setAddressLine1("210 King St"); + to.setAddressLine2("# 6100"); + to.setAddressCity("San Francisco"); + to.setAddressState("CA"); + to.setAddressZip("94107"); - var apiClient = *lob.NewAPIClient(configuration) + try { + CheckEditable checkEditable = new CheckEditable(); + checkEditable.setDescription("Demo Check"); + checkEditable.setBankAccount("bank_8cad8df5354d33f"); + checkEditable.setAmount(22.5f); + checkEditable.setMemo("rent"); + checkEditable.setLogo("https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png"); + checkEditable.setCheckBottom("

Demo Check for {{name}}

"); + checkEditable.setFrom("adr_210a8d4b0b76d77b"); + checkEditable.setTo(to); + checkEditable.setMergeVariables(merge_variables); + checkEditable.setUseType("operational"); + + Check result = apiInstance.create(checkEditable, null); + } catch (ApiException e) { + e.printStackTrace(); + } + label: JAVA + - lang: Elixir + source: | + Lob.Check.create(%{ + description: 'Demo Check', + bank_account: 'bank_8cad8df5354d33f', + to: %{ + name: 'Harry Zhang', + address_line1: '210 King St', + address_line2: '# 6100', + address_city: 'San Francisco', + address_state: 'CA', + address_zip: '94107' + }, + from: 'adr_210a8d4b0b76d77b', + amount: 22.50, + memo: 'rent', + logo: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png', + check_bottom: '

Demo Check for {{name}}

', + merge_variables: %{ + name: 'Harry' + }, + use_type: 'operational' + }) + label: ELIXIR + - lang: CSharp + source: | + Dictionary mergeVariables = new Dictionary(); + mergeVariables.Add("name", "Harry"); + + ChecksApi api = new ChecksApi(config); + AddressEditable to = new AddressEditable( + "210 King St", // addressLine1 + "# 6100", // addressLine2 + "San Francisco", // addressCity + "CA", // addressState + "94107", // addressZip + default(CountryExtended), // addressCounty + "", // description + "Harry Zhang" // name + ); - cardEditable = - *lob.NewCardEditable("https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf()") + CheckEditable checkEditable = new CheckEditable( + "adr_249af768103d2810", // from + to.ToJson(), // to + "bank_8cad8df5354d33f", // bank_account + 22.5f, // amount + "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png", // logo + "

Demo Check for {{name}}

", // checkBottom + default(string), // attachment + "Demo Check", // description + default(Dictionary), // metadata + mergeVariables, // mergeVariables + default(DateTime), // sendDate + CheckEditable.MailTypeEnum.UspsFirstClass, // mailType + "rent", // memo + "operational" // use_type + ); - createdCard, _, _ := - apiClient.CardsApi.Create(context).CardEditable(suite.cardEditable).Execute() + try { + Check result = api.create(checkEditable, null); + } catch (ApiException e) { + Console.WriteLine(e.ToString()); + } + label: CSHARP + - lang: Go + source: | + var context = context.Background() + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) - var updatedCard = *lob.NewCardUpdatable() + var apiClient = *lob.NewAPIClient(configuration) - updatedCard.SetDescription("Card was updated") + var to = *lob.NewAddressEditable() + to.SetAddressLine1("210 King St") + to.SetAddressLine2("# 6100") + to.SetAddressCity("San Francisco") + to.SetAddressState("CA") + to.SetAddressZip("94107") + to.SetAddressCountry(lob.COUNTRYEXTENDED_US) + to.SetDescription("") + to.SetName("Harry Zhang") + var checkCreate = *lob.NewCheckEditable() + checkCreate.SetDescription("Demo Check") + checkCreate.SetBankAccount("bank_8cad8df5354d33f") + checkCreate.SetAmount(22.5) + checkCreate.SetMemo("rent") + checkCreate.SetLogo("https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png") + checkCreate.SetCheckBottom("

Demo Check for {{name}}

") + checkCreate.SetFrom("adr_210a8d4b0b76d77b") + checkCreate.SetTo(to) - resp, _, err := suite.apiClient.CardsApi.Update(context, - createdCard.Id).CardUpdatable(updatedCard).Execute() + createdcheck, _, err := apiClient.ChecksApi.Create(context).CheckEditable(checkCreate).Execute() if err != nil { return err } label: GO - delete: - operationId: card_delete - summary: Delete - description: >- - Delete an existing card. You need only supply the unique identifier that - was returned upon card creation. + /checks/{chk_id}: + parameters: + - in: path + name: chk_id + description: id of the check + required: true + schema: + $ref: '#/components/schemas/chk_id' + get: + operationId: check_retrieve + summary: Retrieve + description: Retrieves the details of an existing check. You need only supply the unique check identifier that was returned upon check creation. tags: - - Cards + - Checks responses: '200': - $ref: '#/components/responses/card_deleted' + description: Returns a check object + content: + application/json: + schema: + $ref: '#/components/schemas/check' + example: + id: chk_534f10783683daa0 + description: Demo Check + metadata: {} + check_number: 10062 + memo: rent + amount: 22.5 + url: https://lob-assets.com/checks/chk_534f10783683daa0.pdf?expires=1540372221&signature=Ty3IV2bGPEoQfrdraYHlNYTaarnHLXb + to: + id: adr_bae820679f3f536b + description: Harry - Office + name: HARRY ZHANG + company: LOB + email: harry@lob.com + phone: '5555555555' + address_line1: 210 KING ST STE 6100 + address_line2: '' + address_city: SAN FRANCISCO + address_state: CA + address_zip: 94107-1741 + address_country: UNITED STATES + metadata: {} + date_created: '2018-12-08T03:08:43.446Z' + date_modified: '2018-12-08T03:08:43.446Z' + object: address + recipient_moved: false + from: + id: adr_b8fb5acf3a2b55db + name: LEORE AVIDAR + address_line1: 210 KING ST STE 6100 + address_city: SAN FRANCISCO + address_state: CA + address_zip: 94107-1741 + address_country: UNITED STATES + metadata: {} + date_created: '2017-09-05T17:47:53.767Z' + date_modified: '2017-09-05T17:47:53.767Z' + object: address + bank_account: + id: bank_8cad8df5354d33f + description: Test Bank Account + metadata: {} + routing_number: '322271627' + account_number: '123456789' + signatory: John Doe + bank_name: J.P. MORGAN CHASE BANK, N.A. + verified: true + account_type: company + date_created: '2015-11-06T19:24:24.440Z' + date_modified: '2015-11-06T19:41:28.312Z' + object: bank_account + signature_url: https://lob-assets.com/bank-accounts/asd_asdfghjkqwertyui.pdf?expires=1234567890&signature=aksdf + carrier: USPS + tracking_events: [] + thumbnails: + - small: https://lob-assets.com/checks/chk_534f10783683daa0_thumb_small_1.png?expires=1540372221&signature=ShhPpH74wYkNiAj7Il9B6q8ZKkzlGd4 + medium: https://lob-assets.com/checks/chk_534f10783683daa0_thumb_medium_1.png?expires=1540372221&signature=tmIOq6aAyKgzAECp7STj1rvJuMS5Svd + large: https://lob-assets.com/checks/chk_534f10783683daa0_thumb_large_1.png?expires=1540372221&signature=04nLEwE9d2qgQJNgJYWSOgPnU0FZbEv + merge_variables: + name: Harry + expected_delivery_date: '2017-09-12' + mail_type: usps_first_class + date_created: '2017-09-05T17:47:53.896Z' + date_modified: '2017-09-05T17:47:53.896Z' + send_date: '2017-09-05T17:47:53.896Z' + object: check + message: pancakes are good + check_bottom_template_id: tmpl_a + attachment_template_id: tmpl_a + check_bottom_template_version_id: vrsn_a + attachment_template_version_id: vrsn_a + use_type: operational + deleted: true default: $ref: '#/components/responses/mailpiece_error' x-codeSamples: - lang: Shell source: | - curl -X DELETE https://api.lob.com/v1/cards/card_7a6d73c5c8457fc \ - -u : + curl https://api.lob.com/v1/checks/chk_534f10783683daa0 \ + -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: label: CURL - lang: Typescript source: | try { - const deleteCard = await new CardsApi(config).delete('card_xxxx'); + const check = await new ChecksApi(config).get('chk_xxxx'); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.cards.delete('card_7a6d73c5c8457fc', function (err, res) { + Lob.checks.retrieve('chk_534f10783683daa0', function (err, res) { console.log(err, res); }); label: NODE + - lang: Ruby + source: | + checkApi = ChecksApi.new(config) + + begin + retrievedCheck = checkApi.get("chk_534f10783683daa0") + rescue => err + p err.message + end + label: RUBY - lang: Python source: | with ApiClient(configuration) as api_client: - api = CardsApi(api_client) + api = ChecksApi(api_client) try: - deleted_resource = api.delete("card_6afffd19045076c") + check = api.get("chk_534f10783683daa0") except ApiException as e: print(e) label: PYTHON - lang: PHP source: | - $lob->cards()->delete('card_7a6d73c5c8457fc'); - label: PHP + $apiInstance = new OpenAPI\Client\Api\ChecksApi($config, new GuzzleHttp\Client()); + + try { + $result = $apiInstance->get("chk_534f10783683daa0"); + } catch (Exception $e) { + echo $e->getMessage(), PHP_EOL; + } + - lang: Java + source: | + ChecksApi apiInstance = new ChecksApi(config); + + try { + Check response = apiInstance.get("chk_534f10783683daa0"); + } catch (ApiException e) { + e.printStackTrace(); + } + label: JAVA + - lang: Elixir + source: | + Lob.Check.find("chk_534f10783683daa0") + label: ELIXIR - lang: CSharp source: | - CardsApi api = new CardsApi(config); + ChecksApi api = new ChecksApi(config); try { - CardDeletion response = api.delete("card_6afffd19045076c"); + Check response = api.get("chk_534f10783683daa0"); } catch (ApiException e) { Console.WriteLine(e.ToString()); } label: CSHARP - - lang: Ruby - source: | - cardApi = CardsApi.new(config) - - begin - deletedCard = cardApi.delete("card_6afffd19045076c") - rescue => err - p err.message - end - label: RUBY - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - - deletedCard, _, err := apiClient.CardsApi.Delete(context, - "card_6afffd19045076c").Execute() - + fetchedCheck, _, err := apiClient.ChecksApi.Get(context,"chk_534f10783683daa0").Execute() if err != nil { return err } label: GO - /cards/{card_id}/orders: - parameters: - - in: path - name: card_id - description: The ID of the card to which the card orders belong. - required: true - schema: - $ref: '#/components/schemas/card_id' - get: - operationId: card_orders_retrieve - summary: Retrieve - description: Retrieves the card orders associated with the given card id. + delete: + operationId: check_cancel + summary: Cancel + 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 Print & Mail Edition to gain access. tags: - - Card Orders - parameters: - - $ref: '#/components/parameters/limit' - - $ref: '#/components/parameters/offset' + - Checks responses: '200': - description: Returns the card orders associated with the given card id - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/list' - - type: object - properties: - data: - type: array - description: List of card orders - items: - $ref: '#/components/schemas/card_order' - example: - data: - - id: co_e0f8a0562a06bea7f - card_id: card_6afffd19045076c - status: available - inventory: 9500 - quantity_ordered: 10000 - unit_price: 0.75 - cancelled_reason: No longer needed - availability_date: '2021-10-12T21:41:48.326Z' - expected_availability_date: '2021-11-04T21:03:18.871Z' - date_created: '2021-10-07T21:03:18.871Z' - date_modified: '2021-10-16T01:00:30.144Z' - object: card_order - object: list - next_url: null - previous_url: null - count: 1 + $ref: '#/components/responses/check_canceled' default: - $ref: '#/components/responses/card_order_error' + $ref: '#/components/responses/mailpiece_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/cards/card_6afffd19045076c/orders/ \ - -u : + curl -X DELETE https://api.lob.com/v1/checks/chk_534f10783683daa0 \ + -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: label: CURL - lang: Typescript source: | try { - const cardOrders = await new CardOrdersApi(cofig).get( 'co_xxxx' ); + const deleteCheck = await new ChecksApi(config).delete('chk_xxxx'); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.cardOrders.list('card_6afffd19045076c', function (err, res) { + Lob.checks.delete('chk_534f10783683daa0', function (err, res) { console.log(err, res); }); label: NODE + - lang: Ruby + source: | + checkApi = ChecksApi.new(config) + + begin + deletedCheck = checkApi.cancel("chk_534f10783683daa0") + rescue => err + p err.message + end + label: RUBY - lang: Python source: | with ApiClient(configuration) as api_client: - api = CardOrdersApi(api_client) + api = ChecksApi(api_client) try: - card_order = api.get("card_6afffd19045076c", limit = 2, offset = 1) + deleted_resource = api.cancel("chk_534f10783683daa0") except ApiException as e: print(e) label: PYTHON - lang: PHP source: | - $lob->cardOrders('card_6afffd19045076c')->all(); + $apiInstance = new OpenAPI\Client\Api\ChecksApi($config, new GuzzleHttp\Client()); + + try { + $result = $apiInstance->cancel("chk_534f10783683daa0"); + } catch (Exception $e) { + echo $e->getMessage(), PHP_EOL; + } + - lang: Java + source: | + ChecksApi apiInstance = new ChecksApi(config); + + try { + CheckDeletion response = apiInstance.cancel("chk_534f10783683daa0"); + } catch (ApiException e) { + e.printStackTrace(); + } + label: JAVA + - lang: Elixir + source: | + Lob.Check.destroy("chk_534f10783683daa0") + label: ELIXIR - lang: CSharp source: | - CardOrdersApi api = new CardOrdersApi(config); + ChecksApi api = new ChecksApi(config); try { - CardOrderList response = api.get("card_6afffd19045076c", 2, 1); + CheckDeletion response = api.cancel("chk_534f10783683daa0"); } catch (ApiException e) { Console.WriteLine(e.ToString()); } label: CSHARP - - lang: Ruby - source: | - cardOrderApi = CardOrdersApi.new(config) - - begin - retrievedCardOrderList = cardOrderApi.get("card_6afffd19045076c", { limit: 2, offset: 1 }) - rescue => err - p err.message - end - label: RUBY - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - - fetchedCardOrderList, _, err := apiClient.CardOrdersApi.Get(context, - "card_6afffd19045076c").Execute() - + deletedCheck, _, err := apiClient.ChecksApi.Cancel(context, "chk_534f10783683daa0").Execute() if err != nil { return err } label: GO + /creatives: post: - operationId: card_order_create + operationId: creative_create summary: Create - description: Creates a new card order given information + description: Creates a new creative with the provided properties tags: - - Card Orders + - Creatives + parameters: + - $ref: '#/components/parameters/lang_spec' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/card_order_editable' + $ref: '#/components/schemas/creative_writable' example: - quantity: 10000 + campaign_id: cmp_e05ee61ff80764b + resource_type: postcard + description: Our 4x6 postcard creative + details: {} application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/card_order_editable' + $ref: '#/components/schemas/creative_writable' + encoding: + example-prop: + style: deepObject + explode: true example: - quantity: 10000 + campaign_id: cmp_e05ee61ff80764b + resource_type: postcard + description: Our 4x6 postcard creative + details: {} multipart/form-data: schema: - $ref: '#/components/schemas/card_order_editable' + $ref: '#/components/schemas/creative_writable' example: - quantity: 10000 + campaign_id: cmp_e05ee61ff80764b + resource_type: postcard + description: Our 4x6 postcard creative + details: {} responses: '200': - description: Card order created successfully + description: Creative created successfully content: application/json: schema: - $ref: '#/components/schemas/card_order' - examples: - basic: - value: - id: co_e0f8a0562a06bea7f - card_id: card_6afffd19045076c - status: available - inventory: 9500 - quantity_ordered: 10000 - unit_price: 0.75 - cancelled_reason: No longer needed - availability_date: '2021-10-12T21:41:48.326Z' - expected_availability_date: '2021-11-04T21:03:18.871Z' - date_created: '2021-10-07T21:03:18.871Z' - date_modified: '2021-10-16T01:00:30.144Z' - object: card_order + $ref: '#/components/schemas/creative' + example: + id: crv_2a3b096c409b32c + description: Our 4x6 postcard creative + from: adr_210a8d4b0b76d77b + resource_type: postcard + details: {} + metadata: {} + template_preview_urls: {} + template_previews: [] + campaigns: [] + date_created: '2017-09-05T17:47:53.767Z' + date_modified: '2017-09-05T17:47:53.767Z' + object: creative default: - $ref: '#/components/responses/mailpiece_error' + $ref: '#/components/responses/creatives_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/cards/card_6afffd19045076c/orders \ + curl https://api.lob.com/v1/creatives \ -u : \ - -d "quantity=10000" - label: CURL - - lang: Typescript - source: | - const cardForCreate = new CardOrderEditable({ - quantity: 200 - }); - - try { - const myCardOrder = await new CardOrdersApi(config).create('card_xxxx', cardForCreate); - } catch (err: any) { - console.error(err); - } - label: TYPESCRIPT - - lang: Javascript - source: | - Lob.cardOrders.create('card_6afffd19045076c', { - quantity: 10000 - }, function (err, res) { - console.log(err, res); - }); - label: NODE - - lang: Python - source: | - card_order_editable = CardOrderEditable( - quantity = 10000, - ) - - with ApiClient(configuration) as api_client: - api = CardOrdersApi(api_client) - - try: - created_card_order = api.create("card_6afffd19045076c", card_order_editable) - except ApiException as e: - print(e) - label: PYTHON - - lang: PHP - source: | - $lob->cardOrders('card_6afffd19045076c')->create(array( - 'quantity' => 10000 - )); - - lang: CSharp - source: | - CardOrdersApi api = new CardOrdersApi(config); - - CardOrderEditable cardOrderEditable = new CardOrderEditable( - 10000 // quantity - ); - - try { - CardOrder result = api.create("card_6afffd19045076c", cardOrderEditable); - } catch (ApiException e) { - Console.WriteLine(e.ToString()); - } - label: CSHARP + -d "campaign_id=cmp_e05ee61ff80764b" \ + -d "resource_type=postcard" \ + -d "details={}" - lang: Ruby source: | - cardOrderCreate = CardOrderEditable.new({ - quantity: 10000, + creativeCreate = CreativeWritable.new({ + campaign_id: "cmp_e05ee61ff80764b", + resource_type: "postcard", + description: "Our 4x6 postcard creative", + from: "adr_210a8d4b0b76d77b", + front: "tmpl_4aa14648113e45b", + back: "tmpl_4aa14648113e45b", + details: PostcardDetailsWritable.new({ + mail_type: "usps_first_class", + }), }); - cardOrderApi = CardOrdersApi.new(config) + creativeApi = CreativesApi.new(config) begin - createdCardOrder = cardOrderApi.create("card_6afffd19045076c", cardOrderCreate) + createdCreative = creativeApi.create(creativeCreate) rescue => err p err.message end label: RUBY - - lang: Go - source: > - var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - - - var apiClient = *lob.NewAPIClient(configuration) - - - - var cardOrderCreate = *lob.NewCardOrderEditable() - - cardOrderCreate.SetQuantity("10000") - - - - - createdcardOrder, _, err := apiClient.CardOrdersApi.Create(context, - "card_6afffd19045076c").CardOrderEditable(cardOrderCreate).Execute() - - - if err != nil { - return err - } - label: GO - /checks: + /creatives/{crv_id}: + parameters: + - in: path + name: crv_id + description: id of the creative + required: true + schema: + $ref: '#/components/schemas/crv_id' get: - operationId: checks_list - summary: List - description: >- - Returns a list of your checks. The checks are returned sorted by - creation date, with the most recently created checks appearing first. + operationId: creative_retrieve + summary: Retrieve + description: Retrieves the details of an existing creative. You need only supply the unique creative identifier that was returned upon creative creation. tags: - - Checks - 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' + - Creatives responses: '200': - $ref: '#/components/responses/all_checks' - default: - $ref: '#/components/responses/mailpiece_error' - x-codeSamples: - - lang: Shell - source: | - curl -X GET "https://api.lob.com/v1/checks?limit=2" \ - -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: - label: CURL - - lang: typescript - source: | - try { - const checks = await new ChecksApi(config).list(2); - } catch (err: any) { - console.error(err); - } - label: TYPESCRIPT - - lang: Javascript + description: Returns a creative object + content: + application/json: + schema: + $ref: '#/components/schemas/creative' + example: + id: crv_2a3b096c409b32c + description: Our 4x6 postcard creative + from: adr_210a8d4b0b76d77b + resource_type: postcard + details: {} + metadata: {} + template_preview_urls: {} + template_previews: [] + campaigns: [] + date_created: '2017-09-05T17:47:53.767Z' + date_modified: '2017-09-05T17:47:53.767Z' + object: creative + default: + $ref: '#/components/responses/creatives_error' + x-codeSamples: + - lang: Shell source: | - Lob.checks.list({limit: 2}, function (err, res) { - console.log(err, res); - }); - label: NODE + curl https://api.lob.com/v1/creatives/crv_2a3b096c409b32c \ + -u : + label: CURL - lang: Ruby source: | - checksApi = ChecksApi.new(config) + creativeApi = CreativesApi.new(config) begin - checks = checksApi.list({ limit: 2 }) + retrievedCreative = creativeApi.get("crv_2a3b096c409b32c") rescue => err p err.message end label: RUBY + patch: + operationId: creative_update + summary: Update + description: Update the details of an existing creative. You need only supply the unique identifier that was returned upon creative creation. + tags: + - Creatives + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/creative_base' + example: + description: Test creative + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/creative_base' + example: + description: Test creative + multipart/form-data: + schema: + $ref: '#/components/schemas/creative_base' + example: + description: Test creative + responses: + '200': + description: Returns a creative object + content: + application/json: + schema: + $ref: '#/components/schemas/creative' + example: + id: crv_2a3b096c409b32c + description: Our 4x6 postcard creative + from: adr_210a8d4b0b76d77b + resource_type: postcard + details: {} + metadata: {} + template_preview_urls: {} + template_previews: [] + campaigns: [] + date_created: '2017-09-05T17:47:53.767Z' + date_modified: '2017-09-05T17:47:53.767Z' + object: creative + default: + $ref: '#/components/responses/creatives_error' + x-codeSamples: + - lang: Shell + source: | + curl -X PATCH https://api.lob.com/v1/creatives/crv_2a3b096c409b32c \ + -u : \ + -d "description=Our updated 4x6 postcard creative" + label: CURL - lang: Python source: | + creative_patch = CreativePatch( + description = "Our updated 4x6 postcard creative", + ) + with ApiClient(configuration) as api_client: - api = ChecksApi(api_client) + api = CreativesApi(api_client) try: - checks = api.list(limit=2) + updated_creative = api.update("crv_2a3b096c409b32c", creative_patch) except ApiException as e: print(e) label: PYTHON - - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\ChecksApi($config, new - GuzzleHttp\Client()); - - - try { - $result = $apiInstance->list( - 2, // limit - ); - } catch (Exception $e) { - echo $e->getMessage(), PHP_EOL; - } - - lang: Java - source: | - ChecksApi apiInstance = new ChecksApi(config); - - try { - CheckList response = apiInstance.list( - 2, // limit - null, // before - null, // after - null, // include - null, // dateCreated - null, // metadata - null, // scheduled - null, // sendDate - null, // mailType - null // sortBy - ); - } catch (ApiException e) { - e.printStackTrace(); - } - label: JAVA - - lang: Elixir + - lang: Ruby source: | - Lob.Check.list(%{limit: 2}) - label: ELIXIR - - lang: CSharp - source: > - ChecksApi api = new ChecksApi(config); - - - List includeList = new List(); - - includeList.Add("total_count"); - - Dictionary metadata = new Dictionary(); - - metadata.Add("name", "Harry"); - - Dictionary dateCreated = new Dictionary(); - - DateTime dateCreatedDate = DateTime.Today.AddMonths(-1); - - dateCreated.Add("lt", dateCreatedDate); - - Dictionary sendDate = new Dictionary(); - - sendDate.Add("lt", - DateTime.Now.ToString("yyyy-MM-ddTHH\\:mm\\:ss.fffffffzzz")); - - SortBy3 sortBy = new SortBy3(SortBy3.DateCreatedEnum.Asc); - - - try { - CheckList response = api.list( - 2, // limit - null, // before - null, // after - includeList, // include - dateCreated, // dateCreated - metadata, // metadata - true, // scheduled - sendDate, // sendDate - MailType.FirstClass, // mailType - sortBy // sortBy - ); - } catch (ApiException e) { - Console.WriteLine(e.ToString()); - } - label: CSHARP - - lang: Go - source: > - var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - - - var apiClient = *lob.NewAPIClient(configuration) + creativePatch = CreativePatch.new({ + description: "Our updated 4x6 postcard creative", + }) - CheckList = apiClient.ChecksApi.List(context).Execute() + creativeApi = CreativesApi.new(config) - if err != nil { - return err - } - label: GO + begin + updatedCreative = creativeApi.update("crv_2a3b096c409b32c", creativePatch) + rescue => err + p err.message + end + label: RUBY + /identity_validation: post: - operationId: check_create - summary: Create - description: Creates a new check with the provided properties. + operationId: identity_validation + summary: Identity Validation + description: Validates whether a given name is associated with an address. tags: - - Checks - parameters: - - $ref: '#/components/parameters/idem-header' - - $ref: '#/components/parameters/idem-query' + - Identity Validation requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/check_editable' + $ref: '#/components/schemas/identity_validation_writable' example: - description: Demo Check - to: - description: Harry - Office - name: Harry Zhang - company: Lob - email: harry@lob.com - phone: '5555555555' - address_line1: 210 King St - address_line2: '# 6100' - address_city: San Francisco - address_state: CA - address_zip: '94107' - address_country: US - from: - name: Leore Avidar - address_line1: 210 King St - address_line2: '# 6100' - address_city: San Francisco - address_state: CA - address_zip: 94107-1741 - bank_account: bank_8cad8df5354d33f - amount: 22.5 - memo: rent - logo: >- - https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png - check_bottom: tmpl_23668b406d5afef - merge_variables: - name: Harry - metadata: - memo: rafting trip - attachment: ./cool.pdf - send_date: '2017-11-01T00:00:00.000Z' - use_type: operational - mail_type: usps_first_class - check_number: 10001 + recipient: Larry Lobster + primary_line: 210 King St. + secondary_line: '' + city: San Francisco + state: CA + zip_code: '94107' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/identity_validation_writable' + example: + recipient: Larry Lobster + primary_line: 210 King St. + secondary_line: '' + city: San Francisco + state: CA + zip_code: '94107' + multipart/form-data: + schema: + $ref: '#/components/schemas/identity_validation_writable' + example: + recipient: Larry Lobster + primary_line: 210 King St. + secondary_line: '' + city: San Francisco + state: CA + zip_code: '94107' + responses: + '200': + $ref: '#/components/responses/identity_validation' + default: + $ref: '#/components/responses/identity_validation_error' + x-codeSamples: + - lang: Shell + source: | + curl https://api.lob.com/v1/identity_validation \ + -u : \ + -d "recipient=Larry Lobster" \ + -d "primary_line=210 King St" \ + -d "secondary_line=" \ + -d "urbanization=" \ + -d "city=San Francsico" \ + -d "state=CA" \ + -d "zip_code=94107" \ + label: CURL + /intl_autocompletions: + post: + operationId: intl_autocompletions + summary: Autocomplete + description: Given an address prefix consisting of a partial primary line and country, as well as optional input of city, state, and zip code, this functionality returns up to 10 full International address suggestions. Not all of them will turn out to be valid addresses; they'll need to be [verified](#operation/intl_verification). + tags: + - Intl Autocompletions + parameters: + - $ref: '#/components/parameters/lang_spec' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/intl_autocompletions_writable' + examples: + basic: + value: + address_prefix: 340 Wat + city: Summerside + state: Prince Edward Island + zip_code: C1N 1C4 + country: CA + geo_ip_sort: false + test: + value: + address_prefix: 1 sugg + country: CA application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/check_editable' - example: - description: Demo Check - to: - description: Harry - Office - name: Harry Zhang - company: Lob - email: harry@lob.com - phone: '5555555555' - address_line1: 210 King St - address_line2: '# 6100' - address_city: San Francisco - address_state: CA - address_zip: '94107' - address_country: US - from: - name: Leore Avidar - address_line1: 210 King St - address_line2: '# 6100' - address_city: San Francisco - address_state: CA - address_zip: 94107-1741 - bank_account: bank_8cad8df5354d33f - amount: 22.5 - memo: rent - logo: >- - https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png - check_bottom: tmpl_23668b406d5afef - merge_variables: - name: Harry - metadata: - memo: rafting trip - attachment: ./cool.pdf - send_date: '2017-11-01T00:00:00.000Z' - mail_type: usps_first_class - check_number: 10001 - encoding: - to: - style: deepObject - explode: true - from: - style: deepObject - explode: true - merge_variables: - style: deepObject - explode: true - metadata: - style: deepObject - explode: true + $ref: '#/components/schemas/intl_autocompletions_writable' + examples: + basic: + value: + address_prefix: 340 Wat + city: Summerside + state: Prince Edward Island + zip_code: C1N 1C4 + country: CA + geo_ip_sort: false + test: + value: + address_prefix: 1 sugg + country: CA multipart/form-data: schema: - $ref: '#/components/schemas/check_editable' - example: - description: Demo Check - to: - description: Harry - Office - name: Harry Zhang - company: Lob - email: harry@lob.com - phone: '5555555555' - address_line1: 210 King St - address_line2: '# 6100' - address_city: San Francisco - address_state: CA - address_zip: '94107' - address_country: US - from: - name: Leore Avidar - address_line1: 210 King St - address_line2: '# 6100' - address_city: San Francisco - address_state: CA - address_zip: 94107-1741 - bank_account: bank_8cad8df5354d33f - amount: 22.5 - memo: rent - logo: >- - https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png - check_bottom: tmpl_23668b406d5afef - merge_variables: - name: Harry - metadata: - memo: rafting trip - attachment: ./cool.pdf - send_date: '2017-11-01T00:00:00.000Z' - use_type: operational - mail_type: usps_first_class - check_number: 10001 - encoding: - logo: - contentType: image/png, image/jpeg + $ref: '#/components/schemas/intl_autocompletions_writable' + examples: + basic: + value: + address_prefix: 340 Wat + city: Summerside + state: Prince Edward Island + zip_code: C1N 1C4 + country: CA + geo_ip_sort: false + test: + value: + address_prefix: 1 sugg + country: CA responses: '200': - $ref: '#/components/responses/post_check' + $ref: '#/components/responses/intl_autocompletions' default: - $ref: '#/components/responses/mailpiece_error' + $ref: '#/components/responses/intl_autocompletions_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/checks \ - -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \ - -d 'description=Demo Check' \ - -d 'to[name]=Harry Zhang' \ - -d 'to[address_line1]=210 King St' \ - -d 'to[address_line2]=# 6100' \ - -d 'to[address_city]=San Francisco' \ - -d 'to[address_state]=CA' \ - -d 'to[address_zip]=94107' \ - -d 'from=adr_210a8d4b0b76d77b' \ - -d 'bank_account=bank_8cad8df5354d33f' \ - -d 'amount=22.50' \ - -d 'use_type=operational' \ - -d 'memo=rent' \ - --data-urlencode 'logo=https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png' \ - --data-urlencode 'check_bottom=

Demo Check for {{name}}

' \ - -d 'merge_variables[name]=Harry' + curl https://api.lob.com/v1/intl_autocompletions \ + -u : \ + -d "address_prefix=340 Wat" \ + -d "city=Summerside" \ + -d "state=Prince Edward Island" \ + -d "zip_code=C1N 1C4" \ + -d "country=CA" label: CURL - lang: Typescript source: | - const checkCreate = new CheckEditable({ - to: new AddressEditable({ - name: 'Harry Zhang', - address_line1: '210 King St', - address_line2: '# 6100', - address_city: 'San Francisco', - address_state: 'CA', - address_zip: '94107', - }), - from: 'adr_xxxx', - bank_account: 'bank_xxxx', - amount: 100, - use_type: 'operational' + const IntlAutocompletions = new IntlAutocompletionsApi(av_config); + const autoCompletionData = new IntlAutocompletionsWritable({ + address_prefix: "340 Wat", + city: "Summerside", + state: "Prince Edward Island", + zip_code: "C1N 1C4", + country: "CA", }); try { - const myCheck = await new ChecksApi(config).create(checkCreate); + const autocompletedAddresses = await IntlAutocompletions.autocomplete(autocompletionData); } catch (err: any) { - console.error(err); + console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.checks.create({ - description: 'Demo Check', - bank_account: 'bank_8cad8df5354d33f', - to: { - name: 'Harry Zhang', - address_line1: '210 King St', - address_line2: '# 6100', - address_city: 'San Francisco', - address_state: 'CA', - address_zip: '94107' - }, - from: 'adr_210a8d4b0b76d77b', - amount: 22.50, - use_type: 'operational', - memo: 'rent', - logo: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png', - check_bottom: '

Demo Check for {{name}}

', - merge_variables: { - name: 'Harry' - } - }, function (err, res) { - console.log(err, res); - }); + This feature is not currently supported by this library. label: NODE - lang: Ruby source: | - checkCreate = CheckEditable.new({ - description: "Demo Check", - bank_account: "bank_8cad8df5354d33f", - amount: 22.5, - memo: "rent", - logo: "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png", - check_bottom: "

Demo Check for {{name}}

", - from: "adr_210a8d4b0b76d77b", - to: AddressDomestic.new({ - name: "Harry Zhang", - address_line1: "210 King St", - address_line2: "# 6100", - address_city: "San Francisco", - address_state: "CA", - address_zip: "94107", - }), - merge_variables: { - name: "Harry" - }, - use_type: "operational" - }); + intlAutocompletionsApi = IntlAutocompletionsApi.new(config) - checkApi = ChecksApi.new(config) + autocompletionData = IntlAutocompletionsWritable.new({ + address_prefix: "340 Wat", + city: "Summerside", + state: "Prince Edward Island", + zip_code: "C1N 1C4", + country: CountryExtended::CA, + }) begin - createdCheck = checkApi.create(checkCreate) + autocompletedAddr = intlAutocompletionsApi.autocomplete(autocompletionData) rescue => err p err.message end label: RUBY - lang: Python source: | - check_editable = CheckEditable( - description = "Demo Check", - bank_account = "bank_8cad8df5354d33f", - amount = 22.5, - memo = "rent", - logo = "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png", - check_bottom = "

Demo Check for {{name}}

", - _from = "adr_210a8d4b0b76d77b", - to = AddressDomestic( - name = "Harry Zhang", - address_line1 = "210 King St", - address_line2 = "# 6100", - address_city = "San Francisco", - address_state = "CA", - address_zip = "94107", - ), - merge_variables = MergeVariables( - name = "Harry", - ), - use_type = "operational" - ) - with ApiClient(configuration) as api_client: - api = ChecksApi(api_client) + api = IntlAutocompletionsApi(api_client) + + autocompletion_data = IntlAutocompletionsWritable( + address_prefix = "340 Wat", + city = "Summerside", + state = "Prince Edward Island", + zip_code = "C1N 1C4", + country = CountryExtended("CA"), + ) try: - created_check = api.create(check_editable) + autocompleted_addresses = api.autocomplete(autocompletion_data) except ApiException as e: print(e) label: PYTHON - lang: PHP - source: > - $to = new OpenAPI\Client\Model\AddressEditable( - array( - "name" => "Harry Zhang", - "address_line1" => "210 King St", - "address_line2" => "# 6100", - "address_city" => "San Francisco", - "address_state" => "CA", - "address_zip" => "94107", - ) - ); - - - $merge_variables = new stdClass; - - $merge_variables->name = "Harry"; - - - $use_type = "operational"; - - - $apiInstance = new OpenAPI\Client\Api\ChecksApi($config, new - GuzzleHttp\Client()); - - $check_editable = new OpenAPI\Client\Model\CheckEditable( - array( - "description" => "Demo Check", - "bank_account" => "bank_8cad8df5354d33f", - "amount" => "22.5", - "memo" => "rent", - "logo" => "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png", - "check_bottom" => "

Demo Check for {{name}}

", - "from" => "adr_210a8d4b0b76d77b", - "to" => $to, - "merge_variables" => $merge_variables, - "use_type" => $use_type - ) - ); + source: | + $apiInstance = new OpenAPI\Client\Api\IntlAutocompletionsApi($config, new GuzzleHttp\Client()); + $autoCompletionData = new OpenAPI\Client\Model\IntlAutocompletionsWritable(array( + "address_prefix" => "340 Wat", + "city" => "Summerside", + "state" => "Prince Edward Island", + "zip_code" => "C1N 1C4", + "country" => "CA", + )); try { - $result = $apiInstance->create($check_editable); + $result = $apiInstance->autocomplete($autoCompletionData); } catch (Exception $e) { echo $e->getMessage(), PHP_EOL; } - lang: Java source: | - Map merge_variables = new HashMap(); - merge_variables.put("name", "Harry"); - - ChecksApi apiInstance = new ChecksApi(config); - - AddressEditable to = new AddressEditable(); - to.setName("Harry Zhang"); - to.setAddressLine1("210 King St"); - to.setAddressLine2("# 6100"); - to.setAddressCity("San Francisco"); - to.setAddressState("CA"); - to.setAddressZip("94107"); - - try { - CheckEditable checkEditable = new CheckEditable(); - checkEditable.setDescription("Demo Check"); - checkEditable.setBankAccount("bank_8cad8df5354d33f"); - checkEditable.setAmount(22.5f); - checkEditable.setMemo("rent"); - checkEditable.setLogo("https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png"); - checkEditable.setCheckBottom("

Demo Check for {{name}}

"); - checkEditable.setFrom("adr_210a8d4b0b76d77b"); - checkEditable.setTo(to); - checkEditable.setMergeVariables(merge_variables); - checkEditable.setUseType("operational"); - - Check result = apiInstance.create(checkEditable, null); - } catch (ApiException e) { - e.printStackTrace(); - } + This feature is not currently supported by this library. label: JAVA - lang: Elixir source: | - Lob.Check.create(%{ - description: 'Demo Check', - bank_account: 'bank_8cad8df5354d33f', - to: %{ - name: 'Harry Zhang', - address_line1: '210 King St', - address_line2: '# 6100', - address_city: 'San Francisco', - address_state: 'CA', - address_zip: '94107' - }, - from: 'adr_210a8d4b0b76d77b', - amount: 22.50, - memo: 'rent', - logo: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png', - check_bottom: '

Demo Check for {{name}}

', - merge_variables: %{ - name: 'Harry' - }, - use_type: 'operational' - }) + This feature is not currently supported by this library. label: ELIXIR - lang: CSharp - source: > - Dictionary mergeVariables = new Dictionary(); - - mergeVariables.Add("name", "Harry"); - - - ChecksApi api = new ChecksApi(config); - - - AddressEditable to = new AddressEditable( - "210 King St", // addressLine1 - "# 6100", // addressLine2 - "San Francisco", // addressCity - "CA", // addressState - "94107", // addressZip - default(CountryExtended), // addressCounty - "", // description - "Harry Zhang" // name - ); - + source: | + IntlAutocompletionsApi api = new IntlAutocompletionsApi(config); - CheckEditable checkEditable = new CheckEditable( - "adr_249af768103d2810", // from - to.ToJson(), // to - "bank_8cad8df5354d33f", // bank_account - 22.5f, // amount - "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png", // logo - "

Demo Check for {{name}}

", // checkBottom - default(string), // attachment - "Demo Check", // description - default(Dictionary), // metadata - mergeVariables, // mergeVariables - default(DateTime), // sendDate - CheckEditable.MailTypeEnum.UspsFirstClass, // mailType - "rent", // memo - "operational" // use_type + IntlAutocompletionsWritable autocompletionData = new IntlAutocompletionsWritable( + "340 Wat", + "Summerside", + "Prince Edward Island", + "C1N 1C4", + CountryExtended.CA ); - try { - Check result = api.create(checkEditable, null); + IntlAutocompletions autocompletedAddresses = api.autocomplete(autocompletionData); } catch (ApiException e) { Console.WriteLine(e.ToString()); } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(context, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - - var to = *lob.NewAddressEditable() - - to.SetAddressLine1("210 King St") - - to.SetAddressLine2("# 6100") - - to.SetAddressCity("San Francisco") - - to.SetAddressState("CA") - - to.SetAddressZip("94107") - - to.SetAddressCountry(lob.COUNTRYEXTENDED_US) - - to.SetDescription("") - - to.SetName("Harry Zhang") - - - var checkCreate = *lob.NewCheckEditable() - - checkCreate.SetDescription("Demo Check") - - checkCreate.SetBankAccount("bank_8cad8df5354d33f") - - checkCreate.SetAmount(22.5) - - checkCreate.SetMemo("rent") - - checkCreate.SetLogo("https://s3-us-west-2.amazonaws.com/public.lob.com/assets/check_logo.png") - - checkCreate.SetCheckBottom("

Demo Check - for {{name}}

") - - checkCreate.SetFrom("adr_210a8d4b0b76d77b") - - checkCreate.SetTo(to) - - - - createdcheck, _, err := - apiClient.ChecksApi.Create(context).CheckEditable(checkCreate).Execute() - + resp, _, err := suite.apiClient.IntlAutocompletionsApi.Autocomplete(context).IntlAutocompletionsWritable(suite.intlAutocomplationsWritable).Execute() if err != nil { return err } label: GO - /checks/{chk_id}: - parameters: - - in: path - name: chk_id - description: id of the check - required: true - schema: - $ref: '#/components/schemas/chk_id' - get: - operationId: check_retrieve - summary: Retrieve - description: >- - Retrieves the details of an existing check. You need only supply the - unique check identifier that was returned upon check creation. + /intl_verifications: + post: + operationId: intl_verification + summary: Single Verify + 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. tags: - - Checks + - Intl Verifications + parameters: + - $ref: '#/components/parameters/lang_spec' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/intl_verification_writable' + examples: + basic: + value: + recipient: Harry Zhang + primary_line: 370 Water St + secondary_line: '' + city: Summerside + state: Prince Edward Island + postal code: C1N 1C4 + country: CA + full_payload: + value: + recipient: Harry Zhang + primary_line: 370 Water St + secondary_line: '' + city: Summerside + state: Prince Edward Island + postal code: C1N 1C4 + country: CA + single_line: + value: + address: 370 Water St C1N 1C4 + country: CA + test: + value: + primary_line: deliverable + country: CA + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/intl_verification_writable' + examples: + basic: + value: + recipient: Harry Zhang + primary_line: 370 Water St + secondary_line: '' + city: Summerside + state: Prince Edward Island + postal code: C1N 1C4 + country: CA + full_payload: + value: + recipient: Harry Zhang + primary_line: 370 Water St + secondary_line: '' + city: Summerside + state: Prince Edward Island + postal code: C1N 1C4 + country: CA + single_line: + value: + address: 370 Water St C1N 1C4 + country: CA + test: + value: + primary_line: deliverable + country: CA + multipart/form-data: + schema: + $ref: '#/components/schemas/intl_verification_writable' + examples: + basic: + value: + recipient: Harry Zhang + primary_line: 370 Water St + secondary_line: '' + city: Summerside + state: Prince Edward Island + postal code: C1N 1C4 + country: CA + full_payload: + value: + recipient: Harry Zhang + primary_line: 370 Water St + secondary_line: '' + city: Summerside + state: Prince Edward Island + postal code: C1N 1C4 + country: CA + single_line: + value: + address: 370 Water St C1N 1C4 + country: CA + test: + value: + primary_line: deliverable + country: CA responses: '200': - description: Returns a check object - content: - application/json: - schema: - $ref: '#/components/schemas/check' - example: - id: chk_534f10783683daa0 - description: Demo Check - metadata: {} - check_number: 10062 - memo: rent - amount: 22.5 - url: >- - https://lob-assets.com/checks/chk_534f10783683daa0.pdf?expires=1540372221&signature=Ty3IV2bGPEoQfrdraYHlNYTaarnHLXb - to: - id: adr_bae820679f3f536b - description: Harry - Office - name: HARRY ZHANG - company: LOB - email: harry@lob.com - phone: '5555555555' - address_line1: 210 KING ST STE 6100 - address_line2: '' - address_city: SAN FRANCISCO - address_state: CA - address_zip: 94107-1741 - address_country: UNITED STATES - metadata: {} - date_created: '2018-12-08T03:08:43.446Z' - date_modified: '2018-12-08T03:08:43.446Z' - object: address - recipient_moved: false - from: - id: adr_b8fb5acf3a2b55db - name: LEORE AVIDAR - address_line1: 210 KING ST STE 6100 - address_city: SAN FRANCISCO - address_state: CA - address_zip: 94107-1741 - address_country: UNITED STATES - metadata: {} - date_created: '2017-09-05T17:47:53.767Z' - date_modified: '2017-09-05T17:47:53.767Z' - object: address - bank_account: - id: bank_8cad8df5354d33f - description: Test Bank Account - metadata: {} - routing_number: '322271627' - account_number: '123456789' - signatory: John Doe - bank_name: J.P. MORGAN CHASE BANK, N.A. - verified: true - account_type: company - date_created: '2015-11-06T19:24:24.440Z' - date_modified: '2015-11-06T19:41:28.312Z' - object: bank_account - signature_url: >- - https://lob-assets.com/bank-accounts/asd_asdfghjkqwertyui.pdf?expires=1234567890&signature=aksdf - carrier: USPS - tracking_events: [] - thumbnails: - - small: >- - https://lob-assets.com/checks/chk_534f10783683daa0_thumb_small_1.png?expires=1540372221&signature=ShhPpH74wYkNiAj7Il9B6q8ZKkzlGd4 - medium: >- - https://lob-assets.com/checks/chk_534f10783683daa0_thumb_medium_1.png?expires=1540372221&signature=tmIOq6aAyKgzAECp7STj1rvJuMS5Svd - large: >- - https://lob-assets.com/checks/chk_534f10783683daa0_thumb_large_1.png?expires=1540372221&signature=04nLEwE9d2qgQJNgJYWSOgPnU0FZbEv - merge_variables: - name: Harry - expected_delivery_date: '2017-09-12' - mail_type: usps_first_class - date_created: '2017-09-05T17:47:53.896Z' - date_modified: '2017-09-05T17:47:53.896Z' - send_date: '2017-09-05T17:47:53.896Z' - object: check - message: pancakes are good - check_bottom_template_id: tmpl_a - attachment_template_id: tmpl_a - check_bottom_template_version_id: vrsn_a - attachment_template_version_id: vrsn_a - use_type: operational - deleted: true + $ref: '#/components/responses/intl_verifications' default: - $ref: '#/components/responses/mailpiece_error' + $ref: '#/components/responses/intl_verifications_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/checks/chk_534f10783683daa0 \ - -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: + curl https://api.lob.com/v1/intl_verifications \ + -u : \ + -d "primary_line=370 Water St" \ + -d "city=Summerside" \ + -d "state=Prince Edward Island" \ + -d "postal_code=C1N 1C4" \ + -d "country=CA" label: CURL - lang: Typescript source: | + const IntlVerifications = new IntlVerificationsApi(av_config); + let verificationData1: IntlVerificationWritable = { + primary_line: '370 WATER ST', + postal_code: 'C1N 1C4', + country: CountryExtended.Ca + }; + try { - const check = await new ChecksApi(config).get('chk_xxxx'); + const singleVerified = await IntlVerifications.verifySingle(verificationData1); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.checks.retrieve('chk_534f10783683daa0', function (err, res) { - console.log(err, res); + Lob.intlVerifications.verify({ + primary_line: '370 Water St', + city: 'Summerside', + state: 'Prince Edward Island', + postal_code: 'C1N 1C4', + country: 'CA' + }, function (err, res) { + console.log (err, res); }); label: NODE - lang: Ruby source: | - checkApi = ChecksApi.new(config) + intlVerificationsApi = IntlVerificationsApi.new(config) + + verificationData = IntlVerificationWritable.new({ + primary_line: "370 Water St", + city: "Summerside", + state: "Prince Edward Island", + postal_code: "C1N 1C4", + country: CountryExtended::CA, + }) begin - retrievedCheck = checkApi.get("chk_534f10783683daa0") + verifiedAddr = intlVerificationsApi.verifySingle(verificationData) rescue => err p err.message end @@ -18870,112 +8171,221 @@ paths: - lang: Python source: | with ApiClient(configuration) as api_client: - api = ChecksApi(api_client) + api = IntlVerificationsApi(api_client) + verification_data_1 = IntlVerificationWritable( + primary_line = "370 Water St", + city = "Summerside", + state = "Prince Edward Island", + postal_code = "C1N 1C4", + country = CountryExtended("CA"), + ) try: - check = api.get("chk_534f10783683daa0") + single_verified = api.verifySingle(verification_data_1) except ApiException as e: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\ChecksApi($config, new - GuzzleHttp\Client()); + source: | + $apiInstance = new OpenAPI\Client\Api\IntlVerificationsApi($config, new GuzzleHttp\Client()); + $verificationData = new OpenAPI\Client\Model\IntlVerificationWritable(array( + 'primary_line' => '370 Water St', + 'city' => 'Summerside', + 'state' => 'Prince Edward Island', + 'postal_code' => 'C1N 1C4', + 'country' => 'CA', + )); try { - $result = $apiInstance->get("chk_534f10783683daa0"); + $result = $apiInstance->verifySingle($verificationData); } catch (Exception $e) { echo $e->getMessage(), PHP_EOL; } - lang: Java source: | - ChecksApi apiInstance = new ChecksApi(config); + LobResponse response = new IntlVerification.RequestBuilder() + .setPrimaryLine("370 Water St") + .setCity("Summerside") + .setState("Prince Edward Island") + .setPostalCode("C1N 1C4") + .setCountry("CA") + .verify(); - try { - Check response = apiInstance.get("chk_534f10783683daa0"); - } catch (ApiException e) { - e.printStackTrace(); - } + IntlVerification intlVerification = response.getResponseBody(); label: JAVA - lang: Elixir source: | - Lob.Check.find("chk_534f10783683daa0") + Lob.IntlVerification.verify(%{ + primary_line: "370 Water St", + city: "Summerside", + state: "Prince Edward Island", + postal_code: "C1N 1C4", + country: "CA" + }) label: ELIXIR - lang: CSharp source: | - ChecksApi api = new ChecksApi(config); - - try { - Check response = api.get("chk_534f10783683daa0"); - } catch (ApiException e) { - Console.WriteLine(e.ToString()); - } - label: CSHARP - - lang: Go - source: > - var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - - - var apiClient = *lob.NewAPIClient(configuration) - - - fetchedCheck, _, err := - apiClient.ChecksApi.Get(context,"chk_534f10783683daa0").Execute() + IntlVerificationWritable singleVerify = new IntlVerificationWritable( + null, + "370 Water St", + null, + "Summerside", + "Prince Edward Island", + "C1N 1C4", + CountryExtended.CA + ); + IntlVerificationsApi api = new IntlVerificationsApi(config); - if err != nil { - return err + try { + api.verifySingle(singleVerify, null); + } catch (ApiException e) { + Console.WriteLine(e.ToString()); } - label: GO - delete: - operationId: check_cancel - summary: Cancel - 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 Print & Mail Edition to gain access. + label: CSHARP + /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: - - Checks + - Letters responses: '200': - $ref: '#/components/responses/check_canceled' + 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 -X DELETE https://api.lob.com/v1/checks/chk_534f10783683daa0 \ + curl https://api.lob.com/v1/letters/ltr_4868c3b754655f90 \ -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: label: CURL - lang: Typescript source: | try { - const deleteCheck = await new ChecksApi(config).delete('chk_xxxx'); + const letter= await new LettersApi(config).get('ltr_xxxx'); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.checks.delete('chk_534f10783683daa0', function (err, res) { + Lob.letters.retrieve('ltr_4868c3b754655f90', function (err, res) { console.log(err, res); }); label: NODE - lang: Ruby source: | - checkApi = ChecksApi.new(config) + letterApi = LettersApi.new(config) begin - deletedCheck = checkApi.cancel("chk_534f10783683daa0") + retrievedLetter = letterApi.get("ltr_4868c3b754655f90") rescue => err p err.message end @@ -18983,470 +8393,211 @@ paths: - lang: Python source: | with ApiClient(configuration) as api_client: - api = ChecksApi(api_client) + api = LettersApi(api_client) try: - deleted_resource = api.cancel("chk_534f10783683daa0") + letter = api.get("ltr_4868c3b754655f90") except ApiException as e: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\ChecksApi($config, new - GuzzleHttp\Client()); - + source: | + $apiInstance = new OpenAPI\Client\Api\LettersApi($config, new GuzzleHttp\Client()); try { - $result = $apiInstance->cancel("chk_534f10783683daa0"); + $result = $apiInstance->get("ltr_4868c3b754655f90"); } catch (Exception $e) { echo $e->getMessage(), PHP_EOL; } - lang: Java source: | - ChecksApi apiInstance = new ChecksApi(config); + LettersApi apiInstance = new LettersApi(config); try { - CheckDeletion response = apiInstance.cancel("chk_534f10783683daa0"); + Letter response = apiInstance.get("ltr_4868c3b754655f90"); } catch (ApiException e) { - e.printStackTrace(); + e.printStackTrace(); } label: JAVA - lang: Elixir source: | - Lob.Check.destroy("chk_534f10783683daa0") + Lob.Letter.find("ltr_4868c3b754655f90") label: ELIXIR - lang: CSharp source: | - ChecksApi api = new ChecksApi(config); + LettersApi api = new LettersApi(config); try { - CheckDeletion response = api.cancel("chk_534f10783683daa0"); + Letter response = api.get("ltr_4868c3b754655f90"); } catch (ApiException e) { Console.WriteLine(e.ToString()); } label: CSHARP - - lang: Go - source: > - var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - - - var apiClient = *lob.NewAPIClient(configuration) - - - deletedCheck, _, err := apiClient.ChecksApi.Cancel(context, - "chk_534f10783683daa0").Execute() - - - if err != nil { - return err - } - label: GO - /creatives: - post: - operationId: creative_create - summary: Create - description: Creates a new creative with the provided properties - tags: - - Creatives - parameters: - - $ref: '#/components/parameters/lang_spec' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/creative_writable' - example: - campaign_id: cmp_e05ee61ff80764b - resource_type: postcard - description: Our 4x6 postcard creative - details: {} - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/creative_writable' - encoding: - example-prop: - style: deepObject - explode: true - example: - campaign_id: cmp_e05ee61ff80764b - resource_type: postcard - description: Our 4x6 postcard creative - details: {} - multipart/form-data: - schema: - $ref: '#/components/schemas/creative_writable' - example: - campaign_id: cmp_e05ee61ff80764b - resource_type: postcard - description: Our 4x6 postcard creative - details: {} - responses: - '200': - description: Creative created successfully - content: - application/json: - schema: - $ref: '#/components/schemas/creative' - example: - id: crv_2a3b096c409b32c - description: Our 4x6 postcard creative - from: adr_210a8d4b0b76d77b - resource_type: postcard - details: {} - metadata: {} - template_preview_urls: {} - template_previews: [] - campaigns: [] - date_created: '2017-09-05T17:47:53.767Z' - date_modified: '2017-09-05T17:47:53.767Z' - object: creative - default: - $ref: '#/components/responses/creatives_error' - x-codeSamples: - - lang: Shell - source: | - curl https://api.lob.com/v1/creatives \ - -u : \ - -d "campaign_id=cmp_e05ee61ff80764b" \ - -d "resource_type=postcard" \ - -d "details={}" - - lang: Ruby - source: | - creativeCreate = CreativeWritable.new({ - campaign_id: "cmp_e05ee61ff80764b", - resource_type: "postcard", - description: "Our 4x6 postcard creative", - from: "adr_210a8d4b0b76d77b", - front: "tmpl_4aa14648113e45b", - back: "tmpl_4aa14648113e45b", - details: PostcardDetailsWritable.new({ - mail_type: "usps_first_class", - }), - }); - - creativeApi = CreativesApi.new(config) - - begin - createdCreative = creativeApi.create(creativeCreate) - rescue => err - p err.message - end - label: RUBY - /creatives/{crv_id}: - parameters: - - in: path - name: crv_id - description: id of the creative - required: true - schema: - $ref: '#/components/schemas/crv_id' - get: - operationId: creative_retrieve - summary: Retrieve - description: >- - Retrieves the details of an existing creative. You need only supply the - unique creative identifier that was returned upon creative creation. + - lang: Go + source: | + var context = context.Background() + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) + + var apiClient = *lob.NewAPIClient(configuration) + + fetchedLetter, _, err := apiClient.LettersApi.Get(context,"ltr_4868c3b754655f90").Execute() + + if err != nil { + return err + } + 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 Print & Mail Edition to gain access. tags: - - Creatives + - Letters responses: '200': - description: Returns a creative object - content: - application/json: - schema: - $ref: '#/components/schemas/creative' - example: - id: crv_2a3b096c409b32c - description: Our 4x6 postcard creative - from: adr_210a8d4b0b76d77b - resource_type: postcard - details: {} - metadata: {} - template_preview_urls: {} - template_previews: [] - campaigns: [] - date_created: '2017-09-05T17:47:53.767Z' - date_modified: '2017-09-05T17:47:53.767Z' - object: creative + $ref: '#/components/responses/letter_deleted' default: - $ref: '#/components/responses/creatives_error' + $ref: '#/components/responses/mailpiece_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/creatives/crv_2a3b096c409b32c \ - -u : + curl -X DELETE https://api.lob.com/v1/letters/ltr_4868c3b754655f90 \ + -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: label: CURL + - lang: Typescript + source: | + try { + const deleteLetter = await new LettersApi(config).delete('ltr_xxxx') + } catch (err: any) { + console.error(err); + } + label: TYPESCRIPT + - lang: Javascript + source: | + Lob.letters.delete('ltr_4868c3b754655f90', function (err, res) { + console.log(err, res); + }); + label: NODE - lang: Ruby source: | - creativeApi = CreativesApi.new(config) + letterApi = LettersApi.new(config) begin - retrievedCreative = creativeApi.get("crv_2a3b096c409b32c") + deletedLetter = letterApi.cancel("ltr_4868c3b754655f90") rescue => err p err.message end label: RUBY - patch: - operationId: creative_update - summary: Update - description: >- - Update the details of an existing creative. You need only supply the - unique identifier that was returned upon creative creation. - tags: - - Creatives - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/creative_base' - example: - description: Test creative - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/creative_base' - example: - description: Test creative - multipart/form-data: - schema: - $ref: '#/components/schemas/creative_base' - example: - description: Test creative - responses: - '200': - description: Returns a creative object - content: - application/json: - schema: - $ref: '#/components/schemas/creative' - example: - id: crv_2a3b096c409b32c - description: Our 4x6 postcard creative - from: adr_210a8d4b0b76d77b - resource_type: postcard - details: {} - metadata: {} - template_preview_urls: {} - template_previews: [] - campaigns: [] - date_created: '2017-09-05T17:47:53.767Z' - date_modified: '2017-09-05T17:47:53.767Z' - object: creative - default: - $ref: '#/components/responses/creatives_error' - x-codeSamples: - - lang: Shell - source: | - curl -X PATCH https://api.lob.com/v1/creatives/crv_2a3b096c409b32c \ - -u : \ - -d "description=Our updated 4x6 postcard creative" - label: CURL - lang: Python source: | - creative_patch = CreativePatch( - description = "Our updated 4x6 postcard creative", - ) - with ApiClient(configuration) as api_client: - api = CreativesApi(api_client) + api = LettersApi(api_client) try: - updated_creative = api.update("crv_2a3b096c409b32c", creative_patch) + deleted_resource = api.cancel("ltr_4868c3b754655f90") except ApiException as e: print(e) label: PYTHON - - lang: Ruby + - lang: PHP source: | - creativePatch = CreativePatch.new({ - description: "Our updated 4x6 postcard creative", - }) + $apiInstance = new OpenAPI\Client\Api\LettersApi($config, new GuzzleHttp\Client()); - creativeApi = CreativesApi.new(config) - - begin - updatedCreative = creativeApi.update("crv_2a3b096c409b32c", creativePatch) - rescue => err - p err.message - end - label: RUBY - /identity_validation: - post: - operationId: identity_validation - summary: Identity Validation - description: Validates whether a given name is associated with an address. - tags: - - Identity Validation - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/identity_validation_writable' - example: - recipient: Larry Lobster - primary_line: 210 King St. - secondary_line: '' - city: San Francisco - state: CA - zip_code: '94107' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/identity_validation_writable' - example: - recipient: Larry Lobster - primary_line: 210 King St. - secondary_line: '' - city: San Francisco - state: CA - zip_code: '94107' - multipart/form-data: - schema: - $ref: '#/components/schemas/identity_validation_writable' - example: - recipient: Larry Lobster - primary_line: 210 King St. - secondary_line: '' - city: San Francisco - state: CA - zip_code: '94107' - responses: - '200': - $ref: '#/components/responses/identity_validation' - default: - $ref: '#/components/responses/identity_validation_error' - x-codeSamples: - - lang: Shell + try { + $result = $apiInstance->cancel("ltr_4868c3b754655f90"); + } catch (Exception $e) { + echo $e->getMessage(), PHP_EOL; + } + - lang: Java source: | - curl https://api.lob.com/v1/identity_validation \ - -u : \ - -d "recipient=Larry Lobster" \ - -d "primary_line=210 King St" \ - -d "secondary_line=" \ - -d "urbanization=" \ - -d "city=San Francsico" \ - -d "state=CA" \ - -d "zip_code=94107" \ - label: CURL - /intl_autocompletions: - post: - operationId: intl_autocompletions - summary: Autocomplete - description: >- - Given an address prefix consisting of a partial primary line and - country, as well as optional input of city, state, and zip code, this - functionality returns up to 10 full International address suggestions. - Not all of them will turn out to be valid addresses; they'll need to be - [verified](#operation/intl_verification). - tags: - - Intl Autocompletions - parameters: - - $ref: '#/components/parameters/lang_spec' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/intl_autocompletions_writable' - examples: - basic: - value: - address_prefix: 340 Wat - city: Summerside - state: Prince Edward Island - zip_code: C1N 1C4 - country: CA - geo_ip_sort: false - test: - value: - address_prefix: 1 sugg - country: CA - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/intl_autocompletions_writable' - examples: - basic: - value: - address_prefix: 340 Wat - city: Summerside - state: Prince Edward Island - zip_code: C1N 1C4 - country: CA - geo_ip_sort: false - test: - value: - address_prefix: 1 sugg - country: CA - multipart/form-data: - schema: - $ref: '#/components/schemas/intl_autocompletions_writable' - examples: - basic: - value: - address_prefix: 340 Wat - city: Summerside - state: Prince Edward Island - zip_code: C1N 1C4 - country: CA - geo_ip_sort: false - test: - value: - address_prefix: 1 sugg - country: CA + LettersApi apiInstance = new LettersApi(config); + + try { + LetterDeletion response = apiInstance.cancel("ltr_4868c3b754655f90"); + } catch (ApiException e) { + e.printStackTrace(); + } + label: JAVA + - lang: Elixir + source: | + Lob.Letter.destroy("ltr_4868c3b754655f90") + label: ELIXIR + - lang: CSharp + source: | + LettersApi api = new LettersApi(config); + + try { + LetterDeletion response = api.cancel("ltr_4868c3b754655f90"); + } catch (ApiException e) { + Console.WriteLine(e.ToString()); + } + label: CSHARP + - lang: Go + source: | + var context = context.Background() + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) + + var apiClient = *lob.NewAPIClient(configuration) + + deletedLetter, _, err := apiClient.LettersApi.Cancel(context, "ltr_4868c3b754655f90").Execute() + + if err != nil { + return err + } + label: GO + /letters: + get: + operationId: letters_list + summary: List + description: Returns a list of your letters. The letters are returned sorted by creation date, with the most recently created letters appearing first. + tags: + - Letters + 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' + - in: query + name: color + description: Set to `true` to return only color letters. Set to `false` to return only black & white letters. + 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/intl_autocompletions' + $ref: '#/components/responses/all_letters' default: - $ref: '#/components/responses/intl_autocompletions_error' + $ref: '#/components/responses/mailpiece_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/intl_autocompletions \ - -u : \ - -d "address_prefix=340 Wat" \ - -d "city=Summerside" \ - -d "state=Prince Edward Island" \ - -d "zip_code=C1N 1C4" \ - -d "country=CA" + curl -X GET "https://api.lob.com/v1/letters?limit=2" \ + -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: label: CURL - - lang: Typescript + - lang: typescript source: | - const IntlAutocompletions = new IntlAutocompletionsApi(av_config); - const autoCompletionData = new IntlAutocompletionsWritable({ - address_prefix: "340 Wat", - city: "Summerside", - state: "Prince Edward Island", - zip_code: "C1N 1C4", - country: "CA", - }); - try { - const autocompletedAddresses = await IntlAutocompletions.autocomplete(autocompletionData); + const letters = await new LettersApi(config).list(2); } catch (err: any) { - console.error(err); + console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - This feature is not currently supported by this library. + Lob.letters.list({limit: 2}, function (err, res) { + console.log(err, res); + }); label: NODE - lang: Ruby source: | - intlAutocompletionsApi = IntlAutocompletionsApi.new(config) - - autocompletionData = IntlAutocompletionsWritable.new({ - address_prefix: "340 Wat", - city: "Summerside", - state: "Prince Edward Island", - zip_code: "C1N 1C4", - country: CountryExtended::CA, - }) + lettersApi = LettersApi.new(config) begin - autocompletedAddr = intlAutocompletionsApi.autocomplete(autocompletionData) + letters = lettersApi.list({ limit: 2 }) rescue => err p err.message end @@ -19454,490 +8605,795 @@ paths: - lang: Python source: | with ApiClient(configuration) as api_client: - api = IntlAutocompletionsApi(api_client) - - autocompletion_data = IntlAutocompletionsWritable( - address_prefix = "340 Wat", - city = "Summerside", - state = "Prince Edward Island", - zip_code = "C1N 1C4", - country = CountryExtended("CA"), - ) + api = LettersApi(api_client) try: - autocompleted_addresses = api.autocomplete(autocompletion_data) + letters = api.list(limit=2) except ApiException as e: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new - OpenAPI\Client\Api\IntlAutocompletionsApi($config, new - GuzzleHttp\Client()); - - - $autoCompletionData = new - OpenAPI\Client\Model\IntlAutocompletionsWritable(array( - "address_prefix" => "340 Wat", - "city" => "Summerside", - "state" => "Prince Edward Island", - "zip_code" => "C1N 1C4", - "country" => "CA", - )); - + source: | + $apiInstance = new OpenAPI\Client\Api\LettersApi($config, new GuzzleHttp\Client()); try { - $result = $apiInstance->autocomplete($autoCompletionData); + $result = $apiInstance->list( + 2, // limit + ); } catch (Exception $e) { echo $e->getMessage(), PHP_EOL; } - lang: Java source: | - This feature is not currently supported by this library. + LettersApi apiInstance = new LettersApi(config); + + try { + LetterList response = apiInstance.list( + 2, // limit + null, // before + null, // after + null, // include + null, // dateCreated + null, // metadata + null, // color + null, // scheduled + null, // sendDate + null, // mailType + null // sortBy + ); + } catch (ApiException e) { + e.printStackTrace(); + } label: JAVA - lang: Elixir source: | - This feature is not currently supported by this library. + Lob.Letter.list(%{limit: 2}) label: ELIXIR - lang: CSharp - source: > - IntlAutocompletionsApi api = new IntlAutocompletionsApi(config); - - - IntlAutocompletionsWritable autocompletionData = new - IntlAutocompletionsWritable( - "340 Wat", - "Summerside", - "Prince Edward Island", - "C1N 1C4", - CountryExtended.CA - ); + source: | + LettersApi api = new LettersApi(config); + List includeList = new List(); + includeList.Add("total_count"); + Dictionary metadata = new Dictionary(); + metadata.Add("name", "Harry"); + Dictionary dateCreated = new Dictionary(); + DateTime dateCreatedDate = DateTime.Today.AddMonths(-1); + dateCreated.Add("lt", dateCreatedDate); + Dictionary sendDate = new Dictionary(); + sendDate.Add("lt", DateTime.Now.ToString("yyyy-MM-ddTHH\\:mm\\:ss.fffffffzzz")); + SortBy3 sortBy = new SortBy3(SortBy3.DateCreatedEnum.Asc); try { - IntlAutocompletions autocompletedAddresses = api.autocomplete(autocompletionData); + LetterList response = api.list( + 2, // limit + null, // before + null, // after + includeList, // include + dateCreated, // dateCreated + metadata, // metadata + true, // color + true, // scheduled + sendDate, // sendDate + MailType.FirstClass, // mailType + sortBy // sortBy + ); } catch (ApiException e) { Console.WriteLine(e.ToString()); } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(context, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - - - resp, _, err := - suite.apiClient.IntlAutocompletionsApi.Autocomplete(context).IntlAutocompletionsWritable(suite.intlAutocomplationsWritable).Execute() - - + LetterList = apiClient.LettersApi.List(context).Execute() if err != nil { return err } label: GO - /intl_verifications: post: - operationId: intl_verification - summary: Single Verify - 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: letter_create + summary: Create + description: Creates a new letter given information tags: - - Intl Verifications + - Letters parameters: - - $ref: '#/components/parameters/lang_spec' + - $ref: '#/components/parameters/idem-header' + - $ref: '#/components/parameters/idem-query' + - $ref: '#/components/parameters/lob-version' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/intl_verification_writable' - examples: - basic: - value: - recipient: Harry Zhang - primary_line: 370 Water St - secondary_line: '' - city: Summerside - state: Prince Edward Island - postal code: C1N 1C4 - country: CA - full_payload: - value: - recipient: Harry Zhang - primary_line: 370 Water St - secondary_line: '' - city: Summerside - state: Prince Edward Island - postal code: C1N 1C4 - country: CA - single_line: - value: - address: 370 Water St C1N 1C4 - country: CA - test: - value: - primary_line: deliverable - country: CA + $ref: '#/components/schemas/letter_editable' + example: + description: demo + to: + description: Harry - Office + name: Harry Zhang + company: Lob + email: harry@lob.com + phone: '5555555555' + address_line1: 210 King St + address_line2: '# 6100' + address_city: San Francisco + address_state: CA + address_zip: '94107' + address_country: US + from: + name: Harry + address_line1: 210 King St + address_line2: '# 6100' + address_city: San Francisco + address_state: CA + address_zip: '94107' + file: 'HTML Letter for {{name}}' + color: true + cards: + - card_c51ae96f5cebf3e + double_sided: false + address_placement: bottom_first_page + mail_type: usps_first_class + return_envelope: true + perforated_page: 1 + merge_variables: + name: Harry + metadata: + spiffy: 'true' + send_date: '2017-11-01T00:00:00.000Z' + extra_service: registered + custom_envelope: null + use_type: marketing + qr_code: + position: relative + redirect_url: https://www.lob.com + width: '2' + top: '2' + right: '2' + pages: 1-2,4-5 + fsc: true application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/intl_verification_writable' - examples: - basic: - value: - recipient: Harry Zhang - primary_line: 370 Water St - secondary_line: '' - city: Summerside - state: Prince Edward Island - postal code: C1N 1C4 - country: CA - full_payload: - value: - recipient: Harry Zhang - primary_line: 370 Water St - secondary_line: '' - city: Summerside - state: Prince Edward Island - postal code: C1N 1C4 - country: CA - single_line: - value: - address: 370 Water St C1N 1C4 - country: CA - test: - value: - primary_line: deliverable - country: CA + $ref: '#/components/schemas/letter_editable' + example: + description: demo + to: + description: Harry - Office + name: Harry Zhang + company: Lob + email: harry@lob.com + phone: '5555555555' + address_line1: 210 King St + address_line2: '# 6100' + address_city: San Francisco + address_state: CA + address_zip: '94107' + address_country: US + from: + name: Harry + address_line1: 210 King St + address_line2: '# 6100' + address_city: San Francisco + address_state: CA + address_zip: '94107' + file: 'HTML Letter for {{name}}' + color: true + cards: + - card_c51ae96f5cebf3e + double_sided: false + address_placement: top_first_page + mail_type: usps_first_class + return_envelope: true + perforated_page: 1 + merge_variables: + name: Harry + metadata: + spiffy: 'true' + send_date: '2017-11-01T00:00:00.000Z' + extra_service: registered + custom_envelope: null + use_type: marketing + qr_code: + position: relative + redirect_url: https://www.lob.com + width: '2' + bottom: '2' + right: '2' + pages: 1,4 + fsc: true + encoding: + to: + style: deepObject + explode: true + from: + style: deepObject + explode: true + merge_variables: + style: deepObject + explode: true + metadata: + style: deepObject + explode: true multipart/form-data: schema: - $ref: '#/components/schemas/intl_verification_writable' - examples: - basic: - value: - recipient: Harry Zhang - primary_line: 370 Water St - secondary_line: '' - city: Summerside - state: Prince Edward Island - postal code: C1N 1C4 - country: CA - full_payload: - value: - recipient: Harry Zhang - primary_line: 370 Water St - secondary_line: '' - city: Summerside - state: Prince Edward Island - postal code: C1N 1C4 - country: CA - single_line: - value: - address: 370 Water St C1N 1C4 - country: CA - test: - value: - primary_line: deliverable - country: CA + $ref: '#/components/schemas/letter_editable' + example: + description: demo + to: + description: Harry - Office + name: Harry Zhang + company: Lob + email: harry@lob.com + phone: '5555555555' + address_line1: 210 King St + address_line2: '# 6100' + address_city: San Francisco + address_state: CA + address_zip: '94107' + address_country: US + from: + name: Harry + address_line1: 210 King St + address_line2: '# 6100' + address_city: San Francisco + address_state: CA + address_zip: '94107' + file: 'HTML Letter for {{name}}' + color: true + cards: + - card_c51ae96f5cebf3e + double_sided: false + address_placement: top_first_page + mail_type: usps_first_class + return_envelope: true + perforated_page: 1 + merge_variables: + name: Harry + metadata: + spiffy: 'true' + send_date: '2017-11-01T00:00:00.000Z' + extra_service: registered + custom_envelope: null + use_type: marketing + qr_code: + position: relative + redirect_url: https://www.lob.com + width: '2' + bottom: '2' + left: '2' + pages: 1,3-5 + fsc: true responses: '200': - $ref: '#/components/responses/intl_verifications' + $ref: '#/components/responses/post_letter' default: - $ref: '#/components/responses/intl_verifications_error' + $ref: '#/components/responses/mailpiece_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/intl_verifications \ - -u : \ - -d "primary_line=370 Water St" \ - -d "city=Summerside" \ - -d "state=Prince Edward Island" \ - -d "postal_code=C1N 1C4" \ - -d "country=CA" + curl https://api.lob.com/v1/letters \ + -u YOUR_API_KEY \ + -d 'description=Demo Letter' \ + -d 'to[name]=Harry Zhang' \ + -d 'to[address_line1]=210 King St' \ + -d 'to[address_line2]=# 6100' \ + -d 'to[address_city]=San Francisco' \ + -d 'to[address_state]=CA' \ + -d 'to[address_zip]=94107' \ + -d 'from=adr_210a8d4b0b76d77b' \ + --data-urlencode 'file=HTML Letter for {{name}}' \ + -d 'merge_variables[name]=Harry' \ + -d 'color=true' \ + -d 'cards[]=card_c51ae96f5cebf3e' \ + -d 'qr_code[position]=relative' \ + -d 'qr_code[redirect_url]=https://www.lob.com' \ + -d 'qr_code[width]=2' \ + -d 'qr_code[bottom]=2' \ + -d 'qr_code[left]=2' \ + -d 'qr_code[pages]=3,4-5' \ + -d 'fsc=true' label: CURL - lang: Typescript source: | - const IntlVerifications = new IntlVerificationsApi(av_config); - let verificationData1: IntlVerificationWritable = { - primary_line: '370 WATER ST', - postal_code: 'C1N 1C4', - country: CountryExtended.Ca - }; + const letterCreate = new LetterEditable({ + to: { + name: 'Harry Zhang', + address_line1: '210 King St', + address_line2: '# 6100', + address_city: 'San Francisco', + address_state: 'CA', + address_zip: '94107' + }, + from: 'adr_xxxx', + color: true, + extra_service: LetterEditableExtraServiceEnum.Certified, + file: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/us_letter_1pg.pdf', + use_type: 'marketing', + qr_code : { + position: 'relative', + redirect_url: 'https://www.lob.com', + width: '2', + bottom: '2', + left: '2', + pages: '2,5' + }, + fsc: true + }); try { - const singleVerified = await IntlVerifications.verifySingle(verificationData1); + const myLetter = await new LettersApi(config).create(letterCreate); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.intlVerifications.verify({ - primary_line: '370 Water St', - city: 'Summerside', - state: 'Prince Edward Island', - postal_code: 'C1N 1C4', - country: 'CA' + Lob.letters.create({ + description: 'Demo Letter', + to: { + name: 'Harry Zhang', + address_line1: '210 King St', + address_line2: '# 6100', + address_city: 'San Francisco', + address_state: 'CA', + address_zip: '94107' + }, + from: 'adr_210a8d4b0b76d77b', + file: 'HTML Letter for {{name}}', + merge_variables: { + name: 'Harry' + }, + color: true, + cards: ['card_c51ae96f5cebf3e'], + use_type: 'marketing', + qr_code : { + position: 'relative', + redirect_url: 'https://www.lob.com', + width: '2', + bottom: '2', + left: '2', + pages: '2,4-5' + }, + fsc: true }, function (err, res) { - console.log (err, res); + console.log(err, res); }); label: NODE - lang: Ruby source: | - intlVerificationsApi = IntlVerificationsApi.new(config) + letterCreate = LetterEditable.new({ + description: "Demo Letter", + from: "adr_210a8d4b0b76d77b", + file: "HTML Letter for {{name}}", + color: "true", + to: AddressEditable.new({ + name: "Harry Zhang", + address_line1: "210 King St", + address_line2: "# 6100", + address_city: "San Francisco", + address_state: "CA", + address_zip: "94107", + }), + merge_variables: { + name: "Harry" + }, + cards: [ + "card_c51ae96f5cebf3e", + ], + use_type: "marketing", + fsc: true + }); - verificationData = IntlVerificationWritable.new({ - primary_line: "370 Water St", - city: "Summerside", - state: "Prince Edward Island", - postal_code: "C1N 1C4", - country: CountryExtended::CA, - }) + letterApi = LettersApi.new(config) begin - verifiedAddr = intlVerificationsApi.verifySingle(verificationData) + createdLetter = letterApi.create(letterCreate) rescue => err p err.message end label: RUBY - lang: Python source: | - with ApiClient(configuration) as api_client: - api = IntlVerificationsApi(api_client) - verification_data_1 = IntlVerificationWritable( - primary_line = "370 Water St", - city = "Summerside", - state = "Prince Edward Island", - postal_code = "C1N 1C4", - country = CountryExtended("CA"), + letter_editable = LetterEditable( + description = "Demo Letter", + _from = "adr_210a8d4b0b76d77b", + file = "HTML Letter for {{name}}", + color = True, + to = AddressEditable( + name = "Harry Zhang", + address_line1 = "210 King St", + address_line2 = "# 6100", + address_city = "San Francisco", + address_state = "CA", + address_zip = "94107", + ), + merge_variables = MergeVariables( + name = "Harry", + ), + cards = [ + "card_c51ae96f5cebf3e", + ], + use_type = "marketing", + qr_code = { + "position" : "relative", + "redirect_url" : "https://www.lob.com", + "width" : "2", + "bottom" : "2", + "left" : "2", + "pages" : "1,3" + }, + fsc = true ) + with ApiClient(configuration) as api_client: + api = LettersApi(api_client) + try: - single_verified = api.verifySingle(verification_data_1) + created_letter = api.create(letter_editable) except ApiException as e: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\IntlVerificationsApi($config, - new GuzzleHttp\Client()); + source: | + $to = new OpenAPI\Client\Model\AddressEditable( + array( + "name" => "Harry Zhang", + "address_line1" => "210 King St", + "address_line2" => "# 6100", + "address_city" => "San Francisco", + "address_state" => "CA", + "address_zip" => "94107", + ) + ); + + $qr_code = new OpenAPI\Client\Model\QRCode( + array( + "position" => "relative", + "redirect_url" => "https://www.lob.com", + "width" => "2", + "bottom" => "2", + "left" => "2", + "pages" => "1,3,5", + ) + ); + $merge_variables = new stdClass; + $merge_variables->name = "Harry"; - $verificationData = new - OpenAPI\Client\Model\IntlVerificationWritable(array( - 'primary_line' => '370 Water St', - 'city' => 'Summerside', - 'state' => 'Prince Edward Island', - 'postal_code' => 'C1N 1C4', - 'country' => 'CA', - )); + $use_type = "marketing"; + $fsc = true; + $apiInstance = new OpenAPI\Client\Api\LettersApi($config, new GuzzleHttp\Client()); + $letter_editable = new OpenAPI\Client\Model\LetterEditable( + array( + "description" => "Demo Letter", + "from" => "adr_210a8d4b0b76d77b", + "file" => "HTML Letter for {{name}}", + "color" => "true", + "to" => $to, + "merge_variables" => $merge_variables, + "cards" => array( + "card_c51ae96f5cebf3e", + "card_thingy", + ), + "use_type" => $use_type; + "qr_code" => $qr_code, + "fsc" => $fsc, + ) + ); try { - $result = $apiInstance->verifySingle($verificationData); + $result = $apiInstance->create($letter_editable); } catch (Exception $e) { echo $e->getMessage(), PHP_EOL; } - lang: Java - source: > - LobResponse response = new - IntlVerification.RequestBuilder() - .setPrimaryLine("370 Water St") - .setCity("Summerside") - .setState("Prince Edward Island") - .setPostalCode("C1N 1C4") - .setCountry("CA") - .verify(); + source: | + Map merge_variables = new HashMap(); + merge_variables.put("name", "Harry"); - IntlVerification intlVerification = response.getResponseBody(); + LettersApi apiInstance = new LettersApi(config); + + AddressEditable to = new AddressEditable(); + to.setName("Harry Zhang"); + to.setAddressLine1("210 King St"); + to.setAddressLine2("# 6100"); + to.setAddressCity("San Francisco"); + to.setAddressState("CA"); + to.setAddressZip("94107"); + + QRCode qrCode = new QRCode(); + qrCode.setPosition("relative"); + qrCode.setRedirectUrl("https://www.lob.com"); + qrCode.setWidth("2"); + qrCode.setLeft("2"); + qrCode.setBottom("2"); + qrCode.setPages("1,3,5"); + + List cards = new ArrayList(); + cards.add("card_c51ae96f5cebf3e"); + cards.add("card_thingy"); + + try { + LetterEditable letterEditable = new LetterEditable(); + letterEditable.setDescription("Demo Letter"); + letterEditable.setFrom("adr_210a8d4b0b76d77b"); + letterEditable.setFile("HTML Letter for {{name}}"); + letterEditable.setColor(true); + letterEditable.setTo(to); + letterEditable.setMergeVariables(merge_variables); + letterEditable.setCards(cards); + letterEditable.setUseType("operational"); + letterEditable.setQRCode(qrCode); + letterEditable.setFsc(true); + + Letter result = apiInstance.create(letterEditable, null); + } catch (ApiException e) { + e.printStackTrace(); + } label: JAVA - lang: Elixir source: | - Lob.IntlVerification.verify(%{ - primary_line: "370 Water St", - city: "Summerside", - state: "Prince Edward Island", - postal_code: "C1N 1C4", - country: "CA" + Lob.Letter.create(%{ + description: 'Demo Letter', + to: %{ + name: 'Harry Zhang', + address_line1: '210 King St', + address_line2: '# 6100', + address_city: 'San Francisco', + address_state: 'CA', + address_zip: '94107' + }, + from: 'adr_210a8d4b0b76d77b', + file: 'HTML Letter for {{name}}', + merge_variables: %{ + name: 'Harry' + }, + color: true, + cards: ['card_c51ae96f5cebf3e'], + use_type: 'marketing', + qr_code: %{ + position: 'relative', + redirect_url: 'https://www.lob.com', + width: '2', + bottom: '2', + left: '2', + pages: '1-2,5' + }, + fsc: true }) label: ELIXIR - lang: CSharp - source: > - IntlVerificationWritable singleVerify = new - IntlVerificationWritable( - null, - "370 Water St", - null, - "Summerside", - "Prince Edward Island", - "C1N 1C4", - CountryExtended.CA + source: | + Dictionary mergeVariables = new Dictionary(); + mergeVariables.Add("name", "Harry"); + + LettersApi api = new LettersApi(config); + + AddressEditable to = new AddressEditable( + "210 King St", // addressLine1 + "# 6100", // addressLine2 + "San Francisco", // addressCity + "CA", // addressState + "94107", // addressZip + default(CountryExtended), // addressCounty + null, // description + "Harry Zhang" // name + ); + + UseType usetype = new UseType("marketing"); + + QRCode qrCode = new QRCode( + "relative", //position, + "https://www.lob.com", //redirect_url + "2", //width + "2", //left + "2", //bottom + "1-2,5", //pages ); + Fsc fsc = new Fsc(true); - IntlVerificationsApi api = new IntlVerificationsApi(config); + List cards = new List(); + cards.Add("card_c51ae96f5cebf3e"); + LetterEditable letterEditable = new LetterEditable( + "Demo Letter", // description + default(Dictionary), // metadata + default(MailType), // mailType + mergeVariables, // mergeVariables + default(DateTime), // sendDate + true, // color + true, // doubleSided + LetterEditable.AddressPlacementEnum.TopFirstPage, // addressPlacement + default(Object), // returnEnvelope + default(int?), // perforatedPage + default(LetterEditableCustomEnvelope), // customEnvelope + to.ToJson(), // to + "adr_249af768103d2810", // from + "HTML Letter for {{name}}", // file + default(LetterEditable.ExtraServiceEnum?), // extraService + cards, // cards + usetype, + qrCode, + fsc + ); try { - api.verifySingle(singleVerify, null); + Letter result = api.create(letterEditable, null); } catch (ApiException e) { Console.WriteLine(e.ToString()); } label: CSHARP - /letters/{ltr_id}: + - lang: Go + source: | + var context = context.Background() + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) + + var apiClient = *lob.NewAPIClient(configuration) + + var to = *lob.NewAddressEditable() + to.SetAddressLine1("210 King St") + to.SetAddressLine2("# 6100") + to.SetAddressCity("San Francisco") + to.SetAddressState("CA") + to.SetAddressZip("94107") + to.SetAddressCountry(lob.COUNTRYEXTENDED_US) + to.SetDescription("") + to.SetName("Harry Zhang") + + var letterCreate = *lob.NewLetterEditable() + letterCreate.SetDescription("Demo Letter") + letterCreate.SetFrom("adr_210a8d4b0b76d77b") + letterCreate.SetFile("HTML Letter for {{name}}") + letterCreate.SetColor("true") + letterCreate.SetTo(to) + letterCreate.SetFsc(true) + + + createdletter, _, err := apiClient.LettersApi.Create(context).LetterEditable(letterCreate).Execute() + + if err != nil { + return err + } + label: GO + /postcards/{psc_id}: parameters: - in: path - name: ltr_id - description: id of the letter + name: psc_id + description: id of the postcard required: true schema: - $ref: '#/components/schemas/ltr_id' + $ref: '#/components/schemas/psc_id' get: - operationId: letter_retrieve + operationId: postcard_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. + description: Retrieves the details of an existing postcard. You need only supply the unique customer identifier that was returned upon postcard creation. tags: - - Letters + - Postcards responses: '200': - description: Returns a letter object + description: Returns a postcard 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 + $ref: '#/components/schemas/postcard' + examples: + basic: + value: + id: psc_208e45e48d271294 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 + metadata: {} + to: + id: adr_210a8d4b0b76d77b + description: null + name: null + company: LOB + 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: '2018-12-08T03:01:07.651Z' + date_modified: '2018-12-08T03:01:07.651Z' + object: address + url: https://lob-assets.com/postcards/psc_208e45e48d271294.pdf?version=v1&expires=1619218302&signature=NfHHLBSr5tOHA_Z4kij4dKqZG8f3vMDtwvuFVeeF9pV_lylcjLsVVODhNCE5hR6-2slUr6t9WMNsi429Pj7_DA + carrier: USPS + front_template_id: null + back_template_id: null + date_created: '2021-03-24T22:51:42.838Z' + date_modified: '2021-03-24T22:51:42.838Z' + send_date: '2021-03-24T22:51:42.838Z' + use_type: marketing + fsc: false + object: postcard + full: + value: + id: psc_0e03d1ad7d31f151 + description: null + metadata: {} + to: + id: adr_c7cb63d68f8d6 + description: null + name: JANE DOE + company: LOB + phone: '5555555555' + email: jane.doe@lob.com + address_line1: 370 WATER ST + address_line2: '' + address_city: SUMMERSIDE + address_state: PE + address_zip: C1N 1C4 + address_country: CANADA + metadata: {} + date_created: '2018-12-08T03:01:07.651Z' + date_modified: '2018-12-08T03:01:07.651Z' + object: address + recipient_moved: false + from: + id: adr_210a8d4b0b76d77b + 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: '2018-12-08T03:01:07.651Z' + date_modified: '2018-12-08T03:01:07.651Z' + object: address + url: https://lob-assets.com/postcards/psc_208e45e48d271294.pdf?version=v1&expires=1619218302&signature=NfHHLBSr5tOHA_Z4kij4dKqZG8f3vMDtwvuFVeeF9pV_lylcjLsVVODhNCE5hR6-2slUr6t9WMNsi429Pj7_DA + carrier: USPS + front_template_id: tmpl_93c369f06171958 + back_template_id: tmpl_93c369f06171958 + front_template_version_id: vrsn_a83e044941c393b + back_template_version_id: vrsn_a83e044941c393b + tracking_events: [] + size: 6x11 + mail_type: usps_first_class + merge_variables: {} 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 + - 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 + expected_delivery_date: '2021-03-30' + date_created: '2021-03-24T22:51:42.838Z' + date_modified: '2021-03-24T22:51:42.838Z' + send_date: '2021-03-24T22:51:42.838Z' + use_type: marketing + fsc: false + object: postcard default: $ref: '#/components/responses/mailpiece_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/letters/ltr_4868c3b754655f90 \ + curl https://api.lob.com/v1/postcards/psc_5c002b86ce47537a \ -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: label: CURL - lang: Typescript source: | try { - const letter= await new LettersApi(config).get('ltr_xxxx'); + const postcard = await new PostCardsApi(config).get('psc_xxxx'); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.letters.retrieve('ltr_4868c3b754655f90', function (err, res) { + Lob.postcards.retrieve('psc_5c002b86ce47537a', function (err, res) { console.log(err, res); }); label: NODE @@ -19954,103 +9410,87 @@ paths: - lang: Python source: | with ApiClient(configuration) as api_client: - api = LettersApi(api_client) + api = PostcardsApi(api_client) try: - letter = api.get("ltr_4868c3b754655f90") + postcard = api.get("psc_5c002b86ce47537a") except ApiException as e: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\LettersApi($config, new - GuzzleHttp\Client()); - + source: | + $apiInstance = new OpenAPI\Client\Api\PostcardsApi($config, new GuzzleHttp\Client()); try { - $result = $apiInstance->get("ltr_4868c3b754655f90"); + $result = $apiInstance->get("psc_5c002b86ce47537a"); } catch (Exception $e) { echo $e->getMessage(), PHP_EOL; } - lang: Java source: | - LettersApi apiInstance = new LettersApi(config); + PostcardsApi apiInstance = new PostcardsApi(config); try { - Letter response = apiInstance.get("ltr_4868c3b754655f90"); + Postcard response = apiInstance.get("psc_5c002b86ce47537a"); } catch (ApiException e) { e.printStackTrace(); } label: JAVA - lang: Elixir source: | - Lob.Letter.find("ltr_4868c3b754655f90") + Lob.Postcard.find("psc_5c002b86ce47537a") label: ELIXIR - lang: CSharp source: | - LettersApi api = new LettersApi(config); + PostcardsApi api = new PostcardsApi(config); try { - Letter response = api.get("ltr_4868c3b754655f90"); + Postcard response = api.get("psc_5c002b86ce47537a"); } catch (ApiException e) { Console.WriteLine(e.ToString()); } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - - fetchedLetter, _, err := - apiClient.LettersApi.Get(context,"ltr_4868c3b754655f90").Execute() - + fetchedPostcard, _, err := apiClient.PostcardsApi.Get(context,"psc_5c002b86ce47537a").Execute() if err != nil { return err } label: GO delete: - operationId: letter_cancel + operationId: postcard_delete 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 Print & Mail Edition to gain access. + 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 Print & Mail Edition to gain access. tags: - - Letters + - Postcards responses: '200': - $ref: '#/components/responses/letter_deleted' + $ref: '#/components/responses/postcard_deleted' default: $ref: '#/components/responses/mailpiece_error' x-codeSamples: - lang: Shell source: | - curl -X DELETE https://api.lob.com/v1/letters/ltr_4868c3b754655f90 \ + curl -X DELETE https://api.lob.com/v1/postcards/psc_5c002b86ce47537a \ -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: label: CURL - lang: Typescript source: | try { - const deleteLetter = await new LettersApi(config).delete('ltr_xxxx') + const deletePostcard = await new PostcardsApi(config).delete('psc_xxxx'); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.letters.delete('ltr_4868c3b754655f90', function (err, res) { + Lob.postcards.delete('psc_5c002b86ce47537a', function (err, res) { console.log(err, res); }); label: NODE @@ -20067,76 +9507,66 @@ paths: - lang: Python source: | with ApiClient(configuration) as api_client: - api = LettersApi(api_client) + api = PostcardsApi(api_client) try: - deleted_resource = api.cancel("ltr_4868c3b754655f90") + deleted_resource = api.cancel("psc_5c002b86ce47537a") except ApiException as e: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\LettersApi($config, new - GuzzleHttp\Client()); - + source: | + $apiInstance = new OpenAPI\Client\Api\PostcardsApi($config, new GuzzleHttp\Client()); try { - $result = $apiInstance->cancel("ltr_4868c3b754655f90"); + $result = $apiInstance->cancel("psc_5c002b86ce47537a"); } catch (Exception $e) { echo $e->getMessage(), PHP_EOL; } - lang: Java source: | - LettersApi apiInstance = new LettersApi(config); + PostcardsApi apiInstance = new PostcardsApi(config); try { - LetterDeletion response = apiInstance.cancel("ltr_4868c3b754655f90"); + PostcardDeletion response = apiInstance.cancel("psc_5c002b86ce47537a"); } catch (ApiException e) { e.printStackTrace(); } label: JAVA - lang: Elixir source: | - Lob.Letter.destroy("ltr_4868c3b754655f90") + Lob.Postcard.destroy("psc_5c002b86ce47537a") label: ELIXIR - lang: CSharp source: | - LettersApi api = new LettersApi(config); + PostcardsApi api = new PostcardsApi(config); try { - LetterDeletion response = api.cancel("ltr_4868c3b754655f90"); + PostcardDeletion response = api.delete("psc_5c002b86ce47537a"); } catch (ApiException e) { Console.WriteLine(e.ToString()); } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - - deletedLetter, _, err := apiClient.LettersApi.Cancel(context, - "ltr_4868c3b754655f90").Execute() - + deletedPostcard, _, err := apiClient.PostcardsApi.Delete(context, "psc_5c002b86ce47537a").Execute() if err != nil { return err } label: GO - /letters: + /postcards: get: - operationId: letters_list + operationId: postcards_list summary: List - description: >- - Returns a list of your letters. The letters are returned sorted by - creation date, with the most recently created letters appearing first. + description: Returns a list of your postcards. The addresses are returned sorted by creation date, with the most recently created addresses appearing first. tags: - - Letters + - Postcards parameters: - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/before_after' @@ -20146,47 +9576,47 @@ paths: - $ref: '#/components/parameters/campaign_id' - $ref: '#/components/parameters/status' - in: query - name: color - description: >- - Set to `true` to return only color letters. Set to `false` to return - only black & white letters. + name: size + description: Specifies the size of the postcard. Only `4x6` postcards can be sent to international destinations. schema: - type: boolean + type: array + items: + $ref: '#/components/schemas/postcard_size' - $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' + $ref: '#/components/responses/all_postcards' default: $ref: '#/components/responses/mailpiece_error' x-codeSamples: - lang: Shell source: | - curl -X GET "https://api.lob.com/v1/letters?limit=2" \ + curl -X GET "https://api.lob.com/v1/postcards?limit=2" \ -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: label: CURL - lang: typescript source: | try { - const letters = await new LettersApi(config).list(2); + const postcards = await new PostcardsApi(config).list(2); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.letters.list({limit: 2}, function (err, res) { + Lob.postcards.list({limit: 2}, function (err, res) { console.log(err, res); }); label: NODE - lang: Ruby source: | - lettersApi = LettersApi.new(config) + postcardsApi = PostcardsApi.new(config) begin - letters = lettersApi.list({ limit: 2 }) + postcards = postcardsApi.list({ limit: 2 }) rescue => err p err.message end @@ -20194,18 +9624,16 @@ paths: - lang: Python source: | with ApiClient(configuration) as api_client: - api = LettersApi(api_client) + api = PostcardsApi(api_client) try: - letters = api.list(limit=2) + postcards = api.list(limit=2) except ApiException as e: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\LettersApi($config, new - GuzzleHttp\Client()); - + source: | + $apiInstance = new OpenAPI\Client\Api\PostcardsApi($config, new GuzzleHttp\Client()); try { $result = $apiInstance->list( @@ -20216,17 +9644,17 @@ paths: } - lang: Java source: | - LettersApi apiInstance = new LettersApi(config); + PostcardsApi apiInstance = new PostcardsApi(config); try { - LetterList response = apiInstance.list( + PostcardList response = apiInstance.list( 2, // limit null, // before null, // after null, // include null, // dateCreated null, // metadata - null, // color + null, // size null, // scheduled null, // sendDate null, // mailType @@ -20238,47 +9666,34 @@ paths: label: JAVA - lang: Elixir source: | - Lob.Letter.list(%{limit: 2}) + Lob.Postcard.list(%{limit: 2}) label: ELIXIR - lang: CSharp - source: > - LettersApi api = new LettersApi(config); - + source: | + PostcardsApi api = new PostcardsApi(config); List includeList = new List(); - includeList.Add("total_count"); - - Dictionary metadata = new Dictionary(); - + Dictionary metadata = new Dictionary(); metadata.Add("name", "Harry"); - - Dictionary dateCreated = new Dictionary(); - + Dictionary dateCreated = new Dictionary(); DateTime dateCreatedDate = DateTime.Today.AddMonths(-1); - dateCreated.Add("lt", dateCreatedDate); - - Dictionary sendDate = new Dictionary(); - - sendDate.Add("lt", - DateTime.Now.ToString("yyyy-MM-ddTHH\\:mm\\:ss.fffffffzzz")); - + Dictionary sendDate = new Dictionary(); + sendDate.Add("lt", DateTime.Now.ToString("yyyy-MM-ddTHH\\:mm\\:ss.fffffffzzz")); SortBy3 sortBy = new SortBy3(SortBy3.DateCreatedEnum.Asc); - + List sizeArray = new List(); + sizeArray.Add(PostcardSize._4x6); try { - LetterList response = api.list( + PostcardList response = api.list( 2, // limit null, // before null, // after includeList, // include dateCreated, // dateCreated metadata, // metadata - true, // color + sizeArray, // size true, // scheduled sendDate, // sendDate MailType.FirstClass, // mailType @@ -20289,37 +9704,31 @@ paths: } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - - LetterList = apiClient.LettersApi.List(context).Execute() - + PostcardList = apiClient.PostcardsApi.List(context).Execute() if err != nil { return err } label: GO post: - operationId: letter_create + operationId: postcard_create summary: Create - description: Creates a new letter given information + description: Creates a new postcard given information tags: - - Letters + - Postcards parameters: - $ref: '#/components/parameters/idem-header' - $ref: '#/components/parameters/idem-query' - - $ref: '#/components/parameters/lob-version' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/letter_editable' + $ref: '#/components/schemas/postcard_editable' example: description: demo to: @@ -20335,42 +9744,38 @@ paths: address_zip: '94107' address_country: US from: - name: Harry + description: Harry - Office + name: Harry Zhang + company: Lob + email: harry@lob.com + phone: '5555555555' address_line1: 210 King St address_line2: '# 6100' address_city: San Francisco address_state: CA address_zip: '94107' - file: >- - HTML Letter for - {{name}} - color: true - cards: - - card_c51ae96f5cebf3e - double_sided: false - address_placement: bottom_first_page + address_country: US + front: tmpl_a1234dddg + back: tmpl_a1234dddg + size: 6x9 mail_type: usps_first_class - return_envelope: true - perforated_page: 1 merge_variables: name: Harry metadata: spiffy: 'true' send_date: '2017-11-01T00:00:00.000Z' - extra_service: registered - custom_envelope: null use_type: marketing qr_code: position: relative redirect_url: https://www.lob.com - width: '2' - top: '2' - right: '2' - pages: 1-2,4-5 + width: '2.5' + top: '2.5' + right: '2.5' + pages: front,back fsc: true application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/letter_editable' + $ref: '#/components/schemas/postcard_editable' example: description: demo to: @@ -20386,38 +9791,34 @@ paths: address_zip: '94107' address_country: US from: - name: Harry + description: Harry - Office + name: Harry Zhang + company: Lob + email: harry@lob.com + phone: '5555555555' address_line1: 210 King St address_line2: '# 6100' address_city: San Francisco address_state: CA address_zip: '94107' - file: >- - HTML Letter for - {{name}} - color: true - cards: - - card_c51ae96f5cebf3e - double_sided: false - address_placement: top_first_page + address_country: US + front: tmpl_c94e83ca2cd5121 + back: tmpl_c94e83ca2cd5121 + size: 6x9 mail_type: usps_first_class - return_envelope: true - perforated_page: 1 merge_variables: name: Harry metadata: spiffy: 'true' send_date: '2017-11-01T00:00:00.000Z' - extra_service: registered - custom_envelope: null use_type: marketing qr_code: position: relative redirect_url: https://www.lob.com - width: '2' - bottom: '2' - right: '2' - pages: 1,4 + width: '2.5' + bottom: '2.5' + right: '2.5' + pages: back fsc: true encoding: to: @@ -20434,7 +9835,7 @@ paths: explode: true multipart/form-data: schema: - $ref: '#/components/schemas/letter_editable' + $ref: '#/components/schemas/postcard_editable' example: description: demo to: @@ -20450,50 +9851,46 @@ paths: address_zip: '94107' address_country: US from: - name: Harry + description: Harry - Office + name: Harry Zhang + company: Lob + email: harry@lob.com + phone: '5555555555' address_line1: 210 King St address_line2: '# 6100' address_city: San Francisco address_state: CA address_zip: '94107' - file: >- - HTML Letter for - {{name}} - color: true - cards: - - card_c51ae96f5cebf3e - double_sided: false - address_placement: top_first_page + address_country: US + front: tmpl_a1234dddg + back: tmpl_a1234dddg + size: 6x9 mail_type: usps_first_class - return_envelope: true - perforated_page: 1 merge_variables: name: Harry metadata: spiffy: 'true' send_date: '2017-11-01T00:00:00.000Z' - extra_service: registered - custom_envelope: null use_type: marketing qr_code: position: relative redirect_url: https://www.lob.com - width: '2' - bottom: '2' - left: '2' - pages: 1,3-5 + width: '2.5' + bottom: '2.5' + left: '2.5' + pages: front fsc: true responses: '200': - $ref: '#/components/responses/post_letter' + $ref: '#/components/responses/post_postcard' default: $ref: '#/components/responses/mailpiece_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/letters \ - -u YOUR_API_KEY \ - -d 'description=Demo Letter' \ + curl https://api.lob.com/v1/postcards \ + -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \ + -d 'description=Demo Postcard job' \ -d 'to[name]=Harry Zhang' \ -d 'to[address_line1]=210 King St' \ -d 'to[address_line2]=# 6100' \ @@ -20501,55 +9898,55 @@ paths: -d 'to[address_state]=CA' \ -d 'to[address_zip]=94107' \ -d 'from=adr_210a8d4b0b76d77b' \ - --data-urlencode 'file=HTML Letter for {{name}}' \ + --data-urlencode 'front=Front HTML for {{name}}' \ + --data-urlencode 'back=Back HTML for {{name}}' \ -d 'merge_variables[name]=Harry' \ - -d 'color=true' \ - -d 'cards[]=card_c51ae96f5cebf3e' \ + -d 'use_type=marketing' \ -d 'qr_code[position]=relative' \ -d 'qr_code[redirect_url]=https://www.lob.com' \ - -d 'qr_code[width]=2' \ - -d 'qr_code[bottom]=2' \ - -d 'qr_code[left]=2' \ - -d 'qr_code[pages]=3,4-5' \ + -d 'qr_code[width]=2.5' \ + -d 'qr_code[bottom]=2.5' \ + -d 'qr_code[left]=2.5' \ + -d 'qr_code[pages]=front,back' \ -d 'fsc=true' label: CURL - lang: Typescript source: | - const letterCreate = new LetterEditable({ - to: { - name: 'Harry Zhang', - address_line1: '210 King St', - address_line2: '# 6100', - address_city: 'San Francisco', - address_state: 'CA', - address_zip: '94107' - }, - from: 'adr_xxxx', - color: true, - extra_service: LetterEditableExtraServiceEnum.Certified, - file: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/us_letter_1pg.pdf', - use_type: 'marketing', - qr_code : { - position: 'relative', - redirect_url: 'https://www.lob.com', - width: '2', - bottom: '2', - left: '2', - pages: '2,5' - }, - fsc: true + const postcardCreate = new PostcardEditable({ + to: new AddressEditable({ + name: 'Harry Zhang', + address_line1: '210 King St', + address_line2: '# 6100', + address_city: 'San Francisco', + address_state: 'CA', + address_zip: '94107' + }), + from: 'adr_xxxx', + front: + 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/4x6_pc_template.pdf', + back: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/4x6_pc_template.pdf', + use_type: 'marketing', + qr_code : { + position: 'relative', + redirect_url: 'https://www.lob.com', + width: '2.5', + bottom: '2.5', + left: '2.5', + pages: 'front' + }, + fsc: true }); try { - const myLetter = await new LettersApi(config).create(letterCreate); + const myPostcard = await new PostcardsApi(config).create(postcardCreate); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.letters.create({ - description: 'Demo Letter', + Lob.postcards.create({ + description: 'Demo Postcard job', to: { name: 'Harry Zhang', address_line1: '210 King St', @@ -20559,20 +9956,19 @@ paths: address_zip: '94107' }, from: 'adr_210a8d4b0b76d77b', - file: 'HTML Letter for {{name}}', + front: 'Front HTML for {{name}}', + back: 'Back HTML for {{name}}', merge_variables: { name: 'Harry' }, - color: true, - cards: ['card_c51ae96f5cebf3e'], - use_type: 'marketing', + use_type: 'marketing' qr_code : { position: 'relative', redirect_url: 'https://www.lob.com', - width: '2', - bottom: '2', - left: '2', - pages: '2,4-5' + width: '2.5', + bottom: '2.5', + left: '2.5', + pages: 'back' }, fsc: true }, function (err, res) { @@ -20581,11 +9977,11 @@ paths: label: NODE - lang: Ruby source: | - letterCreate = LetterEditable.new({ - description: "Demo Letter", + postcardCreate = PostcardEditable.new({ + description: "Demo Postcard job", from: "adr_210a8d4b0b76d77b", - file: "HTML Letter for {{name}}", - color: "true", + front: "Front HTML for {{name}}", + back: "Back HTML for {{name}}", to: AddressEditable.new({ name: "Harry Zhang", address_line1: "210 King St", @@ -20597,28 +9993,24 @@ paths: merge_variables: { name: "Harry" }, - cards: [ - "card_c51ae96f5cebf3e", - ], - use_type: "marketing", fsc: true }); - letterApi = LettersApi.new(config) + postcardApi = PostcardsApi.new(config) begin - createdLetter = letterApi.create(letterCreate) + createdPostcard = postcardApi.create(postcardCreate) rescue => err p err.message end label: RUBY - lang: Python source: | - letter_editable = LetterEditable( - description = "Demo Letter", + postcard_editable = PostcardEditable( + description = "Demo Postcard job", _from = "adr_210a8d4b0b76d77b", - file = "HTML Letter for {{name}}", - color = True, + front = "Front HTML for {{name}}", + back = "Back HTML for {{name}}", to = AddressEditable( name = "Harry Zhang", address_line1 = "210 King St", @@ -20630,31 +10022,28 @@ paths: merge_variables = MergeVariables( name = "Harry", ), - cards = [ - "card_c51ae96f5cebf3e", - ], use_type = "marketing", qr_code = { "position" : "relative", "redirect_url" : "https://www.lob.com", - "width" : "2", - "bottom" : "2", - "left" : "2", - "pages" : "1,3" + "width" : "2.5", + "bottom" : "2.5", + "left" : "2.5", + "pages" : "front" }, fsc = true ) with ApiClient(configuration) as api_client: - api = LettersApi(api_client) + api = PostcardsApi(api_client) try: - created_letter = api.create(letter_editable) + created_postcard = api.create(postcard_editable) except ApiException as e: print(e) label: PYTHON - lang: PHP - source: > + source: | $to = new OpenAPI\Client\Model\AddressEditable( array( "name" => "Harry Zhang", @@ -20666,6 +10055,9 @@ paths: ) ); + $merge_variables = new stdClass; + $merge_variables->name = "Harry"; + $use_type = "marketing"; $qr_code = new OpenAPI\Client\Model\QRCode( array( @@ -20674,45 +10066,29 @@ paths: "width" => "2", "bottom" => "2", "left" => "2", - "pages" => "1,3,5", + "pages" => "front,back" ) ); - - $merge_variables = new stdClass; - - $merge_variables->name = "Harry"; - - - $use_type = "marketing"; - $fsc = true; - - $apiInstance = new OpenAPI\Client\Api\LettersApi($config, new - GuzzleHttp\Client()); - - $letter_editable = new OpenAPI\Client\Model\LetterEditable( + $apiInstance = new OpenAPI\Client\Api\PostcardsApi($config, new GuzzleHttp\Client()); + $postcard_editable = new OpenAPI\Client\Model\PostcardEditable( array( - "description" => "Demo Letter", + "description" => "Demo Postcard job", "from" => "adr_210a8d4b0b76d77b", - "file" => "HTML Letter for {{name}}", - "color" => "true", + "front" => "Front HTML for {{name}}", + "back" => "Back HTML for {{name}}", "to" => $to, - "merge_variables" => $merge_variables, - "cards" => array( - "card_c51ae96f5cebf3e", - "card_thingy", - ), - "use_type" => $use_type; + "merge_variables" => $merge_variables, + "use_type" => $use_type, "qr_code" => $qr_code, - "fsc" => $fsc, + "fsc" => $fsc ) ); - try { - $result = $apiInstance->create($letter_editable); + $result = $apiInstance->create($postcard_editable); } catch (Exception $e) { echo $e->getMessage(), PHP_EOL; } @@ -20721,7 +10097,7 @@ paths: Map merge_variables = new HashMap(); merge_variables.put("name", "Harry"); - LettersApi apiInstance = new LettersApi(config); + PostcardsApi apiInstance = new PostcardsApi(config); AddressEditable to = new AddressEditable(); to.setName("Harry Zhang"); @@ -20737,34 +10113,29 @@ paths: qrCode.setWidth("2"); qrCode.setLeft("2"); qrCode.setBottom("2"); - qrCode.setPages("1,3,5"); - - List cards = new ArrayList(); - cards.add("card_c51ae96f5cebf3e"); - cards.add("card_thingy"); + qrCode.setPages("back"); try { - LetterEditable letterEditable = new LetterEditable(); - letterEditable.setDescription("Demo Letter"); - letterEditable.setFrom("adr_210a8d4b0b76d77b"); - letterEditable.setFile("HTML Letter for {{name}}"); - letterEditable.setColor(true); - letterEditable.setTo(to); - letterEditable.setMergeVariables(merge_variables); - letterEditable.setCards(cards); - letterEditable.setUseType("operational"); - letterEditable.setQRCode(qrCode); - letterEditable.setFsc(true); + PostcardEditable postcardEditable = new PostcardEditable(); + postcardEditable.setDescription("Demo Postcard job"); + postcardEditable.setFrom("adr_210a8d4b0b76d77b"); + postcardEditable.setFront("Front HTML for {{name}}"); + postcardEditable.setBack("Back HTML for {{name}}"); + postcardEditable.setTo(to); + postcardEditable.setMergeVariables(merge_variables); + postcardEditable.setUseType("operational"); + postcardEditable.setQRCode(qrCode); + postcardEditable.setFsc(true); - Letter result = apiInstance.create(letterEditable, null); + Postcard result = apiInstance.create(postcardEditable, null); } catch (ApiException e) { e.printStackTrace(); } label: JAVA - lang: Elixir source: | - Lob.Letter.create(%{ - description: 'Demo Letter', + Lob.Postcard.create(%{ + description: 'Demo Postcard job', to: %{ name: 'Harry Zhang', address_line1: '210 King St', @@ -20774,34 +10145,29 @@ paths: address_zip: '94107' }, from: 'adr_210a8d4b0b76d77b', - file: 'HTML Letter for {{name}}', + front: 'Front HTML for {{name}}', + back: 'Back HTML for {{name}}', merge_variables: %{ name: 'Harry' }, - color: true, - cards: ['card_c51ae96f5cebf3e'], - use_type: 'marketing', + use_type: 'marketing' qr_code: %{ position: 'relative', redirect_url: 'https://www.lob.com', width: '2', bottom: '2', left: '2', - pages: '1-2,5' + pages: 'front,back' }, fsc: true }) label: ELIXIR - lang: CSharp - source: > - Dictionary mergeVariables = new Dictionary(); - + source: | + Dictionary mergeVariables = new Dictionary(); mergeVariables.Add("name", "Harry"); - - LettersApi api = new LettersApi(config); - + PostcardsApi api = new PostcardsApi(config); AddressEditable to = new AddressEditable( "210 King St", // addressLine1 @@ -20809,14 +10175,12 @@ paths: "San Francisco", // addressCity "CA", // addressState "94107", // addressZip - default(CountryExtended), // addressCounty + CountryExtended.US, // addressCounty null, // description "Harry Zhang" // name ); - - UseType usetype = new UseType("marketing"); - + UseType usetype = new UseType('marketing'); QRCode qrCode = new QRCode( "relative", //position, @@ -20824,252 +10188,191 @@ paths: "2", //width "2", //left "2", //bottom - "1-2,5", //pages + "front", //pages ); - Fsc fsc = new Fsc(true); - - List cards = new List(); - - cards.Add("card_c51ae96f5cebf3e"); - - - LetterEditable letterEditable = new LetterEditable( - "Demo Letter", // description - default(Dictionary), // metadata + PostcardEditable postcardEditable = new PostcardEditable( + to.ToJson(), // to + "adr_249af768103d2810", // from + default(PostcardSize), // size + "Demo Postcard Job", // description + null, // metadata default(MailType), // mailType mergeVariables, // mergeVariables default(DateTime), // sendDate - true, // color - true, // doubleSided - LetterEditable.AddressPlacementEnum.TopFirstPage, // addressPlacement - default(Object), // returnEnvelope - default(int?), // perforatedPage - default(LetterEditableCustomEnvelope), // customEnvelope - to.ToJson(), // to - "adr_249af768103d2810", // from - "HTML Letter for {{name}}", // file - default(LetterEditable.ExtraServiceEnum?), // extraService - cards, // cards + "Back HTML for {{name}}", // front + "Back HTML for {{name}}", // back usetype, qrCode, fsc ); - try { - Letter result = api.create(letterEditable, null); + Postcard result = api.create(postcardEditable, null); } catch (ApiException e) { Console.WriteLine(e.ToString()); } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - var to = *lob.NewAddressEditable() - to.SetAddressLine1("210 King St") - to.SetAddressLine2("# 6100") - to.SetAddressCity("San Francisco") - to.SetAddressState("CA") - to.SetAddressZip("94107") - to.SetAddressCountry(lob.COUNTRYEXTENDED_US) - to.SetDescription("") - to.SetName("Harry Zhang") + var postcardCreate = *lob.NewPostcardEditable() + postcardCreate.SetDescription("Demo Postcard job") + postcardCreate.SetFrom("adr_210a8d4b0b76d77b") + postcardCreate.SetFront("Front HTML for {{name}}") + postcardCreate.SetBack("Back HTML for {{name}}") + postcardCreate.SetTo(to) + postcardCreate.SetFsc(true) - var letterCreate = *lob.NewLetterEditable() - - letterCreate.SetDescription("Demo Letter") - - letterCreate.SetFrom("adr_210a8d4b0b76d77b") - - letterCreate.SetFile("HTML Letter for {{name}}") - - letterCreate.SetColor("true") - - letterCreate.SetTo(to) - - letterCreate.SetFsc(true) - - - - createdletter, _, err := - apiClient.LettersApi.Create(context).LetterEditable(letterCreate).Execute() + createdpostcard, _, err := apiClient.PostcardsApi.Create(context).PostcardEditable(postcardCreate).Execute() if err != nil { return err } label: GO - /postcards/{psc_id}: + /qr_code_analytics: + get: + operationId: qr_codes_list + summary: List + 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. + tags: + - QR Codes + parameters: + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/include' + - $ref: '#/components/parameters/date_created' + - in: query + name: scanned + description: Filter list of responses to only include QR codes with at least one scan event. + schema: + type: boolean + - in: query + name: resource_ids + description: Filter by the resource ID. + schema: + type: array + maxItems: 100 + default: [] + responses: + '200': + description: Returns a list of QR Codes and their analytics. + content: + application/json: + schema: + allOf: + - type: object + properties: + object: + $ref: '#/components/schemas/object' + count: + $ref: '#/components/schemas/count' + total_count: + type: integer + description: Indicates the total number of records. Provided when the request specifies an "include" query parameter + scanned_count: + type: integer + description: Indicates the number of QR Codes out of `count` that were scanned atleast once. + data: + type: array + description: List of QR code analytics + items: + $ref: '#/components/schemas/qr_code_scans' + example: + data: + - resource_id: ltr_d5a5a89da9106f8 + date_created: '2019-07-27T23:49:01.511Z' + number_of_scans: 2 + 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' + - resource_id: psc_d5a5a89da9106f8 + date_created: '2022-09-27T23:49:01.511Z' + number_of_scans: 1 + scans: + - ip_location: 127.0.0.1 + scan_date: '2022-09-27T23:49:01.511Z' + object: list + count: 2 + scanned_count: 2 + total_count: 2 + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://api.lob.com/v1/qr_code_analytics?limit=2&scanned=true" \ + -u : + /domains/{domain_id}: parameters: - in: path - name: psc_id - description: id of the postcard + name: domain_id required: true + description: Unique identifier for a domain. schema: - $ref: '#/components/schemas/psc_id' + type: string get: - operationId: postcard_retrieve - summary: Retrieve - description: >- - Retrieves the details of an existing postcard. You need only supply the - unique customer identifier that was returned upon postcard creation. + operationId: domain_get + summary: Retrieve a domain + description: Retrieve details for a single domain. tags: - - Postcards + - URL Shortener responses: '200': - description: Returns a postcard object + description: Returns domain related details. content: application/json: schema: - $ref: '#/components/schemas/postcard' - examples: - basic: - value: - id: psc_208e45e48d271294 - description: null - metadata: {} - to: - id: adr_210a8d4b0b76d77b - description: null - name: null - company: LOB - 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: '2018-12-08T03:01:07.651Z' - date_modified: '2018-12-08T03:01:07.651Z' - object: address - url: >- - https://lob-assets.com/postcards/psc_208e45e48d271294.pdf?version=v1&expires=1619218302&signature=NfHHLBSr5tOHA_Z4kij4dKqZG8f3vMDtwvuFVeeF9pV_lylcjLsVVODhNCE5hR6-2slUr6t9WMNsi429Pj7_DA - carrier: USPS - front_template_id: null - back_template_id: null - date_created: '2021-03-24T22:51:42.838Z' - date_modified: '2021-03-24T22:51:42.838Z' - send_date: '2021-03-24T22:51:42.838Z' - use_type: marketing - fsc: false - object: postcard - full: - value: - id: psc_0e03d1ad7d31f151 - description: null - metadata: {} - to: - id: adr_c7cb63d68f8d6 - description: null - name: JANE DOE - company: LOB - phone: '5555555555' - email: jane.doe@lob.com - address_line1: 370 WATER ST - address_line2: '' - address_city: SUMMERSIDE - address_state: PE - address_zip: C1N 1C4 - address_country: CANADA - metadata: {} - date_created: '2018-12-08T03:01:07.651Z' - date_modified: '2018-12-08T03:01:07.651Z' - object: address - recipient_moved: false - from: - id: adr_210a8d4b0b76d77b - 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: '2018-12-08T03:01:07.651Z' - date_modified: '2018-12-08T03:01:07.651Z' - object: address - url: >- - https://lob-assets.com/postcards/psc_208e45e48d271294.pdf?version=v1&expires=1619218302&signature=NfHHLBSr5tOHA_Z4kij4dKqZG8f3vMDtwvuFVeeF9pV_lylcjLsVVODhNCE5hR6-2slUr6t9WMNsi429Pj7_DA - carrier: USPS - front_template_id: tmpl_93c369f06171958 - back_template_id: tmpl_93c369f06171958 - front_template_version_id: vrsn_a83e044941c393b - back_template_version_id: vrsn_a83e044941c393b - tracking_events: [] - size: 6x11 - mail_type: usps_first_class - merge_variables: {} - 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 - expected_delivery_date: '2021-03-30' - date_created: '2021-03-24T22:51:42.838Z' - date_modified: '2021-03-24T22:51:42.838Z' - send_date: '2021-03-24T22:51:42.838Z' - use_type: marketing - fsc: false - object: postcard + $ref: '#/components/schemas/domain_response' default: - $ref: '#/components/responses/mailpiece_error' + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/postcards/psc_5c002b86ce47537a \ - -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: + curl -X GET "https://api.lob.com/v1/domains/{domain_id}" \ + -u : label: CURL - lang: Typescript source: | try { - const postcard = await new PostCardsApi(config).get('psc_xxxx'); + const domain = await new DomainsApi(config).get('xxxxxx'); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.postcards.retrieve('psc_5c002b86ce47537a', function (err, res) { + Lob.domains.retrieve('xxxxxx', function (err, res) { console.log(err, res); }); label: NODE - lang: Ruby source: | - letterApi = LettersApi.new(config) + domainsAPI = DomainsApi.new(config) begin - retrievedLetter = letterApi.get("ltr_4868c3b754655f90") + retrievedDomain = domainsAPI.get("xxxxxx") rescue => err p err.message end @@ -21077,113 +10380,173 @@ paths: - lang: Python source: | with ApiClient(configuration) as api_client: - api = PostcardsApi(api_client) + api = DomainsApi(api_client) try: - postcard = api.get("psc_5c002b86ce47537a") + domain = api.get("xxxxxx") except ApiException as e: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\PostcardsApi($config, new - GuzzleHttp\Client()); - + source: | + $apiInstance = new OpenAPI\Client\Api\DomainsApi($config, new GuzzleHttp\Client()); try { - $result = $apiInstance->get("psc_5c002b86ce47537a"); + $result = $apiInstance->get("xxxxxx"); } catch (Exception $e) { echo $e->getMessage(), PHP_EOL; } - lang: Java source: | - PostcardsApi apiInstance = new PostcardsApi(config); + DomainsApi apiInstance = new DomainsApi(config); try { - Postcard response = apiInstance.get("psc_5c002b86ce47537a"); + Domain response = apiInstance.get("xxxxxx"); } catch (ApiException e) { e.printStackTrace(); } label: JAVA - lang: Elixir source: | - Lob.Postcard.find("psc_5c002b86ce47537a") + Lob.Domain.retrieve("xxxxxx") label: ELIXIR - lang: CSharp source: | - PostcardsApi api = new PostcardsApi(config); + DomainsApi api = new DomainsApi(config); try { - Postcard response = api.get("psc_5c002b86ce47537a"); + Domain response = api.get("xxxxxx"); } catch (ApiException e) { Console.WriteLine(e.ToString()); } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - - fetchedPostcard, _, err := - apiClient.PostcardsApi.Get(context,"psc_5c002b86ce47537a").Execute() - + fetchedDomain, _, err := apiClient.DomainsApi.Get(context,"xxxxxx").Execute() if err != nil { return err } label: GO delete: - operationId: postcard_delete - summary: Cancel - 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 Print & Mail Edition to gain access. + operationId: domain_delete + summary: Delete a Domain + description: Delete a registered domain. This operation can only be performed if all associated links with the domain are deleted. tags: - - Postcards + - URL Shortener responses: '200': - $ref: '#/components/responses/postcard_deleted' + description: Returns the deleted link object. + content: + application/json: + schema: + $ref: '#/components/schemas/domain_delete' + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' + /domains: + post: + operationId: domain_create + summary: Create Domain + description: Add a new custom domain that can be used to create custom links. + tags: + - URL Shortener + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/domains' + examples: + basic: + value: + domain: lob.st + test: + value: + domain: lob.st + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/domains' + examples: + basic: + value: + domain: lob.st + test: + value: + domain: lob.st + multipart/form-data: + schema: + $ref: '#/components/schemas/domains' + examples: + basic: + value: + domain: lob.st + test: + value: + domain: lob.st + responses: + '200': + description: Returns a domain object with details. + content: + application/json: + schema: + $ref: '#/components/schemas/domain_response' default: - $ref: '#/components/responses/mailpiece_error' + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' + example: + error: + code: invalid + message: domain is required + status_code: 422 x-codeSamples: - lang: Shell - source: > - curl -X DELETE https://api.lob.com/v1/postcards/psc_5c002b86ce47537a - \ - -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: + source: | + curl https://api.lob.com/v1/domains \ + -u : \ + -d "domain=lob.st" label: CURL - lang: Typescript source: | + const domainApi = await new DomainsApi(config); + const domainData: DomainsWritable = { + domain: 'lob.st' + } try { - const deletePostcard = await new PostcardsApi(config).delete('psc_xxxx'); + const createdDomain = await domainApi.createDomain(domainData); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.postcards.delete('psc_5c002b86ce47537a', function (err, res) { + Lob.domains.create({ + domain: 'lob.st' + }, function (err, res) { console.log(err, res); }); label: NODE - lang: Ruby source: | - letterApi = LettersApi.new(config) + domainsAPI = DomainsApi.new(config) + + domainsData = DomainsWritable.new({ + domain: "lob.st" + }) begin - deletedLetter = letterApi.cancel("ltr_4868c3b754655f90") + createdDomain = domainsAPI.create(domainsData) rescue => err p err.message end @@ -21191,128 +10554,108 @@ paths: - lang: Python source: | with ApiClient(configuration) as api_client: - api = PostcardsApi(api_client) + api = DomainsApi(api_client) + + domains_data = DomainsWritable( + domain: "lob.st" + ) try: - deleted_resource = api.cancel("psc_5c002b86ce47537a") + domain = api.create(domains_data) except ApiException as e: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\PostcardsApi($config, new - GuzzleHttp\Client()); + source: | + $apiInstance = new OpenAPI\Client\Api\DomainsApi($config, new GuzzleHttp\Client()); + $domainsData = new OpenAPI\Client\Model\DomainsWritable(array( + 'domain' => 'lob.st', + )); try { - $result = $apiInstance->cancel("psc_5c002b86ce47537a"); + $result = $apiInstance->create($domainsData); } catch (Exception $e) { echo $e->getMessage(), PHP_EOL; } - lang: Java source: | - PostcardsApi apiInstance = new PostcardsApi(config); + DomainsWritable domain = new DomainsWritable(); + domain.setDomain("lob.st"); + + DomainsApi apiInstance = new DomainsApi(config); try { - PostcardDeletion response = apiInstance.cancel("psc_5c002b86ce47537a"); + apiInstance.create(domain); } catch (ApiException e) { - e.printStackTrace(); + e.printStackTrace(); } label: JAVA - lang: Elixir source: | - Lob.Postcard.destroy("psc_5c002b86ce47537a") + Lob.Domain.create(%{ + domain: "lob.st" + }) label: ELIXIR - lang: CSharp source: | - PostcardsApi api = new PostcardsApi(config); + DomainsWritable domain = new DomainsWritable( + "lob.st" + ) + + DomainsApi api = new DomainsApi(config); try { - PostcardDeletion response = api.delete("psc_5c002b86ce47537a"); + api.create(domain, null); } catch (ApiException e) { Console.WriteLine(e.ToString()); } label: CSHARP - - lang: Go - source: > - var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - - - var apiClient = *lob.NewAPIClient(configuration) - - - deletedPostcard, _, err := apiClient.PostcardsApi.Delete(context, - "psc_5c002b86ce47537a").Execute() - - - if err != nil { - return err - } - label: GO - /postcards: get: - operationId: postcards_list - summary: List - description: >- - Returns a list of your postcards. The addresses are returned sorted by - creation date, with the most recently created addresses appearing first. + operationId: domain_list + summary: List all domains + description: Retrieve a list of all created domains. tags: - - Postcards - 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' - - in: query - name: size - description: >- - Specifies the size of the postcard. Only `4x6` postcards can be sent - to international destinations. - schema: - type: array - items: - $ref: '#/components/schemas/postcard_size' - - $ref: '#/components/parameters/scheduled' - - $ref: '#/components/parameters/send_date' - - $ref: '#/components/parameters/mail_type' - - $ref: '#/components/parameters/sort_by' + - URL Shortener responses: '200': - $ref: '#/components/responses/all_postcards' + description: Returns a list of all domains. + content: + application/json: + schema: + $ref: '#/components/schemas/domains_response' default: - $ref: '#/components/responses/mailpiece_error' + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' x-codeSamples: - lang: Shell source: | - curl -X GET "https://api.lob.com/v1/postcards?limit=2" \ - -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: + curl -X GET "https://api.lob.com/v1/domains?limit=2" \ + -u : label: CURL - - lang: typescript + - lang: Typescript source: | try { - const postcards = await new PostcardsApi(config).list(2); + const domains = await new DomainsApi(config).list(2); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.postcards.list({limit: 2}, function (err, res) { + Lob.domains.list({limit: 2}, function (err, res) { console.log(err, res); }); label: NODE - lang: Ruby source: | - postcardsApi = PostcardsApi.new(config) + domainsApi = DomainsApi.new(config) begin - postcards = postcardsApi.list({ limit: 2 }) + domains = domainsApi.list({ limit: 2 }) rescue => err p err.message end @@ -21320,18 +10663,16 @@ paths: - lang: Python source: | with ApiClient(configuration) as api_client: - api = PostcardsApi(api_client) + api = DomainsApi(api_client) try: - postcards = api.list(limit=2) + domains = api.list(limit=2) except ApiException as e: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\PostcardsApi($config, new - GuzzleHttp\Client()); - + source: | + $apiInstance = new OpenAPI\Client\Api\DomainsApi($config, new GuzzleHttp\Client()); try { $result = $apiInstance->list( @@ -21342,21 +10683,15 @@ paths: } - lang: Java source: | - PostcardsApi apiInstance = new PostcardsApi(config); + DomainsApi apiInstance = new DomainsApi(config); try { - PostcardList response = apiInstance.list( + DomainsList response = apiInstance.list( 2, // limit null, // before null, // after null, // include null, // dateCreated - null, // metadata - null, // size - null, // scheduled - null, // sendDate - null, // mailType - null // sortBy ); } catch (ApiException e) { e.printStackTrace(); @@ -21364,798 +10699,454 @@ paths: label: JAVA - lang: Elixir source: | - Lob.Postcard.list(%{limit: 2}) + Lob.Domains.list(%{limit: 2}) label: ELIXIR - lang: CSharp - source: > - PostcardsApi api = new PostcardsApi(config); - - - List includeList = new List(); - - includeList.Add("total_count"); - - Dictionary metadata = new Dictionary(); - - metadata.Add("name", "Harry"); - - Dictionary dateCreated = new Dictionary(); - - DateTime dateCreatedDate = DateTime.Today.AddMonths(-1); - - dateCreated.Add("lt", dateCreatedDate); - - Dictionary sendDate = new Dictionary(); - - sendDate.Add("lt", - DateTime.Now.ToString("yyyy-MM-ddTHH\\:mm\\:ss.fffffffzzz")); - - SortBy3 sortBy = new SortBy3(SortBy3.DateCreatedEnum.Asc); - - List sizeArray = new List(); - - sizeArray.Add(PostcardSize._4x6); - + source: | + DomainsApi api = new DomainsApi(config); try { - PostcardList response = api.list( + DomainsList response = api.list( 2, // limit null, // before null, // after - includeList, // include - dateCreated, // dateCreated - metadata, // metadata - sizeArray, // size - true, // scheduled - sendDate, // sendDate - MailType.FirstClass, // mailType - sortBy // sortBy + null, // include + null, // dateCreated ); } catch (ApiException e) { Console.WriteLine(e.ToString()); } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - - PostcardList = apiClient.PostcardsApi.List(context).Execute() - + DomainsList = apiClient.DomainsApi.List(context).Execute() if err != nil { return err } label: GO + /links/{link_id}: + parameters: + - in: path + name: link_id + required: true + description: Unique identifier for a link. + schema: + type: string + get: + operationId: links_get + summary: Retrieve a link + description: Retrieves a single shortened link. + tags: + - URL Shortener + responses: + '200': + description: Returns a single link. + content: + application/json: + schema: + $ref: '#/components/schemas/link_response' + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://api.lob.com/v1/links/" \ + -u : + label: CURL + patch: + operationId: link_update + summary: Update a Link + description: Update any of the properties of a shortened link. + tags: + - URL Shortener + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/link_update' + examples: + basic: + value: + resource_id: ltr_133 + test: + value: + redirect_link: ltr_133 + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/link_update' + examples: + basic: + value: + resource_id: ltr_133 + test: + value: + resource_id: ltr_133 + multipart/form-data: + schema: + $ref: '#/components/schemas/link_update' + examples: + basic: + value: + resource_id: ltr_133 + test: + value: + resource_id: ltr_133 + responses: + '200': + description: Returns the updated link. + content: + application/json: + schema: + $ref: '#/components/schemas/link_response' + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' + example: + error: + code: invalid + message: redirect_link is required + status_code: 422 + x-codeSamples: + - lang: Shell + source: | + curl https://api.lob.com/v1/links/ \ + -u : \ + -d "redirect_link=https://www.lob.com" + label: CURL + delete: + operationId: links_delete + summary: Delete Link + description: Delete the shortened link. + tags: + - URL Shortener + responses: + '200': + description: Returns the deleted short link object + content: + application/json: + schema: + $ref: '#/components/schemas/link_delete_response' + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' + /links: post: - operationId: postcard_create - summary: Create - description: Creates a new postcard given information + operationId: link_create + summary: Create Link + description: Given a long URL, shorten your URL either by using a custom domain or Lob's own short domain. tags: - - Postcards - parameters: - - $ref: '#/components/parameters/idem-header' - - $ref: '#/components/parameters/idem-query' + - URL Shortener requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/postcard_editable' - example: - description: demo - to: - description: Harry - Office - name: Harry Zhang - company: Lob - email: harry@lob.com - phone: '5555555555' - address_line1: 210 King St - address_line2: '# 6100' - address_city: San Francisco - address_state: CA - address_zip: '94107' - address_country: US - from: - description: Harry - Office - name: Harry Zhang - company: Lob - email: harry@lob.com - phone: '5555555555' - address_line1: 210 King St - address_line2: '# 6100' - address_city: San Francisco - address_state: CA - address_zip: '94107' - address_country: US - front: tmpl_a1234dddg - back: tmpl_a1234dddg - size: 6x9 - mail_type: usps_first_class - merge_variables: - name: Harry - metadata: - spiffy: 'true' - send_date: '2017-11-01T00:00:00.000Z' - use_type: marketing - qr_code: - position: relative - redirect_url: https://www.lob.com - width: '2.5' - top: '2.5' - right: '2.5' - pages: front,back - fsc: true + $ref: '#/components/schemas/link_single' + examples: + basic: + value: + redirect_link: https://www.lob.com + slug: a1b2c3 + test: + value: + redirect_link: https://www.lob.com + slug: a1b2c3 application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/postcard_editable' - example: - description: demo - to: - description: Harry - Office - name: Harry Zhang - company: Lob - email: harry@lob.com - phone: '5555555555' - address_line1: 210 King St - address_line2: '# 6100' - address_city: San Francisco - address_state: CA - address_zip: '94107' - address_country: US - from: - description: Harry - Office - name: Harry Zhang - company: Lob - email: harry@lob.com - phone: '5555555555' - address_line1: 210 King St - address_line2: '# 6100' - address_city: San Francisco - address_state: CA - address_zip: '94107' - address_country: US - front: tmpl_c94e83ca2cd5121 - back: tmpl_c94e83ca2cd5121 - size: 6x9 - mail_type: usps_first_class - merge_variables: - name: Harry - metadata: - spiffy: 'true' - send_date: '2017-11-01T00:00:00.000Z' - use_type: marketing - qr_code: - position: relative - redirect_url: https://www.lob.com - width: '2.5' - bottom: '2.5' - right: '2.5' - pages: back - fsc: true - encoding: - to: - style: deepObject - explode: true - from: - style: deepObject - explode: true - merge_variables: - style: deepObject - explode: true - metadata: - style: deepObject - explode: true + $ref: '#/components/schemas/link_single' + examples: + basic: + value: + redirect_link: https://www.lob.com + domain: lob.st + test: + value: + redirect_link: https://www.lob.com + domain: lob.st multipart/form-data: schema: - $ref: '#/components/schemas/postcard_editable' - example: - description: demo - to: - description: Harry - Office - name: Harry Zhang - company: Lob - email: harry@lob.com - phone: '5555555555' - address_line1: 210 King St - address_line2: '# 6100' - address_city: San Francisco - address_state: CA - address_zip: '94107' - address_country: US - from: - description: Harry - Office - name: Harry Zhang - company: Lob - email: harry@lob.com - phone: '5555555555' - address_line1: 210 King St - address_line2: '# 6100' - address_city: San Francisco - address_state: CA - address_zip: '94107' - address_country: US - front: tmpl_a1234dddg - back: tmpl_a1234dddg - size: 6x9 - mail_type: usps_first_class - merge_variables: - name: Harry - metadata: - spiffy: 'true' - send_date: '2017-11-01T00:00:00.000Z' - use_type: marketing - qr_code: - position: relative - redirect_url: https://www.lob.com - width: '2.5' - bottom: '2.5' - left: '2.5' - pages: front - fsc: true + $ref: '#/components/schemas/link_single' + examples: + basic: + value: + redirect_link: https://www.lob.com + test: + value: + redirect_link: https://www.lob.com + responses: + '200': + description: Returns a successfully created link. + content: + application/json: + schema: + $ref: '#/components/schemas/link_response' + default: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' + example: + error: + code: invalid + message: redirect_link is required + status_code: 422 + x-codeSamples: + - lang: Shell + source: | + curl https://api.lob.com/v1/links/shorten \ + -u : \ + -d "redirect_link=https://www.lob.com" + label: CURL + get: + operationId: links_list + summary: List all links + description: Retrieves a list of shortened links. The list is sorted by creation date, with the most recently created appearing first. + tags: + - URL Shortener + parameters: + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/offset' responses: '200': - $ref: '#/components/responses/post_postcard' + description: Returns the deleted link object. + content: + application/json: + schema: + $ref: '#/components/schemas/links_response' default: - $ref: '#/components/responses/mailpiece_error' + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/postcards \ - -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \ - -d 'description=Demo Postcard job' \ - -d 'to[name]=Harry Zhang' \ - -d 'to[address_line1]=210 King St' \ - -d 'to[address_line2]=# 6100' \ - -d 'to[address_city]=San Francisco' \ - -d 'to[address_state]=CA' \ - -d 'to[address_zip]=94107' \ - -d 'from=adr_210a8d4b0b76d77b' \ - --data-urlencode 'front=Front HTML for {{name}}' \ - --data-urlencode 'back=Back HTML for {{name}}' \ - -d 'merge_variables[name]=Harry' \ - -d 'use_type=marketing' \ - -d 'qr_code[position]=relative' \ - -d 'qr_code[redirect_url]=https://www.lob.com' \ - -d 'qr_code[width]=2.5' \ - -d 'qr_code[bottom]=2.5' \ - -d 'qr_code[left]=2.5' \ - -d 'qr_code[pages]=front,back' \ - -d 'fsc=true' + curl -X GET "https://api.lob.com/v1/links?limit=2" \ + -u : label: CURL - lang: Typescript - source: > - const postcardCreate = new PostcardEditable({ - - to: new AddressEditable({ - name: 'Harry Zhang', - address_line1: '210 King St', - address_line2: '# 6100', - address_city: 'San Francisco', - address_state: 'CA', - address_zip: '94107' - }), - - from: 'adr_xxxx', - - front: - - 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/4x6_pc_template.pdf', - - back: - 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/4x6_pc_template.pdf', - - use_type: 'marketing', - - qr_code : { - position: 'relative', - redirect_url: 'https://www.lob.com', - width: '2.5', - bottom: '2.5', - left: '2.5', - pages: 'front' - }, - - fsc: true - - }); - - + source: | try { - const myPostcard = await new PostcardsApi(config).create(postcardCreate); + const links = await new LinksApi(config).list(2); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.postcards.create({ - description: 'Demo Postcard job', - to: { - name: 'Harry Zhang', - address_line1: '210 King St', - address_line2: '# 6100', - address_city: 'San Francisco', - address_state: 'CA', - address_zip: '94107' - }, - from: 'adr_210a8d4b0b76d77b', - front: 'Front HTML for {{name}}', - back: 'Back HTML for {{name}}', - merge_variables: { - name: 'Harry' - }, - use_type: 'marketing' - qr_code : { - position: 'relative', - redirect_url: 'https://www.lob.com', - width: '2.5', - bottom: '2.5', - left: '2.5', - pages: 'back' - }, - fsc: true - }, function (err, res) { + Lob.links.list({limit: 2}, function (err, res) { console.log(err, res); }); label: NODE - lang: Ruby source: | - postcardCreate = PostcardEditable.new({ - description: "Demo Postcard job", - from: "adr_210a8d4b0b76d77b", - front: "Front HTML for {{name}}", - back: "Back HTML for {{name}}", - to: AddressEditable.new({ - name: "Harry Zhang", - address_line1: "210 King St", - address_line2: "# 6100", - address_city: "San Francisco", - address_state: "CA", - address_zip: "94107", - }), - merge_variables: { - name: "Harry" - }, - fsc: true - }); - - postcardApi = PostcardsApi.new(config) + linksApi = LinksApi.new(config) begin - createdPostcard = postcardApi.create(postcardCreate) + links = linksApi.list({ limit: 2 }) rescue => err p err.message end label: RUBY - lang: Python source: | - postcard_editable = PostcardEditable( - description = "Demo Postcard job", - _from = "adr_210a8d4b0b76d77b", - front = "Front HTML for {{name}}", - back = "Back HTML for {{name}}", - to = AddressEditable( - name = "Harry Zhang", - address_line1 = "210 King St", - address_line2 = "# 6100", - address_city = "San Francisco", - address_state = "CA", - address_zip = "94107", - ), - merge_variables = MergeVariables( - name = "Harry", - ), - use_type = "marketing", - qr_code = { - "position" : "relative", - "redirect_url" : "https://www.lob.com", - "width" : "2.5", - "bottom" : "2.5", - "left" : "2.5", - "pages" : "front" - }, - fsc = true - ) - with ApiClient(configuration) as api_client: - api = PostcardsApi(api_client) - - try: - created_postcard = api.create(postcard_editable) - except ApiException as e: - print(e) - label: PYTHON - - lang: PHP - source: > - $to = new OpenAPI\Client\Model\AddressEditable( - array( - "name" => "Harry Zhang", - "address_line1" => "210 King St", - "address_line2" => "# 6100", - "address_city" => "San Francisco", - "address_state" => "CA", - "address_zip" => "94107", - ) - ); - - - $merge_variables = new stdClass; - - $merge_variables->name = "Harry"; - - $use_type = "marketing"; - - - $qr_code = new OpenAPI\Client\Model\QRCode( - array( - "position" => "relative", - "redirect_url" => "https://www.lob.com", - "width" => "2", - "bottom" => "2", - "left" => "2", - "pages" => "front,back" - ) - ); - - - $fsc = true; - - - $apiInstance = new OpenAPI\Client\Api\PostcardsApi($config, new - GuzzleHttp\Client()); - - $postcard_editable = new OpenAPI\Client\Model\PostcardEditable( - array( - "description" => "Demo Postcard job", - "from" => "adr_210a8d4b0b76d77b", - "front" => "Front HTML for {{name}}", - "back" => "Back HTML for {{name}}", - "to" => $to, - "merge_variables" => $merge_variables, - "use_type" => $use_type, - "qr_code" => $qr_code, - "fsc" => $fsc - ) - ); - - - try { - $result = $apiInstance->create($postcard_editable); - } catch (Exception $e) { - echo $e->getMessage(), PHP_EOL; - } - - lang: Java - source: | - Map merge_variables = new HashMap(); - merge_variables.put("name", "Harry"); - - PostcardsApi apiInstance = new PostcardsApi(config); - - AddressEditable to = new AddressEditable(); - to.setName("Harry Zhang"); - to.setAddressLine1("210 King St"); - to.setAddressLine2("# 6100"); - to.setAddressCity("San Francisco"); - to.setAddressState("CA"); - to.setAddressZip("94107"); - - QRCode qrCode = new QRCode(); - qrCode.setPosition("relative"); - qrCode.setRedirectUrl("https://www.lob.com"); - qrCode.setWidth("2"); - qrCode.setLeft("2"); - qrCode.setBottom("2"); - qrCode.setPages("back"); + api = LinksApi(api_client) + + try: + links = api.list(limit=2) + except ApiException as e: + print(e) + label: PYTHON + - lang: PHP + source: | + $apiInstance = new OpenAPI\Client\Api\LinksApi($config, new GuzzleHttp\Client()); try { - PostcardEditable postcardEditable = new PostcardEditable(); - postcardEditable.setDescription("Demo Postcard job"); - postcardEditable.setFrom("adr_210a8d4b0b76d77b"); - postcardEditable.setFront("Front HTML for {{name}}"); - postcardEditable.setBack("Back HTML for {{name}}"); - postcardEditable.setTo(to); - postcardEditable.setMergeVariables(merge_variables); - postcardEditable.setUseType("operational"); - postcardEditable.setQRCode(qrCode); - postcardEditable.setFsc(true); + $result = $apiInstance->list( + 2, // limit + ); + } catch (Exception $e) { + echo $e->getMessage(), PHP_EOL; + } + - lang: Java + source: | + LinksApi apiInstance = new LinksApi(config); - Postcard result = apiInstance.create(postcardEditable, null); + try { + LinksList response = apiInstance.list( + 2, // limit + null, // before + null, // after + null, // include + null, // dateCreated + ); } catch (ApiException e) { e.printStackTrace(); } label: JAVA - lang: Elixir source: | - Lob.Postcard.create(%{ - description: 'Demo Postcard job', - to: %{ - name: 'Harry Zhang', - address_line1: '210 King St', - address_line2: '# 6100', - address_city: 'San Francisco', - address_state: 'CA', - address_zip: '94107' - }, - from: 'adr_210a8d4b0b76d77b', - front: 'Front HTML for {{name}}', - back: 'Back HTML for {{name}}', - merge_variables: %{ - name: 'Harry' - }, - use_type: 'marketing' - qr_code: %{ - position: 'relative', - redirect_url: 'https://www.lob.com', - width: '2', - bottom: '2', - left: '2', - pages: 'front,back' - }, - fsc: true - }) + Lob.Links.list(%{limit: 2}) label: ELIXIR - lang: CSharp - source: > - Dictionary mergeVariables = new Dictionary(); - - mergeVariables.Add("name", "Harry"); - - - PostcardsApi api = new PostcardsApi(config); - - - AddressEditable to = new AddressEditable( - "210 King St", // addressLine1 - "# 6100", // addressLine2 - "San Francisco", // addressCity - "CA", // addressState - "94107", // addressZip - CountryExtended.US, // addressCounty - null, // description - "Harry Zhang" // name - ); - - - UseType usetype = new UseType('marketing'); - - - QRCode qrCode = new QRCode( - "relative", //position, - "https://www.lob.com", //redirect_url - "2", //width - "2", //left - "2", //bottom - "front", //pages - ); - - - Fsc fsc = new Fsc(true); - - - PostcardEditable postcardEditable = new PostcardEditable( - to.ToJson(), // to - "adr_249af768103d2810", // from - default(PostcardSize), // size - "Demo Postcard Job", // description - null, // metadata - default(MailType), // mailType - mergeVariables, // mergeVariables - default(DateTime), // sendDate - "Back HTML for {{name}}", // front - "Back HTML for {{name}}", // back - usetype, - qrCode, - fsc - ); - + source: | + LinksApi api = new LinksApi(config); try { - Postcard result = api.create(postcardEditable, null); + LinksList response = api.list( + 2, // limit + null, // before + null, // after + null, // include + null, // dateCreated + ); } catch (ApiException e) { Console.WriteLine(e.ToString()); } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - - - var to = *lob.NewAddressEditable() - - to.SetAddressLine1("210 King St") - - to.SetAddressLine2("# 6100") - - to.SetAddressCity("San Francisco") - - to.SetAddressState("CA") - - to.SetAddressZip("94107") - - to.SetAddressCountry(lob.COUNTRYEXTENDED_US) - - to.SetDescription("") - - to.SetName("Harry Zhang") - - - var postcardCreate = *lob.NewPostcardEditable() - - postcardCreate.SetDescription("Demo Postcard job") - - postcardCreate.SetFrom("adr_210a8d4b0b76d77b") - - postcardCreate.SetFront("Front HTML for {{name}}") - - postcardCreate.SetBack("Back HTML for {{name}}") - - postcardCreate.SetTo(to) - - postcardCreate.SetFsc(true) - - - - createdpostcard, _, err := - apiClient.PostcardsApi.Create(context).PostcardEditable(postcardCreate).Execute() - - + LinksList = apiClient.LinksApi.List(context).Execute() if err != nil { return err } label: GO - /qr_code_analytics: - get: - operationId: qr_codes_list - summary: List - 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. - tags: - - QR Codes - parameters: - - $ref: '#/components/parameters/limit' - - $ref: '#/components/parameters/offset' - - $ref: '#/components/parameters/include' - - $ref: '#/components/parameters/date_created' - - in: query - name: scanned - description: >- - Filter list of responses to only include QR codes with at least one - scan event. - schema: - type: boolean - - in: query - name: resource_ids - description: Filter by the resource ID. - schema: - type: array - maxItems: 100 - default: [] - responses: - '200': - description: Returns a list of QR Codes and their analytics. - content: - application/json: - schema: - allOf: - - type: object - properties: - object: - $ref: '#/components/schemas/object' - count: - $ref: '#/components/schemas/count' - total_count: - type: integer - description: >- - Indicates the total number of records. Provided when - the request specifies an "include" query parameter - scanned_count: - type: integer - description: >- - Indicates the number of QR Codes out of `count` that - were scanned atleast once. - data: - type: array - description: List of QR code analytics - items: - $ref: '#/components/schemas/qr_code_scans' - example: - data: - - resource_id: ltr_d5a5a89da9106f8 - date_created: '2019-07-27T23:49:01.511Z' - number_of_scans: 2 - 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' - - resource_id: psc_d5a5a89da9106f8 - date_created: '2022-09-27T23:49:01.511Z' - number_of_scans: 1 - scans: - - ip_location: 127.0.0.1 - scan_date: '2022-09-27T23:49:01.511Z' - object: list - count: 2 - scanned_count: 2 - total_count: 2 - x-codeSamples: - - lang: Shell - source: > - curl -X GET - "https://api.lob.com/v1/qr_code_analytics?limit=2&scanned=true" \ - - -u : - /domains/{domain_id}: + /self_mailers/{sfm_id}: parameters: - in: path - name: domain_id + name: sfm_id + description: id of the self_mailer required: true - description: Unique identifier for a domain. schema: - type: string + $ref: '#/components/schemas/sfm_id' get: - operationId: domain_get - summary: Retrieve a domain - description: Retrieve details for a single domain. + operationId: self_mailer_retrieve + summary: Retrieve + 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. tags: - - URL Shortener + - Self Mailers responses: '200': - description: Returns domain related details. - content: - application/json: - schema: - $ref: '#/components/schemas/domain_response' - default: - description: Error + description: Returns a self_mailer object content: application/json: schema: - $ref: '#/components/schemas/error' + $ref: '#/components/schemas/self_mailer' + example: + id: sfm_8ffbe811dea49dcf + description: April Campaign + metadata: {} + to: + id: adr_bae820679f3f536b + 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-05T17:47:53.767Z' + date_modified: '2017-09-05T17:47:53.767Z' + deleted: true + object: address + from: + id: adr_210a8d4b0b76d77b + 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-05T17:47:53.767Z' + date_modified: '2017-09-05T17:47:53.767Z' + deleted: true + object: address + url: https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA + outside_template_id: tmpl_a3cb937f26d7eec + inside_template_id: tmpl_a3cb937f26d7eec + inside_template_version_id: vrsn_bfdf70893b00a85 + outside_template_version_id: vrsn_bfdf70893b00a85 + carrier: USPS + tracking_events: [] + thumbnails: + - small: https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA + medium: https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_1.png?version=v1&expires=1618512040&signature=ryxN7bsXGtw_GRFSP3Cs3A3IYjxZi3cW9BHDCNgMt6p3nobVmsc_iFHt2e-S7ndAXhhN7nP-MQVov3bt3r37BQ + large: https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg + - small: https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_2.png?version=v1&expires=1618512040&signature=3gTgU7Fd3KoT_vNlQnTGptRps5ZgnkhSnPrAwk7L98higIzSwfKoLvuu_DIpMM48dHbxckKT9waR8euJ4KSDBQ + medium: https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_2.png?version=v1&expires=1618512040&signature=Ue1lw5CMj7KRx6cMQL8xPeazaHCdJzWcACd1w3acuYPnWkVIpSt62OIO7hAtpAQK9xm1dhhlFj0rqRZMdRMMBA + large: https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_2.png?version=v1&expires=1618512040&signature=cICc7HEm1xG_eyM4a_wtvPk2FqoLRmtgGa29kJisWnMIYBL0OkyzG4ZCYGMhp-5cZpJlSpXfTgGKh_Qmeo1TDw + merge_variables: + name: null + size: 6x18_bifold + mail_type: usps_first_class + expected_delivery_date: '2021-03-24' + date_created: '2021-03-16T18:40:40.504Z' + date_modified: '2021-03-16T18:40:40.504Z' + send_date: '2021-03-16T18:45:40.493Z' + use_type: marketing + fsc: false + object: self_mailer + default: + $ref: '#/components/responses/mailpiece_error' x-codeSamples: - lang: Shell source: | - curl -X GET "https://api.lob.com/v1/domains/{domain_id}" \ - -u : + curl -X GET "https://api.lob.com/v1/self_mailers/sfm_8ffbe811dea49dcf" \ + -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: label: CURL - - lang: Typescript + - lang: typescript source: | try { - const domain = await new DomainsApi(config).get('xxxxxx'); + const selfMailer = await new SelfMailersApi(config).get('sfm_xxxx'); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.domains.retrieve('xxxxxx', function (err, res) { + Lob.selfMailers.retrieve('sfm_8ffbe811dea49dcf', function (err, res) { console.log(err, res); }); label: NODE - lang: Ruby source: | - domainsAPI = DomainsApi.new(config) + selfMailerApi = SelfMailersApi.new(config) begin - retrievedDomain = domainsAPI.get("xxxxxx") + retrievedSelfMailer = selfMailerApi.get("sfm_8ffbe811dea49dcf") rescue => err p err.message end @@ -22163,183 +11154,96 @@ paths: - lang: Python source: | with ApiClient(configuration) as api_client: - api = DomainsApi(api_client) + api = SelfMailersApi(api_client) try: - domain = api.get("xxxxxx") + self_mailer = api.get("sfm_8ffbe811dea49dcf") except ApiException as e: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\DomainsApi($config, new - GuzzleHttp\Client()); - + source: | + $apiInstance = new OpenAPI\Client\Api\SelfMailersApi($config, new GuzzleHttp\Client()); try { - $result = $apiInstance->get("xxxxxx"); + $result = $apiInstance->get("sfm_8ffbe811dea49dcf"); } catch (Exception $e) { echo $e->getMessage(), PHP_EOL; } - lang: Java source: | - DomainsApi apiInstance = new DomainsApi(config); + SelfMailersApi apiInstance = new SelfMailersApi(config); try { - Domain response = apiInstance.get("xxxxxx"); + SelfMailer response = apiInstance.get("sfm_8ffbe811dea49dcf"); } catch (ApiException e) { e.printStackTrace(); } label: JAVA - lang: Elixir source: | - Lob.Domain.retrieve("xxxxxx") + Lob.SelfMailer.find("sfm_8ffbe811dea49dcf") label: ELIXIR - lang: CSharp source: | - DomainsApi api = new DomainsApi(config); + SelfMailersApi api = new SelfMailersApi(config); try { - Domain response = api.get("xxxxxx"); + SelfMailer response = api.get("sfm_8ffbe811dea49dcf"); } catch (ApiException e) { Console.WriteLine(e.ToString()); } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - - fetchedDomain, _, err := - apiClient.DomainsApi.Get(context,"xxxxxx").Execute() - + fetchedSelfMailer, _, err := apiClient.SelfMailersApi.Get(context,"sfm_8ffbe811dea49dcf").Execute() if err != nil { return err } label: GO delete: - operationId: domain_delete - summary: Delete a Domain - description: >- - Delete a registered domain. This operation can only be performed if all - associated links with the domain are deleted. - tags: - - URL Shortener - responses: - '200': - description: Returns the deleted link object. - content: - application/json: - schema: - $ref: '#/components/schemas/domain_response' - default: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' - /domains: - post: - operationId: domain_create - summary: Create Domain - description: Add a new custom domain that can be used to create custom links. + operationId: self_mailer_delete + summary: 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 Print & Mail Edition to gain access. tags: - - URL Shortener - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/domains' - examples: - basic: - value: - domain: lob.st - test: - value: - domain: lob.st - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/domains' - examples: - basic: - value: - domain: lob.st - test: - value: - domain: lob.st - multipart/form-data: - schema: - $ref: '#/components/schemas/domains' - examples: - basic: - value: - domain: lob.st - test: - value: - domain: lob.st + - Self Mailers responses: '200': - description: Returns a domain object with details. - content: - application/json: - schema: - $ref: '#/components/schemas/domain_response' + $ref: '#/components/responses/self_mailer_deleted' default: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' - example: - error: - code: invalid - message: domain is required - status_code: 422 + $ref: '#/components/responses/mailpiece_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/domains \ - -u : \ - -d "domain=lob.st" + curl -X DELETE https://api.lob.com/v1/self_mailers/sfm_8ffbe811dea49dcf \ + -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: label: CURL - - lang: Typescript + - lang: typescript source: | - const domainApi = await new DomainsApi(config); - const domainData: DomainsWritable = { - domain: 'lob.st' - } try { - const createdDomain = await domainApi.createDomain(domainData); + const deleteSelfMailer = await new SelfMailersApi(config).delete('sfm_xxxx'); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.domains.create({ - domain: 'lob.st' - }, function (err, res) { + Lob.selfMailers.delete('sfm_8ffbe811dea49dcf', function (err, res) { console.log(err, res); }); label: NODE - lang: Ruby source: | - domainsAPI = DomainsApi.new(config) - - domainsData = DomainsWritable.new({ - domain: "lob.st" - }) + selfMailerApi = SelfMailersApi.new(config) begin - createdDomain = domainsAPI.create(domainsData) + deletedSelfMailer = selfMailerApi.delete("sfm_8ffbe811dea49dcf") rescue => err p err.message end @@ -22347,111 +11251,116 @@ paths: - lang: Python source: | with ApiClient(configuration) as api_client: - api = DomainsApi(api_client) - - domains_data = DomainsWritable( - domain: "lob.st" - ) + api = SelfMailersApi(api_client) try: - domain = api.create(domains_data) + deleted_resource = api.delete("sfm_8ffbe811dea49dcf") except ApiException as e: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\DomainsApi($config, new - GuzzleHttp\Client()); - - - $domainsData = new OpenAPI\Client\Model\DomainsWritable(array( - 'domain' => 'lob.st', - )); - + source: | + $apiInstance = new OpenAPI\Client\Api\SelfMailersApi($config, new GuzzleHttp\Client()); try { - $result = $apiInstance->create($domainsData); + $result = $apiInstance->delete("sfm_8ffbe811dea49dcf"); } catch (Exception $e) { echo $e->getMessage(), PHP_EOL; } - lang: Java source: | - DomainsWritable domain = new DomainsWritable(); - domain.setDomain("lob.st"); - - DomainsApi apiInstance = new DomainsApi(config); + SelfMailersApi apiInstance = new SelfMailersApi(config); try { - apiInstance.create(domain); + SelfMailerDeletion response = apiInstance.delete("sfm_8ffbe811dea49dcf"); } catch (ApiException e) { - e.printStackTrace(); + e.printStackTrace(); } label: JAVA - lang: Elixir source: | - Lob.Domain.create(%{ - domain: "lob.st" - }) + Lob.SelfMailer.destroy("sfm_8ffbe811dea49dcf") label: ELIXIR - lang: CSharp source: | - DomainsWritable domain = new DomainsWritable( - "lob.st" - ) - - DomainsApi api = new DomainsApi(config); + SelfMailersApi api = new SelfMailersApi(config); try { - api.create(domain, null); + SelfMailerDeletion response = api.delete("sfm_8ffbe811dea49dcf"); } catch (ApiException e) { Console.WriteLine(e.ToString()); } label: CSHARP + - lang: Go + source: | + var context = context.Background() + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) + + var apiClient = *lob.NewAPIClient(configuration) + + deletedSelfMailer, _, err := apiClient.SelfMailersApi.Delete(context, "sfm_8ffbe811dea49dcf").Execute() + + if err != nil { + return err + } + label: GO + /self_mailers: get: - operationId: domain_list - summary: List all domains - description: Retrieve a list of all created domains. + operationId: self_mailers_list + summary: List + 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. tags: - - URL Shortener + - Self Mailers + parameters: + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/before_after' + - $ref: '#/components/parameters/include' + - $ref: '#/components/parameters/date_created' + - $ref: '#/components/parameters/metadata' + - in: query + name: size + description: The self mailer sizes to be returned. + schema: + type: array + items: + $ref: '#/components/schemas/self_mailer_size' + - $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': - description: Returns a list of all domains. - content: - application/json: - schema: - $ref: '#/components/schemas/domains_response' + $ref: '#/components/responses/all_self_mailers' default: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' + $ref: '#/components/responses/mailpiece_error' x-codeSamples: - lang: Shell source: | - curl -X GET "https://api.lob.com/v1/domains?limit=2" \ - -u : + curl -X GET "https://api.lob.com/v1/self_mailers?limit=2" \ + -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: label: CURL - - lang: Typescript + - lang: typescript source: | try { - const domains = await new DomainsApi(config).list(2); + const selfMailers = await new selfMailersApi(config).list(2); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.domains.list({limit: 2}, function (err, res) { + Lob.selfMailers.list({limit: 2}, function (err, res) { console.log(err, res); }); label: NODE - lang: Ruby source: | - domainsApi = DomainsApi.new(config) + selfMailersApi = SelfMailersApi.new(config) begin - domains = domainsApi.list({ limit: 2 }) + selfMailers = selfMailersApi.list({ limit: 2 }) rescue => err p err.message end @@ -22459,18 +11368,16 @@ paths: - lang: Python source: | with ApiClient(configuration) as api_client: - api = DomainsApi(api_client) + api = SelfMailersApi(api_client) try: - domains = api.list(limit=2) + self_mailers = api.list(limit=2) except ApiException as e: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\DomainsApi($config, new - GuzzleHttp\Client()); - + source: | + $apiInstance = new OpenAPI\Client\Api\SelfMailersApi($config, new GuzzleHttp\Client()); try { $result = $apiInstance->list( @@ -22481,15 +11388,21 @@ paths: } - lang: Java source: | - DomainsApi apiInstance = new DomainsApi(config); + SelfMailersApi apiInstance = new SelfMailersApi(config); try { - DomainsList response = apiInstance.list( + SelfMailerList response = apiInstance.list( 2, // limit null, // before null, // after null, // include null, // dateCreated + null, // metadata + null, // size + null, // scheduled + null, // sendDate + null, // mailType + null // sortBy ); } catch (ApiException e) { e.printStackTrace(); @@ -22497,495 +11410,543 @@ paths: label: JAVA - lang: Elixir source: | - Lob.Domains.list(%{limit: 2}) + Lob.SelfMailer.list(%{limit: 2}) label: ELIXIR - lang: CSharp source: | - DomainsApi api = new DomainsApi(config); + SelfMailersApi api = new SelfMailersApi(config); + + List includeList = new List(); + includeList.Add("total_count"); + Dictionary metadata = new Dictionary(); + metadata.Add("name", "Harry"); + Dictionary dateCreated = new Dictionary(); + DateTime dateCreatedDate = DateTime.Today.AddMonths(-1); + dateCreated.Add("lt", dateCreatedDate); + Dictionary sendDate = new Dictionary(); + sendDate.Add("lt", DateTime.Now.ToString("yyyy-MM-ddTHH\\:mm\\:ss.fffffffzzz")); + SortBy3 sortBy = new SortBy3(SortBy3.DateCreatedEnum.Asc); try { - DomainsList response = api.list( + SelfMailerList response = api.list( 2, // limit null, // before null, // after - null, // include - null, // dateCreated + includeList, // include + dateCreated, // dateCreated + metadata, // metadata + null, // size + true, // scheduled + sendDate, // sendDate + MailType.FirstClass, // mailType + sortBy // sortBy ); } catch (ApiException e) { Console.WriteLine(e.ToString()); } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - - DomainsList = apiClient.DomainsApi.List(context).Execute() - + SelfMailerList = apiClient.SelfMailersApi.List(context).Execute() if err != nil { return err } label: GO - /domains/{domain_id}/links: - parameters: - - in: path - name: domain_id - required: true - description: Unique identifier for a domain. - schema: - type: string - delete: - operationId: domain_delete_links - summary: Delete all links for a domain - description: Delete all associated links for a domain - tags: - - URL Shortener - responses: - '200': - description: Returns the deleted objects. - content: - application/json: - schema: - $ref: '#/components/schemas/domains_response' - default: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' - /links: - get: - operationId: links_list - summary: Retrieve all shortened links - description: >- - Retrieves a list of shortened links. The list is sorted by creation - date, with the most recently created appearing first. + post: + operationId: self_mailer_create + summary: Create + description: Creates a new self_mailer given information tags: - - URL Shortener + - Self Mailers parameters: - - $ref: '#/components/parameters/limit' - - $ref: '#/components/parameters/offset' - - $ref: '#/components/parameters/include' - - $ref: '#/components/parameters/date_created' - - $ref: '#/components/parameters/metadata' - - in: query - name: campaign_id - description: >- - Filter the links generated for a particular campaign using its - campaign id. - schema: - $ref: '#/components/schemas/cmp_id' - - in: query - name: clicked - description: Retrieve the list of links that have been opened. - schema: - type: boolean - - in: query - name: billing_group_id - description: Filter the links generated for a particular billing group id. - schema: - $ref: '#/components/schemas/billing_group_id' + - $ref: '#/components/parameters/idem-header' + - $ref: '#/components/parameters/idem-query' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/self_mailer_editable' + example: + description: Demo Self Mailer job + to: adr_bae820679f3f536b + from: adr_210a8d4b0b76d77b + inside: https://lob.com/selfmailerinside.pdf + outside: https://lob.com/selfmaileroutside.pdf + size: 12x9_bifold + metadata: + spiffy: 'true' + mail_type: usps_standard + merge_variables: + name: Harry + send_date: '2017-11-01T00:00:00.000Z' + use_type: marketing + qr_code: + position: relative + redirect_url: https://www.lob.com + width: '2.5' + top: '2.5' + right: '2.5' + pages: inside,outside + fsc: true + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/self_mailer_editable' + example: + description: Demo Self Mailer job + to: adr_bae820679f3f536b + from: adr_210a8d4b0b76d77b + inside: https://lob.com/selfmailerinside.pdf + outside: https://lob.com/selfmaileroutside.pdf + size: 12x9_bifold + metadata: + spiffy: 'true' + mail_type: usps_standard + merge_variables: + name: Harry + send_date: '2017-11-01T00:00:00.000Z' + use_type: marketing + qr_code: + position: relative + redirect_url: https://www.lob.com + width: '2.5' + top: '2.5' + right: '2.5' + pages: inside,outside + fsc: true + encoding: + merge_variables: + style: deepObject + explode: true + metadata: + style: deepObject + explode: true + multipart/form-data: + schema: + $ref: '#/components/schemas/self_mailer_editable' + example: + description: Demo Self Mailer job + to: adr_bae820679f3f536b + from: adr_210a8d4b0b76d77b + inside: https://lob.com/selfmailerinside.pdf + outside: https://lob.com/selfmaileroutside.pdf + size: 12x9_bifold + metadata: + spiffy: 'true' + mail_type: usps_standard + merge_variables: + name: Harry + send_date: '2017-11-01T00:00:00.000Z' + use_type: marketing + qr_code: + position: relative + redirect_url: https://www.lob.com + width: '2.5' + top: '2.5' + right: '2.5' + pages: inside,outside + fsc: true responses: '200': - description: Returns the deleted link object. - content: - application/json: - schema: - $ref: '#/components/schemas/links_response' + $ref: '#/components/responses/post_self_mailer' default: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' + $ref: '#/components/responses/mailpiece_error' x-codeSamples: - lang: Shell source: | - curl -X GET "https://api.lob.com/v1/links/?limit=2" \ - -u : + curl https://api.lob.com/v1/self_mailers \ + -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \ + -d "description=Demo Self Mailer job" \ + -d "to[name]=Harry Zhang" \ + -d "to[address_line1]=210 King St" \ + -d "to[address_city]=San Francisco" \ + -d "to[address_state]=CA" \ + -d "to[address_zip]=94107" \ + -d "from=adr_210a8d4b0b76d77b" \ + -d "use_type=marketing" \ + -d 'qr_code[position]=relative' \ + -d 'qr_code[redirect_url]=https://www.lob.com' \ + -d 'qr_code[width]=2.5' \ + -d 'qr_code[bottom]=2.5' \ + -d 'qr_code[left]=2.5' \ + -d 'qr_code[pages]=inside,outside' + --data-urlencode "inside=Inside HTML for {{name}}" \ + --data-urlencode "outside=Outside HTML for {{name}}" \ + -d "merge_variables[name]=Harry" \ + -d 'fsc=true' label: CURL - lang: Typescript source: | + const selfMailerCreate = new SelfMailerEditable({ + to: { + name: 'Harry Zhang', + address_line1: '210 King St', + address_line2: '# 6100', + address_city: 'San Francisco', + address_state: 'CA', + address_zip: '94107', + }, + from: 'adr_xxxx', + inside: + 'https://s3.us-west-2.amazonaws.com/public.lob.com/assets/templates/self_mailers/6x18_sfm_inside.pdf', + outside: + 'https://s3.us-west-2.amazonaws.com/public.lob.com/assets/templates/self_mailers/6x18_sfm_outside.pdf', + use_type: 'marketing' + qr_code : { + position: 'relative', + redirect_url: 'https://www.lob.com', + width: '2.5', + bottom: '2.5', + left: '2.5', + pages: 'inside' + }, + fsc: true + }); + try { - const links = await new LinksApi(config).list(2); + const mySelfMailer = await new SelfMailersApi(config).create(selfMailerCreate); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.links.list({limit: 2}, function (err, res) { + Lob.selfMailers.create({ + description: 'Demo Self Mailer job', + to: { + name: 'Harry Zhang', + address_line1: '210 King St', + address_city: 'San Francisco', + address_state: 'CA', + address_zip: '94107' + }, + from: 'adr_210a8d4b0b76d77b', + inside: 'Inside HTML for {{name}}', + outside: 'Outside HTML for {{name}}', + merge_variables: { + name: 'Harry' + }, + use_type: 'marketing' + qr_code : { + position: 'relative', + redirect_url: 'https://www.lob.com', + width: '2.5', + bottom: '2.5', + left: '2.5', + pages: 'inside' + }, + fsc: true + }, function (err, res) { console.log(err, res); }); label: NODE - lang: Ruby source: | - linksApi = LinksApi.new(config) + selfMailerCreate = SelfMailerEditable.new({ + description: "Demo Self Mailer job", + from: "adr_210a8d4b0b76d77b", + inside: "Inside HTML for {{name}}", + outside: "Outside HTML for {{name}}", + to: AddressEditable.new({ + name: "Harry Zhang", + address_line1: "210 King St", + address_line2: "# 6100", + address_city: "San Francisco", + address_state: "CA", + address_zip: "94107", + }), + merge_variables: { + name: "Harry" + }, + use_type: 'marketing' + qr_code : { + position: 'relative', + redirect_url: 'https://www.lob.com', + width: '2.5', + bottom: '2.5', + left: '2.5', + pages: 'inside' + }, + fsc: true + }); + + selfMailerApi = SelfMailersApi.new(config) begin - links = linksApi.list({ limit: 2 }) + createdSelfMailer = selfMailerApi.create(selfMailerCreate) rescue => err p err.message end label: RUBY - lang: Python source: | + self_mailer_editable = SelfMailerEditable( + description = "Demo Self Mailer job", + _from = "adr_210a8d4b0b76d77b", + inside = "Inside HTML for {{name}}", + outside = "Outside HTML for {{name}}", + to = AddressEditable( + name = "Harry Zhang", + address_line1 = "210 King St", + address_line2 = "# 6100", + address_city = "San Francisco", + address_state = "CA", + address_zip = "94107", + ), + merge_variables = MergeVariables( + name = "Harry", + ), + use_type = "marketing" + qr_code = { + position: "relative", + redirect_url: "https://www.lob.com", + width: "2.5", + bottom: "2.5", + left: "2.5", + pages: "inside" + }, + fsc = true + ) + with ApiClient(configuration) as api_client: - api = LinksApi(api_client) + api = SelfMailersApi(api_client) try: - links = api.list(limit=2) + created_self_mailer = api.create(self_mailer_editable) except ApiException as e: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\LinksApi($config, new - GuzzleHttp\Client()); + source: | + $to = new OpenAPI\Client\Model\AddressEditable( + array( + "name" => "Harry Zhang", + "address_line1" => "210 King St", + "address_line2" => "# 6100", + "address_city" => "San Francisco", + "address_state" => "CA", + "address_zip" => "94107", + ) + ); + $merge_variables = new stdClass; + $merge_variables->name = "Harry"; + + $use_type = "marketing"; + $fsc = true; + + $qr_code = new OpenAPI\Client\Model\QRCode( + array( + "position" => "relative", + "redirect_url" => "https://www.lob.com", + "width" => "2", + "bottom" => "2", + "left" => "2", + "pages" => "inside,outside" + ) + ); + + $apiInstance = new OpenAPI\Client\Api\SelfMailersApi($config, new GuzzleHttp\Client()); + $self_mailer_editable = new OpenAPI\Client\Model\SelfMailerEditable( + array( + "description" => "Demo Self Mailer job", + "from" => "adr_210a8d4b0b76d77b", + "inside" => "Inside HTML for {{name}}", + "outside" => "Outside HTML for {{name}}", + "to" => $to, + "merge_variables" => $merge_variables, + "use_type" => $use_type, + "qr_code" => $qr_code, + "fsc" => $fsc + ) + ); try { - $result = $apiInstance->list( - 2, // limit - ); + $result = $apiInstance->create($self_mailer_editable); } catch (Exception $e) { echo $e->getMessage(), PHP_EOL; } - lang: Java source: | - LinksApi apiInstance = new LinksApi(config); + Map merge_variables = new HashMap(); + merge_variables.put("name", "Harry"); + + SelfMailersApi apiInstance = new SelfMailersApi(config); + + AddressEditable to = new AddressEditable(); + to.setName("Harry Zhang"); + to.setAddressLine1("210 King St"); + to.setAddressLine2("# 6100"); + to.setAddressCity("San Francisco"); + to.setAddressState("CA"); + to.setAddressZip("94107"); + + QRCode qrCode = new QRCode(); + qrCode.setPosition("relative"); + qrCode.setRedirectUrl("https://www.lob.com"); + qrCode.setWidth("2"); + qrCode.setLeft("2"); + qrCode.setBottom("2"); + qrCode.setPages("outside"); try { - LinksList response = apiInstance.list( - 2, // limit - null, // before - null, // after - null, // include - null, // dateCreated - ); + SelfMailerEditable selfMailerEditable = new SelfMailerEditable(); + selfMailerEditable.setDescription("Demo Self Mailer job"); + selfMailerEditable.setFrom("adr_210a8d4b0b76d77b"); + selfMailerEditable.setInside("Inside HTML for {{name}}"); + selfMailerEditable.setOutside("Outside HTML for {{name}}"); + selfMailerEditable.setTo(to); + selfMailerEditable.setMergeVariables(merge_variables); + selfMailerEditable.setUseType("marketing"); + selfMailerEditable.setQRCode(qrCode); + selfMailerEditable.setFsc(true); + + + SelfMailer result = apiInstance.create(selfMailerEditable, null); } catch (ApiException e) { e.printStackTrace(); } label: JAVA - lang: Elixir source: | - Lob.Links.list(%{limit: 2}) + Lob.SelfMailer.create(%{ + description: "Demo Self Mailer job", + to: %{ + name: "Harry Zhang", + address_line1: "210 King St", + address_city: "San Francisco", + address_state: "CA", + address_zip: "94107" + }, + from: "adr_210a8d4b0b76d77b", + inside: "Inside HTML for {{name}}", + outside: "Outside HTML for {{name}}", + merge_variables: %{ + name: "Harry" + }, + use_type: "marketing" + qr_code: %{ + position: 'relative', + redirect_url: 'https://www.lob.com', + width: '2', + bottom: '2', + left: '2', + pages: 'inside,outside' + }, + fsc: true + }) label: ELIXIR - lang: CSharp source: | - LinksApi api = new LinksApi(config); + Dictionary mergeVariables = new Dictionary(); + mergeVariables.Add("name", "Harry"); - try { - LinksList response = api.list( - 2, // limit - null, // before - null, // after - null, // include - null, // dateCreated - ); - } catch (ApiException e) { - Console.WriteLine(e.ToString()); - } - label: CSHARP - - lang: Go - source: > - var context = context.Background() + SelfMailersApi api = new SelfMailersApi(config); - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) + AddressEditable to = new AddressEditable( + "210 King St", // addressLine1 + "# 6100", // addressLine2 + "San Francisco", // addressCity + "CA", // addressState + "94107", // addressZip + default(CountryExtended), // addressCounty + null, // description + "Harry Zhang" // name + ); + QRCode qrCode = new QRCode( + "relative", //position, + "https://www.lob.com", //redirect_url + "2", //width + "2", //left + "2", //bottom + "inside", //pages + ); - var apiClient = *lob.NewAPIClient(configuration) + Fsc fsc = new Fsc(true); - LinksList = apiClient.LinksApi.List(context).Execute() + SelfMailerEditable selfMailerEditable = new SelfMailerEditable( + to.ToJson(), // to + "adr_249af768103d2810", // from + default(SelfMailerSize), // size + "Demo Self Mailer Job", // description + default(Dictionary), // metadata + default(MailType), // mailType + mergeVariables, // mergeVariables + default(DateTime), // sendDate + "Inside HTML for {{name}}", // inside + "Outside HTML for {{name}}", // outside + "marketing", // use_type + qrCode, + fsc + ); - if err != nil { - return err + try { + SelfMailer result = api.create(selfMailerEditable, null); + } catch (ApiException e) { + Console.WriteLine(e.ToString()); } - label: GO - /links/{link_id}: - parameters: - - in: path - name: link_id - required: true - description: Unique identifier for a link. - schema: - type: string - get: - operationId: links_get - summary: Retrieve a link - description: Retrievs a single shortened link. - tags: - - URL Shortener - responses: - '200': - description: Returns a single link. - content: - application/json: - schema: - $ref: '#/components/schemas/link_response' - default: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' - x-codeSamples: - - lang: Shell - source: | - curl -X GET "https://api.lob.com/v1/links/" \ - -u : - label: CURL - patch: - operationId: link_update - summary: Update a Link - description: Update any of the properties of a shortened link. - tags: - - URL Shortener - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/link_single' - examples: - basic: - value: - resource_id: ltr_133 - test: - value: - redirect_link: ltr_133 - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/link_single' - examples: - basic: - value: - resource_id: ltr_133 - test: - value: - resource_id: ltr_133 - multipart/form-data: - schema: - $ref: '#/components/schemas/link_single' - examples: - basic: - value: - resource_id: ltr_133 - test: - value: - resource_id: ltr_133 - responses: - '200': - description: Returns the updated link. - content: - application/json: - schema: - $ref: '#/components/schemas/link_response' - default: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' - example: - error: - code: invalid - message: redirect_link is required - status_code: 422 - x-codeSamples: - - lang: Shell - source: | - curl https://api.lob.com/v1/links/ \ - -u : \ - -d "redirect_link=https://www.lob.com" - label: CURL - delete: - operationId: links_delete - summary: Delete Link - description: Delete the shortened link. - tags: - - URL Shortener - responses: - '200': - description: Returns the deleted short link object - content: - application/json: - schema: - $ref: '#/components/schemas/link_response' - default: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' - /links/shorten: - post: - operationId: link_create - summary: Create Link - description: >- - Given a long URL, shorten your URL either by using a custom domain or - Lob's own short domain. - tags: - - URL Shortener - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/link_single' - examples: - basic: - value: - redirect_link: https://www.lob.com - slug: a1b2c3 - test: - value: - redirect_link: https://www.lob.com - slug: a1b2c3 - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/link_single' - examples: - basic: - value: - redirect_link: https://www.lob.com - domain: lob.st - test: - value: - redirect_link: https://www.lob.com - domain: lob.st - multipart/form-data: - schema: - $ref: '#/components/schemas/link_single' - examples: - basic: - value: - redirect_link: https://www.lob.com - test: - value: - redirect_link: https://www.lob.com - responses: - '200': - description: Returns a successfully created link. - content: - application/json: - schema: - $ref: '#/components/schemas/link_response' - default: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' - example: - error: - code: invalid - message: redirect_link is required - status_code: 422 - x-codeSamples: - - lang: Shell - source: | - curl https://api.lob.com/v1/links/shorten \ - -u : \ - -d "redirect_link=https://www.lob.com" - label: CURL - /links/shorten/bulk: - post: - operationId: link_bulk_create - summary: Bulk Create Links - description: Shortens a list of links in a single request. - tags: - - URL Shortener - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/link_list' - example: - links: - - redirect_link: https://www.lob.com - slug: a1b2c3 - - redirect_link: https://www.lob.com - slug: a1b2c3 - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/link_list' - example: - links: - - redirect_link: https://www.lob.com - slug: a1b2c3 - - redirect_link: https://www.lob.com - slug: a1b2c3 - multipart/form-data: - schema: - $ref: '#/components/schemas/link_list' - example: - links: - - redirect_link: https://www.lob.com - slug: a1b2c3 - - redirect_link: https://www.lob.com - slug: a1b2c3 - responses: - '200': - description: Returns all successfully created links - content: - application/json: - schema: - $ref: '#/components/schemas/links_response' - default: - description: Error - content: - application/json: - schema: - $ref: '#/components/schemas/error' - example: - error: - code: invalid - message: redirect_link is required - status_code: 422 - x-codeSamples: - - lang: Shell + label: CSHARP + - lang: Go source: | - curl https://api.lob.com/v1/links/shorten/bulk \ - -u : \ - --header 'Content-Type: application/x-www-form-urlencoded' \ - --data-urlencode 'links[0][redirect_link]=https://www.lob.com' - label: CURL - /self_mailers/{sfm_id}: + var context = context.Background() + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) + + var apiClient = *lob.NewAPIClient(configuration) + + var to = *lob.NewAddressEditable() + to.SetAddressLine1("210 King St") + to.SetAddressLine2("# 6100") + to.SetAddressCity("San Francisco") + to.SetAddressState("CA") + to.SetAddressZip("94107") + to.SetAddressCountry(lob.COUNTRYEXTENDED_US) + to.SetDescription("") + to.SetName("Harry Zhang") + + var selfMailerCreate = *lob.NewSelfMailerEditable() + selfMailerCreate.SetDescription("Demo Self Mailer job") + selfMailerCreate.SetFrom("adr_210a8d4b0b76d77b") + selfMailerCreate.SetInside("Inside HTML for {{name}}") + selfMailerCreate.SetOutside("Outside HTML for {{name}}") + selfMailerCreate.SetTo(to) + selfMailerCreate.SetFsc(true) + + + createdselfMailer, _, err := apiClient.SelfMailersApi.Create(context).SelfMailerEditable(selfMailerCreate).Execute() + + if err != nil { + return err + } + label: GO + /snap_packs/{snap_pack_id}: parameters: - in: path - name: sfm_id - description: id of the self_mailer + name: snap_pack_id + description: id of the snap_pack required: true schema: - $ref: '#/components/schemas/sfm_id' + $ref: '#/components/schemas/snap_pack_id' get: - operationId: self_mailer_retrieve + operationId: snap_pack_retrieve summary: Retrieve - 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. + 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. tags: - - Self Mailers + - Snap Packs responses: '200': - description: Returns a self_mailer object + description: Returns a snap_pack object content: application/json: schema: - $ref: '#/components/schemas/self_mailer' + $ref: '#/components/schemas/snap_pack' example: - id: sfm_8ffbe811dea49dcf + id: ord_0d6a16a3fff6318ac8f8008dc1 description: April Campaign - metadata: {} to: id: adr_bae820679f3f536b description: null @@ -23022,8 +11983,7 @@ paths: date_modified: '2017-09-05T17:47:53.767Z' deleted: true object: address - url: >- - https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA + url: https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA outside_template_id: tmpl_a3cb937f26d7eec inside_template_id: tmpl_a3cb937f26d7eec inside_template_version_id: vrsn_bfdf70893b00a85 @@ -23031,21 +11991,15 @@ paths: carrier: USPS tracking_events: [] thumbnails: - - small: >- - https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA - medium: >- - https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_1.png?version=v1&expires=1618512040&signature=ryxN7bsXGtw_GRFSP3Cs3A3IYjxZi3cW9BHDCNgMt6p3nobVmsc_iFHt2e-S7ndAXhhN7nP-MQVov3bt3r37BQ - large: >- - https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg - - small: >- - https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_2.png?version=v1&expires=1618512040&signature=3gTgU7Fd3KoT_vNlQnTGptRps5ZgnkhSnPrAwk7L98higIzSwfKoLvuu_DIpMM48dHbxckKT9waR8euJ4KSDBQ - medium: >- - https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_2.png?version=v1&expires=1618512040&signature=Ue1lw5CMj7KRx6cMQL8xPeazaHCdJzWcACd1w3acuYPnWkVIpSt62OIO7hAtpAQK9xm1dhhlFj0rqRZMdRMMBA - large: >- - https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_2.png?version=v1&expires=1618512040&signature=cICc7HEm1xG_eyM4a_wtvPk2FqoLRmtgGa29kJisWnMIYBL0OkyzG4ZCYGMhp-5cZpJlSpXfTgGKh_Qmeo1TDw + - small: https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA + 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 + large: https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg + - small: https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_small_2.png?version=v1&expires=1618512040&signature=3gTgU7Fd3KoT_vNlQnTGptRps5ZgnkhSnPrAwk7L98higIzSwfKoLvuu_DIpMM48dHbxckKT9waR8euJ4KSDBQ + medium: https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_medium_2.png?version=v1&expires=1618512040&signature=Ue1lw5CMj7KRx6cMQL8xPeazaHCdJzWcACd1w3acuYPnWkVIpSt62OIO7hAtpAQK9xm1dhhlFj0rqRZMdRMMBA + 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 merge_variables: name: null - size: 6x18_bifold + size: 8.5x11 mail_type: usps_first_class expected_delivery_date: '2021-03-24' date_created: '2021-03-16T18:40:40.504Z' @@ -23053,37 +12007,36 @@ paths: send_date: '2021-03-16T18:45:40.493Z' use_type: marketing fsc: false - object: self_mailer + color: false + object: snap_pack default: $ref: '#/components/responses/mailpiece_error' x-codeSamples: - lang: Shell - source: > - curl -X GET - "https://api.lob.com/v1/self_mailers/sfm_8ffbe811dea49dcf" \ + source: | + curl -X GET "https://api.lob.com/v1/snap_packs/ord_0d6a16a3fff6318ac8f8008dc1" \ -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: label: CURL - lang: typescript source: | try { - const selfMailer = await new SelfMailersApi(config).get('sfm_xxxx'); + const snapPack = await new SnapPacksApi(config).get('ord_xxxx'); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript - source: > - Lob.selfMailers.retrieve('sfm_8ffbe811dea49dcf', function (err, res) - { + source: | + Lob.snapPacks.retrieve('ord_0d6a16a3fff6318ac8f8008dc1', function (err, res) { console.log(err, res); }); label: NODE - lang: Ruby source: | - selfMailerApi = SelfMailersApi.new(config) + snapPackApi = SnapPacksApi.new(config) begin - retrievedSelfMailer = selfMailerApi.get("sfm_8ffbe811dea49dcf") + retrievedSnapPack = snapPackApi.get("ord_0d6a16a3fff6318ac8f8008dc1") rescue => err p err.message end @@ -23091,240 +12044,96 @@ paths: - lang: Python source: | with ApiClient(configuration) as api_client: - api = SelfMailersApi(api_client) + api = SnapPacksApi(api_client) try: - self_mailer = api.get("sfm_8ffbe811dea49dcf") + snap_pack = api.get("ord_0d6a16a3fff6318ac8f8008dc1") except ApiException as e: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\SelfMailersApi($config, new - GuzzleHttp\Client()); - + source: | + $apiInstance = new OpenAPI\Client\Api\SnapPacksApi($config, new GuzzleHttp\Client()); try { - $result = $apiInstance->get("sfm_8ffbe811dea49dcf"); + $result = $apiInstance->get("ord_0d6a16a3fff6318ac8f8008dc1"); } catch (Exception $e) { echo $e->getMessage(), PHP_EOL; } - lang: Java source: | - SelfMailersApi apiInstance = new SelfMailersApi(config); + SnapPacksApi apiInstance = new SnapPacksApi(config); try { - SelfMailer response = apiInstance.get("sfm_8ffbe811dea49dcf"); + SnapPack response = apiInstance.get("ord_0d6a16a3fff6318ac8f8008dc1"); } catch (ApiException e) { e.printStackTrace(); } label: JAVA - lang: Elixir source: | - Lob.SelfMailer.find("sfm_8ffbe811dea49dcf") + Lob.SnapPack.find("ord_0d6a16a3fff6318ac8f8008dc1") label: ELIXIR - lang: CSharp source: | - SelfMailersApi api = new SelfMailersApi(config); + SnapPacksApi api = new SnapPacksApi(config); try { - SelfMailer response = api.get("sfm_8ffbe811dea49dcf"); + SnapPack response = api.get("ord_0d6a16a3fff6318ac8f8008dc1"); } catch (ApiException e) { Console.WriteLine(e.ToString()); } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - - fetchedSelfMailer, _, err := - apiClient.SelfMailersApi.Get(context,"sfm_8ffbe811dea49dcf").Execute() - + fetchedSnapPack, _, err := apiClient.SnapPacksApi.Get(context,"ord_0d6a16a3fff6318ac8f8008dc1").Execute() if err != nil { return err } label: GO delete: - operationId: self_mailer_delete + operationId: snap_pack_delete summary: 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 Print & Mail Edition to gain access. - tags: - - Self Mailers - responses: - '200': - $ref: '#/components/responses/self_mailer_deleted' - default: - $ref: '#/components/responses/mailpiece_error' - x-codeSamples: - - lang: Shell - source: > - curl -X DELETE - https://api.lob.com/v1/self_mailers/sfm_8ffbe811dea49dcf \ - -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: - label: CURL - - lang: typescript - source: | - try { - const deleteSelfMailer = await new SelfMailersApi(config).delete('sfm_xxxx'); - } catch (err: any) { - console.error(err); - } - label: TYPESCRIPT - - lang: Javascript - source: | - Lob.selfMailers.delete('sfm_8ffbe811dea49dcf', function (err, res) { - console.log(err, res); - }); - label: NODE - - lang: Ruby - source: | - selfMailerApi = SelfMailersApi.new(config) - - begin - deletedSelfMailer = selfMailerApi.delete("sfm_8ffbe811dea49dcf") - rescue => err - p err.message - end - label: RUBY - - lang: Python - source: | - with ApiClient(configuration) as api_client: - api = SelfMailersApi(api_client) - - try: - deleted_resource = api.delete("sfm_8ffbe811dea49dcf") - except ApiException as e: - print(e) - label: PYTHON - - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\SelfMailersApi($config, new - GuzzleHttp\Client()); - - - try { - $result = $apiInstance->delete("sfm_8ffbe811dea49dcf"); - } catch (Exception $e) { - echo $e->getMessage(), PHP_EOL; - } - - lang: Java - source: | - SelfMailersApi apiInstance = new SelfMailersApi(config); - - try { - SelfMailerDeletion response = apiInstance.delete("sfm_8ffbe811dea49dcf"); - } catch (ApiException e) { - e.printStackTrace(); - } - label: JAVA - - lang: Elixir - source: | - Lob.SelfMailer.destroy("sfm_8ffbe811dea49dcf") - label: ELIXIR - - lang: CSharp - source: | - SelfMailersApi api = new SelfMailersApi(config); - - try { - SelfMailerDeletion response = api.delete("sfm_8ffbe811dea49dcf"); - } catch (ApiException e) { - Console.WriteLine(e.ToString()); - } - label: CSHARP - - lang: Go - source: > - var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - - - var apiClient = *lob.NewAPIClient(configuration) - - - deletedSelfMailer, _, err := - apiClient.SelfMailersApi.Delete(context, - "sfm_8ffbe811dea49dcf").Execute() - - - if err != nil { - return err - } - label: GO - /self_mailers: - get: - operationId: self_mailers_list - summary: List - 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. + 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. tags: - - Self Mailers - parameters: - - $ref: '#/components/parameters/limit' - - $ref: '#/components/parameters/before_after' - - $ref: '#/components/parameters/include' - - $ref: '#/components/parameters/date_created' - - $ref: '#/components/parameters/metadata' - - in: query - name: size - description: The self mailer sizes to be returned. - schema: - type: array - items: - $ref: '#/components/schemas/self_mailer_size' - - $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' + - Snap Packs responses: '200': - $ref: '#/components/responses/all_self_mailers' + $ref: '#/components/responses/snap_pack_deleted' default: $ref: '#/components/responses/mailpiece_error' x-codeSamples: - lang: Shell source: | - curl -X GET "https://api.lob.com/v1/self_mailers?limit=2" \ + curl -X DELETE https://api.lob.com/v1/snap_packs/ord_0d6a16a3fff6318ac8f8008dc1 \ -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: label: CURL - lang: typescript source: | try { - const selfMailers = await new selfMailersApi(config).list(2); + const deleteSnapPack = await new SnapPacksApi(config).delete('ord_xxxx'); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.selfMailers.list({limit: 2}, function (err, res) { + Lob.snapPacks.delete('ord_0d6a16a3fff6318ac8f8008dc1', function (err, res) { console.log(err, res); }); label: NODE - lang: Ruby source: | - selfMailersApi = SelfMailersApi.new(config) + snapPackApi = SnapPacksApi.new(config) begin - selfMailers = selfMailersApi.list({ limit: 2 }) + deletedSnapPack = snapPackApi.delete("ord_0d6a16a3fff6318ac8f8008dc1") rescue => err p err.message end @@ -23332,625 +12141,203 @@ paths: - lang: Python source: | with ApiClient(configuration) as api_client: - api = SelfMailersApi(api_client) + api = SnapPacksApi(api_client) try: - self_mailers = api.list(limit=2) + deleted_resource = api.delete("ord_0d6a16a3fff6318ac8f8008dc1") except ApiException as e: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\SelfMailersApi($config, new - GuzzleHttp\Client()); - + source: | + $apiInstance = new OpenAPI\Client\Api\SnapPacksApi($config, new GuzzleHttp\Client()); try { - $result = $apiInstance->list( - 2, // limit - ); + $result = $apiInstance->delete("ord_0d6a16a3fff6318ac8f8008dc1"); } catch (Exception $e) { echo $e->getMessage(), PHP_EOL; } - lang: Java source: | - SelfMailersApi apiInstance = new SelfMailersApi(config); + SnapPacksApi apiInstance = new SnapPacksApi(config); try { - SelfMailerList response = apiInstance.list( - 2, // limit - null, // before - null, // after - null, // include - null, // dateCreated - null, // metadata - null, // size - null, // scheduled - null, // sendDate - null, // mailType - null // sortBy - ); + SnapPackDeletion response = apiInstance.delete("ord_0d6a16a3fff6318ac8f8008dc1"); } catch (ApiException e) { - e.printStackTrace(); - } - label: JAVA - - lang: Elixir - source: | - Lob.SelfMailer.list(%{limit: 2}) - label: ELIXIR - - lang: CSharp - source: > - SelfMailersApi api = new SelfMailersApi(config); - - - List includeList = new List(); - - includeList.Add("total_count"); - - Dictionary metadata = new Dictionary(); - - metadata.Add("name", "Harry"); - - Dictionary dateCreated = new Dictionary(); - - DateTime dateCreatedDate = DateTime.Today.AddMonths(-1); - - dateCreated.Add("lt", dateCreatedDate); - - Dictionary sendDate = new Dictionary(); - - sendDate.Add("lt", - DateTime.Now.ToString("yyyy-MM-ddTHH\\:mm\\:ss.fffffffzzz")); - - SortBy3 sortBy = new SortBy3(SortBy3.DateCreatedEnum.Asc); - - - try { - SelfMailerList response = api.list( - 2, // limit - null, // before - null, // after - includeList, // include - dateCreated, // dateCreated - metadata, // metadata - null, // size - true, // scheduled - sendDate, // sendDate - MailType.FirstClass, // mailType - sortBy // sortBy - ); + e.printStackTrace(); + } + label: JAVA + - lang: Elixir + source: | + Lob.SnapPack.destroy("ord_0d6a16a3fff6318ac8f8008dc1") + label: ELIXIR + - lang: CSharp + source: | + SnapPacksApi api = new SnapPacksApi(config); + + try { + SnapPackDeletion response = api.delete("ord_0d6a16a3fff6318ac8f8008dc1"); } catch (ApiException e) { Console.WriteLine(e.ToString()); } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - SelfMailerList = apiClient.SelfMailersApi.List(context).Execute() + deletedSnapPack, _, err := apiClient.SnapPacksApi.Delete(context, "ord_0d6a16a3fff6318ac8f8008dc1").Execute() if err != nil { return err } label: GO - post: - operationId: self_mailer_create - summary: Create - description: Creates a new self_mailer given information + /snap_packs: + get: + operationId: snap_packs_list + summary: List + 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. tags: - - Self Mailers + - Snap Packs parameters: - - $ref: '#/components/parameters/idem-header' - - $ref: '#/components/parameters/idem-query' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/self_mailer_editable' - example: - description: Demo Self Mailer job - to: adr_bae820679f3f536b - from: adr_210a8d4b0b76d77b - inside: https://lob.com/selfmailerinside.pdf - outside: https://lob.com/selfmaileroutside.pdf - size: 12x9_bifold - metadata: - spiffy: 'true' - mail_type: usps_standard - merge_variables: - name: Harry - send_date: '2017-11-01T00:00:00.000Z' - use_type: marketing - qr_code: - position: relative - redirect_url: https://www.lob.com - width: '2.5' - top: '2.5' - right: '2.5' - pages: inside,outside - fsc: true - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/self_mailer_editable' - example: - description: Demo Self Mailer job - to: adr_bae820679f3f536b - from: adr_210a8d4b0b76d77b - inside: https://lob.com/selfmailerinside.pdf - outside: https://lob.com/selfmaileroutside.pdf - size: 12x9_bifold - metadata: - spiffy: 'true' - mail_type: usps_standard - merge_variables: - name: Harry - send_date: '2017-11-01T00:00:00.000Z' - use_type: marketing - qr_code: - position: relative - redirect_url: https://www.lob.com - width: '2.5' - top: '2.5' - right: '2.5' - pages: inside,outside - fsc: true - encoding: - merge_variables: - style: deepObject - explode: true - metadata: - style: deepObject - explode: true - multipart/form-data: - schema: - $ref: '#/components/schemas/self_mailer_editable' - example: - description: Demo Self Mailer job - to: adr_bae820679f3f536b - from: adr_210a8d4b0b76d77b - inside: https://lob.com/selfmailerinside.pdf - outside: https://lob.com/selfmaileroutside.pdf - size: 12x9_bifold - metadata: - spiffy: 'true' - mail_type: usps_standard - merge_variables: - name: Harry - send_date: '2017-11-01T00:00:00.000Z' - use_type: marketing - qr_code: - position: relative - redirect_url: https://www.lob.com - width: '2.5' - top: '2.5' - right: '2.5' - pages: inside,outside - fsc: true + - $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/post_self_mailer' + $ref: '#/components/responses/all_snap_packs' default: $ref: '#/components/responses/mailpiece_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/self_mailers \ - -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \ - -d "description=Demo Self Mailer job" \ - -d "to[name]=Harry Zhang" \ - -d "to[address_line1]=210 King St" \ - -d "to[address_city]=San Francisco" \ - -d "to[address_state]=CA" \ - -d "to[address_zip]=94107" \ - -d "from=adr_210a8d4b0b76d77b" \ - -d "use_type=marketing" \ - -d 'qr_code[position]=relative' \ - -d 'qr_code[redirect_url]=https://www.lob.com' \ - -d 'qr_code[width]=2.5' \ - -d 'qr_code[bottom]=2.5' \ - -d 'qr_code[left]=2.5' \ - -d 'qr_code[pages]=inside,outside' - --data-urlencode "inside=Inside HTML for {{name}}" \ - --data-urlencode "outside=Outside HTML for {{name}}" \ - -d "merge_variables[name]=Harry" \ - -d 'fsc=true' + curl -X GET "https://api.lob.com/v1/snap_packs?limit=2" \ + -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: label: CURL - - lang: Typescript + - lang: typescript source: | - const selfMailerCreate = new SelfMailerEditable({ - to: { - name: 'Harry Zhang', - address_line1: '210 King St', - address_line2: '# 6100', - address_city: 'San Francisco', - address_state: 'CA', - address_zip: '94107', - }, - from: 'adr_xxxx', - inside: - 'https://s3.us-west-2.amazonaws.com/public.lob.com/assets/templates/self_mailers/6x18_sfm_inside.pdf', - outside: - 'https://s3.us-west-2.amazonaws.com/public.lob.com/assets/templates/self_mailers/6x18_sfm_outside.pdf', - use_type: 'marketing' - qr_code : { - position: 'relative', - redirect_url: 'https://www.lob.com', - width: '2.5', - bottom: '2.5', - left: '2.5', - pages: 'inside' - }, - fsc: true - }); - try { - const mySelfMailer = await new SelfMailersApi(config).create(selfMailerCreate); + const snapPacks = await new snapPacksApi(config).list(2); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.selfMailers.create({ - description: 'Demo Self Mailer job', - to: { - name: 'Harry Zhang', - address_line1: '210 King St', - address_city: 'San Francisco', - address_state: 'CA', - address_zip: '94107' - }, - from: 'adr_210a8d4b0b76d77b', - inside: 'Inside HTML for {{name}}', - outside: 'Outside HTML for {{name}}', - merge_variables: { - name: 'Harry' - }, - use_type: 'marketing' - qr_code : { - position: 'relative', - redirect_url: 'https://www.lob.com', - width: '2.5', - bottom: '2.5', - left: '2.5', - pages: 'inside' - }, - fsc: true - }, function (err, res) { + Lob.snapPacks.list({limit: 2}, function (err, res) { console.log(err, res); }); label: NODE - lang: Ruby source: | - selfMailerCreate = SelfMailerEditable.new({ - description: "Demo Self Mailer job", - from: "adr_210a8d4b0b76d77b", - inside: "Inside HTML for {{name}}", - outside: "Outside HTML for {{name}}", - to: AddressEditable.new({ - name: "Harry Zhang", - address_line1: "210 King St", - address_line2: "# 6100", - address_city: "San Francisco", - address_state: "CA", - address_zip: "94107", - }), - merge_variables: { - name: "Harry" - }, - use_type: 'marketing' - qr_code : { - position: 'relative', - redirect_url: 'https://www.lob.com', - width: '2.5', - bottom: '2.5', - left: '2.5', - pages: 'inside' - }, - fsc: true - }); - - selfMailerApi = SelfMailersApi.new(config) + snapPacksApi = SnapPacksApi.new(config) begin - createdSelfMailer = selfMailerApi.create(selfMailerCreate) + snapPacks = snapPacksApi.list({ limit: 2 }) rescue => err p err.message end label: RUBY - lang: Python source: | - self_mailer_editable = SelfMailerEditable( - description = "Demo Self Mailer job", - _from = "adr_210a8d4b0b76d77b", - inside = "Inside HTML for {{name}}", - outside = "Outside HTML for {{name}}", - to = AddressEditable( - name = "Harry Zhang", - address_line1 = "210 King St", - address_line2 = "# 6100", - address_city = "San Francisco", - address_state = "CA", - address_zip = "94107", - ), - merge_variables = MergeVariables( - name = "Harry", - ), - use_type = "marketing" - qr_code = { - position: "relative", - redirect_url: "https://www.lob.com", - width: "2.5", - bottom: "2.5", - left: "2.5", - pages: "inside" - }, - fsc = true - ) - with ApiClient(configuration) as api_client: - api = SelfMailersApi(api_client) + api = SnapPacksApi(api_client) try: - created_self_mailer = api.create(self_mailer_editable) + snap_packs = api.list(limit=2) except ApiException as e: print(e) label: PYTHON - lang: PHP - source: > - $to = new OpenAPI\Client\Model\AddressEditable( - array( - "name" => "Harry Zhang", - "address_line1" => "210 King St", - "address_line2" => "# 6100", - "address_city" => "San Francisco", - "address_state" => "CA", - "address_zip" => "94107", - ) - ); - - - $merge_variables = new stdClass; - - $merge_variables->name = "Harry"; - - - $use_type = "marketing"; - - $fsc = true; - - - $qr_code = new OpenAPI\Client\Model\QRCode( - array( - "position" => "relative", - "redirect_url" => "https://www.lob.com", - "width" => "2", - "bottom" => "2", - "left" => "2", - "pages" => "inside,outside" - ) - ); - - - $apiInstance = new OpenAPI\Client\Api\SelfMailersApi($config, new - GuzzleHttp\Client()); - - $self_mailer_editable = new OpenAPI\Client\Model\SelfMailerEditable( - array( - "description" => "Demo Self Mailer job", - "from" => "adr_210a8d4b0b76d77b", - "inside" => "Inside HTML for {{name}}", - "outside" => "Outside HTML for {{name}}", - "to" => $to, - "merge_variables" => $merge_variables, - "use_type" => $use_type, - "qr_code" => $qr_code, - "fsc" => $fsc - ) - ); - + source: | + $apiInstance = new OpenAPI\Client\Api\SnapPacksApi($config, new GuzzleHttp\Client()); try { - $result = $apiInstance->create($self_mailer_editable); + $result = $apiInstance->list( + 2, // limit + ); } catch (Exception $e) { echo $e->getMessage(), PHP_EOL; } - lang: Java source: | - Map merge_variables = new HashMap(); - merge_variables.put("name", "Harry"); - - SelfMailersApi apiInstance = new SelfMailersApi(config); - - AddressEditable to = new AddressEditable(); - to.setName("Harry Zhang"); - to.setAddressLine1("210 King St"); - to.setAddressLine2("# 6100"); - to.setAddressCity("San Francisco"); - to.setAddressState("CA"); - to.setAddressZip("94107"); - - QRCode qrCode = new QRCode(); - qrCode.setPosition("relative"); - qrCode.setRedirectUrl("https://www.lob.com"); - qrCode.setWidth("2"); - qrCode.setLeft("2"); - qrCode.setBottom("2"); - qrCode.setPages("outside"); + SnapPacksApi apiInstance = new SnapPacksApi(config); try { - SelfMailerEditable selfMailerEditable = new SelfMailerEditable(); - selfMailerEditable.setDescription("Demo Self Mailer job"); - selfMailerEditable.setFrom("adr_210a8d4b0b76d77b"); - selfMailerEditable.setInside("Inside HTML for {{name}}"); - selfMailerEditable.setOutside("Outside HTML for {{name}}"); - selfMailerEditable.setTo(to); - selfMailerEditable.setMergeVariables(merge_variables); - selfMailerEditable.setUseType("marketing"); - selfMailerEditable.setQRCode(qrCode); - selfMailerEditable.setFsc(true); - - - SelfMailer result = apiInstance.create(selfMailerEditable, null); + SnapPackList response = apiInstance.list( + 2, // limit + null, // before + null, // after + null, // include + null, // dateCreated + null, // metadata + null, // size + null, // scheduled + null, // sendDate + null, // mailType + null // sortBy + ); } catch (ApiException e) { e.printStackTrace(); } label: JAVA - lang: Elixir source: | - Lob.SelfMailer.create(%{ - description: "Demo Self Mailer job", - to: %{ - name: "Harry Zhang", - address_line1: "210 King St", - address_city: "San Francisco", - address_state: "CA", - address_zip: "94107" - }, - from: "adr_210a8d4b0b76d77b", - inside: "Inside HTML for {{name}}", - outside: "Outside HTML for {{name}}", - merge_variables: %{ - name: "Harry" - }, - use_type: "marketing" - qr_code: %{ - position: 'relative', - redirect_url: 'https://www.lob.com', - width: '2', - bottom: '2', - left: '2', - pages: 'inside,outside' - }, - fsc: true - }) + Lob.SnapPack.list(%{limit: 2}) label: ELIXIR - lang: CSharp - source: > - Dictionary mergeVariables = new Dictionary(); - - mergeVariables.Add("name", "Harry"); - - - SelfMailersApi api = new SelfMailersApi(config); - - - AddressEditable to = new AddressEditable( - "210 King St", // addressLine1 - "# 6100", // addressLine2 - "San Francisco", // addressCity - "CA", // addressState - "94107", // addressZip - default(CountryExtended), // addressCounty - null, // description - "Harry Zhang" // name - ); - - - QRCode qrCode = new QRCode( - "relative", //position, - "https://www.lob.com", //redirect_url - "2", //width - "2", //left - "2", //bottom - "inside", //pages - ); - - - Fsc fsc = new Fsc(true); - - - SelfMailerEditable selfMailerEditable = new SelfMailerEditable( - to.ToJson(), // to - "adr_249af768103d2810", // from - default(SelfMailerSize), // size - "Demo Self Mailer Job", // description - default(Dictionary), // metadata - default(MailType), // mailType - mergeVariables, // mergeVariables - default(DateTime), // sendDate - "Inside HTML for {{name}}", // inside - "Outside HTML for {{name}}", // outside - "marketing", // use_type - qrCode, - fsc - ); + source: | + SnapPacksApi api = new SnapPacksApi(config); + List includeList = new List(); + includeList.Add("total_count"); + Dictionary metadata = new Dictionary(); + metadata.Add("name", "Harry"); + Dictionary dateCreated = new Dictionary(); + DateTime dateCreatedDate = DateTime.Today.AddMonths(-1); + dateCreated.Add("lt", dateCreatedDate); + Dictionary sendDate = new Dictionary(); + sendDate.Add("lt", DateTime.Now.ToString("yyyy-MM-ddTHH\\:mm\\:ss.fffffffzzz")); + SortBy3 sortBy = new SortBy3(SortBy3.DateCreatedEnum.Asc); try { - SelfMailer result = api.create(selfMailerEditable, null); + SnapPackList response = api.list( + 2, // limit + null, // before + null, // after + includeList, // include + dateCreated, // dateCreated + metadata, // metadata + null, // size + true, // scheduled + sendDate, // sendDate + MailType.FirstClass, // mailType + sortBy // sortBy + ); } catch (ApiException e) { Console.WriteLine(e.ToString()); } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - - - var to = *lob.NewAddressEditable() - - to.SetAddressLine1("210 King St") - - to.SetAddressLine2("# 6100") - - to.SetAddressCity("San Francisco") - - to.SetAddressState("CA") - - to.SetAddressZip("94107") - - to.SetAddressCountry(lob.COUNTRYEXTENDED_US) - - to.SetDescription("") - - to.SetName("Harry Zhang") - - - var selfMailerCreate = *lob.NewSelfMailerEditable() - - selfMailerCreate.SetDescription("Demo Self Mailer job") - - selfMailerCreate.SetFrom("adr_210a8d4b0b76d77b") - - selfMailerCreate.SetInside("Inside HTML for {{name}}") - - selfMailerCreate.SetOutside("Outside HTML for {{name}}") - - selfMailerCreate.SetTo(to) - - selfMailerCreate.SetFsc(true) - - - - createdselfMailer, _, err := - apiClient.SelfMailersApi.Create(context).SelfMailerEditable(selfMailerCreate).Execute() - - + SnapPackList = apiClient.SnapPacksApi.List(context).Execute() if err != nil { return err } label: GO - /snap_packs: post: operationId: snap_pack_create summary: Create @@ -24130,7 +12517,7 @@ paths: print(e) label: PYTHON - lang: PHP - source: > + source: | $to = new OpenAPI\Client\Model\AddressEditable( array( "name" => "Harry Zhang", @@ -24142,20 +12529,13 @@ paths: ) ); - $merge_variables = new stdClass; - $merge_variables->name = "Harry"; - $use_type = "marketing"; - $fsc = true; - - $apiInstance = new OpenAPI\Client\Api\SnapPacksApi($config, new - GuzzleHttp\Client()); - + $apiInstance = new OpenAPI\Client\Api\SnapPacksApi($config, new GuzzleHttp\Client()); $snap_pack_editable = new OpenAPI\Client\Model\SnapPackEditable( array( "description" => "Demo Snap Pack job", @@ -24169,7 +12549,6 @@ paths: ) ); - try { $result = $apiInstance->create($snap_pack_editable); } catch (Exception $e) { @@ -24229,16 +12608,12 @@ paths: }) label: ELIXIR - lang: CSharp - source: > - Dictionary mergeVariables = new Dictionary(); - + source: | + Dictionary mergeVariables = new Dictionary(); mergeVariables.Add("name", "Harry"); - SnapPacksApi api = new SnapPacksApi(config); - AddressEditable to = new AddressEditable( "210 King St", // addressLine1 "# 6100", // addressLine2 @@ -24250,10 +12625,8 @@ paths: "Harry Zhang" // name ); - Fsc fsc = new Fsc(true); - SnapPackEditable SnapPackEditable = new SnapPackEditable( to.ToJson(), // to "adr_249af768103d2810", // from @@ -24269,7 +12642,6 @@ paths: fsc ); - try { SnapPack result = api.create(SnapPackEditable, null); } catch (ApiException e) { @@ -24277,56 +12649,32 @@ paths: } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - var to = *lob.NewAddressEditable() - to.SetAddressLine1("210 King St") - to.SetAddressLine2("# 6100") - to.SetAddressCity("San Francisco") - to.SetAddressState("CA") - to.SetAddressZip("94107") - to.SetAddressCountry(lob.COUNTRYEXTENDED_US) - to.SetDescription("") - to.SetName("Harry Zhang") - var SnapPackCreate = *lob.NewSnapPackEditable() - SnapPackCreate.SetDescription("Demo Snap Pack job") - SnapPackCreate.SetFrom("adr_210a8d4b0b76d77b") - - SnapPackCreate.SetInside("Inside HTML for {{name}}") - - SnapPackCreate.SetOutside("Outside HTML for {{name}}") - + SnapPackCreate.SetInside("Inside HTML for {{name}}") + SnapPackCreate.SetOutside("Outside HTML for {{name}}") SnapPackCreate.SetTo(to) - SnapPackCreate.SetFsc(true) - - createdSnapPack, _, err := - apiClient.SnapPacksApi.Create(context).SnapPackEditable(SnapPackCreate).Execute() - + createdSnapPack, _, err := apiClient.SnapPacksApi.Create(context).SnapPackEditable(SnapPackCreate).Execute() if err != nil { return err @@ -24354,9 +12702,7 @@ paths: - Template Versions responses: '200': - description: >- - Returns the template version with the given template and version - ids. + description: Returns the template version with the given template and version ids. content: application/json: schema: @@ -24372,10 +12718,8 @@ paths: $ref: '#/components/responses/template_error' x-codeSamples: - lang: Shell - source: > - curl - https://api.lob.com/v1/templates/tmpl_c94e83ca2cd5121/versions/vrsn_534e339882d2282 - \ + source: | + curl https://api.lob.com/v1/templates/tmpl_c94e83ca2cd5121/versions/vrsn_534e339882d2282 \ -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: label: CURL - lang: Typescript @@ -24411,10 +12755,8 @@ paths: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\TemplateVersionsApi($config, - new GuzzleHttp\Client()); - + source: | + $apiInstance = new OpenAPI\Client\Api\TemplateVersionsApi($config, new GuzzleHttp\Client()); try { $result = $apiInstance->get("tmpl_c94e83ca2cd5121", "vrsn_534e339882d2282"); @@ -24446,20 +12788,13 @@ paths: } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - - fetchedTemplateVersion, _, err := - apiClient.TemplateVersionsApi.Get(context,"tmpl_c94e83ca2cd5121", - "vrsn_534e339882d2282").Execute() - + fetchedTemplateVersion, _, err := apiClient.TemplateVersionsApi.Get(context,"tmpl_c94e83ca2cd5121", "vrsn_534e339882d2282").Execute() if err != nil { return err @@ -24496,10 +12831,8 @@ paths: $ref: '#/components/responses/template_error' x-codeSamples: - lang: Shell - source: > - curl - https://api.lob.com/v1/templates/tmpl_c94e83ca2cd5121/versions/vrsn_534e339882d2282 - \ + source: | + curl https://api.lob.com/v1/templates/tmpl_c94e83ca2cd5121/versions/vrsn_534e339882d2282 \ -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \ -d "description=Updated description" label: CURL @@ -24549,17 +12882,13 @@ paths: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\TemplateVersionsApi($config, - new GuzzleHttp\Client()); - + source: | + $apiInstance = new OpenAPI\Client\Api\TemplateVersionsApi($config, new GuzzleHttp\Client()); - $templateVersionUpdate = new - OpenAPI\Client\Model\TemplateUpdate(array( + $templateVersionUpdate = new OpenAPI\Client\Model\TemplateUpdate(array( "description" => "Updated template version" )); - try { $result = $apiInstance->update("tmpl_c94e83ca2cd5121", "vrsn_534e339882d2282", $templateVersionUpdate); } catch (Exception $e) { @@ -24574,12 +12903,9 @@ paths: This feature is not currently supported by this library. label: ELIXIR - lang: CSharp - source: > + source: | TemplateVersionsApi api = new TemplateVersionsApi(config); - - TemplateVersionUpdatable update = new - TemplateVersionUpdatable("update template", EngineHtml.Handlebars); - + TemplateVersionUpdatable update = new TemplateVersionUpdatable("update template", EngineHtml.Handlebars); try { api.update("tmpl_c94e83ca2cd5121", "vrsn_534e339882d2282", update); @@ -24588,37 +12914,19 @@ paths: } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) + var templateWritable = *lob.NewTemplateWritable("Updated HTML for Template 1/html>") + var templateVersionWritable = *lob.NewTemplateVersionWritable("Updated HTML for Template 1/html>") + createdTemplate, _, _ := apiClient.TemplatesApi.Create(context).TemplateWritable(templateWritable).Execute() - var templateWritable = *lob.NewTemplateWritable("Updated HTML - for Template 1/html>") - - var templateVersionWritable = - *lob.NewTemplateVersionWritable("Updated HTML for Template - 1/html>") - - createdTemplate, _, _ := - apiClient.TemplatesApi.Create(context).TemplateWritable(templateWritable).Execute() - - - createdTemplateVersion, _, err := - apiClient.TemplateVersionsApi.Create(context, - createdTemplate.Id).TemplateVersionWritable(templateVersionWritable).Execute() - + createdTemplateVersion, _, err := apiClient.TemplateVersionsApi.Create(context, createdTemplate.Id).TemplateVersionWritable(templateVersionWritable).Execute() createdTemplateVersion.SetDescription("New Template Version") - - resp, _, err := apiClient.TemplatesApi.Update(context, - createdTemplate.Id, - createdTemplateVersion.Id).TemplateVersionWritable(templateVersionWritable).Execute() - + resp, _, err := apiClient.TemplatesApi.Update(context, createdTemplate.Id, createdTemplateVersion.Id).TemplateVersionWritable(templateVersionWritable).Execute() if err != nil { return err @@ -24627,9 +12935,7 @@ paths: delete: operationId: template_version_delete summary: Delete - description: >- - Permanently deletes a template version. A template's `published_version` - can not be deleted. + description: Permanently deletes a template version. A template's `published_version` can not be deleted. tags: - Template Versions responses: @@ -24639,10 +12945,8 @@ paths: $ref: '#/components/responses/template_error' x-codeSamples: - lang: Shell - source: > - curl -X DELETE - https://api.lob.com/v1/templates/tmpl_4aa14648113e45b/versions/vrsn_534e339882d2282 - \ + source: | + curl -X DELETE https://api.lob.com/v1/templates/tmpl_4aa14648113e45b/versions/vrsn_534e339882d2282 \ -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: label: CURL - lang: Typescript @@ -24699,20 +13003,13 @@ paths: } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - - deletedTemplateVersion, _, err := - apiClient.TemplateVersionsApi.Delete(context, - "tmpl_4aa14648113e45b", "vrsn_534e339882d2282").Execute() - + deletedTemplateVersion, _, err := apiClient.TemplateVersionsApi.Delete(context, "tmpl_4aa14648113e45b", "vrsn_534e339882d2282").Execute() if err != nil { return err @@ -24722,10 +13019,8 @@ paths: get: operationId: template_versions_list summary: List - 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. + 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. tags: - Template Versions parameters: @@ -24746,10 +13041,8 @@ paths: $ref: '#/components/responses/template_error' x-codeSamples: - lang: Shell - source: > - curl -X GET - "https://api.lob.com/v1/templates/tmpl_ea6e6a1abf01703/versions?limit=2" - \ + source: | + curl -X GET "https://api.lob.com/v1/templates/tmpl_ea6e6a1abf01703/versions?limit=2" \ -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: label: CURL - lang: Typescript @@ -24785,10 +13078,8 @@ paths: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\TemplateVersionsApi($config, - new GuzzleHttp\Client()); - + source: | + $apiInstance = new OpenAPI\Client\Api\TemplateVersionsApi($config, new GuzzleHttp\Client()); try { $result = $apiInstance->list( @@ -24820,22 +13111,15 @@ paths: This feature is not currently supported by this library. label: ELIXIR - lang: CSharp - source: > + source: | TemplateVersionsApi api = new TemplateVersionsApi(config); - List includeList = new List(); - includeList.Add("total_count"); - - Dictionary dateCreated = new Dictionary(); - + Dictionary dateCreated = new Dictionary(); DateTime dateCreatedDate = DateTime.Today.AddMonths(-1); - dateCreated.Add("lt", dateCreatedDate); - try { TemplateVersionList response = api.list( "tmpl_dadaaf7b76c9f25", // tmplId @@ -24850,18 +13134,12 @@ paths: } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - - TemplateVersionList = apiClient.TemplateVersionsApi.List(context, - "tmpl_4aa14648113e45b").Execute() - + TemplateVersionList = apiClient.TemplateVersionsApi.List(context, "tmpl_4aa14648113e45b").Execute() if err != nil { return err } @@ -24907,9 +13185,8 @@ paths: $ref: '#/components/responses/template_error' x-codeSamples: - lang: Shell - source: > - curl https://api.lob.com/v1/templates/tmpl_4aa14648113e45b/versions - \ + source: | + curl https://api.lob.com/v1/templates/tmpl_4aa14648113e45b/versions \ -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \ -d "description=Second Version" \ --data-urlencode "html=Second HTML for {{name}}" @@ -24962,19 +13239,15 @@ paths: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\TemplateVersionsApi($config, - new GuzzleHttp\Client()); - - $template_version_writable = new - OpenAPI\Client\Model\TemplateVersionWritable( + source: | + $apiInstance = new OpenAPI\Client\Api\TemplateVersionsApi($config, new GuzzleHttp\Client()); + $template_version_writable = new OpenAPI\Client\Model\TemplateVersionWritable( array( "description" => "Second Version", "html" => "Second HTML for {{name}}", ) ); - try { $result = $apiInstance->create("tmpl_4aa14648113e45b", $template_version_writable); } catch (Exception $e) { @@ -24999,17 +13272,14 @@ paths: This feature is not currently supported by this library. label: ELIXIR - lang: CSharp - source: > + source: | TemplateVersionsApi api = new TemplateVersionsApi(config); - - TemplateVersionWritable templateVersionWritable = new - TemplateVersionWritable( + TemplateVersionWritable templateVersionWritable = new TemplateVersionWritable( "Second Version", // description "Second HTML for {{name}}" // html ); - try { TemplateVersion result = api.create("tmpl_4aa14648113e45b", templateVersionWritable); } catch (ApiException e) { @@ -25017,31 +13287,20 @@ paths: } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - var templateVersionCreate = *lob.NewTemplateVersionWritable() - templateVersionCreate.SetDescription("Second Version") - - templateVersionCreate.SetHtml("Second HTML for - {{name}}") - - + templateVersionCreate.SetHtml("Second HTML for {{name}}") - createdtemplateVersion, _, err := - apiClient.TemplateVersionsApi.Create(context, - "tmpl_4aa14648113e45b").TemplateVersionWritable(templateVersionCreate).Execute() + createdtemplateVersion, _, err := apiClient.TemplateVersionsApi.Create(context, "tmpl_4aa14648113e45b").TemplateVersionWritable(templateVersionCreate).Execute() if err != nil { return err @@ -25058,9 +13317,7 @@ paths: get: operationId: template_retrieve summary: Retrieve - description: >- - Retrieves the details of an existing template. You need only supply the - unique template identifier that was returned upon template creation. + description: Retrieves the details of an existing template. You need only supply the unique template identifier that was returned upon template creation. tags: - Templates responses: @@ -25136,10 +13393,8 @@ paths: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\TemplatesApi($config, new - GuzzleHttp\Client()); - + source: | + $apiInstance = new OpenAPI\Client\Api\TemplatesApi($config, new GuzzleHttp\Client()); try { $result = $apiInstance->get("tmpl_c94e83ca2cd5121"); @@ -25171,19 +13426,13 @@ paths: } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - - fetchedTemplate, _, err := - apiClient.TemplatesApi.Get(context,"tmpl_c94e83ca2cd5121").Execute() - + fetchedTemplate, _, err := apiClient.TemplatesApi.Get(context,"tmpl_c94e83ca2cd5121").Execute() if err != nil { return err @@ -25192,10 +13441,7 @@ paths: post: operationId: template_update summary: Update - 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. + 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. tags: - Templates requestBody: @@ -25317,17 +13563,14 @@ paths: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\TemplatesApi($config, new - GuzzleHttp\Client()); - + source: | + $apiInstance = new OpenAPI\Client\Api\TemplatesApi($config, new GuzzleHttp\Client()); $templateUpdate = new OpenAPI\Client\Model\TemplateUpdate(array( "description" => "Updated description", "published_version" => "vrsn_362184d96d9b0c9" )); - try { $result = $apiInstance->update("tmpl_c94e83ca2cd5121", $templateUpdate); } catch (Exception $e) { @@ -25352,12 +13595,9 @@ paths: This feature is not currently supported by this library. label: ELIXIR - lang: CSharp - source: > + source: | TemplatesApi api = new TemplatesApi(config); - - TemplateUpdate update = new TemplateUpdate("update template", - "vrsn_362184d96d9b0c9"); - + TemplateUpdate update = new TemplateUpdate("update template", "vrsn_362184d96d9b0c9"); try { api.update("tmpl_c94e83ca2cd5121", update); @@ -25366,28 +13606,17 @@ paths: } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - - var templateWritable = *lob.NewTemplateWritable("Updated HTML - for Template 1/html>") - - createdTemplate, _, _ := - apiClient.TemplatesApi.Create(context).TemplateWritable(templateWritable).Execute() - + var templateWritable = *lob.NewTemplateWritable("Updated HTML for Template 1/html>") + createdTemplate, _, _ := apiClient.TemplatesApi.Create(context).TemplateWritable(templateWritable).Execute() templateWritable.SetDescription("Template updated") - - resp, _, err := apiClient.TemplatesApi.Update(context, - createdTemplate.Id).TemplateWritable(templateWritable).Execute() - + resp, _, err := apiClient.TemplatesApi.Update(context, createdTemplate.Id).TemplateWritable(templateWritable).Execute() if err != nil { return err @@ -25396,10 +13625,7 @@ paths: delete: operationId: template_delete summary: 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. + 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. tags: - Templates responses: @@ -25409,9 +13635,8 @@ paths: $ref: '#/components/responses/template_error' x-codeSamples: - lang: Shell - source: > - curl -X DELETE https://api.lob.com/v1/templates/tmpl_df934eeda694203 - \ + source: | + curl -X DELETE https://api.lob.com/v1/templates/tmpl_df934eeda694203 \ -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: label: CURL - lang: Typescript @@ -25447,10 +13672,8 @@ paths: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\TemplatesApi($config, new - GuzzleHttp\Client()); - + source: | + $apiInstance = new OpenAPI\Client\Api\TemplatesApi($config, new GuzzleHttp\Client()); try { $result = $apiInstance->delete("tmpl_df934eeda694203"); @@ -25482,19 +13705,13 @@ paths: } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) var apiClient = *lob.NewAPIClient(configuration) - - deletedTemplate, _, err := apiClient.TemplatesApi.Delete(context, - "tmpl_df934eeda694203").Execute() - + deletedTemplate, _, err := apiClient.TemplatesApi.Delete(context, "tmpl_df934eeda694203").Execute() if err != nil { return err @@ -25504,9 +13721,7 @@ paths: get: operationId: templates_list summary: List - description: >- - Returns a list of your templates. The templates are returned sorted by - creation date, with the most recently created templates appearing first. + description: Returns a list of your templates. The templates are returned sorted by creation date, with the most recently created templates appearing first. tags: - Templates parameters: @@ -25523,13 +13738,204 @@ paths: x-codeSamples: - lang: Shell source: | - curl -X GET "https://api.lob.com/v1/templates?limit=2" \ - -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: + curl -X GET "https://api.lob.com/v1/templates?limit=2" \ + -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: + label: CURL + - lang: Typescript + source: | + try { + const templates = await new TemplatesApi(config).list(2); + } catch (err: any) { + console.error(err); + } + label: TYPESCRIPT + - lang: Javascript + source: | + This feature is not currently supported by this library. + label: NODE + - lang: Ruby + source: | + templatesApi = TemplatesApi.new(config) + + begin + templates = templatesApi.list({ limit: 2 }) + rescue => err + p err.message + end + label: RUBY + - lang: Python + source: | + with ApiClient(configuration) as api_client: + api = TemplatesApi(api_client) + + try: + templates = api.list(limit=2) + except ApiException as e: + print(e) + label: PYTHON + - lang: PHP + source: | + $apiInstance = new OpenAPI\Client\Api\TemplatesApi($config, new GuzzleHttp\Client()); + + try { + $result = $apiInstance->list( + 2, // limit + ); + } catch (Exception $e) { + echo $e->getMessage(), PHP_EOL; + } + - lang: Java + source: | + TemplatesApi apiInstance = new TemplatesApi(config); + + try { + List response = apiInstance.list( + 2, // limit + null, // before + null, // after + null, // include + null, // dateCreated + null, // metadata + null // size + ); + } catch (ApiException e) { + e.printStackTrace(); + } + label: JAVA + - lang: Elixir + source: | + This feature is not currently supported by this library. + label: ELIXIR + - lang: CSharp + source: | + TemplatesApi api = new TemplatesApi(config); + + List includeList = new List(); + includeList.Add("total_count"); + Dictionary metadata = new Dictionary(); + metadata.Add("name", "Harry"); + Dictionary dateCreated = new Dictionary(); + DateTime dateCreatedDate = DateTime.Today.AddMonths(-1); + dateCreated.Add("lt", dateCreatedDate); + + try { + TemplateList response = api.list( + 2, // limit + null, // before + null, // after + includeList, // include + dateCreated, // dateCreated + metadata // metadata + ); + } catch (ApiException e) { + Console.WriteLine(e.ToString()); + } + label: CSHARP + - lang: Go + source: | + var context = context.Background() + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) + + var apiClient = *lob.NewAPIClient(configuration) + TemplateList = apiClient.TemplatesApi.List(context).Execute() + if err != nil { + return err + } + label: GO + post: + operationId: create_template + summary: Create + 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 Print & Mail Edition. If you attempt to create a template past your limit, you will receive a `403` error. There is no limit in Test mode. + tags: + - Templates + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/template_writable' + example: + description: demo + html: HTML for {{name}} + metadata: + spiffy: 'true' + engine: handlebars + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/template_writable' + example: + description: demo + html: HTML for {{name}} + metadata: + spiffy: 'true' + engine: handlebars + multipart/form-data: + schema: + $ref: '#/components/schemas/template_writable' + example: + description: demo + html: HTML for {{name}} + metadata: + spiffy: 'true' + engine: handlebars + responses: + '200': + 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' + content: + application/json: + schema: + $ref: '#/components/schemas/template' + example: + id: tmpl_c94e83ca2cd5121 + description: Test Template + versions: + - id: vrsn_362184d96d9b0c9 + suggest_json_editor: true + description: Test Template + engine: legacy + html: HTML for {{name}} + date_created: '2017-11-07T22:56:10.962Z' + date_modified: '2017-11-07T22:56:10.962Z' + object: version + published_version: + id: vrsn_362184d96d9b0c9 + suggest_json_editor: false + description: Test Template + engine: handlebars + html: HTML for {{name}} + date_created: '2017-11-07T22:56:10.962Z' + date_modified: '2017-11-07T22:56:10.962Z' + object: version + metadata: {} + date_created: '2017-11-07T22:56:10.962Z' + date_modified: '2017-11-07T22:56:10.962Z' + object: template + default: + $ref: '#/components/responses/template_error' + x-codeSamples: + - lang: Shell + source: | + curl https://api.lob.com/v1/templates \ + -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \ + -d "description=Test Template" \ + --data-urlencode "html=HTML for {{name}}" label: CURL - lang: Typescript source: | + const templateCreate = new TemplateWritable({ + description: 'Newer Template', + html: 'Updated HTML for {{name}}' + }); + try { - const templates = await new TemplatesApi(config).list(2); + const myTemplate = await new TemplatesApi(config).create(templateCreate); } catch (err: any) { console.error(err); } @@ -25540,34 +13946,46 @@ paths: label: NODE - lang: Ruby source: | - templatesApi = TemplatesApi.new(config) + templateCreate = TemplateWritable.new({ + description: "Test Template", + html: "HTML for {{name}}", + }); + + templateApi = TemplatesApi.new(config) begin - templates = templatesApi.list({ limit: 2 }) + createdTemplate = templateApi.create(templateCreate) rescue => err p err.message end label: RUBY - lang: Python source: | + template_writable = TemplateWritable( + description = "Test Template", + html = "HTML for {{name}}", + ) + with ApiClient(configuration) as api_client: api = TemplatesApi(api_client) try: - templates = api.list(limit=2) + created_template = api.create(template_writable) except ApiException as e: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\TemplatesApi($config, new - GuzzleHttp\Client()); - + source: | + $apiInstance = new OpenAPI\Client\Api\TemplatesApi($config, new GuzzleHttp\Client()); + $template_writable = new OpenAPI\Client\Model\TemplateWritable( + array( + "description" => "Test Template", + "html" => "HTML for {{name}}", + ) + ); try { - $result = $apiInstance->list( - 2, // limit - ); + $result = $apiInstance->create($template_writable); } catch (Exception $e) { echo $e->getMessage(), PHP_EOL; } @@ -25576,15 +13994,11 @@ paths: TemplatesApi apiInstance = new TemplatesApi(config); try { - List response = apiInstance.list( - 2, // limit - null, // before - null, // after - null, // include - null, // dateCreated - null, // metadata - null // size - ); + TemplateWritable = new TemplateWritable(); + .set("Test Template"); + .set("HTML for {{name}}"); + + Template result = apiInstance.create(); } catch (ApiException e) { e.printStackTrace(); } @@ -25594,977 +14008,1080 @@ paths: This feature is not currently supported by this library. label: ELIXIR - lang: CSharp - source: > + source: | TemplatesApi api = new TemplatesApi(config); - - List includeList = new List(); - - includeList.Add("total_count"); - - Dictionary metadata = new Dictionary(); - - metadata.Add("name", "Harry"); - - Dictionary dateCreated = new Dictionary(); - - DateTime dateCreatedDate = DateTime.Today.AddMonths(-1); - - dateCreated.Add("lt", dateCreatedDate); - + TemplateWritable templateWritable = new TemplateWritable( + "Test Template", // description + "HTML for {{name}}" // html + ); try { - TemplateList response = api.list( - 2, // limit - null, // before - null, // after - includeList, // include - dateCreated, // dateCreated - metadata // metadata - ); + Template result = api.create(templateWritable); } catch (ApiException e) { Console.WriteLine(e.ToString()); } label: CSHARP - lang: Go - source: > + source: | var context = context.Background() + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) + var apiClient = *lob.NewAPIClient(configuration) - var apiClient = *lob.NewAPIClient(configuration) + var templateCreate = *lob.NewTemplateWritable() + templateCreate.SetDescription("Test Template") + templateCreate.SetHtml("HTML for {{name}}") + - TemplateList = apiClient.TemplatesApi.List(context).Execute() + + createdtemplate, _, err := apiClient.TemplatesApi.Create(context).TemplateWritable(templateCreate).Execute() if err != nil { return err } label: GO + /uploads: + get: + operationId: uploads_list + summary: List + description: Returns a list of your uploads. Optionally, filter uploads by campaign. + tags: + - Uploads + parameters: + - required: false + schema: + $ref: '#/components/schemas/cmp_id' + name: campaignId + description: id of the campaign + in: query + responses: + '200': + $ref: '#/components/responses/all_uploads' + x-codeSamples: + - lang: Shell + source: | + curl https://api.lob.com/v1/uploads \ + -u : + label: CURL + - lang: Ruby + source: | + uploadsApi = UploadsApi.new(config) + + begin + uploads = uploadsApi.list_upload({ campaign_id: "cmp_e05ee61ff80764b" }) + rescue => err + p err.message + end + label: RUBY post: - operationId: create_template + operationId: upload_create summary: Create - 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 Print & Mail Edition. If you attempt to create a - template past your limit, you will receive a `403` error. There is no - limit in Test mode. + description: Creates a new upload with the provided properties. tags: - - Templates + - Uploads requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/template_writable' - example: - description: demo - html: HTML for {{name}} - metadata: - spiffy: 'true' - engine: handlebars - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/template_writable' - example: - description: demo - html: HTML for {{name}} - metadata: - spiffy: 'true' - engine: handlebars - multipart/form-data: - schema: - $ref: '#/components/schemas/template_writable' - example: - description: demo - html: HTML for {{name}} - metadata: - spiffy: 'true' - engine: handlebars + $ref: '#/components/schemas/upload_writable' + responses: + '201': + description: Upload created successfully + content: + application/json: + schema: + $ref: '#/components/schemas/upload' + example: + id: upl_71be866e430b11e9 + accountId: fa9ea650fc7b31a89f92 + campaignId: cmp_1933ad629bae1408 + mode: live + failuresUrl: http://www.example.com + originalFilename: my_audience.csv + state: Draft + totalMailpieces: 100 + failedMailpieces: 5 + validatedMailpieces: 95 + bytesProcessed: 17628 + dateCreated: '2017-09-05T17:47:53.767Z' + dateModified: '2017-09-05T17:47:53.767Z' + requiredAddressColumnMapping: + name: null + address_line1: null + address_city: null + address_state: null + address_zip: null + optionalAddressColumnMapping: + address_line2: null + company: null + address_country: null + mergeVariableColumnMapping: null + metadata: + columns: [] + '422': + $ref: '#/components/responses/upload_validation_error' + x-codeSamples: + - lang: Shell + source: | + curl --location --request POST 'https://api.lob.com/v1/uploads' \ + --header 'Content-Type: application/json' \ + -u YOUR_KEY_HERE: \ + --data-raw '{ + "campaignId": "cmp_f33809b18b6f3ea8" + }' + label: CURL + - lang: Ruby + source: | + uploadCreate = UploadWritable.new({ + campaign_id: "cmp_e05ee61ff80764b", + }); + + uploadApi = UploadsApi.new(config) + + begin + createdUpload = uploadApi.create_upload(uploadCreate) + rescue => err + p err.message + end + label: RUBY + /uploads/{upl_id}: + parameters: + - in: path + name: upl_id + description: id of the upload + required: true + schema: + $ref: '#/components/schemas/upl_id' + get: + operationId: upload_retrieve + summary: Retrieve + description: Retrieves the details of an existing upload. You need only supply the unique upload identifier that was returned upon upload creation. + tags: + - Uploads responses: '200': - 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' + description: Returns an upload object content: application/json: schema: - $ref: '#/components/schemas/template' + $ref: '#/components/schemas/upload' example: - id: tmpl_c94e83ca2cd5121 - description: Test Template - versions: - - id: vrsn_362184d96d9b0c9 - suggest_json_editor: true - description: Test Template - engine: legacy - html: HTML for {{name}} - date_created: '2017-11-07T22:56:10.962Z' - date_modified: '2017-11-07T22:56:10.962Z' - object: version - published_version: - id: vrsn_362184d96d9b0c9 - suggest_json_editor: false - description: Test Template - engine: handlebars - html: HTML for {{name}} - date_created: '2017-11-07T22:56:10.962Z' - date_modified: '2017-11-07T22:56:10.962Z' - object: version - metadata: {} - date_created: '2017-11-07T22:56:10.962Z' - date_modified: '2017-11-07T22:56:10.962Z' - object: template - default: - $ref: '#/components/responses/template_error' + id: upl_71be866e430b11e9 + accountId: fa9ea650fc7b31a89f92 + campaignId: cmp_1933ad629bae1408 + mode: live + failuresUrl: http://www.example.com + originalFilename: my_audience.csv + state: Draft + totalMailpieces: 100 + failedMailpieces: 5 + validatedMailpieces: 95 + bytesProcessed: 17628 + dateCreated: '2017-09-05T17:47:53.767Z' + dateModified: '2017-09-05T17:47:53.767Z' + requiredAddressColumnMapping: + name: null + address_line1: null + address_city: null + address_state: null + address_zip: null + optionalAddressColumnMapping: + address_line2: null + company: null + address_country: null + mergeVariableColumnMapping: null + metadata: + columns: [] + '404': + $ref: '#/components/responses/upload_not_found' + '422': + $ref: '#/components/responses/upload_validation_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/templates \ - -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \ - -d "description=Test Template" \ - --data-urlencode "html=HTML for {{name}}" + curl https://api.lob.com/v1/uploads/upl_71be866e430b11e9 \ + -u : \ label: CURL - - lang: Typescript - source: | - const templateCreate = new TemplateWritable({ - description: 'Newer Template', - html: 'Updated HTML for {{name}}' - }); - - try { - const myTemplate = await new TemplatesApi(config).create(templateCreate); - } catch (err: any) { - console.error(err); - } - label: TYPESCRIPT - - lang: Javascript - source: | - This feature is not currently supported by this library. - label: NODE - lang: Ruby source: | - templateCreate = TemplateWritable.new({ - description: "Test Template", - html: "HTML for {{name}}", - }); - - templateApi = TemplatesApi.new(config) + uploadApi = UploadsApi.new(config) begin - createdTemplate = templateApi.create(templateCreate) + retrievedUpload = uploadApi.get_upload("upl_71be866e430b11e9") rescue => err p err.message end label: RUBY + patch: + operationId: upload_update + summary: Update + description: Update the details of an existing upload. You need only supply the unique identifier that was returned upon upload creation. + tags: + - Uploads + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/upload_updatable' + responses: + '200': + description: Returns an upload object + content: + application/json: + schema: + $ref: '#/components/schemas/upload' + example: + id: upl_71be866e430b11e9 + accountId: fa9ea650fc7b31a89f92 + campaignId: cmp_1933ad629bae1408 + mode: live + failuresUrl: http://www.example.com + originalFilename: my_audience.csv + state: Draft + totalMailpieces: 100 + failedMailpieces: 5 + validatedMailpieces: 95 + bytesProcessed: 17628 + dateCreated: '2017-09-05T17:47:53.767Z' + dateModified: '2017-09-05T17:47:53.767Z' + requiredAddressColumnMapping: + name: null + address_line1: null + address_city: null + address_state: null + address_zip: null + optionalAddressColumnMapping: + address_line2: null + company: null + address_country: null + mergeVariableColumnMapping: null + metadata: + columns: [] + '404': + $ref: '#/components/responses/upload_not_found' + '422': + $ref: '#/components/responses/upload_validation_error' + x-codeSamples: + - lang: Shell + source: | + curl -X PATCH https://api.lob.com/v1/uploads/upl_71be866e430b11e9 \ + -u : \ + -d "state=Ready for Validation" + label: CURL - lang: Python source: | - template_writable = TemplateWritable( - description = "Test Template", - html = "HTML for {{name}}", + upload_updatable = UploadUpdatable( + state = UploadState("Ready for Validation"), ) with ApiClient(configuration) as api_client: - api = TemplatesApi(api_client) + api = UploadsApi(api_client) try: - created_template = api.create(template_writable) + updated_upload = api.update_upload("upl_71be866e430b11e9", upload_updatable) except ApiException as e: print(e) label: PYTHON - - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\TemplatesApi($config, new - GuzzleHttp\Client()); - - $template_writable = new OpenAPI\Client\Model\TemplateWritable( - array( - "description" => "Test Template", - "html" => "HTML for {{name}}", - ) - ); - - - try { - $result = $apiInstance->create($template_writable); - } catch (Exception $e) { - echo $e->getMessage(), PHP_EOL; - } - - lang: Java - source: | - TemplatesApi apiInstance = new TemplatesApi(config); - - try { - TemplateWritable = new TemplateWritable(); - .set("Test Template"); - .set("HTML for {{name}}"); - - Template result = apiInstance.create(); - } catch (ApiException e) { - e.printStackTrace(); - } - label: JAVA - - lang: Elixir - source: | - This feature is not currently supported by this library. - label: ELIXIR - - lang: CSharp + - lang: Ruby source: | - TemplatesApi api = new TemplatesApi(config); - - TemplateWritable templateWritable = new TemplateWritable( - "Test Template", // description - "HTML for {{name}}" // html - ); - - try { - Template result = api.create(templateWritable); - } catch (ApiException e) { - Console.WriteLine(e.ToString()); - } - label: CSHARP - - lang: Go - source: > - var context = context.Background() - - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - - - var apiClient = *lob.NewAPIClient(configuration) - - - - var templateCreate = *lob.NewTemplateWritable() - - templateCreate.SetDescription("Test Template") - - templateCreate.SetHtml("HTML for {{name}}") - - - - - createdtemplate, _, err := - apiClient.TemplatesApi.Create(context).TemplateWritable(templateCreate).Execute() + uploadUpdatable = UploadUpdatable.new({ + required_address_column_mapping: RequiredAddressColumnMapping.new({ + name: "recipient", + address_line1: "primary line", + address_city: "city", + address_state: "state", + address_zip: "zip_code", + }), + }) + uploadApi = UploadsApi.new(config) - if err != nil { - return err - } - label: GO - /uploads: - get: - operationId: uploads_list - summary: List - description: Returns a list of your uploads. Optionally, filter uploads by campaign. + begin + updatedUpload = uploadApi.update_upload("upl_71be866e430b11e9", uploadUpdatable) + rescue => err + p err.message + end + label: RUBY + delete: + operationId: upload_delete + summary: Delete + description: Delete an existing upload. You need only supply the unique identifier that was returned upon upload creation. tags: - Uploads - parameters: - - required: false - schema: - $ref: '#/components/schemas/cmp_id' - name: campaignId - description: id of the campaign - in: query responses: - '200': - $ref: '#/components/responses/all_uploads' + '204': + description: Successful Response x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/uploads \ + curl -X DELETE https://api.lob.com/v1/uploads/upl_71be866e430b11e9 \ -u : label: CURL - lang: Ruby source: | - uploadsApi = UploadsApi.new(config) + uploadApi = UploadsApi.new(config) begin - uploads = uploadsApi.list_upload({ campaign_id: "cmp_e05ee61ff80764b" }) + deletedUpload = uploadApi.delete_upload("upl_71be866e430b11e9") rescue => err p err.message end label: RUBY + /uploads/{upl_id}/file: + parameters: + - in: path + name: upl_id + description: ID of the upload + required: true + schema: + $ref: '#/components/schemas/upl_id' post: - operationId: upload_create - summary: Create - description: Creates a new upload with the provided properties. + operationId: upload_file + summary: Upload file + 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. tags: - Uploads requestBody: required: true content: - application/json: + multipart/form-data: schema: - $ref: '#/components/schemas/upload_writable' + type: object + properties: + file: + type: string + format: binary responses: - '201': - description: Upload created successfully + '202': + description: Successful Response content: application/json: schema: - $ref: '#/components/schemas/upload' - example: - id: upl_71be866e430b11e9 - accountId: fa9ea650fc7b31a89f92 - campaignId: cmp_1933ad629bae1408 - mode: live - failuresUrl: http://www.example.com - originalFilename: my_audience.csv - state: Draft - totalMailpieces: 100 - failedMailpieces: 5 - validatedMailpieces: 95 - bytesProcessed: 17628 - dateCreated: '2017-09-05T17:47:53.767Z' - dateModified: '2017-09-05T17:47:53.767Z' - requiredAddressColumnMapping: - name: null - address_line1: null - address_city: null - address_state: null - address_zip: null - optionalAddressColumnMapping: - address_line2: null - company: null - address_country: null - mergeVariableColumnMapping: null - metadata: - columns: [] + $ref: '#/components/schemas/upload_file' '422': $ref: '#/components/responses/upload_validation_error' x-codeSamples: - lang: Shell source: | - curl --location --request POST 'https://api.lob.com/v1/uploads' \ - --header 'Content-Type: application/json' \ - -u YOUR_KEY_HERE: \ - --data-raw '{ - "campaignId": "cmp_f33809b18b6f3ea8" - }' + curl -X POST https://api.lob.com/v1/uploads/upl_71be866e430b11e9/file \ + -u : \ + -F file=@ + label: CURL + - lang: Python + source: | + with ApiClient(configuration) as api_client: + api = UploadsApi(api_client) + + try: + res = api.upload_file("upl_71be866e430b11e9", open("", "rb")) + except ApiException as e: + print(e) + label: PYTHON + /uploads/{upl_id}/exports: + parameters: + - in: path + name: upl_id + description: ID of the upload + required: true + schema: + $ref: '#/components/schemas/upl_id' + post: + operationId: upload_export_create + summary: Create Export + 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). + + Create an export file associated with an upload. + tags: + - Uploads + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + type: + type: string + enum: + - all + - failures + - successes + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/upload_create_export' + 4XX: + $ref: '#/components/responses/upload_export_error' + x-codeSamples: + - lang: Shell + source: | + curl https://api.lob.com/v1/uploads/upl_71be866e430b11e9/exports \ + -u : \ + -d "type=failures" \ + label: CURL + - lang: Python + source: | + with ApiClient(configuration) as api_client: + api = UploadsApi(api_client) + + export_model = ExportModel( + type = "all" + ) + + try: + created_export = api.create_export("upl_71be866e430b11e9", export_model) + except ApiException as e: + print(e) + label: PYTHON + - lang: Ruby + source: | + exportModel = ExportModel.new({ + type: "all" + }) + + uploadsApi = UploadsApi.new(config) + + begin + createdExport = uploadsApi.create_export("upl_71be866e430b11e9", exportModel) + rescue => err + p err.message + end + label: RUBY + /uploads/{upl_id}/report: + parameters: + - in: path + name: upl_id + description: ID of the upload + required: true + schema: + $ref: '#/components/schemas/upl_id' + - in: query + required: false + name: status + description: The status of line items to filter and retrieve. By default all line items are returned. + schema: + enum: + - Validated + - Failed + - Processing + type: string + - in: query + required: false + name: limit + description: How many results to return. + schema: + type: integer + minimum: 1 + default: 100 + maximum: 100 + example: 10 + - $ref: '#/components/parameters/offset' + get: + operationId: report_retrieve + summary: Retrieve Line Item Report + 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.' + tags: + - Uploads + responses: + '200': + description: Returns an report object + content: + application/json: + schema: + type: object + required: + - data + - count + - offset + - total_count + properties: + data: + type: array + items: + properties: + rowNumber: + title: Row Number + type: number + description: The row number of the csv file containing this data. + status: + type: string + description: The processing status of line item. + enum: + - Validated + - Failed + - Processing + errorMessage: + type: string + nullable: true + description: The error message detailing the reason why processing the line item failed. + mailpieceId: + type: string + nullable: true + description: The mailpiece id created from the line item when it was validated. + originalData: + type: object + description: Key-value pairs where each key is the column header and each value is the value of the column for the row. + next_url: + type: string + description: Url of next page of items in list. + nullable: true + prev_url: + type: string + description: Url of previous page of items in list. + nullable: true + count: + $ref: '#/components/schemas/count' + total_count: + type: integer + description: Indicates the total number of records. Provided when the request specifies an "include" query parameter + example: + id: ex_6a94fe68fd151e0f8 + dateCreated: '2021-07-06T22:51:42.838Z' + dateModified: '2022-07-06T22:51:42.838Z' + deleted: false + s3Url: null + state: in_progress + type: failures + uploadId: upl_71be866e430b11e9 + '403': + $ref: '#/components/responses/feature_flag_disabled' + '404': + $ref: '#/components/responses/upload_not_found' + x-codeSamples: + - lang: Shell + source: | + curl https://api.lob.com/v1/uploads/upl_71be866e430b11e9/report \ + -u : label: CURL - - lang: Ruby + - lang: Python source: | - uploadCreate = UploadWritable.new({ - campaign_id: "cmp_e05ee61ff80764b", - }); + with ApiClient(configuration) as api_client: + api = UploadsApi(api_client) - uploadApi = UploadsApi.new(config) + try: + retrieved_report = api.get_report("upl_71be866e430b11e9") + except ApiException as e: + print(e) + label: PYTHON + - lang: Ruby + source: | + uploadsApi = UploadsApi.new(config) begin - createdUpload = uploadApi.create_upload(uploadCreate) + retrievedreport = uploadsApi.get_report("upl_71be866e430b11e9") rescue => err p err.message end label: RUBY - /uploads/{upl_id}: + /uploads/{upl_id}/exports/{ex_id}: parameters: - in: path name: upl_id - description: id of the upload + description: ID of the upload required: true schema: $ref: '#/components/schemas/upl_id' + - in: path + name: ex_id + description: ID of the export + required: true + schema: + $ref: '#/components/schemas/ex_id' get: - operationId: upload_retrieve - summary: Retrieve - description: >- - Retrieves the details of an existing upload. You need only supply the - unique upload identifier that was returned upon upload creation. - tags: - - Uploads - responses: - '200': - description: Returns an upload object - content: - application/json: - schema: - $ref: '#/components/schemas/upload' - example: - id: upl_71be866e430b11e9 - accountId: fa9ea650fc7b31a89f92 - campaignId: cmp_1933ad629bae1408 - mode: live - failuresUrl: http://www.example.com - originalFilename: my_audience.csv - state: Draft - totalMailpieces: 100 - failedMailpieces: 5 - validatedMailpieces: 95 - bytesProcessed: 17628 - dateCreated: '2017-09-05T17:47:53.767Z' - dateModified: '2017-09-05T17:47:53.767Z' - requiredAddressColumnMapping: - name: null - address_line1: null - address_city: null - address_state: null - address_zip: null - optionalAddressColumnMapping: - address_line2: null - company: null - address_country: null - mergeVariableColumnMapping: null - metadata: - columns: [] - '404': - $ref: '#/components/responses/upload_not_found' - '422': - $ref: '#/components/responses/upload_validation_error' - x-codeSamples: - - lang: Shell - source: | - curl https://api.lob.com/v1/uploads/upl_71be866e430b11e9 \ - -u : \ - label: CURL - - lang: Ruby - source: | - uploadApi = UploadsApi.new(config) - - begin - retrievedUpload = uploadApi.get_upload("upl_71be866e430b11e9") - rescue => err - p err.message - end - label: RUBY - patch: - operationId: upload_update - summary: Update - description: >- - Update the details of an existing upload. You need only supply the - unique identifier that was returned upon upload creation. + operationId: export_retrieve + summary: Retrieve Export + 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`. tags: - Uploads - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/upload_updatable' responses: '200': - description: Returns an upload object + description: Returns an export object content: application/json: schema: - $ref: '#/components/schemas/upload' + type: object + required: + - id + - dateCreated + - dateModified + - deleted + - s3Url + - state + - type + - uploadId + properties: + id: + $ref: '#/components/schemas/ex_id' + dateCreated: + type: string + format: date-time + description: A timestamp in ISO 8601 format of the date the export was created + dateModified: + type: string + format: date-time + description: A timestamp in ISO 8601 format of the date the export was last modified + deleted: + type: boolean + description: Returns as `true` if the resource has been successfully deleted. + s3Url: + type: string + description: The URL for the generated export file. + state: + type: string + enum: + - in_progress + - failed + - succeeded + description: The state of the export file, which can be `in_progress`, `failed` or `succeeded`. + type: + type: string + enum: + - all + - failures + - successes + description: The export file type, which can be `all`, `failures` or `successes`. + uploadId: + $ref: '#/components/schemas/upl_id' example: - id: upl_71be866e430b11e9 - accountId: fa9ea650fc7b31a89f92 - campaignId: cmp_1933ad629bae1408 - mode: live - failuresUrl: http://www.example.com - originalFilename: my_audience.csv - state: Draft - totalMailpieces: 100 - failedMailpieces: 5 - validatedMailpieces: 95 - bytesProcessed: 17628 - dateCreated: '2017-09-05T17:47:53.767Z' - dateModified: '2017-09-05T17:47:53.767Z' - requiredAddressColumnMapping: - name: null - address_line1: null - address_city: null - address_state: null - address_zip: null - optionalAddressColumnMapping: - address_line2: null - company: null - address_country: null - mergeVariableColumnMapping: null - metadata: - columns: [] - '404': - $ref: '#/components/responses/upload_not_found' - '422': - $ref: '#/components/responses/upload_validation_error' + id: ex_6a94fe68fd151e0f8 + dateCreated: '2021-07-06T22:51:42.838Z' + dateModified: '2022-07-06T22:51:42.838Z' + deleted: false + s3Url: null + state: in_progress + type: failures + uploadId: upl_71be866e430b11e9 x-codeSamples: - lang: Shell source: | - curl -X PATCH https://api.lob.com/v1/uploads/upl_71be866e430b11e9 \ - -u : \ - -d "state=Ready for Validation" + curl https://api.lob.com/v1/uploads/upl_71be866e430b11e9/exports/ex_6a94fe68fd151e0f8 \ + -u : label: CURL - lang: Python source: | - upload_updatable = UploadUpdatable( - state = UploadState("Ready for Validation"), - ) - with ApiClient(configuration) as api_client: api = UploadsApi(api_client) try: - updated_upload = api.update_upload("upl_71be866e430b11e9", upload_updatable) + retrieved_export = api.get_export("upl_71be866e430b11e9", "ex_6a94fe68fd151e0f8") except ApiException as e: print(e) label: PYTHON - lang: Ruby source: | - uploadUpdatable = UploadUpdatable.new({ - required_address_column_mapping: RequiredAddressColumnMapping.new({ - name: "recipient", - address_line1: "primary line", - address_city: "city", - address_state: "state", - address_zip: "zip_code", - }), - }) - - uploadApi = UploadsApi.new(config) + uploadsApi = UploadsApi.new(config) begin - updatedUpload = uploadApi.update_upload("upl_71be866e430b11e9", uploadUpdatable) + retrievedExport = uploadsApi.get_export("upl_71be866e430b11e9", "ex_6a94fe68fd151e0f8") rescue => err p err.message end label: RUBY - delete: - operationId: upload_delete - summary: Delete - description: >- - Delete an existing upload. You need only supply the unique identifier - that was returned upon upload creation. + /us_autocompletions: + post: + operationId: autocompletion + summary: Autocomplete + 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). tags: - - Uploads + - US Autocompletions + parameters: + - in: query + name: case + schema: + type: string + enum: + - upper + - proper + default: upper + 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`. + required: false + - in: query + name: valid_addresses + schema: + type: boolean + enum: + - true + - false + default: false + 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. + required: false + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/us_autocompletions_writable' + examples: + basic: + value: + address_prefix: 185 B + city: San Francisco + state: CA + zip_code: '94107' + geo_ip_sort: false + test: + value: + address_prefix: 1 sugg + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/us_autocompletions_writable' + examples: + basic: + value: + address_prefix: 185 B + city: San Francisco + state: CA + zip_code: '94107' + geo_ip_sort: false + test: + value: + address_prefix: 1 sugg + multipart/form-data: + schema: + $ref: '#/components/schemas/us_autocompletions_writable' + examples: + basic: + value: + address_prefix: 185 B + city: San Francisco + state: CA + zip_code: '94107' + geo_ip_sort: false + test: + value: + address_prefix: 1 sugg responses: - '204': - description: Successful Response + '200': + $ref: '#/components/responses/us_autocompletions' + default: + $ref: '#/components/responses/us_autocompletions_error' x-codeSamples: - lang: Shell source: | - curl -X DELETE https://api.lob.com/v1/uploads/upl_71be866e430b11e9 \ - -u : + curl https://api.lob.com/v1/us_autocompletions \ + -u : \ + -d "address_prefix=185 B" \ + -d "city=San Francisco" \ + -d "state=CA" + -d "zip_code=94107" label: CURL + - lang: Typescript + source: | + const UsAutocompletions = new USAutocompletionsApi(av_config); + const autocompletionData: UsAutocompletionsWritable = { + address_prefix: '185 B', + city: 'SAN FRANCISCO' + }; + + try { + const autocompletedAddresses = await UsAutocompletions.autocomplete(autocompletionData); + } catch (err: any) { + console.error(err); + } + label: TYPESCRIPT + - lang: Javascript + source: | + Lob.usAutocompletions.autocomplete({ + address_prefix: '185 B', + city: 'San Francisco', + state: 'CA', + zip_code: '94107', + }, function (err, res) { + console.log(err, res); + }); + label: NODE - lang: Ruby source: | - uploadApi = UploadsApi.new(config) + usAutocompletionsApi = UsAutocompletionsApi.new(config) + + autocompletionData = UsAutocompletionsWritable.new({ + address_prefix: "185 B", + city: "San Francisco", + state: "CA", + zip_code: "94017", + }) begin - deletedUpload = uploadApi.delete_upload("upl_71be866e430b11e9") + autocompletedAddress = usAutocompletionsApi.autocomplete(autocompletionData) rescue => err p err.message end label: RUBY - /uploads/{upl_id}/file: - parameters: - - in: path - name: upl_id - description: ID of the upload - required: true - schema: - $ref: '#/components/schemas/upl_id' - post: - operationId: upload_file - summary: Upload file - 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. - tags: - - Uploads - requestBody: - required: true - content: - multipart/form-data: - schema: - type: object - properties: - file: - type: string - format: binary - responses: - '202': - description: Successful Response - content: - application/json: - schema: - $ref: '#/components/schemas/upload_file' - '422': - $ref: '#/components/responses/upload_validation_error' - x-codeSamples: - - lang: Shell - source: > - curl -X POST - https://api.lob.com/v1/uploads/upl_71be866e430b11e9/file \ - -u : \ - -F file=@ - label: CURL - lang: Python source: | with ApiClient(configuration) as api_client: - api = UploadsApi(api_client) + api = UsAutocompletionsApi(api_client) + + autocompletion_data = UsAutocompletionsWritable( + address_prefix = "185 B", + city = "San Francisco", + state = "CA", + zip_code = "94017", + ) try: - res = api.upload_file("upl_71be866e430b11e9", open("", "rb")) + autocompleted_addresses = api.autocomplete(autocompletion_data) except ApiException as e: print(e) label: PYTHON - /uploads/{upl_id}/exports: - parameters: - - in: path - name: upl_id - description: ID of the upload - required: true - schema: - $ref: '#/components/schemas/upl_id' - post: - operationId: upload_export_create - summary: Create Export - 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). + - lang: PHP + source: | + $apiInstance = new OpenAPI\Client\Api\UsAutocompletionsApi($config, new GuzzleHttp\Client()); + + $autocompletionData = new OpenAPI\Client\Model\UsAutocompletionsWritable(array( + "address_prefix" => "185 B", + "city" => "San Francisco", + "state" => "CA", + "zip_code" => "94017", + )); + try { + $result = $apiInstance->autocomplete($autocompletionData); + } catch (Exception $e) { + echo $e->getMessage(), PHP_EOL; + } + - lang: Java + source: | + UsAutocompletionsApi apiInstance = new UsAutocompletionsApi(config); + UsAutocompletionsWritable autoCompletionWritable = new UsAutocompletionsWritable(); + autoCompletionWritable.setAddressPrefix("185 B"); + autoCompletionWritable.setCity("San Francisco"); + autoCompletionWritable.setState("CA"); + autoCompletionWritable.setZipCode("94017"); - Create an export file associated with an upload. + try { + UsAutocompletions usAutocompletion = apiInstance.autocomplete(autoCompletionWritable); + } catch (ApiException e) { + e.printStackTrace(); + } + label: JAVA + - lang: Elixir + source: | + Lob.USAutocompletion.autocomplete(%{ + address_prefix: "185 B", + city: "San Francisco", + state: "CA", + zip_code: "94107" + }) + label: ELIXIR + - lang: CSharp + source: | + UsAutocompletionsApi api = new UsAutocompletionsApi(config); + UsAutocompletionsWritable autoCompletionWritable = new UsAutocompletionsWritable( + "185 B", // address_prefix + "San Francisco", // city + "CA", // state + "94017" // zip_code + ); + + try { + UsAutocompletions usAutocompletion = api.autocomplete(autoCompletionWritable); + } catch (ApiException e) { + Console.WriteLine(e.ToString()); + } + label: CSHARP + - lang: Go + source: | + var context = context.Background() + context = context.WithValue(context, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) + + var apiClient = *lob.NewAPIClient(configuration) + + var usAutocomplationsWritable = *lob.NewUsAutocompletionsWritable("340 Wat") + + resp, _, err := suite.apiClient.UsAutocompletionsApi.Autocomplete(suite.ctx).UsAutocompletionsWritable(suite.usAutocomplationsWritable).Execute() + + if err != nil { + return err + } + label: GO + /us_reverse_geocode_lookups: + post: + operationId: reverse_geocode_lookup + summary: Reverse Geocode Lookup + description: Reverse geocode a valid US location with a live API key. tags: - - Uploads + - Reverse Geocode Lookups + parameters: + - in: query + name: size + schema: + type: integer + minimum: 1 + default: 5 + maximum: 50 + example: 5 + 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. + required: false requestBody: required: true content: application/json: schema: - type: object - properties: - type: - type: string - enum: - - all - - failures - - successes + $ref: '#/components/schemas/location' + example: + latitude: 37.7749 + longitude: 122.4194 + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/location' + example: + latitude: 37.7749 + longitude: 122.4194 + multipart/form-data: + schema: + $ref: '#/components/schemas/location' + example: + latitude: 37.7749 + longitude: 122.4194 responses: '200': - description: Successful Response - content: - application/json: - schema: - $ref: '#/components/schemas/upload_create_export' - 4XX: - $ref: '#/components/responses/upload_export_error' + $ref: '#/components/responses/reverse_geocode_lookups' + default: + $ref: '#/components/responses/reverse_geocode_lookups_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/uploads/upl_71be866e430b11e9/exports \ - -u : \ - -d "type=failures" \ + curl https://api.lob.com/v1/us_reverse_geocode_lookups \ + -u : \ + -d "latitude=37.7749" \ + -d "longitude=122.4194" \ label: CURL - - lang: Python + - lang: Typescript source: | - with ApiClient(configuration) as api_client: - api = UploadsApi(api_client) - - export_model = ExportModel( - type = "all" - ) - - try: - created_export = api.create_export("upl_71be866e430b11e9", export_model) - except ApiException as e: - print(e) - label: PYTHON + const ReverseGeocodeLookup = new ReverseGeocodeLookupsApi(av_config); + const coordinates = new Location({ + latitude: 37.777456, + longitude: -122.393039 + }); + try { + const geocode = await ReverseGeocodeLookup.lookup(coordinates); + } catch (err: any) { + console.error(err); + } + label: TYPESCRIPT + - lang: Javascript + source: | + Lob.reverseGeocodeLookups.lookup({ + latitude: 37.7749, + longitude: 122.4194 + }, function (err, res) { + console.log(err, res); + }); + label: NODE - lang: Ruby source: | - exportModel = ExportModel.new({ - type: "all" - }) + reverseGeocodeLookupsApi = ReverseGeocodeLookupsApi.new(config) - uploadsApi = UploadsApi.new(config) + coordinates = Location.new({ + latitude: 37.777456, + longitude: -122.393039, + }) begin - createdExport = uploadsApi.create_export("upl_71be866e430b11e9", exportModel) + geocode = reverseGeocodeLookupsApi.lookup(coordinates) rescue => err p err.message end label: RUBY - /uploads/{upl_id}/report: - parameters: - - in: path - name: upl_id - description: ID of the upload - required: true - schema: - $ref: '#/components/schemas/upl_id' - - in: query - required: false - name: status - description: >- - The status of line items to filter and retrieve. By default all line - items are returned. - schema: - enum: - - Validated - - Failed - - Processing - type: string - - in: query - required: false - name: limit - description: How many results to return. - schema: - type: integer - minimum: 1 - default: 100 - maximum: 100 - example: 10 - - $ref: '#/components/parameters/offset' - get: - operationId: report_retrieve - summary: Retrieve Line Item Report - 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. - tags: - - Uploads - responses: - '200': - description: Returns an report object - content: - application/json: - schema: - type: object - required: - - data - - count - - offset - - total_count - properties: - data: - type: array - items: - properties: - rowNumber: - title: Row Number - type: number - description: The row number of the csv file containing this data. - status: - type: string - description: The processing status of line item. - enum: - - Validated - - Failed - - Processing - errorMessage: - type: string - nullable: true - description: >- - The error message detailing the reason why - processing the line item failed. - mailpieceId: - type: string - nullable: true - description: >- - The mailpiece id created from the line item when it - was validated. - originalData: - type: object - description: >- - Key-value pairs where each key is the column header - and each value is the value of the column for the - row. - next_url: - type: string - description: Url of next page of items in list. - nullable: true - prev_url: - type: string - description: Url of previous page of items in list. - nullable: true - count: - $ref: '#/components/schemas/count' - total_count: - type: integer - description: >- - Indicates the total number of records. Provided when the - request specifies an "include" query parameter - example: - id: ex_6a94fe68fd151e0f8 - dateCreated: '2021-07-06T22:51:42.838Z' - dateModified: '2022-07-06T22:51:42.838Z' - deleted: false - s3Url: null - state: in_progress - type: failures - uploadId: upl_71be866e430b11e9 - '403': - $ref: '#/components/responses/feature_flag_disabled' - '404': - $ref: '#/components/responses/upload_not_found' - x-codeSamples: - - lang: Shell - source: | - curl https://api.lob.com/v1/uploads/upl_71be866e430b11e9/report \ - -u : - label: CURL - lang: Python source: | with ApiClient(configuration) as api_client: - api = UploadsApi(api_client) + api = ReverseGeocodeLookupsApi(api_client) + + coordinates = Location( + latitude = 37.777456, + longitude = -122.393039, + ) try: - retrieved_report = api.get_report("upl_71be866e430b11e9") + geocode = api.lookup(coordinates) except ApiException as e: print(e) label: PYTHON - - lang: Ruby + - lang: PHP source: | - uploadsApi = UploadsApi.new(config) + $apiInstance = new OpenAPI\Client\Api\ReverseGeocodeLookupsApi($config, new GuzzleHttp\Client()); - begin - retrievedreport = uploadsApi.get_report("upl_71be866e430b11e9") - rescue => err - p err.message - end - label: RUBY - /uploads/{upl_id}/exports/{ex_id}: - parameters: - - in: path - name: upl_id - description: ID of the upload - required: true - schema: - $ref: '#/components/schemas/upl_id' - - in: path - name: ex_id - description: ID of the export - required: true - schema: - $ref: '#/components/schemas/ex_id' - get: - operationId: export_retrieve - summary: Retrieve Export - 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`. - tags: - - Uploads - responses: - '200': - description: Returns an export object - content: - application/json: - schema: - type: object - required: - - id - - dateCreated - - dateModified - - deleted - - s3Url - - state - - type - - uploadId - properties: - id: - $ref: '#/components/schemas/ex_id' - dateCreated: - type: string - format: date-time - description: >- - A timestamp in ISO 8601 format of the date the export was - created - dateModified: - type: string - format: date-time - description: >- - A timestamp in ISO 8601 format of the date the export was - last modified - deleted: - type: boolean - description: >- - Returns as `true` if the resource has been successfully - deleted. - s3Url: - type: string - description: The URL for the generated export file. - state: - type: string - enum: - - in_progress - - failed - - succeeded - description: >- - The state of the export file, which can be `in_progress`, - `failed` or `succeeded`. - type: - type: string - enum: - - all - - failures - - successes - description: >- - The export file type, which can be `all`, `failures` or - `successes`. - uploadId: - $ref: '#/components/schemas/upl_id' - example: - id: ex_6a94fe68fd151e0f8 - dateCreated: '2021-07-06T22:51:42.838Z' - dateModified: '2022-07-06T22:51:42.838Z' - deleted: false - s3Url: null - state: in_progress - type: failures - uploadId: upl_71be866e430b11e9 - x-codeSamples: - - lang: Shell - source: > - curl - https://api.lob.com/v1/uploads/upl_71be866e430b11e9/exports/ex_6a94fe68fd151e0f8 - \ - -u : - label: CURL - - lang: Python + $coordinates = new OpenAPI\Client\Model\Location(array( + "latitude" => "37.777456", + "longitude" => "-122.393039", + )); + + try { + $result = $apiInstance->lookup($coordinates); + } catch (Exception $e) { + echo $e->getMessage(), PHP_EOL; + } + label: PHP + - lang: Java + source: | + ReverseGeocodeLookupsApi apiInstance = new ReverseGeocodeLookupsApi(config); + + Location location = new Location(); + location.setlatitude(37.777456f); + location.setlongitude(-122.393039f); + + try { + apiInstance.lookup(location, null); + } catch (ApiException e) { + e.printStackTrace(); + } + label: JAVA + - lang: Elixir source: | - with ApiClient(configuration) as api_client: - api = UploadsApi(api_client) + Lob.ReverseGeocodeLookup.lookup(%{ + latitude: 37.7749, + longitude: 122.4194 + }) + label: ELIXIR + - lang: CSharp + source: | + ReverseGeocodeLookupsApi api = new ReverseGeocodeLookupsApi(config); - try: - retrieved_export = api.get_export("upl_71be866e430b11e9", "ex_6a94fe68fd151e0f8") - except ApiException as e: - print(e) - label: PYTHON - - lang: Ruby + Location location = new Location( + 37.777456f, + -122.393039f + ); + + try { + api.lookup(location, null); + } catch (ApiException e) { + Console.WriteLine(e.ToString()); + } + label: CSHARP + - lang: Go source: | - uploadsApi = UploadsApi.new(config) + var context = context.Background() + context = context.WithValue(context, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) - begin - retrievedExport = uploadsApi.get_export("upl_71be866e430b11e9", "ex_6a94fe68fd151e0f8") - rescue => err - p err.message - end - label: RUBY - /us_autocompletions: + var apiClient = *lob.NewAPIClient(configuration) + + var location = *lob.NewLocationWithDefaults() + location.SetLatitude(37.777456) + location.SetLongitude(122.393039) + + resp, _, err := apiClient.ReverseGeocodeLookupsApi.Lookup(context).Location(location).Execute() + + if err != nil { + return err + } + label: GO + /us_verifications: post: - operationId: autocompletion - summary: Autocomplete - 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: us_verification + summary: Single Verify + 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. tags: - - US Autocompletions + - US Verifications parameters: - in: query name: case @@ -26574,125 +15091,144 @@ paths: - upper - proper default: upper - 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`. - required: false - - in: query - name: valid_addresses - schema: - type: boolean - enum: - - true - - false - default: false - 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. + 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`. required: false requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/us_autocompletions_writable' + $ref: '#/components/schemas/us_verifications_writable' examples: basic: value: - address_prefix: 185 B + primary_line: 210 King Street city: San Francisco state: CA zip_code: '94107' - geo_ip_sort: false + full_payload: + value: + recipient: Walgreens + primary_line: Ave Wilson Churchill 123 + secondary_line: '' + urbanization: URB FAIR OAKS + city: RIO PIEDRAS + state: PR + zip_code: '00926' + single_line: + value: + address: 210 King Street 94107 test: value: - address_prefix: 1 sugg + primary_line: po box + zip_code: '11111' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/us_autocompletions_writable' + $ref: '#/components/schemas/us_verifications_writable' examples: basic: value: - address_prefix: 185 B + primary_line: 210 King Street city: San Francisco state: CA zip_code: '94107' - geo_ip_sort: false + full_payload: + value: + recipient: Walgreens + primary_line: Ave Wilson Churchill 123 + secondary_line: '' + urbanization: URB FAIR OAKS + city: RIO PIEDRAS + state: PR + zip_code: '00926' + single_line: + value: + address: 210 King Street 94107 test: value: - address_prefix: 1 sugg + primary_line: po box + zip_code: '11111' multipart/form-data: schema: - $ref: '#/components/schemas/us_autocompletions_writable' + $ref: '#/components/schemas/us_verifications_writable' examples: basic: value: - address_prefix: 185 B + primary_line: 210 King Street city: San Francisco state: CA zip_code: '94107' - geo_ip_sort: false + full_payload: + value: + recipient: Walgreens + primary_line: Ave Wilson Churchill 123 + secondary_line: '' + urbanization: URB FAIR OAKS + city: RIO PIEDRAS + state: PR + zip_code: '00926' + single_line: + value: + address: 210 King Street 94107 test: value: - address_prefix: 1 sugg + primary_line: po box + zip_code: '11111' responses: '200': - $ref: '#/components/responses/us_autocompletions' + $ref: '#/components/responses/us_verifications' default: - $ref: '#/components/responses/us_autocompletions_error' + $ref: '#/components/responses/us_verifications_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/us_autocompletions \ + curl https://api.lob.com/v1/us_verifications \ -u : \ - -d "address_prefix=185 B" \ + -d "primary_line=210 King Street" \ -d "city=San Francisco" \ - -d "state=CA" + -d "state=CA" \ -d "zip_code=94107" label: CURL - lang: Typescript source: | - const UsAutocompletions = new USAutocompletionsApi(av_config); - const autocompletionData: UsAutocompletionsWritable = { - address_prefix: '185 B', - city: 'SAN FRANCISCO' + const UsVerification = new USVerificationsApi(av_config); + const verificationData1: UsVerificationsWritable = { + primary_line: '210 King Street', + city: 'San Francisco', + state: 'CA', + zip_code: '94107' }; try { - const autocompletedAddresses = await UsAutocompletions.autocomplete(autocompletionData); + const singleVerified = await UsVerification.verifySingle(verificationData1); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.usAutocompletions.autocomplete({ - address_prefix: '185 B', + Lob.usVerifications.verify({ + primary_line: '210 King Street', city: 'San Francisco', state: 'CA', - zip_code: '94107', + zip_code: '94107' }, function (err, res) { console.log(err, res); }); label: NODE - lang: Ruby source: | - usAutocompletionsApi = UsAutocompletionsApi.new(config) + usVerificationsApi = UsVerificationsApi.new(config) - autocompletionData = UsAutocompletionsWritable.new({ - address_prefix: "185 B", + verificationData = UsVerificationsWritable.new({ + primary_line: "210 King Street", city: "San Francisco", state: "CA", zip_code: "94017", }) begin - autocompletedAddress = usAutocompletionsApi.autocomplete(autocompletionData) + singleVerifiedAddr = usVerificationsApi.verifySingle(verificationData) rescue => err p err.message end @@ -26700,204 +15236,147 @@ paths: - lang: Python source: | with ApiClient(configuration) as api_client: - api = UsAutocompletionsApi(api_client) - - autocompletion_data = UsAutocompletionsWritable( - address_prefix = "185 B", + api = UsVerificationsApi(api_client) + verification_data_1 = UsVerificationsWritable( + primary_line = "210 King Street", city = "San Francisco", state = "CA", zip_code = "94017", ) try: - autocompleted_addresses = api.autocomplete(autocompletion_data) + single_verified = api.verifySingle(verification_data_1) except ApiException as e: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\UsAutocompletionsApi($config, - new GuzzleHttp\Client()); - + source: | + $apiInstance = new OpenAPI\Client\Api\UsVerificationsApi($config, new GuzzleHttp\Client()); - $autocompletionData = new - OpenAPI\Client\Model\UsAutocompletionsWritable(array( - "address_prefix" => "185 B", - "city" => "San Francisco", - "state" => "CA", - "zip_code" => "94017", + $verificationData = new OpenAPI\Client\Model\UsVerificationsWritable(array( + 'primary_line' => '210 King Street', + 'city' => 'San Francisco', + 'state' => 'CA', + 'zip_code' => '94017', )); - try { - $result = $apiInstance->autocomplete($autocompletionData); + $result = $apiInstance->verifySingle($verificationData); } catch (Exception $e) { echo $e->getMessage(), PHP_EOL; } - lang: Java - source: > - UsAutocompletionsApi apiInstance = new UsAutocompletionsApi(config); - - UsAutocompletionsWritable autoCompletionWritable = new - UsAutocompletionsWritable(); - - autoCompletionWritable.setAddressPrefix("185 B"); - - autoCompletionWritable.setCity("San Francisco"); - - autoCompletionWritable.setState("CA"); - - autoCompletionWritable.setZipCode("94017"); - + source: | + UsVerificationsWritable singleVerify = new UsVerificationsWritable(); + singleVerify.setPrimaryLine("210 King Street"); + singleVerify.setCity("San Francisco"); + singleVerify.setState("CA"); + singleVerify.setZipCode("94017"); + UsVerificationsApi apiInstance = new UsVerificationsApi(config); try { - UsAutocompletions usAutocompletion = apiInstance.autocomplete(autoCompletionWritable); + apiInstance.verifySingle(singleVerify, null); } catch (ApiException e) { e.printStackTrace(); } label: JAVA - lang: Elixir source: | - Lob.USAutocompletion.autocomplete(%{ - address_prefix: "185 B", - city: "San Francisco", - state: "CA", - zip_code: "94107" + Lob.USVerification.verify(%{ + primary_line: "210 King Street", + city: "San Francisco", + state: "CA", + zip_code: "94107" }) label: ELIXIR - lang: CSharp - source: > - UsAutocompletionsApi api = new UsAutocompletionsApi(config); - - UsAutocompletionsWritable autoCompletionWritable = new - UsAutocompletionsWritable( - "185 B", // address_prefix - "San Francisco", // city - "CA", // state - "94017" // zip_code + source: | + UsVerificationsWritable singleVerify = new UsVerificationsWritable( + null, + null, + "210 King Street", + null, + null, + "San Francisco", + "CA", + "94017" ); + UsVerificationsApi api = new UsVerificationsApi(config); - try { - UsAutocompletions usAutocompletion = api.autocomplete(autoCompletionWritable); - } catch (ApiException e) { - Console.WriteLine(e.ToString()); - } - label: CSHARP - - lang: Go - source: > - var context = context.Background() - - context = context.WithValue(context, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) - - - var apiClient = *lob.NewAPIClient(configuration) - - - var usAutocomplationsWritable = - *lob.NewUsAutocompletionsWritable("340 Wat") - - - resp, _, err := - suite.apiClient.UsAutocompletionsApi.Autocomplete(suite.ctx).UsAutocompletionsWritable(suite.usAutocomplationsWritable).Execute() - - - if err != nil { - return err + try { + api.verifySingle(singleVerify, null); + } catch (ApiException e) { + Console.WriteLine(e.ToString()); } - label: GO - /us_reverse_geocode_lookups: + label: CSHARP + /us_zip_lookups: post: - operationId: reverse_geocode_lookup - summary: Reverse Geocode Lookup - description: Reverse geocode a valid US location with a live API key. + operationId: zip_lookup + summary: Lookups + description: Returns information about a ZIP code tags: - - Reverse Geocode Lookups - parameters: - - in: query - name: size - schema: - type: integer - minimum: 1 - default: 5 - maximum: 50 - example: 5 - 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. - required: false + - Zip Lookups requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/location' + $ref: '#/components/schemas/zip5' example: - latitude: 37.7749 - longitude: 122.4194 + zip_code: '94107' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/location' + $ref: '#/components/schemas/zip5' example: - latitude: 37.7749 - longitude: 122.4194 + zip_code: '94107' multipart/form-data: schema: - $ref: '#/components/schemas/location' + $ref: '#/components/schemas/zip5' example: - latitude: 37.7749 - longitude: 122.4194 + zip_code: '94107' responses: '200': - $ref: '#/components/responses/reverse_geocode_lookups' + $ref: '#/components/responses/zip_lookups' default: - $ref: '#/components/responses/reverse_geocode_lookups_error' + $ref: '#/components/responses/zip_lookups_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/us_reverse_geocode_lookups \ - -u : \ - -d "latitude=37.7749" \ - -d "longitude=122.4194" \ + curl https://api.lob.com/v1/us_zip_lookups \ + -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \ + -d "zip_code=94107" label: CURL - lang: Typescript - source: > - const ReverseGeocodeLookup = new - ReverseGeocodeLookupsApi(av_config); - - const coordinates = new Location({ - latitude: 37.777456, - longitude: -122.393039 - }); - + source: | + const ZipLookup = new ZipLookupsApi(av_config); + const zipRequest : ZipEditable = { + zip_code: '07090' + } try { - const geocode = await ReverseGeocodeLookup.lookup(coordinates); + const zipLookup : Zip = await ZipLookup.lookup(zipRequest); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.reverseGeocodeLookups.lookup({ - latitude: 37.7749, - longitude: 122.4194 + Lob.usZipLookups.lookup({ + zip_code: '94107' }, function (err, res) { console.log(err, res); }); label: NODE - lang: Ruby source: | - reverseGeocodeLookupsApi = ReverseGeocodeLookupsApi.new(config) + zipLookupsApi = ZipLookupsApi.new(config) - coordinates = Location.new({ - latitude: 37.777456, - longitude: -122.393039, + zipRequest = ZipEditable.new({ + zip_code: "94107" }) begin - geocode = reverseGeocodeLookupsApi.lookup(coordinates) + zipLookup = zipLookupsApi.lookup(zipRequest) rescue => err p err.message end @@ -26905,515 +15384,9548 @@ paths: - lang: Python source: | with ApiClient(configuration) as api_client: - api = ReverseGeocodeLookupsApi(api_client) + api = ZipLookupsApi(api_client) - coordinates = Location( - latitude = 37.777456, - longitude = -122.393039, + zip_request = ZipEditable( + zip_code = "94107" ) try: - geocode = api.lookup(coordinates) + zip_lookup = api.lookup(zip_request) except ApiException as e: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new - OpenAPI\Client\Api\ReverseGeocodeLookupsApi($config, new - GuzzleHttp\Client()); - + source: | + $apiInstance = new OpenAPI\Client\Api\ZipLookupsApi($config, new GuzzleHttp\Client()); - $coordinates = new OpenAPI\Client\Model\Location(array( - "latitude" => "37.777456", - "longitude" => "-122.393039", + $zipRequest = new OpenAPI\Client\Model\ZipEditable(array( + "zip_code" => '94107' )); - try { - $result = $apiInstance->lookup($coordinates); + $result = $apiInstance->lookup($zipRequest); } catch (Exception $e) { echo $e->getMessage(), PHP_EOL; } label: PHP - lang: Java - source: > - ReverseGeocodeLookupsApi apiInstance = new - ReverseGeocodeLookupsApi(config); - - - Location location = new Location(); - - location.setlatitude(37.777456f); - - location.setlongitude(-122.393039f); - + source: | + ZipEditable zipEditable = new ZipEditable(); + zipEditable.setZipCode("94107"); + ZipLookupsApi apiInstance = new ZipLookupsApi(config); try { - apiInstance.lookup(location, null); + Zip response = apiInstance.lookup(zipEditable); } catch (ApiException e) { e.printStackTrace(); } label: JAVA - lang: Elixir source: | - Lob.ReverseGeocodeLookup.lookup(%{ - latitude: 37.7749, - longitude: 122.4194 + Lob.USZipLookup.lookup(%{ + zip_code: "94107" }) label: ELIXIR - lang: CSharp source: | - ReverseGeocodeLookupsApi api = new ReverseGeocodeLookupsApi(config); + ZipEditable zipEditable = new ZipEditable("94107"); + + ZipLookupsApi api = new ZipLookupsApi(config); + + try { + Zip response = api.lookup(zipEditable); + } catch (ApiException e) { + Console.WriteLine(e.ToString()); + } + label: CSHARP + - lang: Go + source: | + var context = context.Background() + context = context.WithValue(context, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) + + var apiClient = *lob.NewAPIClient(configuration) + + var zipEditable = *lob.NewZipEditable() + zipEditable.SetZipCode("94107") + + resp, _, err := apiClient.ZipLookupsApi.Lookup(context).ZipEditable(zipEditable).Execute() + + if err != nil { + return err + } + label: GO +x-webhooks: + events: + post: + summary: Events + description: Information about an event + operationId: event + tags: + - Events + responses: + '200': + $ref: '#/components/responses/events' + tracking_events: + post: + summary: Tracking Events + description: Information about tracking events + operationId: tracking_event + tags: + - Tracking Events + responses: + '200': + $ref: '#/components/responses/tracking_events' +components: + securitySchemes: + basicAuth: + type: http + scheme: basic + schemas: + lob_credits_balance: + type: object + required: + - balance + properties: + balance: + type: number + description: Account's current balance of Lob Credits. Can be positive, negative, or zero. + example: 1000 + date_filter: + type: object + 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 ≥, and `lte` is ≤.' + 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}' + failure_status_code: + type: integer + enum: + - 401 + - 403 + - 404 + - 413 + - 422 + - 429 + - 500 + description: | + A conventional HTTP status code: + * `401` - Authorization error with your API key or account + * `403` - Forbidden error with your API key or account + * `404` - The requested item does not exist + * `413` - Payload too large + * `422` - The query or body parameters did not pass validation + * `429` - Too many requests have been sent with an API key in a given amount of time + * `500` - An internal server error occurred, please contact support@lob.com + 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 + - 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 + description: | + A pre-defined string identifying an error. Error codes fall into three categories: - Location location = new Location( - 37.777456f, - -122.393039f - ); + **GENERIC** + * `bad_request` - 422: an invalid request was made. See error message for details. + * `conflict` - 409/422: this operation would leave data in a conflicted state. + * `feature_limit_reached` - 403: the account has reached its resource limit and requires upgrading to add more. + * `internal_server_error` - 500: an error has occured on Lob's servers. Please try request again. + * `invalid` - 422: an invalid request was made. See error message for details. + * `not_deletable` - 422: an attempt was made to delete a resource, but the resource cannot be deleted. + * `not_found` - 404: the requested resource was not found. + * `request_timeout` - 408: the request took too long. Please try again. + * `service_unavailable` - 503: the Lob servers are temporarily unavailable. Please try agian. + * `unrecognized_endpoint` - 404: the requested endpoint doesn't exist. + * `unsupported_lob_version` - 422: an unsupported Lob API version was requested. - try { - api.lookup(location, null); - } catch (ApiException e) { - Console.WriteLine(e.ToString()); - } - label: CSHARP - - lang: Go - source: > - var context = context.Background() + **ADVANCED** + * `address_length_exceeds_limit` - 422: the sum of to.address_line1 and to.address_line2 cannot surpass 50 characters. + * `bank_account_already_verified` - 422: the bank account has already been verified. + * `bank_error` - 422: there's an issue with the bank account. + * `billing_address_required` - 403: in order to create a live mail piece, your account needs to set up a billing address. + * `custom_envelope_inventory_depleted` - 422: custom envelope inventory is depleted, and more will need to be ordered. + * `deleted_bank_account` - 404: checks cannot be created with a deleted bank account. + * `failed_deliverability_strictness` - 422: the `to` address doesn't meet strictness requirements. See Account Settings to configure strictness. + * `file_pages_below_min` - 422: not enough pages. + * `file_pages_exceed_max` - 422: too many pages. + * `file_size_exceeds_limit` - 422: the file size is too large. See description for details. + * `foreign_return_address` - 422: the `from` address must be a US address. + * `inconsistent_page_dimensions` - 422: all pages of the input file must have the same dimensions. + * `invalid_bank_account` - 422: the provided bank routing number is invalid. + * `invalid_bank_account_verification` - 422: verification amounts do not match. + * `invalid_check_international` - 422: checks cannot be sent internationally. + * `invalid_country_covid` - 422: the postal service in the specified country is currently unable to process the request due to COVID-19 restrictions. + * `invalid_file` - 422: the file is invalid. + * `invalid_file_dimensions` - 422: file dimensions are incorrect for the selected mail type. + * `invalid_file_download_time` - 422: file download from remote server took too long. + * `invalid_file_url` - 422: the file URL when creating a resource is invalid. + * `invalid_image_dpi` - 422: DPI must be at least 300. + * `invalid_international_feature` - 422: the specified product cannot be sent to the destination. + * `invalid_perforation_return_envelope` - 422: both `return_envelope` and `perforation` must be used together. + * `invalid_template_html` - 422: the provided HTML is invalid. + * `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. + * `merge_variable_required` - 422: a required merge variable is missing. + * `merge_variable_whitespace` - 422: merge variable names cannot contain whitespace. + * `payment_method_unverified` - 401: you must have a verified bank account or credit card to submit live requests. + * `pdf_encrypted` - 422: an encrypted PDF was provided. + * `special_characters_restricted` - 422: cannot use special characters for merge variable names. + * `unembedded_fonts` - 422: the provided PDF contains non-standard unembedded fonts. See description for details. - context = context.WithValue(context, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) + **AUTHENTICATION** + * `email_required` - 401: account must have a verified email address before creating live resources. + * `invalid_api_key` - 401/403: the API key is invalid. + * `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. + * `rate_limit_exceeded` - 429: requests were sent too quickly and must be slowed down. + * `unauthorized` - 401: the request isn't authorized. + * `unauthorized_token` - 401: token isn't authorized. + object: + type: string + description: Value is resource type. + count: + type: integer + description: number of resources in a set + list: + type: object + description: Multiple items returned in order + properties: + object: + $ref: '#/components/schemas/object' + next_url: + type: string + description: Url of next page of items in list. + nullable: true + previous_url: + type: string + description: Url of previous page of items in list. + nullable: true + count: + $ref: '#/components/schemas/count' + total_count: + type: integer + description: Indicates the total number of records. Provided when the request specifies an "include" query parameter + date_created: + type: string + format: date-time + description: A timestamp in ISO 8601 format of the date the resource was created. + date_modified: + type: string + format: date-time + description: A timestamp in ISO 8601 format of the date the resource was last modified. + deleted: + type: boolean + description: Only returned if the resource has been successfully deleted. + lob_base: + type: object + required: + - date_created + - date_modified + - object + 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' + adr_id: + type: string + description: Unique identifier prefixed with `adr_`. + pattern: ^adr_[a-zA-Z0-9]+$ + resource_description: + type: string + description: | + An internal description that identifies this resource. Must be no longer than 255 characters. + maxLength: 255 + nullable: true + address_us: + allOf: + - $ref: '#/components/schemas/lob_base' + - type: object + required: + - id + - address_line1 + - address_city + - address_state + - address_zip + anyOf: + - title: address obj with `name` defined + required: + - name + - title: address obj with `company` defined + required: + - company + properties: + id: + $ref: '#/components/schemas/adr_id' + object: + type: string + description: Value is resource type. + enum: + - address + default: address + description: + $ref: '#/components/schemas/resource_description' + name: + type: string + 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 + nullable: true + company: + type: string + 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 + nullable: true + phone: + type: string + description: Must be no longer than 40 characters. + maxLength: 40 + nullable: true + email: + type: string + description: Must be no longer than 100 characters. + maxLength: 100 + nullable: true + address_line1: + type: string + description: The primary number, street name, and directional information. + maxLength: 64 + address_line2: + type: string + description: An optional field containing any information which can't fit into line 1. + maxLength: 64 + nullable: true + address_city: + type: string + maxLength: 200 + address_state: + type: string + description: 2 letter state short-name code + pattern: ^[a-zA-Z]{2}$ + address_zip: + type: string + description: | + Must follow the ZIP format of `12345` or ZIP+4 format of `12345-1234`. + pattern: ^\d{5}(-\d{4})?$ + address_country: + type: string + enum: + - UNITED STATES + description: Full name of country + minLength: 13 + maxLength: 13 + metadata: + $ref: '#/components/schemas/metadata' + recipient_moved: + type: boolean + description: | + Only returned for accounts on certain Print & Mail Editions. Value is `true` if the address was altered because the recipient filed for a National Change of Address Linkage (NCOALink), `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. + nullable: true + example: + id: adr_e68217bd744d65c8 + description: Harry - Office + name: HARRY ZHANG + company: LOB + phone: '5555555555' + email: harry@lob.com + 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: {} + recipient_moved: false + date_created: '2019-08-12T00:16:00.361Z' + date_modified: '2019-08-12T00:16:00.361Z' + object: address + company: + type: string + 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 + nullable: true + address_intl: + allOf: + - $ref: '#/components/schemas/lob_base' + - type: object + required: + - id + - address_line1 + - address_country + anyOf: + - title: address obj with `name` defined + required: + - name + - title: address obj with `company` defined + required: + - company + properties: + id: + $ref: '#/components/schemas/adr_id' + description: + $ref: '#/components/schemas/resource_description' + name: + type: string + 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 + nullable: true + company: + $ref: '#/components/schemas/company' + phone: + type: string + description: Must be no longer than 40 characters. + maxLength: 40 + nullable: true + email: + type: string + description: Must be no longer than 100 characters. + maxLength: 100 + nullable: true + metadata: + $ref: '#/components/schemas/metadata' + address_line1: + type: string + maxLength: 200 + address_line2: + type: string + maxLength: 200 + nullable: true + address_city: + type: string + maxLength: 200 + nullable: true + address_state: + description: Will be returned as a full string + type: string + maxLength: 200 + nullable: true + address_zip: + type: string + description: Optional postal code. + maxLength: 40 + nullable: true + address_country: + description: Full name of country + type: string + maxLength: 200 + enum: + - AFGHANISTAN + - ALBANIA + - ALGERIA + - AMERICAN SAMOA + - ANDORRA + - ANGOLA + - ANGUILLA + - ANTARCTICA + - ANTIGUA AND BARBUDA + - ARGENTINA + - ARUBA + - AUSTRALIA + - AUSTRIA + - AZERBAIJAN + - BAHRAIN + - BANGLADESH + - BARBADOS + - BELARUS + - BELGIUM + - BELIZE + - BENIN + - BERMUDA + - BHUTAN + - BOLIVIA (PLURINATIONAL STATE OF) + - BONAIRE, SAINT EUSTATIUS AND SABA + - BOSNIA AND HERZEGOVINA + - BOTSWANA + - BRAZIL + - BRITISH INDIAN OCEAN TERRITORY + - BRITISH VIRGIN ISLANDS + - BRUNEI DARUSSALAM + - BULGARIA + - BURKINA FASO + - BURUNDI + - CABO VERDE + - CAMBODIA + - CAMEROON + - CANADA + - CAYMAN ISLANDS + - CENTRAL AFRICAN REPUBLIC + - CHAD + - CHILE + - CHINA + - COLOMBIA + - COMOROS + - CONGO + - CONGO, DEMOCRATIC REPUBLIC OF THE + - COOK ISLANDS + - COSTA RICA + - CÔTE D'IVOIRE + - CROATIA + - CUBA + - CURAÇAO + - CYPRUS + - CZECH REPUBLIC + - DENMARK + - DJIBOUTI + - DOMINICA + - DOMINICAN REPUBLIC + - ECUADOR + - EGYPT + - EL SALVADOR + - EQUATORIAL GUINEA + - ERITREA + - ESTONIA + - ESWATINI + - ETHIOPIA + - FALKLAND ISLANDS (MALVINAS) + - FAROE ISLANDS + - FIJI + - FINLAND + - FRANCE + - GABON + - GAMBIA + - GEORGIA + - GERMANY + - GHANA + - GIBRALTAR + - GREECE + - GREENLAND + - GRENADA + - GUATEMALA + - GUINEA + - GUINEA-BISSAU + - GUYANA + - HAITI + - HOLY SEE + - HONDURAS + - HONG KONG + - HUNGARY + - ICELAND + - INDIA + - INDONESIA + - IRAN (ISLAMIC REPUBLIC OF) + - IRAQ + - IRELAND + - ISRAEL + - ITALY + - JAMAICA + - JAPAN + - JORDAN + - KAZAKHSTAN + - KENYA + - KIRIBATI + - KOREA (DEMOCRATIC PEOPLE’S REPUBLIC OF) + - KOREA, REPUBLIC OF + - KUWAIT + - KYRGYZSTAN + - LAO PEOPLE’S DEMOCRATIC REPUBLIC + - LATVIA + - LEBANON + - LESOTHO + - LIBERIA + - LIBYA + - LIECHTENSTEIN + - LITHUANIA + - LUXEMBOURG + - MACAO + - MACEDONIA + - MADAGASCAR + - MALAWI + - MALAYSIA + - MALDIVES + - MALI + - MALTA + - MAURITANIA + - MAURITIUS + - MEXICO + - MOLDOVA, REPUBLIC OF + - MONACO + - MONGOLIA + - MONTENEGRO + - MONTSERRAT + - MOROCCO + - MOZAMBIQUE + - MYANMAR + - NAMIBIA + - NAURU + - NEPAL + - NETHERLAND ANTILLES + - NETHERLANDS + - NEW ZEALAND + - NICARAGUA + - NIGER + - NIGERIA + - NIUE + - NORFOLK ISLAND + - NORWAY + - OMAN + - PAKISTAN + - PANAMA + - PAPUA NEW GUINEA + - PARAGUAY + - PERU + - PHILIPPINES + - PITCAIRN + - POLAND + - PORTUGAL + - QATAR + - ROMANIA + - RUSSIAN FEDERATION + - RWANDA + - SAINT HELENA + - SAINT KITTS AND NEVIS + - SAINT LUCIA + - SAINT VINCENT AND THE GRENADINES + - SAMOA + - SAN MARINO + - SAO TOME AND PRINCIPE + - SAUDI ARABIA + - SENEGAL + - SERBIA + - SEYCHELLES + - SIERRA LEONE + - SINGAPORE + - SINT MAARTEN + - SLOVAKIA + - SLOVENIA + - SOLOMON ISLANDS + - SOMALIA + - SOUTH AFRICA + - SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS + - SOUTH SUDAN + - SPAIN + - SRI LANKA + - SUDAN + - SURINAME + - SWEDEN + - SWITZERLAND + - SYRIAN ARAB REPUBLIC + - TAIWAN + - TAJIKISTAN + - TANZANIA + - THAILAND + - THE BAHAMAS + - TIMOR-LESTE + - TOGO + - TOKELAU + - TONGA + - TRINIDAD AND TOBAGO + - TUNISIA + - TURKEY + - TURKMENISTAN + - TURKS AND CAICOS ISLANDS + - TUVALU + - UGANDA + - UKRAINE + - UNITED ARAB EMIRATES + - UNITED KINGDOM + - URUGUAY + - UZBEKISTAN + - VANUATU + - VENEZUELA + - VIET NAM + - WESTERN SAHARA + - YEMEN + - ZAMBIA + - ZIMBABWE + object: + type: string + description: Value is resource type. + enum: + - address + default: address + example: + id: adr_e68217bd744d65c8 + description: Harry - Office + name: Harry Zhang + company: Lob + phone: '5555555555' + email: harry@lob.com + metadata: {} + address_line1: 370 WATER ST + address_line2: '' + address_city: SUMMERSIDE + address_state: PRINCE EDWARD ISLAND + address_zip: C1N 1C4 + address_country: CANADA + address: + oneOf: + - $ref: '#/components/schemas/address_us' + - $ref: '#/components/schemas/address_intl' + address_fields_us: + type: object + required: + - address_line1 + - address_city + - address_state + - address_zip + properties: + address_line1: + type: string + description: The primary number, street name, and directional information. + maxLength: 64 + address_line2: + type: string + description: An optional field containing any information which can't fit into line 1. + maxLength: 64 + nullable: true + address_city: + type: string + maxLength: 200 + address_state: + type: string + description: 2 letter state short-name code + pattern: ^[a-zA-Z]{2}$ + address_zip: + type: string + description: | + Must follow the ZIP format of `12345` or ZIP+4 format of `12345-1234`. + pattern: ^\d{5}(-\d{4})?$ + 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 + 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 + nullable: true + company: + $ref: '#/components/schemas/company' + phone: + type: string + description: Must be no longer than 40 characters. + maxLength: 40 + nullable: true + email: + type: string + description: Must be no longer than 100 characters. + maxLength: 100 + nullable: true + address_country: + type: string + enum: + - US + default: US + metadata: + $ref: '#/components/schemas/metadata' + address_fields_intl: + type: object + required: + - address_line1 + - address_country + properties: + address_line1: + type: string + description: The primary number, street name, and directional information. + maxLength: 200 + address_line2: + type: string + description: An optional field containing any information which can't fit into line 1. + maxLength: 200 + nullable: true + address_city: + type: string + maxLength: 200 + nullable: true + address_state: + type: string + maxLength: 200 + nullable: true + address_zip: + type: string + description: Optional postal code. + maxLength: 40 + nullable: true + country_extended: + type: string + description: Must be a 2 letter country short-name code (ISO 3166). Does not accept `US`, `AS`, `PR`, `FM`, `GU`, `MH`, `MP`, `PW`, or `VI`. For these addresses, please use the US verification API. Also does not accept `PS`, which is not currently supported. + 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 + address_editable_intl: + allOf: + - $ref: '#/components/schemas/address_fields_intl' + - type: object + anyOf: + - title: address obj with `name` defined + required: + - name + - title: address obj with `company` defined + required: + - company + properties: + description: + $ref: '#/components/schemas/resource_description' + name: + type: string + 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 + nullable: true + company: + $ref: '#/components/schemas/company' + phone: + type: string + description: Must be no longer than 40 characters. + maxLength: 40 + nullable: true + email: + type: string + description: Must be no longer than 100 characters. + maxLength: 100 + nullable: true + address_country: + $ref: '#/components/schemas/country_extended' + metadata: + $ref: '#/components/schemas/metadata' + address_editable: + oneOf: + - $ref: '#/components/schemas/address_editable_us' + - $ref: '#/components/schemas/address_editable_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: + id: + $ref: '#/components/schemas/adr_id' + deleted: + $ref: '#/components/schemas/deleted' + bank_id_no_description: + type: string + pattern: ^bank_[a-zA-Z0-9]+$ + bank_id: + allOf: + - $ref: '#/components/schemas/bank_id_no_description' + - type: string + description: Unique identifier prefixed with `bank_`. + cents: + type: integer + minimum: 1 + maximum: 100 + bank_account_verify: + type: object + required: + - amounts + properties: + amounts: + description: In live mode, an array containing the two micro deposits (in cents) placed in the bank account. In test mode, no micro deposits will be placed, so any two integers between `1` and `100` will work. + type: array + minItems: 2 + maxItems: 2 + items: + $ref: '#/components/schemas/cents' + bank_account_base: + type: object + required: + - routing_number + - account_number + - account_type + - signatory + properties: + description: + $ref: '#/components/schemas/resource_description' + routing_number: + description: Must be a valid US routing number. + type: string + minLength: 9 + maxLength: 9 + account_number: + type: string + maxLength: 17 + account_type: + type: string + enum: + - company + - individual + description: The type of entity that holds the account. + 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 Dashboard. + type: string + maxLength: 30 + check_template: + type: string + enum: + - common + - jpm + 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. + fractional_routing_number: + type: string + description: The fractional routing number for your home bank account. Required for the `jpm` check template only. Please contact a bank representative if you do not know the fractional routing number associated with your home bank institution. + city: + type: string + description: The city associated with your home bank account. Required for the `jpm` check template only. Please contact a bank representative if you do not know the city associated with your home bank institution. + state: + type: string + description: The state associated with your home bank account. Required for the `jpm` check template only. Please contact a bank representative if you do not know the state associated with your home bank institution. + zipcode: + type: string + description: The zipcode associated with your home bank account. Required for the `jpm` check template only. Please contact a bank representative if you do not know the zipcode associated with your home bank institution. + metadata: + $ref: '#/components/schemas/metadata' + 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-_]+ + bank_account: + allOf: + - $ref: '#/components/schemas/bank_account_base' + - $ref: '#/components/schemas/lob_base' + - type: object + required: + - id + properties: + id: + $ref: '#/components/schemas/bank_id' + signature_url: + allOf: + - type: string + nullable: true + description: A [signed link](#section/Asset-URLs) to the signature image. + - $ref: '#/components/schemas/signed_link' + bank_name: + description: The name of the bank based on the provided routing number, e.g. `JPMORGAN CHASE BANK`. + type: string + verified: + description: A bank account must be verified before a check can be created. More info [here](#operation/bank_account_verify). + type: boolean + default: false + object: + type: string + description: Value is resource type. + enum: + - bank_account + default: bank_account + example: + id: bank_a + signature_url: https://lob-assets.com/bank-accounts/asd_asdfghjkqwertyui.pdf?expires=1234567890&signature=aksdf + bank_name: JPMORGAN CHASE BANK + verified: true + object: bank_account + description: Test Bank Account + routing_number: '322271627' + account_number: '123456789' + signatory: Jane Doe + account_type: individual + metadat: + spiffy: 'true' + date_created: '2019-08-08T19:34:47.571Z' + date_modified: '2019-08-08T19:34:47.571Z' + 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: + id: + $ref: '#/components/schemas/bank_id' + deleted: + $ref: '#/components/schemas/deleted' + bg_id: + type: string + description: Unique identifier prefixed with `bg_`. + pattern: ^bg_[a-zA-Z0-9]+$ + bg_description: + type: string + description: Description of the billing group. + maxLength: 255 + name: + type: string + description: Name of the billing group. + maxLength: 255 + billing_group_base: + type: object + properties: + description: + $ref: '#/components/schemas/bg_description' + name: + $ref: '#/components/schemas/name' + billing_group: + allOf: + - $ref: '#/components/schemas/billing_group_base' + - type: object + properties: + id: + $ref: '#/components/schemas/bg_id' + date_created: + $ref: '#/components/schemas/date_created' + date_modified: + $ref: '#/components/schemas/date_modified' + object: + type: string + description: Value is resource type. + enum: + - billing_group + default: billing_group + billing_group_editable: + allOf: + - $ref: '#/components/schemas/billing_group_base' + - required: + - name + booklet_id: + type: string + description: Unique identifier prefixed with `ord_`. + pattern: ^ord_[0-9a-f]{26}$ + evnt_id: + type: string + description: Unique identifier prefixed with `evnt_`. + pattern: ^evnt_[a-zA-Z0-9]+$ + tracking_event_base: + type: object + description: As mail pieces travel through the mail stream, USPS scans their unique barcodes, and Lob processes these mail scans to generate tracking events. + required: + - id + - date_created + - date_modified + - object + properties: + id: + $ref: '#/components/schemas/evnt_id' + time: + type: string + format: date-time + description: A timestamp in ISO 8601 format of the date USPS registered the event. + date_created: + $ref: '#/components/schemas/date_created' + date_modified: + $ref: '#/components/schemas/date_modified' + object: + allOf: + - $ref: '#/components/schemas/object' + - type: string + enum: + - tracking_event + default: tracking_event + 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): + * `Mailed` - The mailpiece has been handed off to and accepted by USPS + and is en route. More about + Mailed. + Note this data is only available in Enterprise editions of + Lob. Contact Sales if + you want access to this feature. - var apiClient = *lob.NewAPIClient(configuration) + * `In Transit` - The mailpiece is being processed at the entry/origin facility. + * `In Local Area` - The mailpiece is being processed at the destination facility. - var location = *lob.NewLocationWithDefaults() + * `Processed for Delivery` - The mailpiece has been greenlit for + delivery at the recipient's nearest postal facility. The mailpiece + should reach the mailbox within 1 business day of this tracking + event. - location.SetLatitude(37.777456) + * `Delivered` - The mail piece has been delivered to + the recipient’s address. The final scan is generated when the mail + carrier's GPS unit leaves the delivery area. - location.SetLongitude(122.393039) + * `Re-Routed` - The mailpiece is re-routed due to recipient change of + address, address errors, or USPS relabeling of barcode/ID tag + area. + * `Returned to Sender` - The mailpiece is being returned to sender due + to barcode, ID tag area, or address errors. + + * `International Exit` - The mail piece has been processed to + ship to a destination abroad. This is typically the last + scan a US-originated international mail piece will receive + from the USPS. - resp, _, err := - apiClient.ReverseGeocodeLookupsApi.Lookup(context).Location(location).Execute() + More about tracking + details: + description: Will be `null` for `type=normal` events + type: object + enum: + - null + nullable: true + location: + type: string + description: | + The zip code in which the scan event occurred. Null for `Mailed` events. + nullable: true + merge_variables: + type: object + 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 our guide to using html and merge variables. Depending on your Merge Variable strictness 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 + send_date: + type: string + 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. + anyOf: + - format: date-time + - format: date + mail_type: + type: string + enum: + - usps_first_class + - usps_standard + description: | + A string designating the mail postage type: + * `usps_first_class` - (default) + * `usps_standard` - a cheaper option 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. + default: usps_first_class + thumbnail: + type: object + properties: + small: + $ref: '#/components/schemas/signed_link' + medium: + $ref: '#/components/schemas/signed_link' + large: + $ref: '#/components/schemas/signed_link' + 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 + 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' + from: + type: object + properties: + from: + $ref: '#/components/schemas/address' + tmpl_id: + type: string + description: Unique identifier prefixed with `tmpl_`. ID of a saved [HTML template](#section/HTML-Templates). + pattern: ^tmpl_[a-zA-Z0-9]+$ + vrsn_id: + type: string + description: Unique identifier prefixed with `vrsn_`. + pattern: ^vrsn_[a-zA-Z0-9]+$ + campaign_id: + title: 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_`. + type: string + pattern: ^(cmp|camp)_[a-zA-Z0-9]+$ + nullable: true + 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). + type: string + enum: + - marketing + - operational + - null + nullable: true + booklet_size: + type: string + enum: + - 8.375x5.375 + description: | + Specifies the size of the booklet. + default: 8.375x5.375 + 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 + status: + type: string + enum: + - processed + - rendered + - failed + description: | + A string describing the PDF render status: + * `processed` - the rendering process is currently in progress. + * `rendered` - a PDF has been successfully rendered of the mailpiece. + * `failed` - one or more issues has caused the rendering process to fail. + booklet_source_material: + type: string + enum: + - 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`. + default: 60# Gloss Text + failure_reason_error: + type: object + description: Failure error details + properties: + url: + type: string + description: Failed URL of asset + nullable: true + host: + type: string + description: URL host + nullable: true + path: + type: string + description: URL path + nullable: true + protocol: + type: string + description: Network protocol + nullable: true + remediation: + type: string + description: Instructions on how to resolve the error + nullable: true + error_type: + type: string + description: HTTP response status code message or service defined error + nullable: true + status_code: + type: number + description: HTTP response status codes if the error is asset related + nullable: true + failure_reason: + type: object + description: An object describing the reason for failure if the resource failed to render. + properties: + remediation: + type: string + description: Instructions on how to resolve the error + failure_reason: + type: string + description: Reason failure occurred + errors: + type: array + nullable: true + items: + $ref: '#/components/schemas/failure_reason_error' + booklet_generated_base: + allOf: + - $ref: '#/components/schemas/generated' + - $ref: '#/components/schemas/from' + - type: object + required: + - id + - from + - use_type + properties: + url: + $ref: '#/components/schemas/signed_link' + id: + $ref: '#/components/schemas/booklet_id' + 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' + campaign_id: + $ref: '#/components/schemas/campaign_id' + use_type: + $ref: '#/components/schemas/booklet_use_type' + size: + $ref: '#/components/schemas/booklet_size' + pages: + $ref: '#/components/schemas/booklet_pages' + fsc: + type: boolean + description: This is in beta. Contact support@lob.com or your account contact to learn more. + default: false + status: + $ref: '#/components/schemas/status' + source_material: + $ref: '#/components/schemas/booklet_source_material' + failure_reason: + allOf: + - $ref: '#/components/schemas/failure_reason' + - nullable: true + object: + type: string + description: Value is resource type. + enum: + - booklet + default: booklet + booklet: + allOf: + - type: object + properties: + tracking_events: + description: An array of tracking events ordered by ascending `time`. + type: array + items: + $ref: '#/components/schemas/tracking_event_normal' + description: + $ref: '#/components/schemas/resource_description' + metadata: + $ref: '#/components/schemas/metadata' + merge_variables: + $ref: '#/components/schemas/merge_variables' + send_date: + $ref: '#/components/schemas/send_date' + mail_type: + $ref: '#/components/schemas/mail_type' + - $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: + id: + $ref: '#/components/schemas/booklet_id' + deleted: + $ref: '#/components/schemas/deleted' + inline_address_us: + allOf: + - $ref: '#/components/schemas/address_editable_us' + - type: object + required: + - address_line1 + - address_city + - address_state + - address_zip + inline_address_intl: + allOf: + - $ref: '#/components/schemas/address_editable_intl' + - type: object + required: + - address_line1 + - address_country + - type: object + oneOf: + - required: + - address_city + - address_state + - required: + - address_zip + inline_address: + oneOf: + - $ref: '#/components/schemas/inline_address_us' + - $ref: '#/components/schemas/inline_address_intl' + input_to: + type: object + 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 Print & Mail Edition, US addresses may also be run through National Change of Address Linkage(NCOALink). Non-US addresses will be standardized into uppercase only. If a US address used does not meet your account’s US Mail strictness setting, the request will fail. Lob Guide: Verification of Mailing Addresses' + oneOf: + - $ref: '#/components/schemas/adr_id' + - $ref: '#/components/schemas/inline_address' + input_from: + type: object + 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' + editable: + type: object + properties: + description: + $ref: '#/components/schemas/resource_description' + metadata: + $ref: '#/components/schemas/metadata' + mail_type: + $ref: '#/components/schemas/mail_type' + merge_variables: + $ref: '#/components/schemas/merge_variables' + send_date: + $ref: '#/components/schemas/send_date' + html_string: + type: string + description: An HTML string of under 10,000 characters. + maxLength: 10000 + pattern: < + remote_file_url: + type: string + description: | + The location of a remote file. Remote URLs have a 5 MB file size limit and must be downloaded within 40 seconds. + pattern: ^https://[-a-zA-Z0-9@:%._+~#=/]{1,256}.(html?|pdf|png|jpg)$ + booklet_file: + description: |- + Notes: + - HTML merge variables should not include delimiting whitespace. + - 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. + - For design specifications, please see our PDF and [HTML](#section/HTML-Examples) templates. + See pricing for extra costs incurred. + oneOf: + - $ref: '#/components/schemas/html_string' + - $ref: '#/components/schemas/tmpl_id' + - $ref: '#/components/schemas/remote_file_url' + - type: string + pattern: ^(?!https://)[a-zA-Z0-9@:%._+~#=/]{1,256}.(html?|pdf)$ + billing_group_id: + type: string + description: An optional string with the billing group ID to tag your usage with. Is used for billing purposes. Requires special activation to use. See Billing Group API for more information. + qr_code: + type: object + description: Customize and place a QR code on the creative at the required position. + required: + - position + - redirect_url + - width + properties: + position: + type: string + enum: + - relative + 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'. + top: + type: number + description: Vertical distance (in inches) to place QR code from the top. Only allowed if "bottom" isn't provided. + right: + type: number + description: Horizontal distance (in inches) to place QR code from the right. Only allowed if "left" isn't provided. + left: + type: number + description: Horizontal distance (in inches) to place QR code from the left. Only allowed if "right" isn't provided. + bottom: + type: number + description: Vertical distance (in inches) to place QR code from the bottom. Only allowed if "top" isn't provided. + redirect_url: + type: string + 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 our help center. + width: + type: number + description: The size (in inches) of the QR code with a minimum of 1 inch. All QR codes are generated as a square. + pages: + type: string + description: Specify the pages where the QR code should be stamped in a comma separated format. Your QR code can be printed in the same position on multiple pages. For postcards, the values should either be "front", "back" (for either front or back) or "front,back" (for the QR code to be printed on both sides). For self-mailers 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"). + logo: + type: object + 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: + type: string + 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)$ + style: + type: object + description: Customizes the appearance of the QR code. + properties: + background_color: + type: string + 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}$ + foreground_color: + type: string + 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}$ + booklet_editable: + allOf: + - $ref: '#/components/schemas/input_to' + - $ref: '#/components/schemas/input_from' + - $ref: '#/components/schemas/editable' + - type: object + required: + - to + - from + - file + - use_type + - pages + - size + properties: + file: + $ref: '#/components/schemas/booklet_file' + mail_type: + $ref: '#/components/schemas/mail_type' + billing_group_id: + $ref: '#/components/schemas/billing_group_id' + qr_code: + $ref: '#/components/schemas/qr_code' + use_type: + $ref: '#/components/schemas/booklet_use_type' + fsc: + type: boolean + 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. + default: false + size: + $ref: '#/components/schemas/booklet_size' + pages: + $ref: '#/components/schemas/booklet_pages' + source_material: + $ref: '#/components/schemas/booklet_source_material' + buckslip_description: + type: string + description: Description of the buckslip. + maxLength: 255 + nullable: true + buckslip_base: + type: object + properties: + description: + $ref: '#/components/schemas/buckslip_description' + size: + description: The size of the buckslip + enum: + - 8.75x3.75 + type: string + default: 8.75x3.75 + buckslip_id: + type: string + description: Unique identifier prefixed with `bck_`. + pattern: ^bck_[a-zA-Z0-9]+$ + bo_id: + type: string + description: Unique identifier prefixed with `bo_`. + pattern: ^bo_[a-zA-Z0-9]+$ + buckslip_order: + allOf: + - $ref: '#/components/schemas/lob_base' + - type: object + properties: + id: + $ref: '#/components/schemas/bo_id' + buckslip_id: + $ref: '#/components/schemas/buckslip_id' + status: + description: The status of the buckslip order. + enum: + - pending + - printing + - available + - cancelled + - depleted + type: string + quantity_ordered: + description: The quantity of buckslips ordered. + type: number + default: 0 + unit_price: + description: The unit price for the buckslip order. + type: number + default: 0 + inventory: + description: The inventory of the buckslip order. + type: number + default: 0 + cancelled_reason: + description: The reason for cancellation. + type: string + availability_date: + type: string + format: date-time + description: A timestamp in ISO 8601 format of the date the resource was created. + expected_availability_date: + type: string + format: date-time + description: The fixed deadline for the buckslips to be printed. + buckslip: + 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 + nullable: true + 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 + local_file_path: + type: string + description: The path to a local file. + pattern: ^(?!https://)[a-zA-Z0-9@:%._+~#=/]{1,256}.(html?|pdf|png|jpg)$ + buckslip_editable: + allOf: + - $ref: '#/components/schemas/buckslip_base' + - type: object + required: + - front + properties: + front: + description: A PDF template for the front of the buckslip + oneOf: + - $ref: '#/components/schemas/remote_file_url' + - $ref: '#/components/schemas/local_file_path' + back: + description: A PDF template for the back of the buckslip + oneOf: + - $ref: '#/components/schemas/remote_file_url' + - $ref: '#/components/schemas/local_file_path' + 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: + id: + $ref: '#/components/schemas/buckslip_id' + deleted: + $ref: '#/components/schemas/deleted' + buckslip_updatable: + type: object + properties: + description: + $ref: '#/components/schemas/buckslip_description' + auto_reorder: + description: Allows for auto reordering + type: boolean + reorder_quantity: + description: The quantity of items to be reordered (only required when auto_reorder is true). + type: number + minimum: 5000 + maximum: 10000000 + buckslip_order_editable: + type: object + required: + - quantity + properties: + quantity: + type: integer + description: The quantity of buckslips in the order (minimum 5,000). + minimum: 5000 + maximum: 10000000 + recipient: + type: string + description: The intended recipient, typically a person's or firm's name. + nullable: true + maxLength: 500 + primary_line_us: + type: string + description: | + The primary delivery line (usually the street address) of the address. + Combination of the following applicable `components`: + * `primary_number` + * `street_predirection` + * `street_name` + * `street_suffix` + * `street_postdirection` + * `secondary_designator` + * `secondary_number` + * `pmb_designator` + * `pmb_number` + maxLength: 200 + secondary_line: + type: string + description: | + The secondary delivery line of the address. This field is typically empty but may contain information if `primary_line` is too long. + maxLength: 200 + urbanization: + type: string + description: | + Only present for addresses in Puerto Rico. An urbanization refers to an area, sector, or development within a city. See USPS documentation for clarification. + maxLength: 200 + city_no_description: + type: string + maxLength: 200 + zip_code: + type: string + pattern: ^\d{5}((-)?\d{4})?$ + multiple_components: + allOf: + - anyOf: + - title: US verification object with `city` and `state` + required: + - city + - state + - title: US verification object with `zip_code` + required: + - zip_code + - type: object + required: + - primary_line + properties: + recipient: + $ref: '#/components/schemas/recipient' + primary_line: + $ref: '#/components/schemas/primary_line_us' + secondary_line: + $ref: '#/components/schemas/secondary_line' + urbanization: + $ref: '#/components/schemas/urbanization' + city: + allOf: + - $ref: '#/components/schemas/city_no_description' + - type: string + description: The name of the city. `city` and `state` are required if no `zip_code` is passed. + state: + type: string + description: The ISO 3166-2 two letter code or subdivision name for the state. `city` and `state` are required if no `zip_code` is passed. + maxLength: 50 + 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' + multiple_components_list: + type: object + required: + - addresses + properties: + addresses: + type: array + minItems: 1 + maxItems: 20 + items: + $ref: '#/components/schemas/multiple_components' + us_ver_id: + type: string + description: Unique identifier prefixed with `us_ver_`. + pattern: ^us_ver_[a-zA-Z0-9_]+$ + primary_number: + type: string + description: The numeric or alphanumeric part of an address preceding the street name. Often the house, building, or PO Box number. + street_name: + type: string + description: The name of the street. + city: + allOf: + - $ref: '#/components/schemas/city_no_description' + - type: string + description: The name of the city. + state: + type: string + description: | + The ISO 3166-2 two letter code for the state. + maxLength: 2 + zip_code_plus_4: + type: string + pattern: ^\d{4}$ + zip_code_type: + type: string + enum: + - standard + - po_box + - unique + - military + - '' + description: | + A description of the ZIP code type. For more detailed information about + each ZIP code type, see [US Verification Details](#tag/US-Verification-Types). + county: + type: string + description: County name of the address city. + county_fips: + type: string + description: | + A 5-digit FIPS county code which uniquely identifies `components[county]`. It consists of a 2-digit state code and a 3-digit county code. + pattern: \d{5} + us_components: + type: object + description: A nested object containing a breakdown of each component of an address. + required: + - primary_number + - street_predirection + - street_name + - street_suffix + - street_postdirection + - secondary_designator + - secondary_number + - pmb_designator + - pmb_number + - extra_secondary_designator + - extra_secondary_number + - city + - state + - zip_code + - zip_code_plus_4 + - zip_code_type + - delivery_point_barcode + - address_type + - record_type + - default_building_address + - county + - county_fips + - carrier_route + - carrier_route_type + - po_box_only_flag + properties: + primary_number: + $ref: '#/components/schemas/primary_number' + street_predirection: + type: string + enum: + - 'N' + - S + - E + - W + - NE + - SW + - SE + - NW + - '' + description: | + Geographic direction preceding a street name (`N`, `S`, `E`, `W`, `NE`, `SW`, `SE`, `NW`). + street_name: + $ref: '#/components/schemas/street_name' + street_suffix: + type: string + description: | + The standard USPS abbreviation for the street suffix (`ST`, `AVE`, `BLVD`, etc). + street_postdirection: + type: string + enum: + - 'N' + - S + - E + - W + - NE + - SW + - SE + - NW + - '' + description: | + Geographic direction following a street name (`N`, `S`, `E`, `W`, `NE`, `SW`, `SE`, `NW`). + secondary_designator: + type: string + description: | + The standard USPS abbreviation describing the `components[secondary_number]` (`STE`, `APT`, `BLDG`, etc). + secondary_number: + type: string + description: | + Number of the apartment/unit/etc. + pmb_designator: + type: string + description: | + Designator of a CMRA-authorized private mailbox. + pmb_number: + type: string + description: | + Number of a CMRA-authorized private mailbox. + extra_secondary_designator: + type: string + description: | + An extra (often unnecessary) secondary designator provided with the input address. + extra_secondary_number: + type: string + description: | + An extra (often unnecessary) secondary number provided with the input address. + city: + $ref: '#/components/schemas/city' + state: + $ref: '#/components/schemas/state' + zip_code: + type: string + description: The 5-digit ZIP code + pattern: ^\d{5}$ + 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' + delivery_point_barcode: + type: string + description: | + A 12-digit identifier that uniquely identifies a delivery point (location where mail can be sent and received). It consists of the 5-digit ZIP code (`zip_code`), 4-digit ZIP+4 add-on (`zip_code_plus_4`), 2-digit delivery point, and 1-digit delivery point check digit. + address_type: + type: string + enum: + - residential + - commercial + - '' + description: | + Uses USPS's Residential Delivery Indicator (RDI) to identify + whether an address is classified as residential or + business. Possible values are: + * `residential` –– The address is residential or a PO Box. + * `commercial` –– The address is commercial. + * `''` –– Not enough information provided to be determined. + record_type: + type: string + enum: + - street + - highrise + - firm + - po_box + - rural_route + - general_delivery + - '' + description: | + A description of the type of address. Populated if a DPV match is made (`deliverability_analysis[dpv_confirmation]` + is `Y`, `S`, or `D`). For more detailed information about each record type, see + [US Verification Details](#tag/US-Verification-Types). + default_building_address: + type: boolean + description: | + Designates whether or not the address is the default address for a building containing multiple delivery points. + county: + $ref: '#/components/schemas/county' + county_fips: + $ref: '#/components/schemas/county_fips' + carrier_route: + type: string + description: | + A 4-character code assigned to a mail delivery route within a ZIP code. + carrier_route_type: + type: string + enum: + - city_delivery + - rural_route + - highway_contract + - po_box + - general_delivery + description: | + The type of `components[carrier_route]`. For more detailed information about + each carrier route type, see [US Verification Details](#tag/US-Verification-Types). + po_box_only_flag: + type: string + enum: + - 'Y' + - 'N' + - '' + description: | + Indicates the mailing facility for an address only supports PO Box deliveries and other forms of mail delivery are not available. + latitude: + type: number + format: float + 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`). + nullable: true + longitude: + type: number + format: float + 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`). + nullable: true + dpv_footnote: + type: string + enum: + - AA + - A1 + - BB + - CC + - N1 + - F1 + - G1 + - U1 + - M1 + - M3 + - P1 + - P3 + - R1 + - R7 + - RR + example: AA + deliverability_analysis: + type: object + description: A nested object containing a breakdown of the deliverability of an address. + required: + - dpv_confirmation + - dpv_cmra + - dpv_vacant + - dpv_active + - dpv_inactive_reason + - dpv_throwback + - dpv_non_delivery_day_flag + - dpv_non_delivery_day_values + - dpv_no_secure_location + - dpv_door_not_accessible + - dpv_footnotes + - ews_match + - lacs_indicator + - lacs_return_code + - suite_return_code + properties: + dpv_confirmation: + type: string + enum: + - 'Y' + - S + - D + - 'N' + - '' + description: | + Result of Delivery Point Validation (DPV), which determines whether or not the address is deliverable by the USPS. Possible values are: + * `Y` –– The address is deliverable by the USPS. + * `S` –– The address is deliverable by removing the provided secondary unit designator. This information may be incorrect or unnecessary. + * `D` –– The address is deliverable to the building's default address but is missing a secondary unit designator and/or number. + There is a chance the mail will not reach the intended recipient. + * `N` –– The address is not deliverable according to the USPS, but parts of the address are valid (such as the street and ZIP code). + * `''` –– This address is not deliverable. No matching street could be found within the city or ZIP code. + example: 'Y' + dpv_cmra: + type: string + enum: + - 'Y' + - 'N' + - '' + description: | + Indicates whether or not the address is CMRA-authorized. Possible values are: + * `Y` –– Address is CMRA-authorized. + * `N` –– Address is not CMRA-authorized. + * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). + example: 'N' + dpv_vacant: + type: string + enum: + - 'Y' + - 'N' + - '' + description: | + Indicates that an address was once deliverable, but has become vacant and is no longer receiving deliveries. Possible values are: + * `Y` –– Address is vacant. + * `N` –– Address is not vacant. + * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). + example: 'N' + dpv_active: + type: string + enum: + - 'Y' + - 'N' + - '' + 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: + * `Y` –– Address is active. + * `N` –– Address is not active. + * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). + example: 'Y' + dpv_inactive_reason: + type: string + enum: + - '01' + - '02' + - '03' + - '04' + - '05' + - '06' + - '' + description: | + Indicates the reason why an address is vacant or no longer receiving deliveries. Possible values are: + * `01` –– Address does not receive mail from the USPS directly, but is serviced by a drop address. + * `02` –– Address not yet deliverable. + * `03` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). + * `04` –– Address is a College, Military Zone, or other type. + * `05` –– Address no longer receives deliveries. + * `06` –– Address is missing required secondary information. + * `''` –– A DPV match is not made or the address is active. + example: '06' + dpv_throwback: + type: string + enum: + - 'Y' + - 'N' + - '' + description: | + Indicates a street address for which mail is delivered to a PO Box. Possible values are: + * `Y` –– Address is a PO Box throwback delivery point. + * `N` –– Address is not a PO Box throwback delivery point. + * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). + example: 'N' + dpv_non_delivery_day_flag: + type: string + enum: + - 'Y' + - 'N' + - '' + description: | + Indicates whether deliveries are not performed on one or more days of the week at an address. Possible values are: + * `Y` –– Mail delivery does not occur on some days of the week. + * `N` –– Mail delivery occurs every day of the week. + * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). + example: 'N' + dpv_non_delivery_day_values: + type: string + description: | + Indicates days of the week (starting on Sunday) deliveries are not performed at an address. For example: + * `YNNNNNN` –– Mail delivery does not occur on Sunday's. + * `NYNNNYN` –– Mail delivery does not occur on Monday's or Friday's. + * `''` –– 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). + example: YNNNNNN + dpv_no_secure_location: + type: string + enum: + - 'Y' + - 'N' + - '' + description: | + Indicates packages to this address will not be left due to security concerns. Possible values are: + * `Y` –– Address does not have a secure mailbox. + * `N` –– Address has a secure mailbox. + * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). + example: 'N' + dpv_door_not_accessible: + type: string + enum: + - 'Y' + - 'N' + - '' + description: | + Indicates the door of the address is not accessible for mail delivery. Possible values are: + * `Y` –– Door is not accessible. + * `N` –– Door is accessible. + * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). + example: 'N' + dpv_footnotes: + type: array + 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). + items: + $ref: '#/components/schemas/dpv_footnote' + example: + - AA + - BB + ews_match: + type: boolean + description: | + Indicates whether or not an address has been flagged in the Early Warning System, meaning the address is under development and not yet ready to receive mail. However, it should become available in a few months. + example: false + lacs_indicator: + type: string + enum: + - 'Y' + - 'N' + - '' + description: | + Indicates whether this address has been converted by + LACSLink. + LACSLink corrects outdated addresses into their modern counterparts. + Possible values are: + * `Y` –– New address produced with a matching record in LACSLink. + * `N` –– New address could not be produced with a matching record in LACSLink. + * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). + example: '' + lacs_return_code: + type: string + description: | + A code indicating how `deliverability_analysis[lacs_indicator]` was determined. + Possible values are: + * `A` — A new address was produced because a match was found in LACSLink. + * `92` — A LACSLink record was matched after dropping secondary information. + * `14` — A match was found in LACSLink, but could not be converted to a deliverable address. + * `00` — A match was not found in LACSLink, and no new address was produced. + * `''` — LACSLink was not attempted. + example: '' + suite_return_code: + type: string + enum: + - A + - '00' + - '' + description: | + A return code that indicates whether the address was matched and corrected by + SuiteLink. + SuiteLink attempts to provide secondary information to business addresses. + Possible values are: + * `A` –– A SuiteLink match was found and secondary information was added. + * `00` –– A SuiteLink match could not be found and no secondary information was added. + * `''` –– SuiteLink lookup was not attempted. + example: '' + lob_confidence_score: + type: object + description: Lob Confidence Score is a nested object that provides a numerical value between 0-100 of the likelihood that an address is deliverable based on Lob’s mail delivery data to over half of US households. + required: + - score + - level + properties: + score: + type: number + nullable: true + format: float + 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. + default: null + minimum: 0 + maximum: 100 + level: + type: string + enum: + - high + - medium + - low + - '' + description: | + Indicates the likelihood that the address is a valid, mail-receiving address. Possible values are: + - `high` — Over 70% of mailpieces Lob has sent to this address were delivered successfully and recent mailings were also successful. + - `medium` — Between 40% and 70% of mailpieces Lob has sent to this address were delivered successfully. + - `low` — Less than 40% of mailpieces Lob has sent to this address were delivered successfully and recent mailings weren't successful. + - `""` — No tracking data exists for this address or lob deliverability was unable to find a corresponding level of mail success. + us_verification: + type: object + properties: + id: + $ref: '#/components/schemas/us_ver_id' + recipient: + $ref: '#/components/schemas/recipient' + primary_line: + $ref: '#/components/schemas/primary_line_us' + secondary_line: + $ref: '#/components/schemas/secondary_line' + urbanization: + $ref: '#/components/schemas/urbanization' + last_line: + type: string + description: | + Combination of the following applicable `components`: + * City (`city`) + * State (`state`) + * ZIP code (`zip_code`) + * ZIP+4 (`zip_code_plus_4`) + deliverability: + type: string + enum: + - deliverable + - deliverable_unnecessary_unit + - deliverable_incorrect_unit + - deliverable_missing_unit + - undeliverable + description: | + Summarizes the deliverability of the `us_verification` object. + For full details, see the `deliverability_analysis` field. Possible values are: + * `deliverable` – The address is deliverable by the USPS. + * `deliverable_unnecessary_unit` – The address is deliverable, but the secondary unit information is unnecessary. + * `deliverable_incorrect_unit` – The address is deliverable to the building's default address but the secondary unit provided may not exist. There is a chance the mail will not reach the intended recipient. + * `deliverable_missing_unit` – The address is deliverable to the building's default address but is missing secondary unit information. There is a chance the mail will not reach the intended recipient. + * `undeliverable` – The address is not deliverable according to the USPS. + valid_address: + type: boolean + enum: + - true + - false + 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. + This 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. + components: + $ref: '#/components/schemas/us_components' + deliverability_analysis: + $ref: '#/components/schemas/deliverability_analysis' + lob_confidence_score: + $ref: '#/components/schemas/lob_confidence_score' + object: + type: string + description: Value is resource type. + enum: + - us_verification + default: us_verification + us_verifications: + type: object + required: + - addresses + - errors + properties: + addresses: + type: array + items: + oneOf: + - $ref: '#/components/schemas/us_verification' + - $ref: '#/components/schemas/error' + errors: + description: Indicates whether any errors occurred during the verification process. + type: boolean + primary_line: + type: string + description: | + The primary delivery line (usually the street address) of the address. + maxLength: 200 + intl_verification_base: + type: object + properties: + recipient: + $ref: '#/components/schemas/recipient' + primary_line: + $ref: '#/components/schemas/primary_line' + secondary_line: + $ref: '#/components/schemas/secondary_line' + postal_code: + type: string + description: The postal code. + maxLength: 12 + multiple_components_intl: + allOf: + - $ref: '#/components/schemas/intl_verification_base' + - type: object + required: + - primary_line + - country + properties: + city: + $ref: '#/components/schemas/city' + state: + type: string + description: The name of the state. + postal_code: + $ref: '#/components/schemas/postal_code' + country: + $ref: '#/components/schemas/country_extended' + intl_verifications_payload: + type: object + required: + - addresses + properties: + addresses: + type: array + minItems: 1 + maxItems: 20 + items: + $ref: '#/components/schemas/multiple_components_intl' + intl_ver_id: + type: string + description: Unique identifier prefixed with `intl_ver_`. + pattern: ^intl_ver_[a-zA-Z0-9]+$ + country_short: + type: string + description: The country of the address. Will be returned as a 2 letter country short-name code (ISO 3166). + example: CA + intl_components: + type: object + description: A nested object containing a breakdown of each component of an address. + properties: + primary_number: + $ref: '#/components/schemas/primary_number' + street_name: + $ref: '#/components/schemas/street_name' + city: + $ref: '#/components/schemas/city' + state: + $ref: '#/components/schemas/state' + postal_code: + $ref: '#/components/schemas/postal_code' + intl_verification: + allOf: + - $ref: '#/components/schemas/intl_verification_base' + - type: object + properties: + id: + $ref: '#/components/schemas/intl_ver_id' + last_line: + type: string + description: | + Combination of the following applicable `components`: + * `city` + * `state` + * `zip_code` + * `zip_code_plus_4` + country: + $ref: '#/components/schemas/country_short' + coverage: + type: string + enum: + - SUBBUILDING + - HOUSENUMBER/BUILDING + - STREET + - LOCALITY + - SPARSE + description: | + The coverage level for the country. This represents the maximum level of + accuracy an input address can be verified to. + * `SUBBUILDING` - Coverage down to unit numbers. For example, in an apartment or a large building + * `HOUSENUMBER/BUILDING` - Coverage down to house number. For example, the address where a house or building may be located + * `STREET` - Coverage down to street. This means that we can verify that an street exists in a city, state, country + * `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. + * `SPARSE` - Some addresses for this country exist in our databases + deliverability: + type: string + enum: + - deliverable + - deliverable_missing_info + - undeliverable + - no_match + description: | + Summarizes the deliverability of the `intl_verification` object. Possible values are: + * `deliverable` — The address is deliverable. + * `deliverable_missing_info` — The address is missing some information, but is most likely deliverable. + * `undeliverable` — The address is most likely not deliverable. Some components of the address (such as city or postal code) may have been found. + * `no_match` — This address is not deliverable. No matching street could be found within the city or postal code. + status: + type: string + enum: + - LV4 + - LV3 + - LV2 + - LV1 + - LF4 + - LF3 + - LF2 + - LF1 + - LM4 + - LM3 + - LM2 + - LU1 + description: | + The status level for the country. This represents the maximum level of + accuracy an input address can be verified to. - if err != nil { - return err - } - label: GO - /us_verifications: - post: - operationId: us_verification - summary: Single Verify - 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. - tags: - - US Verifications - parameters: - - in: query - name: case - schema: + * `LV4` - Verified. The input data is correct. All input data was able to match in databases. + * `LV3` - Verified. The input data is correct. All input data was able to match in databases after some or all elements were standarized. The input data may also be using outdated city, state, or country names. + * `LV2` - Verified. The input data is correct although some input data is unverifiable due to incomplete data. + * `LV1` - Verified. The input data is acceptable but in an attempt to standarize user input, errors were introduced. + * `LF4` - Fixed. The input data is matched and fixed. (Example: Brighon, UK -> Brighton, UK) + * `LF3` - Fixed. The input data is matched and fixed but some elements such as Subbuilding number and house number cannot be checked. + * `LF2` - Fixed. The input data is matched but some elements such as Street cannot be checked. + * `LF1` - Fixed. The input data is acceptable but in an attempt to standarize user input, errors were introduced. + * `LM4` - Missing Info. The input data cannot be corrected completely. + * `LM3` - Missing Info. The input data cannot be corrected completely and there were multiple matches found in databases. + * `LM2` - Missing Info. The input data cannot be corrected completely and only some elements were found. + * `LU1` - Unverified. The input data cannot be corrected or matched. + components: + $ref: '#/components/schemas/intl_components' + object: + type: string + description: Value is resource type. + enum: + - intl_verification + default: intl_verification + intl_verifications: + type: object + required: + - addresses + - errors + properties: + addresses: + type: array + items: + oneOf: + - $ref: '#/components/schemas/intl_verification' + - $ref: '#/components/schemas/error' + errors: + description: Indicates whether any errors occurred during the verification process. + type: boolean + cmp_schedule_type: + description: How the campaign should be scheduled. Only value available today is `immediate`. + type: string + enum: + - immediate + 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). + type: string + enum: + - marketing + - operational + - null + nullable: true + campaign_writable: + type: object + required: + - name + - schedule_type + - use_type + properties: + billing_group_id: + type: string + description: Unique identifier prefixed with `bg_`. + pattern: ^bg_[a-zA-Z0-9]+$ + nullable: true + name: + description: Name of the campaign. + type: string + description: + $ref: '#/components/schemas/resource_description' + schedule_type: + $ref: '#/components/schemas/cmp_schedule_type' + target_delivery_date: + description: If `schedule_type` is `target_delivery_date`, provide a targeted delivery date for mail pieces in this campaign. + type: string + format: date-time + nullable: true + send_date: + description: If `schedule_type` is `scheduled_send_date`, provide a date to send this campaign. + type: string + format: date-time + nullable: true + cancel_window_campaign_minutes: + description: A window, in minutes, within which the campaign can be canceled. + type: integer + nullable: true + metadata: + $ref: '#/components/schemas/metadata' + use_type: + $ref: '#/components/schemas/cmp_use_type' + 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 + cmp_id: + type: string + title: Campaign id + description: Unique identifier prefixed with `cmp_`. + pattern: ^cmp_[a-zA-Z0-9]+$ + postcard_size: + type: string + enum: + - 4x6 + - 6x9 + - 6x11 + description: | + Specifies the size of the postcard. Only `4x6` postcards can be sent to international destinations. + default: 4x6 + 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: + mail_type: + $ref: '#/components/schemas/mail_type' + size: + $ref: '#/components/schemas/postcard_size' + 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 + from_attribute: + title: From + description: Must either be an address ID or an inline object with correct address parameters. All addresses will be standardized into uppercase without being modified by verification. + oneOf: + - $ref: '#/components/schemas/adr_id' + - $ref: '#/components/schemas/inline_address_us' + creative_base: + type: object + properties: + from: + $ref: '#/components/schemas/from_attribute' + description: + $ref: '#/components/schemas/resource_description' + metadata: + $ref: '#/components/schemas/metadata' + address_placement: + type: string + enum: + - top_first_page + - insert_blank_page + - bottom_first_page_center + - bottom_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. + Some values are exclusive to certain customers. Upgrade to the appropriate Print & Mail Edition to gain access. + * `top_first_page` - (default) print address information at the top of your provided first page + * `insert_blank_page` - insert a blank address page at the beginning of your file (you will be charged for the extra page) + * `bottom_first_page_center` - **(exclusive, deprecation planned within a few months)** print address information at the bottom center of your provided first page + * `bottom_first_page` - **(exclusive)** print address information at the bottom of your provided first page + default: top_first_page + card_id: + type: string + description: Unique identifier prefixed with `card_`. + pattern: ^card_[a-zA-Z0-9]+$ + custom_envelope_returned: + type: object + description: A nested custom envelope object containing more information about the custom envelope used or `null` if a custom envelope was not used. + required: + - id + - url + - object + properties: + id: + type: string + description: The unique identifier of the custom envelope used. + maxLength: 40 + url: + type: string + description: The url of the envelope asset used. + object: + type: string + enum: + - envelope + default: envelope + nullable: true + color: + type: boolean + description: Set this key to `true` if you would like to print in color. Set to `false` if you would like to print in black and white. + double_sided: + type: boolean + description: Set this attribute to `true` for double sided printing, or `false` for for single sided printing. Defaults to `true`. + default: true + extra_service: + type: string + enum: + - certified + - certified_return_receipt + - registered + - null + description: | + Add an extra service to your letter. Can only be non-`null` if `mail_type` isn't `usps_standard`. See pricing for extra costs incurred. + * `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: #10 envelope and flat envelope (used for letters over 6 pages single-sided or 12 pages double-sided). You will not be charged for this extra sheet. + * `certified_return_receipt` - request an electronic copy of the recipient's signature to prove delivery of your certified letter + * `registered` - provides tracking and confirmation for international addresses + + Not available for `us_legal` letter size. + nullable: true + letter_details_returned: + 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. + type: array + items: + $ref: '#/components/schemas/buckslip_id' + minItems: 0 + maxItems: 1 + nullable: true + cards: + description: A single-element array containing an existing card id in a string format. See [cards](#tag/Cards) for more information. + type: array + items: + $ref: '#/components/schemas/card_id' + minItems: 0 + maxItems: 1 + nullable: true + custom_envelope: + $ref: '#/components/schemas/custom_envelope_returned' + color: + $ref: '#/components/schemas/color' + 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' + self_mailer_size: + type: string + enum: + - 6x18_bifold + - 11x9_bifold + - 12x9_bifold + - 17.75x9_trifold + 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. + default: 6x18_bifold + self_mailer_details_returned: + 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' + size: + $ref: '#/components/schemas/self_mailer_size' + inside_original_url: + description: The original URL of the `inside` template. + maxLength: 2083 + minLength: 1 + type: string + format: uri + outside_original_url: + description: The original URL of the `outside` template. + maxLength: 2083 + minLength: 1 + type: string + format: uri + returned_resource: + oneOf: + - allOf: + - title: Postcard Creative + required: + - resource_type + - details + properties: + resource_type: + type: string + description: Mailpiece type for the creative + enum: + - postcard + details: + $ref: '#/components/schemas/returned' + - $ref: '#/components/schemas/creative_base' + - allOf: + - title: Letter Creative + required: + - from + - resource_type + - details + properties: + resource_type: + type: string + description: Mailpiece type for the creative + enum: + - letter + details: + $ref: '#/components/schemas/letter_details_returned' + - $ref: '#/components/schemas/creative_base' + - allOf: + - title: Self Mailer Creative + required: + - resource_type + - details + properties: + resource_type: + type: string + description: Mailpiece type for the creative + enum: + - self_mailer + details: + $ref: '#/components/schemas/self_mailer_details_returned' + - $ref: '#/components/schemas/creative_base' + crv_id: + type: string + description: Unique identifier prefixed with `crv_`. + pattern: ^crv_[a-zA-Z0-9]+$ + example: crv_2a3b096c409b32c + campaign_item: + allOf: + - $ref: '#/components/schemas/campaign_writable' + - type: object + required: + - id + - name + - description + - schedule_type + - use_type + - is_draft + - creatives + - uploads + - auto_cancel_if_ncoa + - date_created + - date_modified + - object + properties: + id: + $ref: '#/components/schemas/cmp_id' + is_draft: + description: Whether or not the campaign is still a draft. + type: boolean + default: true + creatives: + description: An array of creatives that have been associated with this campaign. + type: array + uploads: + description: A single-element array containing the upload object that is assocated with this campaign. + type: array + minItems: 0 + maxItems: 1 + object: + type: string + description: Value is resource type. + enum: + - campaign + default: campaign + date_created: + $ref: '#/components/schemas/date_created' + date_modified: + $ref: '#/components/schemas/date_modified' + deleted: + $ref: '#/components/schemas/deleted' + campaign_list: + type: array + description: Array of campaigns associated with the creative ID + items: + $ref: '#/components/schemas/campaign_item' + example: + - id: cmp_ed76e33e7ac4d0bd + name: My postman Campaign 2 + description: Created via postman again + schedule_type: immediate + send_date: null + target_delivery_date: null + cancel_window_campaign_minutes: null + metadata: {} + use_type: null + is_draft: true + deleted: false + creatives: [] + uploads: [] + auto_cancel_if_ncoa: false + date_created: '2022-07-26T20:20:25.016Z' + date_modified: '2022-07-26T20:20:25.016Z' + object: campaign + creative: + allOf: + - $ref: '#/components/schemas/lob_base' + - $ref: '#/components/schemas/returned_resource' + - type: object + required: + - id + - description + - from + - resource_type + - details + - metadata + - template_preview_urls + - template_previews + - campaigns + - date_created + - date_modified + - object + - deleted + properties: + deleted: + type: boolean + description: Whether the resource has been deleted. + id: + $ref: '#/components/schemas/crv_id' + template_preview_urls: + title: Template Preview URLs + type: object + 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. + template_previews: + title: Template Previews + type: array + items: + type: object + 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. + campaigns: + $ref: '#/components/schemas/campaign_list' + object: + type: string + description: Value is resource type. + enum: + - creative + default: creative + required_address_column_mapping: + title: Required Address Columns + type: object + required: + - name + - address_line1 + - address_city + - address_state + - address_zip + properties: + name: + type: string + nullable: true + default: null + description: The column header from the csv file that should be mapped to the required field `name` + address_line1: + type: string + nullable: true + default: null + description: The column header from the csv file that should be mapped to the required field `address_line1` + address_city: + type: string + nullable: true + default: null + description: The column header from the csv file that should be mapped to the required field `address_city` + address_state: + type: string + nullable: true + default: null + description: The column header from the csv file that should be mapped to the required field `address_state` + address_zip: + type: string + nullable: true + default: null + description: The column header from the csv file that should be mapped to the required field `address_zip` + example: + name: recipient_name + address_line1: primary_line + address_city: city + address_state: state + address_zip: zip_code + description: The mapping of column headers in your file to Lob-required fields for the resource created. See our Campaign Audience Guide for additional details. + optional_address_column_mapping: + title: Optional Address Columns + type: object + required: + - address_line2 + - company + - address_country + properties: + address_line2: + type: string + nullable: true + default: null + description: The column header from the csv file that should be mapped to the optional field "address_line2" + company: + type: string + nullable: true + default: null + description: The column header from the csv file that should be mapped to the optional field "company" + address_country: + type: string + nullable: true + default: null + description: The column header from the csv file that should be mapped to the optional field "address_country" + example: + address_line2: secondary_line + company: company + address_country: country, + description: The mapping of column headers in your file to Lob-optional fields for the resource created. See our Campaign Audience Guide for additional details. + uploads_metadata: + title: Metadata + type: object + required: + - columns + properties: + columns: + type: array + description: The list of column names from the csv file which you want associated with each of your mailpieces + default: [] + items: type: string - enum: - - upper - - proper - default: upper - 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`. - required: false - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/us_verifications_writable' - examples: - basic: - value: - primary_line: 210 King Street - city: San Francisco - state: CA - zip_code: '94107' - full_payload: - value: - recipient: Walgreens - primary_line: Ave Wilson Churchill 123 - secondary_line: '' - urbanization: URB FAIR OAKS - city: RIO PIEDRAS - state: PR - zip_code: '00926' - single_line: - value: - address: 210 King Street 94107 - test: - value: - primary_line: po box - zip_code: '11111' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/us_verifications_writable' - examples: - basic: - value: - primary_line: 210 King Street - city: San Francisco - state: CA - zip_code: '94107' - full_payload: - value: - recipient: Walgreens - primary_line: Ave Wilson Churchill 123 - secondary_line: '' - urbanization: URB FAIR OAKS - city: RIO PIEDRAS - state: PR - zip_code: '00926' - single_line: - value: - address: 210 King Street 94107 - test: - value: - primary_line: po box - zip_code: '11111' - multipart/form-data: - schema: - $ref: '#/components/schemas/us_verifications_writable' - examples: - basic: - value: - primary_line: 210 King Street - city: San Francisco - state: CA - zip_code: '94107' - full_payload: - value: - recipient: Walgreens - primary_line: Ave Wilson Churchill 123 - secondary_line: '' - urbanization: URB FAIR OAKS - city: RIO PIEDRAS - state: PR - zip_code: '00926' - single_line: - value: - address: 210 King Street 94107 - test: - value: - primary_line: po box - zip_code: '11111' - responses: - '200': - $ref: '#/components/responses/us_verifications' - default: - $ref: '#/components/responses/us_verifications_error' - x-codeSamples: - - lang: Shell - source: | - curl https://api.lob.com/v1/us_verifications \ - -u : \ - -d "primary_line=210 King Street" \ - -d "city=San Francisco" \ - -d "state=CA" \ - -d "zip_code=94107" - label: CURL - - lang: Typescript - source: | - const UsVerification = new USVerificationsApi(av_config); - const verificationData1: UsVerificationsWritable = { - primary_line: '210 King Street', - city: 'San Francisco', - state: 'CA', - zip_code: '94107' - }; + default: + columns: [] + example: + columns: + - recipient_name + description: The list of column headers in your file as an array that you want as metadata associated with each mailpiece. See our Campaign Audience Guide for additional details. + merge_variable_column_mapping: + title: Merge Variable Mapping + type: object + nullable: true + default: null + example: + name: recipient_name + gift_code: code + qr_code_redirect_url: redirect_url + description: The mapping of column headers in your file to the merge variables present in your creative. See our Campaign Audience Guide for additional details.
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. + upload_writable: + type: object + required: + - campaignId + properties: + campaignId: + allOf: + - $ref: '#/components/schemas/cmp_id' + - description: Associated Campaign ID + type: string + example: cmp_1933ad629bae1408 + requiredAddressColumnMapping: + $ref: '#/components/schemas/required_address_column_mapping' + optionalAddressColumnMapping: + $ref: '#/components/schemas/optional_address_column_mapping' + metadata: + $ref: '#/components/schemas/uploads_metadata' + mergeVariableColumnMapping: + $ref: '#/components/schemas/merge_variable_column_mapping' + description: test + upl_id: + type: string + description: Unique identifier prefixed with `upl_`. + pattern: ^upl_[a-zA-Z0-9]+$ + upload_state: + title: Upload State + enum: + - Preprocessing + - Draft + - Ready for Validation + - Validating + - Scheduled + - Cancelled + - Errored + default: Draft + type: string + description: The `state` property on the `upload` object. As the file is processed, the `state` will change from `Ready for Validation` to `Validating` and then will be either `Scheduled` (successfully processed) or `Errored` (Unsuccessfully processed). + upload: + allOf: + - $ref: '#/components/schemas/upload_writable' + - type: object + required: + - id + - accountId + - campaignId + - requiredAddressColumnMapping + - optionalAddressColumnMapping + - metadata + - mergeVariableColumnMapping + - mode + - state + - totalMailpieces + - failedMailpieces + - validatedMailpieces + - bytesProcessed + - dateCreated + - dateModified + properties: + id: + $ref: '#/components/schemas/upl_id' + accountId: + title: Account ID + type: string + description: Account ID that made the request + example: fa9ea650fc7b31a89f92 + mode: + enum: + - test + - live + type: string + description: The environment in which the mailpieces were created. Today, will only be `live`. + failuresUrl: + title: Failures URL + type: string + example: https://www.example.com + description: Url where your campaign mailpiece failures can be retrieved + originalFilename: + title: Original Filename + type: string + example: my_audience.csv + description: Filename of the upload + state: + $ref: '#/components/schemas/upload_state' + totalMailpieces: + title: Total Mailpieces + type: integer + example: 100 + description: Total number of recipients for the campaign + failedMailpieces: + title: Failed Mailpieces + type: integer + example: 5 + description: Number of mailpieces that failed to create + validatedMailpieces: + title: Validated Mailpieces + type: integer + example: 95 + description: Number of mailpieces that were successfully created + bytesProcessed: + title: Bytes Processed + type: integer + example: 17268 + description: Number of bytes processed in your CSV + dateCreated: + title: Date Created + type: string + format: date-time + description: A timestamp in ISO 8601 format of the date the upload was created + dateModified: + title: Date Modified + type: string + format: date-time + description: A timestamp in ISO 8601 format of the date the upload was last modified + campaign: + allOf: + - $ref: '#/components/schemas/lob_base' + - $ref: '#/components/schemas/campaign_writable' + - type: object + required: + - id + - name + - description + - schedule_type + - use_type + - is_draft + - creatives + - uploads + - auto_cancel_if_ncoa + - date_created + - date_modified + - object + properties: + id: + $ref: '#/components/schemas/cmp_id' + is_draft: + description: Whether or not the campaign is still a draft. + type: boolean + default: true + creatives: + description: An array of creatives that have been associated with this campaign. + type: array + items: + $ref: '#/components/schemas/creative' + minItems: 0 + uploads: + description: A single-element array containing the upload object that is assocated with this campaign. + type: array + items: + $ref: '#/components/schemas/upload' + minItems: 0 + maxItems: 1 + object: + type: string + description: Value is resource type. + enum: + - campaign + default: campaign + use_type: + $ref: '#/components/schemas/cmp_use_type' + campaign_updatable: + type: object + properties: + name: + title: Name + type: string + description: + $ref: '#/components/schemas/resource_description' + schedule_type: + $ref: '#/components/schemas/cmp_schedule_type' + target_delivery_date: + description: If `schedule_type` is `target_delivery_date`, provide a targeted delivery date for mail pieces in this campaign. + type: string + format: date-time + send_date: + description: If `schedule_type` is `scheduled_send_date`, provide a date to send this campaign. + type: string + format: date-time + cancel_window_campaign_minutes: + description: A window, in minutes, within which the campaign can be canceled. + type: integer + metadata: + $ref: '#/components/schemas/metadata' + is_draft: + description: Whether or not the campaign is still a draft. Can either be excluded or `false`. + type: boolean + use_type: + $ref: '#/components/schemas/cmp_use_type' + 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 + card_description: + type: string + description: Description of the card. + maxLength: 255 + nullable: true + card_base: + type: object + properties: + description: + $ref: '#/components/schemas/card_description' + size: + description: The size of the card + enum: + - 3.375x2.125 + - 2.125x3.375 + type: string + default: 2.125x3.375 + card: + allOf: + - $ref: '#/components/schemas/lob_base' + - $ref: '#/components/schemas/card_base' + - required: + - description + - type: object + required: + - id + - url + - auto_reorder + - reorder_quantity + - raw_url + - front_original_url + - back_original_url + - thumbnails + - available_quantity + - pending_quantity + - status + - orientation + - threshold_amount + - object + properties: + id: + $ref: '#/components/schemas/card_id' + url: + description: The signed link for the card. + maxLength: 2083 + minLength: 1 + type: string + format: uri + auto_reorder: + description: True if the cards should be auto-reordered. + type: boolean + default: false + reorder_quantity: + description: The number of cards to be reordered. + type: integer + nullable: true + raw_url: + description: The raw URL of the card. + 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 cards. + type: integer + default: 0 + pending_quantity: + description: The pending quantity of cards. + type: integer + default: 0 + status: + title: The status of the card. + enum: + - processed + - rendered + type: string + orientation: + description: The orientation of the card. + enum: + - horizontal + - vertical + type: string + default: horizontal + threshold_amount: + description: The threshold amount of the card + type: integer + default: 0 + object: + description: object + enum: + - card + type: string + default: card + card_editable: + allOf: + - $ref: '#/components/schemas/card_base' + - type: object + required: + - front + properties: + front: + description: A PDF template for the front of the card + oneOf: + - $ref: '#/components/schemas/remote_file_url' + - $ref: '#/components/schemas/local_file_path' + back: + description: A PDF template for the back of the card + oneOf: + - $ref: '#/components/schemas/remote_file_url' + - $ref: '#/components/schemas/local_file_path' + default: https://s3.us-west-2.amazonaws.com/public.lob.com/assets/card_blank_horizontal.pdf + card_updatable: + type: object + properties: + description: + $ref: '#/components/schemas/card_description' + auto_reorder: + description: Allows for auto reordering + type: boolean + reorder_quantity: + description: The quantity of items to be reordered (only required when auto_reorder is true). + type: number + minimum: 10000 + maximum: 10000000 + 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: + id: + $ref: '#/components/schemas/card_id' + deleted: + $ref: '#/components/schemas/deleted' + co_id: + type: string + description: Unique identifier prefixed with `co_`. + pattern: ^co_[a-zA-Z0-9]+$ + card_order: + allOf: + - $ref: '#/components/schemas/lob_base' + - type: object + properties: + id: + $ref: '#/components/schemas/co_id' + card_id: + $ref: '#/components/schemas/card_id' + status: + description: The status of the card order. + enum: + - pending + - printing + - available + - cancelled + - depleted + type: string + inventory: + description: The inventory of the card order. + type: number + default: 0 + quantity_ordered: + description: The quantity of cards ordered + type: number + default: 0 + unit_price: + description: The unit price for the card order. + type: number + default: 0 + cancelled_reason: + description: The reason for cancellation. + type: string + availability_date: + type: string + format: date-time + description: A timestamp in ISO 8601 format of the date the resource was created. + expected_availability_date: + type: string + format: date-time + description: The fixed deadline for the cards to be printed. + card_order_editable: + type: object + required: + - quantity + properties: + quantity: + type: integer + description: The quantity of cards in the order (minimum 10,000). + minimum: 10000 + maximum: 10000000 + editable_no_mailtype: + type: object + properties: + description: + $ref: '#/components/schemas/resource_description' + metadata: + $ref: '#/components/schemas/metadata' + merge_variables: + $ref: '#/components/schemas/merge_variables' + send_date: + $ref: '#/components/schemas/send_date' + 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). + type: string + enum: + - marketing + - operational + - null + nullable: true + check_base: + allOf: + - $ref: '#/components/schemas/editable_no_mailtype' + - type: object + properties: + mail_type: + description: Checks must be sent `usps_first_class` + type: string + enum: + - usps_first_class + default: usps_first_class + memo: + description: Text to include on the memo line of the check. + type: string + maxLength: 40 + nullable: true + check_number: + description: |- + An integer that designates the check number. + If `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`. + A provided `check_number` overrides the defaults. Subsequent checks created with the same `bank_account` will increment from the provided check number. + type: integer + minimum: 1 + maximum: 500000000 + message: + description: Max of 400 characters to be included at the bottom of the check page. + type: string + maxLength: 400 + use_type: + $ref: '#/components/schemas/chk_use_type' + from_us: + type: object + properties: + from: + $ref: '#/components/schemas/address_us' + chk_id: + type: string + description: Unique identifier prefixed with `chk_`. + pattern: ^chk_[a-zA-Z0-9]+$ + to_address_us_chk: + allOf: + - $ref: '#/components/schemas/lob_base' + - type: object + required: + - id + - address_line1 + - address_city + - address_state + - address_zip + anyOf: + - title: address obj with `name` defined + required: + - name + - title: address obj with `company` defined + required: + - company + properties: + id: + $ref: '#/components/schemas/adr_id' + object: + type: string + description: Value is resource type. + enum: + - address + default: address + description: + $ref: '#/components/schemas/resource_description' + name: + type: string + 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 + nullable: true + company: + type: string + 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 + nullable: true + phone: + type: string + description: Must be no longer than 40 characters. + maxLength: 40 + nullable: true + email: + type: string + description: Must be no longer than 100 characters. + maxLength: 100 + nullable: true + address_line1: + type: string + description: The primary number, street name, and directional information. + maxLength: 50 + address_line2: + type: string + description: An optional field containing any information which can't fit into line 1. + maxLength: 50 + nullable: true + address_city: + type: string + maxLength: 200 + address_state: + type: string + description: 2 letter state short-name code + pattern: ^[a-zA-Z]{2}$ + address_zip: + type: string + description: | + Must follow the ZIP format of `12345` or ZIP+4 format of `12345-1234`. + pattern: ^\d{5}(-\d{4})?$ + address_country: + type: string + enum: + - UNITED STATES + description: Full name of country + minLength: 13 + maxLength: 13 + metadata: + $ref: '#/components/schemas/metadata' + recipient_moved: + type: boolean + description: | + Only returned for accounts on certain Print & Mail Editions. Value is `true` if the address was altered because the recipient filed for a National Change of Address Linkage (NCOALink), `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. + nullable: true + example: + id: adr_e68217bd744d65c8 + description: Harry - Office + name: HARRY ZHANG + company: LOB + phone: '5555555555' + email: harry@lob.com + 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: {} + recipient_moved: false + date_created: '2019-08-12T00:16:00.361Z' + date_modified: '2019-08-12T00:16:00.361Z' + object: address + check: + allOf: + - $ref: '#/components/schemas/check_base' + - $ref: '#/components/schemas/from_us' + - type: object + required: + - bank_account + - id + - amount + - to + - url + - carrier + - date_created + - date_modified + - use_type + properties: + id: + $ref: '#/components/schemas/chk_id' + amount: + description: The payment amount to be sent in US dollars. + type: number + format: float + multipleOf: 0.01 + maximum: 999999.99 + bank_account: + $ref: '#/components/schemas/bank_account' + check_bottom_template_id: + allOf: + - description: The unique ID of the HTML template used for the check bottom. + - $ref: '#/components/schemas/tmpl_id' + attachment_template_id: + allOf: + - description: The unique ID of the HTML template used for the attachment. + - $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' + 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' + url: + $ref: '#/components/schemas/signed_link' + to: + $ref: '#/components/schemas/to_address_us_chk' + carrier: + type: string + enum: + - USPS + default: USPS + thumbnails: + type: array + items: + $ref: '#/components/schemas/thumbnail' + expected_delivery_date: + $ref: '#/components/schemas/expected_delivery_date' + tracking_events: + description: An array of tracking_event objects ordered by ascending `time`. Will not be populated for checks created in test mode. + type: array + items: + $ref: '#/components/schemas/tracking_event_normal' + nullable: true + use_type: + $ref: '#/components/schemas/chk_use_type' + status: + $ref: '#/components/schemas/status' + failure_reason: + allOf: + - $ref: '#/components/schemas/failure_reason' + - nullable: true + object: + type: string + description: Value is resource type. + enum: + - check + default: check + date_created: + $ref: '#/components/schemas/date_created' + date_modified: + $ref: '#/components/schemas/date_modified' + deleted: + $ref: '#/components/schemas/deleted' + inline_address_us_chk: + allOf: + - type: object + required: + - address_line1 + - address_city + - address_state + - address_zip + 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 + 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 + nullable: true + company: + $ref: '#/components/schemas/company' + address_line1: + type: string + description: The primary number, street name, and directional information. + maxLength: 50 + address_line2: + type: string + 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 + address_city: + type: string + maxLength: 200 + address_state: + type: string + description: 2 letter state short-name code + pattern: ^[a-zA-Z]{2}$ + address_zip: + type: string + description: | + Must follow the ZIP format of `12345` or ZIP+4 format of `12345-1234`. + pattern: ^\d{5}(-\d{4})?$ + phone: + type: string + description: Must be no longer than 40 characters. + maxLength: 40 + nullable: true + email: + type: string + description: Must be no longer than 100 characters. + maxLength: 100 + nullable: true + address_country: + type: string + enum: + - US + default: US + metadata: + $ref: '#/components/schemas/metadata' + check_input_to: + type: object + 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 Print & Mail Edition, addresses may also be run through [National Change of Address (NCOALink)](#tag/National-Change-of-Address). If an address used does not meet your account’s US Mail Strictness Setting, the request will fail. More about verification of mailing addresses + oneOf: + - $ref: '#/components/schemas/adr_id' + - $ref: '#/components/schemas/inline_address_us_chk' + check_bottom: + description: |- + The artwork to use on the bottom of the check page. - try { - const singleVerified = await UsVerification.verifySingle(verificationData1); - } catch (err: any) { - console.error(err); - } - label: TYPESCRIPT - - lang: Javascript - source: | - Lob.usVerifications.verify({ - primary_line: '210 King Street', - city: 'San Francisco', - state: 'CA', - zip_code: '94107' - }, function (err, res) { - console.log(err, res); - }); - label: NODE - - lang: Ruby - source: | - usVerificationsApi = UsVerificationsApi.new(config) + Notes: + - HTML merge variables should not include delimiting whitespace. + - 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. + - The check bottom will always be printed in black & white. + - Must conform to this template. - verificationData = UsVerificationsWritable.new({ - primary_line: "210 King Street", - city: "San Francisco", - state: "CA", - zip_code: "94017", - }) + 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' + check_editable_props: + allOf: + - $ref: '#/components/schemas/check_base' + - $ref: '#/components/schemas/check_input_to' + - type: object + required: + - bank_account + - to + - from + - amount + - use_type + properties: + from: + 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' + bank_account: + allOf: + - $ref: '#/components/schemas/bank_id_no_description' + - type: string + description: The id for a verified bank account. + amount: + description: The payment amount to be sent in US dollars. Amounts will be rounded to two decimal places. + type: number + format: float + maximum: 999999.99 + 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: - begin - singleVerifiedAddr = usVerificationsApi.verifySingle(verificationData) - rescue => err - p err.message - end - label: RUBY - - lang: Python - source: | - with ApiClient(configuration) as api_client: - api = UsVerificationsApi(api_client) - verification_data_1 = UsVerificationsWritable( - primary_line = "210 King Street", - city = "San Francisco", - state = "CA", - zip_code = "94017", - ) + * RGB or CMYK - try: - single_verified = api.verifySingle(verification_data_1) - except ApiException as e: - print(e) - label: PYTHON - - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\UsVerificationsApi($config, - new GuzzleHttp\Client()); + * square + * minimum size: 100px x 100px - $verificationData = new - OpenAPI\Client\Model\UsVerificationsWritable(array( - 'primary_line' => '210 King Street', - 'city' => 'San Francisco', - 'state' => 'CA', - 'zip_code' => '94017', - )); + * transparent backgrond + * `png` or `jpg` + oneOf: + - type: string + pattern: ^https://[-a-zA-Z0-9@:%._+~#=/]{1,256}.(png|jpg)$ + - type: string + pattern: ^(?!https://)[a-zA-Z0-9@:%._+~#=/]{1,256}.(png|jpg)$ + check_bottom: + $ref: '#/components/schemas/check_bottom' + attachment: + description: |- + A document to include with the check. - try { - $result = $apiInstance->verifySingle($verificationData); - } catch (Exception $e) { - echo $e->getMessage(), PHP_EOL; - } - - lang: Java - source: > - UsVerificationsWritable singleVerify = new - UsVerificationsWritable(); + Notes: + - HTML merge variables should not include delimiting whitespace. + - 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. + - If a PDF is provided, it must be 6 pages or fewer. + - The attachment will be printed double-sided in black & white and will be included in the envelope after the check page. + - Please follow these design guidelines. - singleVerify.setPrimaryLine("210 King Street"); + See pricing 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' + billing_group_id: + $ref: '#/components/schemas/billing_group_id' + use_type: + $ref: '#/components/schemas/chk_use_type' + check_editable: + oneOf: + - title: words at check bottom + allOf: + - required: + - message + - $ref: '#/components/schemas/check_editable_props' + - title: image at check bottom + allOf: + - required: + - check_bottom + - $ref: '#/components/schemas/check_editable_props' + 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: + id: + $ref: '#/components/schemas/chk_id' + deleted: + $ref: '#/components/schemas/deleted' + crv_front: + description: | + The artwork to use as the front of your postcard. - singleVerify.setCity("San Francisco"); + Notes: + - HTML merge variables should not include delimiting whitespace. + - 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`. - singleVerify.setState("CA"); + See [here](#section/HTML-Examples) for HTML examples. + oneOf: + - $ref: '#/components/schemas/tmpl_id' + - $ref: '#/components/schemas/local_file_path' + crv_back: + description: | + The artwork to use as the back of your postcard creative. - singleVerify.setZipCode("94017"); + Notes: + - HTML merge variables should not include delimiting whitespace. + - 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`. + - Be sure to leave room for address and postage information by following the templates provided here: + - 4x6 template + - 6x9 template + - 6x11 template + + + See [here](#section/HTML-Examples) for HTML examples. + oneOf: + - $ref: '#/components/schemas/tmpl_id' + - $ref: '#/components/schemas/local_file_path' + qr_code_campaigns: + type: object + 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 our help center. + required: + - position + - width + properties: + position: + type: string + enum: + - relative + 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'. + top: + type: string + description: Vertical distance (in inches) to place QR code from the top. Only allowed if "bottom" isn't provided. + right: + type: string + description: Horizontal distance (in inches) to place QR code from the right. Only allowed if "left" isn't provided. + left: + type: string + description: Horizontal distance (in inches) to place QR code from the left. Only allowed if "right" isn't provided. + bottom: + type: string + description: Vertical distance (in inches) to place QR code from the bottom. Only allowed if "top" isn't provided. + 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 our help center.. + Note: 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. + width: + type: string + description: The size (in inches) of the QR code with a minimum of 1 inch. All QR codes are generated as a square. + pages: + type: string + description: Specify the pages where the QR code should be stamped in a comma separated format. Your QR code can be printed in the same position on multiple pages. For postcards, the values should either be "front", "back" (for either front or back) or "front,back" (for the QR code to be printed on both sides). For self-mailers 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"). + 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. + required: + - color + properties: + mail_type: + $ref: '#/components/schemas/mail_type' + size: + $ref: '#/components/schemas/postcard_size' + qr_code: + $ref: '#/components/schemas/qr_code_campaigns' + letter_add_on_types: + type: string + enum: + - buckslips + - cards + - custom_envelope + user_provided: + type: string + 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 Print & Mail Edition to gain access. + nullable: true + pattern: ^env_[a-zA-Z0-9]+$ + letter_details_writable: + description: Properties that the letters in your Creative should have. See the `qr_code` attribute below to add a QR code to your creative. + required: + - color + properties: + address_placement: + $ref: '#/components/schemas/address_placement' + add_on_types: + description: An array containing the types of add-ons for the Letter Creative. + type: array + items: + $ref: '#/components/schemas/letter_add_on_types' + minItems: 0 + maxItems: 3 + nullable: true + 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. + type: array + items: + $ref: '#/components/schemas/buckslip_id' + minItems: 0 + maxItems: 1 + nullable: true + cards: + description: A single-element array containing an existing card id in a string format. See [cards](#tag/Cards) for more information. + type: array + items: + $ref: '#/components/schemas/card_id' + minItems: 0 + maxItems: 1 + nullable: true + 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' + crv_file: + description: |- + Notes: + - HTML merge variables should not include delimiting whitespace. + - 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. + - For design specifications, please see our PDF and [HTML](#section/HTML-Examples) templates. + - If a `custom_envelope` is used, follow this template. + - 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. + - Any letters over 6 pages single-sided or 12 pages double-sided will be placed in a flat envelope instead of the standard double window envelope. + See pricing for extra costs incurred. + oneOf: + - $ref: '#/components/schemas/tmpl_id' + - $ref: '#/components/schemas/local_file_path' + crv_inside: + description: | + The artwork to use as the inside of your self mailer creative. + Notes: + - HTML merge variables should not include delimiting whitespace. + - 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`. + - Be sure to leave room for address and postage information by following the templates provided here: + - 6x18 bifold template + - 11x9 bifold template + - 12x9 bifold template - UsVerificationsApi apiInstance = new UsVerificationsApi(config); - try { - apiInstance.verifySingle(singleVerify, null); - } catch (ApiException e) { - e.printStackTrace(); - } - label: JAVA - - lang: Elixir - source: | - Lob.USVerification.verify(%{ - primary_line: "210 King Street", - city: "San Francisco", - state: "CA", - zip_code: "94107" - }) - label: ELIXIR - - lang: CSharp - source: | - UsVerificationsWritable singleVerify = new UsVerificationsWritable( - null, - null, - "210 King Street", - null, - null, - "San Francisco", - "CA", - "94017" - ); + See [here](#section/HTML-Examples) for HTML examples. + 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. + Notes: + - HTML merge variables should not include delimiting whitespace. + - 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`. + - Be sure to leave room for address and postage information by following the templates provided here: + - 6x18 bifold template + - 11x9 bifold template + - 12x9 bifold template - UsVerificationsApi api = new UsVerificationsApi(config); - try { - api.verifySingle(singleVerify, null); - } catch (ApiException e) { - Console.WriteLine(e.ToString()); - } - label: CSHARP - /us_zip_lookups: - post: - operationId: zip_lookup - summary: Lookups - description: Returns information about a ZIP code - tags: - - Zip Lookups - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/zip5' - example: - zip_code: '94107' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/zip5' - example: - zip_code: '94107' - multipart/form-data: - schema: - $ref: '#/components/schemas/zip5' - example: - zip_code: '94107' - responses: - '200': - $ref: '#/components/responses/zip_lookups' - default: - $ref: '#/components/responses/zip_lookups_error' - x-codeSamples: - - lang: Shell - source: | - curl https://api.lob.com/v1/us_zip_lookups \ - -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \ - -d "zip_code=94107" - label: CURL - - lang: Typescript - source: | - const ZipLookup = new ZipLookupsApi(av_config); - const zipRequest : ZipEditable = { - zip_code: '07090' - } - try { - const zipLookup : Zip = await ZipLookup.lookup(zipRequest); - } catch (err: any) { - console.error(err); - } - label: TYPESCRIPT - - lang: Javascript - source: | - Lob.usZipLookups.lookup({ - zip_code: '94107' - }, function (err, res) { - console.log(err, res); - }); - label: NODE - - lang: Ruby - source: | - zipLookupsApi = ZipLookupsApi.new(config) + See [here](#section/HTML-Examples) for HTML examples. + oneOf: + - $ref: '#/components/schemas/tmpl_id' + - $ref: '#/components/schemas/local_file_path' + self_mailer_details_writable: + 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. + required: + - color + properties: + mail_type: + $ref: '#/components/schemas/mail_type' + size: + $ref: '#/components/schemas/self_mailer_size' + qr_code: + $ref: '#/components/schemas/qr_code_campaigns' + creative_writable: + oneOf: + - allOf: + - title: Postcard Creative + required: + - front + - back + - campaign_id + - resource_type + - details + properties: + resource_type: + type: string + description: Mailpiece type for the creative + enum: + - postcard + campaign_id: + $ref: '#/components/schemas/cmp_id' + front: + $ref: '#/components/schemas/crv_front' + back: + $ref: '#/components/schemas/crv_back' + details: + $ref: '#/components/schemas/writable' + - $ref: '#/components/schemas/creative_base' + - allOf: + - title: Letter Creative + required: + - file + - from + - campaign_id + - resource_type + - details + properties: + resource_type: + type: string + description: Mailpiece type for the creative + enum: + - letter + campaign_id: + $ref: '#/components/schemas/cmp_id' + details: + $ref: '#/components/schemas/letter_details_writable' + file: + $ref: '#/components/schemas/crv_file' + - $ref: '#/components/schemas/creative_base' + - allOf: + - title: Self Mailer Creative + required: + - inside + - outside + - campaign_id + - resource_type + - details + properties: + resource_type: + type: string + description: Mailpiece type for the creative + enum: + - self_mailer + campaign_id: + $ref: '#/components/schemas/cmp_id' + inside: + $ref: '#/components/schemas/crv_inside' + outside: + $ref: '#/components/schemas/crv_outside' + details: + $ref: '#/components/schemas/self_mailer_details_writable' + - $ref: '#/components/schemas/creative_base' + recipient_input: + allOf: + - anyOf: + - title: Address object with `city` and `state` + required: + - city + - state + - title: Address object with `zip_code` + required: + - zip_code + - type: object + required: + - recipient + - primary_line + properties: + recipient: + $ref: '#/components/schemas/recipient' + primary_line: + $ref: '#/components/schemas/primary_line_us' + secondary_line: + $ref: '#/components/schemas/secondary_line' + urbanization: + $ref: '#/components/schemas/urbanization' + city: + allOf: + - $ref: '#/components/schemas/city_no_description' + - type: string + description: The name of the city. `city` and `state` are required if no `zip_code` is passed. + state: + type: string + description: The ISO 3166-2 two letter code or subdivision name for the state. `city` and `state` are required if no `zip_code` is passed. + maxLength: 50 + 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' + identity_validation_company: + type: string + description: The name of the company or firm. + nullable: true + maxLength: 500 + company_input: + allOf: + - anyOf: + - title: Address object with `city` and `state` + required: + - city + - state + - title: Address object with `zip_code` + required: + - zip_code + - type: object + required: + - company + - primary_line + properties: + company: + $ref: '#/components/schemas/identity_validation_company' + primary_line: + $ref: '#/components/schemas/primary_line_us' + secondary_line: + $ref: '#/components/schemas/secondary_line' + urbanization: + $ref: '#/components/schemas/urbanization' + city: + allOf: + - $ref: '#/components/schemas/city_no_description' + - type: string + description: The name of the city. `city` and `state` are required if no `zip_code` is passed. + state: + type: string + description: The ISO 3166-2 two letter code or subdivision name for the state. `city` and `state` are required if no `zip_code` is passed. + maxLength: 50 + zip_code: + allOf: + - type: string + description: Required if `city` and `state` are not passed in. If included, must be formatted as a US ZIP or ZIP+4 (e.g. `94107`, `941072282`, `94107-2282`). + - $ref: '#/components/schemas/zip_code' + identity_validation_writable: + oneOf: + - $ref: '#/components/schemas/recipient_input' + - $ref: '#/components/schemas/company_input' + identity_validation_id: + type: string + description: Unique identifier prefixed with `id_validation_`. + pattern: ^id_validation_[a-zA-Z0-9_]+$ + identity_validation_recipient: + type: string + description: The name of the person whose identity is being validated. + nullable: true + maxLength: 500 + recipient_validation: + type: object + properties: + id: + $ref: '#/components/schemas/identity_validation_id' + recipient: + $ref: '#/components/schemas/identity_validation_recipient' + primary_line: + $ref: '#/components/schemas/primary_line_us' + secondary_line: + $ref: '#/components/schemas/secondary_line' + urbanization: + $ref: '#/components/schemas/urbanization' + last_line: + type: string + description: | + Combination of the following applicable `components`: + * City (`city`) + * State (`state`) + * ZIP code (`zip_code`) + * ZIP+4 (`zip_code_plus_4`) + score: + type: number + nullable: true + format: float + description: | + A numerical score between 0 and 100 that represents the likelihood the provided name is associated with a physical address. + default: null + minimum: 0 + maximum: 100 + confidence: + type: string + enum: + - high + - medium + - low + - '' + description: | + Indicates the likelihood the recipient name and address match based on our custom internal calculation. Possible values are: + - `high` — Has a Lob confidence score greater than 70. + - `medium` — Has a Lob confidence score between 40 and 70. + - `low` — Has a Lob confidence score less than 40. + - `""` — No tracking data exists for this address. + object: + type: string + description: Value is resource type. + enum: + - id_validation + default: id_validation + company_validation: + type: object + properties: + id: + $ref: '#/components/schemas/identity_validation_id' + company: + $ref: '#/components/schemas/identity_validation_company' + primary_line: + $ref: '#/components/schemas/primary_line_us' + secondary_line: + $ref: '#/components/schemas/secondary_line' + urbanization: + $ref: '#/components/schemas/urbanization' + last_line: + type: string + description: | + Combination of the following applicable `components`: + * City (`city`) + * State (`state`) + * ZIP code (`zip_code`) + * ZIP+4 (`zip_code_plus_4`) + score: + type: number + nullable: true + format: float + description: | + A numerical score between 0 and 100 that represents the likelihood the provided name is associated with a physical address. + default: null + minimum: 0 + maximum: 100 + confidence: + type: string + enum: + - high + - medium + - low + - '' + description: | + Indicates the likelihood the recipient name and address match based on our custom internal calculation. Possible values are: + - `high` — Has a Lob confidence score greater than 70. + - `medium` — Has a Lob confidence score between 40 and 70. + - `low` — Has a Lob confidence score less than 40. + - `""` — No tracking data exists for this address. + object: + type: string + description: Value is resource type. + enum: + - id_validation + default: id_validation + identity_validation: + oneOf: + - $ref: '#/components/schemas/recipient_validation' + - $ref: '#/components/schemas/company_validation' + intl_autocompletions_writable: + type: object + required: + - address_prefix + - country + properties: + address_prefix: + type: string + description: | + Only accepts numbers and street names in an alphanumeric format. + city: + type: string + description: | + An optional city input used to filter suggestions. Case insensitive and does not match partial abbreviations. + state: + type: string + description: | + An optional state input used to filter suggestions. Case insensitive and does not match partial abbreviations. + zip_code: + type: string + description: | + An optional Zip Code input used to filter suggestions. Matches partial entries. + country: + $ref: '#/components/schemas/country_extended' + geo_ip_sort: + type: boolean + description: | + If `true`, sort suggestions by proximity to the IP set in the `X-Forwarded-For` header. + intl_auto_id: + type: string + description: Unique identifier prefixed with `intl_auto_`. + pattern: ^intl_auto_[a-zA-Z0-9]+$ + intl_suggestions: + type: object + required: + - primary_number_range + - primary_line + - city + - country + - state + - zip_code + properties: + primary_number_range: + type: string + description: | + The primary number range of the address that identifies a building at street level. + primary_line: + type: string + description: | + The primary delivery line (usually the street address) of the address. + Combination of the following applicable `components` (primary number & + secondary information may be missing or inaccurate): + * `primary_number` + * `street_predirection` + * `street_name` + * `street_suffix` + * `street_postdirection` + * `secondary_designator` + * `secondary_number` + * `pmb_designator` + * `pmb_number` + city: + $ref: '#/components/schemas/city' + country: + $ref: '#/components/schemas/country_extended' + state: + $ref: '#/components/schemas/state' + zip_code: + $ref: '#/components/schemas/postal_code' + intl_autocompletions: + type: object + properties: + id: + $ref: '#/components/schemas/intl_auto_id' + suggestions: + type: array + description: | + An array of objects representing suggested addresses. + minItems: 0 + maxItems: 10 + items: + $ref: '#/components/schemas/intl_suggestions' + single_line_address_intl: + type: object + required: + - address + - country + properties: + address: + type: string + description: | + The entire address in one string (e.g., "370 Water St C1N 1C4"). + maxLength: 500 + country: + $ref: '#/components/schemas/country_extended' + intl_verification_writable: + oneOf: + - $ref: '#/components/schemas/multiple_components_intl' + - $ref: '#/components/schemas/single_line_address_intl' + ltr_id: + type: string + description: Unique identifier prefixed with `ltr_`. + pattern: ^ltr_[a-zA-Z0-9]+$ + 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' + return_envelope_returned: + oneOf: + - type: boolean + - type: object + properties: + id: + type: string + description: The unique ID of the Return Envelope. + alias: + type: string + description: A quick reference name for the Return Envelope. + url: + type: string + description: The url of the return envelope. + object: + type: string + description: Value is resource type. + 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 + enum: + - marketing + - operational + - null + nullable: true + letter_generated_base: + allOf: + - $ref: '#/components/schemas/generated' + - $ref: '#/components/schemas/from' + - type: object + required: + - id + - from + - use_type + properties: + url: + $ref: '#/components/schemas/signed_link' + id: + $ref: '#/components/schemas/ltr_id' + 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' + campaign_id: + $ref: '#/components/schemas/campaign_id' + use_type: + $ref: '#/components/schemas/ltr_use_type' + fsc: + type: boolean + description: This is in beta. Contact support@lob.com or your account contact to learn more. Not available for `A4` letter size. + default: false + status: + $ref: '#/components/schemas/status' + failure_reason: + allOf: + - $ref: '#/components/schemas/failure_reason' + - nullable: true + object: + type: string + description: Value is resource type. + enum: + - letter + default: letter + no_extra_service: + allOf: + - type: object + required: + - color + properties: + tracking_events: + description: An array of tracking events ordered by ascending `time`. + type: array + items: + $ref: '#/components/schemas/tracking_event_normal' + cards: + description: An array of cards associated with a specific letter + type: array + items: + $ref: '#/components/schemas/card' + nullable: true + buckslips: + description: An array of buckslip(s) associated with a specific letter + type: array + items: + $ref: '#/components/schemas/buckslip' + nullable: true + return_address: + $ref: '#/components/schemas/return_address' + description: + $ref: '#/components/schemas/resource_description' + metadata: + $ref: '#/components/schemas/metadata' + merge_variables: + $ref: '#/components/schemas/merge_variables' + send_date: + $ref: '#/components/schemas/send_date' + mail_type: + $ref: '#/components/schemas/mail_type' + color: + $ref: '#/components/schemas/color' + double_sided: + $ref: '#/components/schemas/double_sided' + address_placement: + $ref: '#/components/schemas/address_placement' + return_envelope: + $ref: '#/components/schemas/return_envelope_returned' + perforated_page: + type: integer + 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 perforation guide. + nullable: true + custom_envelope: + $ref: '#/components/schemas/custom_envelope_returned' + - $ref: '#/components/schemas/letter_generated_base' + registered: + allOf: + - type: object + required: + - extra_service + - color + properties: + extra_service: + type: string + enum: + - registered + description: | + Add an extra service to your letter. See pricing for extra costs incurred. + * registered - provides tracking and confirmation for international addresses + tracking_number: + type: string + description: |- + The tracking number will appear here when it becomes available. + Dummy tracking numbers are not created in test mode. + nullable: true + tracking_events: + description: Tracking events are not populated for registered letters. + type: array + items: + $ref: '#/components/schemas/tracking_event_normal' + maxItems: 0 + return_address: + $ref: '#/components/schemas/return_address' + description: + $ref: '#/components/schemas/resource_description' + metadata: + $ref: '#/components/schemas/metadata' + merge_variables: + $ref: '#/components/schemas/merge_variables' + send_date: + $ref: '#/components/schemas/send_date' + mail_type: + $ref: '#/components/schemas/mail_type' + color: + $ref: '#/components/schemas/color' + double_sided: + $ref: '#/components/schemas/double_sided' + address_placement: + $ref: '#/components/schemas/address_placement' + return_envelope: + $ref: '#/components/schemas/return_envelope_returned' + perforated_page: + type: integer + 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 perforation guide. + nullable: true + custom_envelope: + $ref: '#/components/schemas/custom_envelope_returned' + - $ref: '#/components/schemas/letter_generated_base' + 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. + 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. - zipRequest = ZipEditable.new({ - zip_code: "94107" - }) + * `Mailed` - Package has been accepted into the carrier network for delivery. - begin - zipLookup = zipLookupsApi.lookup(zipRequest) - rescue => err - p err.message - end - label: RUBY - - lang: Python - source: | - with ApiClient(configuration) as api_client: - api = ZipLookupsApi(api_client) + * `In Transit` - Maps to four distinct stages of transit. - zip_request = ZipEditable( - zip_code = "94107" - ) + * `In Local Area` - Package is at a location near the end destination. - try: - zip_lookup = api.lookup(zip_request) - except ApiException as e: - print(e) - label: PYTHON - - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\ZipLookupsApi($config, new - GuzzleHttp\Client()); + * `Processed for Delivery` - Maps to two distinct stages of delivery. + + * `Pickup Available` - Package is available for pickup at carrier location. + + * `Delivered` - Package has been delivered. + + * `Re-Routed` - Package has been forwarded. + + * `Returned to Sender` - Package is to be returned to sender. + + * `Issue` - Maps to (at least) 15 possible issues, some of which are actionable. + details: + $ref: '#/components/schemas/tracking_event_details' + location: + type: string + 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. + nullable: true + certified: + allOf: + - type: object + required: + - extra_service + - tracking_events + - color + properties: + extra_service: + type: string + enum: + - certified + - certified_return_receipt + description: | + Add an extra service to your letter. See pricing for extra costs incurred. + * `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: #10 envelope and flat envelope (used for letters over 6 pages single-sided or 12 pages double-sided). You will not be charged for this extra sheet. + * `certified_return_receipt` - request an electronic copy of the recipient's signature to prove delivery of your certified letter + tracking_number: + type: string + description: |- + The tracking number will be here immediately upon creation. + Dummy tracking numbers are created in test mode. + nullable: true + tracking_events: + description: An array of certified tracking events ordered by ascending `time`. Not populated in test mode. + type: array + items: + $ref: '#/components/schemas/tracking_event_certified' + return_address: + $ref: '#/components/schemas/return_address' + description: + $ref: '#/components/schemas/resource_description' + metadata: + $ref: '#/components/schemas/metadata' + merge_variables: + $ref: '#/components/schemas/merge_variables' + send_date: + $ref: '#/components/schemas/send_date' + mail_type: + $ref: '#/components/schemas/mail_type' + color: + $ref: '#/components/schemas/color' + double_sided: + $ref: '#/components/schemas/double_sided' + address_placement: + $ref: '#/components/schemas/address_placement' + return_envelope: + $ref: '#/components/schemas/return_envelope_returned' + perforated_page: + type: integer + 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 perforation guide. + nullable: true + custom_envelope: + $ref: '#/components/schemas/custom_envelope_returned' + - $ref: '#/components/schemas/letter_generated_base' + 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_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: + id: + $ref: '#/components/schemas/ltr_id' + deleted: + $ref: '#/components/schemas/deleted' + ltr_file: + description: |- + Notes: + - HTML merge variables should not include delimiting whitespace. + - 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. + - For design specifications, please see our PDF and [HTML](#section/HTML-Examples) templates. + - If a `custom_envelope` is used, follow this template. + - 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. + - Any letters over 6 pages single-sided or 12 pages double-sided will be placed in a flat envelope instead of the standard double window envelope. + + See pricing for extra costs incurred. + oneOf: + - $ref: '#/components/schemas/html_string' + - $ref: '#/components/schemas/tmpl_id' + - $ref: '#/components/schemas/remote_file_url' + - type: string + pattern: ^(?!https://)[a-zA-Z0-9@:%._+~#=/]{1,256}.(html?|pdf)$ + return_envelope_user_provided: + oneOf: + - type: boolean + - type: string + 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. + + To include a return envelope with your letter, set to `true` and specify the `perforated_page`. See pricing for extra costs incurred. + default: false + ltr_size: + type: string + enum: + - us_letter + - us_legal + 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. + + Please 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. + default: us_letter + letter_editable: + allOf: + - $ref: '#/components/schemas/input_to' + - $ref: '#/components/schemas/input_from' + - $ref: '#/components/schemas/editable' + - type: object + required: + - to + - from + - file + - color + - use_type + properties: + file: + $ref: '#/components/schemas/ltr_file' + extra_service: + $ref: '#/components/schemas/extra_service' + 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. + type: array + items: + $ref: '#/components/schemas/card_id' + minItems: 0 + maxItems: 1 + nullable: true + mail_type: + $ref: '#/components/schemas/mail_type' + color: + allOf: + - $ref: '#/components/schemas/color' + - default: false + double_sided: + $ref: '#/components/schemas/double_sided' + address_placement: + $ref: '#/components/schemas/address_placement' + return_envelope: + $ref: '#/components/schemas/return_envelope_user_provided' + perforated_page: + type: integer + 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 perforation guide. + nullable: true + custom_envelope: + $ref: '#/components/schemas/user_provided' + billing_group_id: + $ref: '#/components/schemas/billing_group_id' + qr_code: + $ref: '#/components/schemas/qr_code' + use_type: + $ref: '#/components/schemas/ltr_use_type' + fsc: + type: boolean + 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. + default: false + size: + $ref: '#/components/schemas/ltr_size' + psc_id: + type: string + description: Unique identifier prefixed with `psc_`. + pattern: ^psc_[a-zA-Z0-9]+$ + postcard_base: + allOf: + - $ref: '#/components/schemas/editable' + - type: object + properties: + size: + $ref: '#/components/schemas/postcard_size' + 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). + type: string + enum: + - marketing + - operational + - null + nullable: true + postcard: + allOf: + - $ref: '#/components/schemas/postcard_base' + - $ref: '#/components/schemas/generated' + - $ref: '#/components/schemas/from_us' + - type: object + required: + - id + - front_template_id + - back_template_id + - url + properties: + id: + $ref: '#/components/schemas/psc_id' + front_template_id: + type: string + 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. + pattern: ^tmpl_[a-zA-Z0-9]+$ + nullable: true + back_template_id: + type: string + 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. + pattern: ^tmpl_[a-zA-Z0-9]+$ + nullable: true + front_template_version_id: + type: string + 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. + pattern: ^vrsn_[a-zA-Z0-9]+$ + nullable: true + back_template_version_id: + type: string + 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. + pattern: ^vrsn_[a-zA-Z0-9]+$ + nullable: true + tracking_events: + description: An array of tracking_event objects ordered by ascending `time`. Will not be populated for postcards created in test mode. + type: array + items: + $ref: '#/components/schemas/tracking_event_normal' + nullable: true + url: + $ref: '#/components/schemas/signed_link' + campaign_id: + $ref: '#/components/schemas/campaign_id' + use_type: + $ref: '#/components/schemas/psc_use_type' + fsc: + type: boolean + description: This is in beta. Contact support@lob.com or your account contact to learn more. Not available for `4x6` or `A5` postcard sizes. + default: false + status: + $ref: '#/components/schemas/status' + failure_reason: + allOf: + - $ref: '#/components/schemas/failure_reason' + - nullable: true + object: + type: string + description: Value is resource type. + enum: + - postcard + default: postcard + 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: + id: + $ref: '#/components/schemas/psc_id' + deleted: + $ref: '#/components/schemas/deleted' + input_from_us: + type: object + 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' + psc_front: + description: | + The artwork to use as the front of your postcard. + Notes: + - HTML merge variables should not include delimiting whitespace. + - 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`. - $zipRequest = new OpenAPI\Client\Model\ZipEditable(array( - "zip_code" => '94107' - )); + See [here](#section/HTML-Examples) for 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' + psc_back: + description: | + The artwork to use as the back of your postcard. + Notes: + - HTML merge variables should not include delimiting whitespace. + - 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`. + - Be sure to leave room for address and postage information by following the templates provided here: + - 4x6 template + - 6x9 template + - 6x11 template - try { - $result = $apiInstance->lookup($zipRequest); - } catch (Exception $e) { - echo $e->getMessage(), PHP_EOL; - } - label: PHP - - lang: Java - source: | - ZipEditable zipEditable = new ZipEditable(); - zipEditable.setZipCode("94107"); - ZipLookupsApi apiInstance = new ZipLookupsApi(config); - try { - Zip response = apiInstance.lookup(zipEditable); - } catch (ApiException e) { - e.printStackTrace(); - } - label: JAVA - - lang: Elixir - source: | - Lob.USZipLookup.lookup(%{ - zip_code: "94107" - }) - label: ELIXIR - - lang: CSharp - source: | - ZipEditable zipEditable = new ZipEditable("94107"); + See [here](#section/HTML-Examples) for 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' + postcard_editable: + allOf: + - $ref: '#/components/schemas/postcard_base' + - $ref: '#/components/schemas/input_to' + - $ref: '#/components/schemas/input_from_us' + - type: object + required: + - to + - front + - back + - use_type + properties: + front: + $ref: '#/components/schemas/psc_front' + back: + $ref: '#/components/schemas/psc_back' + billing_group_id: + $ref: '#/components/schemas/billing_group_id' + qr_code: + $ref: '#/components/schemas/qr_code' + use_type: + $ref: '#/components/schemas/psc_use_type' + fsc: + type: boolean + description: This is in beta. Contact support@lob.com or your account contact to learn more. Not available for `4x6` or `A5` postcard sizes. + default: false + scans: + type: object + properties: + ip_location: + type: string + scan_date: + type: string + qr_code_scans: + allOf: + - type: object + properties: + resource_id: + type: string + description: Unique identifier for each mail piece. + date_created: + $ref: '#/components/schemas/date_created' + number_of_scans: + type: number + description: Number of times the QR Code associated with this mail piece was scanned. + scans: + type: array + description: Detailed scan information associated with each mail piece. + items: + $ref: '#/components/schemas/scans' + domain_response: + type: object + properties: + id: + description: Unique identifier for a domain. + type: string + domain: + description: The registered domain/hostname. + type: string + error_redirect_link: + description: The 404 error redirect link. + type: string + created_at: + description: The date and time the domain was created. + type: string + updated_at: + description: The date and time the domain was last updated. + type: string + domain_delete: + type: object + properties: + id: + description: Unique identifier for a domain. + type: string + deleted: + description: Only returned if the domain was successfully deleted. + type: boolean + domains_response: + type: object + properties: + data: + type: array + description: List of domains. + items: + $ref: '#/components/schemas/domain_response' + domain: + type: string + description: The registered domain/hostname. + error_redirect_link: + type: string + description: The 404 error redirect link. + domains: + type: object + required: + - domain + properties: + domain: + $ref: '#/components/schemas/domain' + error_redirect_link: + $ref: '#/components/schemas/error_redirect_link' + redirect_link: + type: string + description: The original target URL. + link_response: + type: object + properties: + id: + description: Unique identifier prefixed with `lnk_`. + type: string + title: + description: The title of the URL. + type: string + domain_id: + description: A unique identifier for the registered domain. + type: string + redirect_link: + $ref: '#/components/schemas/redirect_link' + short_link: + description: The shortened URL for the associated original URL. + type: string + metadata: + $ref: '#/components/schemas/metadata' + link_delete_response: + type: object + properties: + id: + description: Unique identifier for a link. + type: string + deleted: + description: Only returned if the link was successfully deleted. + type: boolean + link_update: + type: object + required: + - redirect_link + properties: + title: + description: The title of the URL. + type: string + redirect_link: + $ref: '#/components/schemas/redirect_link' + metadata: + $ref: '#/components/schemas/metadata' + links_response: + type: object + properties: + count: + type: integer + description: The number of results in the current response. + limit: + type: integer + description: How many results to return. + offset: + type: integer + description: An integer that designates the offset at which to begin returning results. Defaults to 0. + data: + type: array + description: | + list of links + items: + $ref: '#/components/schemas/link_response' + link_single: + type: object + required: + - redirect_link + properties: + title: + description: The title of the URL. + type: string + redirect_link: + $ref: '#/components/schemas/redirect_link' + domain: + description: The registered domain to be used for the short URL. + type: string + slug: + description: The unique path for the shortened URL, if empty a unique path will be used. + type: string + metadata: + $ref: '#/components/schemas/metadata' + sfm_id: + type: string + description: Unique identifier prefixed with `sfm_`. + pattern: ^sfm_[a-zA-Z0-9]+$ + self_mailer_base: + allOf: + - $ref: '#/components/schemas/editable' + - type: object + properties: + size: + $ref: '#/components/schemas/self_mailer_size' + 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). + type: string + enum: + - marketing + - operational + - null + nullable: true + self_mailer: + allOf: + - $ref: '#/components/schemas/self_mailer_base' + - $ref: '#/components/schemas/generated' + - $ref: '#/components/schemas/from_us' + - type: object + required: + - id + - url + - use_type + properties: + id: + $ref: '#/components/schemas/sfm_id' + outside_template_id: + description: The unique ID of the HTML template used for the outside of the self mailer. + allOf: + - $ref: '#/components/schemas/tmpl_id' + - type: string + nullable: true + inside_template_id: + description: The unique ID of the HTML template used for the inside of the self mailer. + allOf: + - $ref: '#/components/schemas/tmpl_id' + - type: string + nullable: true + outside_template_version_id: + description: The unique ID of the specific version of the HTML template used for the outside of the self mailer. + allOf: + - $ref: '#/components/schemas/vrsn_id' + - type: string + nullable: true + inside_template_version_id: + description: The unique ID of the specific version of the HTML template used for the inside of the self mailer. + allOf: + - $ref: '#/components/schemas/vrsn_id' + - type: string + nullable: true + object: + type: string + description: Value is resource type. + enum: + - self_mailer + default: self_mailer + tracking_events: + description: An array of certified tracking events ordered by ascending `time`. Not populated in test mode. + type: array + items: + $ref: '#/components/schemas/tracking_event_certified' + use_type: + $ref: '#/components/schemas/sfm_use_type' + url: + $ref: '#/components/schemas/signed_link' + fsc: + type: boolean + description: This is in beta. Contact support@lob.com or your account contact to learn more. Not available for `11x9_bifold` self-mailer size. + default: false + status: + $ref: '#/components/schemas/status' + campaign_id: + $ref: '#/components/schemas/campaign_id' + failure_reason: + allOf: + - $ref: '#/components/schemas/failure_reason' + - nullable: true + 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: + id: + $ref: '#/components/schemas/sfm_id' + deleted: + $ref: '#/components/schemas/deleted' + self_mailer_editable: + allOf: + - $ref: '#/components/schemas/self_mailer_base' + - $ref: '#/components/schemas/input_to' + - $ref: '#/components/schemas/input_from_us' + - type: object + required: + - to + - inside + - outside + - use_type + properties: + inside: + description: | + The artwork to use as the inside of your self mailer. - ZipLookupsApi api = new ZipLookupsApi(config); + Notes: + - HTML merge variables should not include delimiting whitespace. + - PDF, PNG, and JPGs must be sized at 6"x18" at 300 DPI, while supplied HTML will be rendered to the specified `size`. + - Be sure to leave room for address and postage information by following the templates provided here: + - 6x18 bifold template + - 12x9 bifold template + - 17.75x9 trifold template - try { - Zip response = api.lookup(zipEditable); - } catch (ApiException e) { - Console.WriteLine(e.ToString()); - } - label: CSHARP - - lang: Go - source: > - var context = context.Background() - context = context.WithValue(context, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) + See [here](#section/HTML-Examples) for 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' + outside: + description: | + The artwork to use as the outside of your self mailer. + Notes: + - HTML merge variables should not include delimiting whitespace. + - PDF, PNG, and JPGs must be sized at 6"x18" at 300 DPI, while supplied HTML will be rendered to the specified `size`. - var apiClient = *lob.NewAPIClient(configuration) + See [here](#section/HTML-Examples) for 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' + billing_group_id: + $ref: '#/components/schemas/billing_group_id' + qr_code: + $ref: '#/components/schemas/qr_code' + use_type: + $ref: '#/components/schemas/sfm_use_type' + fsc: + type: boolean + description: This is in beta. Contact support@lob.com or your account contact to learn more. Not available for `11x9_bifold` self-mailer size. + default: false + snap_pack_id: + type: string + description: Unique identifier prefixed with `ord_`. + pattern: ^ord_[0-9a-f]{26}$ + snap_pack_size: + type: string + enum: + - 8.5x11 + description: Specifies the size of the snap pack. + default: 8.5x11 + snap_pack_base: + allOf: + - $ref: '#/components/schemas/editable' + - type: object + properties: + size: + $ref: '#/components/schemas/snap_pack_size' + 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). + type: string + enum: + - marketing + - operational + - null + nullable: true + snap_pack: + allOf: + - $ref: '#/components/schemas/snap_pack_base' + - $ref: '#/components/schemas/generated' + - $ref: '#/components/schemas/from_us' + - type: object + required: + - id + - url + - use_type + properties: + id: + $ref: '#/components/schemas/snap_pack_id' + outside_template_id: + description: The unique ID of the HTML template used for the outside of the snap pack. + allOf: + - $ref: '#/components/schemas/tmpl_id' + - type: string + nullable: true + inside_template_id: + description: The unique ID of the HTML template used for the inside of the snap pack. + allOf: + - $ref: '#/components/schemas/tmpl_id' + - type: string + nullable: true + outside_template_version_id: + description: The unique ID of the specific version of the HTML template used for the outside of the snap pack. + allOf: + - $ref: '#/components/schemas/vrsn_id' + - type: string + nullable: true + inside_template_version_id: + description: The unique ID of the specific version of the HTML template used for the inside of the snap pack. + allOf: + - $ref: '#/components/schemas/vrsn_id' + - type: string + nullable: true + object: + type: string + description: Value is resource type. + enum: + - snap_pack + default: snap_pack + tracking_events: + description: An array of tracking events ordered by ascending `time`. Not populated in test mode. + type: array + items: + $ref: '#/components/schemas/tracking_event_normal' + use_type: + $ref: '#/components/schemas/snap_pack_use_type' + url: + $ref: '#/components/schemas/signed_link' + fsc: + type: boolean + description: Contact support@lob.com or your account contact to learn more. Not available for snap_pack currently. + default: false + status: + $ref: '#/components/schemas/status' + campaign_id: + $ref: '#/components/schemas/campaign_id' + failure_reason: + allOf: + - $ref: '#/components/schemas/failure_reason' + - nullable: true + color: + $ref: '#/components/schemas/color' + 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: + id: + $ref: '#/components/schemas/snap_pack_id' + deleted: + $ref: '#/components/schemas/deleted' + snap_pack_editable: + allOf: + - $ref: '#/components/schemas/snap_pack_base' + - $ref: '#/components/schemas/input_to' + - $ref: '#/components/schemas/input_from_us' + - type: object + required: + - to + - inside + - outside + - use_type + properties: + inside: + description: | + The artwork to use as the inside of your snap pack. + Notes: + - HTML merge variables should not include delimiting whitespace. + - PDF, PNG, and JPGs must be sized at 8.5"x11" at 300 DPI, while supplied HTML will be rendered to the specified `size`. + - Be sure to leave room for address and postage information by following the template provided here: + - 8.5x11 snap pack template - var zipEditable = *lob.NewZipEditable() - zipEditable.SetZipCode("94107") + See [here](#section/HTML-Examples) for 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' + outside: + description: | + The artwork to use as the outside of your snap pack. + Notes: + - HTML merge variables should not include delimiting whitespace. + - PDF, PNG, and JPGs must be sized at 6"x18" at 300 DPI, while supplied HTML will be rendered to the specified `size`. - resp, _, err := - apiClient.ZipLookupsApi.Lookup(context).ZipEditable(zipEditable).Execute() + See [here](#section/HTML-Examples) for 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' + billing_group_id: + $ref: '#/components/schemas/billing_group_id' + use_type: + $ref: '#/components/schemas/snap_pack_use_type' + color: + allOf: + - $ref: '#/components/schemas/color' + - default: false + qr_code: + $ref: '#/components/schemas/qr_code' + template_html: + type: string + 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: + - [Postcards](#operation/postcard_create) - `front` and `back` + - [Self Mailers](#operation/self_mailer_create) - `inside` and `outside` + - [Letters](#operation/letter_create) - `file` + - [Checks](#operation/check_create) - `check_bottom` and `attachment` + - [Cards](#operation/card_create) - `front` and `back` + If 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}}`. + maxLength: 100000 + engine: + type: string + description: | + The engine used to combine HTML template with merge variables. + * `legacy` - Lob's original engine + * `handlebars` + enum: + - legacy + - handlebars + nullable: true + default: legacy + template_required_vars: + type: array + items: + type: string + description: | + An array of required variables to be used in a template. Only available for `handlebars` templates. + template_version_writable: + type: object + required: + - html + properties: + description: + $ref: '#/components/schemas/resource_description' + html: + $ref: '#/components/schemas/template_html' + engine: + $ref: '#/components/schemas/engine' + required_vars: + $ref: '#/components/schemas/template_required_vars' + template_version: + allOf: + - $ref: '#/components/schemas/template_version_writable' + - $ref: '#/components/schemas/lob_base' + - type: object + required: + - id + properties: + id: + $ref: '#/components/schemas/vrsn_id' + suggest_json_editor: + type: boolean + description: | + Used by frontend, true if the template uses advanced features. + merge_variables: + type: object + description: | + Object representing the keys of every merge variable present in the template. It has one key named 'keys', and its value is an array of strings. + object: + type: string + description: Value is resource type. + enum: + - version + default: version + template_version_updatable: + type: object + properties: + description: + $ref: '#/components/schemas/resource_description' + engine: + $ref: '#/components/schemas/engine' + required_vars: + $ref: '#/components/schemas/template_required_vars' + 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: + id: + $ref: '#/components/schemas/vrsn_id' + deleted: + $ref: '#/components/schemas/deleted' + template: + type: object + required: + - id + - versions + - published_version + properties: + description: + $ref: '#/components/schemas/resource_description' + id: + $ref: '#/components/schemas/tmpl_id' + versions: + type: array + description: An array of all non-deleted [version objects](#tag/Template-Versions) associated with the template. + items: + $ref: '#/components/schemas/template_version' + 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' + object: + type: string + description: Value is resource type. + enum: + - template + default: template + metadata: + $ref: '#/components/schemas/metadata' + date_created: + $ref: '#/components/schemas/date_created' + date_modified: + $ref: '#/components/schemas/date_modified' + deleted: + $ref: '#/components/schemas/deleted' + template_update: + type: object + 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' + 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: + id: + $ref: '#/components/schemas/tmpl_id' + deleted: + $ref: '#/components/schemas/deleted' + template_writable: + type: object + required: + - html + properties: + description: + $ref: '#/components/schemas/resource_description' + html: + $ref: '#/components/schemas/template_html' + metadata: + $ref: '#/components/schemas/metadata' + engine: + $ref: '#/components/schemas/engine' + required_vars: + $ref: '#/components/schemas/template_required_vars' + upload_updatable: + type: object + properties: + originalFilename: + title: Original Filename + type: string + description: Original filename provided when the upload is created. + requiredAddressColumnMapping: + $ref: '#/components/schemas/required_address_column_mapping' + optionalAddressColumnMapping: + $ref: '#/components/schemas/optional_address_column_mapping' + metadata: + $ref: '#/components/schemas/uploads_metadata' + mergeVariableColumnMapping: + $ref: '#/components/schemas/merge_variable_column_mapping' + upload_file: + type: object + required: + - message + - filename + properties: + message: + title: Message + enum: + - File uploaded successfully + type: string + default: File uploaded successfully + filename: + title: Filename + type: string + upload_create_export: + type: object + required: + - message + - exportId + properties: + message: + title: Message + enum: + - Export is processing + type: string + default: Export is processing + exportId: + title: Export ID + type: string + example: ex_2dafd758ed3da9c43 + ex_id: + type: string + description: Unique identifier prefixed with `ex_`. + pattern: ^ex_[a-zA-Z0-9]+$ + us_autocompletions_writable: + type: object + required: + - address_prefix + properties: + address_prefix: + type: string + description: | + Only accepts numbers and street names in an alphanumeric format. + city: + type: string + description: | + An optional city input used to filter suggestions. Case insensitive and does not match partial abbreviations. + state: + type: string + description: | + An optional state input used to filter suggestions. Case insensitive and does not match partial abbreviations. + zip_code: + type: string + description: | + An optional ZIP Code input used to filter suggestions. Matches partial entries. + geo_ip_sort: + type: boolean + description: | + If `true`, sort suggestions by proximity to the IP set in the `X-Forwarded-For` header. + us_auto_id: + type: string + description: Unique identifier prefixed with `us_auto_`. + pattern: ^us_auto_[a-zA-Z0-9]+$ + suggestions: + type: object + required: + - primary_line + - city + - state + - zip_code + properties: + primary_line: + type: string + description: | + The primary delivery line (usually the street address) of the address. + Combination of the following applicable `components` (primary number & + secondary information may be missing or inaccurate): + * `primary_number` + * `street_predirection` + * `street_name` + * `street_suffix` + * `street_postdirection` + * `secondary_designator` + * `secondary_number` + * `pmb_designator` + * `pmb_number` + city: + $ref: '#/components/schemas/city' + 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`). + - $ref: '#/components/schemas/zip_code' + object: + type: string + description: Value is resource type. + enum: + - us_autocompletion + default: us_autocompletion + us_autocompletions: + type: object + properties: + id: + $ref: '#/components/schemas/us_auto_id' + suggestions: + type: array + description: | + An array of objects representing suggested addresses. + minItems: 0 + maxItems: 10 + items: + $ref: '#/components/schemas/suggestions' + object: + type: string + description: Value is resource type. + enum: + - us_autocompletion + default: us_autocompletion + location: + type: object + required: + - latitude + - longitude + properties: + latitude: + type: number + minimum: -90 + maximum: 90 + format: float + 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. + nullable: true + longitude: + type: number + minimum: -180 + maximum: 180 + format: float + 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. + nullable: true + reverse_geocode_id: + type: string + description: Unique identifier prefixed with `us_reverse_geocode_`. + pattern: ^us_reverse_geocode_[a-zA-Z0-9_]+$ + components: + type: object + description: A nested object containing a breakdown of each component of a reverse geocoded response. + required: + - zip_code + - zip_code_plus_4 + properties: + zip_code: + type: string + description: The 5-digit ZIP code + pattern: ^\d{5}$ + zip_code_plus_4: + allOf: + - description: A 4-digit ZIP add-on code + - $ref: '#/components/schemas/zip_code_plus_4' + location_analysis: + type: object + description: A nested object containing a breakdown of the analysis of a reverse geocoded location. + required: + - latitude + - longitude + - distance + properties: + latitude: + type: number + minimum: -90 + maximum: 90 + format: float + 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`). + nullable: true + longitude: + type: number + minimum: -180 + maximum: 180 + format: float + 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`). + nullable: true + distance: + type: number + format: float + description: | + The distance from the input location to this exact zip code in miles. + addresses: + type: object + properties: + components: + $ref: '#/components/schemas/components' + location_analysis: + $ref: '#/components/schemas/location_analysis' + reverse_geocode: + type: object + properties: + id: + $ref: '#/components/schemas/reverse_geocode_id' + addresses: + type: array + description: | + list of addresses + items: + $ref: '#/components/schemas/addresses' + object: + type: string + description: Value is resource type. + enum: + - us_reverse_geocode_lookup + default: us_reverse_geocode_lookup + single_line_address: + type: object + required: + - address + properties: + address: + type: string + 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._ + maxLength: 500 + us_verifications_writable: + oneOf: + - $ref: '#/components/schemas/multiple_components' + - $ref: '#/components/schemas/single_line_address' + zip5: + type: object + required: + - zip_code + properties: + zip_code: + type: string + description: A 5-digit ZIP code. + pattern: ^\d{5}$ + example: '94107' + zip_id: + type: string + description: Unique identifier prefixed with `us_zip_`. + pattern: ^us_zip_[a-zA-Z0-9]+$ + zip_lookup_city: + type: object + required: + - city + - state + - county + - county_fips + - preferred + properties: + city: + $ref: '#/components/schemas/city' + state: + $ref: '#/components/schemas/state' + county: + $ref: '#/components/schemas/county' + county_fips: + $ref: '#/components/schemas/county_fips' + preferred: + type: boolean + description: | + Indicates whether or not the city is the USPS default city (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. + example: true + zip: + allOf: + - $ref: '#/components/schemas/zip5' + - type: object + required: + - id + - cities + - zip_code_type + - object + properties: + id: + $ref: '#/components/schemas/zip_id' + cities: + type: array + items: + $ref: '#/components/schemas/zip_lookup_city' + description: | + An array of city objects containing valid cities for the `zip_code`. Multiple cities will be returned if more than one city is associated with the input ZIP code. + zip_code_type: + $ref: '#/components/schemas/zip_code_type' + object: + type: string + description: Value is resource type. + enum: + - us_zip_lookup + default: us_zip_lookup + postcard_types: + type: string + 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 + self_mailer_types: + type: string + 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 + letter_types: + type: string + 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 + check_types: + type: string + 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 + address_types: + type: string + description: Unique identifier referring to status of address + enum: + - address.created + - address.deleted + bank_account_types: + type: string + description: Unique identifier referring to status of bank account + enum: + - bank_account.created + - bank_account.deleted + - bank_account.verified + event_type: + type: object + required: + - id + - enabled_for_test + - resource + - object + properties: + id: + oneOf: + - $ref: '#/components/schemas/postcard_types' + - $ref: '#/components/schemas/self_mailer_types' + - $ref: '#/components/schemas/letter_types' + - $ref: '#/components/schemas/check_types' + - $ref: '#/components/schemas/address_types' + - $ref: '#/components/schemas/bank_account_types' + enabled_for_test: + type: boolean + description: Value is `true` if the event type is enabled in both the test and live environments and `false` if it is only enabled in the live environment. + resource: + type: string + enum: + - postcards + - self mailers + - letters + - checks + - addresses + - bank accounts + object: + type: string + description: Value is resource type. + enum: + - event_type + default: event_type + events: + type: object + required: + - id + - body + - reference_id + - event_type + - date_created + - object + properties: + id: + type: string + description: Unique identifier prefixed with `evt_`. + pattern: ^evt_[a-zA-Z0-9_]+$ + body: + type: object + description: The body of the associated resource as they were at the time of the event, i.e. the [postcard object](#operation/postcard_retrieve), [the letter object](#operation/letter_retrieve), [the check object](#operation/check_retrieve), [the address object](#operation/address_retrieve), or [the bank account object](#operation/bank_account_retrieve). For `.deleted` events, the body matches the response for the corresponding delete endpoint for that resource (e.g. the [postcard delete response](#operation/postcard_delete)). + reference_id: + description: Unique identifier of the related resource for the event. + type: string + event_type: + $ref: '#/components/schemas/event_type' + date_created: + $ref: '#/components/schemas/date_created' + object: + type: string + description: Value is resource type. + enum: + - event + default: event + parameters: + limit: + in: query + name: limit + required: false + description: How many results to return. + schema: + type: integer + minimum: 1 + default: 10 + maximum: 100 + example: 10 + before_after: + in: query + name: before/after + required: false + description: | + `before` and `after` are both optional but only one of them can be in the query at a time. + schema: + allOf: + - type: object + properties: + before: + type: string + 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. + after: + type: string + 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. + - oneOf: + - required: + - before + - required: + - after + include: + in: query + name: include + description: | + Request that the response include the total count by specifying `include=["total_count"]`. + schema: + type: array + items: + type: string + explode: true + date_created: + in: query + name: 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 ≥, and `lte` is ≤.' + schema: + $ref: '#/components/schemas/date_filter' + style: deepObject + explode: true + metadata: + in: query + name: metadata + description: Filter by metadata key-value pair`. + schema: + $ref: '#/components/schemas/metadata' + style: deepObject + explode: true + offset: + in: query + name: offset + required: false + description: An integer that designates the offset at which to begin returning results. Defaults to 0. + schema: + type: integer + default: 0 + date_modified: + in: query + name: 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 ≥, and `lte` is ≤.' + schema: + $ref: '#/components/schemas/date_filter' + style: deepObject + explode: true + send_date: + in: query + name: 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 ≥, and `lte` is ≤. + schema: + $ref: '#/components/schemas/send_date' + mail_type: + in: query + name: mail_type + description: | + A string designating the mail postage type: * `usps_first_class` - (default) * `usps_standard` - a cheaper option 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. + schema: + $ref: '#/components/schemas/mail_type' + sort_by: + in: query + name: sort_by + description: | + Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both. + schema: + allOf: + - type: object + properties: + date_created: + type: string + enum: + - asc + - desc + send_date: + type: string + enum: + - asc + - desc + - oneOf: + - required: + - date_created + - required: + - send_date + campaign_id: + in: query + name: campaign_id + required: false + 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_`. + schema: + $ref: '#/components/schemas/campaign_id' + status: + in: query + name: status + description: | + A string describing the render status: + * `processed` - the rendering process is currently underway. + * `rendered` - the rendering process has completed successfully. + * `failed` - the rendering process has failed. + schema: + $ref: '#/components/schemas/status' + idem-header: + in: header + name: Idempotency-Key + required: false + description: | + A string of no longer than 256 characters that uniquely identifies this resource. For more help integrating idempotency keys, refer to our implementation guide. + schema: + type: string + maxLength: 256 + example: 026e7634-24d7-486c-a0bb-4a17fd0eebc5 + idem-query: + in: query + name: idempotency_key + required: false + description: | + A string of no longer than 256 characters that uniquely identifies this resource. For more help integrating idempotency keys, refer to our implementation guide. + schema: + type: string + maxLength: 256 + example: 026e7634-24d7-486c-a0bb-4a17fd0eebc5 + lang_spec: + in: header + name: x-lang-output + required: false + description: | + * `native` - Translate response to the native language of the country in the request + * `match` - match the response to the language in the request - if err != nil { - return err - } - label: GO + Default response is in English. + schema: + type: string + enum: + - native + - match + scheduled: + in: query + name: scheduled + description: | + * `true` - only return orders (past or future) where `send_date` is + greater than `date_created` + * `false` - only return orders where `send_date` is equal to `date_created` + schema: + type: boolean + lob-version: + in: header + name: Lob-Version + required: false + 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. + schema: + type: string + example: '2024-01-01' + pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ + responses: + address_error: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' + example: + error: + code: not_found + message: address not found + status_code: 404 + all_addresses: + 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.
If no more addresses are available beyond the current set of returned results, the `next_url` field will be empty. + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/list' + - type: object + properties: + data: + type: array + description: list of addresses + items: + $ref: '#/components/schemas/address' + example: + data: + - id: adr_e68217bd744d65c8 + description: Harry - Office + name: HARRY ZHANG + company: LOB + phone: '5555555555' + email: harry@lob.com + 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: '2019-08-12T00:16:00.361Z' + date_modified: '2019-08-12T00:16:00.361Z' + object: address + - id: adr_asdi2y3riuasasoi + description: Harry - Office + name: Harry Zhang + company: Lob + phone: '5555555555' + email: harry@lob.com + metadata: {} + address_line1: 370 WATER ST + address_line2: '' + address_city: SUMMERSIDE + address_state: PRINCE EDWARD ISLAND + address_zip: C1N 1C4 + address_country: CANADA + date_created: '2019-09-20T00:14:00.361Z' + date_modified: '2019-09-20T00:14:00.361Z' + object: address + object: list + next_url: https://api.lob.com/v1/addresses?limit=2&after=eyJkYXRlT2Zmc2V0IjoiMjAxOS0wOC0wN1QyMTo1OTo0Ni43NjRaIiwiaWRPZmZzZXQiOiJhZHJfODMwYmYwZWFiZGFhYTQwOSJ9 + previous_url: null + count: 2 + post_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' + content: + application/json: + schema: + $ref: '#/components/schemas/address' + examples: + full_us: + value: + id: adr_d3489cd64c791ab5 + description: Harry - Office + name: HARRY ZHANG + company: LOB + phone: '5555555555' + email: harry@lob.com + address_line1: 210 KING ST STE 6100 + address_city: SAN FRANCISCO + address_state: CA + address_zip: '94107' + address_country: UNITED STATES + metadata: {} + date_created: '2017-09-05T17:47:53.767Z' + date_modified: '2017-09-05T17:47:53.767Z' + object: address + full_intl: + value: + id: adr_b9f49f464c836203 + description: Harry - Office + name: HARRY ZHANG + company: LOB + phone: '5555555555' + email: harry@lob.com + address_line1: 370 WATER ST + address_city: SUMMERSIDE + address_state: PRINCE EDWARD ISLAND + address_zip: C1N 1C4 + address_country: CANADA + metadata: {} + date_created: '2021-11-29T20:55:46.843Z' + date_modified: '2021-11-29T20:56:46.843Z' + object: address + ncoa_us_live: + value: + id: adr_d3489cd64c791ab5 + description: Harry - Office + name: HARRY ZHANG + company: LOB + phone: '5555555555' + email: harry@lob.com + address_line1: ████ + address_line2: ████ + address_city: SAN FRANCISCO + address_state: CA + address_zip: '94107' + address_country: UNITED STATES + metadata: {} + date_created: '2017-09-05T17:47:53.767Z' + date_modified: '2017-09-05T17:47:53.767Z' + recipient_moved: true + inline: false + object: address + ncoa_us_test: + value: + id: adr_e463565030210e12 + description: null + name: TEST KEYS DO NOT VERIFY ADDRESSES + company: null + phone: null + email: null + address_line1: ████ + address_line2: ████ + address_city: SAN FRANCISCO + address_state: CA + address_zip: '94107' + address_country: UNITED STATES + metadata: {} + date_created: '2019-12-05T19:39:19.932Z' + date_modified: '2019-12-05T19:39:19.932Z' + recipient_moved: true + inline: false + object: address + address: + description: Returns an address object if a valid identifier was provided. + content: + application/json: + schema: + $ref: '#/components/schemas/address' + address_deleted: + description: Deleted + content: + application/json: + schema: + $ref: '#/components/schemas/address_deletion' + example: + id: adr_123456789 + deleted: true + bank_account_error: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' + example: + error: + code: invalid + message: routing_number is required + status_code: 422 + post_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' + content: + application/json: + schema: + $ref: '#/components/schemas/bank_account' + example: + id: bank_8cad8df5354d33f + signature_url: https://lob-assets.com/letters/asd_asdfghjklqwertyu.pdf?version=45&expires=1234567890&signature=a + description: Test Bank Account + metadata: {} + routing_number: '322271627' + fractional_routing_number: 25-3/440 + check_template: jpm + account_number: '123456789' + account_type: company + signatory: John Doe + bank_name: J.P. MORGAN CHASE BANK, N.A., + bank_city: Columbus + bank_state: OH + bank_zip: '43240' + verified: false + date_created: '2015-11-06T19:24:24.440Z' + date_modified: '2015-11-06T19:24:24.440Z' + object: bank_account + bank_account_deleted: + description: Deleted + content: + application/json: + schema: + $ref: '#/components/schemas/bank_deletion' + example: + id: bank_123456789 + deleted: true + all_bank_accounts: + 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.
If no more bank_accounts are available beyond the current set of returned results, the `next_url` field will be empty. + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/list' + - type: object + properties: + data: + type: array + description: list of bank_accounts + items: + $ref: '#/components/schemas/bank_account' + example: + data: + - id: bank_0e3fb07eba0b35b + signature_url: https://lob-assets.com/letters/asd_asdfghjklqwertyu.pdf?version=45&expires=1234567890&signature=a + description: Example bank account + metadata: {} + routing_number: '122100024' + account_number: '1234564789' + account_type: company + signatory: John Doe + bank_name: JPMORGAN CHASE BANK, NA + verified: true + date_created: '2019-03-30T13:13:22.200Z' + date_modified: '2019-03-30T13:13:23.385Z' + object: bank_account + - id: bank_eba93f7de3c02d9 + description: Example bank account + metadata: {} + routing_number: '122100024' + account_number: '1234564789' + account_type: company + signatory: John Doe + bank_name: JPMORGAN CHASE BANK, NA + verified: true + date_created: '2019-03-30T13:11:06.809Z' + date_modified: '2019-03-30T13:11:07.872Z' + object: bank_account + object: list + next_url: https://api.lob.com/v1/bank_accounts?limit=2&after=eyJkYXRlT2Zmc2V0IjoiMjAxOS0wMy0zMFQxMzoxMTowNi44MDlaIiwiaWRPZmZzZXQiOiJiYW5rX2ViYTkzZjdkZTNjMDJkOSJ9 + previous_url: null + count: 2 + billing_group_list_error: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' + example: + error: + code: not_found + message: billing_group not found + status_code: 404 + billing_group_error: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' + example: + error: + code: invalid + message: message about incorrect parameter + status_code: 422 + post_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' + content: + application/json: + schema: + $ref: '#/components/schemas/billing_group' + example: + id: bg_c94e83ca2cd5121 + name: Marketing Dept + description: Usage group used for the Marketing Dept resource sends + date_created: '2017-11-07T22:56:10.962Z' + date_modified: '2017-11-07T22:56:10.962Z' + object: billing_group + mailpiece_error: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' + example: + error: + code: not_found + message: to address not found + status_code: 404 + booklet_deleted: + description: Deleted + content: + application/json: + schema: + $ref: '#/components/schemas/booklet_deletion' + example: + id: ord_0d6a16a3fff6318ac8f8008dc1 + deleted: true + all_booklets: + 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. + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/list' + - type: object + properties: + data: + type: array + description: list of booklets + items: + $ref: '#/components/schemas/booklet' + example: + data: + - id: ord_0d6a16a3fff6318ac8f8008dc1 + description: April Campaign + 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 + mail_type: usps_first_class + url: https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA + carrier: USPS + tracking_number: null + tracking_events: [] + thumbnails: + - small: https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA + 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 + large: https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg + merge_variables: + name: Harry + size: 8.375x5.375 + pages: 8 + source_material: 60# Gloss Text + expected_delivery_date: '2021-03-24' + date_created: '2021-03-16T18:40:40.504Z' + date_modified: '2021-03-16T18:40:40.504Z' + send_date: '2021-03-16T18:45:40.493Z' + use_type: marketing + fsc: false + object: booklet + - id: ord_851100000f31bb1a872f794cee + description: April Campaign + metadata: {} + to: + id: adr_f9228b743884ff98 + description: null + name: AYA + company: null + phone: null + email: null + address_line1: 2812 PARK RD + address_line2: null + address_city: CHARLOTTE + address_state: NC + address_zip: 28209-1314 + address_country: UNITED STATES + metadata: {} + date_created: '2021-03-16T18:40:40.410Z' + date_modified: '2021-03-16T18:40:40.410Z' + deleted: true + object: address + from: + id: adr_210a8d4b0b76d77b + description: null + name: null + company: LOB + 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: '2018-12-08T03:01:07.651Z' + date_modified: '2018-12-08T03:01:07.651Z' + object: address + mail_type: usps_first_class + url: https://lob-assets.com/order-creatives/ord_851100000f31bb1a872f794cee_comp_a20fd48ba4efda76ee827400d.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA + carrier: USPS + tracking_number: null + tracking_events: [] + thumbnails: + - small: https://lob-assets.com/order-creatives/ord_851100000f31bb1a872f794cee_comp_a20fd48ba4efda76ee827400d_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA + 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 + large: https://lob-assets.com/order-creatives/ord_851100000f31bb1a872f794cee_comp_a20fd48ba4efda76ee827400d_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg + merge_variables: + name: Harry + size: 8.375x5.375 + pages: 8 + source_material: 60# Gloss Text + expected_delivery_date: '2021-03-24' + date_created: '2021-03-16T18:40:40.504Z' + date_modified: '2021-03-16T18:40:40.504Z' + send_date: '2021-03-16T18:45:40.493Z' + use_type: marketing + fsc: false + object: booklet + object: list + next_url: null + previous_url: null + count: 2 + post_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' + content: + application/json: + schema: + $ref: '#/components/schemas/booklet' + example: + id: ord_0d6a16a3fff6318ac8f8008dc1 + description: April Campaign + 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 + mail_type: usps_first_class + url: https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA + carrier: USPS + tracking_number: null + tracking_events: [] + thumbnails: + - small: https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA + 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 + large: https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg + merge_variables: + name: Harry + size: 8.375x5.375 + pages: 8 + source_material: 60# Gloss Text + expected_delivery_date: '2021-03-24' + date_created: '2021-03-16T18:40:40.504Z' + date_modified: '2021-03-16T18:40:40.504Z' + send_date: '2021-03-16T18:45:40.493Z' + use_type: marketing + fsc: false + object: booklet + buckslip_error: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' + example: + error: + code: invalid + message: message about incorrect parameter + status_code: 422 + buckslip_deleted: + description: Deleted the buckslip + content: + application/json: + schema: + $ref: '#/components/schemas/buckslip_deletion' + example: + id: buckslip_123456789 + deleted: true + buckslip_order_error: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' + example: + error: + code: not_found + message: buckslip not found + status_code: 404 + us_verifications_error: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' + example: + error: + code: invalid + message: primary_line is required or address is required + status_code: 422 + bulk_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' + content: + application/json: + schema: + $ref: '#/components/schemas/us_verifications' + example: + addresses: + - id: us_ver_c7cb63d68f8d6 + recipient: LOB.COM + primary_line: 210 KING ST + secondary_line: '' + urbanization: '' + last_line: SAN FRANCISCO CA 94107-1702 + deliverability: deliverable + valid_address: true + components: + primary_number: '210' + street_predirection: '' + street_name: KING + street_suffix: ST + street_postdirection: '' + secondary_designator: '' + secondary_number: '' + pmb_designator: '' + pmb_number: '' + extra_secondary_designator: '' + extra_secondary_number: '' + city: SAN FRANCISCO + state: CA + zip_code: '94107' + zip_code_plus_4: '1702' + zip_code_type: standard + delivery_point_barcode: '941071728506' + address_type: commercial + record_type: street + default_building_address: false + county: SAN FRANCISCO + county_fips: '06075' + carrier_route: C032 + carrier_route_type: city_delivery + po_box_only_flag: 'N' + latitude: 37.77597542841264 + longitude: -122.3929557343685 + deliverability_analysis: + dpv_confirmation: 'Y' + dpv_cmra: 'N' + dpv_vacant: 'N' + dpv_active: 'Y' + dpv_inactive_reason: '' + dpv_throwback: 'N' + dpv_non_delivery_day_flag: 'N' + dpv_non_delivery_day_values: '' + dpv_no_secure_location: 'N' + dpv_door_not_accessible: 'N' + dpv_footnotes: + - AA + - BB + ews_match: false + lacs_indicator: '' + lacs_return_code: '' + suite_return_code: '' + lob_confidence_score: + score: 100 + level: high + object: us_verification + errors: false + intl_verifications_error: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' + example: + error: + code: invalid + message: country is required + status_code: 422 + bulk_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' + content: + application/json: + schema: + $ref: '#/components/schemas/intl_verifications' + example: + addresses: + - id: intl_ver_c7cb63d68f8d6 + recipient: null + primary_line: 370 WATER ST + secondary_line: '' + last_line: SUMMERSIDE PE C1N 1C4 + country: CA + coverage: SUBBUILDING + deliverability: deliverable + status: LV4 + components: + primary_number: '370' + street_name: WATER ST + city: SUMMERSIDE + state: PE + postal_code: C1N 1C4 + object: intl_verification + errors: false + all_campaigns: + 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.
If no more campaigns are available beyond the current set of returned results, the `next_url` field will be empty. + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/list' + - type: object + properties: + data: + type: array + description: list of campaigns + items: + $ref: '#/components/schemas/campaign' + example: + data: + - id: cmp_e05ee61ff80764b + billing_group_id: bg_fe3079dcdd80e5ae + name: My Campaign + description: My Campaign's description + schedule_type: immediate + send_date: null + target_delivery_date: null + cancel_window_campaign_minutes: 60 + metadata: {} + use_type: marketing + is_draft: true + deleted: false + creatives: [] + uploads: [] + auto_cancel_if_ncoa: false + date_created: '2017-09-05T17:47:53.767Z' + date_modified: '2017-09-05T17:47:53.767Z' + object: campaign + object: list + previous_url: null + next_url: null + count: 1 + campaigns_error: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' + example: + error: + code: not_found + message: campaign not found + status_code: 404 + campaign_deleted: + description: Deleted the campaign. + content: + application/json: + 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: + id: + $ref: '#/components/schemas/cmp_id' + deleted: + type: boolean + description: True if the resource has been successfully deleted. + example: + id: cmp_e05ee61ff80764b + deleted: true + card_deleted: + description: Deleted the card + content: + application/json: + schema: + $ref: '#/components/schemas/card_deletion' + example: + id: card_123456789 + deleted: true + card_order_error: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' + example: + error: + code: not_found + message: card not found + status_code: 404 + all_checks: + 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.
If no more checks are available beyond the current set of returned results, the `next_url` field will be empty. + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/list' + - type: object + properties: + data: + type: array + description: list of checks + items: + $ref: '#/components/schemas/check' + example: + data: + - id: chk_0176bf6197100185 + description: Demo Check + metadata: {} + check_number: 12559 + memo: rent + amount: 22.5 + url: https://lob-assets.com/checks/chk_0176bf6197100185.pdf?version=v1&expires=1568239682&signature=aqKV5lmg_ktxzyl-qEwIf8-7DbvcguLO0LrfFcyMrUDDt6hxX_da0MEEpElxKR876VUaZrpHq_i_ayDWrsK3BA + to: + id: adr_bae820679f3f536b + description: Harry - Office + name: HARRY ZHANG + company: LOB + email: harry@lob.com + phone: '5555555555' + address_line1: 210 KING ST STE 6100 + address_line2: '' + address_city: SAN FRANCISCO + address_state: CA + address_zip: 94107-1741 + address_country: UNITED STATES + metadata: {} + date_created: '2018-12-08T03:08:43.446Z' + date_modified: '2018-12-08T03:08:43.446Z' + object: address + recipient_moved: false + from: + id: adr_210a8d4b0b76d77b + name: LEORE AVIDAR + address_line1: 210 KING ST STE 6100 + address_city: SAN FRANCISCO + address_state: CA + address_zip: 94107-1741 + address_country: UNITED STATES + metadata: {} + date_created: '2018-12-08T03:01:07.651Z' + date_modified: '2018-12-08T03:01:07.651Z' + object: address + bank_account: + id: bank_8cad8df5354d33f + description: Test Bank Account + metadata: {} + routing_number: '322271627' + account_number: '123456789' + account_type: individual + signatory: John Doe + bank_name: J.P. MORGAN CHASE BANK, N.A. + verified: true + date_created: '2015-11-06T19:24:24.440Z' + date_modified: '2015-11-06T19:41:28.312Z' + object: bank_account + signature_url: https://lob-assets.com/bank-accounts/asd_asdfghjkqwertyui.pdf?expires=1234567890&signature=aksdf + carrier: USPS + tracking_events: [] + thumbnails: + - small: https://lob-assets.com/checks/chk_0176bf6197100185_thumb_small_1.png?version=v1&expires=1568239682&signature=T8DfMm_mxJJzIPgm8I0lvYY4Z6I8aFjsGsrEAicEqw8Ei_FaOtiGQKGeY16rdugAt8lmS_iX0lveBoG2RgWDDw + medium: https://lob-assets.com/checks/chk_0176bf6197100185_thumb_medium_1.png?version=v1&expires=1568239682&signature=-iJD7C58xOCD8eQ01StqSlw9WbDymL0Ygze9twfTs9s17zQppr2Zx363_Z4bP3ATHNhF3osjHuAxIasI2Wf6DQ + large: https://lob-assets.com/checks/chk_0176bf6197100185_thumb_large_1.png?version=v1&expires=1568239682&signature=VJlOkVDPKZThstdd632r3Grm2WhoyPkC-pffpcePTw1i1NkpAObDSRaItKMOQgeWkAcUud3SH0tYcVOadaNiCw + - small: https://lob-assets.com/checks/chk_0176bf6197100185_thumb_small_2.png?version=v1&expires=1568239682&signature=XpCkOjy2zIKXkuc0s-UAYGNwpD_pgt7c9FKTDUCYbyqXupAg1MV1l2tdqevr0L0LT5FJqrGZH9khD5QRMQTkAA + medium: https://lob-assets.com/checks/chk_0176bf6197100185_thumb_medium_2.png?version=v1&expires=1568239682&signature=sdgnJMzusEfndu7dNmk37eKc0AV7Hmqev6TQAqkCESs5pg7j6dDTsp7v4pnDvhsj8d7SIMcahl1aGiysoom0CA + large: https://lob-assets.com/checks/chk_0176bf6197100185_thumb_large_2.png?version=v1&expires=1568239682&signature=ybe8ovBh8Gf-AWKGRs4CB4XkU-erPVbY66umXARhTiJG2Dg1QlyCb9WmBXWt0tBCwD5NGMl20mHeAgHwecLxBA + expected_delivery_date: '2019-08-16' + mail_type: usps_first_class + date_created: '2019-08-08T19:34:47.571Z' + date_modified: '2019-08-08T19:34:49.612Z' + send_date: '2019-08-08' + message: pancakes are good + object: check + check_bottom_template_id: tmpl_a + attachment_template_id: tmpl_a + check_bottom_template_version_id: vrsn_a + attachment_template_version_id: vrsn_a + merge_variables: {} + use_type: operational + deleted: true + - id: chk_92b9a6714bc0557c + description: Demo Check + metadata: {} + check_number: 12558 + memo: rent + amount: 22.5 + url: https://lob-assets.com/checks/chk_92b9a6714bc0557c.pdf?version=v1&expires=1568239682&signature=jCct5PvzU58Iz2pSo58nf6rgsMRcJfMbUWThmm6lztFl5Vn2Y204b9h7gvw0vJvkDK2ThfaYqaUbWc0KzTpvAg + to: + id: adr_bae820679f3f536b + name: HARRY ZHANG + address_line1: 210 KING ST STE 6100 + address_city: SAN FRANCISCO + address_state: CA + address_zip: 94107-1741 + address_country: UNITED STATES + metadata: {} + date_created: '2018-12-08T03:08:43.446Z' + date_modified: '2018-12-08T03:08:43.446Z' + object: address + from: + id: adr_210a8d4b0b76d77b + name: LEORE AVIDAR + address_line1: 210 KING ST STE 6100 + address_city: SAN FRANCISCO + address_state: CA + address_zip: 94107-1741 + address_country: UNITED STATES + metadata: {} + date_created: '2018-12-08T03:01:07.651Z' + date_modified: '2018-12-08T03:01:07.651Z' + object: address + bank_account: + id: bank_8cad8df5354d33f + description: Test Bank Account + metadata: {} + routing_number: '322271627' + account_number: '123456789' + account_type: individual + signatory: John Doe + bank_name: J.P. MORGAN CHASE BANK, N.A. + verified: true + date_created: '2015-11-06T19:24:24.440Z' + date_modified: '2015-11-06T19:41:28.312Z' + object: bank_account + carrier: USPS + tracking_events: [] + thumbnails: + - small: https://lob-assets.com/checks/chk_92b9a6714bc0557c_thumb_small_1.png?version=v1&expires=1568239682&signature=ublquO_xAdvAkAwGJuOjgZQwcz7c3Ao4NHWHeDVTBEBjcrQr8LavxWEwUc1KU105Zex3SajRQLd6hqJOrDl0Bw + medium: https://lob-assets.com/checks/chk_92b9a6714bc0557c_thumb_medium_1.png?version=v1&expires=1568239682&signature=vHyuOtsanX4HnY_0LNft6ZJ8C67JnbI8ZVCjA2d9nR0Rd6lCl0Nk1s6BAhefbBkzecX9Yp0B8NWN9Q5v1Z4ICw + large: https://lob-assets.com/checks/chk_92b9a6714bc0557c_thumb_large_1.png?version=v1&expires=1568239682&signature=SzCLKJ5m_TKJPLlL9PMw-zW9wo5mVYEK1jCtHwWRwwEaNU2v4Aehy-YHtus3TFJIt8RD2M-0Y3MtCxHwhqSABg + - small: https://lob-assets.com/checks/chk_92b9a6714bc0557c_thumb_small_2.png?version=v1&expires=1568239682&signature=iElagODaOCkF_lCUxIw-lK50GhEU1ar_odmslCazZqD4Fsd_rQLx3M4Q5HzYWp4evfzuCoFvk4oAQVuIAaguAw + medium: https://lob-assets.com/checks/chk_92b9a6714bc0557c_thumb_medium_2.png?version=v1&expires=1568239682&signature=2vwvm_QsfmdtkAa-_F4uk-0yeUPRascyhfwOr-OX1ya9i_8gdFQAxMTrP-FfNBVSYFXeknFm6IUPJHggfgeiBg + large: https://lob-assets.com/checks/chk_92b9a6714bc0557c_thumb_large_2.png?version=v1&expires=1568239682&signature=NQf7tP9F4rP66S16hQ8duFpZSbTjaGBGK61Sr3H5D4CWtRyaPdoQlIpT2Jw-eKRcuYRkDEtQse_oWtL5gPqXDQ + - small: https://lob-assets.com/checks/chk_92b9a6714bc0557c_thumb_small_3.png?version=v1&expires=1568239682&signature=dbjFd44H9TyZsc3d0fqKon5e0GqZ6GA1dT26MH6WnoX8lrQor2CA6sZJ5qmu0Z4SAFlMKAzb-twqN7faLjEbDQ + medium: https://lob-assets.com/checks/chk_92b9a6714bc0557c_thumb_medium_3.png?version=v1&expires=1568239682&signature=vSgwVs7T9E6KKBK7XU-6jRL9i0jvgTqvNxkdRARFf0UNlryJFm8l_t_x5mPH0sCTFZcLp7ouRaR5hhdHC6vZBQ + large: https://lob-assets.com/checks/chk_92b9a6714bc0557c_thumb_large_3.png?version=v1&expires=1568239682&signature=If4tXlN13WYy7JDPpFkWw0HAQpYNJHqi2UstiPHxUA_8IAj6vXORb-22acI124Pd1bR1QSjBHAW1gbiJ0kjiAQ + merge_variables: null + expected_delivery_date: '2019-08-16' + mail_type: usps_first_class + date_created: '2019-08-08T19:34:27.802Z' + date_modified: '2019-08-08T19:34:30.582Z' + send_date: '2019-08-08T19:34:27.802Z' + use_type: operational + object: check + object: list + next_url: https://api.lob.com/v1/checks?limit=2&after=eyJkYXRlT2Zmc2V0IjoiMjAxOS0wOC0wOFQxOTozNDoyNy44MDJaIiwiaWRPZmZzZXQiOiJjaGtfOTJiOWE2NzE0YmMwNTU3YyJ9 + previous_url: null + count: 2 + post_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' + content: + application/json: + schema: + $ref: '#/components/schemas/check' + example: + id: chk_534f10783683daa0 + description: Demo Check + metadata: {} + check_number: 10062 + memo: rent + amount: 22.5 + url: https://lob-assets.com/checks/chk_534f10783683daa0.pdf?expires=1540372221&signature=Ty3IV2bGPEoQfrdraYHlNYTaarnHLXb + to: + id: adr_bae820679f3f536b + description: Harry - Office + name: HARRY ZHANG + company: LOB + email: harry@lob.com + phone: '5555555555' + address_line1: 210 KING ST STE 6100 + address_line2: '' + address_city: SAN FRANCISCO + address_state: CA + address_zip: 94107-1741 + address_country: UNITED STATES + metadata: {} + date_created: '2018-12-08T03:08:43.446Z' + date_modified: '2018-12-08T03:08:43.446Z' + object: address + recipient_moved: false + from: + id: adr_b8fb5acf3a2b55db + name: LEORE AVIDAR + address_line1: 210 KING ST STE 6100 + address_city: SAN FRANCISCO + address_state: CA + address_zip: 94107-1741 + address_country: UNITED STATES + metadata: {} + date_created: '2017-09-05T17:47:53.767Z' + date_modified: '2017-09-05T17:47:53.767Z' + object: address + bank_account: + id: bank_8cad8df5354d33f + description: Test Bank Account + metadata: {} + routing_number: '322271627' + account_number: '123456789' + signatory: John Doe + bank_name: J.P. MORGAN CHASE BANK, N.A. + verified: true + account_type: company + date_created: '2015-11-06T19:24:24.440Z' + date_modified: '2015-11-06T19:41:28.312Z' + object: bank_account + signature_url: https://lob-assets.com/bank-accounts/asd_asdfghjkqwertyui.pdf?expires=1234567890&signature=aksdf + carrier: USPS + tracking_events: [] + thumbnails: + - small: https://lob-assets.com/checks/chk_534f10783683daa0_thumb_small_1.png?expires=1540372221&signature=ShhPpH74wYkNiAj7Il9B6q8ZKkzlGd4 + medium: https://lob-assets.com/checks/chk_534f10783683daa0_thumb_medium_1.png?expires=1540372221&signature=tmIOq6aAyKgzAECp7STj1rvJuMS5Svd + large: https://lob-assets.com/checks/chk_534f10783683daa0_thumb_large_1.png?expires=1540372221&signature=04nLEwE9d2qgQJNgJYWSOgPnU0FZbEv + merge_variables: + name: Harry + expected_delivery_date: '2017-09-12' + mail_type: usps_first_class + date_created: '2017-09-05T17:47:53.896Z' + date_modified: '2017-09-05T17:47:53.896Z' + send_date: '2017-09-05T17:47:53.896Z' + object: check + message: pancakes are good + check_bottom_template_id: tmpl_a + attachment_template_id: tmpl_a + check_bottom_template_version_id: vrsn_a + attachment_template_version_id: vrsn_a + use_type: operational + deleted: true + check_canceled: + description: Deleted + content: + application/json: + schema: + $ref: '#/components/schemas/check_deletion' + example: + id: chk_123456789 + deleted: true + creatives_error: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' + example: + error: + code: not_found + message: creative not found + status_code: 404 + identity_validation_error: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' + example: + error: + code: invalid + message: recipient is required + status_code: 422 + 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' + content: + application/json: + schema: + $ref: '#/components/schemas/identity_validation' + example: + id: id_validation_8a013f3e + recipient: LARRY LOBSTER + primary_line: 210 KING ST. + secondary_line: '' + urbanization: '' + last_line: SAN FRANCISCO CA 94107-1728 + score: 100 + confidence: high + object: id_validation + intl_autocompletions_error: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' + example: + error: + code: invalid + message: address_prefix is required + status_code: 422 + intl_autocompletions: + description: Returns an international autocompletions object. + headers: + ratelimit-limit: + $ref: '#/components/headers/ratelimit-limit' + ratelimit-remaining: + $ref: '#/components/headers/ratelimit-remaining' + ratelimit-reset: + $ref: '#/components/headers/ratelimit-reset' + content: + application/json: + schema: + $ref: '#/components/schemas/intl_autocompletions' + examples: + basic: + value: + id: intl_auto_a3ac97bcfbb2460ab20c + suggestions: + - primary_number_range: '' + primary_line: 340 WATERSTONE PL SE + city: AIRDRIE + state: AB + country: CA + zip_code: T4B 2G7 + - primary_number_range: '' + primary_line: 340 WATT BLVD SW + city: EDMONTON + state: AB + country: CA + zip_code: T6X 1R7 + - primary_number_range: '' + primary_line: 340 WATROUS ST + city: PRINCE GEORGE + state: BC + country: CA + zip_code: V2M 2B6 + - primary_number_range: '' + primary_line: 340 WATERS RD + city: QUALICUM BEACH + state: BC + country: CA + zip_code: V9K 2B8 + - primary_number_range: '' + primary_line: SUITE 340, 1510 WATT DR SW + city: EDMONTON + state: AB + country: CA + zip_code: T6X 2E6 + - primary_number_range: '' + primary_line: WATERFRONT POINTE WEST SUITE 340, 5212 25 AVE NW + city: EDMONTON + state: AB + country: CA + zip_code: T6L 6R7 + - primary_number_range: '' + primary_line: WATERFRONT POINTE EAST SUITE 340, 2520 52 ST NW + city: EDMONTON + state: AB + country: CA + zip_code: T6L 6S2 + - primary_number_range: '' + primary_line: WATERSTONE SUITE 340, 6079 MAYNARD WAY NW + city: EDMONTON + state: AB + country: CA + zip_code: T6R 0S4 + - primary_number_range: '' + primary_line: WATSON APTS. SUITE 340, 5207 39 ST + city: RED DEER + state: AB + country: CA + zip_code: T4N 0Z9 + - primary_number_range: '' + primary_line: WATERS EDGE SUITE 3400..3409, 2600 FERGUSON RD + city: SAANICHTON + state: BC + country: CA + zip_code: V8M 2C1 + object: intl_autocompletion + test: + value: + id: intl_auto_a3ac97bcfbb2460ab20c + suggestions: + - primary_number_range: '' + primary_line: 1 TWIN OAKS CT + city: GREENVILLE + state: SC + country: CA + zip_code: '29615' + - primary_number_range: '' + primary_line: 1 TEVA DR + city: STAR CITY + state: CA + country: CA + zip_code: '91355' + - primary_number_range: '' + primary_line: 1 TELEGRAM AVE + city: ELMONT + state: NY + country: CA + zip_code: '11003' + - primary_number_range: '' + primary_line: 1 TELEGRAM AVE + city: GARDEN CITY + state: KS + country: CA + zip_code: '67846' + - primary_number_range: '' + primary_line: 1 TELEGRAPH HILL RD + city: HOLMDEL + state: NJ + country: CA + zip_code: '07733' + - primary_number_range: '' + primary_line: 1 TELEGRAPH HILL RD S + city: HOLMDEL + state: NJ + country: CA + zip_code: '07733' + - primary_number_range: '' + primary_line: 1 TELEGRAPH HILL BLVD + city: SAN FRANCISCO + state: CA + country: CA + zip_code: '94133' + object: intl_autocompletion + intl_verifications: + 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' + content: + application/json: + schema: + $ref: '#/components/schemas/intl_verification' + examples: + full: + value: + id: intl_ver_c7cb63d68f8d6 + recipient: null + primary_line: 370 WATER ST + secondary_line: '' + last_line: SUMMERSIDE PE C1N 1C4 + country: CA + coverage: SUBBUILDING + deliverability: deliverable + status: LV4 + components: + primary_number: '370' + street_name: WATER ST + city: SUMMERSIDE + state: PE + postal_code: C1N 1C4 + object: intl_verification + test: + value: + id: intl_ver_c7cb63d68f8d6 + recipient: TEST KEYS DO NOT VERIFY ADDRESSES + primary_line: 370 WATER ST + secondary_line: '' + last_line: SUMMERSIDE PE C1N 1C4 + country: CA + coverage: SUBBUILDING + deliverability: deliverable + status: LV4 + components: + primary_number: '370' + street_name: WATER ST + city: SUMMERSIDE + state: PE + postal_code: C1N 1C4 + object: intl_verification + letter_deleted: + description: Deleted + content: + application/json: + schema: + $ref: '#/components/schemas/letter_deletion' + example: + id: ltr_123456789 + deleted: true + all_letters: + 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. + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/list' + - type: object + properties: + data: + type: array + description: list of letters + items: + $ref: '#/components/schemas/letter' + example: + data: + - id: ltr_5ba44b462c79f07c + description: Demo Letter + metadata: {} + to: + id: adr_asdi2y3riuasasoi + description: Harry - Office + name: Harry Zhang + company: Lob + phone: '5555555555' + email: harry@lob.com + metadata: {} + address_line1: 370 WATER ST + address_line2: '' + address_city: SUMMERSIDE + address_state: PRINCE EDWARD ISLAND + address_zip: C1N 1C4 + address_country: CANADA + recipient_moved: false + date_created: '2019-09-20T00:14:00.361Z' + date_modified: '2019-09-20T00:14:00.361Z' + object: address + from: + id: adr_210a8d4b0b76d77b + 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: '2018-12-08T03:01:07.651Z' + date_modified: '2018-12-08T03:01:07.651Z' + object: address + color: true + double_sided: false + address_placement: top_first_page + return_envelope: false + perforated_page: null + extra_service: certified + custom_envelope: null + template_id: tmpl_a + template_version_id: vrsn_a + mail_type: usps_first_class + url: https://lob-assets.com/letters/ltr_5ba44b462c79f07c.pdf?version=v1&expires=1568239830&signature=Ob-DUPLJLM4scWQeCDNadPJ4j33MZw16pykOxwv2us-bA7utTYi6oZ8WrEtBYDBBo09XkapR3gdJf0NEr90xAA + merge_variables: null + carrier: USPS + tracking_number: '92071902358909000011275538' + tracking_events: + - id: evnt_9e84094c9368cfb + type: certified + name: Delivered + details: + event: delivered + description: Package has been delivered. + notes: Delivered, Front Desk/Reception/Mail Room + action_required: false + location: '33408' + time: '2019-10-08T19:41:00Z' + date_created: '2019-10-08T19:41:00Z' + date_modified: '2019-10-08T19:41:00Z' + object: tracking_event + thumbnails: + - small: https://lob-assets.com/letters/ltr_5ba44b462c79f07c_thumb_small_1.png?version=v1&expires=1568239830&signature=xZUmE8rq8wSECHPEb9c37cUDZBzGUO3XK5LsIPZhI6dOXgm6zJEn8_7tKuZ3JWBmvNJNXdTl_ufkNu4avjQUDw + medium: https://lob-assets.com/letters/ltr_5ba44b462c79f07c_thumb_medium_1.png?version=v1&expires=1568239830&signature=H7354Qpcm9S4aXbrMsBe6QJ6lSNi9IWPgMJtLWLi4Kyx9tHF8Mp9YEc_IL9x89Jfw4-yRzKDXA410X4W0PssBQ + large: https://lob-assets.com/letters/ltr_5ba44b462c79f07c_thumb_large_1.png?version=v1&expires=1568239830&signature=54LUIDKZyItA9pnC87d1pJVAuw8bhKLCsMpNWkB3LgdVWxPxxb_c1IyIWAbSR-dyOYEOlDBCc40J4Kns-O_mAg + expected_delivery_date: '2019-08-16' + date_created: '2019-08-08T17:09:14.514Z' + date_modified: '2019-08-08T17:09:16.850Z' + send_date: '2019-08-08' + use_type: marketing + fsc: false + object: letter + - id: ltr_da8267c6a6545cd6 + description: Demo Letter + metadata: {} + to: + id: adr_210a8d4b0b76d77b + 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: '2018-12-08T03:01:07.651Z' + date_modified: '2018-12-08T03:01:07.651Z' + object: address + from: + id: adr_210a8d4b0b76d77b + 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: '2018-12-08T03:01:07.651Z' + date_modified: '2018-12-08T03:01:07.651Z' + object: address + color: true + double_sided: false + address_placement: top_first_page + return_envelope: false + perforated_page: null + extra_service: null + custom_envelope: null + mail_type: usps_first_class + url: https://lob-assets.com/letters/ltr_da8267c6a6545cd6.pdf?version=v1&expires=1568239830&signature=HH-5RnbD4x0eJcnEC9HhqKSvQGsbkjovzvqSKgBijUHKIXwEKQJ4CbYhKs_U2q2A1k20Xefcaw7bfdPKozuqCQ + merge_variables: null + carrier: USPS + tracking_number: null + tracking_events: [] + thumbnails: + - small: https://lob-assets.com/letters/ltr_da8267c6a6545cd6_thumb_small_1.png?version=v1&expires=1568239830&signature=C1Rs83187HpWGhsg_pJIOhDIKlDtC_IgBBxHiocCEzJ8CncJwqrq5yHke-p97Dv7o81G_pfhFmirai589O6DCw + medium: https://lob-assets.com/letters/ltr_da8267c6a6545cd6_thumb_medium_1.png?version=v1&expires=1568239830&signature=gz63l0yi3sK_sXjYfIVdLSvkknJFr_O5TWRulo_iKIgS-PosIl6J0tDR6bx_Tv5Ab_w7DABg3qdKZ846MZ7TCw + large: https://lob-assets.com/letters/ltr_da8267c6a6545cd6_thumb_large_1.png?version=v1&expires=1568239830&signature=4Y1OIymaWkSO3aBIHCeshFAVnF-pDcF2FFqkx_jovaUFuk4FT1SI24L7_POwTRXQHlETMGlzkP_CGgqselRUAA + expected_delivery_date: '2019-08-16' + date_created: '2019-08-08T17:08:12.224Z' + date_modified: '2019-08-08T17:08:13.990Z' + send_date: '2019-08-08T17:08:12.224Z' + cards: null + use_type: marketing + fsc: true + object: letter + object: list + next_url: https://api.lob.com/v1/letters?limit=2&after=eyJkYXRlT2Zmc2V0IjoiMjAxOS0wOC0wOFQxNzowODoxMi4yMjRaIiwiaWRPZmZzZXQiOiJsdHJfZGE4MjY3YzZhNjU0NWNkNiJ9 + previous_url: null + count: 2 + post_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' + 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 + postcard_deleted: + description: Deleted + content: + application/json: + schema: + $ref: '#/components/schemas/postcard_deletion' + example: + id: psc_123456789 + deleted: true + all_postcards: + 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.
If no more postcards are available beyond the current set of returned results, the `next_url` field will be empty. + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/list' + - type: object + properties: + data: + type: array + description: list of postcards + items: + $ref: '#/components/schemas/postcard' + example: + data: + - id: psc_208e45e48d271294 + description: null + metadata: {} + to: + id: adr_210a8d4b0b76d77b + 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: '2018-12-08T03:01:07.651Z' + date_modified: '2018-12-08T03:01:07.651Z' + object: address + url: https://lob-assets.com/postcards/psc_208e45e48d271294.pdf?version=v1&expires=1619218302&signature=NfHHLBSr5tOHA_Z4kij4dKqZG8f3vMDtwvuFVeeF9pV_lylcjLsVVODhNCE5hR6-2slUr6t9WMNsi429Pj7_DA + carrier: USPS + front_template_id: null + back_template_id: null + front_template_version_id: null + back_template_version_id: null + date_created: '2021-03-24T22:51:42.838Z' + date_modified: '2021-03-24T22:51:42.838Z' + send_date: '2021-03-24T22:51:42.838Z' + use_type: marketing + fsc: false + object: postcard + - id: psc_0e03d1ad7d31f151 + description: null + metadata: {} + to: + id: adr_c7cb63d68f8d6 + description: null + name: JANE DOE + company: LOB + phone: '5555555555' + email: jane.doe@lob.com + address_line1: 370 WATER ST + address_line2: '' + address_city: SUMMERSIDE + address_state: PE + address_zip: C1N 1C4 + address_country: CANADA + metadata: {} + date_created: '2018-12-08T03:01:07.651Z' + date_modified: '2018-12-08T03:01:07.651Z' + object: address + recipient_moved: false + from: + id: adr_210a8d4b0b76d77b + 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: '2018-12-08T03:01:07.651Z' + date_modified: '2018-12-08T03:01:07.651Z' + object: address + url: https://lob-assets.com/postcards/psc_208e45e48d271294.pdf?version=v1&expires=1619218302&signature=NfHHLBSr5tOHA_Z4kij4dKqZG8f3vMDtwvuFVeeF9pV_lylcjLsVVODhNCE5hR6-2slUr6t9WMNsi429Pj7_DA + carrier: USPS + front_template_id: null + back_template_id: null + front_template_version_id: null + back_template_version_id: null + tracking_events: [] + size: 6x11 + mail_type: usps_first_class + merge_variables: {} + 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 + expected_delivery_date: '2021-03-30' + date_created: '2021-03-24T22:51:42.838Z' + date_modified: '2021-03-24T22:51:42.838Z' + send_date: '2021-03-24T22:51:42.838Z' + use_type: marketing + fsc: false + object: postcard + object: list + previous_url: null + next_url: null + count: 2 + post_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' + content: + application/json: + schema: + $ref: '#/components/schemas/postcard' + examples: + basic: + value: + id: psc_208e45e48d271294 + description: null + metadata: {} + to: + id: adr_210a8d4b0b76d77b + description: null + name: null + company: LOB + 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: '2018-12-08T03:01:07.651Z' + date_modified: '2018-12-08T03:01:07.651Z' + object: address + url: https://lob-assets.com/postcards/psc_208e45e48d271294.pdf?version=v1&expires=1619218302&signature=NfHHLBSr5tOHA_Z4kij4dKqZG8f3vMDtwvuFVeeF9pV_lylcjLsVVODhNCE5hR6-2slUr6t9WMNsi429Pj7_DA + carrier: USPS + front_template_id: null + back_template_id: null + date_created: '2021-03-24T22:51:42.838Z' + date_modified: '2021-03-24T22:51:42.838Z' + send_date: '2021-03-24T22:51:42.838Z' + use_type: marketing + fsc: false + object: postcard + full: + value: + id: psc_0e03d1ad7d31f151 + description: null + metadata: {} + to: + id: adr_c7cb63d68f8d6 + description: null + name: JANE DOE + company: LOB + phone: '5555555555' + email: jane.doe@lob.com + address_line1: 370 WATER ST + address_line2: '' + address_city: SUMMERSIDE + address_state: PE + address_zip: C1N 1C4 + address_country: CANADA + metadata: {} + date_created: '2018-12-08T03:01:07.651Z' + date_modified: '2018-12-08T03:01:07.651Z' + object: address + recipient_moved: false + from: + id: adr_210a8d4b0b76d77b + 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: '2018-12-08T03:01:07.651Z' + date_modified: '2018-12-08T03:01:07.651Z' + object: address + url: https://lob-assets.com/postcards/psc_208e45e48d271294.pdf?version=v1&expires=1619218302&signature=NfHHLBSr5tOHA_Z4kij4dKqZG8f3vMDtwvuFVeeF9pV_lylcjLsVVODhNCE5hR6-2slUr6t9WMNsi429Pj7_DA + carrier: USPS + front_template_id: tmpl_93c369f06171958 + back_template_id: tmpl_93c369f06171958 + front_template_version_id: vrsn_a83e044941c393b + back_template_version_id: vrsn_a83e044941c393b + tracking_events: [] + size: 6x11 + mail_type: usps_first_class + merge_variables: {} + 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 + expected_delivery_date: '2021-03-30' + date_created: '2021-03-24T22:51:42.838Z' + date_modified: '2021-03-24T22:51:42.838Z' + send_date: '2021-03-24T22:51:42.838Z' + use_type: marketing + fsc: false + object: postcard + self_mailer_deleted: + description: Deleted + content: + application/json: + schema: + $ref: '#/components/schemas/self_mailer_deletion' + example: + id: sfm_123456789 + deleted: true + all_self_mailers: + 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.
If no more self_mailers are available beyond the current set of returned results, the `next_url` field will be empty. + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/list' + - type: object + properties: + data: + type: array + description: list of self_mailers + items: + $ref: '#/components/schemas/self_mailer' + example: + data: + - id: sfm_7239rhwqkrfaskas + description: April Campaign + metadata: {} + to: + id: adr_asdi2y3riuasasoi + description: Harry - Office + name: Harry Zhang + company: Lob + phone: '5555555555' + email: harry@lob.com + metadata: {} + address_line1: 370 WATER ST + address_line2: '' + address_city: SUMMERSIDE + address_state: PRINCE EDWARD ISLAND + address_zip: C1N 1C4 + address_country: CANADA + recipient_moved: false + date_created: '2019-09-20T00:14:00.361Z' + date_modified: '2019-09-20T00:14:00.361Z' + object: address + from: + id: adr_210a8d4b0b76d77b + description: null + name: null + company: LOB + 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: '2018-12-08T03:01:07.651Z' + date_modified: '2018-12-08T03:01:07.651Z' + object: address + url: https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf.pdf?version=v1&expires=1618781264&signature=YP_bCwrgVA2lz1Gr1YVCJN1f-WspUGsH0aJp2ihjfLXU7lDUV12_xRv4uPch0mfWeOOxEqpyP8hGpgvjmQKNAw + outside_template_id: tmpl_a3cb937f26d7eec + inside_template_id: tmpl_a3cb937f26d7eec + inside_template_version_id: vrsn_bfdf70893b00a85 + outside_template_version_id: vrsn_bfdf70893b00a85 + carrier: USPS + tracking_events: [] + thumbnails: + - small: https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_1.png?version=v1&expires=1618781264&signature=A7q5HbRO53sUYYnwGlmP5mTS6ylLE7kS2mYhfcEOdexjyqG7UseK0MD26DppE4Q0aE4u2msDVMxd5ukjMerYCg + 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 + large: https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_1.png?version=v1&expires=1618781264&signature=g2jifhCselPqIj8au6lsbJMNFN8ZX3aM6GkLoAXiHBCS8X5mF9nhVbmO0odpnmwNlV1CWIp-MXVsZkC3NmxqBQ + - small: https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_2.png?version=v1&expires=1618781264&signature=biJY4-ZbNNRydPYg3cZkq7wxjILbPBK_nIVyoyQsg5X5q4jlsa-2fzeMa48V9jprUetsC6WEuYvasHosRfG_DQ + medium: https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_2.png?version=v1&expires=1618781264&signature=xEAX7bURyc8fSphacuo5yb7iVIpT8Xvq05KgMaNQS4r3aCpx0z1p42wbPmW758B5Ae0li1YDYvVyzS7qJIoWAw + large: https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_2.png?version=v1&expires=1618781264&signature=NieHDnoQ7STZUvofHrFt7S987CzIkUJWpaSgpVQPZw-C3_wwTPsIrvxYdXEuFrr6ciTUcxRBFPlE0lurmMkyCA + merge_variables: + name: null + size: 6x18_bifold + mail_type: usps_first_class + expected_delivery_date: '2021-03-24' + date_created: '2021-03-16T18:40:40.504Z' + date_modified: '2021-03-16T18:41:06.691Z' + send_date: '2021-03-16T18:45:40.493Z' + deleted: true + use_type: marketing + fsc: false + object: self_mailer + - id: sfm_8ffbe811dea49dcf + description: April Campaign + metadata: {} + to: + id: adr_f9228b743884ff98 + description: null + name: AYA + company: null + phone: null + email: null + address_line1: 2812 PARK RD + address_line2: null + address_city: CHARLOTTE + address_state: NC + address_zip: 28209-1314 + address_country: UNITED STATES + metadata: {} + date_created: '2021-03-16T18:40:40.410Z' + date_modified: '2021-03-16T18:40:40.410Z' + deleted: true + object: address + from: + id: adr_210a8d4b0b76d77b + description: null + name: null + company: LOB + 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: '2018-12-08T03:01:07.651Z' + date_modified: '2018-12-08T03:01:07.651Z' + object: address + url: https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf.pdf?version=v1&expires=1618781264&signature=YP_bCwrgVA2lz1Gr1YVCJN1f-WspUGsH0aJp2ihjfLXU7lDUV12_xRv4uPch0mfWeOOxEqpyP8hGpgvjmQKNAw + outside_template_id: tmpl_a3cb937f26d7eec + inside_template_id: tmpl_a3cb937f26d7eec + inside_template_version_id: vrsn_bfdf70893b00a85 + outside_template_version_id: vrsn_bfdf70893b00a85 + carrier: USPS + tracking_events: [] + thumbnails: + - small: https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_1.png?version=v1&expires=1618781264&signature=A7q5HbRO53sUYYnwGlmP5mTS6ylLE7kS2mYhfcEOdexjyqG7UseK0MD26DppE4Q0aE4u2msDVMxd5ukjMerYCg + 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 + large: https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_1.png?version=v1&expires=1618781264&signature=g2jifhCselPqIj8au6lsbJMNFN8ZX3aM6GkLoAXiHBCS8X5mF9nhVbmO0odpnmwNlV1CWIp-MXVsZkC3NmxqBQ + - small: https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_2.png?version=v1&expires=1618781264&signature=biJY4-ZbNNRydPYg3cZkq7wxjILbPBK_nIVyoyQsg5X5q4jlsa-2fzeMa48V9jprUetsC6WEuYvasHosRfG_DQ + medium: https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_2.png?version=v1&expires=1618781264&signature=xEAX7bURyc8fSphacuo5yb7iVIpT8Xvq05KgMaNQS4r3aCpx0z1p42wbPmW758B5Ae0li1YDYvVyzS7qJIoWAw + large: https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_2.png?version=v1&expires=1618781264&signature=NieHDnoQ7STZUvofHrFt7S987CzIkUJWpaSgpVQPZw-C3_wwTPsIrvxYdXEuFrr6ciTUcxRBFPlE0lurmMkyCA + merge_variables: + name: null + size: 6x18_bifold + mail_type: usps_first_class + expected_delivery_date: '2021-03-24' + date_created: '2021-03-16T18:40:40.504Z' + date_modified: '2021-03-16T18:41:06.691Z' + send_date: '2021-03-16T18:45:40.493Z' + deleted: true + use_type: marketing + fsc: true + object: self_mailer + object: list + next_url: null + previous_url: null + count: 2 + post_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' + content: + application/json: + schema: + $ref: '#/components/schemas/self_mailer' + example: + id: sfm_8ffbe811dea49dcf + description: April Campaign + metadata: {} + to: + id: adr_bae820679f3f536b + 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-05T17:47:53.767Z' + date_modified: '2017-09-05T17:47:53.767Z' + deleted: true + object: address + from: + id: adr_210a8d4b0b76d77b + 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-05T17:47:53.767Z' + date_modified: '2017-09-05T17:47:53.767Z' + deleted: true + object: address + url: https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA + outside_template_id: tmpl_a3cb937f26d7eec + inside_template_id: tmpl_a3cb937f26d7eec + inside_template_version_id: vrsn_bfdf70893b00a85 + outside_template_version_id: vrsn_bfdf70893b00a85 + carrier: USPS + tracking_events: [] + thumbnails: + - small: https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA + medium: https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_1.png?version=v1&expires=1618512040&signature=ryxN7bsXGtw_GRFSP3Cs3A3IYjxZi3cW9BHDCNgMt6p3nobVmsc_iFHt2e-S7ndAXhhN7nP-MQVov3bt3r37BQ + large: https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg + - small: https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_2.png?version=v1&expires=1618512040&signature=3gTgU7Fd3KoT_vNlQnTGptRps5ZgnkhSnPrAwk7L98higIzSwfKoLvuu_DIpMM48dHbxckKT9waR8euJ4KSDBQ + medium: https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_2.png?version=v1&expires=1618512040&signature=Ue1lw5CMj7KRx6cMQL8xPeazaHCdJzWcACd1w3acuYPnWkVIpSt62OIO7hAtpAQK9xm1dhhlFj0rqRZMdRMMBA + large: https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_2.png?version=v1&expires=1618512040&signature=cICc7HEm1xG_eyM4a_wtvPk2FqoLRmtgGa29kJisWnMIYBL0OkyzG4ZCYGMhp-5cZpJlSpXfTgGKh_Qmeo1TDw + merge_variables: + name: null + size: 6x18_bifold + mail_type: usps_first_class + expected_delivery_date: '2021-03-24' + date_created: '2021-03-16T18:40:40.504Z' + date_modified: '2021-03-16T18:40:40.504Z' + send_date: '2021-03-16T18:45:40.493Z' + use_type: marketing + fsc: false + object: self_mailer + snap_pack_deleted: + description: Deleted + content: + application/json: + schema: + $ref: '#/components/schemas/snap_pack_deletion' + example: + id: ord_0d6a16a3fff6318ac8f8008dc1 + deleted: true + all_snap_packs: + 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.
If no more snap_packs are available beyond the current set of returned results, the `next_url` field will be empty. + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/list' + - type: object + properties: + data: + type: array + description: list of snap_packs + items: + $ref: '#/components/schemas/snap_pack' + example: + data: + - id: ord_0d6a16a3fff6318ac8f8008dc1 + description: April Campaign + to: + id: adr_bae820679f3f536b + 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-05T17:47:53.767Z' + date_modified: '2017-09-05T17:47:53.767Z' + deleted: true + object: address + from: + id: adr_210a8d4b0b76d77b + 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-05T17:47:53.767Z' + date_modified: '2017-09-05T17:47:53.767Z' + deleted: true + object: address + url: https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA + outside_template_id: tmpl_a3cb937f26d7eec + inside_template_id: tmpl_a3cb937f26d7eec + inside_template_version_id: vrsn_bfdf70893b00a85 + outside_template_version_id: vrsn_bfdf70893b00a85 + carrier: USPS + tracking_events: [] + thumbnails: + - small: https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA + 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 + large: https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg + - small: https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_small_2.png?version=v1&expires=1618512040&signature=3gTgU7Fd3KoT_vNlQnTGptRps5ZgnkhSnPrAwk7L98higIzSwfKoLvuu_DIpMM48dHbxckKT9waR8euJ4KSDBQ + medium: https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_medium_2.png?version=v1&expires=1618512040&signature=Ue1lw5CMj7KRx6cMQL8xPeazaHCdJzWcACd1w3acuYPnWkVIpSt62OIO7hAtpAQK9xm1dhhlFj0rqRZMdRMMBA + 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 + merge_variables: + name: null + size: 8.5x11 + mail_type: usps_first_class + expected_delivery_date: '2021-03-24' + date_created: '2021-03-16T18:40:40.504Z' + date_modified: '2021-03-16T18:40:40.504Z' + send_date: '2021-03-16T18:45:40.493Z' + use_type: marketing + fsc: false + color: false + object: snap_pack + - id: ord_851100000f31bb1a872f794cee + description: April Campaign + to: + id: adr_f9228b743884ff98 + description: null + name: AYA + company: null + phone: null + email: null + address_line1: 2812 PARK RD + address_line2: null + address_city: CHARLOTTE + address_state: NC + address_zip: 28209-1314 + address_country: UNITED STATES + metadata: {} + date_created: '2021-03-16T18:40:40.410Z' + date_modified: '2021-03-16T18:40:40.410Z' + deleted: true + object: address + from: + id: adr_210a8d4b0b76d77b + description: null + name: null + company: LOB + 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: '2018-12-08T03:01:07.651Z' + date_modified: '2018-12-08T03:01:07.651Z' + object: address + url: https://lob-assets.com/order-creatives/ord_851100000f31bb1a872f794cee_comp_a20fd48ba4efda76ee827400d.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA + outside_template_id: tmpl_a3cb937f26d7eec + inside_template_id: tmpl_a3cb937f26d7eec + inside_template_version_id: vrsn_bfdf70893b00a85 + outside_template_version_id: vrsn_bfdf70893b00a85 + carrier: USPS + tracking_events: [] + thumbnails: + - small: https://lob-assets.com/order-creatives/ord_851100000f31bb1a872f794cee_comp_a20fd48ba4efda76ee827400d_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA + 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 + large: https://lob-assets.com/order-creatives/ord_851100000f31bb1a872f794cee_comp_a20fd48ba4efda76ee827400d_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg + - small: https://lob-assets.com/order-creatives/ord_851100000f31bb1a872f794cee_comp_a20fd48ba4efda76ee827400d_thumb_small_2.png?version=v1&expires=1618512040&signature=3gTgU7Fd3KoT_vNlQnTGptRps5ZgnkhSnPrAwk7L98higIzSwfKoLvuu_DIpMM48dHbxckKT9waR8euJ4KSDBQ + medium: https://lob-assets.com/order-creatives/ord_851100000f31bb1a872f794cee_comp_a20fd48ba4efda76ee827400d_thumb_medium_2.png?version=v1&expires=1618512040&signature=Ue1lw5CMj7KRx6cMQL8xPeazaHCdJzWcACd1w3acuYPnWkVIpSt62OIO7hAtpAQK9xm1dhhlFj0rqRZMdRMMBA + 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 + merge_variables: + name: null + size: 8.5x11 + mail_type: usps_first_class + expected_delivery_date: '2021-03-24' + date_created: '2021-03-16T18:40:40.504Z' + date_modified: '2021-03-16T18:40:40.504Z' + send_date: '2021-03-16T18:45:40.493Z' + use_type: marketing + fsc: false + color: false + object: snap_pack + object: list + next_url: null + previous_url: null + count: 2 + post_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' + content: + application/json: + schema: + $ref: '#/components/schemas/snap_pack' + example: + id: ord_0d6a16a3fff6318ac8f8008dc1 + description: April Campaign + to: + id: adr_bae820679f3f536b + 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-05T17:47:53.767Z' + date_modified: '2017-09-05T17:47:53.767Z' + deleted: true + object: address + from: + id: adr_210a8d4b0b76d77b + 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-05T17:47:53.767Z' + date_modified: '2017-09-05T17:47:53.767Z' + deleted: true + object: address + url: https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA + outside_template_id: tmpl_a3cb937f26d7eec + inside_template_id: tmpl_a3cb937f26d7eec + inside_template_version_id: vrsn_bfdf70893b00a85 + outside_template_version_id: vrsn_bfdf70893b00a85 + carrier: USPS + tracking_events: [] + thumbnails: + - small: https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA + 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 + large: https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg + - small: https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_small_2.png?version=v1&expires=1618512040&signature=3gTgU7Fd3KoT_vNlQnTGptRps5ZgnkhSnPrAwk7L98higIzSwfKoLvuu_DIpMM48dHbxckKT9waR8euJ4KSDBQ + medium: https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_medium_2.png?version=v1&expires=1618512040&signature=Ue1lw5CMj7KRx6cMQL8xPeazaHCdJzWcACd1w3acuYPnWkVIpSt62OIO7hAtpAQK9xm1dhhlFj0rqRZMdRMMBA + 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 + merge_variables: + name: null + size: 8.5x11 + mail_type: usps_first_class + expected_delivery_date: '2021-03-24' + date_created: '2021-03-16T18:40:40.504Z' + date_modified: '2021-03-16T18:40:40.504Z' + send_date: '2021-03-16T18:45:40.493Z' + use_type: marketing + fsc: false + color: false + object: snap_pack + template_error: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' + example: + error: + code: invalid + message: html is required + status_code: 422 + post_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' + content: + application/json: + schema: + $ref: '#/components/schemas/template_version' + example: + id: vrsn_534e339882d2282 + description: Second Version + html: Second HTML for {{name}} + date_created: '2017-11-09T04:49:38.016Z' + date_modified: '2017-11-09T04:49:38.016Z' + object: version + template_version_deleted: + description: Deleted + content: + application/json: + schema: + $ref: '#/components/schemas/template_version_deletion' + example: + value: + id: vrsn_123456789 + deleted: true + all_template_versions: + 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.
If no more template versions are available beyond the current set of returned results, the `next_url` field will be empty. + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/list' + - type: object + properties: + data: + type: array + description: list of template versions + items: + $ref: '#/components/schemas/template_version' + example: + data: + - id: vrsn_4d6ff5d868bf630 + description: Second Version + html: 'Second HTML for ' + date_created: '2017-11-09T05:09:03.665Z' + date_modified: '2018-05-22T22:01:10.479Z' + object: version + - id: vrsn_2a17159c1911919 + description: Test Template + html: 'HTML for ' + date_created: '2017-11-09T05:08:40.004Z' + date_modified: '2018-05-22T22:01:11.309Z' + object: version + object: list + count: 2 + template_deleted: + description: Deleted + content: + application/json: + schema: + $ref: '#/components/schemas/template_deletion' + example: + value: + id: tmpl_123456789 + deleted: true + all_templates: + 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.
If no more templates are available beyond the current set of returned results, the `next_url` field will be empty. + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/list' + - type: object + properties: + data: + type: array + description: list of templates + items: + $ref: '#/components/schemas/template' + example: + data: + - id: tmpl_d5a5a89da9106f8 + description: Test Template + versions: + - id: vrsn_232a02fb8224791 + suggest_json_editor: true + description: Test Template + engine: legacy + html: 'HTML for ' + date_created: '2019-07-27T23:49:01.512Z' + date_modified: '2019-07-27T23:49:01.512Z' + object: version + published_version: + id: vrsn_232a02fb8224791 + suggest_json_editor: false + description: Test Template + engine: handlebars + html: 'HTML for ' + date_created: '2019-07-27T23:49:01.512Z' + date_modified: '2019-07-27T23:49:01.512Z' + object: version + metadata: {} + date_created: '2019-07-27T23:49:01.511Z' + date_modified: '2019-07-27T23:49:01.511Z' + object: template + - id: tmpl_59b2150ae120887 + description: Test Template + versions: + - id: vrsn_2a7eb63ccb795b9 + description: Test Template + html: 'HTML for ' + date_created: '2019-03-29T10:22:34.643Z' + date_modified: '2019-03-29T10:22:34.643Z' + object: version + published_version: + id: vrsn_2a7eb63ccb795b9 + description: Test Template + html: 'HTML for ' + date_created: '2019-03-29T10:22:34.643Z' + date_modified: '2019-03-29T10:22:34.643Z' + object: version + metadata: {} + date_created: '2019-03-29T10:22:34.642Z' + date_modified: '2019-03-29T10:22:34.642Z' + object: template + object: list + previous_url: null + next_url: https://api.lob.com/v1/templates?limit=2&after=eyJkYXRlT2Zmc2V0IjoiMjAxOS0wMy0yOVQxMDoyMjozNC42NDJaIiwiaWRPZmZzZXQiOiJ0bXBsXzU5YjIxNTBhZTEyMDg4NyJ9 + count: 2 + all_uploads: + description: An array of matching uploads. Each entry in the array is a separate upload. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/upload' + example: + - id: upl_71be866e430b11e9 + accountId: fa9ea650fc7b31a89f92 + campaignId: cmp_1933ad629bae1408 + mode: test + failuresUrl: https://www.example.com + originalFilename: my_audience.csv + state: Draft + totalMailpieces: 100 + failedMailpieces: 5 + validatedMailpieces: 95 + bytesProcessed: 17268 + dateCreated: '2017-09-05T17:47:53.767Z' + dateModified: '2017-09-05T17:47:53.767Z' + requiredAddressColumnMapping: + name: recipient_name + address_line1: primary_line + address_city: city + address_state: state + address_zip: zip_code + optionalAddressColumnMapping: + address_line2: secondary_line + company: company + address_country: country + mergeVariableColumnMapping: + gift_code: code + metadata: + columns: + - recipient_name + - zip_code + upload_validation_error: + description: Validation Error + content: + application/json: + schema: + title: HTTPValidationError + type: object + properties: + detail: + title: Detail + type: array + items: + title: ValidationError + required: + - loc + - msg + - type + type: object + properties: + loc: + title: Location + type: array + items: + anyOf: + - type: string + - type: integer + msg: + title: Message + type: string + type: + title: Error Type + type: string + upload_not_found: + description: Not Found Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' + example: + error: + code: not_found + message: upload not found + status_code: 404 + upload_export_error: + description: Create Export Error + content: + application/json: + schema: + type: object + required: + - code + - message + - errors + properties: + code: + description: A conventional HTTP status code + type: number + enum: + - 400 + - 404 + message: + description: A human-readable message with more details about the error + type: string + errors: + description: An array of pre-defined strings that identify an error + type: array + items: + type: string + example: + code: 400 + message: Invalid body, check 'errors' property for more info. + errors: + - type must be a string + feature_flag_disabled: + description: Forbidden Error + content: + application/json: + schema: + type: object + properties: + code: + description: The error code + type: number + message: + type: string + description: Details of the error message with the feature flagged mentioned. + example: + message: 'This feature is not enabled for this account: access_upload_report' + code: 403 + us_autocompletions_error: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' + example: + error: + code: invalid + message: address_prefix is required + status_code: 422 + 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' + content: + application/json: + schema: + $ref: '#/components/schemas/us_autocompletions' + examples: + basic: + value: + id: us_auto_a3ac97bcfbb2460ab20c + suggestions: + - primary_line: 185 BAYSIDE VILLAGE PL + city: SAN FRANCISCO + state: CA + zip_code: '94107' + - primary_line: 185 BRANNAN ST + city: SAN FRANCISCO + state: CA + zip_code: '94107' + - primary_line: 185 BONIFACIO ST + city: SAN FRANCISCO + state: CA + zip_code: '94107' + - primary_line: 185 BLAIR TER + city: SAN FRANCISCO + state: CA + zip_code: '94107' + - primary_line: 185 BLUXOME ST + city: SAN FRANCISCO + state: CA + zip_code: '94107' + - primary_line: 210 KING ST + city: SAN FRANCISCO + state: CA + zip_code: '94107' + - primary_line: 185 BRYANT ST + city: SAN FRANCISCO + state: CA + zip_code: '94107' + object: us_autocompletion + test: + value: + id: us_auto_a3ac97bcfbb2460ab20c + suggestions: + - primary_line: 1 TELEPHONE RD + city: OXFORD + state: AR + zip_code: '72565' + - primary_line: 1 TELEGA PL + city: PALMDALE + state: CA + zip_code: '93550' + - primary_line: 1 TELEGRAM AVE + city: ELMONT + state: NY + zip_code: '11003' + - primary_line: 1 TELEGRAM AVE + city: GARDEN CITY + state: KS + zip_code: '67846' + - primary_line: 1 TELEGRAPH HILL RD + city: HOLMDEL + state: NJ + zip_code: '07733' + - primary_line: 1 TELEGRAPH HILL RD S + city: HOLMDEL + state: NJ + zip_code: '07733' + - primary_line: 1 TELEGRAPH HILL BLVD + city: SAN FRANCISCO + state: CA + zip_code: '94133' + object: us_autocompletion + reverse_geocode_lookups_error: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' + example: + error: + code: invalid + message: latitude is required + status_code: 422 + reverse_geocode_lookups: + 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' + content: + application/json: + schema: + $ref: '#/components/schemas/reverse_geocode' + example: + id: us_reverse_geocode_8a013f3e + addresses: + - components: + zip_code: '94107' + zip_code_plus_4: '1702' + location_analysis: + latitude: 37.78271 + longitude: -122.416202 + distance: 1.32 + - components: + zip_code: '94107' + zip_code_plus_4: '1702' + location_analysis: + latitude: 37.782917 + longitude: -122.416131 + distance: 1.33 + us_verifications: + 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' + content: + application/json: + schema: + $ref: '#/components/schemas/us_verification' + examples: + basic: + value: + id: us_ver_c7cb63d68f8d6 + recipient: LOB.COM + primary_line: 210 KING ST + secondary_line: '' + urbanization: '' + last_line: SAN FRANCISCO CA 94107-1702 + deliverability: deliverable + valid_address: true + components: + primary_number: '210' + street_predirection: '' + street_name: KING + street_suffix: ST + street_postdirection: '' + secondary_designator: '' + secondary_number: '' + pmb_designator: '' + pmb_number: '' + extra_secondary_designator: '' + extra_secondary_number: '' + city: SAN FRANCISCO + state: CA + zip_code: '94107' + zip_code_plus_4: '1702' + zip_code_type: standard + delivery_point_barcode: '941071702108' + address_type: commercial + record_type: street + default_building_address: false + county: SAN FRANCISCO + county_fips: '06075' + carrier_route: C032 + carrier_route_type: city_delivery + po_box_only_flag: 'N' + latitude: 37.77597542841264 + longitude: -122.3929557343685 + deliverability_analysis: + dpv_confirmation: 'Y' + dpv_cmra: 'N' + dpv_vacant: 'N' + dpv_active: 'Y' + dpv_inactive_reason: '' + dpv_throwback: 'N' + dpv_non_delivery_day_flag: 'N' + dpv_non_delivery_day_values: '' + dpv_no_secure_location: 'N' + dpv_door_not_accessible: 'N' + dpv_footnotes: + - AA + - BB + ews_match: false + lacs_indicator: '' + lacs_return_code: '' + suite_return_code: '' + lob_confidence_score: + score: 100 + level: high + object: us_verification + test: + value: + id: us_ver_po_box + recipient: TEST KEYS DO NOT VERIFY ADDRESSES + primary_line: PO BOX 720114 + secondary_line: '' + urbanization: '' + last_line: SAN FRANCISCO CA 94172-0114 + deliverability: deliverable + valid_address: true + components: + primary_number: '720114' + street_predirection: '' + street_name: PO BOX + street_suffix: '' + street_postdirection: '' + secondary_designator: '' + secondary_number: '' + pmb_designator: '' + pmb_number: '' + extra_secondary_designator: '' + extra_secondary_number: '' + city: SAN FRANCISCO + state: CA + zip_code: '94172' + zip_code_plus_4: '0114' + zip_code_type: po_box + delivery_point_barcode: '941720114146' + address_type: residential + record_type: po_box + default_building_address: false + county: SAN FRANCISCO + county_fips: '06075' + carrier_route: BOO2 + carrier_route_type: po_box + po_box_only_flag: '' + latitude: 37.75971500260575 + longitude: -122.69397561170017 + deliverability_analysis: + dpv_confirmation: 'Y' + dpv_cmra: 'N' + dpv_vacant: 'N' + dpv_active: 'Y' + 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: + - AA + - BB + ews_match: false + lacs_indicator: '' + lacs_return_code: '' + suite_return_code: '' + object: us_verification + zip_lookups_error: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' + example: + error: + code: invalid + message: zip_code is required + status_code: 422 + zip_lookups: + 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' + content: + application/json: + schema: + $ref: '#/components/schemas/zip' + example: + id: us_zip_c7cb63d68f8d6 + cities: + - city: SAN FRANCISCO + state: CA + county: SAN FRANCISCO + county_fips: '06075' + preferred: true + zip_code_type: standard + object: us_zip_lookup + zip_code: '94107' + events: + description: Returns an `event` object to the specified server. + content: + application/json: + schema: + $ref: '#/components/schemas/events' + example: + event_type: + resource: postcards + enabled_for_test: true + id: postcard.created + object: event_type + reference_id: psc_d2d10a2e9cba991c + id: evt_d95ff8ffd2b5cfb4 + date_created: '2016-12-04T22:50:08.180Z' + body: + id: psc_d2d10a2e9cba991c + description: Test Postcard + metadata: {} + to: + id: adr_8e783523dd7f0e70 + description: Test Recipient Address + name: Harry Zhang + company: LOB + phone: null + email: null + address_line1: 123 TEST ST + address_line2: UNIT 1 + address_city: SAN FRANCISCO + address_state: CA + address_zip: '94107' + address_country: UNITED STATES + metadata: {} + date_created: '2016-12-04T10:51:51.844Z' + date_modified: '2016-12-04T10:51:51.844Z' + object: address + from: + id: adr_d2e26faf793ed422 + description: Test Sender Address + name: Harry Zhang + company: LOB + phone: null + email: null + address_line1: 123 TEST ST + address_line2: UNIT 1 + address_city: SAN FRANCISCO + address_state: CA + address_zip: '94107' + address_country: UNITED STATES + metadata: {} + date_created: '2016-12-04T10:51:51.845Z' + date_modified: '2016-12-04T10:51:51.845Z' + object: address + url: https://lob-assets.com/postcards/psc_d2d10a2e9cba991c.pdf?expires=1540372221&signature=dNE8OtbDymujUxBIMYle4H1cv1aZNFk + front_template_id: null + back_template_id: null + carrier: USPS + tracking_events: [] + thumbnails: + - small: https://lob-assets.com/postcards/psc_d2d10a2e9cba991c_thumb_small_1.png?expires=1540372221&signature=McmqScxPgbe7yQY5X31U3vhU8VUlfA1 + medium: https://lob-assets.com/postcards/psc_d2d10a2e9cba991c_thumb_medium_1.png?expires=1540372221&signature=VBClptOuCcj9Ybay6gE5aetT5j3C7KS + large: https://lob-assets.com/postcards/psc_d2d10a2e9cba991c_thumb_large_1.png?expires=1540372221&signature=RAHpIwoYKYM17f0bbaoOiamCkjpzYfH + - small: https://lob-assets.com/postcards/psc_d2d10a2e9cba991c_thumb_small_1.png?expires=1540372221&signature=5biHoaCmkphQaGJymOZxmTF0hHdiH4N + medium: https://lob-assets.com/postcards/psc_d2d10a2e9cba991c_thumb_medium_1.png?expires=1540372221&signature=1ApGx0kn5EO4qQKGJzCe6zEPnQpzpRY + large: https://lob-assets.com/postcards/psc_d2d10a2e9cba991c_thumb_large_1.png?expires=1540372221&signature=z80p90RBak6T26IAfg5yg7a6qKF53a8 + merge_variables: null + mail_type: usps_first_class + size: 4x6 + expected_delivery_date: '2016-12-09' + date_created: '2016-12-04T10:51:51.843Z' + date_modified: '2016-12-04T10:51:51.843Z' + send_date: '2016-12-04T10:56:51.843Z' + object: postcard + object: event + tracking_events: + description: Returns a `tracking_event` object to the specified server. + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/tracking_event_normal' + - $ref: '#/components/schemas/tracking_event_certified' + examples: + normal: + value: + id: evnt_9e84094c9368cfb + type: normal + name: In Local Area + details: null + location: '72231' + time: '2016-06-30T15:51:41.000Z' + date_created: '2016-06-30T17:41:59.771Z' + date_modified: '2016-06-30T17:41:59.771Z' + object: tracking_event + certified: + value: + id: evnt_9e84094c9368cfb + type: certified + name: Delivered + details: + event: delivered + description: Package has been delivered. + notes: Delivered, Front Desk/Reception/Mail Room + action_required: false + location: '33408' + time: '2019-10-08T19:41:00Z' + date_created: '2019-10-08T19:41:00Z' + date_modified: '2019-10-08T19:41:00Z' + object: tracking_event + headers: + ratelimit-limit: + description: The rate limit for a given endpoint. + schema: + type: integer + example: 150 + ratelimit-remaining: + description: The number of requests remaining in the current window. + schema: + type: integer + example: 100 + ratelimit-reset: + description: | + The time at which the rate limit window resets in UTC epoch seconds + schema: + type: integer + example: 1528749846 +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 + - Template Versions + - Template Design + - Manage Mail + - name: Campaigns API (BETA) + tags: + - Campaigns + - Creatives + - Uploads + - name: Address Verification API + tags: + - US Verifications + - US Verification Types + - US Autocompletions + - Reverse Geocode Lookups + - Zip Lookups + - Identity Validation + - Intl Autocompletions + - 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 diff --git a/lob-api-public.yml b/lob-api-public.yml index 62d303ea..f0153909 100644 --- a/lob-api-public.yml +++ b/lob-api-public.yml @@ -1,7 +1,7 @@ openapi: 3.0.3 info: title: Lob - version: 1.19.41 + version: 1.19.42 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.

license: @@ -1183,7 +1183,7 @@ tags:

- name: QR Codes description: | - + Lob 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 Letters, Postcards or Self Mailers to learn how to embed a QR code into your mail piece. Webhooks can be used to integrate Lob QR code scans into your omni channel marketing strategy. See the Webhooks section of our documentation to learn how to enable the `letter.viewed`, `postcard.viewed` and `self_mailer.viewed` event notifications for your mail pieces. diff --git a/package-lock.json b/package-lock.json index 8d7df38b..54c2d7a0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@lob/openapi", - "version": "1.19.41", + "version": "1.19.42", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@lob/openapi", - "version": "1.19.41", + "version": "1.19.42", "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -30,7 +30,7 @@ "mini-css-extract-plugin": "^2.6.0", "openapi-to-postmanv2": "^3.2.0", "prettier": "^2.6.2", - "redoc-cli": "^0.13.16", + "redoc-cli": "^0.13.21", "sass": "^1.52.1", "sass-loader": "^13.0.0", "uuid": "^8.3.2", @@ -11175,6 +11175,7 @@ "integrity": "sha512-pjuPf0HkKqo9qtoHxMK4x5dhC/lJ08O0hO0rJISbSRCf19bPBjQ5lb2mHRu9j6vypTMltyaLtFIfVNveuyF5fQ==", "dev": true, "hasShrinkwrap": true, + "license": "MIT", "dependencies": { "boxen": "5.1.2", "chokidar": "^3.5.1", @@ -11524,6 +11525,15 @@ "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", "dev": true }, + "node_modules/redoc-cli/node_modules/@types/mkdirp": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@types/mkdirp/-/mkdirp-1.0.1.tgz", + "integrity": "sha512-HkGSK7CGAXncr8Qn/0VqNtExEE+PHMWb+qlR1faHMao7ng6P3tAaoWWBMdva0gL5h4zprjIO89GJOLXsMcDm1Q==", + "extraneous": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/redoc-cli/node_modules/@types/node": { "version": "15.12.2", "resolved": "https://registry.npmjs.org/@types/node/-/node-15.12.2.tgz", @@ -12171,8 +12181,7 @@ "dev": true, "dependencies": { "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" + "ieee754": "^1.1.4" } }, "node_modules/redoc-cli/node_modules/buffer-from": { @@ -13727,7 +13736,6 @@ "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", - "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", diff --git a/package.json b/package.json index 7fe4c285..37b45b6c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lob/openapi", - "version": "1.19.41", + "version": "1.19.42", "engines": { "node": ">=14.16.0", "npm": ">=7.9.0" @@ -106,7 +106,7 @@ "mini-css-extract-plugin": "^2.6.0", "openapi-to-postmanv2": "^3.2.0", "prettier": "^2.6.2", - "redoc-cli": "^0.13.16", + "redoc-cli": "^0.13.21", "sass": "^1.52.1", "sass-loader": "^13.0.0", "uuid": "^8.3.2",