From aa3f00350a299110e8452c1a3828105e2c5d049a Mon Sep 17 00:00:00 2001 From: ekim-lob <168485227+ekim-lob@users.noreply.github.com> Date: Tue, 17 Sep 2024 15:50:29 -0700 Subject: [PATCH] added rejected event (#507) --- dist/lob-api-bundled.yml | 38611 ++++++++-------- dist/lob-api-postman.json | 13538 +++--- docs/index.html | 182 +- lob-api-public.yml | 24 +- package-lock.json | 4 +- package.json | 2 +- 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 + 10 files changed, 26174 insertions(+), 26191 deletions(-) diff --git a/dist/lob-api-bundled.yml b/dist/lob-api-bundled.yml index 99166c1c..21a28305 100644 --- a/dist/lob-api-bundled.yml +++ b/dist/lob-api-bundled.yml @@ -1,11 +1,9 @@ openapi: 3.0.3 info: title: Lob - version: 1.19.33 - 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.

+ version: 1.19.43 + 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: name: MIT url: https://mit-license.org/ @@ -17,49 +15,29 @@ info: servers: - url: https://api.lob.com/v1 description: production +security: + - basicAuth: [] tags: - name: Addresses - description: > - To add an address to your address book, you create a new address object. - You can retrieve and delete individual - - addresses as well as get a list of addresses. Addresses are identified by - a unique random ID. - -

back to - top
+ description: | + To add an address to your address book, you create a new address object. You can retrieve and delete individual + addresses as well as get a list of addresses. Addresses are identified by a unique random ID. +
back to top
- name: Authentication x-traitTag: true - description: > - Requests made to the API are protected with HTTP Basic authentication. - - In order to properly authenticate with the API you must use your API key - as the username - - while leaving the password blank. Requests not properly authenticated will - return a `401` - + description: | + Requests made to the API are protected with HTTP Basic authentication. + In order to properly authenticate with the API you must use your API key as the username + while leaving the password blank. Requests not properly authenticated will return a `401` [error code](#tag/Errors). You can find your account's API keys - - in your Dashboard Settings. - + in your Dashboard Settings. ### Example Request - - curl uses the -u flag to pass basic auth credentials (adding a colon after - your API key will prevent it from asking you for a - - password). One of our test API keys has been filled into all the examples - on the page, so you can test out any example right away. - + curl uses the -u flag to pass basic auth credentials (adding a colon after your API key will prevent it from asking you for a + password). One of our test API keys has been filled into all the examples on the page, so you can test out any example right away. ```bash - curl https://api.lob.com/v1/addresses \ -u test_0dc8dXXXXXXXXXXXXXXXXXXXXXX5b0cc: ``` - ## API Keys Lob authenticates your API requests using your account's API keys. If you do not include your key when making an API request, or use @@ -80,175 +58,88 @@ tags:

back to top
- name: Bank Accounts - description: > - Bank Accounts allow you to store your bank account securely in our system. - The API provides - - endpoints for creating bank accounts, deleting bank accounts, verifying - bank accounts, - - retrieving individual bank accounts, and retrieving a list of bank - accounts. - -
back to - top
+ description: | + Bank Accounts allow you to store your bank account securely in our system. The API provides + endpoints for creating bank accounts, deleting bank accounts, verifying bank accounts, + retrieving individual bank accounts, and retrieving a list of bank accounts. +
back to top
- name: Beta Program x-traitTag: true - description: > - At Lob, we pride ourselves on building high quality platform capabilities - rapidly - - and iteratively, so we can constantly be delivering additional value to - our customers. - - When evaluating a new product or feature from Lob, you may see that it has - been released in Beta. - - - Typically, something in Beta means that the feature is early in its - lifecycle here at - - Lob. While we fully stand behind the quality of everything we release in - Beta, we do - - anticipate receiving a higher level of customer feedback on Beta features, - as well as a - - faster pace of changes from our engineering team in response to that - feedback. - - - By participating in a Lob Beta program, you will have the opportunity to - get early access - - to a new product capability, as well as having a unique opportunity to - influence the product's - + description: | + At Lob, we pride ourselves on building high quality platform capabilities rapidly + and iteratively, so we can constantly be delivering additional value to our customers. + When evaluating a new product or feature from Lob, you may see that it has been released in Beta. + + Typically, something in Beta means that the feature is early in its lifecycle here at + Lob. While we fully stand behind the quality of everything we release in Beta, we do + anticipate receiving a higher level of customer feedback on Beta features, as well as a + faster pace of changes from our engineering team in response to that feedback. + + By participating in a Lob Beta program, you will have the opportunity to get early access + to a new product capability, as well as having a unique opportunity to influence the product's direction with your feedback. - - You should also anticipate that features in Beta may have functional or - design limitations, - - and might change rapidly as we receive customer feedback and make - improvements. In particular, - - new APIs in Beta may also go through more frequent versioning and version - deprecation cycles - + You should also anticipate that features in Beta may have functional or design limitations, + and might change rapidly as we receive customer feedback and make improvements. In particular, + new APIs in Beta may also go through more frequent versioning and version deprecation cycles than our more mature APIs. - - If you are participating in a Beta program and want to provide feedback, - please feel free to - + If you are participating in a Beta program and want to provide feedback, please feel free to contact us! - -
back to - top
+
back to top
- name: Billing Groups - description: > - The Billing Groups API allows you to create and view labels that can be - attached to certain consumption-based - - usages of Letters, Checks, Postcards and Self-Mailers to customize your - bill. Please check each - - resource API section to learn more about how to access the Billing Groups - API. - -
back to - top
+ description: | + The Billing Groups API allows you to create and view labels that can be attached to certain consumption-based + usages of Letters, Checks, Postcards and Self-Mailers to customize your bill. Please check each + resource API section to learn more about how to access the Billing Groups API. +
back to top
- name: Buckslip Orders - description: > - The Buckslip Orders endpoint allows you to easily create buckslip orders - for existing buckslips. - - The API provides endpoints for creating buckslip orders and listing - buckslip orders for a given buckslip. - -
back to - top
+ description: | + The Buckslip Orders endpoint allows you to easily create buckslip orders for existing buckslips. + The API provides endpoints for creating buckslip orders and listing buckslip orders for a given buckslip. +
back to top
- name: Buckslips - description: > - The Buckslips endpoint allows you to easily create buckslips that can - later be used as add-ons for Letters Campaigns. Note that a Letter - Campaign with Buckslip add-on requires a minimum send quantity of 5,000 - letters. - - The API provides endpoints for creating buckslips, retrieving individual - buckslips, creating buckslip orders, and retrieving a list of buckslips. - -
back to - top
+ description: | + The Buckslips endpoint allows you to easily create buckslips that can later be used as add-ons for Letters Campaigns. Note that a Letter Campaign with Buckslip add-on requires a minimum send quantity of 5,000 letters. + The API provides endpoints for creating buckslips, retrieving individual buckslips, creating buckslip orders, and retrieving a list of buckslips. +
back to top
- name: Bulk Intl Verifications - description: > + description: | Verify a list of non-US addresses. - -
back to - top
+
back to top
- name: Bulk US Verifications - description: > + description: | Verify a list of US addresses. - -
back to - top
+
back to top
- name: Campaigns - description: > - The campaigns endpoint allows you to create and view campaigns that can be - used to send multiple letters or postcards. - - The API provides endpoints for creating campaigns, updating campaigns, - retrieving individual campaigns, listing campaigns, and deleting - + description: | + The campaigns endpoint allows you to create and view campaigns that can be used to send multiple letters or postcards. + The API provides endpoints for creating campaigns, updating campaigns, retrieving individual campaigns, listing campaigns, and deleting campaigns. - name: Card Orders - description: > - The card orders endpoint allows you to easily create card orders for - existing cards. - - The API provides endpoints for creating card orders and listing card - orders for a given card. - -
back to - top
+ description: | + The card orders endpoint allows you to easily create card orders for existing cards. + The API provides endpoints for creating card orders and listing card orders for a given card. +
back to top
- name: Cards - description: > - The cards endpoint allows you to easily create cards that can later be - affixed to Letters. - - The API provides endpoints for creating cards, retrieving individual - cards, creating card orders, and retrieving a list of cards. - -
back to - top
+ description: | + The cards endpoint allows you to easily create cards that can later be affixed to Letters. + The API provides endpoints for creating cards, retrieving individual cards, creating card orders, and retrieving a list of cards. +
back to top
- name: Checks - description: > - Checks allow you to send payments via physical checks. The API provides - endpoints - - for creating checks, retrieving individual checks, canceling checks, and - retrieving a list of checks. - -
back to - top
+ description: | + Checks allow you to send payments via physical checks. The API provides endpoints + for creating checks, retrieving individual checks, canceling checks, and retrieving a list of checks. +
back to top
- name: Creatives - description: > - The creatives endpoint allows you to create and view creatives. Creatives - are used to create - - reusable letter and postcard templates. The API provides endpoints for - creating creatives, updating creatives, - + description: | + The creatives endpoint allows you to create and view creatives. Creatives are used to create + reusable letter and postcard templates. The API provides endpoints for creating creatives, updating creatives, retrieving individual creatives, and deleting creatives. - name: Errors x-traitTag: true - description: > - Lob uses RESTful HTTP response codes to indicate success or failure of an - API request - read below for more information. In general, 2xx indicates - success, 4xx indicate an input error, and 5xx indicates an error on Lob's - end. - + description: | + Lob uses RESTful HTTP response codes to indicate success or failure of an API request - read below for more information. In general, 2xx indicates success, 4xx indicate an input error, and 5xx indicates an error on Lob's end. @@ -269,10 +160,8 @@ tags:
- ### HTTP Status Code Summary - @@ -316,10 +205,8 @@ tags:
STATUS_CODE
- ### Error Codes - Generic - @@ -383,10 +270,8 @@ tags:
STATUS_CODE
- ### Error Codes - Authentication - @@ -590,20 +475,14 @@ tags:
STATUS_CODEThe provided PDF contains non-standard unembedded fonts. See description for details.
- -
back to - top
+
back to top
- name: Events - description: > - When various notable things happen within the Lob architecture, Events - will be created. To get these events sent to your server - + description: | + When various notable things happen within the Lob architecture, Events will be created. To get these events sent to your server automatically when they occur, you can set up [Webhooks](#tag/Webhooks). -

Postcards

- @@ -615,6 +494,11 @@ tags: + + + + + @@ -682,10 +566,8 @@ tags:
EVENT TYPEfalse A postcard is successfully created (Lob returns a 200 status code).
postcard.rejectedfalseA postcard was not successfully created (Usually happens when one or more postcards fail the creation step during a batch request)
postcard.rendered_pdf false
-

Self Mailers

- @@ -697,6 +579,11 @@ tags: + + + + + @@ -765,10 +652,8 @@ tags:
EVENT TYPEfalse A 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_pdf false
-

Letters

- @@ -780,6 +665,11 @@ tags: + + + + + @@ -924,10 +814,8 @@ tags:
EVENT TYPEfalse A 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_pdf false
-

Checks

- @@ -939,6 +827,11 @@ tags: + + + + + @@ -996,10 +889,8 @@ tags:
EVENT TYPEfalse A 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_pdf false
-

Addresses

- @@ -1018,10 +909,8 @@ tags:
EVENT TYPE
-

Bank Accounts

- @@ -1044,42 +933,24 @@ tags:
EVENT TYPEA bank account is successfully verified.
- -
back to - top
+
back to top
- name: Getting Started x-traitTag: true - description: > + description: | ### 1. Get Setup - - * Create an account at Lob.com - - * Obtain your API keys in the Lob dashboard settings - - * You'll use the format, `test_*.` for your Test API key and `live_*.` for - your Live API key. - + * Create an account at Lob.com + * Obtain your API keys in the Lob dashboard settings + * You'll use the format, `test_*.` for your Test API key and `live_*.` for your Live API key. ### 2. Explore - * Try out in Postman: -
+ style="background:#0099d7;color: white;display: flex;justify-content: center;align-items: center;"> Run in Postman
- - * 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: Informed Delivery Campaign + description: | + The Informed Delivery campaigns API allows you to create and view Informed Delivery campaigns. +
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: - @@ -1221,169 +1040,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: \ @@ -1395,196 +1128,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, - - 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 + 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. - 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. @@ -1603,23 +1227,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 { @@ -1629,97 +1247,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** - @@ -1737,9 +1312,7 @@ tags:
- **Query Parameters** - @@ -1757,10 +1330,8 @@ tags:
- ### Example Request - ```bash curl https://api.lob.com/v1/postcards \ -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \ @@ -1771,37 +1342,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: \ @@ -1814,85 +1369,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", @@ -1902,22 +1421,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 @@ -1944,112 +1453,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: \ @@ -2060,180 +1511,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. - @@ -2412,94 +1766,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`. - @@ -2670,79 +1985,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]

- @@ -2768,10 +2046,8 @@ tags:
-

Record Types - components[record_type]

- @@ -2805,10 +2081,8 @@ tags:
-

Carrier Route Types - components[carrier_route_type]

- @@ -2838,10 +2112,7 @@ tags:
- -

DPV Footnotes - - deliverability_analysis[dpv_footnotes]

- +

DPV Footnotes - deliverability_analysis[dpv_footnotes]

@@ -2923,38 +2194,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: @@ -3034,11221 +2287,1144 @@ 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** + 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) - * `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. + 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()); - **ADVANCED** + try { + $result = $apiInstance->list( + 2, // limit + ); + } catch (Exception $e) { + echo $e->getMessage(), PHP_EOL; + } + - lang: Java + source: | + AddressesApi apiInstance = new AddressesApi(config); - * `address_length_exceeds_limit` - 422: the sum of - to.address_line1 and to.address_line2 cannot surpass 50 - characters. + 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); - * `bank_account_already_verified` - 422: the bank account has - already been verified. + 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); - * `bank_error` - 422: there's an issue with the bank account. + 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("")}) - * `billing_address_required` - 403: in order to create a live - mail piece, your account needs to set up a billing address. + 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' + }); - * `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. + 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", + }); - * `file_pages_below_min` - 422: not enough pages. + addressApi = AddressesApi.new(config) - * `file_pages_exceed_max` - 422: too many pages. + 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"), + ) - * `file_size_exceeds_limit` - 422: the file size is too large. - See description for details. + with ApiClient(configuration) as api_client: + api = AddressesApi(api_client) - * `foreign_return_address` - 422: the `from` address must be a - US address. + 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()); - * `inconsistent_page_dimensions` - 422: all pages of the input - file must have the same dimensions. + $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_bank_account` - 422: the provided bank routing number - is invalid. + try { + $result = $apiInstance->create($address_editable); + } catch (Exception $e) { + echo $e->getMessage(), PHP_EOL; + } + - lang: Java + source: | + AddressesApi apiInstance = new AddressesApi(config); - * `invalid_bank_account_verification` - 422: verification - amounts do not match. + 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_check_international` - 422: checks cannot be sent - internationally. + 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); - * `invalid_country_covid` - 422: the postal service in the - specified country is currently unable to process the request due - to COVID-19 restrictions. + 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 + ); - * `invalid_file` - 422: the file is invalid. + 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("")}) - * `invalid_file_dimensions` - 422: file dimensions are incorrect - for the selected mail type. + var apiClient = *lob.NewAPIClient(configuration) - * `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. + 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") - * `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. + createdaddress, _, err := apiClient.AddressesApi.Create(context).AddressEditable(addressCreate).Execute() - * `invalid_template_html` - 422: the provided HTML is invalid. + 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) - * `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. + 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) - * `merge_variable_required` - 422: a required merge variable is - missing. + 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()); - * `merge_variable_whitespace` - 422: merge variable names cannot - contain whitespace. + try { + $result = $apiInstance->get("adr_fa85158b26c3eb7c"); + } catch (Exception $e) { + echo $e->getMessage(), PHP_EOL; + } + - lang: Java + source: | + AddressesApi apiInstance = new AddressesApi(config); - * `payment_method_unverified` - 401: you must have a verified - bank account or credit card to submit live requests. + 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); - * `pdf_encrypted` - 422: an encrypted PDF was provided. + 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("")}) - * `special_characters_restricted` - 422: cannot use special - characters for merge variable names. + var apiClient = *lob.NewAPIClient(configuration) - * `unembedded_fonts` - 422: the provided PDF contains - non-standard unembedded fonts. See description for details. + fetchedAddress, _, err := apiClient.AddressesApi.Get(context,"adr_fa85158b26c3eb7c").Execute() + if err != nil { + return err + } + label: GO + 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. + tags: + - Addresses + responses: + '200': + $ref: '#/components/responses/address_deleted' + default: + $ref: '#/components/responses/address_error' + x-codeSamples: + - lang: Shell + source: | + curl -X DELETE https://api.lob.com/v1/addresses/adr_43769b47aed248c2 \ + -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: + label: CURL + - lang: Typescript + source: | + try { + const deleteAddress = await new AddressesApi(config).delete('adr_xxxx'); + } catch (err: any) { + console.error(err); + } + label: TYPESCRIPT + - lang: Javascript + source: | + Lob.addresses.delete('adr_43769b47aed248c2', function (err, res) { + console.log(err, res); + }); + label: NODE + - lang: Ruby + source: | + addressApi = AddressesApi.new(config) - **AUTHENTICATION** + begin + deletedAddress = addressApi.delete("adr_43769b47aed248c2") + rescue => err + p err.message + end + label: RUBY + - lang: Python + source: | + with ApiClient(configuration) as api_client: + api = AddressesApi(api_client) - * `email_required` - 401: account must have a verified email - address before creating live resources. + try: + deleted_resource = api.delete("adr_43769b47aed248c2") + except ApiException as e: + print(e) + label: PYTHON + - lang: PHP + source: | + $apiInstance = new OpenAPI\Client\Api\AddressesApi($config, new GuzzleHttp\Client()); - * `invalid_api_key` - 401/403: the API key is invalid. + try { + $result = $apiInstance->delete("adr_43769b47aed248c2"); + } catch (Exception $e) { + echo $e->getMessage(), PHP_EOL; + } + - lang: Java + source: | + AddressesApi apiInstance = new AddressesApi(config); - * `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 { + AddressDeletion response = apiInstance.delete("adr_43769b47aed248c2"); + } catch (ApiException e) { + e.printStackTrace(); + } + label: JAVA + - lang: Elixir + source: | + Lob.Address.delete("adr_43769b47aed248c2") + label: ELIXIR + - lang: CSharp + source: | + AddressesApi api = new AddressesApi(config); - * `rate_limit_exceeded` - 429: requests were sent too quickly - and must be slowed down. + try { + AddressDeletion response = api.delete("adr_43769b47aed248c2"); + } 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("")}) - * `unauthorized` - 401: the request isn't authorized. + var apiClient = *lob.NewAPIClient(configuration) - * `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.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.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.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.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: + deletedAddress, _, err := apiClient.AddressesApi.Delete(context, "adr_43769b47aed248c2").Execute() + + if err != nil { + return err + } + label: GO + /bank_accounts/{bank_id}/verify: + parameters: + - in: path + name: bank_id + description: id of the bank account to be verified + required: true + schema: + $ref: '#/components/schemas/bank_id' 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. + operationId: bank_account_verify + summary: Verify + description: Verify a bank account in order to create a check. 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' + - Bank Accounts + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/bank_account_verify' + example: + amounts: + - 1 + - 100 + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/bank_account_verify' + example: + amounts: + - 1 + - 100 + multipart/form-data: + schema: + $ref: '#/components/schemas/bank_account_verify' + example: + amounts: + - 1 + - 100 responses: '200': - $ref: '#/components/responses/all_addresses' + $ref: '#/components/responses/post_bank_account' default: - $ref: '#/components/responses/address_error' + $ref: '#/components/responses/bank_account_error' x-codeSamples: - lang: Shell source: | - curl -X GET "https://api.lob.com/v1/addresses?limit=2" \ - -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: + curl https://api.lob.com/v1/bank_accounts/bank_dfceb4a2a05b57e/verify \ + -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \ + -d "amounts[]=25" \ + -d "amounts[]=63" label: CURL - lang: Typescript source: | + const verificationData = new BankAccountVerify({ + amounts: [11, 35], + }); + try { - const addresses = await new AddressesApi(config).list(2); + const verifiedAccount = await new BankAccountsApi(config).verify('bank_xxxx', verificationData); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.addresses.list({limit: 2}, function (err, res) { + Lob.bankAccounts.verify('bank_dfceb4a2a05b57e', { + amounts: [25, 63] + }, function (err, res) { console.log(err, res); }); label: NODE - lang: Ruby source: | - addressesApi = AddressesApi.new(config) + verificationData = BankAccountVerify.new({ + amounts: [ + 25, + 63, + ], + }) + + bankAccountsApi = BankAccountsApi.new(config) begin - addresses = addressesApi.list({ limit: 2 }) + verifiedAccount = bankAccountsApi.verify("bank_dfceb4a2a05b57e", verificationData) rescue => err p err.message end label: RUBY - lang: Python source: | + verification_data = BankAccountVerify( + amounts = [ + 25, + 63, + ], + ) + with ApiClient(configuration) as api_client: - api = AddressesApi(api_client) + api = BankAccountsApi(api_client) try: - addresses = api.list(limit=2) + verified_account = api.verify("bank_dfceb4a2a05b57e", verification_data) except ApiException as e: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\AddressesApi($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->list( - 2, // limit + $result = $apiInstance->verify( + "bank_dfceb4a2a05b57e", $bankVerify ); } catch (Exception $e) { echo $e->getMessage(), PHP_EOL; } - lang: Java source: | - AddressesApi apiInstance = new AddressesApi(config); + BankAccountVerify verification = new BankAccountVerify(); + verification.addAmountsItem(25); + verification.addAmountsItem(63); + + BankAccountsApi apiInstance = new BankAccountsApi(config); try { - AddressList response = apiInstance.list( - 2, // limit - null, // before - null, // after - null, // include - null, // dateCreated - null // metadata - ); + apiInstance.verify("bank_dfceb4a2a05b57e", verification); } catch (ApiException e) { e.printStackTrace(); } label: JAVA - lang: Elixir source: | - Lob.Address.list(%{limit: 2}) + Lob.BankAccount.verify("bank_dfceb4a2a05b57e", %{amounts: [25, 63]}) 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); + source: | + List amounts = new List(); + amounts.Add(25); + amounts.Add(63); - dateCreated.Add("lt", dateCreatedDate); + BankAccountVerify verification = new BankAccountVerify(amounts); + BankAccountsApi api = new BankAccountsApi(config); try { - AddressList response = api.list( - 2, // limit - null, // before - null, // after - includeList, // include - dateCreated, // dateCreated - metadata // metadata - ); + BankAccount verified_account = api.verify("bank_dfceb4a2a05b57e", verification); } 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 bankAccountWritable = *lob.NewBankAccountWritable("322271627", "123456789", lob.BANKTYPEENUM_INDIVIDUAL, "Sinead Connor") - var apiClient = *lob.NewAPIClient(configuration) + createdBankAccount, _, _ := apiClient.BankAccountsApi.Create(context).BankAccountWritable(bankAccountWritable).Execute() - AddressList = apiClient.AddressesApi.List(context).Execute() + verifyAmounts := []int32{11, 35} + verify := *lob.NewBankAccountVerify(verifyAmounts) + + verifiedAccount, _, err := apiClient.BankAccountsApi.Verify(context, createdBankAccount.Id).BankAccountVerify(verify).Execute() if err != nil { return err } label: GO - post: - operationId: address_create - summary: Create - description: Creates a new address given information - tags: - - Addresses - requestBody: + /bank_accounts/{bank_id}: + parameters: + - in: path + name: bank_id + description: id of the bank account 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 + schema: + $ref: '#/components/schemas/bank_id' + 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. + tags: + - Bank Accounts responses: '200': - $ref: '#/components/responses/post_address' + description: Returns a bank account object + 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 default: - $ref: '#/components/responses/address_error' + $ref: '#/components/responses/bank_account_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" + curl https://api.lob.com/v1/bank_accounts/bank_8cad8df5354d33f \ + -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: 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' - }); - + - lang: Typescript + source: | try { - const myAddress = await new AddressesApi(config).create(addressCreate); + const bankAccount = await new BankAccountsApi(config).get('bank_xxxx'); } 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) { + Lob.bankAccounts.retrieve('bank_8cad8df5354d33f', 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) + bankAccountApi = BankAccountsApi.new(config) begin - createdAddress = addressApi.create(addressCreate) + retrievedBankAccount = bankAccountApi.get("bank_8cad8df5354d33f") 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) + api = BankAccountsApi(api_client) try: - created_address = api.create(address_editable) + bank_account = api.get("bank_8cad8df5354d33f") 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", - ) - ); - + source: | + $apiInstance = new OpenAPI\Client\Api\BankAccountsApi($config, new GuzzleHttp\Client()); try { - $result = $apiInstance->create($address_editable); + $result = $apiInstance->get("bank_8cad8df5354d33f"); } catch (Exception $e) { echo $e->getMessage(), PHP_EOL; } - lang: Java source: | - AddressesApi apiInstance = new AddressesApi(config); + BankAccountsApi apiInstance = new BankAccountsApi(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); + BankAccount response = apiInstance.get("bank_8cad8df5354d33f"); } 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" - }) + Lob.BankAccount.find("bank_8cad8df5354d33f") 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 - ); + BankAccountsApi api = new BankAccountsApi(config); try { - Address result = api.create(addressEditable); + BankAccount response = api.get("bank_8cad8df5354d33f"); } 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 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() - + fetchedBankAccount, _, err := apiClient.BankAccountsApi.Get(context,"bank_8cad8df5354d33f").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. + delete: + operationId: bank_account_delete + summary: Delete + description: Permanently deletes a bank account. It cannot be undone. tags: - - Addresses + - Bank Accounts responses: '200': - $ref: '#/components/responses/address' + $ref: '#/components/responses/bank_account_deleted' default: - $ref: '#/components/responses/address_error' + $ref: '#/components/responses/bank_account_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/addresses/adr_fa85158b26c3eb7c \ + curl -X DELETE https://api.lob.com/v1/bank_accounts/bank_3e64d9904356b20 \ -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: label: CURL - lang: Typescript source: | try { - const address = await new AddressesApi(config).get('adr_xxxx'); + const deleteBankAccount = await new BankAccountsApi(config).delete('bank_xxxx'); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.addresses.retrieve('adr_fa85158b26c3eb7c', function (err, res) { + Lob.bankAccounts.delete('bank_3e64d9904356b20', function (err, res) { console.log(err, res); }); label: NODE - lang: Ruby source: | - addressApi = AddressesApi.new(config) + bankAccountApi = BankAccountsApi.new(config) begin - retrievedAddress = addressApi.get("adr_fa85158b26c3eb7c") + deletedBankAccount = bankAccountApi.delete("bank_3e64d9904356b20") rescue => err p err.message end @@ -14256,107 +3432,103 @@ paths: - lang: Python source: | with ApiClient(configuration) as api_client: - api = AddressesApi(api_client) + api = BankAccountsApi(api_client) try: - address = api.get("adr_fa85158b26c3eb7c") + deleted_resource = api.delete("bank_3e64d9904356b20") except ApiException as e: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\AddressesApi($config, new - GuzzleHttp\Client()); - + source: | + $apiInstance = new OpenAPI\Client\Api\BankAccountsApi($config, new GuzzleHttp\Client()); try { - $result = $apiInstance->get("adr_fa85158b26c3eb7c"); + $result = $apiInstance->delete("bank_3e64d9904356b20"); } catch (Exception $e) { echo $e->getMessage(), PHP_EOL; } - lang: Java source: | - AddressesApi apiInstance = new AddressesApi(config); + BankAccountsApi apiInstance = new BankAccountsApi(config); try { - Address response = apiInstance.get("adr_fa85158b26c3eb7c"); + BankAccountDeletion response = apiInstance.delete("bank_3e64d9904356b20"); } catch (ApiException e) { - e.printStackTrace(); + e.printStackTrace(); } label: JAVA - lang: Elixir source: | - Lob.Address.retrieve("adr_fa85158b26c3eb7c") + Lob.BankAccount.destroy("bank_3e64d9904356b20") label: ELIXIR - lang: CSharp source: | - AddressesApi api = new AddressesApi(config); + BankAccountsApi api = new BankAccountsApi(config); try { - Address response = api.get("adr_fa85158b26c3eb7c"); + BankAccountDeletion response = api.delete("bank_3e64d9904356b20"); } 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) - - fetchedAddress, _, err := - apiClient.AddressesApi.Get(context,"adr_fa85158b26c3eb7c").Execute() - + deletedBankAccount, _, err := apiClient.BankAccountsApi.Delete(context, "bank_3e64d9904356b20").Execute() if err != nil { return err } label: GO - 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. + /bank_accounts: + 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. tags: - - Addresses + - Bank Accounts + 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/address_deleted' + $ref: '#/components/responses/all_bank_accounts' default: - $ref: '#/components/responses/address_error' + $ref: '#/components/responses/bank_account_error' x-codeSamples: - lang: Shell - source: > - curl -X DELETE https://api.lob.com/v1/addresses/adr_43769b47aed248c2 - \ + source: | + curl -X GET "https://api.lob.com/v1/bank_accounts?limit=2" \ -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: label: CURL - lang: Typescript source: | try { - const deleteAddress = await new AddressesApi(config).delete('adr_xxxx'); + const bankaccounts = await new BankaccountsApi(config).list(2); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.addresses.delete('adr_43769b47aed248c2', function (err, res) { + Lob.bankAccounts.list({limit: 2}, function (err, res) { console.log(err, res); }); label: NODE - lang: Ruby source: | - addressApi = AddressesApi.new(config) + bankAccountsApi = BankAccountsApi.new(config) begin - deletedAddress = addressApi.delete("adr_43769b47aed248c2") + bankAccounts = bankAccountsApi.list({ limit: 2 }) rescue => err p err.message end @@ -14364,79 +3536,85 @@ paths: - lang: Python source: | with ApiClient(configuration) as api_client: - api = AddressesApi(api_client) + api = BankAccountsApi(api_client) try: - deleted_resource = api.delete("adr_43769b47aed248c2") + bank_accounts = 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()); - + source: | + $apiInstance = new OpenAPI\Client\Api\BankAccountsApi($config, new GuzzleHttp\Client()); try { - $result = $apiInstance->delete("adr_43769b47aed248c2"); + $result = $apiInstance->list( + 2, // limit + ); } catch (Exception $e) { echo $e->getMessage(), PHP_EOL; } - lang: Java source: | - AddressesApi apiInstance = new AddressesApi(config); + BankAccountsApi apiInstance = new BankAccountsApi(config); try { - AddressDeletion response = apiInstance.delete("adr_43769b47aed248c2"); + BankAccountList response = apiInstance.list( + 2, // limit + null, // before + null, // after + null, // include + null, // dateCreated + null // metadata + ); } catch (ApiException e) { - e.printStackTrace(); + e.printStackTrace(); } label: JAVA - lang: Elixir source: | - Lob.Address.delete("adr_43769b47aed248c2") + Lob.BankAccount.list(%{limit: 2}) label: ELIXIR - lang: CSharp source: | - AddressesApi api = new AddressesApi(config); + BankAccountsApi api = new BankAccountsApi(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 { - AddressDeletion response = api.delete("adr_43769b47aed248c2"); + BankAccountList 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: > + 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() - - + BankAccountList = apiClient.BankAccountsApi.List(context).Execute() if err != nil { return err } label: GO - /bank_accounts/{bank_id}/verify: - parameters: - - in: path - name: bank_id - description: id of the bank account to be verified - required: true - schema: - $ref: '#/components/schemas/bank_id' post: - operationId: bank_account_verify - summary: Verify - description: Verify a bank account in order to create a check. + 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". tags: - Bank Accounts requestBody: @@ -14444,25 +3622,41 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/bank_account_verify' + $ref: '#/components/schemas/bank_account_base' example: - amounts: - - 1 - - 100 + description: Test Bank Account + routing_number: '322271627' + account_number: '123456789' + signatory: Jane Doe + account_type: individual + metadata: + spiffy: 'true' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/bank_account_verify' + $ref: '#/components/schemas/bank_account_base' example: - amounts: - - 1 - - 100 + description: Test Bank Account + routing_number: '322271627' + account_number: '123456789' + signatory: Jane Doe + account_type: individual + metadata: + spiffy: 'true' + encoding: + metadata: + style: deepObject + explode: true multipart/form-data: schema: - $ref: '#/components/schemas/bank_account_verify' + $ref: '#/components/schemas/bank_account_base' example: - amounts: - - 1 - - 100 + description: Test Bank Account + routing_number: '322271627' + account_number: '123456789' + signatory: Jane Doe + account_type: individual + metadata: + spiffy: 'true' responses: '200': $ref: '#/components/responses/post_bank_account' @@ -14470,2557 +3664,2768 @@ 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 \ -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \ - -d "amounts[]=25" \ - -d "amounts[]=63" + -d "description=Test Bank Account" \ + -d "routing_number=322271627" \ + -d "account_number=123456789" \ + -d "signatory=John Doe" \ + -d "account_type=company" label: CURL - lang: Typescript source: | - const verificationData = new BankAccountVerify({ - amounts: [11, 35], + const bankAccountCreate = new BankAccountWritable({ + description: 'Test Bank Account', + routing_number: '322271627', + account_number: '123456789', + signatory: 'Gomez Addams', + account_type: BankTypeEnum.Individual }); try { - const verifiedAccount = await new BankAccountsApi(config).verify('bank_xxxx', verificationData); + const myBankAcount = await new BankAccountsApi(config).create(bankAccountCreate); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.bankAccounts.verify('bank_dfceb4a2a05b57e', { - amounts: [25, 63] + Lob.bankAccounts.create({ + description: 'Test Bank Account', + routing_number: 322271627, + account_number: 123456789, + signatory: 'John Doe', + account_type: 'company' }, function (err, res) { console.log(err, res); }); label: NODE - lang: Ruby source: | - verificationData = BankAccountVerify.new({ - amounts: [ - 25, - 63, - ], - }) + bankAccountCreate = BankAccountWritable.new({ + description: "Test Bank Account", + routing_number: "322271627", + account_number: "123456789", + signatory: "John Doe", + account_type: BankTypeEnum::COMPANY, + }); - bankAccountsApi = BankAccountsApi.new(config) + bankAccountApi = BankAccountsApi.new(config) begin - verifiedAccount = bankAccountsApi.verify("bank_dfceb4a2a05b57e", verificationData) + createdBankAccount = bankAccountApi.create(bankAccountCreate) rescue => err p err.message end label: RUBY - lang: Python source: | - verification_data = BankAccountVerify( - amounts = [ - 25, - 63, - ], + bank_account_writable = BankAccountWritable( + description = "Test Bank Account", + routing_number = "322271627", + account_number = "123456789", + signatory = "John Doe", + account_type = BankTypeEnum("company"), ) with ApiClient(configuration) as api_client: api = BankAccountsApi(api_client) try: - verified_account = api.verify("bank_dfceb4a2a05b57e", verification_data) + created_bank_account = api.create(bank_account_writable) except ApiException as e: print(e) label: PYTHON - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\BankAccountsApi($config, new - GuzzleHttp\Client()); - - - $bankVerify = new OpenAPI\Client\Model\BankAccountVerify(); - - $bankVerify->setAmounts([ - 25, - 63, - ]); - + 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", + "account_number" => "123456789", + "signatory" => "John Doe", + "account_type" => "company", + ) + ); try { - $result = $apiInstance->verify( - "bank_dfceb4a2a05b57e", $bankVerify - ); + $result = $apiInstance->create($bank_account_writable); } catch (Exception $e) { echo $e->getMessage(), PHP_EOL; } - lang: Java source: | - BankAccountVerify verification = new BankAccountVerify(); - verification.addAmountsItem(25); - verification.addAmountsItem(63); - BankAccountsApi apiInstance = new BankAccountsApi(config); try { - apiInstance.verify("bank_dfceb4a2a05b57e", verification); + BankAccountWritable bankAccountWritable = new BankAccountWritable(); + bankAccountWritable.setDescription("Test Bank Account"); + bankAccountWritable.setRoutingNumber("322271627"); + bankAccountWritable.setAccountNumber("123456789"); + bankAccountWritable.setSignatory("John Doe"); + bankAccountWritable.setAccountType(BankTypeEnum.COMPANY); + + BankAccount result = apiInstance.create(bankAccountWritable); } catch (ApiException e) { e.printStackTrace(); } label: JAVA - lang: Elixir source: | - Lob.BankAccount.verify("bank_dfceb4a2a05b57e", %{amounts: [25, 63]}) + Lob.BankAccount.create(%{ + description: "Test Bank Account", + routing_number: "322271627", + account_number: "123456789", + signatory: "John Doe", + account_type: "company" + }) label: ELIXIR - lang: CSharp source: | - List amounts = new List(); - amounts.Add(25); - amounts.Add(63); - - BankAccountVerify verification = new BankAccountVerify(amounts); - - BankAccountsApi api = new BankAccountsApi(config); + BankAccountsApi api = new BankAccountsApi(config); + + BankAccountWritable bankAccountWritable = new BankAccountWritable( + "Test Bank Account", // description + "322271627", // routingNumber + "123456789", // accountNumber + BankTypeEnum.Company, // accountType + "John Doe" // signatory + ); + + try { + BankAccount result = api.create(bankAccountWritable); + } 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 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() + + if err != nil { + return err + } + label: GO + /billing_groups/{bg_id}: + parameters: + - in: path + name: bg_id + description: id of the billing_group + required: true + schema: + $ref: '#/components/schemas/bg_id' + 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. + tags: + - Billing Groups + responses: + '200': + description: Returns a billing_group object. + 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 + default: + $ref: '#/components/responses/billing_group_list_error' + x-codeSamples: + - lang: Shell + source: | + curl https://api.lob.com/v1/billing_groups/bg_4bb02b527a72667d0 \ + -u : + - lang: Ruby + source: | + billingGroupApi = BillingGroupsApi.new(config) - try { - BankAccount verified_account = api.verify("bank_dfceb4a2a05b57e", verification); - } catch (ApiException e) { - Console.WriteLine(e.ToString()); - } - label: CSHARP + begin + retrievedBillingGroup = billingGroupApi.get("bg_4bb02b527a72667d0") + 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) + fetchedBillingGroup, _, err := apiClient.BillingGroupsApi.Get(context,"bg_4bb02b527a72667d0").Execute() - var bankAccountWritable = *lob.NewBankAccountWritable("322271627", - "123456789", lob.BANKTYPEENUM_INDIVIDUAL, "Sinead Connor") - - - createdBankAccount, _, _ := - apiClient.BankAccountsApi.Create(context).BankAccountWritable(bankAccountWritable).Execute() - + if err != nil { + return err + } + label: GO + post: + operationId: billing_group_update + summary: Update + description: Updates all editable attributes of the billing_group with the given id. + tags: + - Billing Groups + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/billing_group_base' + example: + name: Marketing Dept + description: Usage group used for the Marketing Dept resource sends + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/billing_group_base' + example: + name: Marketing Dept + description: Usage group used for the Marketing Dept resource sends + multipart/form-data: + schema: + $ref: '#/components/schemas/billing_group_base' + example: + name: Marketing Dept + description: Usage group used for the Marketing Dept resource sends + x-codeSamples: + - lang: Shell + source: | + curl https://api.lob.com/v1/billing_groups/bg_759954f540a1bfdb5 \ + -u : \ + -d "description=demo replacement" \ + - lang: Ruby + source: | + billingGroupEditable = BillingGroupEditable.new({ + description: "demo replacement", + }) - verifyAmounts := []int32{11, 35} + bgApi = BillingGroupsApi.new(config) - verify := *lob.NewBankAccountVerify(verifyAmounts) + begin + updatedBillingGroup = bgApi.update("bg_759954f540a1bfdb5", billingGroupEditable) + 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) - verifiedAccount, _, err := apiClient.BankAccountsApi.Verify(context, - createdBankAccount.Id).BankAccountVerify(verify).Execute() + var bgEditable = *lob.NewBillingGroupEditable("Test Billing group") + 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() if err != nil { return err } label: GO - /bank_accounts/{bank_id}: - parameters: - - in: path - name: bank_id - description: id of the bank account - required: true - schema: - $ref: '#/components/schemas/bank_id' + responses: + '200': + $ref: '#/components/responses/post_billing_group' + default: + $ref: '#/components/responses/billing_group_error' + /billing_groups: 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. + 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. tags: - - Bank Accounts + - Billing Groups + parameters: + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/include' + - $ref: '#/components/parameters/date_created' + - $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. + schema: + allOf: + - type: object + properties: + date_created: + type: string + enum: + - asc + - desc + date_modified: + type: string + enum: + - asc + - desc + - oneOf: + - required: + - date_created + - required: + - date_modified responses: '200': - description: Returns a bank account object + description: Returns a list of billing_groups. content: application/json: schema: - $ref: '#/components/schemas/bank_account' + allOf: + - $ref: '#/components/schemas/list' + - type: object + properties: + data: + type: array + description: list of billing_groups + items: + $ref: '#/components/schemas/billing_group' 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 + data: + - id: bg_d5a5a89da9106f8 + description: Test billing_group + metadata: {} + date_created: '2019-07-27T23:49:01.511Z' + date_modified: '2019-07-27T23:49:01.511Z' + object: billing_group + - id: bg_59b2150ae120887 + description: Test billing_group + metadata: {} + date_created: '2019-03-29T10:22:34.642Z' + date_modified: '2019-03-29T10:22:34.642Z' + object: billing_group + object: list + next_url: null + prev_url: null + count: 2 default: - $ref: '#/components/responses/bank_account_error' + $ref: '#/components/responses/billing_group_list_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/bank_accounts/bank_8cad8df5354d33f \ - -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: - label: CURL - - lang: Typescript + curl -X GET "https://api.lob.com/v1/billing_groups?limit=2" \ + -u : + - lang: Ruby source: | - try { - const bankAccount = await new BankAccountsApi(config).get('bank_xxxx'); - } catch (err: any) { - console.error(err); + billingGroupsApi = BillingGroupsApi.new(config) + + begin + billingGroups = billingGroupsApi.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) + BillingGroupList = apiClient.BillingGroupsApi.List(context).Execute() + if err != nil { + return err } - label: TYPESCRIPT - - lang: Javascript - source: > - Lob.bankAccounts.retrieve('bank_8cad8df5354d33f', function (err, - res) { - console.log(err, res); - }); - label: NODE + label: GO + post: + operationId: billing_group_create + summary: Create + description: Creates a new billing_group with the provided properties. + tags: + - Billing Groups + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/billing_group_editable' + example: + name: Marketing Dept + description: Usage group used for the Marketing Dept resource sends + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/billing_group_editable' + example: + name: Marketing Dept + description: Usage group used for the Marketing Dept resource sends + multipart/form-data: + schema: + $ref: '#/components/schemas/billing_group_editable' + example: + name: Marketing Dept + description: Usage group used for the Marketing Dept resource sends + responses: + '200': + $ref: '#/components/responses/post_billing_group' + default: + $ref: '#/components/responses/billing_group_error' + x-codeSamples: + - lang: Shell + 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" - lang: Ruby source: | - bankAccountApi = BankAccountsApi.new(config) + bgCreate = BillingGroupEditable.new({ + description: "Usage group used for the Marketing Department's resource sends", + name: "Marketing Department", + }); + + bgApi = BillingGroupsApi.new(config) begin - retrievedBankAccount = bankAccountApi.get("bank_8cad8df5354d33f") + createdBillingGroup = bgApi.create(bgCreate) rescue => err p err.message end label: RUBY - - lang: Python + - lang: Go source: | - with ApiClient(configuration) as api_client: - api = BankAccountsApi(api_client) + var context = context.Background() + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) - try: - bank_account = api.get("bank_8cad8df5354d33f") - except ApiException as e: - print(e) - label: PYTHON - - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\BankAccountsApi($config, new - GuzzleHttp\Client()); + var apiClient = *lob.NewAPIClient(configuration) - try { - $result = $apiInstance->get("bank_8cad8df5354d33f"); - } catch (Exception $e) { - echo $e->getMessage(), PHP_EOL; - } - - lang: Java - source: | - BankAccountsApi apiInstance = new BankAccountsApi(config); + var bgCreate = *lob.NewBillingGroupEditable() + bgCreate.SetDescription("Usage group used for the Marketing Department's resource sends") + bgCreate.SetName("Marketing Department") - try { - BankAccount response = apiInstance.get("bank_8cad8df5354d33f"); - } catch (ApiException e) { - e.printStackTrace(); + + + createdbg, _, err := apiClient.BillingGroupsApi.Create(context).BillingGroupEditable(bgCreate).Execute() + + if err != nil { + return err } - label: JAVA - - lang: Elixir + 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: | - Lob.BankAccount.find("bank_8cad8df5354d33f") - label: ELIXIR - - lang: CSharp + 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: | - BankAccountsApi api = new BankAccountsApi(config); - - try { - BankAccount response = api.get("bank_8cad8df5354d33f"); - } 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) - - - fetchedBankAccount, _, err := - apiClient.BankAccountsApi.Get(context,"bank_8cad8df5354d33f").Execute() - - - if err != nil { - return err - } - label: GO - delete: - operationId: bank_account_delete - summary: Delete - description: Permanently deletes a bank account. It cannot be undone. + 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. tags: - - Bank Accounts + - Buckslips + parameters: + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/before_after' + - $ref: '#/components/parameters/include' responses: '200': - $ref: '#/components/responses/bank_account_deleted' + description: Returns a list of buckslip objects + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/list' + - type: object + properties: + data: + type: array + description: list of buckslips + items: + $ref: '#/components/schemas/buckslip' + example: + data: + - id: bck_7a6d73c5c8457fc + account_id: fa9ea650fc7b31a89f92 + description: null + 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 + 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 + available_quantity: 0 + allocated_quantity: 0 + onhand_quantity: 0 + pending_quantity: 0 + projected_quantity: 0 + buckslip_orders: [] + stock: text + weight: 80# + finish: gloss + status: rendered + mode: test + 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: buckslip + object: list + previous_url: null + next_url: null + count: 1 default: - $ref: '#/components/responses/bank_account_error' + $ref: '#/components/responses/buckslip_error' x-codeSamples: - lang: Shell - source: > - curl -X DELETE - https://api.lob.com/v1/bank_accounts/bank_3e64d9904356b20 \ - -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: - label: CURL - - lang: Typescript - source: | - try { - const deleteBankAccount = await new BankAccountsApi(config).delete('bank_xxxx'); - } catch (err: any) { - console.error(err); - } - label: TYPESCRIPT - - lang: Javascript - source: > - Lob.bankAccounts.delete('bank_3e64d9904356b20', function (err, res) - { - console.log(err, res); - }); - label: NODE - - lang: Ruby - source: | - bankAccountApi = BankAccountsApi.new(config) - - begin - deletedBankAccount = bankAccountApi.delete("bank_3e64d9904356b20") - rescue => err - p err.message - end - label: RUBY - - lang: Python - source: | - with ApiClient(configuration) as api_client: - api = BankAccountsApi(api_client) - - try: - deleted_resource = api.delete("bank_3e64d9904356b20") - except ApiException as e: - print(e) - label: PYTHON - - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\BankAccountsApi($config, new - GuzzleHttp\Client()); - - - try { - $result = $apiInstance->delete("bank_3e64d9904356b20"); - } catch (Exception $e) { - echo $e->getMessage(), PHP_EOL; - } - - lang: Java - source: | - BankAccountsApi apiInstance = new BankAccountsApi(config); - - try { - BankAccountDeletion response = apiInstance.delete("bank_3e64d9904356b20"); - } catch (ApiException e) { - e.printStackTrace(); - } - label: JAVA - - lang: Elixir - source: | - Lob.BankAccount.destroy("bank_3e64d9904356b20") - label: ELIXIR - - lang: CSharp source: | - BankAccountsApi api = new BankAccountsApi(config); - - try { - BankAccountDeletion response = api.delete("bank_3e64d9904356b20"); - } 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) - - - deletedBankAccount, _, err := - apiClient.BankAccountsApi.Delete(context, - "bank_3e64d9904356b20").Execute() - - - if err != nil { - return err - } - label: GO - /bank_accounts: + curl -X GET "https://api.lob.com/v1/buckslips?limit=2" \ + -u : + label: CURL + post: + operationId: buckslip_create + summary: Create + description: Creates a new buckslip given information + tags: + - Buckslips + requestBody: + required: true + content: + application/json: + 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 + 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 + 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 + responses: + '200': + description: Buckslip created successfully + content: + application/json: + schema: + $ref: '#/components/schemas/buckslip' + examples: + basic: + value: + 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 + 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 + 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 + available_quantity: 0 + allocated_quantity: 0 + onhand_quantity: 0 + pending_quantity: 0 + projected_quantity: 0 + buckslip_orders: [] + stock: text + weight: 80# + finish: gloss + status: rendered + mode: test + 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: buckslip + default: + $ref: '#/components/responses/buckslip_error' + x-codeSamples: + - lang: Shell + source: | + curl https://api.lob.com/v1/buckslips \ + -u : \ + -d "description=Test buckslip" \ + -d "front=https://s3-us-west-2.amazonaws.com/public.lob.com/assets/buckslip.pdf" \ + -d "back=https://s3-us-west-2.amazonaws.com/public.lob.com/assets/buckslip.pdf" + label: CURL + /buckslips/{buckslip_id}: + parameters: + - in: path + name: buckslip_id + description: id of the buckslip + required: true + schema: + $ref: '#/components/schemas/buckslip_id' 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. + 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. tags: - - Bank Accounts - parameters: - - $ref: '#/components/parameters/limit' - - $ref: '#/components/parameters/before_after' - - $ref: '#/components/parameters/include' - - $ref: '#/components/parameters/date_created' - - $ref: '#/components/parameters/metadata' + - Buckslips responses: '200': - $ref: '#/components/responses/all_bank_accounts' + description: Returns a buckslip object + content: + application/json: + schema: + $ref: '#/components/schemas/buckslip' + examples: + basic: + value: + 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 + 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 + 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 + available_quantity: 0 + allocated_quantity: 0 + onhand_quantity: 0 + pending_quantity: 0 + projected_quantity: 0 + buckslip_orders: [] + stock: text + weight: 80# + finish: gloss + status: rendered + mode: test + 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: buckslip default: - $ref: '#/components/responses/bank_account_error' + $ref: '#/components/responses/buckslip_error' x-codeSamples: - lang: Shell source: | - curl -X GET "https://api.lob.com/v1/bank_accounts?limit=2" \ - -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: + curl https://api.lob.com/v1/buckslips/bck_7a6d73c5c8457fc \ + -u : label: CURL - - lang: Typescript - source: | - try { - const bankaccounts = await new BankaccountsApi(config).list(2); - } catch (err: any) { - console.error(err); - } - label: TYPESCRIPT - - lang: Javascript - source: | - Lob.bankAccounts.list({limit: 2}, function (err, res) { - console.log(err, res); - }); - label: NODE - - lang: Ruby - source: | - bankAccountsApi = BankAccountsApi.new(config) - - begin - bankAccounts = bankAccountsApi.list({ limit: 2 }) - rescue => err - p err.message - end - label: RUBY - - lang: Python - source: | - with ApiClient(configuration) as api_client: - api = BankAccountsApi(api_client) - - try: - bank_accounts = api.list(limit=2) - except ApiException as e: - print(e) - label: PYTHON - - lang: PHP - source: > - $apiInstance = new OpenAPI\Client\Api\BankAccountsApi($config, new - GuzzleHttp\Client()); - - - try { - $result = $apiInstance->list( - 2, // limit - ); - } catch (Exception $e) { - echo $e->getMessage(), PHP_EOL; - } - - lang: Java - source: | - BankAccountsApi apiInstance = new BankAccountsApi(config); - - try { - BankAccountList 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.BankAccount.list(%{limit: 2}) - label: ELIXIR - - lang: CSharp - source: > - BankAccountsApi api = new BankAccountsApi(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 { - BankAccountList 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) - - BankAccountList = apiClient.BankAccountsApi.List(context).Execute() - - if err != nil { - return err - } - label: GO - 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". + 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. tags: - - Bank Accounts + - Buckslips requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/bank_account_base' + $ref: '#/components/schemas/buckslip_updatable' example: - description: Test Bank Account - routing_number: '322271627' - account_number: '123456789' - signatory: Jane Doe - account_type: individual - metadata: - spiffy: 'true' + description: Test buckslip + auto_reorder: true application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/bank_account_base' + $ref: '#/components/schemas/buckslip_updatable' example: - description: Test Bank Account - routing_number: '322271627' - account_number: '123456789' - signatory: Jane Doe - account_type: individual - metadata: - spiffy: 'true' - encoding: - metadata: - style: deepObject - explode: true + description: Test buckslip + auto_reorder: true multipart/form-data: schema: - $ref: '#/components/schemas/bank_account_base' + $ref: '#/components/schemas/buckslip_updatable' example: - description: Test Bank Account - routing_number: '322271627' - account_number: '123456789' - signatory: Jane Doe - account_type: individual - metadata: - spiffy: 'true' + description: Test buckslip + auto_reorder: true + responses: + '200': + description: Returns a buckslip object + content: + application/json: + schema: + $ref: '#/components/schemas/buckslip' + examples: + basic: + value: + 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 + 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 + 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 + available_quantity: 0 + allocated_quantity: 0 + onhand_quantity: 0 + pending_quantity: 0 + projected_quantity: 0 + buckslip_orders: [] + stock: text + weight: 80# + finish: gloss + status: rendered + mode: test + 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: buckslip + default: + $ref: '#/components/responses/buckslip_error' + x-codeSamples: + - lang: Shell + source: | + curl -X PATCH https://api.lob.com/v1/buckslips/bck_7a6d73c5c8457fc \ + -u : \ + -d "description=Awesome buckslip" \ + -d "auto_reorder=true" + label: CURL + delete: + operationId: buckslip_delete + summary: Delete + description: Delete an existing buckslip. You need only supply the unique identifier that was returned upon buckslip creation. + tags: + - Buckslips responses: '200': - $ref: '#/components/responses/post_bank_account' + $ref: '#/components/responses/buckslip_deleted' default: - $ref: '#/components/responses/bank_account_error' + $ref: '#/components/responses/buckslip_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/bank_accounts \ - -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \ - -d "description=Test Bank Account" \ - -d "routing_number=322271627" \ - -d "account_number=123456789" \ - -d "signatory=John Doe" \ - -d "account_type=company" + curl -X DELETE https://api.lob.com/v1/buckslips/bck_7a6d73c5c8457fc \ + -u : label: CURL - - lang: Typescript - source: | - const bankAccountCreate = new BankAccountWritable({ - description: 'Test Bank Account', - routing_number: '322271627', - account_number: '123456789', - signatory: 'Gomez Addams', - account_type: BankTypeEnum.Individual - }); - - try { - const myBankAcount = await new BankAccountsApi(config).create(bankAccountCreate); - } catch (err: any) { - console.error(err); - } - label: TYPESCRIPT - - lang: Javascript - source: | - Lob.bankAccounts.create({ - description: 'Test Bank Account', - routing_number: 322271627, - account_number: 123456789, - signatory: 'John Doe', - account_type: 'company' - }, function (err, res) { - console.log(err, res); - }); - label: NODE - - lang: Ruby - source: | - bankAccountCreate = BankAccountWritable.new({ - description: "Test Bank Account", - routing_number: "322271627", - account_number: "123456789", - signatory: "John Doe", - account_type: BankTypeEnum::COMPANY, - }); - - bankAccountApi = BankAccountsApi.new(config) - - begin - createdBankAccount = bankAccountApi.create(bankAccountCreate) - rescue => err - p err.message - end - label: RUBY - - lang: Python - source: | - bank_account_writable = BankAccountWritable( - description = "Test Bank Account", - routing_number = "322271627", - account_number = "123456789", - signatory = "John Doe", - account_type = BankTypeEnum("company"), - ) - - with ApiClient(configuration) as api_client: - api = BankAccountsApi(api_client) - - try: - created_bank_account = api.create(bank_account_writable) - except ApiException as e: - 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( - array( - "description" => "Test Bank Account", - "routing_number" => "322271627", - "account_number" => "123456789", - "signatory" => "John Doe", - "account_type" => "company", - ) - ); - - - try { - $result = $apiInstance->create($bank_account_writable); - } catch (Exception $e) { - echo $e->getMessage(), PHP_EOL; - } - - lang: Java - source: | - BankAccountsApi apiInstance = new BankAccountsApi(config); - - try { - BankAccountWritable bankAccountWritable = new BankAccountWritable(); - bankAccountWritable.setDescription("Test Bank Account"); - bankAccountWritable.setRoutingNumber("322271627"); - bankAccountWritable.setAccountNumber("123456789"); - bankAccountWritable.setSignatory("John Doe"); - bankAccountWritable.setAccountType(BankTypeEnum.COMPANY); - - BankAccount result = apiInstance.create(bankAccountWritable); - } catch (ApiException e) { - e.printStackTrace(); - } - label: JAVA - - lang: Elixir - source: | - Lob.BankAccount.create(%{ - description: "Test Bank Account", - routing_number: "322271627", - account_number: "123456789", - signatory: "John Doe", - account_type: "company" - }) - label: ELIXIR - - lang: CSharp - source: | - BankAccountsApi api = new BankAccountsApi(config); - - BankAccountWritable bankAccountWritable = new BankAccountWritable( - "Test Bank Account", // description - "322271627", // routingNumber - "123456789", // accountNumber - BankTypeEnum.Company, // accountType - "John Doe" // signatory - ); - - try { - BankAccount result = api.create(bankAccountWritable); - } 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 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() - - - if err != nil { - return err - } - label: GO - /billing_groups/{bg_id}: + /buckslips/{buckslip_id}/orders: parameters: - in: path - name: bg_id - description: id of the billing_group + name: buckslip_id + description: The ID of the buckslip to which the buckslip orders belong. required: true schema: - $ref: '#/components/schemas/bg_id' + $ref: '#/components/schemas/buckslip_id' get: - operationId: billing_group_retrieve + operationId: buckslip_orders_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 buckslip orders associated with the given buckslip id. tags: - - Billing Groups + - Buckslip Orders + parameters: + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/offset' + responses: + '200': + description: Returns the buckslip orders associated with the given buckslip id + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/list' + - type: object + properties: + data: + type: array + description: List of buckslip orders + items: + $ref: '#/components/schemas/buckslip_order' + example: + data: + - id: bo_e0f8a0562a06bea7f + buckslip_id: bck_6afffd19045076c + status: available + quantity_ordered: 5000 + 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: buckslip_order + object: list + next_url: null + previous_url: null + count: 1 + default: + $ref: '#/components/responses/buckslip_order_error' + x-codeSamples: + - lang: Shell + source: | + curl https://api.lob.com/v1/buckslips/bck_6afffd19045076c/orders/ \ + -u : + label: CURL + post: + operationId: buckslip_order_create + summary: Create + description: Creates a new buckslip order given information + tags: + - Buckslip Orders + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/buckslip_order_editable' + example: + quantity: 10000 + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/buckslip_order_editable' + example: + quantity: 10000 + multipart/form-data: + schema: + $ref: '#/components/schemas/buckslip_order_editable' + example: + quantity: 10000 responses: '200': - description: Returns a billing_group object. + description: Buckslip order created successfully 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 + $ref: '#/components/schemas/buckslip_order' + examples: + basic: + value: + id: bo_e0f8a0562a06bea7f + buckslip_id: bck_6afffd19045076c + status: available + 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: buckslip_order default: - $ref: '#/components/responses/billing_group_list_error' + $ref: '#/components/responses/buckslip_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/billing_groups/bg_4bb02b527a72667d0 \ - -u : - - lang: Ruby - source: | - billingGroupApi = BillingGroupsApi.new(config) - - begin - retrievedBillingGroup = billingGroupApi.get("bg_4bb02b527a72667d0") - 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) - - - fetchedBillingGroup, _, err := - apiClient.BillingGroupsApi.Get(context,"bg_4bb02b527a72667d0").Execute() - - - if err != nil { - return err - } - label: GO + curl https://api.lob.com/v1/buckslips/bck_6afffd19045076c/orders \ + -u : \ + -d "quantity=10000" + label: CURL + /bulk/us_verifications: post: - operationId: billing_group_update - summary: Update - description: Updates all editable attributes of the billing_group with the given id. + 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. tags: - - Billing Groups + - US Verifications + 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 `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/billing_group_base' + $ref: '#/components/schemas/multiple_components_list' example: - name: Marketing Dept - description: Usage group used for the Marketing Dept resource sends + addresses: + - primary_line: 210 King Street + city: San Francisco + state: CA + zip_code: '94107' + - recipient: Walgreens + primary_line: Ave Wilson Churchill 123 + secondary_line: '' + urbanization: URB FAIR OAKS + city: RIO PIEDRAS + state: PR + zip_code: '00926' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/billing_group_base' + $ref: '#/components/schemas/multiple_components_list' example: - name: Marketing Dept - description: Usage group used for the Marketing Dept resource sends + addresses: + - primary_line: 210 King Street + city: San Francisco + state: CA + zip_code: '94107' + - recipient: Walgreens + primary_line: Ave Wilson Churchill 123 + secondary_line: '' + urbanization: URB FAIR OAKS + city: RIO PIEDRAS + state: PR + zip_code: '00926' multipart/form-data: schema: - $ref: '#/components/schemas/billing_group_base' + $ref: '#/components/schemas/multiple_components_list' example: - name: Marketing Dept - description: Usage group used for the Marketing Dept resource sends - x-codeSamples: - - lang: Shell - source: | - curl https://api.lob.com/v1/billing_groups/bg_759954f540a1bfdb5 \ - -u : \ - -d "description=demo replacement" \ - - lang: Ruby - source: | - billingGroupEditable = BillingGroupEditable.new({ - description: "demo replacement", - }) - - bgApi = BillingGroupsApi.new(config) - - begin - updatedBillingGroup = bgApi.update("bg_759954f540a1bfdb5", billingGroupEditable) - 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 bgEditable = *lob.NewBillingGroupEditable("Test Billing group") - - 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() - - - if err != nil { - return err - } - label: GO - responses: - '200': - $ref: '#/components/responses/post_billing_group' - default: - $ref: '#/components/responses/billing_group_error' - /billing_groups: - 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. - tags: - - Billing Groups - parameters: - - $ref: '#/components/parameters/limit' - - $ref: '#/components/parameters/offset' - - $ref: '#/components/parameters/include' - - $ref: '#/components/parameters/date_created' - - $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. - schema: - allOf: - - type: object - properties: - date_created: - type: string - enum: - - asc - - desc - date_modified: - type: string - enum: - - asc - - desc - - oneOf: - - required: - - date_created - - required: - - date_modified + addresses: + - primary_line: 210 King Street + city: San Francisco + state: CA + zip_code: '94107' + - recipient: Walgreens + primary_line: Ave Wilson Churchill 123 + secondary_line: '' + urbanization: URB FAIR OAKS + city: RIO PIEDRAS + state: PR + zip_code: '00926' responses: '200': - description: Returns a list of billing_groups. - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/list' - - type: object - properties: - data: - type: array - description: list of billing_groups - items: - $ref: '#/components/schemas/billing_group' - example: - data: - - id: bg_d5a5a89da9106f8 - description: Test billing_group - metadata: {} - date_created: '2019-07-27T23:49:01.511Z' - date_modified: '2019-07-27T23:49:01.511Z' - object: billing_group - - id: bg_59b2150ae120887 - description: Test billing_group - metadata: {} - date_created: '2019-03-29T10:22:34.642Z' - date_modified: '2019-03-29T10:22:34.642Z' - object: billing_group - object: list - next_url: null - prev_url: null - count: 2 + $ref: '#/components/responses/bulk_us_verifications' default: - $ref: '#/components/responses/billing_group_list_error' + $ref: '#/components/responses/us_verifications_error' x-codeSamples: - lang: Shell source: | - curl -X GET "https://api.lob.com/v1/billing_groups?limit=2" \ - -u : + curl https://api.lob.com/v1/bulk/us_verifications \ + -u : \ + --header 'Content-Type: application/x-www-form-urlencoded' \ + --data-urlencode 'addresses[0][primary_line]=210 King Street' \ + --data-urlencode 'addresses[0][city]=San Francisco' \ + --data-urlencode 'addresses[0][state]=CA' \ + --data-urlencode 'addresses[0][zip_code]=94017' + label: CURL + - lang: Typescript + source: | + const UsVerifications = new USVerificationsApi(av_config); + const verificationData1: UsVerificationsWritable = { + primary_line: '210 King St', + city: 'San Francisco', + state: 'CA', + zip_code: '94107' + }; + const verificationData2: UsVerificationsWritable = { + primary_line: '185 BERRY ST STE 6600', + city: 'SAN FRANCISCO', + state: 'CA', + zip_code: '94107' + }; + const addressList: MultipleComponentsList = { + addresses: [verificationData1, verificationData2], + }; + + try { + const bulkVerified = await UsVerifications.verifyBulk(addressList); + } catch (err: any) { + console.error(err); + } + label: TYPESCRIPT + - lang: Javascript + source: | + Lob.bulkUSVerifications.verify({ + addresses: [{ + primary_line: '210 King St', + city: 'San Francisco', + state: 'CA', + zip_code: '94107' + }] + }), function (err, res) { + console.log(err, res); + }); + label: NODE - lang: Ruby source: | - billingGroupsApi = BillingGroupsApi.new(config) + usVerificationsApi = UsVerificationsApi.new(config) + + verificationData0 = MultipleComponents.new({ + primary_line: "210 King Street", + city: "San Francisco", + state: "CA", + zip_code: "94017", + }) + + verificationData1 = MultipleComponents.new({ + primary_line: "185 BERRY ST STE 6600", + city: "SAN FRANCISCO", + state: "CA", + zip_code: "94017", + }) + + + addressList = MultipleComponentsList.new({ + addresses: [ + verificationData0, + verificationData1, + ], + }) begin - billingGroups = billingGroupsApi.list({ limit: 2 }) + bulkVerifiedAddrs = usVerificationsApi.verifyBulk(addressList) rescue => err p err.message end label: RUBY - - lang: Go - source: > - var context = context.Background() + - lang: Python + source: | + with ApiClient(configuration) as api_client: + api = UsVerificationsApi(api_client) - context = context.WithValue(suite.ctx, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) + verification_data_0 = MultipleComponents( + primary_line = "210 King Street", + city = "San Francisco", + state = "CA", + zip_code = "94017", + ) + verification_data_1 = MultipleComponents( + primary_line = "185 BERRY ST STE 6600", + city = "SAN FRANCISCO", + state = "CA", + zip_code = "94017", + ) - var apiClient = *lob.NewAPIClient(configuration) - BillingGroupList = - apiClient.BillingGroupsApi.List(context).Execute() + address_list = MultipleComponentsList( + addresses = [ + verification_data_0, + verification_data_1, + ], + ) - if err != nil { - return err + try: + bulk_verified = api.verifyBulk(address_list) + except ApiException as e: + print(e) + label: PYTHON + - lang: PHP + 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( + 'primary_line' => '185 BERRY ST STE 6600', + 'city' => 'SAN FRANCISCO', + 'state' => 'CA', + 'zip_code' => '94017', + )); + + $addressList = new OpenAPI\Client\Model\MultipleComponentsList(array( + 'addresses' => [ + $verificationData0, + $verificationData1, + ] + )); + + try { + $result = $apiInstance->verifyBulk($addressList); + } catch (Exception $e) { + echo $e->getMessage(), PHP_EOL; } - label: GO + - lang: Java + source: | + MultipleComponentsList bulkVerify = new MultipleComponentsList(); + MultipleComponents bulkAddress0 = new MultipleComponents(); + bulkAddress0.setPrimaryLine("210 King Street"); + bulkAddress0.setCity("San Francisco"); + bulkAddress0.setState("CA"); + bulkAddress0.setZipCode("94017"); + bulkVerify.addAddressesItem(bulkAddress0); + + MultipleComponents bulkAddress1 = new MultipleComponents(); + bulkAddress1.setPrimaryLine("185 BERRY ST STE 6600"); + bulkAddress1.setCity("SAN FRANCISCO"); + bulkAddress1.setState("CA"); + bulkAddress1.setZipCode("94017"); + bulkVerify.addAddressesItem(bulkAddress1); + + UsVerificationsApi apiInstance = new UsVerificationsApi(config); + try { + UsVerifications bulkVerifyResponse = apiInstance.verifyBulk(bulkVerify, null); + } catch (ApiException e) { + e.printStackTrace(); + } + label: JAVA + - lang: Elixir + source: | + 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: billing_group_create - summary: Create - description: Creates a new billing_group with the provided properties. + 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: - - Billing Groups + - Intl Verifications requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/billing_group_editable' - example: - name: Marketing Dept - description: Usage group used for the Marketing Dept resource sends - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/billing_group_editable' + $ref: '#/components/schemas/intl_verifications_payload' example: - name: Marketing Dept - description: Usage group used for the Marketing Dept resource sends + 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/billing_group_editable' + $ref: '#/components/schemas/intl_verifications_payload' example: - name: Marketing Dept - description: Usage group used for the Marketing Dept resource sends + 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/post_billing_group' + $ref: '#/components/responses/bulk_intl_verifications' default: - $ref: '#/components/responses/billing_group_error' + $ref: '#/components/responses/intl_verifications_error' x-codeSamples: - lang: Shell - source: > - curl https://api.lob.com/v1/billing_groups \ - - -u : \ + 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] + }); - -d "name=Marketing Department" \ + try { + const bulkVerified = await IntlVerifications.verifyBulk(addressList); - -d "description=Usage group used for the Marketing Department's - resource sends" - - lang: Ruby + } catch (err: any) { + console.error(err); + } + label: TYPESCRIPT + - lang: Javascript source: | - bgCreate = BillingGroupEditable.new({ - description: "Usage group used for the Marketing Department's resource sends", - name: "Marketing Department", + 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) - bgApi = BillingGroupsApi.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 - createdBillingGroup = bgApi.create(bgCreate) + bulkVerifiedAddrs = intlVerificationsApi.verifyBulk(addressList) 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("")}) - + - lang: Python + source: | + with ApiClient(configuration) as api_client: + api = IntlVerificationsApi(api_client) - var apiClient = *lob.NewAPIClient(configuration) + 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"), + ) - var bgCreate = *lob.NewBillingGroupEditable() + address_list = IntlVerificationsPayload( + addresses = [ + verification_data_0, + verification_data_1, + ], + ) - bgCreate.SetDescription("Usage group used for the Marketing - Department's resource sends") + 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', + )); - bgCreate.SetName("Marketing Department") + $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 + - 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); - createdbg, _, err := - apiClient.BillingGroupsApi.Create(context).BillingGroupEditable(bgCreate).Execute() + IntlVerificationsPayload bulkVerify = new IntlVerificationsPayload(addresses); + IntlVerificationsApi api = new IntlVerificationsApi(config); - if err != nil { - return err + try { + IntlVerifications bulkVerifyResponse = api.verifyBulk(bulkVerify); + } catch (ApiException e) { + Console.WriteLine(e.ToString()); } - label: GO - /buckslips: + label: CSHARP + /campaigns: get: - operationId: buckslips_list + operationId: campaigns_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 campaigns. The campaigns are returned sorted by creation date, with the most recently created campaigns appearing first. tags: - - Buckslips + - Campaigns parameters: - $ref: '#/components/parameters/limit' - - $ref: '#/components/parameters/before_after' - $ref: '#/components/parameters/include' + - $ref: '#/components/parameters/before_after' responses: '200': - description: Returns a list of buckslip objects - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/list' - - type: object - properties: - data: - type: array - description: list of buckslips - items: - $ref: '#/components/schemas/buckslip' - example: - data: - - id: bck_7a6d73c5c8457fc - account_id: fa9ea650fc7b31a89f92 - description: null - 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 - 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 - available_quantity: 0 - allocated_quantity: 0 - onhand_quantity: 0 - pending_quantity: 0 - projected_quantity: 0 - buckslip_orders: [] - stock: text - weight: 80# - finish: gloss - status: rendered - mode: test - 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: buckslip - object: list - previous_url: null - next_url: null - count: 1 - default: - $ref: '#/components/responses/buckslip_error' + $ref: '#/components/responses/all_campaigns' x-codeSamples: - lang: Shell source: | - curl -X GET "https://api.lob.com/v1/buckslips?limit=2" \ + 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: buckslip_create + operationId: campaign_create summary: Create - description: Creates a new buckslip given information + 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: - - Buckslips + - Campaigns + parameters: + - $ref: '#/components/parameters/lang_spec' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/buckslip_editable' + $ref: '#/components/schemas/campaign_writable' 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 + name: My Demo Campaign + description: My Campaign's description + schedule_type: immediate application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/buckslip_editable' + $ref: '#/components/schemas/campaign_writable' + encoding: + example-prop: + style: deepObject + explode: true 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 + name: My Demo Campaign + description: My Campaign's description + schedule_type: immediate multipart/form-data: schema: - $ref: '#/components/schemas/buckslip_editable' + $ref: '#/components/schemas/campaign_writable' 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 + name: My Demo Campaign + description: My Campaign's description + schedule_type: immediate responses: '200': - description: Buckslip created successfully + description: Campaign created successfully content: application/json: schema: - $ref: '#/components/schemas/buckslip' - examples: - basic: - value: - 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 - 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 - 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 - available_quantity: 0 - allocated_quantity: 0 - onhand_quantity: 0 - pending_quantity: 0 - projected_quantity: 0 - buckslip_orders: [] - stock: text - weight: 80# - finish: gloss - status: rendered - mode: test - 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: buckslip + $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/buckslip_error' + $ref: '#/components/responses/campaigns_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/buckslips \ + curl https://api.lob.com/v1/campaigns \ -u : \ - -d "description=Test buckslip" \ - -d "front=https://s3-us-west-2.amazonaws.com/public.lob.com/assets/buckslip.pdf" \ - -d "back=https://s3-us-west-2.amazonaws.com/public.lob.com/assets/buckslip.pdf" + -d "name=My First Campaign" \ + -d "schedule_type=immediate" label: CURL - /buckslips/{buckslip_id}: + - 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: buckslip_id - description: id of the buckslip + name: cmp_id + description: id of the campaign required: true schema: - $ref: '#/components/schemas/buckslip_id' + $ref: '#/components/schemas/cmp_id' get: - operationId: buckslip_retrieve + operationId: campaign_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 campaign. You need only supply the unique campaign identifier that was returned upon campaign creation. tags: - - Buckslips + - Campaigns responses: '200': - description: Returns a buckslip object + description: Returns a campaign object content: application/json: schema: - $ref: '#/components/schemas/buckslip' - examples: - basic: - value: - 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 - 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 - 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 - available_quantity: 0 - allocated_quantity: 0 - onhand_quantity: 0 - pending_quantity: 0 - projected_quantity: 0 - buckslip_orders: [] - stock: text - weight: 80# - finish: gloss - status: rendered - mode: test - 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: buckslip + $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/buckslip_error' + $ref: '#/components/responses/campaigns_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/buckslips/bck_7a6d73c5c8457fc \ + 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: buckslip_update + operationId: campaign_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 campaign. You need only supply the unique identifier that was returned upon campaign creation. tags: - - Buckslips + - Campaigns requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/buckslip_updatable' + $ref: '#/components/schemas/campaign_updatable' example: - description: Test buckslip - auto_reorder: true + description: Test campaign application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/buckslip_updatable' + $ref: '#/components/schemas/campaign_updatable' example: - description: Test buckslip - auto_reorder: true + description: Test campaign multipart/form-data: schema: - $ref: '#/components/schemas/buckslip_updatable' + $ref: '#/components/schemas/campaign_updatable' example: - description: Test buckslip - auto_reorder: true + description: Test campaign responses: '200': - description: Returns a buckslip object + description: Returns a campaign object content: application/json: schema: - $ref: '#/components/schemas/buckslip' - examples: - basic: - value: - 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 - 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 - 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 - available_quantity: 0 - allocated_quantity: 0 - onhand_quantity: 0 - pending_quantity: 0 - projected_quantity: 0 - buckslip_orders: [] - stock: text - weight: 80# - finish: gloss - status: rendered - mode: test - 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: buckslip + $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/buckslip_error' + $ref: '#/components/responses/campaigns_error' x-codeSamples: - lang: Shell source: | - curl -X PATCH https://api.lob.com/v1/buckslips/bck_7a6d73c5c8457fc \ - -u : \ - -d "description=Awesome buckslip" \ - -d "auto_reorder=true" - label: CURL + curl -X PATCH https://api.lob.com/v1/campaigns/cmp_e05ee61ff80764b \ + -u : \ + -d "description=Awesome campaign" + label: CURL + - lang: Python + source: | + campaign_updatable = CampaignUpdatable( + description = "Awesome campaign", + ) + + with ApiClient(configuration) as api_client: + api = CampaignsApi(api_client) + + try: + updated_campaign = api.update("cmp_e05ee61ff80764b", campaign_updatable) + except ApiException as e: + print(e) + label: PYTHON + - lang: Ruby + source: | + campaignUpdatable = CampaignUpdatable.new({ + description: "Awesome campaign", + }) + + campaignApi = CampaignsApi.new(config) + + begin + updatedCampaign = campaignApi.update("cmp_e05ee61ff80764b", campaignUpdatable) + rescue => err + p err.message + end + label: RUBY delete: - operationId: buckslip_delete + operationId: campaign_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 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: - - Buckslips + - Campaigns responses: '200': - $ref: '#/components/responses/buckslip_deleted' + $ref: '#/components/responses/campaign_deleted' default: - $ref: '#/components/responses/buckslip_error' + $ref: '#/components/responses/campaigns_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/campaigns/cmp_e05ee61ff80764b \ -u : label: CURL - /buckslips/{buckslip_id}/orders: + - lang: Ruby + source: | + campaignApi = CampaignsApi.new(config) + + begin + deletedCampaign = campaignApi.delete("cmp_e05ee61ff80764b") + rescue => err + p err.message + end + label: RUBY + /campaigns/{cmp_id}/send: parameters: - in: path - name: buckslip_id - description: The ID of the buckslip to which the buckslip orders belong. + name: cmp_id + description: id of the campaign required: true schema: - $ref: '#/components/schemas/buckslip_id' - get: - operationId: buckslip_orders_retrieve - summary: Retrieve - description: Retrieves the buckslip orders associated with the given buckslip id. + $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: - - Buckslip Orders - parameters: - - $ref: '#/components/parameters/limit' - - $ref: '#/components/parameters/offset' + - Campaigns responses: '200': - description: Returns the buckslip orders associated with the given buckslip id + description: Returns a campaign object content: application/json: schema: - allOf: - - $ref: '#/components/schemas/list' - - type: object - properties: - data: - type: array - description: List of buckslip orders - items: - $ref: '#/components/schemas/buckslip_order' + $ref: '#/components/schemas/campaign' example: - data: - - id: bo_e0f8a0562a06bea7f - buckslip_id: bck_6afffd19045076c - status: available - quantity_ordered: 5000 - 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: buckslip_order - object: list - next_url: null - previous_url: null - count: 1 + 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/buckslip_order_error' + $ref: '#/components/responses/campaigns_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/buckslips/bck_6afffd19045076c/orders/ \ + curl https://api.lob.com/v1/campaigns/cmp_e05ee61ff80764b/send \ -u : label: CURL - post: - operationId: buckslip_order_create - summary: Create - description: Creates a new buckslip order given information + /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: - - Buckslip Orders - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/buckslip_order_editable' - example: - quantity: 10000 - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/buckslip_order_editable' - example: - quantity: 10000 - multipart/form-data: - schema: - $ref: '#/components/schemas/buckslip_order_editable' - example: - quantity: 10000 + - Cards + parameters: + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/before_after' + - $ref: '#/components/parameters/include' responses: '200': - description: Buckslip order created successfully + description: Returns a list of card objects content: application/json: schema: - $ref: '#/components/schemas/buckslip_order' - examples: - basic: - value: - id: bo_e0f8a0562a06bea7f - buckslip_id: bck_6afffd19045076c - status: available - 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: buckslip_order - default: - $ref: '#/components/responses/buckslip_error' - x-codeSamples: - - lang: Shell - source: | - curl https://api.lob.com/v1/buckslips/bck_6afffd19045076c/orders \ - -u : \ - -d "quantity=10000" - label: CURL - /bulk/us_verifications: - 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. - tags: - - US Verifications - 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 `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/multiple_components_list' - example: - addresses: - - primary_line: 210 King Street - city: San Francisco - state: CA - zip_code: '94107' - - recipient: Walgreens - primary_line: Ave Wilson Churchill 123 - secondary_line: '' - urbanization: URB FAIR OAKS - city: RIO PIEDRAS - state: PR - zip_code: '00926' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/multiple_components_list' - example: - addresses: - - primary_line: 210 King Street - city: San Francisco - state: CA - zip_code: '94107' - - recipient: Walgreens - primary_line: Ave Wilson Churchill 123 - secondary_line: '' - urbanization: URB FAIR OAKS - city: RIO PIEDRAS - state: PR - zip_code: '00926' - multipart/form-data: - schema: - $ref: '#/components/schemas/multiple_components_list' - example: - addresses: - - primary_line: 210 King Street - city: San Francisco - state: CA - zip_code: '94107' - - recipient: Walgreens - primary_line: Ave Wilson Churchill 123 - secondary_line: '' - urbanization: URB FAIR OAKS - city: RIO PIEDRAS - state: PR - zip_code: '00926' - responses: - '200': - $ref: '#/components/responses/bulk_us_verifications' + 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/us_verifications_error' + $ref: '#/components/responses/mailpiece_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/bulk/us_verifications \ - -u : \ - --header 'Content-Type: application/x-www-form-urlencoded' \ - --data-urlencode 'addresses[0][primary_line]=210 King Street' \ - --data-urlencode 'addresses[0][city]=San Francisco' \ - --data-urlencode 'addresses[0][state]=CA' \ - --data-urlencode 'addresses[0][zip_code]=94017' + curl -X GET "https://api.lob.com/v1/cards?limit=2" \ + -u : label: CURL - lang: Typescript source: | - const UsVerifications = new USVerificationsApi(av_config); - const verificationData1: UsVerificationsWritable = { - primary_line: '210 King St', - city: 'San Francisco', - state: 'CA', - zip_code: '94107' - }; - const verificationData2: UsVerificationsWritable = { - primary_line: '185 BERRY ST STE 6600', - city: 'SAN FRANCISCO', - state: 'CA', - zip_code: '94107' - }; - const addressList: MultipleComponentsList = { - addresses: [verificationData1, verificationData2], - }; - try { - const bulkVerified = await UsVerifications.verifyBulk(addressList); + const cards = await new CardsApi(config).list(2); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.bulkUSVerifications.verify({ - addresses: [{ - primary_line: '210 King St', - city: 'San Francisco', - state: 'CA', - zip_code: '94107' - }] - }), function (err, res) { + Lob.cards.list({limit: 2}, function (err, res) { console.log(err, res); }); label: NODE - - lang: Ruby - source: | - usVerificationsApi = UsVerificationsApi.new(config) - - verificationData0 = MultipleComponents.new({ - primary_line: "210 King Street", - city: "San Francisco", - state: "CA", - zip_code: "94017", - }) - - verificationData1 = MultipleComponents.new({ - primary_line: "185 BERRY ST STE 6600", - city: "SAN FRANCISCO", - state: "CA", - zip_code: "94017", - }) - - - addressList = MultipleComponentsList.new({ - addresses: [ - verificationData0, - verificationData1, - ], - }) - - begin - bulkVerifiedAddrs = usVerificationsApi.verifyBulk(addressList) - rescue => err - p err.message - end - label: RUBY - lang: Python source: | with ApiClient(configuration) as api_client: - api = UsVerificationsApi(api_client) - - verification_data_0 = MultipleComponents( - primary_line = "210 King Street", - city = "San Francisco", - state = "CA", - zip_code = "94017", - ) - - verification_data_1 = MultipleComponents( - primary_line = "185 BERRY ST STE 6600", - city = "SAN FRANCISCO", - state = "CA", - zip_code = "94017", - ) - - - address_list = MultipleComponentsList( - 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\MultipleComponents(array( - 'primary_line' => '210 King Street', - 'city' => 'San Francisco', - 'state' => 'CA', - 'zip_code' => '94017', - )); - - - $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( - 'addresses' => [ - $verificationData0, - $verificationData1, - ] + source: | + $lob->cards()->all(array( + 'limit' => 2 )); - - - try { - $result = $apiInstance->verifyBulk($addressList); - } catch (Exception $e) { - echo $e->getMessage(), PHP_EOL; - } - - lang: Java + - lang: CSharp source: | - MultipleComponentsList bulkVerify = new MultipleComponentsList(); - MultipleComponents bulkAddress0 = new MultipleComponents(); - bulkAddress0.setPrimaryLine("210 King Street"); - bulkAddress0.setCity("San Francisco"); - bulkAddress0.setState("CA"); - bulkAddress0.setZipCode("94017"); - bulkVerify.addAddressesItem(bulkAddress0); - - MultipleComponents bulkAddress1 = new MultipleComponents(); - bulkAddress1.setPrimaryLine("185 BERRY ST STE 6600"); - bulkAddress1.setCity("SAN FRANCISCO"); - bulkAddress1.setState("CA"); - bulkAddress1.setZipCode("94017"); - bulkVerify.addAddressesItem(bulkAddress1); + CardsApi api = new CardsApi(config); + List includeList = new List(); + includeList.Add("total_count"); - UsVerificationsApi apiInstance = new UsVerificationsApi(config); try { - UsVerifications bulkVerifyResponse = apiInstance.verifyBulk(bulkVerify, null); + CardList response = api.list( + 2, // limit + null, // before + null, // after + includeList // include + ); } catch (ApiException e) { - e.printStackTrace(); + Console.WriteLine(e.ToString()); } - label: JAVA - - lang: Elixir + label: CSHARP + - lang: Ruby source: | - 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); - + cardsApi = CardsApi.new(config) - UsVerificationsApi api = new UsVerificationsApi(config); + begin + 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("")}) - try { - UsVerifications bulkVerifyResponse = api.verifyBulk(bulkVerify, null); - } catch (ApiException e) { - Console.WriteLine(e.ToString()); + var apiClient = *lob.NewAPIClient(configuration) + CardList = apiClient.CardsApi.List(context).Execute() + if err != nil { + return err } - label: CSHARP - /bulk/intl_verifications: + label: GO 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: card_create + summary: Create + description: Creates a new card given information tags: - - Intl Verifications + - Cards 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 + $ref: '#/components/schemas/card_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 + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/card_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 multipart/form-data: schema: - $ref: '#/components/schemas/intl_verifications_payload' + $ref: '#/components/schemas/card_editable' 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 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': - $ref: '#/components/responses/bulk_intl_verifications' + description: Card created successfully + 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/intl_verifications_error' + $ref: '#/components/responses/mailpiece_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 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 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] + 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 bulkVerified = await IntlVerifications.verifyBulk(addressList); - + const myCard = await new CardsApi(config).create(cardsCreate); } 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) { + 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: 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"), + 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", ) - - address_list = IntlVerificationsPayload( - addresses = [ - verification_data_0, - verification_data_1, - ], - ) + with ApiClient(configuration) as api_client: + api = CardsApi(api_client) try: - bulk_verified = api.verifyBulk(address_list) + created_card = api.create(card_editable) 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 - - 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); + $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 { - IntlVerifications bulkVerifyResponse = api.verifyBulk(bulkVerify); + Card result = api.create(cardEditable); } 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) + 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", + }); + + cardApi = CardsApi.new(config) begin - campaigns = campaignsApi.list({ limit: 2 }) + createdCard = cardApi.create(cardCreate) rescue => err p err.message end label: RUBY - post: - 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: - - Campaigns - parameters: - - $ref: '#/components/parameters/lang_spec' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/campaign_writable' - example: - 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 + - lang: Go source: | - campaignCreate = CampaignWritable.new({ - name: "My First Campaign", - schedule_type: "immediate", - }); + var context = context.Background() + context = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) - campaignApi = CampaignsApi.new(config) + var apiClient = *lob.NewAPIClient(configuration) - begin - createdCampaign = campaignApi.create(campaignCreate) - rescue => err - p err.message - end - label: RUBY - /campaigns/{cmp_id}: + + 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' + $ref: '#/components/schemas/card_updatable' example: - description: Test campaign + description: Test card + auto_reorder: true multipart/form-data: schema: - $ref: '#/components/schemas/campaign_updatable' + $ref: '#/components/schemas/card_updatable' example: - description: Test campaign + description: Test card + auto_reorder: true 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 -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: @@ -17030,1815 +6435,1917 @@ 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 + - 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 + - lang: Ruby + source: | + cardOrderCreate = CardOrderEditable.new({ + quantity: 10000, + }); + + cardOrderApi = CardOrdersApi.new(config) + + begin + createdCardOrder = cardOrderApi.create("card_6afffd19045076c", cardOrderCreate) + 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: + 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. + 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' + 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 + source: | + Lob.checks.list({limit: 2}, function (err, res) { + console.log(err, res); + }); + label: NODE + - lang: Ruby 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", - ) + 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: - created_card = api.create(card_editable) + checks = api.list(limit=2) 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 + $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); - 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 - ); + 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 result = api.create(cardEditable); + 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: | - 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", - }); - - cardApi = CardsApi.new(config) - - begin - createdCard = cardApi.create(cardCreate) - 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") - - - - - createdcard, _, err := - apiClient.CardsApi.Create(context).CardEditable(cardCreate).Execute() - - + CheckList = apiClient.ChecksApi.List(context).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' - 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. + post: + 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/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 + 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 + 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 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 https://api.lob.com/v1/cards/card_7a6d73c5c8457fc \ - -u : + 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 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 { - const card = await new CardsApi(config).get('card_xxxx'); + const myCheck = await new ChecksApi(config).create(checkCreate); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.cards.retrieve('card_7a6d73c5c8457fc', function (err, res) { + 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: 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) + + begin + createdCheck = checkApi.create(checkCreate) + 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 = CardsApi(api_client) + api = ChecksApi(api_client) try: - card = api.get("card_7a6d73c5c8457fc") + created_check = api.create(check_editable) except ApiException as e: print(e) label: PYTHON - lang: PHP source: | - $lob->cards()->get('card_7a6d73c5c8457fc'); - label: PHP + $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 + ) + ); + + 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"); + + 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(); + } + 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: | - CardsApi api = new CardsApi(config); + 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 + ); + + 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 + ); try { - Card response = api.get("card_7a6d73c5c8457fc"); + Check result = api.create(checkEditable, null); } 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) + 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) - fetchedCard, _, err := - apiClient.CardsApi.Get(context,"card_7a6d73c5c8457fc").Execute() + createdcheck, _, err := apiClient.ChecksApi.Create(context).CheckEditable(checkCreate).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. - tags: - - Cards - requestBody: + /checks/{chk_id}: + parameters: + - in: path + name: chk_id + description: id of the check required: true - content: - application/json: - schema: - $ref: '#/components/schemas/card_updatable' - example: - description: Test card - auto_reorder: true - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/card_updatable' - example: - description: Test card - auto_reorder: true - multipart/form-data: - schema: - $ref: '#/components/schemas/card_updatable' - example: - description: Test card - auto_reorder: 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: + - Checks responses: '200': - description: Returns a card object + description: Returns a check 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/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 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/chk_534f10783683daa0 \ + -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: label: CURL - lang: Typescript source: | - const cardUpdatable = new CardEditable ({ - description: 'Awesome card', - auto_reorder: true - }); - try { - await new CardsApi(config).update(cardUpdatable); + const check = await new ChecksApi(config).get('chk_xxxx'); } 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) { + Lob.checks.retrieve('chk_534f10783683daa0', 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: | + checkApi = ChecksApi.new(config) - try { - api.update("card_6afffd19045076c", update); - } catch (ApiException e) { - Console.WriteLine(e.ToString()); - } - label: CSHARP + begin + retrievedCheck = checkApi.get("chk_534f10783683daa0") + rescue => err + p err.message + end + label: RUBY - lang: Python source: | - card_updatable = CardUpdatable( - description = "Awesome card", - auto_reorder = True, - reorder_quantity = 10000, - ) - with ApiClient(configuration) as api_client: - api = CardsApi(api_client) + api = ChecksApi(api_client) try: - updated_card = api.update("card_6afffd19045076c", card_updatable) + check = api.get("chk_534f10783683daa0") 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, - }) + $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); - cardApi = CardsApi.new(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: | + ChecksApi api = new ChecksApi(config); - begin - updatedCard = cardApi.update("card_6afffd19045076c", cardUpdatable) - rescue => err - p err.message - end - label: RUBY + try { + Check response = api.get("chk_534f10783683daa0"); + } 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) - - 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() - + fetchedCheck, _, err := apiClient.ChecksApi.Get(context,"chk_534f10783683daa0").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. + 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: - - Cards + - Checks responses: '200': - $ref: '#/components/responses/card_deleted' + $ref: '#/components/responses/check_canceled' default: $ref: '#/components/responses/mailpiece_error' x-codeSamples: - lang: Shell source: | - curl -X DELETE https://api.lob.com/v1/cards/card_7a6d73c5c8457fc \ - -u : + curl -X DELETE 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 deleteCheck = await new ChecksApi(config).delete('chk_xxxx'); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.cards.delete('card_7a6d73c5c8457fc', 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 = CardsApi(api_client) + api = ChecksApi(api_client) try: - deleted_resource = api.delete("card_6afffd19045076c") + deleted_resource = api.cancel("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->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: | - CardsApi api = new CardsApi(config); + ChecksApi api = new ChecksApi(config); try { - CardDeletion response = api.delete("card_6afffd19045076c"); + CheckDeletion response = api.cancel("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() - + deletedCheck, _, err := apiClient.ChecksApi.Cancel(context, "chk_534f10783683daa0").Execute() if err != nil { return err } label: GO - /cards/{card_id}/orders: + /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: card_id - description: The ID of the card to which the card orders belong. + name: crv_id + description: id of the creative required: true schema: - $ref: '#/components/schemas/card_id' + $ref: '#/components/schemas/crv_id' get: - operationId: card_orders_retrieve + operationId: creative_retrieve summary: Retrieve - description: Retrieves the card orders associated with the given card id. + description: Retrieves the details of an existing creative. You need only supply the unique creative identifier that was returned upon creative creation. tags: - - Card Orders - parameters: - - $ref: '#/components/parameters/limit' - - $ref: '#/components/parameters/offset' + - Creatives responses: '200': - description: Returns the card orders associated with the given card id + description: Returns a creative object 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' + $ref: '#/components/schemas/creative' 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 + 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/card_order_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/crv_2a3b096c409b32c \ -u : label: CURL - - lang: Typescript - source: | - try { - const cardOrders = await new CardOrdersApi(cofig).get( 'co_xxxx' ); - } catch (err: any) { - console.error(err); - } - label: TYPESCRIPT - - lang: Javascript - source: | - Lob.cardOrders.list('card_6afffd19045076c', function (err, res) { - console.log(err, res); - }); - label: NODE - - lang: Python - source: | - with ApiClient(configuration) as api_client: - api = CardOrdersApi(api_client) - - try: - card_order = api.get("card_6afffd19045076c", limit = 2, offset = 1) - except ApiException as e: - print(e) - label: PYTHON - - lang: PHP - source: | - $lob->cardOrders('card_6afffd19045076c')->all(); - - lang: CSharp - source: | - CardOrdersApi api = new CardOrdersApi(config); - - try { - CardOrderList response = api.get("card_6afffd19045076c", 2, 1); - } catch (ApiException e) { - Console.WriteLine(e.ToString()); - } - label: CSHARP - lang: Ruby source: | - cardOrderApi = CardOrdersApi.new(config) + creativeApi = CreativesApi.new(config) begin - retrievedCardOrderList = cardOrderApi.get("card_6afffd19045076c", { limit: 2, offset: 1 }) + retrievedCreative = creativeApi.get("crv_2a3b096c409b32c") 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) - - - fetchedCardOrderList, _, err := apiClient.CardOrdersApi.Get(context, - "card_6afffd19045076c").Execute() - - - if err != nil { - return err - } - label: GO - post: - operationId: card_order_create - summary: Create - description: Creates a new card order given information + 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: - - Card Orders + - Creatives requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/card_order_editable' + $ref: '#/components/schemas/creative_base' example: - quantity: 10000 + description: Test creative application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/card_order_editable' + $ref: '#/components/schemas/creative_base' example: - quantity: 10000 + description: Test creative multipart/form-data: schema: - $ref: '#/components/schemas/card_order_editable' + $ref: '#/components/schemas/creative_base' example: - quantity: 10000 + description: Test creative responses: '200': - description: Card order created successfully + description: Returns a creative object 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 -X PATCH https://api.lob.com/v1/creatives/crv_2a3b096c409b32c \ -u : \ - -d "quantity=10000" + -d "description=Our updated 4x6 postcard creative" 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, + creative_patch = CreativePatch( + description = "Our updated 4x6 postcard creative", ) with ApiClient(configuration) as api_client: - api = CardOrdersApi(api_client) + api = CreativesApi(api_client) try: - created_card_order = api.create("card_6afffd19045076c", card_order_editable) + updated_creative = api.update("crv_2a3b096c409b32c", creative_patch) 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 - lang: Ruby source: | - cardOrderCreate = CardOrderEditable.new({ - quantity: 10000, - }); + creativePatch = CreativePatch.new({ + description: "Our updated 4x6 postcard creative", + }) - cardOrderApi = CardOrdersApi.new(config) + creativeApi = CreativesApi.new(config) begin - createdCardOrder = cardOrderApi.create("card_6afffd19045076c", cardOrderCreate) + updatedCreative = creativeApi.update("crv_2a3b096c409b32c", creativePatch) 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: + /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 + 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 + /informed_delivery_campaigns: get: - operationId: checks_list + operationId: informed_delivery_campaign_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. + description: List Informed Delivery campaigns 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' + - Informed Delivery Campaign responses: '200': - $ref: '#/components/responses/all_checks' - default: - $ref: '#/components/responses/mailpiece_error' + $ref: '#/components/responses/all_informed_delivery_campaigns' x-codeSamples: - lang: Shell source: | - curl -X GET "https://api.lob.com/v1/checks?limit=2" \ - -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: + curl https://api.lob.com/v1/informed_delivery_campaign \ + -u : label: CURL - - lang: typescript - source: | - try { - const checks = await new ChecksApi(config).list(2); - } catch (err: any) { - console.error(err); - } - label: TYPESCRIPT - - lang: Javascript - source: | - 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 + post: + operationId: informed_delivery_campaign_create + summary: Create + description: Creates a new Informed Delivery campaign + tags: + - Informed Delivery Campaign + requestBody: + required: true + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/create' + responses: + '200': + description: Creative created successfully + content: + application/json: + schema: + $ref: '#/components/schemas/response' + example: + id: infd_234g5324g324g23 + object: informed_delivery_campaign + account_id: xxxxxxxxxxxxxxxxxxxx + quantity: 20 + usps_campaign_id: '1234567890' + usps_title: 'Campaign: 1a1a1a1a-9657-423b-b3c7-2' + start_date: '2024-08-31T00:00:00.000Z' + end_date: '2024-10-15T00:00:00.000Z' + start_serial: 3183487 + end_serial: 3183506 + ride_along_url: https://www.lob.com + ride_along_image_s3_link: https://lob-assets.com/informed-delivery/infd_234g5324g324g23_ride_along.jpg + representative_image_s3_link: null + status: approved + date_created: '2024-08-30T23:30:02.980Z' + date_modified: '2024-08-30T23:30:05.027Z' + mode: live + lob_campaign_id: null + deleted: false + campaign_code: 1a1a1a1a-9657-423b-b3c7-2+Code + brand_name: Lob + service_request_number: null + '422': + $ref: '#/components/responses/writeable_422' + x-codeSamples: + - lang: Shell source: | - with ApiClient(configuration) as api_client: - api = ChecksApi(api_client) - - try: - checks = api.list(limit=2) - 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 + curl --request POST \ + --url https://api.lob.com/v1/informed_delivery_campaigns \ + -u : \ + --header 'Content-Type: multipart/form-data' \ + --form ride_along_url=https://www.lob.com \ + --form 'ride_along_image=@/path/to/ride_along.jpg' \ + --form quantity=2 \ + --form start_date=2024-01-01 \ + --form status=pending_approval + label: CURL + /informed_delivery_campaigns/{usps_campaign_id}: + parameters: + - in: path + name: usps_campaign_id + description: usps_campaign_id of the Informed Delivery campaign + required: true + schema: + $ref: '#/components/schemas/usps_campaign_id' + get: + operationId: informed_delivery_campaign_retrieve + summary: Retrieve + description: Retrieves the details of an existing Informed Delivery campaign. You need only supply the `usps_campaign_id` returned in the campaign creation request. + tags: + - Informed Delivery Campaign + responses: + '200': + description: Returns a informed delivery campaign object + content: + application/json: + schema: + $ref: '#/components/schemas/response' + example: + id: infd_234g5324g324g23 + object: informed_delivery_campaign + account_id: xxxxxxxxxxxxxxxxxxxx + quantity: 20 + usps_campaign_id: '1234567890' + usps_title: 'Campaign: 1a1a1a1a-9657-423b-b3c7-2' + start_date: '2024-08-31T00:00:00.000Z' + end_date: '2024-10-15T00:00:00.000Z' + start_serial: 3183487 + end_serial: 3183506 + ride_along_url: https://www.lob.com + ride_along_image_s3_link: https://lob-assets.com/informed-delivery/infd_234g5324g324g23_ride_along.jpg + representative_image_s3_link: null + status: approved + date_created: '2024-08-30T23:30:02.980Z' + date_modified: '2024-08-30T23:30:05.027Z' + mode: live + lob_campaign_id: null + deleted: false + campaign_code: 1a1a1a1a-9657-423b-b3c7-2+Code + brand_name: Lob + service_request_number: null + '404': + $ref: '#/components/responses/404' + x-codeSamples: + - lang: Shell 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 + curl https://api.lob.com/v1/informed_delivery_campaign/1200772869 \ + -u : + label: CURL + patch: + operationId: informed_delivery_campaign_update + summary: Update + description: Update the details of an existing Informed Delivery campaign.
**NOTE:** you can only update a campaign in the `pending_approval` status. + tags: + - Informed Delivery Campaign + requestBody: + required: true + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/update' + responses: + '200': + description: Returns an Informed Delivery campaign object + content: + application/json: + schema: + $ref: '#/components/schemas/response' + example: + id: infd_234g5324g324g23 + object: informed_delivery_campaign + account_id: xxxxxxxxxxxxxxxxxxxx + quantity: 20 + usps_campaign_id: '1234567890' + usps_title: 'Campaign: 1a1a1a1a-9657-423b-b3c7-2' + start_date: '2024-08-31T00:00:00.000Z' + end_date: '2024-10-15T00:00:00.000Z' + start_serial: 3183487 + end_serial: 3183506 + ride_along_url: https://www.lob.com + ride_along_image_s3_link: https://lob-assets.com/informed-delivery/infd_234g5324g324g23_ride_along.jpg + representative_image_s3_link: null + status: approved + date_created: '2024-08-30T23:30:02.980Z' + date_modified: '2024-08-30T23:30:05.027Z' + mode: live + lob_campaign_id: null + deleted: false + campaign_code: 1a1a1a1a-9657-423b-b3c7-2+Code + brand_name: Lob + service_request_number: null + '404': + $ref: '#/components/responses/404' + '422': + $ref: '#/components/responses/writeable_422' + x-codeSamples: + - lang: Shell 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) - - CheckList = apiClient.ChecksApi.List(context).Execute() - - if err != nil { - return err - } - label: GO + curl -X PATCH https://api.lob.com/v1/creatives/crv_2a3b096c409b32c \ + -u : \ + -d '{"status":"approved"}' + label: CURL + /intl_autocompletions: post: - operationId: check_create - summary: Create - description: Creates a new check with the provided properties. + 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: - - Checks + - Intl Autocompletions parameters: - - $ref: '#/components/parameters/idem-header' - - $ref: '#/components/parameters/idem-query' + - $ref: '#/components/parameters/lang_spec' requestBody: required: true content: application/json: 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 + $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); - }); - 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" - }); - - checkApi = ChecksApi.new(config) - - begin - createdCheck = checkApi.create(checkCreate) - 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" - ) + This feature is not currently supported by this library. + 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, + }) + begin + autocompletedAddr = intlAutocompletionsApi.autocomplete(autocompletionData) + rescue => err + p err.message + end + label: RUBY + - lang: Python + source: | 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 @@ -18846,112 +8353,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 + ); - if err != nil { - return err + IntlVerificationsApi api = new IntlVerificationsApi(config); + + 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 @@ -18959,470 +8575,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. + 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) + + 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", - }) - - creativeApi = CreativesApi.new(config) + $apiInstance = new OpenAPI\Client\Api\LettersApi($config, new GuzzleHttp\Client()); - 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 @@ -19430,490 +8787,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 @@ -19930,103 +9592,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 @@ -20043,76 +9689,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' @@ -20122,47 +9758,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 @@ -20170,18 +9806,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( @@ -20192,17 +9826,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 @@ -20214,47 +9848,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 @@ -20265,37 +9886,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: @@ -20311,42 +9926,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: @@ -20362,38 +9973,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: @@ -20410,7 +10017,7 @@ paths: explode: true multipart/form-data: schema: - $ref: '#/components/schemas/letter_editable' + $ref: '#/components/schemas/postcard_editable' example: description: demo to: @@ -20426,50 +10033,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' \ @@ -20477,55 +10080,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', @@ -20535,20 +10138,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) { @@ -20557,11 +10159,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", @@ -20573,28 +10175,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", @@ -20606,31 +10204,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", @@ -20642,6 +10237,9 @@ paths: ) ); + $merge_variables = new stdClass; + $merge_variables->name = "Harry"; + $use_type = "marketing"; $qr_code = new OpenAPI\Client\Model\QRCode( array( @@ -20650,45 +10248,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; } @@ -20697,7 +10279,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"); @@ -20713,34 +10295,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', @@ -20750,34 +10327,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 @@ -20785,14 +10357,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, @@ -20800,252 +10370,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 @@ -21053,113 +10562,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 @@ -21167,128 +10736,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 @@ -21296,18 +10845,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( @@ -21318,21 +10865,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(); @@ -21340,798 +10881,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"); + api = LinksApi(api_client) - 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"); + 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. + description: Returns a self_mailer object content: application/json: schema: - $ref: '#/components/schemas/domain_response' + $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: - 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/{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 @@ -22139,183 +11336,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 @@ -22323,111 +11433,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 @@ -22435,18 +11550,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( @@ -22457,15 +11570,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(); @@ -22473,495 +11592,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"); + + 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 + ); try { - LinksList response = api.list( - 2, // limit - null, // before - null, // after - null, // include - null, // dateCreated - ); + SelfMailer result = api.create(selfMailerEditable, 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) - - LinksList = apiClient.LinksApi.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: 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 + - 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 @@ -22998,8 +12165,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 @@ -23007,300 +12173,52 @@ 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 - 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/self_mailers/sfm_8ffbe811dea49dcf" \ - -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: - label: CURL - - lang: typescript - source: | - try { - const selfMailer = await new SelfMailersApi(config).get('sfm_xxxx'); - } catch (err: any) { - console.error(err); - } - label: TYPESCRIPT - - lang: Javascript - source: > - Lob.selfMailers.retrieve('sfm_8ffbe811dea49dcf', function (err, res) - { - console.log(err, res); - }); - label: NODE - - lang: Ruby - source: | - selfMailerApi = SelfMailersApi.new(config) - - begin - retrievedSelfMailer = selfMailerApi.get("sfm_8ffbe811dea49dcf") - rescue => err - p err.message - end - label: RUBY - - lang: Python - source: | - with ApiClient(configuration) as api_client: - api = SelfMailersApi(api_client) - - try: - self_mailer = api.get("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->get("sfm_8ffbe811dea49dcf"); - } catch (Exception $e) { - echo $e->getMessage(), PHP_EOL; - } - - lang: Java - source: | - SelfMailersApi apiInstance = new SelfMailersApi(config); - - try { - SelfMailer response = apiInstance.get("sfm_8ffbe811dea49dcf"); - } catch (ApiException e) { - e.printStackTrace(); - } - label: JAVA - - lang: Elixir - source: | - Lob.SelfMailer.find("sfm_8ffbe811dea49dcf") - label: ELIXIR - - lang: CSharp - source: | - SelfMailersApi api = new SelfMailersApi(config); - - try { - SelfMailer response = api.get("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) - - - fetchedSelfMailer, _, err := - apiClient.SelfMailersApi.Get(context,"sfm_8ffbe811dea49dcf").Execute() - - - if err != nil { - return err - } - label: GO - delete: - 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: - - 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. - 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' - responses: - '200': - $ref: '#/components/responses/all_self_mailers' + 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 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 GET "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 snapPack = await new SnapPacksApi(config).get('ord_xxxx'); } catch (err: any) { console.error(err); } label: TYPESCRIPT - lang: Javascript source: | - Lob.selfMailers.list({limit: 2}, function (err, res) { + Lob.snapPacks.retrieve('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 }) + retrievedSnapPack = snapPackApi.get("ord_0d6a16a3fff6318ac8f8008dc1") rescue => err p err.message end @@ -23308,625 +12226,300 @@ 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) + 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->list( - 2, // limit - ); + $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 { - 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 - ); + SnapPack response = apiInstance.get("ord_0d6a16a3fff6318ac8f8008dc1"); } catch (ApiException e) { e.printStackTrace(); } label: JAVA - lang: Elixir source: | - Lob.SelfMailer.list(%{limit: 2}) + Lob.SnapPack.find("ord_0d6a16a3fff6318ac8f8008dc1") 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); - + source: | + SnapPacksApi api = new SnapPacksApi(config); 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 - ); + 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) - SelfMailerList = apiClient.SelfMailersApi.List(context).Execute() + fetchedSnapPack, _, err := apiClient.SnapPacksApi.Get(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 + delete: + operationId: snap_pack_delete + summary: Delete + description: Completely removes a snap pack from production. This can only be done if the snap pack's `send_date` has not yet passed. If the snap pack is successfully canceled, you will not be charged for it. tags: - - Self Mailers - 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 + - Snap Packs responses: '200': - $ref: '#/components/responses/post_self_mailer' + $ref: '#/components/responses/snap_pack_deleted' 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 DELETE https://api.lob.com/v1/snap_packs/ord_0d6a16a3fff6318ac8f8008dc1 \ + -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: 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 mySelfMailer = await new SelfMailersApi(config).create(selfMailerCreate); - } 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) { + - lang: typescript + source: | + try { + const deleteSnapPack = await new SnapPacksApi(config).delete('ord_xxxx'); + } catch (err: any) { + console.error(err); + } + label: TYPESCRIPT + - lang: Javascript + source: | + Lob.snapPacks.delete('ord_0d6a16a3fff6318ac8f8008dc1', 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) + snapPackApi = SnapPacksApi.new(config) begin - createdSelfMailer = selfMailerApi.create(selfMailerCreate) + deletedSnapPack = snapPackApi.delete("ord_0d6a16a3fff6318ac8f8008dc1") 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) + deleted_resource = api.delete("ord_0d6a16a3fff6318ac8f8008dc1") 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->delete("ord_0d6a16a3fff6318ac8f8008dc1"); } 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); + SnapPackDeletion response = apiInstance.delete("ord_0d6a16a3fff6318ac8f8008dc1"); } catch (ApiException e) { - e.printStackTrace(); + 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.destroy("ord_0d6a16a3fff6318ac8f8008dc1") label: ELIXIR - lang: CSharp - source: > - Dictionary mergeVariables = new Dictionary(); - - mergeVariables.Add("name", "Harry"); - - - SelfMailersApi api = new SelfMailersApi(config); + 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: | + var context = context.Background() + 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 - ); + var apiClient = *lob.NewAPIClient(configuration) + deletedSnapPack, _, err := apiClient.SnapPacksApi.Delete(context, "ord_0d6a16a3fff6318ac8f8008dc1").Execute() - QRCode qrCode = new QRCode( - "relative", //position, - "https://www.lob.com", //redirect_url - "2", //width - "2", //left - "2", //bottom - "inside", //pages - ); + if err != nil { + return err + } + label: GO + /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: + - Snap Packs + parameters: + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/before_after' + - $ref: '#/components/parameters/include' + - $ref: '#/components/parameters/date_created' + - $ref: '#/components/parameters/metadata' + - $ref: '#/components/parameters/send_date' + - $ref: '#/components/parameters/mail_type' + - $ref: '#/components/parameters/sort_by' + - $ref: '#/components/parameters/campaign_id' + - $ref: '#/components/parameters/status' + responses: + '200': + $ref: '#/components/responses/all_snap_packs' + default: + $ref: '#/components/responses/mailpiece_error' + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://api.lob.com/v1/snap_packs?limit=2" \ + -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: + label: CURL + - lang: typescript + source: | + try { + const snapPacks = await new snapPacksApi(config).list(2); + } catch (err: any) { + console.error(err); + } + label: TYPESCRIPT + - lang: Javascript + source: | + Lob.snapPacks.list({limit: 2}, function (err, res) { + console.log(err, res); + }); + label: NODE + - lang: Ruby + source: | + snapPacksApi = SnapPacksApi.new(config) + begin + snapPacks = snapPacksApi.list({ limit: 2 }) + rescue => err + p err.message + end + label: RUBY + - lang: Python + source: | + with ApiClient(configuration) as api_client: + api = SnapPacksApi(api_client) - Fsc fsc = new Fsc(true); + try: + snap_packs = api.list(limit=2) + except ApiException as e: + print(e) + label: PYTHON + - lang: PHP + source: | + $apiInstance = new OpenAPI\Client\Api\SnapPacksApi($config, new GuzzleHttp\Client()); + try { + $result = $apiInstance->list( + 2, // limit + ); + } catch (Exception $e) { + echo $e->getMessage(), PHP_EOL; + } + - lang: Java + source: | + SnapPacksApi apiInstance = new SnapPacksApi(config); - 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 - ); + try { + 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.SnapPack.list(%{limit: 2}) + label: ELIXIR + - lang: CSharp + 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 @@ -24106,7 +12699,7 @@ paths: print(e) label: PYTHON - lang: PHP - source: > + source: | $to = new OpenAPI\Client\Model\AddressEditable( array( "name" => "Harry Zhang", @@ -24118,20 +12711,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", @@ -24145,7 +12731,6 @@ paths: ) ); - try { $result = $apiInstance->create($snap_pack_editable); } catch (Exception $e) { @@ -24205,16 +12790,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 @@ -24226,10 +12807,8 @@ paths: "Harry Zhang" // name ); - Fsc fsc = new Fsc(true); - SnapPackEditable SnapPackEditable = new SnapPackEditable( to.ToJson(), // to "adr_249af768103d2810", // from @@ -24245,7 +12824,6 @@ paths: fsc ); - try { SnapPack result = api.create(SnapPackEditable, null); } catch (ApiException e) { @@ -24253,56 +12831,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 @@ -24330,9 +12884,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: @@ -24348,10 +12900,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 @@ -24387,10 +12937,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"); @@ -24422,20 +12970,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 @@ -24472,10 +13013,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 @@ -24525,17 +13064,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) { @@ -24550,12 +13085,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); @@ -24564,37 +13096,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 @@ -24603,9 +13117,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: @@ -24615,10 +13127,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 @@ -24675,20 +13185,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 @@ -24698,10 +13201,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: @@ -24722,10 +13223,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 @@ -24761,10 +13260,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( @@ -24796,22 +13293,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 @@ -24826,18 +13316,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 } @@ -24883,9 +13367,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}}" @@ -24938,19 +13421,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) { @@ -24975,17 +13454,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) { @@ -24993,31 +13469,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 @@ -25034,9 +13499,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: @@ -25112,10 +13575,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"); @@ -25147,19 +13608,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 @@ -25168,10 +13623,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: @@ -25293,17 +13745,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) { @@ -25328,12 +13777,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); @@ -25342,28 +13788,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 @@ -25372,10 +13807,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: @@ -25385,9 +13817,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 @@ -25423,10 +13854,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"); @@ -25458,19 +13887,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 @@ -25480,9 +13903,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: @@ -25535,10 +13956,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->list( @@ -25570,27 +13989,17 @@ 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(); - + 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 { TemplateList response = api.list( 2, // limit @@ -25605,17 +14014,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) - TemplateList = apiClient.TemplatesApi.List(context).Execute() - if err != nil { return err } @@ -25623,13 +14027,7 @@ paths: 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. + 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: @@ -25759,10 +14157,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()); $template_writable = new OpenAPI\Client\Model\TemplateWritable( array( "description" => "Test Template", @@ -25770,7 +14166,6 @@ paths: ) ); - try { $result = $apiInstance->create($template_writable); } catch (Exception $e) { @@ -25810,29 +14205,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 templateCreate = *lob.NewTemplateWritable() - templateCreate.SetDescription("Test Template") - templateCreate.SetHtml("HTML for {{name}}") - - createdtemplate, _, err := - apiClient.TemplatesApi.Create(context).TemplateWritable(templateCreate).Execute() - + createdtemplate, _, err := apiClient.TemplatesApi.Create(context).TemplateWritable(templateCreate).Execute() if err != nil { return err @@ -25922,218 +14308,462 @@ paths: 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 --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 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. + 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: | + 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) + 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) + + 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 + responses: + '204': + description: Successful Response + x-codeSamples: + - lang: Shell + source: | + curl -X DELETE https://api.lob.com/v1/uploads/upl_71be866e430b11e9 \ + -u : + label: CURL + - lang: Ruby + source: | + uploadApi = UploadsApi.new(config) + + begin + 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_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: Ruby + - lang: Python source: | - uploadCreate = UploadWritable.new({ - campaign_id: "cmp_e05ee61ff80764b", - }); - - uploadApi = UploadsApi.new(config) + with ApiClient(configuration) as api_client: + api = UploadsApi(api_client) - begin - createdUpload = uploadApi.create_upload(uploadCreate) - rescue => err - p err.message - end - label: RUBY - /uploads/{upl_id}: + 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 + 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. + 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: Returns an upload object + 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: [] - '404': - $ref: '#/components/responses/upload_not_found' - '422': - $ref: '#/components/responses/upload_validation_error' + $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 \ + 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: | - uploadApi = UploadsApi.new(config) + exportModel = ExportModel.new({ + type: "all" + }) + + uploadsApi = UploadsApi.new(config) begin - retrievedUpload = uploadApi.get_upload("upl_71be866e430b11e9") + createdExport = uploadsApi.create_export("upl_71be866e430b11e9", exportModel) 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. + /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 - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/upload_updatable' responses: '200': - description: Returns an upload object + description: Returns an report object content: application/json: schema: - $ref: '#/components/schemas/upload' + 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: 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: [] + 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' - '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" + curl https://api.lob.com/v1/uploads/upl_71be866e430b11e9/report \ + -u : label: CURL - lang: Python - source: | - upload_updatable = UploadUpdatable( - state = UploadState("Ready for Validation"), - ) - + source: | with ApiClient(configuration) as api_client: api = UploadsApi(api_client) try: - updated_upload = api.update_upload("upl_71be866e430b11e9", upload_updatable) + retrieved_report = api.get_report("upl_71be866e430b11e9") 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) - - 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 - responses: - '204': - description: Successful Response - x-codeSamples: - - lang: Shell - source: | - curl -X DELETE https://api.lob.com/v1/uploads/upl_71be866e430b11e9 \ - -u : - label: CURL - - lang: Ruby - source: | - uploadApi = UploadsApi.new(config) + uploadsApi = UploadsApi.new(config) begin - deletedUpload = uploadApi.delete_upload("upl_71be866e430b11e9") + retrievedreport = uploadsApi.get_report("upl_71be866e430b11e9") rescue => err p err.message end label: RUBY - /uploads/{upl_id}/file: + /uploads/{upl_id}/exports/{ex_id}: parameters: - in: path name: upl_id @@ -26141,41 +14771,81 @@ paths: 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. + - 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 - requestBody: - required: true - content: - multipart/form-data: - schema: - type: object - properties: - file: - type: string - format: binary responses: - '202': - description: Successful Response + '200': + description: Returns an export object content: application/json: schema: - $ref: '#/components/schemas/upload_file' - '422': - $ref: '#/components/responses/upload_validation_error' + 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 -X POST - https://api.lob.com/v1/uploads/upl_71be866e430b11e9/file \ - -u : \ - -F file=@ + source: | + curl https://api.lob.com/v1/uploads/upl_71be866e430b11e9/exports/ex_6a94fe68fd151e0f8 \ + -u : label: CURL - lang: Python source: | @@ -26183,364 +14853,417 @@ paths: api = UploadsApi(api_client) try: - res = api.upload_file("upl_71be866e430b11e9", open("", "rb")) + retrieved_export = api.get_export("upl_71be866e430b11e9", "ex_6a94fe68fd151e0f8") 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: Ruby + source: | + uploadsApi = UploadsApi.new(config) - Create an export file associated with an upload. + begin + retrievedExport = uploadsApi.get_export("upl_71be866e430b11e9", "ex_6a94fe68fd151e0f8") + rescue => err + p err.message + end + label: RUBY + /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: - type: object - properties: - type: - type: string - enum: - - all - - failures - - successes + $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: '200': - description: Successful Response - content: - application/json: - schema: - $ref: '#/components/schemas/upload_create_export' - 4XX: - $ref: '#/components/responses/upload_export_error' + $ref: '#/components/responses/us_autocompletions' + default: + $ref: '#/components/responses/us_autocompletions_error' x-codeSamples: - lang: Shell source: | - curl https://api.lob.com/v1/uploads/upl_71be866e430b11e9/exports \ - -u : \ - -d "type=failures" \ - label: CURL + 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: | + usAutocompletionsApi = UsAutocompletionsApi.new(config) + + autocompletionData = UsAutocompletionsWritable.new({ + address_prefix: "185 B", + city: "San Francisco", + state: "CA", + zip_code: "94017", + }) + + begin + autocompletedAddress = usAutocompletionsApi.autocomplete(autocompletionData) + rescue => err + p err.message + end + label: RUBY - lang: Python source: | with ApiClient(configuration) as api_client: - api = UploadsApi(api_client) + api = UsAutocompletionsApi(api_client) - export_model = ExportModel( - type = "all" + autocompletion_data = UsAutocompletionsWritable( + address_prefix = "185 B", + city = "San Francisco", + state = "CA", + zip_code = "94017", ) try: - created_export = api.create_export("upl_71be866e430b11e9", export_model) + autocompleted_addresses = api.autocomplete(autocompletion_data) except ApiException as e: print(e) label: PYTHON - - lang: Ruby + - lang: PHP source: | - exportModel = ExportModel.new({ - type: "all" + $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"); + + 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 + ); - uploadsApi = UploadsApi.new(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("")}) - 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. + 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: + $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: 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' + $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/report \ - -u : + 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: | + 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: | - with ApiClient(configuration) as api_client: - api = UploadsApi(api_client) - - try: - retrieved_report = api.get_report("upl_71be866e430b11e9") - except ApiException as e: - print(e) - label: PYTHON + Lob.reverseGeocodeLookups.lookup({ + latitude: 37.7749, + longitude: 122.4194 + }, function (err, res) { + console.log(err, res); + }); + label: NODE - lang: Ruby source: | - uploadsApi = UploadsApi.new(config) + reverseGeocodeLookupsApi = ReverseGeocodeLookupsApi.new(config) + + coordinates = Location.new({ + latitude: 37.777456, + longitude: -122.393039, + }) begin - retrievedreport = uploadsApi.get_report("upl_71be866e430b11e9") + geocode = reverseGeocodeLookupsApi.lookup(coordinates) 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 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_export = api.get_export("upl_71be866e430b11e9", "ex_6a94fe68fd151e0f8") + 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 - retrievedExport = uploadsApi.get_export("upl_71be866e430b11e9", "ex_6a94fe68fd151e0f8") - rescue => err - p err.message - end - label: RUBY - /us_autocompletions: + $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: | + Lob.ReverseGeocodeLookup.lookup(%{ + latitude: 37.7749, + longitude: 122.4194 + }) + label: ELIXIR + - lang: CSharp + source: | + ReverseGeocodeLookupsApi api = new ReverseGeocodeLookupsApi(config); + + 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: | + var context = context.Background() + context = context.WithValue(context, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv("")}) + + 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 @@ -26550,125 +15273,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 @@ -26676,204 +15418,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); + api.verifySingle(singleVerify, null); } 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: + /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 @@ -26881,515 +15566,9811 @@ 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()); + + $zipRequest = new OpenAPI\Client\Model\ZipEditable(array( + "zip_code" => '94107' + )); + + 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"); + + 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() - $coordinates = new OpenAPI\Client\Model\Location(array( - "latitude" => "37.777456", - "longitude" => "-122.393039", - )); + 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: + + **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. + **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. - try { - $result = $apiInstance->lookup($coordinates); - } catch (Exception $e) { - echo $e->getMessage(), PHP_EOL; - } - label: PHP - - lang: Java - source: > - ReverseGeocodeLookupsApi apiInstance = new - ReverseGeocodeLookupsApi(config); + **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. - Location location = new Location(); + * `In Transit` - The mailpiece is being processed at the entry/origin facility. - location.setlatitude(37.777456f); + * `In Local Area` - The mailpiece is being processed at the destination facility. - location.setlongitude(-122.393039f); + * `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. - try { - apiInstance.lookup(location, null); - } catch (ApiException e) { - e.printStackTrace(); - } - label: JAVA - - lang: Elixir - source: | - Lob.ReverseGeocodeLookup.lookup(%{ - latitude: 37.7749, - longitude: 122.4194 - }) - label: ELIXIR - - lang: CSharp - source: | - ReverseGeocodeLookupsApi api = new ReverseGeocodeLookupsApi(config); + * `Re-Routed` - The mailpiece is re-routed due to recipient change of + address, address errors, or USPS relabeling of barcode/ID tag + area. - Location location = new Location( - 37.777456f, - -122.393039f - ); + * `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. - try { - api.lookup(location, null); - } catch (ApiException e) { - Console.WriteLine(e.ToString()); - } - label: CSHARP - - lang: Go - source: > - var context = context.Background() + 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. - context = context.WithValue(context, lob.ContextBasicAuth, - lob.BasicAuth{UserName: os.Getenv("")}) + * `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]+$ + 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 + 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. - var apiClient = *lob.NewAPIClient(configuration) + 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' + 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: - var location = *lob.NewLocationWithDefaults() + * RGB or CMYK - location.SetLatitude(37.777456) + * square - location.SetLongitude(122.393039) + * minimum size: 100px x 100px + * transparent backgrond - resp, _, err := - apiClient.ReverseGeocodeLookupsApi.Lookup(context).Location(location).Execute() + * `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. - 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: - 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' - }; + 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. - 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 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`. - verificationData = UsVerificationsWritable.new({ - primary_line: "210 King Street", - city: "San Francisco", - state: "CA", - zip_code: "94017", - }) + 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. - 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", - ) + 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 - 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()); + 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 - $verificationData = new - OpenAPI\Client\Model\UsVerificationsWritable(array( - 'primary_line' => '210 King Street', - 'city' => 'San Francisco', - 'state' => 'CA', - 'zip_code' => '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 - try { - $result = $apiInstance->verifySingle($verificationData); - } catch (Exception $e) { - echo $e->getMessage(), PHP_EOL; - } - - lang: Java - source: > - UsVerificationsWritable singleVerify = new - UsVerificationsWritable(); - singleVerify.setPrimaryLine("210 King Street"); + 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' + common: + allOf: + - type: object + properties: + quantity: + type: integer + minimum: 2 + maximum: 10000000 + description: | + The number of mail pieces that will be part of this Informed Delivery campaign. USPS requires that IMB Codes are in sequence, so any mail pieces sent beyond this quantity will be rejected. + status: + type: string + ride_along_url: + type: string + minLength: 10 + maxLength: 255 + pattern: ^https:\/\/.{5,247}$ + description: | + To qualify as part of a promotion, the base domain must match the domain used to register the promotion. + I.e. If the promo was registered with https://lob.com then you could use any variation of https://lob.com such as + https://lob.com/promotions/promo_123 + start_date: + type: string + format: date + description: | + The first date that mail can be handed off to USPS and still included in the informed delivery campaign. + The start date must be at least two days in the future. The end date will be automatically calculated to be 45 days from the start. + For Target Delivery Date, recommended to set the start date to the earliest possible date (2 days from now). + brand_name: + type: string + description: The brand name you would like included in the informed delivery email. Will default to the “company” on the users account. + usps_title: + type: string + description: Unique title for the campaign. One will be auto generated if not provided. + lob_campaign_id: + type: string + pattern: ^cmp_[a-zA-Z0-9]+$ + nullable: true + description: | + When sending as part of Lob’s campaign workflow, include the lob_campaign_id as part of the request to associate this Informed Delivery campaign with the Lob campaign + infd_id: + type: string + description: Unique identifier prefixed with `infd_`. + pattern: ^infd_[a-zA-Z0-9]+$ + example: infd_23g423g4234g342 + usps_campaign_id: + type: string + description: A numberical string up to 12 characters long. + pattern: ^[0-9]+$ + example: '1200772869' + response: + allOf: + - $ref: '#/components/schemas/common' + - type: object + required: + - id + - object + - account_id + - quantity + - usps_campaign_id + - usps_title + - start_date + - end_date + - start_serial + - end_serial + - ride_along_url + - ride_along_image_s3_link + - representative_image_s3_link + - status + - date_created + - date_modified + - mode + - lob_campaign_id + - deleted + - campaign_code + - brand_name + - service_request_number + properties: + id: + $ref: '#/components/schemas/infd_id' + object: + type: string + description: Value is the resource type. + enum: + - informed_delivery_campaign + account_id: + type: string + description: Your Lob account id. + usps_campaign_id: + $ref: '#/components/schemas/usps_campaign_id' + end_date: + type: string + format: date-time + description: A timestamp in ISO 8601 format of the date the campaign ends. + start_serial: + type: integer + nullable: true + description: | + The first serial number in the range of serial numbers for this campaign. + Only non-null when campaign is approved. + end_serial: + type: integer + nullable: true + description: | + The last serial number in the range of serial numbers for this campaign. + Only non-null when campaign is approved. + ride_along_image_s3_link: + type: string + description: A URL link to the campaigns ride along image. + representative_image_s3_link: + type: string + nullable: true + description: A URL link to the campaigns representative image. + date_created: + $ref: '#/components/schemas/date_created' + date_modified: + $ref: '#/components/schemas/date_modified' + mode: + type: string + description: The mode of the Informed Delivery campaign. This is set by the API token you used to create the campaign. + enum: + - live + - test + deleted: + type: boolean + description: Whether the resource has been deleted. + campaign_code: + type: string + description: The campaign code associated with the Informed Delivery campaign. + service_request_number: + type: string + nullable: true + description: The USPS promotion service request number used to create this campaign (if there was one used). + writable_base: + allOf: + - $ref: '#/components/schemas/common' + - type: object + properties: + ride_along_image: + type: object + description: JPG Image. Maximum file size is 200 KBs. Maximum pixel size is 300 pixels wide x 200 pixels high + representative_image: + type: object + description: JPG Image. Maximum file size is 200 KBs. Maximum pixel size is 300 pixels wide x 200 pixels high + create: + allOf: + - $ref: '#/components/schemas/writable_base' + - type: object + required: + - quantity + - ride_along_image + - ride_along_url + - start_date + properties: + status: + type: string + enum: + - pending_approval + description: | + If setting a campaign to `pending_approval` the Informed Delivery campaign will not be active, and you can not send mail using it. + It will be editable in this status however, and changes can be made until `approved`. + **NOTE** that the default status is `approved` which makes the campaign active, but un-editable. + update: + allOf: + - $ref: '#/components/schemas/writable_base' + - type: object + properties: + status: + type: string + enum: + - approved + description: | + After setting an Informed Delivery campaign to “approved” said campaign will activate, and you can start sending mail using it. + You will no longer be able to edit an Informed Delivery campaign in this status. + 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. - singleVerify.setCity("San Francisco"); + * `Mailed` - Package has been accepted into the carrier network for delivery. - singleVerify.setState("CA"); + * `In Transit` - Maps to four distinct stages of transit. - singleVerify.setZipCode("94017"); + * `In Local Area` - Package is at a location near the end destination. + * `Processed for Delivery` - Maps to two distinct stages of delivery. - UsVerificationsApi apiInstance = new UsVerificationsApi(config); + * `Pickup Available` - Package is available for pickup at carrier location. - 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" - ); + * `Delivered` - Package has been delivered. - UsVerificationsApi api = new UsVerificationsApi(config); + * `Re-Routed` - Package has been forwarded. - 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) + * `Returned to Sender` - Package is to be returned to sender. - zipRequest = ZipEditable.new({ - zip_code: "94107" - }) + * `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. - 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) + 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. - zip_request = ZipEditable( - zip_code = "94107" - ) + 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. - 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()); + 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: + '404': + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' + example: + error: + code: not_found + message: informed delivery campaign not found + status_code: 404 + 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 + all_informed_delivery_campaigns: + description: A dictionary with a data property that contains an array of up to `limit` Informed Delivery campaigns. Each entry in the array is a separate campaign. The previous and next page of campaigns can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively. If no more campaigns are available beyond the current set of returned results, the `next_url` field will be empty. + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/list' + - type: object + properties: + data: + type: array + description: list of Informed Delivery campaigns + items: + $ref: '#/components/schemas/response' + example: + data: + - id: infd_234g5324g324g23 + object: informed_delivery_campaign + account_id: xxxxxxxxxxxxxxxxxxxx + quantity: 20 + usps_campaign_id: '1234567890' + usps_title: 'Campaign: 1a1a1a1a-9657-423b-b3c7-2' + start_date: '2024-08-31T00:00:00.000Z' + end_date: '2024-10-15T00:00:00.000Z' + start_serial: 3183487 + end_serial: 3183506 + ride_along_url: https://www.lob.com + ride_along_image_s3_link: https://lob-assets.com/informed-delivery/infd_234g5324g324g23_ride_along.jpg + representative_image_s3_link: null + status: approved + date_created: '2024-08-30T23:30:02.980Z' + date_modified: '2024-08-30T23:30:05.027Z' + mode: live + lob_campaign_id: null + deleted: false + campaign_code: 1a1a1a1a-9657-423b-b3c7-2+Code + brand_name: Lob + service_request_number: null + - id: infd_23g23g234g23g42 + object: informed_delivery_campaign + account_id: xxxxxxxxxxxxxxxxxxxx + quantity: 5 + usps_campaign_id: '23452345' + usps_title: 'Campaign: 133d228e-f9e9-4056-aaea-f' + start_date: '2024-08-31T00:00:00.000Z' + end_date: '2024-10-15T00:00:00.000Z' + start_serial: null + end_serial: null + ride_along_url: https://www.lob.com + ride_along_image_s3_link: https://lob-assets.com/informed-delivery/infd_23g23g234g23g42_ride_along.jpg + representative_image_s3_link: null + status: pending_approval + date_created: '2024-08-30T23:30:02.980Z' + date_modified: '2024-09-30T23:30:05.027Z' + mode: live + lob_campaign_id: null + deleted: false + campaign_code: 133d228e-f9e9-4056-aaea-f+Code + brand_name: Lob + service_request_number: null + object: list + next_url: null + previous_url: null + count: 2 + writeable_422: + description: Error + content: + application/json: + schema: + $ref: '#/components/schemas/error' + example: + error: + code: invalid + message: quantity must be greater than or equal to 2 + status_code: 422 + 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: Informed Delivery Campaign API + tags: + - Informed Delivery Campaign + - name: Address Verification API + tags: + - US Verifications + - US Verification Types + - US Autocompletions + - Reverse Geocode Lookups + - Zip Lookups + - Identity Validation + - Intl 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/dist/lob-api-postman.json b/dist/lob-api-postman.json index 085e3560..80194792 100644 --- a/dist/lob-api-postman.json +++ b/dist/lob-api-postman.json @@ -1,7 +1,7 @@ { "item": [ { - "id": "2466a624-f015-42cd-88ff-d35e7a8346fc", + "id": "5d125a4b-4b3e-4786-8edd-4d574bda402d", "name": "Addresses", "description": { "content": "To add an address to your address book, you create a new address object. You can retrieve and delete individual\naddresses as well as get a list of addresses. Addresses are identified by a unique random ID.\n\n", @@ -9,7 +9,7 @@ }, "item": [ { - "id": "e1324434-5a6b-421b-a626-8c0baa6c644b", + "id": "3232d92e-8de6-4b7b-9f0a-3bc541dd5c68", "name": "List", "request": { "name": "List", @@ -57,19 +57,7 @@ }, { "disabled": false, - "key": "date_created[elit_5_]", - "value": "", - "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 ≤." - }, - { - "disabled": false, - "key": "date_created[Ut3b0]", - "value": "", - "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 ≤." - }, - { - "disabled": false, - "key": "date_created[eu_f5]", + "key": "date_created[ut_ad]", "value": "", "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 ≤." } @@ -87,7 +75,7 @@ }, "response": [ { - "id": "5c9eae1d-5cb1-411c-b43e-b98f31e43804", + "id": "1f685cad-bc60-4289-8026-1c09c76ebb0e", "name": "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.", "originalRequest": { "url": { @@ -119,11 +107,11 @@ "value": "" }, { - "key": "date_created[do_7c]", + "key": "date_created[dolore09b]", "value": "" }, { - "key": "date_created[velit_c]", + "key": "date_created[ind8]", "value": "" } ], @@ -155,7 +143,7 @@ "_postman_previewlanguage": "json" }, { - "id": "8a3d412e-04e3-4f38-aaf2-6ff7e4076d31", + "id": "26c90880-7691-467a-9c69-acc9cba67323", "name": "Error", "originalRequest": { "url": { @@ -187,11 +175,11 @@ "value": "" }, { - "key": "date_created[do_7c]", + "key": "date_created[dolore09b]", "value": "" }, { - "key": "date_created[velit_c]", + "key": "date_created[ind8]", "value": "" } ], @@ -226,7 +214,7 @@ "event": [] }, { - "id": "492eb7e3-19de-4025-958f-ba8f0203ba5b", + "id": "30f2dc73-0797-4ae9-ae1e-522069814f24", "name": "Create", "request": { "name": "Create", @@ -289,7 +277,7 @@ }, "response": [ { - "id": "a53711e0-b163-4c63-bca3-02fd80e88ae7", + "id": "878feced-aa3f-4f15-9dab-d5f71c19905a", "name": "Echos the writable fields of a newly created address object.", "originalRequest": { "url": { @@ -405,7 +393,7 @@ "_postman_previewlanguage": "json" }, { - "id": "cfec5e93-2bdf-4767-aafc-5b7ecf652175", + "id": "1402bc29-e3d8-4668-86b9-32a4b8bfe541", "name": "Error", "originalRequest": { "url": { @@ -509,7 +497,7 @@ } }, { - "id": "4c598f77-07a0-465b-a75f-ef874abb4716", + "id": "9b44946e-887c-4436-b497-7a9fd566cc0d", "name": "Retrieve", "request": { "name": "Retrieve", @@ -547,7 +535,7 @@ }, "response": [ { - "id": "23e49351-929e-4be9-a25e-ae46fce71893", + "id": "d4d124dc-64d6-43fa-a7ca-09dc5ca9d149", "name": "Returns an address object if a valid identifier was provided.", "originalRequest": { "url": { @@ -595,7 +583,7 @@ "_postman_previewlanguage": "json" }, { - "id": "0e829075-938e-4c44-aa32-7abd0e384b30", + "id": "96b60e11-99a1-4093-a98d-ce45bda76ca6", "name": "Error", "originalRequest": { "url": { @@ -646,7 +634,7 @@ "event": [] }, { - "id": "5bc05a3f-3257-48a2-bfe4-ab981c803917", + "id": "504e18e6-dac8-44e2-b4d1-f6d43caed9de", "name": "Delete", "request": { "name": "Delete", @@ -684,7 +672,7 @@ }, "response": [ { - "id": "557e8fb7-90b5-42bf-b1d3-cf7323a8b223", + "id": "d7630d2f-b789-47c1-ac82-c9ad0d85f4c9", "name": "Deleted", "originalRequest": { "url": { @@ -732,7 +720,7 @@ "_postman_previewlanguage": "json" }, { - "id": "2c126bb5-f739-45a9-8556-97c33d66e81b", + "id": "a9d20e56-5e9c-4f63-b1f4-b069ac0f995c", "name": "Error", "originalRequest": { "url": { @@ -786,7 +774,7 @@ "event": [] }, { - "id": "f52234f2-8c48-4f1a-a495-542df990f9b0", + "id": "a700b61e-ad34-432b-a372-d2d10b7e3538", "name": "Authentication", "description": { "content": "Requests made to the API are protected with HTTP Basic authentication.\nIn order to properly authenticate with the API you must use your API key as the username\nwhile leaving the password blank. Requests not properly authenticated will return a `401`\n[error code](#tag/Errors). You can find your account's API keys\nin your Dashboard Settings.\n### Example Request\ncurl uses the -u flag to pass basic auth credentials (adding a colon after your API key will prevent it from asking you for a\npassword). One of our test API keys has been filled into all the examples on the page, so you can test out any example right away.\n```bash\ncurl https://api.lob.com/v1/addresses \\\n -u test_0dc8dXXXXXXXXXXXXXXXXXXXXXX5b0cc:\n```\n## API Keys\n Lob authenticates your API requests using your account's API keys.\n If you do not include your key when making an API request, or use\n one that is incorrect or outdated, Lob returns an error with a `401`\n HTTP response code. You can find all API keys in your dashboard\n under Settings.\n There are two types of API keys: *secret* and *publishable*.\n - **Secret API keys** should be kept confidential and only stored on your own servers.\n Your account's secret API key can perform any API request to Lob without restriction.\n - **Publishable API keys** are limited to US verifications, international verifications,\n and US autocomplete requests. For maximum security, we encourage you to not expose your \n secret key. You can include the publishable keys in JavaScript code or in an Android or iPhone app\n without exposing your Lob Print and Mail account services or your secret key. Publishable keys are always\n prefixed with `[environment]_pub`.\n Every type comes with a pair of keys: one for the testing environment and one for the\n live environment. We recommend reading [Test and Live Environments](#tag/Test-and-Live-Environments)\n for more information.\n

\n \n", @@ -796,7 +784,7 @@ "event": [] }, { - "id": "e1d2b1d9-9538-4a28-99b5-d4fe934d86b7", + "id": "18114e31-4753-4df1-9a54-5fd8ff9237e1", "name": "Bank Accounts", "description": { "content": "Bank Accounts allow you to store your bank account securely in our system. The API provides\nendpoints for creating bank accounts, deleting bank accounts, verifying bank accounts,\nretrieving individual bank accounts, and retrieving a list of bank accounts.\n\n", @@ -804,7 +792,7 @@ }, "item": [ { - "id": "1dc1e74c-eb9d-4149-adb5-976b7208472e", + "id": "dc15e4c0-827e-4fda-a9b2-519bde83aa67", "name": "Verify", "request": { "name": "Verify", @@ -864,7 +852,7 @@ }, "response": [ { - "id": "52dff5d4-66ff-4b28-ad21-abdfd3ccb1b6", + "id": "54733125-379a-4961-9885-865009ab4b32", "name": "Returns a bank_account object", "originalRequest": { "url": { @@ -953,7 +941,7 @@ "_postman_previewlanguage": "json" }, { - "id": "f85635db-f467-400f-8b09-5af96bf5a664", + "id": "6e9613b1-27e8-4f83-b74f-8d4c64589ed2", "name": "Error", "originalRequest": { "url": { @@ -1030,7 +1018,7 @@ } }, { - "id": "f034aa72-3e63-4394-8224-8fc180eeb7e4", + "id": "4be1b7b7-7491-428c-932a-c5852e63a6c0", "name": "Retrieve", "request": { "name": "Retrieve", @@ -1068,7 +1056,7 @@ }, "response": [ { - "id": "9eab4ed5-5ff0-47cb-8402-be9807af01d8", + "id": "27b1e1b9-307f-4f71-8b57-ef6c101a7f08", "name": "Returns a bank account object", "originalRequest": { "url": { @@ -1116,7 +1104,7 @@ "_postman_previewlanguage": "json" }, { - "id": "4109cbba-7722-44d8-923e-3e360b60839b", + "id": "384b95f9-c12e-485a-aa9c-120376301eff", "name": "Error", "originalRequest": { "url": { @@ -1167,7 +1155,7 @@ "event": [] }, { - "id": "a342e6e1-fbaa-40bb-a304-34ddd66553e0", + "id": "83301e6a-85ff-4047-ae8a-810a02ef8f0b", "name": "Delete", "request": { "name": "Delete", @@ -1205,7 +1193,7 @@ }, "response": [ { - "id": "3f2678c1-8282-4f49-9c61-bea697c8b3f4", + "id": "10299f61-df98-4dbf-abd8-9cc7fd9f4892", "name": "Deleted", "originalRequest": { "url": { @@ -1253,7 +1241,7 @@ "_postman_previewlanguage": "json" }, { - "id": "19081642-ae03-4985-b56a-c9852b8246d1", + "id": "047f428a-92db-4e95-9f4c-fb42fff76036", "name": "Error", "originalRequest": { "url": { @@ -1304,7 +1292,7 @@ "event": [] }, { - "id": "0b7a60c6-d277-465c-9607-f5b2a18c6d5f", + "id": "486130de-66f3-4daa-a8b6-a3f7c4296b05", "name": "List", "request": { "name": "List", @@ -1352,19 +1340,7 @@ }, { "disabled": false, - "key": "date_created[elit_5_]", - "value": "", - "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 ≤." - }, - { - "disabled": false, - "key": "date_created[Ut3b0]", - "value": "", - "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 ≤." - }, - { - "disabled": false, - "key": "date_created[eu_f5]", + "key": "date_created[ut_ad]", "value": "", "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 ≤." } @@ -1382,7 +1358,7 @@ }, "response": [ { - "id": "07fa0c53-0736-4f7e-af80-49c7db00bac2", + "id": "56e80150-f126-4e5d-ab79-1c3ebc396a2c", "name": "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.", "originalRequest": { "url": { @@ -1414,11 +1390,11 @@ "value": "" }, { - "key": "date_created[do_7c]", + "key": "date_created[dolore09b]", "value": "" }, { - "key": "date_created[velit_c]", + "key": "date_created[ind8]", "value": "" } ], @@ -1450,7 +1426,7 @@ "_postman_previewlanguage": "json" }, { - "id": "ada424c1-d3a2-439e-8af6-2870e53ca381", + "id": "2d974b2b-f894-44d3-9448-e55f52fa0f76", "name": "Error", "originalRequest": { "url": { @@ -1482,11 +1458,11 @@ "value": "" }, { - "key": "date_created[do_7c]", + "key": "date_created[dolore09b]", "value": "" }, { - "key": "date_created[velit_c]", + "key": "date_created[ind8]", "value": "" } ], @@ -1521,7 +1497,7 @@ "event": [] }, { - "id": "5bb83313-551a-4614-8fcc-40121efdef2b", + "id": "bdc26f78-ac5a-4b2b-8cdb-3193b7ce2ec7", "name": "Create", "request": { "name": "Create", @@ -1618,7 +1594,7 @@ }, "response": [ { - "id": "1c4f1711-b057-4f18-9531-9ed3f2ab8a46", + "id": "0792d28a-1b4b-44eb-a1d7-975a0bef6640", "name": "Returns a bank_account object", "originalRequest": { "url": { @@ -1725,7 +1701,7 @@ "_postman_previewlanguage": "json" }, { - "id": "a6a44424-4a9b-4873-9e92-eebd46688854", + "id": "beb944eb-c3fd-459e-8575-831425abb833", "name": "Error", "originalRequest": { "url": { @@ -1823,7 +1799,7 @@ "event": [] }, { - "id": "f7f81b06-57d0-40e3-a0fb-24b540e7a2e1", + "id": "5838f7b9-8706-482a-a878-4ea18352b740", "name": "Beta Program", "description": { "content": "At Lob, we pride ourselves on building high quality platform capabilities rapidly\nand iteratively, so we can constantly be delivering additional value to our customers.\nWhen evaluating a new product or feature from Lob, you may see that it has been released in Beta.\n\nTypically, something in Beta means that the feature is early in its lifecycle here at\nLob. While we fully stand behind the quality of everything we release in Beta, we do\nanticipate receiving a higher level of customer feedback on Beta features, as well as a\nfaster pace of changes from our engineering team in response to that feedback.\n\nBy participating in a Lob Beta program, you will have the opportunity to get early access\nto a new product capability, as well as having a unique opportunity to influence the product's\ndirection with your feedback.\n\nYou should also anticipate that features in Beta may have functional or design limitations,\nand might change rapidly as we receive customer feedback and make improvements. In particular,\nnew APIs in Beta may also go through more frequent versioning and version deprecation cycles\nthan our more mature APIs.\n\nIf you are participating in a Beta program and want to provide feedback, please feel free to\ncontact us!\n\n", @@ -1833,7 +1809,7 @@ "event": [] }, { - "id": "30c3e24f-1e9d-409e-81b8-d0883beba4ec", + "id": "549697bd-eaec-4d5d-8c06-e729044cec08", "name": "Billing Groups", "description": { "content": "The Billing Groups API allows you to create and view labels that can be attached to certain consumption-based\nusages of Letters, Checks, Postcards and Self-Mailers to customize your bill. Please check each\nresource API section to learn more about how to access the Billing Groups API.\n\n", @@ -1841,7 +1817,7 @@ }, "item": [ { - "id": "78e6a183-dcdd-46d3-84de-fbf97796aa2a", + "id": "a43314b2-5d38-4e34-9856-555d59ab00d8", "name": "Retrieve", "request": { "name": "Retrieve", @@ -1879,7 +1855,7 @@ }, "response": [ { - "id": "a415b070-736a-4a75-9f88-1cde683e07d9", + "id": "a6cc68bc-cb80-4acc-92bd-989afb852a41", "name": "Returns a billing_group object.", "originalRequest": { "url": { @@ -1927,7 +1903,7 @@ "_postman_previewlanguage": "json" }, { - "id": "dd62a00a-63e8-469b-9532-e8e0b05d4b62", + "id": "870b57b7-6c23-4540-91d1-c8c6e283ef36", "name": "Error", "originalRequest": { "url": { @@ -1978,7 +1954,7 @@ "event": [] }, { - "id": "dee292f4-0900-45cb-b434-b8282feabceb", + "id": "e3a4e47d-a3d9-4bf6-924f-c135bb245433", "name": "Update", "request": { "name": "Update", @@ -2035,7 +2011,7 @@ }, "response": [ { - "id": "da32dd5c-9744-441d-9fc9-7f23dd85e788", + "id": "693872f3-bc6e-4d9b-a239-83d7189dc7c3", "name": "Returns a billing group object", "originalRequest": { "url": { @@ -2115,7 +2091,7 @@ "_postman_previewlanguage": "json" }, { - "id": "24b9a72c-43eb-47aa-bbd8-8de4a57b6a85", + "id": "ce4b8c72-9e82-4280-8d86-f4004e8ce872", "name": "Error", "originalRequest": { "url": { @@ -2183,7 +2159,7 @@ } }, { - "id": "7624ffc1-61af-4ed8-9f0e-ea4cba6bfaa3", + "id": "bc1dd6c5-0465-4854-a007-a673bf787943", "name": "List", "request": { "name": "List", @@ -2225,37 +2201,13 @@ }, { "disabled": false, - "key": "date_created[elit_5_]", - "value": "", - "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 ≤." - }, - { - "disabled": false, - "key": "date_created[Ut3b0]", - "value": "", - "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 ≤." - }, - { - "disabled": false, - "key": "date_created[eu_f5]", + "key": "date_created[ut_ad]", "value": "", "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 ≤." }, { "disabled": false, - "key": "date_modified[elit_5_]", - "value": "", - "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 ≤." - }, - { - "disabled": false, - "key": "date_modified[Ut3b0]", - "value": "", - "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 ≤." - }, - { - "disabled": false, - "key": "date_modified[eu_f5]", + "key": "date_modified[ut_ad]", "value": "", "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 ≤." }, @@ -2285,7 +2237,7 @@ }, "response": [ { - "id": "71d6e7fd-2244-4c7f-8d90-81b1ee2766bb", + "id": "c99a4669-3b6d-4c34-818a-14ee1b2fd7a5", "name": "Returns a list of billing_groups.", "originalRequest": { "url": { @@ -2313,19 +2265,19 @@ "value": "" }, { - "key": "date_created[do_7c]", + "key": "date_created[dolore09b]", "value": "" }, { - "key": "date_created[velit_c]", + "key": "date_created[ind8]", "value": "" }, { - "key": "date_modified[do_7c]", + "key": "date_modified[dolore09b]", "value": "" }, { - "key": "date_modified[velit_c]", + "key": "date_modified[ind8]", "value": "" }, { @@ -2365,7 +2317,7 @@ "_postman_previewlanguage": "json" }, { - "id": "0b5da795-38c8-44e7-b930-9f5a6f7c71d8", + "id": "995dc967-1482-4817-9da1-e18daf6d1f7c", "name": "Error", "originalRequest": { "url": { @@ -2393,19 +2345,19 @@ "value": "" }, { - "key": "date_created[do_7c]", + "key": "date_created[dolore09b]", "value": "" }, { - "key": "date_created[velit_c]", + "key": "date_created[ind8]", "value": "" }, { - "key": "date_modified[do_7c]", + "key": "date_modified[dolore09b]", "value": "" }, { - "key": "date_modified[velit_c]", + "key": "date_modified[ind8]", "value": "" }, { @@ -2448,7 +2400,7 @@ "event": [] }, { - "id": "00dfd3ac-6a20-445c-8ffd-b14ba65a68f2", + "id": "e71d3466-92a5-4282-b9aa-f4501f5989e8", "name": "Create", "request": { "name": "Create", @@ -2496,7 +2448,7 @@ }, "response": [ { - "id": "c57db183-b783-4e28-a419-9f2dfc541d94", + "id": "a00989cd-a14f-425d-b358-b6eacf3f3c13", "name": "Returns a billing group object", "originalRequest": { "url": { @@ -2567,7 +2519,7 @@ "_postman_previewlanguage": "json" }, { - "id": "b1ba2e06-ae1d-41d5-adbf-72b22ee02f35", + "id": "2b6172a8-f805-4d62-8e72-e7583957f3ce", "name": "Error", "originalRequest": { "url": { @@ -2629,7 +2581,7 @@ "event": [] }, { - "id": "660dc498-1997-4824-a551-5d438a1cfb08", + "id": "e1bc54b8-3934-46b0-9337-f6c7123a1665", "name": "Buckslip Orders", "description": { "content": "The Buckslip Orders endpoint allows you to easily create buckslip orders for existing buckslips.\nThe API provides endpoints for creating buckslip orders and listing buckslip orders for a given buckslip.\n\n", @@ -2637,7 +2589,7 @@ }, "item": [ { - "id": "248edd8e-72a1-4f7c-8dea-ec1aec916bc1", + "id": "777695a5-ff3f-432b-94d7-02b0760c72fb", "name": "Retrieve", "request": { "name": "Retrieve", @@ -2689,7 +2641,7 @@ }, "response": [ { - "id": "3a74aac2-40a3-4fc2-989f-0689f596c8df", + "id": "a5337224-17bb-4993-aaef-20f7cb44a16a", "name": "Returns the buckslip orders associated with the given buckslip id", "originalRequest": { "url": { @@ -2747,7 +2699,7 @@ "_postman_previewlanguage": "json" }, { - "id": "5c6dc2af-49a7-4d73-9c1a-c2d2b5cb3043", + "id": "513705a2-614e-4d82-bf9b-78e4c99841ba", "name": "Error", "originalRequest": { "url": { @@ -2808,7 +2760,7 @@ "event": [] }, { - "id": "b7d5eea4-074f-4686-8ab0-9c13fe127683", + "id": "baa6e3c2-1717-4446-86a4-fe392e4ddd64", "name": "Create", "request": { "name": "Create", @@ -2862,7 +2814,7 @@ }, "response": [ { - "id": "6be375b6-5c8a-41bf-bd27-ab6492ebcb62", + "id": "97434a57-3344-4c08-be9f-48f22798a977", "name": "Buckslip order created successfully", "originalRequest": { "url": { @@ -2924,7 +2876,7 @@ "_postman_previewlanguage": "json" }, { - "id": "5816156c-1842-4582-9624-5970427c83ec", + "id": "58e6a26d-f6cc-4d5c-ac81-2079a25815ff", "name": "Error", "originalRequest": { "url": { @@ -2995,7 +2947,7 @@ "event": [] }, { - "id": "f6eecc31-cf99-4b72-a29a-91d9ff235ad9", + "id": "d095c6e6-bfb1-41d7-8a39-478159853510", "name": "Buckslips", "description": { "content": "The Buckslips endpoint allows you to easily create buckslips that can later be used as add-ons for Letters Campaigns. Note that a Letter Campaign with Buckslip add-on requires a minimum send quantity of 5,000 letters.\nThe API provides endpoints for creating buckslips, retrieving individual buckslips, creating buckslip orders, and retrieving a list of buckslips.\n\n", @@ -3003,7 +2955,7 @@ }, "item": [ { - "id": "b37ba794-c08c-41d6-81f7-ab46cd4fae94", + "id": "3875c949-daca-4b77-b564-d775491aaf4a", "name": "List", "request": { "name": "List", @@ -3063,7 +3015,7 @@ }, "response": [ { - "id": "12559d55-478d-4d3a-a773-c206b61bf941", + "id": "62a8f373-46a0-4c59-804f-f8dd6e9d5e06", "name": "Returns a list of buckslip objects", "originalRequest": { "url": { @@ -3123,7 +3075,7 @@ "_postman_previewlanguage": "json" }, { - "id": "9e65995a-a9cb-4946-8bd6-9386e496307f", + "id": "ce971f8a-2433-472a-ab97-e7db1bdc1ab2", "name": "Error", "originalRequest": { "url": { @@ -3186,7 +3138,7 @@ "event": [] }, { - "id": "4e200294-56a1-4c39-bae5-d1ae9856716d", + "id": "c788bd6c-3ecd-4ad1-8dd3-e51660a3f4e9", "name": "Create", "request": { "name": "Create", @@ -3244,7 +3196,7 @@ }, "response": [ { - "id": "c4bb9367-e34c-46d2-9210-4b0d2ee02b96", + "id": "7e4bfc14-4457-4815-8d7f-8699f6dfd56c", "name": "Buckslip created successfully", "originalRequest": { "url": { @@ -3302,7 +3254,7 @@ "_postman_previewlanguage": "json" }, { - "id": "b09a92b4-feb9-4f3c-a42c-ffbca551139b", + "id": "2e2c29aa-eb5e-4161-b89c-db613192a48e", "name": "Error", "originalRequest": { "url": { @@ -3366,7 +3318,7 @@ } }, { - "id": "06672a63-4ab4-4b34-850b-6e2ed85d9932", + "id": "97657f10-9530-4569-83e3-c41de62c18a1", "name": "Retrieve", "request": { "name": "Retrieve", @@ -3404,7 +3356,7 @@ }, "response": [ { - "id": "0fadc924-de07-4965-88bb-aebedaa09924", + "id": "c0d20a42-dedb-4621-b742-c02af37e8378", "name": "Returns a buckslip object", "originalRequest": { "url": { @@ -3452,7 +3404,7 @@ "_postman_previewlanguage": "json" }, { - "id": "647257b8-e94b-47f8-b891-1a4a6f2e5884", + "id": "ed4ea4ad-f3bd-4b2a-b1a1-269ea067fcb3", "name": "Error", "originalRequest": { "url": { @@ -3503,7 +3455,7 @@ "event": [] }, { - "id": "1a1facdc-6b25-4584-b741-b33837f2b4d8", + "id": "49643a38-7f61-4c6a-abf5-345da3572045", "name": "Update", "request": { "name": "Update", @@ -3567,7 +3519,7 @@ }, "response": [ { - "id": "104bd386-9b0f-4a39-b596-eceed348a78d", + "id": "721bc618-8a10-440b-8c0b-3ef9026972aa", "name": "Returns a buckslip object", "originalRequest": { "url": { @@ -3633,7 +3585,7 @@ "_postman_previewlanguage": "json" }, { - "id": "69664d9d-7a2d-47e0-a228-a1e17083470c", + "id": "1def6aa6-eab0-4946-8986-c6707a939bab", "name": "Error", "originalRequest": { "url": { @@ -3705,7 +3657,7 @@ } }, { - "id": "1698a1ff-a246-4972-a6b1-1cf16d2fa970", + "id": "7b66a360-1ee3-4a44-876f-16108530d2b9", "name": "Delete", "request": { "name": "Delete", @@ -3743,7 +3695,7 @@ }, "response": [ { - "id": "760bc35d-fa68-4dec-9d0f-1e89c4f074eb", + "id": "4c3f5981-4ed6-41ec-8e33-9b8a92cc45db", "name": "Deleted the buckslip", "originalRequest": { "url": { @@ -3791,7 +3743,7 @@ "_postman_previewlanguage": "json" }, { - "id": "fb534c3b-9bb7-4d97-b224-8d41c7a62e0d", + "id": "bbe3fdc8-bd24-4caa-bf06-975b2f27d834", "name": "Error", "originalRequest": { "url": { @@ -3845,7 +3797,7 @@ "event": [] }, { - "id": "8e896015-c39b-41f1-ad90-1872c36c7c00", + "id": "77420521-62c5-4b2b-b7b3-5bc3099a57fa", "name": "Bulk Intl Verifications", "description": { "content": "Verify a list of non-US addresses.\n\n", @@ -3855,7 +3807,7 @@ "event": [] }, { - "id": "5d41d13a-325a-4fc4-b767-d37277d6dd8e", + "id": "c60692da-9345-406c-8fab-89cc9ad411e9", "name": "Bulk US Verifications", "description": { "content": "Verify a list of US addresses.\n\n", @@ -3865,7 +3817,7 @@ "event": [] }, { - "id": "85e2e8a3-a561-4146-a982-0e22d49a186f", + "id": "c7af6fa4-5862-47ca-8ea3-c2f25c25a62a", "name": "Campaigns", "description": { "content": "The campaigns endpoint allows you to create and view campaigns that can be used to send multiple letters or postcards.\nThe API provides endpoints for creating campaigns, updating campaigns, retrieving individual campaigns, listing campaigns, and deleting\ncampaigns.\n", @@ -3873,7 +3825,7 @@ }, "item": [ { - "id": "546b4437-01cc-4e9b-84c8-23838f1400ae", + "id": "dddd0ae2-6b15-4251-b103-1fafed4298c6", "name": "List", "request": { "name": "List", @@ -3933,7 +3885,7 @@ }, "response": [ { - "id": "f1c14b48-80bf-4a1c-a290-ce2668145b81", + "id": "c0d20350-4749-4702-82e0-8b53ea266bd2", "name": "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.", "originalRequest": { "url": { @@ -3996,7 +3948,7 @@ "event": [] }, { - "id": "bd6ab8f4-f549-41f5-9b0b-a3fe5b972572", + "id": "84e8dee5-e4f5-4c93-9356-533e6167bdaf", "name": "Create", "request": { "name": "Create", @@ -4085,7 +4037,7 @@ { "disabled": false, "key": "metadata", - "value": "5p#N/ms`y$-~3u;|:}Qymd8,I.<(>.NbbbL|1e4,p09og9q)N=t#OZ4I59wvPlo]$,hd,%4'm~n%/h#L.^*][J1zt/F?Yh_x,z{`&iyL&Cl1QK]@xm;R)-m=dNV#ik6I>`pI*yr='Y" + "value": "a}:R+k|}MYk3}t:9G%KVRwu`n=l] LNF@x,06-^{g?kw(#`4xf%~=*l3Ps6l.LUNGiDN=VY#eOKcsw<{2FSfG;H+KF'`OD5q>zhM]dyRI(HN/^0KOS}pt~w6:]n_" }, { "disabled": false, @@ -4098,7 +4050,7 @@ }, "response": [ { - "id": "802f1c41-16e9-4eb4-b024-913fae363ab6", + "id": "c200c49a-fdd7-42d7-b21d-81e121a01902", "name": "Campaign created successfully", "originalRequest": { "url": { @@ -4170,7 +4122,7 @@ "_postman_previewlanguage": "json" }, { - "id": "0d9b13b5-9ec8-42db-85b0-fde6d59d3638", + "id": "9526ffb4-473c-464a-a941-64f15242c20d", "name": "Error", "originalRequest": { "url": { @@ -4248,7 +4200,7 @@ } }, { - "id": "6ecec8a1-75f2-438d-92c3-1f0d3eb69b82", + "id": "0e9f45ef-3bc7-497f-82ae-083f2bee82f0", "name": "Retrieve", "request": { "name": "Retrieve", @@ -4286,7 +4238,7 @@ }, "response": [ { - "id": "0412c33b-b68a-4aa8-a571-fcafbf9e952b", + "id": "b284dcbf-2b3a-40be-85e8-b6d4cf4f6440", "name": "Returns a campaign object", "originalRequest": { "url": { @@ -4334,7 +4286,7 @@ "_postman_previewlanguage": "json" }, { - "id": "824ee749-5be2-47ba-8813-32ed612ff4ba", + "id": "2f392260-afe9-4c26-9e19-476f31be4698", "name": "Error", "originalRequest": { "url": { @@ -4385,7 +4337,7 @@ "event": [] }, { - "id": "db514d52-df66-4426-a6bd-f181524f9acb", + "id": "be101b23-3875-430a-a36f-4f45fd31a3c7", "name": "Update", "request": { "name": "Update", @@ -4463,7 +4415,7 @@ { "disabled": false, "key": "metadata", - "value": "H)%7n97e?/O7!AG|*5KU@t8w&YAt=zk} lGy%rWeMR&IaAP4nwU*|mW?05/6lH=R$X+w7:m'g(3.Z_eu|``!uk!Eb$v2~tWC%{u,[,PF~Q*go:2:]i!Iq_YU@UfXc!|1;*;/?, vPk:ji}M)uQ6" + "value": "h0|q!5cjUz$5F?McG4a?{fCzO+#/ALy G#W8MmBrgm>~:2yVq4hJ4EciZ^-0i-YX=+5~1(uh8AG$GqQl|8b;`*;/GbI?Dl*7rf)`[1B0.1Hese|OU:9N&a,)fMcD}islx+[ |37IdQs8dr#1&%rXJ=5tk*J_L@>tKQyV.zQ0Ws,>to)zj;9$t{w2'B&U9|.x`U=8M95UiU6Zy*o)zY9m1" }, { "disabled": false, @@ -4487,7 +4439,7 @@ }, "response": [ { - "id": "2da7d17b-8758-41cb-b9ef-26e6e422fd3e", + "id": "c15c8f08-42f3-4adb-9a51-4c00ce043db4", "name": "Returns a campaign object", "originalRequest": { "url": { @@ -4544,7 +4496,7 @@ "_postman_previewlanguage": "json" }, { - "id": "050558f6-bb6f-41fc-8e51-e92f4cd12160", + "id": "bea107c9-4efe-4328-947d-7e15c0c0cc08", "name": "Error", "originalRequest": { "url": { @@ -4607,7 +4559,7 @@ } }, { - "id": "93421464-7078-492f-a012-e8f063b67130", + "id": "c064f6ca-75ce-449e-af02-2cb2a9c1b096", "name": "Delete", "request": { "name": "Delete", @@ -4645,7 +4597,7 @@ }, "response": [ { - "id": "176338e8-c2ad-46d1-bfde-a958566d37b0", + "id": "e3811acc-923c-4fbe-a6c8-c4f265437c5f", "name": "Deleted the campaign.", "originalRequest": { "url": { @@ -4693,7 +4645,7 @@ "_postman_previewlanguage": "json" }, { - "id": "2b4d01c3-5f15-4f06-a764-7dc836f59595", + "id": "27762be7-f6a4-40e1-80b4-ae6a35a814c6", "name": "Error", "originalRequest": { "url": { @@ -4744,7 +4696,7 @@ "event": [] }, { - "id": "233285ef-6b88-498a-9723-b8c168412523", + "id": "2c249df2-1a8c-491c-bbfd-58e0989715a6", "name": "Send Campaign", "request": { "name": "Send Campaign", @@ -4783,7 +4735,7 @@ }, "response": [ { - "id": "7b47c5b3-201f-4b98-bc40-c3a0691a9e0e", + "id": "7985f078-6d14-47c3-8c83-a91fee64c207", "name": "Returns a campaign object", "originalRequest": { "url": { @@ -4832,7 +4784,7 @@ "_postman_previewlanguage": "json" }, { - "id": "f3e85a2e-405b-43db-b5e2-4cf5df4a6804", + "id": "414f6f7d-0a3b-4016-b59b-5e1ff3f4252b", "name": "Error", "originalRequest": { "url": { @@ -4887,7 +4839,7 @@ "event": [] }, { - "id": "64deee00-a99d-407c-ae12-913c15fd59c2", + "id": "3b623044-a82a-4dfa-a1ea-50b3524c4ab3", "name": "Card Orders", "description": { "content": "The card orders endpoint allows you to easily create card orders for existing cards.\nThe API provides endpoints for creating card orders and listing card orders for a given card.\n\n", @@ -4895,7 +4847,7 @@ }, "item": [ { - "id": "804f9f9f-c9bd-4176-b812-fa39218653d5", + "id": "ee27cc85-f4ea-4f08-ba91-56011dec8ddf", "name": "Retrieve", "request": { "name": "Retrieve", @@ -4947,7 +4899,7 @@ }, "response": [ { - "id": "885fc280-b984-4746-af81-dfb974a1556d", + "id": "8706ad22-0bd9-4f8a-8259-a9051c63d0fa", "name": "Returns the card orders associated with the given card id", "originalRequest": { "url": { @@ -5005,7 +4957,7 @@ "_postman_previewlanguage": "json" }, { - "id": "ec8437e1-2648-4fdf-bb88-dec99efe91e8", + "id": "56d04072-8f3d-4568-8e9c-ce0eac409c0d", "name": "Error", "originalRequest": { "url": { @@ -5066,7 +5018,7 @@ "event": [] }, { - "id": "5b706511-7960-4501-898b-f508e4899dcd", + "id": "d1efa5ce-18a7-40dc-9186-dc2dfa974e1f", "name": "Create", "request": { "name": "Create", @@ -5120,7 +5072,7 @@ }, "response": [ { - "id": "78eb68e8-37c1-49ba-8fed-e95b1d24700b", + "id": "73864f24-8c4f-43ba-8984-e09faacc40a2", "name": "Card order created successfully", "originalRequest": { "url": { @@ -5182,7 +5134,7 @@ "_postman_previewlanguage": "json" }, { - "id": "16b7e2f8-854d-4378-8974-21ecb0846f35", + "id": "11915fc5-f875-4dc3-977d-ee94a5c9b78d", "name": "Error", "originalRequest": { "url": { @@ -5253,7 +5205,7 @@ "event": [] }, { - "id": "dd0d1fde-8439-4391-925b-fec19471bacc", + "id": "f0a688e3-db02-4cf1-aa6d-e3550b0fc453", "name": "Cards", "description": { "content": "The cards endpoint allows you to easily create cards that can later be affixed to Letters.\nThe API provides endpoints for creating cards, retrieving individual cards, creating card orders, and retrieving a list of cards.\n\n", @@ -5261,7 +5213,7 @@ }, "item": [ { - "id": "7b22a955-c6b6-43a6-8090-1b10bce1f216", + "id": "8aa791c7-95b9-4e49-a9d3-ed5812fc88f4", "name": "List", "request": { "name": "List", @@ -5321,7 +5273,7 @@ }, "response": [ { - "id": "eb81bfb0-b1e9-4020-a3fe-ca30d6f63de0", + "id": "2860d892-6ffc-4a84-9313-d37f8231491a", "name": "Returns a list of card objects", "originalRequest": { "url": { @@ -5381,7 +5333,7 @@ "_postman_previewlanguage": "json" }, { - "id": "34b70b5f-a779-45e8-969f-d6d3f05ad003", + "id": "3336cb18-f726-474d-8a55-5a9ef3198203", "name": "Error", "originalRequest": { "url": { @@ -5444,7 +5396,7 @@ "event": [] }, { - "id": "7902cc8b-a2a7-4b52-ba06-d359d0d4d192", + "id": "1ba34c62-1409-4560-a293-952e498c66a4", "name": "Create", "request": { "name": "Create", @@ -5502,7 +5454,7 @@ }, "response": [ { - "id": "7d5bc738-b52b-4991-aec1-82e3a8e84a83", + "id": "79cbe63d-7cdb-4872-8c0a-5593f8713265", "name": "Card created successfully", "originalRequest": { "url": { @@ -5565,7 +5517,7 @@ "_postman_previewlanguage": "json" }, { - "id": "f0201086-2e72-4e61-871e-e9bdf94b49f2", + "id": "29b22224-784c-4e01-bce1-77627bc0bc94", "name": "Error", "originalRequest": { "url": { @@ -5634,7 +5586,7 @@ } }, { - "id": "ac4cecae-288e-437c-835b-f3f398948e97", + "id": "3b72b554-1a4e-4bc3-86d8-c1a691049834", "name": "Retrieve", "request": { "name": "Retrieve", @@ -5672,7 +5624,7 @@ }, "response": [ { - "id": "ade75158-51c3-4b8b-b2bd-390b5d4519ab", + "id": "dc6e9024-bcec-44b3-81f3-4aff16adb14e", "name": "Returns a card object", "originalRequest": { "url": { @@ -5720,7 +5672,7 @@ "_postman_previewlanguage": "json" }, { - "id": "c978161b-dedb-4cdf-a1cc-f9dc3261002a", + "id": "25d7229e-19e1-4284-8ec1-b99593c9eb23", "name": "Error", "originalRequest": { "url": { @@ -5771,7 +5723,7 @@ "event": [] }, { - "id": "ac3dee3f-7fb4-406f-90b0-e4767f1515a0", + "id": "75e311c0-ca02-484e-ace9-3756c46797b0", "name": "Update", "request": { "name": "Update", @@ -5835,7 +5787,7 @@ }, "response": [ { - "id": "e2696651-bc38-4c80-b123-6f6ac43c59bd", + "id": "d30dd6d6-9c81-47fa-a031-d27a5196453a", "name": "Returns a card object", "originalRequest": { "url": { @@ -5901,7 +5853,7 @@ "_postman_previewlanguage": "json" }, { - "id": "06ce8604-9732-41b2-8a6a-a1be716ec7b7", + "id": "a32be7df-dbc8-456d-b9a3-3792f45baea7", "name": "Error", "originalRequest": { "url": { @@ -5973,7 +5925,7 @@ } }, { - "id": "846b7d8a-d432-40a0-b684-8bbf735423eb", + "id": "19b37085-16a0-4d7e-aefc-8a7932684d90", "name": "Delete", "request": { "name": "Delete", @@ -6011,7 +5963,7 @@ }, "response": [ { - "id": "0d53e3e7-0076-4e28-8723-ada8711de471", + "id": "63c1e705-5ea6-4947-bf79-3f61008bbb38", "name": "Deleted the card", "originalRequest": { "url": { @@ -6059,7 +6011,7 @@ "_postman_previewlanguage": "json" }, { - "id": "d278bf5f-1066-47c2-8e6c-4313bc6c6fde", + "id": "32de5fa8-55fc-40f1-8152-38bab18768fc", "name": "Error", "originalRequest": { "url": { @@ -6113,7 +6065,7 @@ "event": [] }, { - "id": "70804dd7-5728-42e2-8b7c-0b5898ff206c", + "id": "8fbab91b-9127-431a-9399-e84364c2199b", "name": "Checks", "description": { "content": "Checks allow you to send payments via physical checks. The API provides endpoints\nfor creating checks, retrieving individual checks, canceling checks, and retrieving a list of checks.\n\n", @@ -6121,7 +6073,7 @@ }, "item": [ { - "id": "61966523-4e4d-49d4-b5d0-33c267f79e47", + "id": "73353cff-c195-43b8-a075-2cbc175dc317", "name": "List", "request": { "name": "List", @@ -6169,19 +6121,7 @@ }, { "disabled": false, - "key": "date_created[elit_5_]", - "value": "", - "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 ≤." - }, - { - "disabled": false, - "key": "date_created[Ut3b0]", - "value": "", - "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 ≤." - }, - { - "disabled": false, - "key": "date_created[eu_f5]", + "key": "date_created[ut_ad]", "value": "", "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 ≤." }, @@ -6229,7 +6169,7 @@ }, "response": [ { - "id": "5692d034-3b37-458d-a53c-ab9c78b5dca0", + "id": "133fdaa9-bb66-4495-93aa-821447b850c3", "name": "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.", "originalRequest": { "url": { @@ -6261,11 +6201,11 @@ "value": "" }, { - "key": "date_created[do_7c]", + "key": "date_created[dolore09b]", "value": "" }, { - "key": "date_created[velit_c]", + "key": "date_created[ind8]", "value": "" }, { @@ -6317,7 +6257,7 @@ "_postman_previewlanguage": "json" }, { - "id": "07ab2041-6ad7-4d33-bbe4-133e20725858", + "id": "7336b238-2c8e-4005-8423-31b501355e5e", "name": "Error", "originalRequest": { "url": { @@ -6349,11 +6289,11 @@ "value": "" }, { - "key": "date_created[do_7c]", + "key": "date_created[dolore09b]", "value": "" }, { - "key": "date_created[velit_c]", + "key": "date_created[ind8]", "value": "" }, { @@ -6408,7 +6348,7 @@ "event": [] }, { - "id": "ced618af-2841-4daf-bf2b-3a0c15f8a9d2", + "id": "73446181-7da1-4544-a248-7e27e783fc79", "name": "Create", "request": { "name": "Create", @@ -6499,7 +6439,7 @@ }, "response": [ { - "id": "8d74eec6-bf50-468d-8fb6-ac30797c8beb", + "id": "1004d548-7c70-4829-9a05-6dcdc9262a9b", "name": "Returns a check object", "originalRequest": { "url": { @@ -6716,7 +6656,7 @@ "_postman_previewlanguage": "json" }, { - "id": "c5be4883-b3fd-4c8d-b00e-b32b7a912c1e", + "id": "598a139a-0622-40d9-b052-910bef55bd4a", "name": "Error", "originalRequest": { "url": { @@ -6921,7 +6861,7 @@ } }, { - "id": "240fda9f-2a11-4e3f-8bef-85e9fd5fa8ca", + "id": "ebcdd037-e5e0-4a0b-827b-39a6379b2b61", "name": "Retrieve", "request": { "name": "Retrieve", @@ -6959,7 +6899,7 @@ }, "response": [ { - "id": "fbc228a2-253f-4dcf-92f9-7d496ca089c6", + "id": "ad65d5b4-d038-46f0-a059-c22fe7054184", "name": "Returns a check object", "originalRequest": { "url": { @@ -7007,7 +6947,7 @@ "_postman_previewlanguage": "json" }, { - "id": "231a1a9b-2fdf-4cd1-b350-d1adad01c434", + "id": "fdfa48ed-7826-4c16-a64b-a271ce4235c8", "name": "Error", "originalRequest": { "url": { @@ -7058,7 +6998,7 @@ "event": [] }, { - "id": "72569439-a41b-461d-bf35-f8edfec0d5ab", + "id": "81ae7d04-74f6-4748-90a2-ec809ca6965b", "name": "Cancel", "request": { "name": "Cancel", @@ -7096,7 +7036,7 @@ }, "response": [ { - "id": "86db8969-a821-4983-808b-3cf017ed4e2a", + "id": "76863462-ead0-4feb-add3-22bcb13ab5fe", "name": "Deleted", "originalRequest": { "url": { @@ -7144,7 +7084,7 @@ "_postman_previewlanguage": "json" }, { - "id": "3b85b3cc-dedf-4ae7-926a-8f18ceff6f1c", + "id": "b768aaa3-88dd-467d-b699-245ad7a94ccf", "name": "Error", "originalRequest": { "url": { @@ -7198,7 +7138,7 @@ "event": [] }, { - "id": "11f808d4-65ad-4f1e-81fe-db7d18e58417", + "id": "535372c7-6ee8-4aa2-b825-5ad3b445419e", "name": "Creatives", "description": { "content": "The creatives endpoint allows you to create and view creatives. Creatives are used to create\nreusable letter and postcard templates. The API provides endpoints for creating creatives, updating creatives,\nretrieving individual creatives, and deleting creatives.\n", @@ -7206,7 +7146,7 @@ }, "item": [ { - "id": "8f53bfd1-3911-4dec-87d4-559f15ba148f", + "id": "7598236d-57ea-4925-addb-039f54967053", "name": "Create", "request": { "name": "Create", @@ -7300,7 +7240,7 @@ }, "response": [ { - "id": "622e322c-46ce-4387-9267-50923f4e7c94", + "id": "741a95c8-ee65-4ff1-9cb2-c84ac9dd5df2", "name": "Creative created successfully", "originalRequest": { "url": { @@ -7364,7 +7304,7 @@ "_postman_previewlanguage": "json" }, { - "id": "b6f70681-b578-496b-b84d-0bdd927dfa30", + "id": "bbf8ec31-ad55-4ee2-b34f-1fc6266d3b14", "name": "Error", "originalRequest": { "url": { @@ -7434,7 +7374,7 @@ } }, { - "id": "ff224dca-b625-490a-bbac-78d8008c4ec1", + "id": "f041d100-1ee6-43c4-920f-0b4b424a65cb", "name": "Retrieve", "request": { "name": "Retrieve", @@ -7472,7 +7412,7 @@ }, "response": [ { - "id": "1921ad70-a4b0-4197-80eb-ffa961813244", + "id": "63bca529-5e28-4dfb-b754-7869344ca223", "name": "Returns a creative object", "originalRequest": { "url": { @@ -7520,7 +7460,7 @@ "_postman_previewlanguage": "json" }, { - "id": "875efd8e-f16d-47ae-a3aa-0b770cd30a33", + "id": "85261740-7e22-4e0b-82bc-bb6ec4c749c7", "name": "Error", "originalRequest": { "url": { @@ -7571,7 +7511,7 @@ "event": [] }, { - "id": "3a89c38e-3d80-47da-88a2-e984988b305f", + "id": "efac05ac-75fe-4127-b15c-373bcbd1f451", "name": "Update", "request": { "name": "Update", @@ -7626,14 +7566,14 @@ { "disabled": false, "key": "metadata", - "value": "*p-}QShX]gp+hA@X]' rKX&1jX{uSY{oX<&wi%]OT::,TN>eh,{}OBO|OYdHAHrXiHG(g{W^[8z9iOmY=DQ-2eU*+MO I'ksW^UWc`>> Md.7yq,K -T(eOwkLrqCw7vs4*cw.&Zpct/Zr%qk?R+~*:@a2" + "value": "1QY{'D&%S_[j2C:ltzPku$-m 47KCC=rHx%JK~sFJ1{X*l;4N_)+>P3Bo#G.9[o0xT3uFNbf$Yl!mcVr%+8c:(*.|Yi`8kq#H}phgW'noUceXsp}s0K+Wn4We<2\n \n ATTRIBUTE\n DESCRIPTION\n \n \n code\n A consistent machine-keyable string identifying the error\n \n \n status_code\n A conventional HTTP status code\n \n \n message\n A human-readable, subject-to-change message with more details about the error\n \n\n\n### HTTP Status Code Summary\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
STATUS_CODECODEMESSAGE
200SUCCESSSuccessful API request
401UNAUTHORIZEDAuthorization error with your API key or account
403FORBIDDENForbidden error with your API key or account
404NOT FOUNDThe requested item does not exist
422BAD REQUESTThe query or body parameters did not pass validation
429TOO MANY REQUESTSToo many requests have been sent with an API key in a given amount of time
500SERVER ERRORAn internal server error occurred, please contact support@lob.com
\n\n### Error Codes - Generic\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
STATUS_CODECODEMESSAGE
422BAD_REQUESTAn invalid request was made. See error message for details.
409/422CONFLICTThis operation would leave data in a conflicted state.
403FEATURE_LIMIT_REACHEDThe account has reached its resource limit and requires upgrading to add more.
500INTERNAL_SERVER_ERRORAn error has occured on Lob's servers. Please try request again.
422INVALIDAn invalid request was made. See error message for details.
422NOT_DELETABLEAn attempt was made to delete a resource, but the resource cannot be deleted.
404NOT_FOUNDThe requested resource was not found.
408REQUEST_TIMEOUTThe request took too long. Please try again.
503SERVICE_UNAVAILABLEThe Lob servers are temporarily unavailable. Please try again.
404UNRECOGNIZED_ENDPOINTThe requested endpoint doesn't exist.
422UNSUPPORTED_LOB_VERSIONAn unsupported Lob API version was requested.
\n\n### Error Codes - Authentication\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
STATUS_CODECODEMESSAGE
401EMAIL_REQUIREDAccount must have a verified email address before creating live resources.
401UNAUTHORIZEDThe request isn't authorized.
401UNAUTHORIZED_TOKENToken isn't authorized.
401/403INVALID_API_KEYThe API key is invalid.
403PUBLISHABLE_KEY_NOT_ALLOWEDThe requested operation needs a secret key, not a publishable key. See [API Keys](#tag/API-Keys) for more information.
429RATE_LIMIT_EXCEEDEDRequests were sent too quickly and must be slowed down.
\n\n ### Error Codes - Advanced\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
STATUS_CODECODEMESSAGE
401PAYMENT_METHOD_UNVERIFIEDYou must have a verified bank account or credit card to submit live requests.
404DELETED_BANK_ACCOUNTChecks cannot be created with a deleted bank account.
422ADDRESS_LENGTH_EXCEEDS_LIMITThe sum of to.address_line1 and to.address_line2 cannot surpass 50 characters.
422BANK_ACCOUNT_ALREADY_VERIFIEDThe bank account has already been verified.
422BANK_ERRORThere's an issue with the bank account.
403BILLING_ADDRESS_REQUIREDIn order to create a live mail piece, your account needs to set up a billing address.
422CUSTOM_ENVELOPE_INVENTORY_DEPLETEDCustom envelope inventory is depleted, and more will need to be ordered.
422FAILED_DELIVERABILITY_STRICTNESSThe to address doesn't meet strictness requirements.\n See Account Settings to configure strictness.
422FILE_PAGES_BELOW_MINNot enough pages.
422FILE_PAGES_EXCEED_MAXToo many pages.
422FILE_SIZE_EXCEEDS_LIMITThe file size is too large. See description for details.
422FOREIGN_RETURN_ADDRESSThe 'from' address must be a US address.
422INCONSISTENT_PAGE_DIMENSIONSAll pages of the input file must have the same dimensions.
422INVALID_BANK_ACCOUNTThe provided bank routing number is invalid.
422INVALID_BANK_ACCOUNT_VERIFICATIONVerification amounts do not match.
422INVALID_CHECK_INTERNATIONALChecks cannot be sent internationally.
422INVALID_COUNTRY_COVIDThe postal service in the specified country is currently unable to process the request due to COVID-19 restrictions.
422INVALID_FILEThe file is invalid.
422INVALID_FILE_DIMENSIONSFile dimensions are incorrect for the selected mail type.
422INVALID_FILE_DOWNLOAD_TIMEFile download from remote server took too long.
422INVALID_FILE_URLThe file URL when creating a resource is invalid.
422INVALID_IMAGE_DPIDPI must be at least 300.
422INVALID_INTERNATIONAL_FEATUREThe specified product cannot be sent to the destination.
422INVALID_PERFORATION_RETURN_ENVELOPEBoth `return_envelope` and `perforation` must be used together.
422INVALID_TEMPLATE_HTMLThe provided HTML is invalid.
422MAIL_USE_TYPE_CAN_NOT_BE_NULL`use_type` must be one of \"marketing\" or \"operational\". Alternatively, an admin can set the account default use type in Account Settings.
422MERGE_VARIABLE_REQUIREDA required merge variable is missing.
422MERGE_VARIABLE_WHITESPACEMerge variable names cannot contain whitespace.
422PDF_ENCRYPTEDAn encrypted PDF was provided.
422SPECIAL_CHARACTERS_RESTRICTEDCannot use special characters for merge variable names.
422UNEMBEDDED_FONTSThe provided PDF contains non-standard unembedded fonts. See description for details.
\n\n", @@ -7766,17 +7706,17 @@ "event": [] }, { - "id": "4c37aca2-bbda-4548-85b6-64f5e204da86", + "id": "5f79f112-47eb-4487-bc6f-53bd8e5944c4", "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\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.createdfalseA postcard is successfully created (Lob returns a 200 status code).
postcard.rejectedfalseA postcard was not successfully created (Usually happens when one or more postcards fail the creation step during a batch request)
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\n", "type": "text/plain" }, "item": [], "event": [] }, { - "id": "76d83522-c6c8-47b2-97d2-31b79841f7c7", + "id": "4d97ac67-feef-4793-ba43-c16ee843b29c", "name": "Getting Started", "description": { "content": "### 1. Get Setup\n* Create an account at Lob.com\n* Obtain your API keys in the Lob dashboard settings\n* You'll use the format, `test_*.` for your Test API key and `live_*.` for your Live API key.\n\n### 2. Explore\n* Try out in Postman:\n
\n Run in Postman\n
\n\n* Launch your terminal and copy/paste a CURL command.\n```bash\ncurl https://api.lob.com/v1/addresses \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n```\n* Download a [Lob SDK](#tag/SDKs-and-Tools) into your favorite IDE (integrated development environment)\n\n### 3. Learn more\nTry our quick start (TypeScript, Python, PHP, Java or Ruby):\n* Send your first Postcards\n\nUse Case guides\n* Mass Deletion Setup\n* NCOA Restrictions\n* Override Cancellation Window\n* Visibility of Address Changes\n* Ingesting Tracking Events with Webhooks\n\n", @@ -7786,7 +7726,7 @@ "event": [] }, { - "id": "45f6cc13-30ce-4d7b-a28a-d024444e45d9", + "id": "a4a1050c-23fb-4f37-b4ce-e27383d5a1c7", "name": "Identity Validation", "description": { "content": "Validates whether a given name is associated with an address.\n\n", @@ -7794,7 +7734,7 @@ }, "item": [ { - "id": "dc13050c-4573-438d-a63b-c9f22808d4d5", + "id": "f4eb7586-a6ec-4643-bc26-dcf9d431065b", "name": "Identity Validation", "request": { "name": "Identity Validation", @@ -7867,7 +7807,7 @@ }, "response": [ { - "id": "e2f0ba36-1fb0-45de-a059-ae19919094b0", + "id": "52e204a6-5330-404b-954b-db53e3d50996", "name": "Returns the likelihood a given name is associated with an address.", "originalRequest": { "url": { @@ -7958,7 +7898,7 @@ "_postman_previewlanguage": "json" }, { - "id": "1c1770a7-74d4-4e11-a664-93fc44d925e9", + "id": "9399c65b-6b44-4978-92eb-a3824558e0ab", "name": "Error", "originalRequest": { "url": { @@ -8040,25 +7980,25 @@ "event": [] }, { - "id": "f9769db4-237f-4430-9de8-d684ec492849", - "name": "Intl Autocompletions", + "id": "e3b727fd-a14e-41b6-b100-400f68036971", + "name": "Informed Delivery Campaign", "description": { - "content": "Address autocompletion for non-US addresses. Given partial address information, this endpoint returns up to 10 address suggestions.\n## Autocompletion Test Env\nYour test API key does not autocomplete international addresses and is used to simulate\nbehavior. With your test API key, requests with specific values for `address_prefix`\nreturn predetermined values. When `address_prefix` is set to:\n- `0 suggestions` - Returns no suggestions\n- `[PRIMARY NUMBER] s[uggestion]` - Returns a maximum of ten predefined suggested addresses.\n `[PRIMARY NUMBER]` does not have to be a valid primary number when sending a test request.\n Each additional letter in `suggestion` reduces the number of suggestions by one (e.g.\n `1 su` returns 9 suggested addresses). `[PRIMARY NUMBER]` does not affect the number of\n suggestions returned.\nCountry is a required field.\nCity and state filters work as expected and filter the list of predetermined suggested addresses.\nSee the `test` request & response examples under [Autocomplete Examples](#operation/intl_autocompletions) within the \"Autocomplete\na partial address\" section in Intl Autocompletions.\n\n", + "content": "The Informed Delivery campaigns API allows you to create and view Informed Delivery campaigns.\n\n", "type": "text/plain" }, "item": [ { - "id": "93556dbb-650f-4544-a42b-6a376f5e7308", - "name": "Autocomplete", + "id": "ef869955-6586-4e41-ac47-9b23d5fefffd", + "name": "List", "request": { - "name": "Autocomplete", + "name": "List", "description": { - "content": "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).", + "content": "List Informed Delivery campaigns", "type": "text/plain" }, "url": { "path": [ - "intl_autocompletions" + "informed_delivery_campaigns" ], "host": [ "{{baseUrl}}" @@ -8068,14 +8008,79 @@ }, "header": [ { - "disabled": false, - "description": "* `native` - Translate response to the native language of the country in the request\n* `match` - match the response to the language in the request\n\nDefault response is in English.\n", - "key": "x-lang-output", - "value": "" + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "auth": null + }, + "response": [ + { + "id": "d2a96dfd-cdef-47d8-8aa6-3f11dce0bf0f", + "name": "A dictionary with a data property that contains an array of up to `limit` Informed Delivery campaigns. Each entry in the array is a separate campaign. The previous and next page of campaigns can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively. If no more campaigns are available beyond the current set of returned results, the `next_url` field will be empty.", + "originalRequest": { + "url": { + "path": [ + "informed_delivery_campaigns" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Basic " + } + ], + "method": "GET", + "body": {} }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"data\": [\n {\n \"id\": \"infd_234g5324g324g23\",\n \"object\": \"informed_delivery_campaign\",\n \"account_id\": \"xxxxxxxxxxxxxxxxxxxx\",\n \"quantity\": 20,\n \"usps_campaign_id\": \"1234567890\",\n \"usps_title\": \"Campaign: 1a1a1a1a-9657-423b-b3c7-2\",\n \"start_date\": \"2024-08-31T00:00:00.000Z\",\n \"end_date\": \"2024-10-15T00:00:00.000Z\",\n \"start_serial\": 3183487,\n \"end_serial\": 3183506,\n \"ride_along_url\": \"https://www.lob.com\",\n \"ride_along_image_s3_link\": \"https://lob-assets.com/informed-delivery/infd_234g5324g324g23_ride_along.jpg\",\n \"representative_image_s3_link\": null,\n \"status\": \"approved\",\n \"date_created\": \"2024-08-30T23:30:02.980Z\",\n \"date_modified\": \"2024-08-30T23:30:05.027Z\",\n \"mode\": \"live\",\n \"lob_campaign_id\": null,\n \"deleted\": false,\n \"campaign_code\": \"1a1a1a1a-9657-423b-b3c7-2+Code\",\n \"brand_name\": \"Lob\",\n \"service_request_number\": null\n },\n {\n \"id\": \"infd_23g23g234g23g42\",\n \"object\": \"informed_delivery_campaign\",\n \"account_id\": \"xxxxxxxxxxxxxxxxxxxx\",\n \"quantity\": 5,\n \"usps_campaign_id\": \"23452345\",\n \"usps_title\": \"Campaign: 133d228e-f9e9-4056-aaea-f\",\n \"start_date\": \"2024-08-31T00:00:00.000Z\",\n \"end_date\": \"2024-10-15T00:00:00.000Z\",\n \"start_serial\": null,\n \"end_serial\": null,\n \"ride_along_url\": \"https://www.lob.com\",\n \"ride_along_image_s3_link\": \"https://lob-assets.com/informed-delivery/infd_23g23g234g23g42_ride_along.jpg\",\n \"representative_image_s3_link\": null,\n \"status\": \"pending_approval\",\n \"date_created\": \"2024-08-30T23:30:02.980Z\",\n \"date_modified\": \"2024-09-30T23:30:05.027Z\",\n \"mode\": \"live\",\n \"lob_campaign_id\": null,\n \"deleted\": false,\n \"campaign_code\": \"133d228e-f9e9-4056-aaea-f+Code\",\n \"brand_name\": \"Lob\",\n \"service_request_number\": null\n }\n ],\n \"object\": \"list\",\n \"next_url\": null,\n \"previous_url\": null,\n \"count\": 2\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [] + }, + { + "id": "11bf81b8-5bda-4654-befc-8fe56ba22ac6", + "name": "Create", + "request": { + "name": "Create", + "description": { + "content": "Creates a new Informed Delivery campaign", + "type": "text/plain" + }, + "url": { + "path": [ + "informed_delivery_campaigns" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ { "key": "Content-Type", - "value": "application/x-www-form-urlencoded" + "value": "multipart/form-data" }, { "key": "Accept", @@ -8085,55 +8090,43 @@ "method": "POST", "auth": null, "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "key": "address_prefix", - "value": "", - "description": "(Required) Only accepts numbers and street names in an alphanumeric format.\n" - }, - { - "disabled": false, - "key": "country", - "value": "", - "description": "(Required) " - }, + "mode": "formdata", + "formdata": [ { - "disabled": false, - "key": "city", - "value": "", - "description": "An optional city input used to filter suggestions. Case insensitive and does not match partial abbreviations.\n" + "key": "ride_along_image", + "value": "", + "type": "text", + "description": "undefined" }, { - "disabled": false, - "key": "state", - "value": "", - "description": "An optional state input used to filter suggestions. Case insensitive and does not match partial abbreviations.\n" + "key": "representative_image", + "value": "", + "type": "text", + "description": "undefined" }, { - "disabled": false, - "key": "zip_code", + "key": "status", "value": "", - "description": "An optional Zip Code input used to filter suggestions. Matches partial entries.\n" + "type": "text", + "description": "undefined" }, { - "disabled": false, - "key": "geo_ip_sort", - "value": "", - "description": "If `true`, sort suggestions by proximity to the IP set in the `X-Forwarded-For` header.\n" + "key": "quantity", + "value": "-93784549.28247893", + "type": "text", + "description": "undefined" } ] } }, "response": [ { - "id": "d349e5c9-dd87-48fb-8a46-155828072879", - "name": "Returns an international autocompletions object.", + "id": "96a3a69d-835b-47e9-982f-82452650a8cb", + "name": "Creative created successfully", "originalRequest": { "url": { "path": [ - "intl_autocompletions" + "informed_delivery_campaigns" ], "host": [ "{{baseUrl}}" @@ -8149,71 +8142,47 @@ }, "key": "Authorization", "value": "Basic " - }, - { - "disabled": false, - "description": "* `native` - Translate response to the native language of the country in the request\n* `match` - match the response to the language in the request\n\nDefault response is in English.\n", - "key": "x-lang-output", - "value": "" } ], "method": "POST", "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "description": { - "content": "(Required) Only accepts numbers and street names in an alphanumeric format.\n", - "type": "text/plain" - }, - "key": "address_prefix", - "value": "340 Wat" - }, - { - "disabled": false, - "description": { - "content": "An optional city input used to filter suggestions. Case insensitive and does not match partial abbreviations.\n", - "type": "text/plain" - }, - "key": "city", - "value": "Summerside" - }, + "mode": "formdata", + "formdata": [ { - "disabled": false, "description": { - "content": "An optional state input used to filter suggestions. Case insensitive and does not match partial abbreviations.\n", + "content": "undefined", "type": "text/plain" }, - "key": "state", - "value": "Prince Edward Island" + "key": "ride_along_image", + "value": "", + "type": "text" }, { - "disabled": false, "description": { - "content": "An optional Zip Code input used to filter suggestions. Matches partial entries.\n", + "content": "undefined", "type": "text/plain" }, - "key": "zip_code", - "value": "C1N 1C4" + "key": "representative_image", + "value": "", + "type": "text" }, { - "disabled": false, "description": { - "content": "(Required) ", + "content": "undefined", "type": "text/plain" }, - "key": "country", - "value": "CA" + "key": "status", + "value": "", + "type": "text" }, { - "disabled": false, "description": { - "content": "If `true`, sort suggestions by proximity to the IP set in the `X-Forwarded-For` header.\n", + "content": "undefined", "type": "text/plain" }, - "key": "geo_ip_sort", - "value": "false" + "key": "quantity", + "value": "non sit", + "type": "text" } ] } @@ -8221,40 +8190,22 @@ "status": "OK", "code": 200, "header": [ - { - "disabled": false, - "description": "The rate limit for a given endpoint.", - "key": "ratelimit-limit", - "value": "150" - }, - { - "disabled": false, - "description": "The number of requests remaining in the current window.", - "key": "ratelimit-remaining", - "value": "100" - }, - { - "disabled": false, - "description": "The time at which the rate limit window resets in UTC epoch seconds\n", - "key": "ratelimit-reset", - "value": "1528749846" - }, { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"id\": \"intl_auto_a3ac97bcfbb2460ab20c\",\n \"suggestions\": [\n {\n \"primary_number_range\": \"\",\n \"primary_line\": \"340 WATERSTONE PL SE\",\n \"city\": \"AIRDRIE\",\n \"state\": \"AB\",\n \"country\": \"CA\",\n \"zip_code\": \"T4B 2G7\"\n },\n {\n \"primary_number_range\": \"\",\n \"primary_line\": \"340 WATT BLVD SW\",\n \"city\": \"EDMONTON\",\n \"state\": \"AB\",\n \"country\": \"CA\",\n \"zip_code\": \"T6X 1R7\"\n },\n {\n \"primary_number_range\": \"\",\n \"primary_line\": \"340 WATROUS ST\",\n \"city\": \"PRINCE GEORGE\",\n \"state\": \"BC\",\n \"country\": \"CA\",\n \"zip_code\": \"V2M 2B6\"\n },\n {\n \"primary_number_range\": \"\",\n \"primary_line\": \"340 WATERS RD\",\n \"city\": \"QUALICUM BEACH\",\n \"state\": \"BC\",\n \"country\": \"CA\",\n \"zip_code\": \"V9K 2B8\"\n },\n {\n \"primary_number_range\": \"\",\n \"primary_line\": \"SUITE 340, 1510 WATT DR SW\",\n \"city\": \"EDMONTON\",\n \"state\": \"AB\",\n \"country\": \"CA\",\n \"zip_code\": \"T6X 2E6\"\n },\n {\n \"primary_number_range\": \"\",\n \"primary_line\": \"WATERFRONT POINTE WEST SUITE 340, 5212 25 AVE NW\",\n \"city\": \"EDMONTON\",\n \"state\": \"AB\",\n \"country\": \"CA\",\n \"zip_code\": \"T6L 6R7\"\n },\n {\n \"primary_number_range\": \"\",\n \"primary_line\": \"WATERFRONT POINTE EAST SUITE 340, 2520 52 ST NW\",\n \"city\": \"EDMONTON\",\n \"state\": \"AB\",\n \"country\": \"CA\",\n \"zip_code\": \"T6L 6S2\"\n },\n {\n \"primary_number_range\": \"\",\n \"primary_line\": \"WATERSTONE SUITE 340, 6079 MAYNARD WAY NW\",\n \"city\": \"EDMONTON\",\n \"state\": \"AB\",\n \"country\": \"CA\",\n \"zip_code\": \"T6R 0S4\"\n },\n {\n \"primary_number_range\": \"\",\n \"primary_line\": \"WATSON APTS. SUITE 340, 5207 39 ST\",\n \"city\": \"RED DEER\",\n \"state\": \"AB\",\n \"country\": \"CA\",\n \"zip_code\": \"T4N 0Z9\"\n },\n {\n \"primary_number_range\": \"\",\n \"primary_line\": \"WATERS EDGE SUITE 3400..3409, 2600 FERGUSON RD\",\n \"city\": \"SAANICHTON\",\n \"state\": \"BC\",\n \"country\": \"CA\",\n \"zip_code\": \"V8M 2C1\"\n }\n ],\n \"object\": \"intl_autocompletion\"\n}", + "body": "{\n \"id\": \"infd_234g5324g324g23\",\n \"object\": \"informed_delivery_campaign\",\n \"account_id\": \"xxxxxxxxxxxxxxxxxxxx\",\n \"quantity\": 20,\n \"usps_campaign_id\": \"1234567890\",\n \"usps_title\": \"Campaign: 1a1a1a1a-9657-423b-b3c7-2\",\n \"start_date\": \"2024-08-31T00:00:00.000Z\",\n \"end_date\": \"2024-10-15T00:00:00.000Z\",\n \"start_serial\": 3183487,\n \"end_serial\": 3183506,\n \"ride_along_url\": \"https://www.lob.com\",\n \"ride_along_image_s3_link\": \"https://lob-assets.com/informed-delivery/infd_234g5324g324g23_ride_along.jpg\",\n \"representative_image_s3_link\": null,\n \"status\": \"approved\",\n \"date_created\": \"2024-08-30T23:30:02.980Z\",\n \"date_modified\": \"2024-08-30T23:30:05.027Z\",\n \"mode\": \"live\",\n \"lob_campaign_id\": null,\n \"deleted\": false,\n \"campaign_code\": \"1a1a1a1a-9657-423b-b3c7-2+Code\",\n \"brand_name\": \"Lob\",\n \"service_request_number\": null\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "28124699-d1ea-4194-82cf-81620b80a3da", + "id": "99444e30-d633-4e67-9388-6dea966b779a", "name": "Error", "originalRequest": { "url": { "path": [ - "intl_autocompletions" + "informed_delivery_campaigns" ], "host": [ "{{baseUrl}}" @@ -8270,84 +8221,60 @@ }, "key": "Authorization", "value": "Basic " - }, - { - "disabled": false, - "description": "* `native` - Translate response to the native language of the country in the request\n* `match` - match the response to the language in the request\n\nDefault response is in English.\n", - "key": "x-lang-output", - "value": "" } ], "method": "POST", "body": { - "mode": "urlencoded", - "urlencoded": [ + "mode": "formdata", + "formdata": [ { - "disabled": false, "description": { - "content": "(Required) Only accepts numbers and street names in an alphanumeric format.\n", - "type": "text/plain" - }, - "key": "address_prefix", - "value": "340 Wat" - }, - { - "disabled": false, - "description": { - "content": "An optional city input used to filter suggestions. Case insensitive and does not match partial abbreviations.\n", - "type": "text/plain" - }, - "key": "city", - "value": "Summerside" - }, - { - "disabled": false, - "description": { - "content": "An optional state input used to filter suggestions. Case insensitive and does not match partial abbreviations.\n", + "content": "undefined", "type": "text/plain" }, - "key": "state", - "value": "Prince Edward Island" + "key": "ride_along_image", + "value": "", + "type": "text" }, { - "disabled": false, "description": { - "content": "An optional Zip Code input used to filter suggestions. Matches partial entries.\n", + "content": "undefined", "type": "text/plain" }, - "key": "zip_code", - "value": "C1N 1C4" + "key": "representative_image", + "value": "", + "type": "text" }, { - "disabled": false, "description": { - "content": "(Required) ", + "content": "undefined", "type": "text/plain" }, - "key": "country", - "value": "CA" + "key": "status", + "value": "", + "type": "text" }, { - "disabled": false, "description": { - "content": "If `true`, sort suggestions by proximity to the IP set in the `X-Forwarded-For` header.\n", + "content": "undefined", "type": "text/plain" }, - "key": "geo_ip_sort", - "value": "false" + "key": "quantity", + "value": "non sit", + "type": "text" } ] } }, - "status": "Internal Server Error", - "code": 500, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, "header": [ { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"address_prefix is required\",\n \"status_code\": 422\n }\n}", + "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"quantity must be greater than or equal to 2\",\n \"status_code\": 422\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } @@ -8356,77 +8283,67 @@ "protocolProfileBehavior": { "disableBodyPruning": true } - } - ], - "event": [] - }, - { - "id": "dbfa3638-3a10-4350-83f6-bc2f76e9faef", - "name": "Intl Verifications", - "description": { - "content": "Address verification for non-US addresses\n
\n\n\n## Intl Verifications Test Env\n\nWhen verifying international addresses, you'll likely want to test against\na wide array of addresses to ensure you're handling responses correctly.\nWith your test API key, requests that use specific values for `primary_line`\nlet you explore the responses to many types of addresses:\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
DELIVERABILITY OF SAMPLE RESPONSESET primary_line TO
deliverabledeliverable
deliverable_missing_infodeliverable missing info
undeliverableundeliverable
no_matchno match
\n\nSee the `test` request & response examples under [Intl Verification Examples](#operation/intl_verification) within the\n\"Verify an international address section\" in Intl Verifications.\n\nYou can rely on the response from these examples generally matching the response\nyou'd see in the live environment with an address of that type (excluding the `recipient` field).\n\nThe test API key does not perform any verification, automatic correction, or standardization\nfor addresses. If you wish to try these features out, use our live demo\nor the free plan (see our pricing for details).\n\n", - "type": "text/plain" - }, - "item": [ + }, { - "id": "2f5f087d-52ef-413a-a664-5b832d02e2e1", - "name": "Bulk Verify", + "id": "aadf7514-b276-4020-a66e-151f4c3381f0", + "name": "Retrieve", "request": { - "name": "Bulk Verify", + "name": "Retrieve", "description": { - "content": "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.", + "content": "Retrieves the details of an existing Informed Delivery campaign. You need only supply the `usps_campaign_id` returned in the campaign creation request.", "type": "text/plain" }, "url": { "path": [ - "bulk", - "intl_verifications" + "informed_delivery_campaigns", + ":usps_campaign_id" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [] + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "usps_campaign_id", + "description": "(Required) usps_campaign_id of the Informed Delivery campaign" + } + ] }, "header": [ - { - "key": "Content-Type", - "value": "multipart/form-data" - }, { "key": "Accept", "value": "application/json" } ], - "method": "POST", - "auth": null, - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "addresses", - "value": "[{\"country\":{\"value\":\"\"},\"city\":{\"value\":\"\"},\"state\":{\"value\":\"\"},\"postal_code\":{\"value\":\"\"}}]", - "type": "text", - "description": "undefined" - } - ] - } + "method": "GET", + "auth": null }, "response": [ { - "id": "9f676c2f-a8fc-4ff9-aff2-ddfddcd7f6fc", - "name": "Returns an array of international verification objects.", + "id": "164327fe-15e4-406a-943d-7f4d2976a37c", + "name": "Returns a informed delivery campaign object", "originalRequest": { "url": { "path": [ - "bulk", - "intl_verifications" + "informed_delivery_campaigns", + ":usps_campaign_id" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [] + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "usps_campaign_id", + "description": "(Required) usps_campaign_id of the Informed Delivery campaign" + } + ] }, "header": [ { @@ -8438,66 +8355,43 @@ "value": "Basic " } ], - "method": "POST", - "body": { - "mode": "formdata", - "formdata": [ - { - "description": { - "content": "undefined", - "type": "text/plain" - }, - "key": "addresses", - "value": "[{\"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\"}]", - "type": "text" - } - ] - } + "method": "GET", + "body": {} }, "status": "OK", "code": 200, "header": [ - { - "disabled": false, - "description": "The rate limit for a given endpoint.", - "key": "ratelimit-limit", - "value": "150" - }, - { - "disabled": false, - "description": "The number of requests remaining in the current window.", - "key": "ratelimit-remaining", - "value": "100" - }, - { - "disabled": false, - "description": "The time at which the rate limit window resets in UTC epoch seconds\n", - "key": "ratelimit-reset", - "value": "1528749846" - }, { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"addresses\": [\n {\n \"id\": \"intl_ver_c7cb63d68f8d6\",\n \"recipient\": null,\n \"primary_line\": \"370 WATER ST\",\n \"secondary_line\": \"\",\n \"last_line\": \"SUMMERSIDE PE C1N 1C4\",\n \"country\": \"CA\",\n \"coverage\": \"SUBBUILDING\",\n \"deliverability\": \"deliverable\",\n \"status\": \"LV4\",\n \"components\": {\n \"primary_number\": \"370\",\n \"street_name\": \"WATER ST\",\n \"city\": \"SUMMERSIDE\",\n \"state\": \"PE\",\n \"postal_code\": \"C1N 1C4\"\n },\n \"object\": \"intl_verification\"\n }\n ],\n \"errors\": false\n}", + "body": "{\n \"id\": \"infd_234g5324g324g23\",\n \"object\": \"informed_delivery_campaign\",\n \"account_id\": \"xxxxxxxxxxxxxxxxxxxx\",\n \"quantity\": 20,\n \"usps_campaign_id\": \"1234567890\",\n \"usps_title\": \"Campaign: 1a1a1a1a-9657-423b-b3c7-2\",\n \"start_date\": \"2024-08-31T00:00:00.000Z\",\n \"end_date\": \"2024-10-15T00:00:00.000Z\",\n \"start_serial\": 3183487,\n \"end_serial\": 3183506,\n \"ride_along_url\": \"https://www.lob.com\",\n \"ride_along_image_s3_link\": \"https://lob-assets.com/informed-delivery/infd_234g5324g324g23_ride_along.jpg\",\n \"representative_image_s3_link\": null,\n \"status\": \"approved\",\n \"date_created\": \"2024-08-30T23:30:02.980Z\",\n \"date_modified\": \"2024-08-30T23:30:05.027Z\",\n \"mode\": \"live\",\n \"lob_campaign_id\": null,\n \"deleted\": false,\n \"campaign_code\": \"1a1a1a1a-9657-423b-b3c7-2+Code\",\n \"brand_name\": \"Lob\",\n \"service_request_number\": null\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "fa88b918-1211-4406-9c50-47fdf707f3ff", + "id": "b19345da-70d6-4404-898f-07b4b939a292", "name": "Error", "originalRequest": { "url": { "path": [ - "bulk", - "intl_verifications" + "informed_delivery_campaigns", + ":usps_campaign_id" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [] + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "usps_campaign_id", + "description": "(Required) usps_campaign_id of the Informed Delivery campaign" + } + ] }, "header": [ { @@ -8509,132 +8403,111 @@ "value": "Basic " } ], - "method": "POST", - "body": { - "mode": "formdata", - "formdata": [ - { - "description": { - "content": "undefined", - "type": "text/plain" - }, - "key": "addresses", - "value": "[{\"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\"}]", - "type": "text" - } - ] - } + "method": "GET", + "body": {} }, - "status": "Internal Server Error", - "code": 500, + "status": "Not Found", + "code": 404, "header": [ { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"country is required\",\n \"status_code\": 422\n }\n}", + "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"informed delivery campaign not found\",\n \"status_code\": 404\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } ], - "event": [], - "protocolProfileBehavior": { - "disableBodyPruning": true - } + "event": [] }, { - "id": "456b3dc5-1dde-401c-8937-19844efccd81", - "name": "Single Verify", + "id": "ac91590c-2bcb-4b71-89d9-191af82fc5de", + "name": "Update", "request": { - "name": "Single Verify", + "name": "Update", "description": { - "content": "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.", + "content": "Update the details of an existing Informed Delivery campaign.
**NOTE:** you can only update a campaign in the `pending_approval` status.", "type": "text/plain" }, "url": { "path": [ - "intl_verifications" + "informed_delivery_campaigns", + ":usps_campaign_id" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [] + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "usps_campaign_id", + "description": "(Required) usps_campaign_id of the Informed Delivery campaign" + } + ] }, "header": [ - { - "disabled": false, - "description": "* `native` - Translate response to the native language of the country in the request\n* `match` - match the response to the language in the request\n\nDefault response is in English.\n", - "key": "x-lang-output", - "value": "" - }, { "key": "Content-Type", - "value": "application/x-www-form-urlencoded" + "value": "multipart/form-data" }, { "key": "Accept", "value": "application/json" } ], - "method": "POST", + "method": "PATCH", "auth": null, "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "key": "value", - "value": "" - }, - { - "disabled": false, - "key": "value", - "value": "" - }, - { - "disabled": false, - "key": "value", - "value": "" - }, - { - "disabled": false, - "key": "value", - "value": "" - }, + "mode": "formdata", + "formdata": [ { - "disabled": false, - "key": "value", - "value": "" + "key": "ride_along_image", + "value": "", + "type": "text", + "description": "undefined" }, { - "disabled": false, - "key": "state", - "value": "" + "key": "representative_image", + "value": "", + "type": "text", + "description": "undefined" }, { - "disabled": false, - "key": "value", - "value": "" + "key": "status", + "value": "", + "type": "text", + "description": "undefined" } ] } }, "response": [ { - "id": "501ecd52-677f-4c65-9f19-a0c0d75cfba7", - "name": "Returns an international verification object.", + "id": "16b8a018-4885-4f33-b649-d969f0d64500", + "name": "Returns an Informed Delivery campaign object", "originalRequest": { "url": { "path": [ - "intl_verifications" + "informed_delivery_campaigns", + ":usps_campaign_id" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [] + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "usps_campaign_id", + "description": "(Required) usps_campaign_id of the Informed Delivery campaign" + } + ] }, "header": [ { @@ -8644,52 +8517,38 @@ }, "key": "Authorization", "value": "Basic " - }, - { - "disabled": false, - "description": "* `native` - Translate response to the native language of the country in the request\n* `match` - match the response to the language in the request\n\nDefault response is in English.\n", - "key": "x-lang-output", - "value": "" } ], - "method": "POST", + "method": "PATCH", "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "key": "recipient", - "value": "Harry Zhang" - }, - { - "disabled": false, - "key": "primary_line", - "value": "370 Water St" - }, - { - "disabled": false, - "key": "secondary_line", - "value": "" - }, - { - "disabled": false, - "key": "city", - "value": "Summerside" - }, + "mode": "formdata", + "formdata": [ { - "disabled": false, - "key": "state", - "value": "Prince Edward Island" + "description": { + "content": "undefined", + "type": "text/plain" + }, + "key": "ride_along_image", + "value": "", + "type": "text" }, { - "disabled": false, - "key": "postal code", - "value": "C1N 1C4" + "description": { + "content": "undefined", + "type": "text/plain" + }, + "key": "representative_image", + "value": "", + "type": "text" }, { - "disabled": false, - "key": "country", - "value": "CA" + "description": { + "content": "undefined", + "type": "text/plain" + }, + "key": "status", + "value": "", + "type": "text" } ] } @@ -8697,46 +8556,37 @@ "status": "OK", "code": 200, "header": [ - { - "disabled": false, - "description": "The rate limit for a given endpoint.", - "key": "ratelimit-limit", - "value": "150" - }, - { - "disabled": false, - "description": "The number of requests remaining in the current window.", - "key": "ratelimit-remaining", - "value": "100" - }, - { - "disabled": false, - "description": "The time at which the rate limit window resets in UTC epoch seconds\n", - "key": "ratelimit-reset", - "value": "1528749846" - }, { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"id\": \"intl_ver_c7cb63d68f8d6\",\n \"recipient\": null,\n \"primary_line\": \"370 WATER ST\",\n \"secondary_line\": \"\",\n \"last_line\": \"SUMMERSIDE PE C1N 1C4\",\n \"country\": \"CA\",\n \"coverage\": \"SUBBUILDING\",\n \"deliverability\": \"deliverable\",\n \"status\": \"LV4\",\n \"components\": {\n \"primary_number\": \"370\",\n \"street_name\": \"WATER ST\",\n \"city\": \"SUMMERSIDE\",\n \"state\": \"PE\",\n \"postal_code\": \"C1N 1C4\"\n },\n \"object\": \"intl_verification\"\n}", + "body": "{\n \"id\": \"infd_234g5324g324g23\",\n \"object\": \"informed_delivery_campaign\",\n \"account_id\": \"xxxxxxxxxxxxxxxxxxxx\",\n \"quantity\": 20,\n \"usps_campaign_id\": \"1234567890\",\n \"usps_title\": \"Campaign: 1a1a1a1a-9657-423b-b3c7-2\",\n \"start_date\": \"2024-08-31T00:00:00.000Z\",\n \"end_date\": \"2024-10-15T00:00:00.000Z\",\n \"start_serial\": 3183487,\n \"end_serial\": 3183506,\n \"ride_along_url\": \"https://www.lob.com\",\n \"ride_along_image_s3_link\": \"https://lob-assets.com/informed-delivery/infd_234g5324g324g23_ride_along.jpg\",\n \"representative_image_s3_link\": null,\n \"status\": \"approved\",\n \"date_created\": \"2024-08-30T23:30:02.980Z\",\n \"date_modified\": \"2024-08-30T23:30:05.027Z\",\n \"mode\": \"live\",\n \"lob_campaign_id\": null,\n \"deleted\": false,\n \"campaign_code\": \"1a1a1a1a-9657-423b-b3c7-2+Code\",\n \"brand_name\": \"Lob\",\n \"service_request_number\": null\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "6f97c410-d72b-4d96-967b-f790322aad0e", + "id": "00d11e1b-ce7a-4d78-996d-ffe1bf07f279", "name": "Error", "originalRequest": { "url": { "path": [ - "intl_verifications" + "informed_delivery_campaigns", + ":usps_campaign_id" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [] + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "usps_campaign_id", + "description": "(Required) usps_campaign_id of the Informed Delivery campaign" + } + ] }, "header": [ { @@ -8746,65 +8596,130 @@ }, "key": "Authorization", "value": "Basic " - }, - { - "disabled": false, - "description": "* `native` - Translate response to the native language of the country in the request\n* `match` - match the response to the language in the request\n\nDefault response is in English.\n", - "key": "x-lang-output", - "value": "" } ], - "method": "POST", + "method": "PATCH", "body": { - "mode": "urlencoded", - "urlencoded": [ + "mode": "formdata", + "formdata": [ { - "disabled": false, - "key": "recipient", - "value": "Harry Zhang" + "description": { + "content": "undefined", + "type": "text/plain" + }, + "key": "ride_along_image", + "value": "", + "type": "text" }, { - "disabled": false, - "key": "primary_line", - "value": "370 Water St" + "description": { + "content": "undefined", + "type": "text/plain" + }, + "key": "representative_image", + "value": "", + "type": "text" }, { - "disabled": false, - "key": "secondary_line", - "value": "" - }, + "description": { + "content": "undefined", + "type": "text/plain" + }, + "key": "status", + "value": "", + "type": "text" + } + ] + } + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"informed delivery campaign not found\",\n \"status_code\": 404\n }\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "674761a2-41e4-4f36-b2ad-ac58cb8a5e1f", + "name": "Error", + "originalRequest": { + "url": { + "path": [ + "informed_delivery_campaigns", + ":usps_campaign_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ { "disabled": false, - "key": "city", - "value": "Summerside" + "type": "any", + "value": "", + "key": "usps_campaign_id", + "description": "(Required) usps_campaign_id of the Informed Delivery campaign" + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" }, + "key": "Authorization", + "value": "Basic " + } + ], + "method": "PATCH", + "body": { + "mode": "formdata", + "formdata": [ { - "disabled": false, - "key": "state", - "value": "Prince Edward Island" + "description": { + "content": "undefined", + "type": "text/plain" + }, + "key": "ride_along_image", + "value": "", + "type": "text" }, { - "disabled": false, - "key": "postal code", - "value": "C1N 1C4" + "description": { + "content": "undefined", + "type": "text/plain" + }, + "key": "representative_image", + "value": "", + "type": "text" }, { - "disabled": false, - "key": "country", - "value": "CA" + "description": { + "content": "undefined", + "type": "text/plain" + }, + "key": "status", + "value": "", + "type": "text" } ] } }, - "status": "Internal Server Error", - "code": 500, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, "header": [ { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"country is required\",\n \"status_code\": 422\n }\n}", + "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"quantity must be greater than or equal to 2\",\n \"status_code\": 422\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } @@ -8818,83 +8733,106 @@ "event": [] }, { - "id": "58bc7da6-e995-45d0-abd0-6c9f347951c2", - "name": "Introduction", - "description": { - "content": "Lob’s Print & Mail and Address Verification APIs help companies transform outdated,\nmanual print-and-mail processes; save 1,000s of hours in processing time by sending mail much more\nquickly; and increase ROI on offline communications.\n\nAutomate direct mail by triggering on-demand postcards, letters, and checks directly from your\nCRM or customer data systems.\n\nAddress Verification corrects, standardizes, and cleanses address data for assured delivery with\ninstant verification across 240+ countries and territories.\n\nLob's print delivery network eliminates the hassle of vendor management with automated\nproduction and postage across a global network of vetted commercial printers.\n\nTracking & Analytics gives you complete visibility of production and delivery for each piece of\nmail you send to meet compliance requirements and measure campaign performance.\n", - "type": "text/plain" - }, - "item": [], - "event": [] - }, - { - "id": "0e1b5eba-33d5-4a72-9b2a-145675724af3", - "name": "Letters", + "id": "87dd206d-911f-41c7-8c3b-50a1772541be", + "name": "Intl Autocompletions", "description": { - "content": "The letters endpoint allows you to easily print and mail letters. The API provides endpoints for\ncreating letters, retrieving individual letters, canceling letters, and retrieving a list of letters.\n\n", + "content": "Address autocompletion for non-US addresses. Given partial address information, this endpoint returns up to 10 address suggestions.\n## Autocompletion Test Env\nYour test API key does not autocomplete international addresses and is used to simulate\nbehavior. With your test API key, requests with specific values for `address_prefix`\nreturn predetermined values. When `address_prefix` is set to:\n- `0 suggestions` - Returns no suggestions\n- `[PRIMARY NUMBER] s[uggestion]` - Returns a maximum of ten predefined suggested addresses.\n `[PRIMARY NUMBER]` does not have to be a valid primary number when sending a test request.\n Each additional letter in `suggestion` reduces the number of suggestions by one (e.g.\n `1 su` returns 9 suggested addresses). `[PRIMARY NUMBER]` does not affect the number of\n suggestions returned.\nCountry is a required field.\nCity and state filters work as expected and filter the list of predetermined suggested addresses.\nSee the `test` request & response examples under [Autocomplete Examples](#operation/intl_autocompletions) within the \"Autocomplete\na partial address\" section in Intl Autocompletions.\n\n", "type": "text/plain" }, "item": [ { - "id": "e51ef422-183c-43a6-a0d7-5fa1fb627be0", - "name": "Retrieve", + "id": "61e1ff05-5d9e-45b7-9d98-369ee8b3834b", + "name": "Autocomplete", "request": { - "name": "Retrieve", + "name": "Autocomplete", "description": { - "content": "Retrieves the details of an existing letter. You need only supply the unique letter identifier that was returned upon letter creation.", + "content": "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).", "type": "text/plain" }, "url": { "path": [ - "letters", - ":ltr_id" + "intl_autocompletions" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "type": "any", - "value": "", - "key": "ltr_id", - "description": "(Required) id of the letter" - } - ] + "variable": [] }, "header": [ + { + "disabled": false, + "description": "* `native` - Translate response to the native language of the country in the request\n* `match` - match the response to the language in the request\n\nDefault response is in English.\n", + "key": "x-lang-output", + "value": "" + }, + { + "key": "Content-Type", + "value": "application/x-www-form-urlencoded" + }, { "key": "Accept", "value": "application/json" } ], - "method": "GET", - "auth": null - }, - "response": [ - { - "id": "028da0e7-6d2d-4241-b240-dca0354a4a24", - "name": "Returns a letter object", - "originalRequest": { - "url": { - "path": [ - "letters", - ":ltr_id" - ], - "host": [ - "{{baseUrl}}" + "method": "POST", + "auth": null, + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "key": "address_prefix", + "value": "", + "description": "(Required) Only accepts numbers and street names in an alphanumeric format.\n" + }, + { + "disabled": false, + "key": "country", + "value": "", + "description": "(Required) " + }, + { + "disabled": false, + "key": "city", + "value": "", + "description": "An optional city input used to filter suggestions. Case insensitive and does not match partial abbreviations.\n" + }, + { + "disabled": false, + "key": "state", + "value": "", + "description": "An optional state input used to filter suggestions. Case insensitive and does not match partial abbreviations.\n" + }, + { + "disabled": false, + "key": "zip_code", + "value": "", + "description": "An optional Zip Code input used to filter suggestions. Matches partial entries.\n" + }, + { + "disabled": false, + "key": "geo_ip_sort", + "value": "", + "description": "If `true`, sort suggestions by proximity to the IP set in the `X-Forwarded-For` header.\n" + } + ] + } + }, + "response": [ + { + "id": "afed6d9a-d05a-4375-8a4e-cc9b8652b29e", + "name": "Returns an international autocompletions object.", + "originalRequest": { + "url": { + "path": [ + "intl_autocompletions" + ], + "host": [ + "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "type": "any", - "value": "", - "key": "ltr_id", - "description": "(Required) id of the letter" - } - ] + "variable": [] }, "header": [ { @@ -8904,45 +8842,118 @@ }, "key": "Authorization", "value": "Basic " + }, + { + "disabled": false, + "description": "* `native` - Translate response to the native language of the country in the request\n* `match` - match the response to the language in the request\n\nDefault response is in English.\n", + "key": "x-lang-output", + "value": "" } ], - "method": "GET", - "body": {} + "method": "POST", + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "description": { + "content": "(Required) Only accepts numbers and street names in an alphanumeric format.\n", + "type": "text/plain" + }, + "key": "address_prefix", + "value": "340 Wat" + }, + { + "disabled": false, + "description": { + "content": "An optional city input used to filter suggestions. Case insensitive and does not match partial abbreviations.\n", + "type": "text/plain" + }, + "key": "city", + "value": "Summerside" + }, + { + "disabled": false, + "description": { + "content": "An optional state input used to filter suggestions. Case insensitive and does not match partial abbreviations.\n", + "type": "text/plain" + }, + "key": "state", + "value": "Prince Edward Island" + }, + { + "disabled": false, + "description": { + "content": "An optional Zip Code input used to filter suggestions. Matches partial entries.\n", + "type": "text/plain" + }, + "key": "zip_code", + "value": "C1N 1C4" + }, + { + "disabled": false, + "description": { + "content": "(Required) ", + "type": "text/plain" + }, + "key": "country", + "value": "CA" + }, + { + "disabled": false, + "description": { + "content": "If `true`, sort suggestions by proximity to the IP set in the `X-Forwarded-For` header.\n", + "type": "text/plain" + }, + "key": "geo_ip_sort", + "value": "false" + } + ] + } }, "status": "OK", "code": 200, "header": [ + { + "disabled": false, + "description": "The rate limit for a given endpoint.", + "key": "ratelimit-limit", + "value": "150" + }, + { + "disabled": false, + "description": "The number of requests remaining in the current window.", + "key": "ratelimit-remaining", + "value": "100" + }, + { + "disabled": false, + "description": "The time at which the rate limit window resets in UTC epoch seconds\n", + "key": "ratelimit-reset", + "value": "1528749846" + }, { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"id\": \"ltr_4868c3b754655f90\",\n \"description\": \"Demo Letter\",\n \"metadata\": {},\n \"to\": {\n \"id\": \"adr_d3489cd64c791ab5\",\n \"description\": null,\n \"name\": \"HARRY ZHANG\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2017-09-05T15:54:53.264Z\",\n \"date_modified\": \"2017-09-05T15:54:53.264Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"from\": {\n \"id\": \"adr_b8fb5acf3a2b55db\",\n \"description\": null,\n \"name\": \"LEORE AVIDAR\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2017-09-05T15:54:53.264Z\",\n \"date_modified\": \"2017-09-05T15:54:53.264Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"color\": true,\n \"double_sided\": true,\n \"address_placement\": \"top_first_page\",\n \"return_envelope\": false,\n \"perforated_page\": null,\n \"custom_envelope\": null,\n \"extra_service\": null,\n \"mail_type\": \"usps_first_class\",\n \"url\": \"https://lob-assets.com/letters/ltr_4868c3b754655f90.pdf?expires=1540372221&signature=8r94fse8uam7wGWmW5baxXulU88X2CA\",\n \"carrier\": \"USPS\",\n \"tracking_number\": null,\n \"tracking_events\": [],\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_small_1.png?expires=1540372221&signature=a5fRBJ22ZA78Vgpg34M9UfmHWTS3eha\",\n \"medium\": \"https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_medium_1.png?expires=1540372221&signature=bAzL8sv935PY09FWSkpDpWKkyvGSWYF\",\n \"large\": \"https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_large_1.png?expires=1540372221&signature=gsKvxXgrm4v4iZD3bOibK7jApNkEMdW\"\n }\n ],\n \"merge_variables\": {\n \"name\": \"Harry\"\n },\n \"expected_delivery_date\": \"2017-09-12\",\n \"date_created\": \"2017-09-05T15:54:53.346Z\",\n \"date_modified\": \"2017-09-05T15:54:53.346Z\",\n \"send_date\": \"2017-09-05T15:54:53.346Z\",\n \"cards\": [\n {\n \"id\": \"card_c51ae96f5cebf3e\",\n \"account_id\": \"fa9ea650fc7b31a89f92\",\n \"description\": null,\n \"url\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e.pdf?version=v1&expires=1636910992&signature=mnsDH2DAxdkN9VibdlLMxJC86sME5WYDqkNtmvGwdNsAaUWfbnv0rJhJ1mR8Ol4uxQq61j5wYZ0r3s-lBkQfDA\",\n \"size\": \"2.125x3.375\",\n \"auto_reorder\": false,\n \"reorder_quantity\": null,\n \"raw_url\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw\",\n \"front_original_url\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw\",\n \"back_original_url\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw\",\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_small_1.png?version=v1&expires=1636910992&signature=mrv8JDvpZK4I8WUGH0tPdtK-My5oes0Ltj_gL7BDw96SpCTTeZFHkz81SzclyFP9dQRtlsvAsjcuGcTBvCvOCg\",\n \"medium\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_medium_1.png?version=v1&expires=1636910992&signature=VgL_2Ckm_kxKiWGgWtdNoy9HHOn8dGYSVOn7UqyCbwdbVlUtx28TRN4Bo8Iru3n0keKp9He0YhKT1ILotznMDA\",\n \"large\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_large_1.png?version=v1&expires=1636910992&signature=FKSzymA13j-CQ0uk20cGHZTzT3vimzNBYrgp-xifLFg4mMdo1BZALR5O0aF_jVhsX614hKP35ONdYl47TQxXAw\"\n },\n {\n \"small\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_small_2.png?version=v1&expires=1636910992&signature=IWsmPa_ULlv2yyqjX564d_YfHHY_M7i9YxDnw-WXDr2jtOFcArmRZQbnHeE9g_rYxnddJbgosuv8-c2utiu7Cg\",\n \"medium\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_medium_2.png?version=v1&expires=1636910992&signature=zxK7VKGiTvz5Ywrkaydd0v3GcYf58R7A08J4tNfI7-aiNODDcTF3l0MqY13n9Pyc8RXSdD0XVBY-OpbA1VM-Ag\",\n \"large\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_large_2.png?version=v1&expires=1636910992&signature=r0OFUhh315ZwN0raMZdIwJd2oCIEYsz0BABaMxIuO1PKTD0ckGWrhcGdzk2dlWQ6vSvp0CUQ5k1RXGqkIIqkDw\"\n }\n ],\n \"available_quantity\": 10000,\n \"pending_quantity\": 0,\n \"countries\": null,\n \"status\": \"rendered\",\n \"mode\": \"test\",\n \"orientation\": \"horizontal\",\n \"threshold_amount\": 0,\n \"date_created\": \"2017-08-05T15:54:53.346Z\",\n \"date_modified\": \"2017-08-05T15:54:53.346Z\",\n \"object\": \"card\"\n }\n ],\n \"use_type\": \"marketing\",\n \"fsc\": false,\n \"object\": \"letter\"\n}", + "body": "{\n \"id\": \"intl_auto_a3ac97bcfbb2460ab20c\",\n \"suggestions\": [\n {\n \"primary_number_range\": \"\",\n \"primary_line\": \"340 WATERSTONE PL SE\",\n \"city\": \"AIRDRIE\",\n \"state\": \"AB\",\n \"country\": \"CA\",\n \"zip_code\": \"T4B 2G7\"\n },\n {\n \"primary_number_range\": \"\",\n \"primary_line\": \"340 WATT BLVD SW\",\n \"city\": \"EDMONTON\",\n \"state\": \"AB\",\n \"country\": \"CA\",\n \"zip_code\": \"T6X 1R7\"\n },\n {\n \"primary_number_range\": \"\",\n \"primary_line\": \"340 WATROUS ST\",\n \"city\": \"PRINCE GEORGE\",\n \"state\": \"BC\",\n \"country\": \"CA\",\n \"zip_code\": \"V2M 2B6\"\n },\n {\n \"primary_number_range\": \"\",\n \"primary_line\": \"340 WATERS RD\",\n \"city\": \"QUALICUM BEACH\",\n \"state\": \"BC\",\n \"country\": \"CA\",\n \"zip_code\": \"V9K 2B8\"\n },\n {\n \"primary_number_range\": \"\",\n \"primary_line\": \"SUITE 340, 1510 WATT DR SW\",\n \"city\": \"EDMONTON\",\n \"state\": \"AB\",\n \"country\": \"CA\",\n \"zip_code\": \"T6X 2E6\"\n },\n {\n \"primary_number_range\": \"\",\n \"primary_line\": \"WATERFRONT POINTE WEST SUITE 340, 5212 25 AVE NW\",\n \"city\": \"EDMONTON\",\n \"state\": \"AB\",\n \"country\": \"CA\",\n \"zip_code\": \"T6L 6R7\"\n },\n {\n \"primary_number_range\": \"\",\n \"primary_line\": \"WATERFRONT POINTE EAST SUITE 340, 2520 52 ST NW\",\n \"city\": \"EDMONTON\",\n \"state\": \"AB\",\n \"country\": \"CA\",\n \"zip_code\": \"T6L 6S2\"\n },\n {\n \"primary_number_range\": \"\",\n \"primary_line\": \"WATERSTONE SUITE 340, 6079 MAYNARD WAY NW\",\n \"city\": \"EDMONTON\",\n \"state\": \"AB\",\n \"country\": \"CA\",\n \"zip_code\": \"T6R 0S4\"\n },\n {\n \"primary_number_range\": \"\",\n \"primary_line\": \"WATSON APTS. SUITE 340, 5207 39 ST\",\n \"city\": \"RED DEER\",\n \"state\": \"AB\",\n \"country\": \"CA\",\n \"zip_code\": \"T4N 0Z9\"\n },\n {\n \"primary_number_range\": \"\",\n \"primary_line\": \"WATERS EDGE SUITE 3400..3409, 2600 FERGUSON RD\",\n \"city\": \"SAANICHTON\",\n \"state\": \"BC\",\n \"country\": \"CA\",\n \"zip_code\": \"V8M 2C1\"\n }\n ],\n \"object\": \"intl_autocompletion\"\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "87a8551e-0a13-4a37-b76a-1b5c3b0583a1", + "id": "ccd942bc-dc54-41cf-9367-946608f503f6", "name": "Error", "originalRequest": { "url": { "path": [ - "letters", - ":ltr_id" + "intl_autocompletions" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "type": "any", - "value": "", - "key": "ltr_id", - "description": "(Required) id of the letter" - } - ] + "variable": [] }, "header": [ { @@ -8952,10 +8963,74 @@ }, "key": "Authorization", "value": "Basic " + }, + { + "disabled": false, + "description": "* `native` - Translate response to the native language of the country in the request\n* `match` - match the response to the language in the request\n\nDefault response is in English.\n", + "key": "x-lang-output", + "value": "" } ], - "method": "GET", - "body": {} + "method": "POST", + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "description": { + "content": "(Required) Only accepts numbers and street names in an alphanumeric format.\n", + "type": "text/plain" + }, + "key": "address_prefix", + "value": "340 Wat" + }, + { + "disabled": false, + "description": { + "content": "An optional city input used to filter suggestions. Case insensitive and does not match partial abbreviations.\n", + "type": "text/plain" + }, + "key": "city", + "value": "Summerside" + }, + { + "disabled": false, + "description": { + "content": "An optional state input used to filter suggestions. Case insensitive and does not match partial abbreviations.\n", + "type": "text/plain" + }, + "key": "state", + "value": "Prince Edward Island" + }, + { + "disabled": false, + "description": { + "content": "An optional Zip Code input used to filter suggestions. Matches partial entries.\n", + "type": "text/plain" + }, + "key": "zip_code", + "value": "C1N 1C4" + }, + { + "disabled": false, + "description": { + "content": "(Required) ", + "type": "text/plain" + }, + "key": "country", + "value": "CA" + }, + { + "disabled": false, + "description": { + "content": "If `true`, sort suggestions by proximity to the IP set in the `X-Forwarded-For` header.\n", + "type": "text/plain" + }, + "key": "geo_ip_sort", + "value": "false" + } + ] + } }, "status": "Internal Server Error", "code": 500, @@ -8965,73 +9040,86 @@ "value": "application/json" } ], - "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"to address not found\",\n \"status_code\": 404\n }\n}", + "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"address_prefix is required\",\n \"status_code\": 422\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } ], - "event": [] - }, + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + } + ], + "event": [] + }, + { + "id": "8c263a82-7f26-4aec-84a8-ba6fde546893", + "name": "Intl Verifications", + "description": { + "content": "Address verification for non-US addresses\n
\n\n\n## Intl Verifications Test Env\n\nWhen verifying international addresses, you'll likely want to test against\na wide array of addresses to ensure you're handling responses correctly.\nWith your test API key, requests that use specific values for `primary_line`\nlet you explore the responses to many types of addresses:\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
DELIVERABILITY OF SAMPLE RESPONSESET primary_line TO
deliverabledeliverable
deliverable_missing_infodeliverable missing info
undeliverableundeliverable
no_matchno match
\n\nSee the `test` request & response examples under [Intl Verification Examples](#operation/intl_verification) within the\n\"Verify an international address section\" in Intl Verifications.\n\nYou can rely on the response from these examples generally matching the response\nyou'd see in the live environment with an address of that type (excluding the `recipient` field).\n\nThe test API key does not perform any verification, automatic correction, or standardization\nfor addresses. If you wish to try these features out, use our live demo\nor the free plan (see our pricing for details).\n\n", + "type": "text/plain" + }, + "item": [ { - "id": "5d7c262a-e6fb-4e8a-becc-a77106cd43fc", - "name": "Cancel", + "id": "162a04a5-c7b9-4361-b7e3-577389e81f0a", + "name": "Bulk Verify", "request": { - "name": "Cancel", + "name": "Bulk Verify", "description": { - "content": "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.", + "content": "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.", "type": "text/plain" }, "url": { "path": [ - "letters", - ":ltr_id" + "bulk", + "intl_verifications" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "type": "any", - "value": "", - "key": "ltr_id", - "description": "(Required) id of the letter" - } - ] + "variable": [] }, "header": [ + { + "key": "Content-Type", + "value": "multipart/form-data" + }, { "key": "Accept", "value": "application/json" } ], - "method": "DELETE", - "auth": null + "method": "POST", + "auth": null, + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "addresses", + "value": "[{\"country\":{\"value\":\"\"},\"city\":{\"value\":\"\"},\"state\":{\"value\":\"\"},\"postal_code\":{\"value\":\"\"}}]", + "type": "text", + "description": "undefined" + } + ] + } }, "response": [ { - "id": "88dcc6a6-d13a-4738-a049-f9a6bfe9ed38", - "name": "Deleted", + "id": "7ce89d3c-4ff7-4bd0-bb9b-0cad2fcce36d", + "name": "Returns an array of international verification objects.", "originalRequest": { "url": { "path": [ - "letters", - ":ltr_id" + "bulk", + "intl_verifications" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "type": "any", - "value": "", - "key": "ltr_id", - "description": "(Required) id of the letter" - } - ] + "variable": [] }, "header": [ { @@ -9043,43 +9131,66 @@ "value": "Basic " } ], - "method": "DELETE", - "body": {} + "method": "POST", + "body": { + "mode": "formdata", + "formdata": [ + { + "description": { + "content": "undefined", + "type": "text/plain" + }, + "key": "addresses", + "value": "[{\"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\"}]", + "type": "text" + } + ] + } }, "status": "OK", "code": 200, "header": [ + { + "disabled": false, + "description": "The rate limit for a given endpoint.", + "key": "ratelimit-limit", + "value": "150" + }, + { + "disabled": false, + "description": "The number of requests remaining in the current window.", + "key": "ratelimit-remaining", + "value": "100" + }, + { + "disabled": false, + "description": "The time at which the rate limit window resets in UTC epoch seconds\n", + "key": "ratelimit-reset", + "value": "1528749846" + }, { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"id\": \"ltr_123456789\",\n \"deleted\": true\n}", + "body": "{\n \"addresses\": [\n {\n \"id\": \"intl_ver_c7cb63d68f8d6\",\n \"recipient\": null,\n \"primary_line\": \"370 WATER ST\",\n \"secondary_line\": \"\",\n \"last_line\": \"SUMMERSIDE PE C1N 1C4\",\n \"country\": \"CA\",\n \"coverage\": \"SUBBUILDING\",\n \"deliverability\": \"deliverable\",\n \"status\": \"LV4\",\n \"components\": {\n \"primary_number\": \"370\",\n \"street_name\": \"WATER ST\",\n \"city\": \"SUMMERSIDE\",\n \"state\": \"PE\",\n \"postal_code\": \"C1N 1C4\"\n },\n \"object\": \"intl_verification\"\n }\n ],\n \"errors\": false\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "95cafdc6-2c26-4229-aeba-1167b918ab7b", + "id": "28dff2ff-70fe-4b76-908a-a3e977ee15d2", "name": "Error", "originalRequest": { "url": { "path": [ - "letters", - ":ltr_id" + "bulk", + "intl_verifications" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "type": "any", - "value": "", - "key": "ltr_id", - "description": "(Required) id of the letter" - } - ] + "variable": [] }, "header": [ { @@ -9091,8 +9202,21 @@ "value": "Basic " } ], - "method": "DELETE", - "body": {} + "method": "POST", + "body": { + "mode": "formdata", + "formdata": [ + { + "description": { + "content": "undefined", + "type": "text/plain" + }, + "key": "addresses", + "value": "[{\"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\"}]", + "type": "text" + } + ] + } }, "status": "Internal Server Error", "code": 500, @@ -9102,312 +9226,268 @@ "value": "application/json" } ], - "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"to address not found\",\n \"status_code\": 404\n }\n}", + "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"country is required\",\n \"status_code\": 422\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } ], - "event": [] + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } }, { - "id": "8fa2c26e-cc6b-4d12-869a-93a742cde295", - "name": "List", + "id": "d29e7487-418f-4362-bd65-6bb682d16919", + "name": "Single Verify", "request": { - "name": "List", + "name": "Single Verify", "description": { - "content": "Returns a list of your letters. The letters are returned sorted by creation date, with the most recently created letters appearing first.", + "content": "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.", "type": "text/plain" }, "url": { "path": [ - "letters" + "intl_verifications" ], "host": [ "{{baseUrl}}" ], - "query": [ - { - "disabled": false, - "key": "limit", - "value": "10", - "description": "How many results to return." - }, - { - "disabled": false, - "key": "before", - "value": "", - "description": "`before` and `after` are both optional but only one of them can be in the query at a time.\n" - }, - { - "disabled": false, - "key": "after", - "value": "", - "description": "`before` and `after` are both optional but only one of them can be in the query at a time.\n" - }, - { - "disabled": false, - "key": "include", - "value": "", - "description": "Request that the response include the total count by specifying `include=[\"total_count\"]`.\n" - }, - { - "disabled": false, - "key": "include", - "value": "", - "description": "Request that the response include the total count by specifying `include=[\"total_count\"]`.\n" - }, - { - "disabled": false, - "key": "date_created[elit_5_]", - "value": "", - "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 ≤." - }, - { - "disabled": false, - "key": "date_created[Ut3b0]", - "value": "", - "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 ≤." - }, - { - "disabled": false, - "key": "date_created[eu_f5]", - "value": "", - "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 ≤." - }, + "query": [], + "variable": [] + }, + "header": [ + { + "disabled": false, + "description": "* `native` - Translate response to the native language of the country in the request\n* `match` - match the response to the language in the request\n\nDefault response is in English.\n", + "key": "x-lang-output", + "value": "" + }, + { + "key": "Content-Type", + "value": "application/x-www-form-urlencoded" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "POST", + "auth": null, + "body": { + "mode": "urlencoded", + "urlencoded": [ { "disabled": false, - "key": "campaign_id", - "value": "", - "description": "Filters resources created by the provided campaign id, prefixed with `cmp_`." + "key": "value", + "value": "" }, { "disabled": false, - "key": "status", - "value": "", - "description": "A string describing the render status:\n* `processed` - the rendering process is currently underway.\n* `rendered` - the rendering process has completed successfully.\n* `failed` - the rendering process has failed.\n" + "key": "value", + "value": "" }, { "disabled": false, - "key": "color", - "value": "", - "description": "Set to `true` to return only color letters. Set to `false` to return only black & white letters." + "key": "value", + "value": "" }, { "disabled": false, - "key": "scheduled", - "value": "", - "description": "* `true` - only return orders (past or future) where `send_date` is\ngreater than `date_created`\n* `false` - only return orders where `send_date` is equal to `date_created`\n" + "key": "value", + "value": "" }, { "disabled": false, - "key": "mail_type", - "value": "usps_first_class", - "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.\n" + "key": "value", + "value": "" }, { "disabled": false, - "key": "date_created", - "value": "", - "description": "Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both.\n" + "key": "state", + "value": "" }, { "disabled": false, - "key": "send_date", - "value": "", - "description": "Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both.\n" + "key": "value", + "value": "" } - ], - "variable": [] - }, - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "method": "GET", - "auth": null + ] + } }, "response": [ { - "id": "6fcaf882-f5a1-4998-9de6-0ba7c9129942", - "name": "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.", + "id": "6571df29-1974-4935-8887-f44e9329d15b", + "name": "Returns an international verification object.", "originalRequest": { "url": { "path": [ - "letters" + "intl_verifications" ], "host": [ "{{baseUrl}}" ], - "query": [ - { - "key": "limit", - "value": "10" - }, - { - "key": "before", - "value": "" - }, - { - "key": "after", - "value": "" - }, - { - "key": "include", - "value": "" - }, - { - "key": "include", - "value": "" - }, - { - "key": "date_created[do_7c]", - "value": "" - }, - { - "key": "date_created[velit_c]", - "value": "" + "query": [], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" }, + "key": "Authorization", + "value": "Basic " + }, + { + "disabled": false, + "description": "* `native` - Translate response to the native language of the country in the request\n* `match` - match the response to the language in the request\n\nDefault response is in English.\n", + "key": "x-lang-output", + "value": "" + } + ], + "method": "POST", + "body": { + "mode": "urlencoded", + "urlencoded": [ { - "key": "campaign_id", - "value": "" + "disabled": false, + "key": "recipient", + "value": "Harry Zhang" }, { - "key": "status", - "value": "" + "disabled": false, + "key": "primary_line", + "value": "370 Water St" }, { - "key": "color", - "value": "" + "disabled": false, + "key": "secondary_line", + "value": "" }, { - "key": "scheduled", - "value": "" + "disabled": false, + "key": "city", + "value": "Summerside" }, { - "key": "mail_type", - "value": "usps_first_class" + "disabled": false, + "key": "state", + "value": "Prince Edward Island" }, { - "key": "date_created", - "value": "" + "disabled": false, + "key": "postal code", + "value": "C1N 1C4" }, { - "key": "send_date", - "value": "" + "disabled": false, + "key": "country", + "value": "CA" } - ], - "variable": [] - }, - "header": [ - { - "description": { - "content": "Added as a part of security scheme: basic", - "type": "text/plain" - }, - "key": "Authorization", - "value": "Basic " - } - ], - "method": "GET", - "body": {} + ] + } }, "status": "OK", "code": 200, "header": [ + { + "disabled": false, + "description": "The rate limit for a given endpoint.", + "key": "ratelimit-limit", + "value": "150" + }, + { + "disabled": false, + "description": "The number of requests remaining in the current window.", + "key": "ratelimit-remaining", + "value": "100" + }, + { + "disabled": false, + "description": "The time at which the rate limit window resets in UTC epoch seconds\n", + "key": "ratelimit-reset", + "value": "1528749846" + }, { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"data\": [\n {\n \"id\": \"ltr_5ba44b462c79f07c\",\n \"description\": \"Demo Letter\",\n \"metadata\": {},\n \"to\": {\n \"id\": \"adr_asdi2y3riuasasoi\",\n \"description\": \"Harry - Office\",\n \"name\": \"Harry Zhang\",\n \"company\": \"Lob\",\n \"phone\": \"5555555555\",\n \"email\": \"harry@lob.com\",\n \"metadata\": {},\n \"address_line1\": \"370 WATER ST\",\n \"address_line2\": \"\",\n \"address_city\": \"SUMMERSIDE\",\n \"address_state\": \"PRINCE EDWARD ISLAND\",\n \"address_zip\": \"C1N 1C4\",\n \"address_country\": \"CANADA\",\n \"recipient_moved\": false,\n \"date_created\": \"2019-09-20T00:14:00.361Z\",\n \"date_modified\": \"2019-09-20T00:14:00.361Z\",\n \"object\": \"address\"\n },\n \"from\": {\n \"id\": \"adr_210a8d4b0b76d77b\",\n \"description\": null,\n \"name\": \"LEORE AVIDAR\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2018-12-08T03:01:07.651Z\",\n \"date_modified\": \"2018-12-08T03:01:07.651Z\",\n \"object\": \"address\"\n },\n \"color\": true,\n \"double_sided\": false,\n \"address_placement\": \"top_first_page\",\n \"return_envelope\": false,\n \"perforated_page\": null,\n \"extra_service\": \"certified\",\n \"custom_envelope\": null,\n \"template_id\": \"tmpl_a\",\n \"template_version_id\": \"vrsn_a\",\n \"mail_type\": \"usps_first_class\",\n \"url\": \"https://lob-assets.com/letters/ltr_5ba44b462c79f07c.pdf?version=v1&expires=1568239830&signature=Ob-DUPLJLM4scWQeCDNadPJ4j33MZw16pykOxwv2us-bA7utTYi6oZ8WrEtBYDBBo09XkapR3gdJf0NEr90xAA\",\n \"merge_variables\": null,\n \"carrier\": \"USPS\",\n \"tracking_number\": \"92071902358909000011275538\",\n \"tracking_events\": [\n {\n \"id\": \"evnt_9e84094c9368cfb\",\n \"type\": \"certified\",\n \"name\": \"Delivered\",\n \"details\": {\n \"event\": \"delivered\",\n \"description\": \"Package has been delivered.\",\n \"notes\": \"Delivered, Front Desk/Reception/Mail Room\",\n \"action_required\": false\n },\n \"location\": \"33408\",\n \"time\": \"2019-10-08T19:41:00Z\",\n \"date_created\": \"2019-10-08T19:41:00Z\",\n \"date_modified\": \"2019-10-08T19:41:00Z\",\n \"object\": \"tracking_event\"\n }\n ],\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/letters/ltr_5ba44b462c79f07c_thumb_small_1.png?version=v1&expires=1568239830&signature=xZUmE8rq8wSECHPEb9c37cUDZBzGUO3XK5LsIPZhI6dOXgm6zJEn8_7tKuZ3JWBmvNJNXdTl_ufkNu4avjQUDw\",\n \"medium\": \"https://lob-assets.com/letters/ltr_5ba44b462c79f07c_thumb_medium_1.png?version=v1&expires=1568239830&signature=H7354Qpcm9S4aXbrMsBe6QJ6lSNi9IWPgMJtLWLi4Kyx9tHF8Mp9YEc_IL9x89Jfw4-yRzKDXA410X4W0PssBQ\",\n \"large\": \"https://lob-assets.com/letters/ltr_5ba44b462c79f07c_thumb_large_1.png?version=v1&expires=1568239830&signature=54LUIDKZyItA9pnC87d1pJVAuw8bhKLCsMpNWkB3LgdVWxPxxb_c1IyIWAbSR-dyOYEOlDBCc40J4Kns-O_mAg\"\n }\n ],\n \"expected_delivery_date\": \"2019-08-16\",\n \"date_created\": \"2019-08-08T17:09:14.514Z\",\n \"date_modified\": \"2019-08-08T17:09:16.850Z\",\n \"send_date\": \"2019-08-08\",\n \"use_type\": \"marketing\",\n \"fsc\": false,\n \"object\": \"letter\"\n },\n {\n \"id\": \"ltr_da8267c6a6545cd6\",\n \"description\": \"Demo Letter\",\n \"metadata\": {},\n \"to\": {\n \"id\": \"adr_210a8d4b0b76d77b\",\n \"description\": null,\n \"name\": \"LEORE AVIDAR\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2018-12-08T03:01:07.651Z\",\n \"date_modified\": \"2018-12-08T03:01:07.651Z\",\n \"object\": \"address\"\n },\n \"from\": {\n \"id\": \"adr_210a8d4b0b76d77b\",\n \"description\": null,\n \"name\": \"LEORE AVIDAR\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2018-12-08T03:01:07.651Z\",\n \"date_modified\": \"2018-12-08T03:01:07.651Z\",\n \"object\": \"address\"\n },\n \"color\": true,\n \"double_sided\": false,\n \"address_placement\": \"top_first_page\",\n \"return_envelope\": false,\n \"perforated_page\": null,\n \"extra_service\": null,\n \"custom_envelope\": null,\n \"mail_type\": \"usps_first_class\",\n \"url\": \"https://lob-assets.com/letters/ltr_da8267c6a6545cd6.pdf?version=v1&expires=1568239830&signature=HH-5RnbD4x0eJcnEC9HhqKSvQGsbkjovzvqSKgBijUHKIXwEKQJ4CbYhKs_U2q2A1k20Xefcaw7bfdPKozuqCQ\",\n \"merge_variables\": null,\n \"carrier\": \"USPS\",\n \"tracking_number\": null,\n \"tracking_events\": [],\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/letters/ltr_da8267c6a6545cd6_thumb_small_1.png?version=v1&expires=1568239830&signature=C1Rs83187HpWGhsg_pJIOhDIKlDtC_IgBBxHiocCEzJ8CncJwqrq5yHke-p97Dv7o81G_pfhFmirai589O6DCw\",\n \"medium\": \"https://lob-assets.com/letters/ltr_da8267c6a6545cd6_thumb_medium_1.png?version=v1&expires=1568239830&signature=gz63l0yi3sK_sXjYfIVdLSvkknJFr_O5TWRulo_iKIgS-PosIl6J0tDR6bx_Tv5Ab_w7DABg3qdKZ846MZ7TCw\",\n \"large\": \"https://lob-assets.com/letters/ltr_da8267c6a6545cd6_thumb_large_1.png?version=v1&expires=1568239830&signature=4Y1OIymaWkSO3aBIHCeshFAVnF-pDcF2FFqkx_jovaUFuk4FT1SI24L7_POwTRXQHlETMGlzkP_CGgqselRUAA\"\n }\n ],\n \"expected_delivery_date\": \"2019-08-16\",\n \"date_created\": \"2019-08-08T17:08:12.224Z\",\n \"date_modified\": \"2019-08-08T17:08:13.990Z\",\n \"send_date\": \"2019-08-08T17:08:12.224Z\",\n \"cards\": null,\n \"use_type\": \"marketing\",\n \"fsc\": true,\n \"object\": \"letter\"\n }\n ],\n \"object\": \"list\",\n \"next_url\": \"https://api.lob.com/v1/letters?limit=2&after=eyJkYXRlT2Zmc2V0IjoiMjAxOS0wOC0wOFQxNzowODoxMi4yMjRaIiwiaWRPZmZzZXQiOiJsdHJfZGE4MjY3YzZhNjU0NWNkNiJ9\",\n \"previous_url\": null,\n \"count\": 2\n}", + "body": "{\n \"id\": \"intl_ver_c7cb63d68f8d6\",\n \"recipient\": null,\n \"primary_line\": \"370 WATER ST\",\n \"secondary_line\": \"\",\n \"last_line\": \"SUMMERSIDE PE C1N 1C4\",\n \"country\": \"CA\",\n \"coverage\": \"SUBBUILDING\",\n \"deliverability\": \"deliverable\",\n \"status\": \"LV4\",\n \"components\": {\n \"primary_number\": \"370\",\n \"street_name\": \"WATER ST\",\n \"city\": \"SUMMERSIDE\",\n \"state\": \"PE\",\n \"postal_code\": \"C1N 1C4\"\n },\n \"object\": \"intl_verification\"\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "8f8747f6-aa08-4c31-9514-ca53f8a0ce20", + "id": "31e23a2c-a6bb-4e74-97ec-4cefe73057ae", "name": "Error", "originalRequest": { "url": { "path": [ - "letters" + "intl_verifications" ], "host": [ "{{baseUrl}}" ], - "query": [ - { - "key": "limit", - "value": "10" - }, - { - "key": "before", - "value": "" - }, - { - "key": "after", - "value": "" - }, - { - "key": "include", - "value": "" - }, - { - "key": "include", - "value": "" - }, - { - "key": "date_created[do_7c]", - "value": "" - }, - { - "key": "date_created[velit_c]", - "value": "" + "query": [], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" }, + "key": "Authorization", + "value": "Basic " + }, + { + "disabled": false, + "description": "* `native` - Translate response to the native language of the country in the request\n* `match` - match the response to the language in the request\n\nDefault response is in English.\n", + "key": "x-lang-output", + "value": "" + } + ], + "method": "POST", + "body": { + "mode": "urlencoded", + "urlencoded": [ { - "key": "campaign_id", - "value": "" + "disabled": false, + "key": "recipient", + "value": "Harry Zhang" }, { - "key": "status", - "value": "" + "disabled": false, + "key": "primary_line", + "value": "370 Water St" }, { - "key": "color", - "value": "" + "disabled": false, + "key": "secondary_line", + "value": "" }, { - "key": "scheduled", - "value": "" + "disabled": false, + "key": "city", + "value": "Summerside" }, { - "key": "mail_type", - "value": "usps_first_class" + "disabled": false, + "key": "state", + "value": "Prince Edward Island" }, { - "key": "date_created", - "value": "" + "disabled": false, + "key": "postal code", + "value": "C1N 1C4" }, { - "key": "send_date", - "value": "" + "disabled": false, + "key": "country", + "value": "CA" } - ], - "variable": [] - }, - "header": [ - { - "description": { - "content": "Added as a part of security scheme: basic", - "type": "text/plain" - }, - "key": "Authorization", - "value": "Basic " - } - ], - "method": "GET", - "body": {} + ] + } }, "status": "Internal Server Error", "code": 500, @@ -9417,218 +9497,97 @@ "value": "application/json" } ], - "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"to address not found\",\n \"status_code\": 404\n }\n}", + "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"country is required\",\n \"status_code\": 422\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } ], - "event": [] - }, + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + } + ], + "event": [] + }, + { + "id": "01674ba5-24fc-4876-babe-58705f1b5bf5", + "name": "Introduction", + "description": { + "content": "Lob’s Print & Mail and Address Verification APIs help companies transform outdated,\nmanual print-and-mail processes; save 1,000s of hours in processing time by sending mail much more\nquickly; and increase ROI on offline communications.\n\nAutomate direct mail by triggering on-demand postcards, letters, and checks directly from your\nCRM or customer data systems.\n\nAddress Verification corrects, standardizes, and cleanses address data for assured delivery with\ninstant verification across 240+ countries and territories.\n\nLob's print delivery network eliminates the hassle of vendor management with automated\nproduction and postage across a global network of vetted commercial printers.\n\nTracking & Analytics gives you complete visibility of production and delivery for each piece of\nmail you send to meet compliance requirements and measure campaign performance.\n", + "type": "text/plain" + }, + "item": [], + "event": [] + }, + { + "id": "b0dc4a46-d651-40cd-8d86-8a9edc5ea558", + "name": "Letters", + "description": { + "content": "The letters endpoint allows you to easily print and mail letters. The API provides endpoints for\ncreating letters, retrieving individual letters, canceling letters, and retrieving a list of letters.\n\n", + "type": "text/plain" + }, + "item": [ { - "id": "3f90dae9-d0f8-40c7-a9ac-f3931142c62f", - "name": "Create", + "id": "5f0ac8e7-73c7-43e3-b93e-88ecb2a854bc", + "name": "Retrieve", "request": { - "name": "Create", + "name": "Retrieve", "description": { - "content": "Creates a new letter given information", + "content": "Retrieves the details of an existing letter. You need only supply the unique letter identifier that was returned upon letter creation.", "type": "text/plain" }, "url": { "path": [ - "letters" + "letters", + ":ltr_id" ], "host": [ "{{baseUrl}}" ], - "query": [ + "query": [], + "variable": [ { "disabled": false, - "key": "idempotency_key", + "type": "any", "value": "", - "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.\n" + "key": "ltr_id", + "description": "(Required) id of the letter" } - ], - "variable": [] + ] }, "header": [ - { - "disabled": 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.\n", - "key": "Idempotency-Key", - "value": "" - }, - { - "disabled": 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.\n", - "key": "Lob-Version", - "value": "" - }, - { - "key": "Content-Type", - "value": "application/x-www-form-urlencoded" - }, { "key": "Accept", "value": "application/json" } ], - "method": "POST", - "auth": null, - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "key": "to[value]", - "value": "" - }, - { - "disabled": false, - "key": "from[value]", - "value": "" - }, - { - "disabled": false, - "key": "value", - "value": "" - }, - { - "disabled": false, - "key": "color", - "value": "" - }, - { - "disabled": false, - "key": "use_type", - "value": "" - }, - { - "disabled": false, - "key": "description", - "value": "" - }, - { - "disabled": false, - "key": "mail_type", - "value": "usps_first_class" - }, - { - "disabled": false, - "key": "value", - "value": "" - }, - { - "disabled": false, - "key": "extra_service", - "value": "" - }, - { - "disabled": false, - "key": "cards", - "value": "" - }, - { - "disabled": false, - "key": "double_sided", - "value": "true" - }, - { - "disabled": false, - "key": "address_placement", - "value": "top_first_page" - }, - { - "disabled": false, - "key": "return_envelope", - "value": "" - }, - { - "disabled": false, - "key": "perforated_page", - "value": "" - }, - { - "disabled": false, - "key": "custom_envelope", - "value": "" - }, - { - "disabled": false, - "key": "billing_group_id", - "value": "" - }, - { - "disabled": false, - "key": "position", - "value": "" - }, - { - "disabled": false, - "key": "redirect_url", - "value": "" - }, - { - "disabled": false, - "key": "width", - "value": "" - }, - { - "disabled": false, - "key": "top", - "value": "" - }, - { - "disabled": false, - "key": "right", - "value": "" - }, - { - "disabled": false, - "key": "left", - "value": "" - }, - { - "disabled": false, - "key": "bottom", - "value": "" - }, - { - "disabled": false, - "key": "pages", - "value": "" - }, - { - "disabled": false, - "key": "fsc", - "value": "false" - }, - { - "disabled": false, - "key": "size", - "value": "us_letter" - } - ] - } + "method": "GET", + "auth": null }, "response": [ { - "id": "766d858f-0561-43cc-9346-55055e5de8b7", + "id": "a7b414d4-ac79-4074-88c2-aefa67b17333", "name": "Returns a letter object", "originalRequest": { "url": { "path": [ - "letters" + "letters", + ":ltr_id" ], "host": [ "{{baseUrl}}" ], - "query": [ + "query": [], + "variable": [ { - "key": "idempotency_key", - "value": "026e7634-24d7-486c-a0bb-4a17fd0eebc5" + "disabled": false, + "type": "any", + "value": "", + "key": "ltr_id", + "description": "(Required) id of the letter" } - ], - "variable": [] + ] }, "header": [ { @@ -9638,45 +9597,2083 @@ }, "key": "Authorization", "value": "Basic " - }, - { - "disabled": 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.\n", - "key": "Idempotency-Key", - "value": "026e7634-24d7-486c-a0bb-4a17fd0eebc5" - }, - { - "disabled": 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.\n", - "key": "Lob-Version", - "value": "2024-01-01" } ], - "method": "POST", - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "key": "description", - "value": "demo" - }, - { - "disabled": false, - "key": "to[description]", - "value": "Harry - Office" - }, - { - "disabled": false, - "key": "to[name]", - "value": "Harry Zhang" - }, + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"id\": \"ltr_4868c3b754655f90\",\n \"description\": \"Demo Letter\",\n \"metadata\": {},\n \"to\": {\n \"id\": \"adr_d3489cd64c791ab5\",\n \"description\": null,\n \"name\": \"HARRY ZHANG\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2017-09-05T15:54:53.264Z\",\n \"date_modified\": \"2017-09-05T15:54:53.264Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"from\": {\n \"id\": \"adr_b8fb5acf3a2b55db\",\n \"description\": null,\n \"name\": \"LEORE AVIDAR\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2017-09-05T15:54:53.264Z\",\n \"date_modified\": \"2017-09-05T15:54:53.264Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"color\": true,\n \"double_sided\": true,\n \"address_placement\": \"top_first_page\",\n \"return_envelope\": false,\n \"perforated_page\": null,\n \"custom_envelope\": null,\n \"extra_service\": null,\n \"mail_type\": \"usps_first_class\",\n \"url\": \"https://lob-assets.com/letters/ltr_4868c3b754655f90.pdf?expires=1540372221&signature=8r94fse8uam7wGWmW5baxXulU88X2CA\",\n \"carrier\": \"USPS\",\n \"tracking_number\": null,\n \"tracking_events\": [],\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_small_1.png?expires=1540372221&signature=a5fRBJ22ZA78Vgpg34M9UfmHWTS3eha\",\n \"medium\": \"https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_medium_1.png?expires=1540372221&signature=bAzL8sv935PY09FWSkpDpWKkyvGSWYF\",\n \"large\": \"https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_large_1.png?expires=1540372221&signature=gsKvxXgrm4v4iZD3bOibK7jApNkEMdW\"\n }\n ],\n \"merge_variables\": {\n \"name\": \"Harry\"\n },\n \"expected_delivery_date\": \"2017-09-12\",\n \"date_created\": \"2017-09-05T15:54:53.346Z\",\n \"date_modified\": \"2017-09-05T15:54:53.346Z\",\n \"send_date\": \"2017-09-05T15:54:53.346Z\",\n \"cards\": [\n {\n \"id\": \"card_c51ae96f5cebf3e\",\n \"account_id\": \"fa9ea650fc7b31a89f92\",\n \"description\": null,\n \"url\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e.pdf?version=v1&expires=1636910992&signature=mnsDH2DAxdkN9VibdlLMxJC86sME5WYDqkNtmvGwdNsAaUWfbnv0rJhJ1mR8Ol4uxQq61j5wYZ0r3s-lBkQfDA\",\n \"size\": \"2.125x3.375\",\n \"auto_reorder\": false,\n \"reorder_quantity\": null,\n \"raw_url\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw\",\n \"front_original_url\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw\",\n \"back_original_url\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw\",\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_small_1.png?version=v1&expires=1636910992&signature=mrv8JDvpZK4I8WUGH0tPdtK-My5oes0Ltj_gL7BDw96SpCTTeZFHkz81SzclyFP9dQRtlsvAsjcuGcTBvCvOCg\",\n \"medium\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_medium_1.png?version=v1&expires=1636910992&signature=VgL_2Ckm_kxKiWGgWtdNoy9HHOn8dGYSVOn7UqyCbwdbVlUtx28TRN4Bo8Iru3n0keKp9He0YhKT1ILotznMDA\",\n \"large\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_large_1.png?version=v1&expires=1636910992&signature=FKSzymA13j-CQ0uk20cGHZTzT3vimzNBYrgp-xifLFg4mMdo1BZALR5O0aF_jVhsX614hKP35ONdYl47TQxXAw\"\n },\n {\n \"small\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_small_2.png?version=v1&expires=1636910992&signature=IWsmPa_ULlv2yyqjX564d_YfHHY_M7i9YxDnw-WXDr2jtOFcArmRZQbnHeE9g_rYxnddJbgosuv8-c2utiu7Cg\",\n \"medium\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_medium_2.png?version=v1&expires=1636910992&signature=zxK7VKGiTvz5Ywrkaydd0v3GcYf58R7A08J4tNfI7-aiNODDcTF3l0MqY13n9Pyc8RXSdD0XVBY-OpbA1VM-Ag\",\n \"large\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_large_2.png?version=v1&expires=1636910992&signature=r0OFUhh315ZwN0raMZdIwJd2oCIEYsz0BABaMxIuO1PKTD0ckGWrhcGdzk2dlWQ6vSvp0CUQ5k1RXGqkIIqkDw\"\n }\n ],\n \"available_quantity\": 10000,\n \"pending_quantity\": 0,\n \"countries\": null,\n \"status\": \"rendered\",\n \"mode\": \"test\",\n \"orientation\": \"horizontal\",\n \"threshold_amount\": 0,\n \"date_created\": \"2017-08-05T15:54:53.346Z\",\n \"date_modified\": \"2017-08-05T15:54:53.346Z\",\n \"object\": \"card\"\n }\n ],\n \"use_type\": \"marketing\",\n \"fsc\": false,\n \"object\": \"letter\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "c4428431-db80-4b1e-a373-b566d2b5ec8f", + "name": "Error", + "originalRequest": { + "url": { + "path": [ + "letters", + ":ltr_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ { "disabled": false, - "key": "to[company]", - "value": "Lob" + "type": "any", + "value": "", + "key": "ltr_id", + "description": "(Required) id of the letter" + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" }, - { + "key": "Authorization", + "value": "Basic " + } + ], + "method": "GET", + "body": {} + }, + "status": "Internal Server Error", + "code": 500, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"to address not found\",\n \"status_code\": 404\n }\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [] + }, + { + "id": "6b5ade26-fecc-46cd-8be5-3c64e339f9cc", + "name": "Cancel", + "request": { + "name": "Cancel", + "description": { + "content": "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.", + "type": "text/plain" + }, + "url": { + "path": [ + "letters", + ":ltr_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "ltr_id", + "description": "(Required) id of the letter" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "DELETE", + "auth": null + }, + "response": [ + { + "id": "f1519442-15fc-4296-9664-2250240db41f", + "name": "Deleted", + "originalRequest": { + "url": { + "path": [ + "letters", + ":ltr_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "ltr_id", + "description": "(Required) id of the letter" + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Basic " + } + ], + "method": "DELETE", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"id\": \"ltr_123456789\",\n \"deleted\": true\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "49c98e70-e2ef-41f1-9947-1a1b059e77b2", + "name": "Error", + "originalRequest": { + "url": { + "path": [ + "letters", + ":ltr_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "ltr_id", + "description": "(Required) id of the letter" + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Basic " + } + ], + "method": "DELETE", + "body": {} + }, + "status": "Internal Server Error", + "code": 500, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"to address not found\",\n \"status_code\": 404\n }\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [] + }, + { + "id": "7de43630-10c4-431f-9b4e-569f700a71b1", + "name": "List", + "request": { + "name": "List", + "description": { + "content": "Returns a list of your letters. The letters are returned sorted by creation date, with the most recently created letters appearing first.", + "type": "text/plain" + }, + "url": { + "path": [ + "letters" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "key": "limit", + "value": "10", + "description": "How many results to return." + }, + { + "disabled": false, + "key": "before", + "value": "", + "description": "`before` and `after` are both optional but only one of them can be in the query at a time.\n" + }, + { + "disabled": false, + "key": "after", + "value": "", + "description": "`before` and `after` are both optional but only one of them can be in the query at a time.\n" + }, + { + "disabled": false, + "key": "include", + "value": "", + "description": "Request that the response include the total count by specifying `include=[\"total_count\"]`.\n" + }, + { + "disabled": false, + "key": "include", + "value": "", + "description": "Request that the response include the total count by specifying `include=[\"total_count\"]`.\n" + }, + { + "disabled": false, + "key": "date_created[ut_ad]", + "value": "", + "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 ≤." + }, + { + "disabled": false, + "key": "campaign_id", + "value": "", + "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_`." + }, + { + "disabled": false, + "key": "status", + "value": "", + "description": "A string describing the render status:\n* `processed` - the rendering process is currently underway.\n* `rendered` - the rendering process has completed successfully.\n* `failed` - the rendering process has failed.\n" + }, + { + "disabled": false, + "key": "color", + "value": "", + "description": "Set to `true` to return only color letters. Set to `false` to return only black & white letters." + }, + { + "disabled": false, + "key": "scheduled", + "value": "", + "description": "* `true` - only return orders (past or future) where `send_date` is\ngreater than `date_created`\n* `false` - only return orders where `send_date` is equal to `date_created`\n" + }, + { + "disabled": false, + "key": "mail_type", + "value": "usps_first_class", + "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.\n" + }, + { + "disabled": false, + "key": "date_created", + "value": "", + "description": "Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both.\n" + }, + { + "disabled": false, + "key": "send_date", + "value": "", + "description": "Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both.\n" + } + ], + "variable": [] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "auth": null + }, + "response": [ + { + "id": "030d7763-b67e-4f58-889f-0a67aefc8720", + "name": "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.", + "originalRequest": { + "url": { + "path": [ + "letters" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "key": "limit", + "value": "10" + }, + { + "key": "before", + "value": "" + }, + { + "key": "after", + "value": "" + }, + { + "key": "include", + "value": "" + }, + { + "key": "include", + "value": "" + }, + { + "key": "date_created[dolore09b]", + "value": "" + }, + { + "key": "date_created[ind8]", + "value": "" + }, + { + "key": "campaign_id", + "value": "" + }, + { + "key": "status", + "value": "" + }, + { + "key": "color", + "value": "" + }, + { + "key": "scheduled", + "value": "" + }, + { + "key": "mail_type", + "value": "usps_first_class" + }, + { + "key": "date_created", + "value": "" + }, + { + "key": "send_date", + "value": "" + } + ], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Basic " + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"data\": [\n {\n \"id\": \"ltr_5ba44b462c79f07c\",\n \"description\": \"Demo Letter\",\n \"metadata\": {},\n \"to\": {\n \"id\": \"adr_asdi2y3riuasasoi\",\n \"description\": \"Harry - Office\",\n \"name\": \"Harry Zhang\",\n \"company\": \"Lob\",\n \"phone\": \"5555555555\",\n \"email\": \"harry@lob.com\",\n \"metadata\": {},\n \"address_line1\": \"370 WATER ST\",\n \"address_line2\": \"\",\n \"address_city\": \"SUMMERSIDE\",\n \"address_state\": \"PRINCE EDWARD ISLAND\",\n \"address_zip\": \"C1N 1C4\",\n \"address_country\": \"CANADA\",\n \"recipient_moved\": false,\n \"date_created\": \"2019-09-20T00:14:00.361Z\",\n \"date_modified\": \"2019-09-20T00:14:00.361Z\",\n \"object\": \"address\"\n },\n \"from\": {\n \"id\": \"adr_210a8d4b0b76d77b\",\n \"description\": null,\n \"name\": \"LEORE AVIDAR\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2018-12-08T03:01:07.651Z\",\n \"date_modified\": \"2018-12-08T03:01:07.651Z\",\n \"object\": \"address\"\n },\n \"color\": true,\n \"double_sided\": false,\n \"address_placement\": \"top_first_page\",\n \"return_envelope\": false,\n \"perforated_page\": null,\n \"extra_service\": \"certified\",\n \"custom_envelope\": null,\n \"template_id\": \"tmpl_a\",\n \"template_version_id\": \"vrsn_a\",\n \"mail_type\": \"usps_first_class\",\n \"url\": \"https://lob-assets.com/letters/ltr_5ba44b462c79f07c.pdf?version=v1&expires=1568239830&signature=Ob-DUPLJLM4scWQeCDNadPJ4j33MZw16pykOxwv2us-bA7utTYi6oZ8WrEtBYDBBo09XkapR3gdJf0NEr90xAA\",\n \"merge_variables\": null,\n \"carrier\": \"USPS\",\n \"tracking_number\": \"92071902358909000011275538\",\n \"tracking_events\": [\n {\n \"id\": \"evnt_9e84094c9368cfb\",\n \"type\": \"certified\",\n \"name\": \"Delivered\",\n \"details\": {\n \"event\": \"delivered\",\n \"description\": \"Package has been delivered.\",\n \"notes\": \"Delivered, Front Desk/Reception/Mail Room\",\n \"action_required\": false\n },\n \"location\": \"33408\",\n \"time\": \"2019-10-08T19:41:00Z\",\n \"date_created\": \"2019-10-08T19:41:00Z\",\n \"date_modified\": \"2019-10-08T19:41:00Z\",\n \"object\": \"tracking_event\"\n }\n ],\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/letters/ltr_5ba44b462c79f07c_thumb_small_1.png?version=v1&expires=1568239830&signature=xZUmE8rq8wSECHPEb9c37cUDZBzGUO3XK5LsIPZhI6dOXgm6zJEn8_7tKuZ3JWBmvNJNXdTl_ufkNu4avjQUDw\",\n \"medium\": \"https://lob-assets.com/letters/ltr_5ba44b462c79f07c_thumb_medium_1.png?version=v1&expires=1568239830&signature=H7354Qpcm9S4aXbrMsBe6QJ6lSNi9IWPgMJtLWLi4Kyx9tHF8Mp9YEc_IL9x89Jfw4-yRzKDXA410X4W0PssBQ\",\n \"large\": \"https://lob-assets.com/letters/ltr_5ba44b462c79f07c_thumb_large_1.png?version=v1&expires=1568239830&signature=54LUIDKZyItA9pnC87d1pJVAuw8bhKLCsMpNWkB3LgdVWxPxxb_c1IyIWAbSR-dyOYEOlDBCc40J4Kns-O_mAg\"\n }\n ],\n \"expected_delivery_date\": \"2019-08-16\",\n \"date_created\": \"2019-08-08T17:09:14.514Z\",\n \"date_modified\": \"2019-08-08T17:09:16.850Z\",\n \"send_date\": \"2019-08-08\",\n \"use_type\": \"marketing\",\n \"fsc\": false,\n \"object\": \"letter\"\n },\n {\n \"id\": \"ltr_da8267c6a6545cd6\",\n \"description\": \"Demo Letter\",\n \"metadata\": {},\n \"to\": {\n \"id\": \"adr_210a8d4b0b76d77b\",\n \"description\": null,\n \"name\": \"LEORE AVIDAR\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2018-12-08T03:01:07.651Z\",\n \"date_modified\": \"2018-12-08T03:01:07.651Z\",\n \"object\": \"address\"\n },\n \"from\": {\n \"id\": \"adr_210a8d4b0b76d77b\",\n \"description\": null,\n \"name\": \"LEORE AVIDAR\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2018-12-08T03:01:07.651Z\",\n \"date_modified\": \"2018-12-08T03:01:07.651Z\",\n \"object\": \"address\"\n },\n \"color\": true,\n \"double_sided\": false,\n \"address_placement\": \"top_first_page\",\n \"return_envelope\": false,\n \"perforated_page\": null,\n \"extra_service\": null,\n \"custom_envelope\": null,\n \"mail_type\": \"usps_first_class\",\n \"url\": \"https://lob-assets.com/letters/ltr_da8267c6a6545cd6.pdf?version=v1&expires=1568239830&signature=HH-5RnbD4x0eJcnEC9HhqKSvQGsbkjovzvqSKgBijUHKIXwEKQJ4CbYhKs_U2q2A1k20Xefcaw7bfdPKozuqCQ\",\n \"merge_variables\": null,\n \"carrier\": \"USPS\",\n \"tracking_number\": null,\n \"tracking_events\": [],\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/letters/ltr_da8267c6a6545cd6_thumb_small_1.png?version=v1&expires=1568239830&signature=C1Rs83187HpWGhsg_pJIOhDIKlDtC_IgBBxHiocCEzJ8CncJwqrq5yHke-p97Dv7o81G_pfhFmirai589O6DCw\",\n \"medium\": \"https://lob-assets.com/letters/ltr_da8267c6a6545cd6_thumb_medium_1.png?version=v1&expires=1568239830&signature=gz63l0yi3sK_sXjYfIVdLSvkknJFr_O5TWRulo_iKIgS-PosIl6J0tDR6bx_Tv5Ab_w7DABg3qdKZ846MZ7TCw\",\n \"large\": \"https://lob-assets.com/letters/ltr_da8267c6a6545cd6_thumb_large_1.png?version=v1&expires=1568239830&signature=4Y1OIymaWkSO3aBIHCeshFAVnF-pDcF2FFqkx_jovaUFuk4FT1SI24L7_POwTRXQHlETMGlzkP_CGgqselRUAA\"\n }\n ],\n \"expected_delivery_date\": \"2019-08-16\",\n \"date_created\": \"2019-08-08T17:08:12.224Z\",\n \"date_modified\": \"2019-08-08T17:08:13.990Z\",\n \"send_date\": \"2019-08-08T17:08:12.224Z\",\n \"cards\": null,\n \"use_type\": \"marketing\",\n \"fsc\": true,\n \"object\": \"letter\"\n }\n ],\n \"object\": \"list\",\n \"next_url\": \"https://api.lob.com/v1/letters?limit=2&after=eyJkYXRlT2Zmc2V0IjoiMjAxOS0wOC0wOFQxNzowODoxMi4yMjRaIiwiaWRPZmZzZXQiOiJsdHJfZGE4MjY3YzZhNjU0NWNkNiJ9\",\n \"previous_url\": null,\n \"count\": 2\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "984f8d79-3002-4e68-a6c4-1ddd6e08232e", + "name": "Error", + "originalRequest": { + "url": { + "path": [ + "letters" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "key": "limit", + "value": "10" + }, + { + "key": "before", + "value": "" + }, + { + "key": "after", + "value": "" + }, + { + "key": "include", + "value": "" + }, + { + "key": "include", + "value": "" + }, + { + "key": "date_created[dolore09b]", + "value": "" + }, + { + "key": "date_created[ind8]", + "value": "" + }, + { + "key": "campaign_id", + "value": "" + }, + { + "key": "status", + "value": "" + }, + { + "key": "color", + "value": "" + }, + { + "key": "scheduled", + "value": "" + }, + { + "key": "mail_type", + "value": "usps_first_class" + }, + { + "key": "date_created", + "value": "" + }, + { + "key": "send_date", + "value": "" + } + ], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Basic " + } + ], + "method": "GET", + "body": {} + }, + "status": "Internal Server Error", + "code": 500, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"to address not found\",\n \"status_code\": 404\n }\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [] + }, + { + "id": "bfaf766f-e87c-4fda-b551-d59cd2ae1a03", + "name": "Create", + "request": { + "name": "Create", + "description": { + "content": "Creates a new letter given information", + "type": "text/plain" + }, + "url": { + "path": [ + "letters" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "key": "idempotency_key", + "value": "", + "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.\n" + } + ], + "variable": [] + }, + "header": [ + { + "disabled": 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.\n", + "key": "Idempotency-Key", + "value": "" + }, + { + "disabled": 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.\n", + "key": "Lob-Version", + "value": "" + }, + { + "key": "Content-Type", + "value": "application/x-www-form-urlencoded" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "POST", + "auth": null, + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "key": "to[value]", + "value": "" + }, + { + "disabled": false, + "key": "from[value]", + "value": "" + }, + { + "disabled": false, + "key": "value", + "value": "" + }, + { + "disabled": false, + "key": "color", + "value": "" + }, + { + "disabled": false, + "key": "use_type", + "value": "" + }, + { + "disabled": false, + "key": "description", + "value": "" + }, + { + "disabled": false, + "key": "mail_type", + "value": "usps_first_class" + }, + { + "disabled": false, + "key": "value", + "value": "" + }, + { + "disabled": false, + "key": "extra_service", + "value": "" + }, + { + "disabled": false, + "key": "cards", + "value": "" + }, + { + "disabled": false, + "key": "double_sided", + "value": "true" + }, + { + "disabled": false, + "key": "address_placement", + "value": "top_first_page" + }, + { + "disabled": false, + "key": "return_envelope", + "value": "" + }, + { + "disabled": false, + "key": "perforated_page", + "value": "" + }, + { + "disabled": false, + "key": "custom_envelope", + "value": "" + }, + { + "disabled": false, + "key": "billing_group_id", + "value": "" + }, + { + "disabled": false, + "key": "position", + "value": "" + }, + { + "disabled": false, + "key": "redirect_url", + "value": "" + }, + { + "disabled": false, + "key": "width", + "value": "" + }, + { + "disabled": false, + "key": "top", + "value": "" + }, + { + "disabled": false, + "key": "right", + "value": "" + }, + { + "disabled": false, + "key": "left", + "value": "" + }, + { + "disabled": false, + "key": "bottom", + "value": "" + }, + { + "disabled": false, + "key": "pages", + "value": "" + }, + { + "disabled": false, + "key": "logo", + "value": "{\"url\":{\"value\":\"\"}}" + }, + { + "disabled": false, + "key": "style", + "value": "{\"background_color\":{\"value\":\"\"},\"foreground_color\":{\"value\":\"\"}}" + }, + { + "disabled": false, + "key": "fsc", + "value": "false" + }, + { + "disabled": false, + "key": "size", + "value": "us_letter" + } + ] + } + }, + "response": [ + { + "id": "efc1610a-b31d-4d2d-812f-ccc915e13dad", + "name": "Returns a letter object", + "originalRequest": { + "url": { + "path": [ + "letters" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "key": "idempotency_key", + "value": "026e7634-24d7-486c-a0bb-4a17fd0eebc5" + } + ], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Basic " + }, + { + "disabled": 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.\n", + "key": "Idempotency-Key", + "value": "026e7634-24d7-486c-a0bb-4a17fd0eebc5" + }, + { + "disabled": 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.\n", + "key": "Lob-Version", + "value": "2024-01-01" + } + ], + "method": "POST", + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "key": "description", + "value": "demo" + }, + { + "disabled": false, + "key": "to[description]", + "value": "Harry - Office" + }, + { + "disabled": false, + "key": "to[name]", + "value": "Harry Zhang" + }, + { + "disabled": false, + "key": "to[company]", + "value": "Lob" + }, + { + "disabled": false, + "key": "to[email]", + "value": "harry@lob.com" + }, + { + "disabled": false, + "key": "to[phone]", + "value": "5555555555" + }, + { + "disabled": false, + "key": "to[address_line1]", + "value": "210 King St" + }, + { + "disabled": false, + "key": "to[address_line2]", + "value": "# 6100" + }, + { + "disabled": false, + "key": "to[address_city]", + "value": "San Francisco" + }, + { + "disabled": false, + "key": "to[address_state]", + "value": "CA" + }, + { + "disabled": false, + "key": "to[address_zip]", + "value": "94107" + }, + { + "disabled": false, + "key": "to[address_country]", + "value": "US" + }, + { + "disabled": false, + "key": "from[name]", + "value": "Harry" + }, + { + "disabled": false, + "key": "from[address_line1]", + "value": "210 King St" + }, + { + "disabled": false, + "key": "from[address_line2]", + "value": "# 6100" + }, + { + "disabled": false, + "key": "from[address_city]", + "value": "San Francisco" + }, + { + "disabled": false, + "key": "from[address_state]", + "value": "CA" + }, + { + "disabled": false, + "key": "from[address_zip]", + "value": "94107" + }, + { + "disabled": false, + "key": "file", + "value": "HTML Letter for {{name}}" + }, + { + "disabled": false, + "key": "color", + "value": "true" + }, + { + "disabled": false, + "key": "cards", + "value": "card_c51ae96f5cebf3e" + }, + { + "disabled": false, + "key": "double_sided", + "value": "false" + }, + { + "disabled": false, + "key": "address_placement", + "value": "top_first_page" + }, + { + "disabled": false, + "key": "mail_type", + "value": "usps_first_class" + }, + { + "disabled": false, + "key": "return_envelope", + "value": "true" + }, + { + "disabled": false, + "key": "perforated_page", + "value": "1" + }, + { + "disabled": false, + "key": "merge_variables[name]", + "value": "Harry" + }, + { + "disabled": false, + "key": "metadata[spiffy]", + "value": "true" + }, + { + "disabled": false, + "key": "send_date", + "value": "2017-11-01T00:00:00.000Z" + }, + { + "disabled": false, + "key": "extra_service", + "value": "registered" + }, + { + "disabled": false, + "key": "use_type", + "value": "marketing" + }, + { + "disabled": false, + "key": "position", + "value": "relative" + }, + { + "disabled": false, + "key": "redirect_url", + "value": "https://www.lob.com" + }, + { + "disabled": false, + "key": "width", + "value": "2" + }, + { + "disabled": false, + "key": "bottom", + "value": "2" + }, + { + "disabled": false, + "key": "right", + "value": "2" + }, + { + "disabled": false, + "key": "pages", + "value": "1,4" + }, + { + "disabled": false, + "key": "fsc", + "value": "true" + } + ] + } + }, + "status": "OK", + "code": 200, + "header": [ + { + "disabled": false, + "description": "The rate limit for a given endpoint.", + "key": "ratelimit-limit", + "value": "150" + }, + { + "disabled": false, + "description": "The number of requests remaining in the current window.", + "key": "ratelimit-remaining", + "value": "100" + }, + { + "disabled": false, + "description": "The time at which the rate limit window resets in UTC epoch seconds\n", + "key": "ratelimit-reset", + "value": "1528749846" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"id\": \"ltr_4868c3b754655f90\",\n \"description\": \"Demo Letter\",\n \"metadata\": {},\n \"to\": {\n \"id\": \"adr_d3489cd64c791ab5\",\n \"description\": null,\n \"name\": \"HARRY ZHANG\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2017-09-05T15:54:53.264Z\",\n \"date_modified\": \"2017-09-05T15:54:53.264Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"from\": {\n \"id\": \"adr_b8fb5acf3a2b55db\",\n \"description\": null,\n \"name\": \"LEORE AVIDAR\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2017-09-05T15:54:53.264Z\",\n \"date_modified\": \"2017-09-05T15:54:53.264Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"color\": true,\n \"double_sided\": true,\n \"address_placement\": \"top_first_page\",\n \"return_envelope\": false,\n \"perforated_page\": null,\n \"custom_envelope\": null,\n \"extra_service\": null,\n \"mail_type\": \"usps_first_class\",\n \"url\": \"https://lob-assets.com/letters/ltr_4868c3b754655f90.pdf?expires=1540372221&signature=8r94fse8uam7wGWmW5baxXulU88X2CA\",\n \"carrier\": \"USPS\",\n \"tracking_number\": null,\n \"tracking_events\": [],\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_small_1.png?expires=1540372221&signature=a5fRBJ22ZA78Vgpg34M9UfmHWTS3eha\",\n \"medium\": \"https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_medium_1.png?expires=1540372221&signature=bAzL8sv935PY09FWSkpDpWKkyvGSWYF\",\n \"large\": \"https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_large_1.png?expires=1540372221&signature=gsKvxXgrm4v4iZD3bOibK7jApNkEMdW\"\n }\n ],\n \"merge_variables\": {\n \"name\": \"Harry\"\n },\n \"expected_delivery_date\": \"2017-09-12\",\n \"date_created\": \"2017-09-05T15:54:53.346Z\",\n \"date_modified\": \"2017-09-05T15:54:53.346Z\",\n \"send_date\": \"2017-09-05T15:54:53.346Z\",\n \"cards\": [\n {\n \"id\": \"card_c51ae96f5cebf3e\",\n \"account_id\": \"fa9ea650fc7b31a89f92\",\n \"description\": null,\n \"url\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e.pdf?version=v1&expires=1636910992&signature=mnsDH2DAxdkN9VibdlLMxJC86sME5WYDqkNtmvGwdNsAaUWfbnv0rJhJ1mR8Ol4uxQq61j5wYZ0r3s-lBkQfDA\",\n \"size\": \"2.125x3.375\",\n \"auto_reorder\": false,\n \"reorder_quantity\": null,\n \"raw_url\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw\",\n \"front_original_url\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw\",\n \"back_original_url\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw\",\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_small_1.png?version=v1&expires=1636910992&signature=mrv8JDvpZK4I8WUGH0tPdtK-My5oes0Ltj_gL7BDw96SpCTTeZFHkz81SzclyFP9dQRtlsvAsjcuGcTBvCvOCg\",\n \"medium\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_medium_1.png?version=v1&expires=1636910992&signature=VgL_2Ckm_kxKiWGgWtdNoy9HHOn8dGYSVOn7UqyCbwdbVlUtx28TRN4Bo8Iru3n0keKp9He0YhKT1ILotznMDA\",\n \"large\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_large_1.png?version=v1&expires=1636910992&signature=FKSzymA13j-CQ0uk20cGHZTzT3vimzNBYrgp-xifLFg4mMdo1BZALR5O0aF_jVhsX614hKP35ONdYl47TQxXAw\"\n },\n {\n \"small\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_small_2.png?version=v1&expires=1636910992&signature=IWsmPa_ULlv2yyqjX564d_YfHHY_M7i9YxDnw-WXDr2jtOFcArmRZQbnHeE9g_rYxnddJbgosuv8-c2utiu7Cg\",\n \"medium\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_medium_2.png?version=v1&expires=1636910992&signature=zxK7VKGiTvz5Ywrkaydd0v3GcYf58R7A08J4tNfI7-aiNODDcTF3l0MqY13n9Pyc8RXSdD0XVBY-OpbA1VM-Ag\",\n \"large\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_large_2.png?version=v1&expires=1636910992&signature=r0OFUhh315ZwN0raMZdIwJd2oCIEYsz0BABaMxIuO1PKTD0ckGWrhcGdzk2dlWQ6vSvp0CUQ5k1RXGqkIIqkDw\"\n }\n ],\n \"available_quantity\": 10000,\n \"pending_quantity\": 0,\n \"countries\": null,\n \"status\": \"rendered\",\n \"mode\": \"test\",\n \"orientation\": \"horizontal\",\n \"threshold_amount\": 0,\n \"date_created\": \"2017-08-05T15:54:53.346Z\",\n \"date_modified\": \"2017-08-05T15:54:53.346Z\",\n \"object\": \"card\"\n }\n ],\n \"use_type\": \"marketing\",\n \"fsc\": false,\n \"object\": \"letter\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "8bf5d790-8630-4d2f-89ab-a9d1be628587", + "name": "Error", + "originalRequest": { + "url": { + "path": [ + "letters" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "key": "idempotency_key", + "value": "026e7634-24d7-486c-a0bb-4a17fd0eebc5" + } + ], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Basic " + }, + { + "disabled": 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.\n", + "key": "Idempotency-Key", + "value": "026e7634-24d7-486c-a0bb-4a17fd0eebc5" + }, + { + "disabled": 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.\n", + "key": "Lob-Version", + "value": "2024-01-01" + } + ], + "method": "POST", + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "key": "description", + "value": "demo" + }, + { + "disabled": false, + "key": "to[description]", + "value": "Harry - Office" + }, + { + "disabled": false, + "key": "to[name]", + "value": "Harry Zhang" + }, + { + "disabled": false, + "key": "to[company]", + "value": "Lob" + }, + { + "disabled": false, + "key": "to[email]", + "value": "harry@lob.com" + }, + { + "disabled": false, + "key": "to[phone]", + "value": "5555555555" + }, + { + "disabled": false, + "key": "to[address_line1]", + "value": "210 King St" + }, + { + "disabled": false, + "key": "to[address_line2]", + "value": "# 6100" + }, + { + "disabled": false, + "key": "to[address_city]", + "value": "San Francisco" + }, + { + "disabled": false, + "key": "to[address_state]", + "value": "CA" + }, + { + "disabled": false, + "key": "to[address_zip]", + "value": "94107" + }, + { + "disabled": false, + "key": "to[address_country]", + "value": "US" + }, + { + "disabled": false, + "key": "from[name]", + "value": "Harry" + }, + { + "disabled": false, + "key": "from[address_line1]", + "value": "210 King St" + }, + { + "disabled": false, + "key": "from[address_line2]", + "value": "# 6100" + }, + { + "disabled": false, + "key": "from[address_city]", + "value": "San Francisco" + }, + { + "disabled": false, + "key": "from[address_state]", + "value": "CA" + }, + { + "disabled": false, + "key": "from[address_zip]", + "value": "94107" + }, + { + "disabled": false, + "key": "file", + "value": "HTML Letter for {{name}}" + }, + { + "disabled": false, + "key": "color", + "value": "true" + }, + { + "disabled": false, + "key": "cards", + "value": "card_c51ae96f5cebf3e" + }, + { + "disabled": false, + "key": "double_sided", + "value": "false" + }, + { + "disabled": false, + "key": "address_placement", + "value": "top_first_page" + }, + { + "disabled": false, + "key": "mail_type", + "value": "usps_first_class" + }, + { + "disabled": false, + "key": "return_envelope", + "value": "true" + }, + { + "disabled": false, + "key": "perforated_page", + "value": "1" + }, + { + "disabled": false, + "key": "merge_variables[name]", + "value": "Harry" + }, + { + "disabled": false, + "key": "metadata[spiffy]", + "value": "true" + }, + { + "disabled": false, + "key": "send_date", + "value": "2017-11-01T00:00:00.000Z" + }, + { + "disabled": false, + "key": "extra_service", + "value": "registered" + }, + { + "disabled": false, + "key": "use_type", + "value": "marketing" + }, + { + "disabled": false, + "key": "position", + "value": "relative" + }, + { + "disabled": false, + "key": "redirect_url", + "value": "https://www.lob.com" + }, + { + "disabled": false, + "key": "width", + "value": "2" + }, + { + "disabled": false, + "key": "bottom", + "value": "2" + }, + { + "disabled": false, + "key": "right", + "value": "2" + }, + { + "disabled": false, + "key": "pages", + "value": "1,4" + }, + { + "disabled": false, + "key": "fsc", + "value": "true" + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"to address not found\",\n \"status_code\": 404\n }\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + } + ], + "event": [] + }, + { + "id": "6c34d844-e3ee-4e11-a969-f7ece4aa9cc7", + "name": "Manage Mail", + "description": { + "content": "## Cancellation Windows\n\nBy default, all new accounts have a 5 minute cancellation window for postcards,\nself mailers, letters, and checks. Within that timeframe, you can cancel\nmailings from production, free of charge. Once the window has passed for a\npostcard, self mailer, letter, or check, the mailing is no longer cancelable.\nIn addition, certain customers can customize their cancellation windows by\nproduct in their Dashboard Settings. Upgrade to\nthe appropriate Print & Mail Edition\nto automatically gain access to this ability. For more details on this feature,\ncheck out our Cancellation Guide.\n\nIf you schedule a postcard, self mailer, letter, or check for up to 180 days\nin the future by supplying the `send_date` parameter, that will override any\ncancellation window you may have for that product.\n
\n\n\n## Scheduled Mailings\n\nPostcards, self mailers, letters, and checks can be scheduled to be sent up\nto 180 days in advance. You can use this feature to:\n- Create automated drip campaigns (e.g. send a postcard at 15, 30, and 60\ndays)\n- Schedule recurring sends\n- Plan your mailing schedule ahead of time\n\nUp until the time a mailing is scheduled for, it can also be canceled.\nIf you use this feature in conjunction with [a cancellation window](\nindex.html#section/Cancellation-Windows), the `send_date` parameter will always\ntake precedence.\n\nFor implementation details, see documentation below for each respective\nendpoint. For more help, see our Scheduled Mailings Guide.\n\nThis feature is exclusive to certain customers. Upgrade to the appropriate\nPrint & Mail Edition to\ngain access.\n\n### Example Create Request using Send Date\n\n```bash\n curl https://api.lob.com/v1/postcards \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -d \"description=Demo Future Postcard\" \\\n -d \"to=adr_bae820679f3f536b\" \\\n -d \"from=adr_210a8d4b0b76d77b\" \\\n -d \"front=tmpl_b846a20859ae11a\" \\\n -d \"back=tmpl_01b0d396a10c268\" \\\n -d \"merge_variables[name]=Harry\" \\\n -d \"send_date=2021-07-26\"\n```\n\n", + "type": "text/plain" + }, + "item": [], + "event": [] + }, + { + "id": "64358904-0a58-4579-b8be-7f3b5ac77c7e", + "name": "National Change of Address", + "description": { + "content": "National Change of Address Linkage (NCOALink) is a service offered by the USPS, which allows individuals\nor businesses who have recently moved to have any mail forwarded from their previous address\nto their new address.\n\nAs a CASS-certified Address Verification Provider, Lob also offers NCOALink\nfunctionality to our Print & Mail customers. With the Lob NCOALink feature enabled, Postcards,\nLetters, Checks and Addresses can automatically be corrected to reflect an individual's or business's\nnew address in the case that they have moved (only if they have registered for NCOALink with the USPS).\n\nDue to privacy concerns and USPS constraints, for customers with NCOALink enabled, our API responses\nfor a limited set of endpoints differ slightly in the case when an address has been changed through NCOALink.\n\n**NOTE**: This feature is exclusive to certain customers. Upgrade to the appropriate Print & Mail Editions to gain access.\n\nFor more information, see our NCOALink guide.\n
\n\n\n## NCOALink Live Environment\nThough there are no changes to API requests, there are significant changes to our API responses, but\nonly in the event that an address has been changed through NCOALink. If an address has not been changed\nthrough NCOALink, the response would be identical to our standard responses, except the addition of a\n`recipient_moved` field, which is `false` for unchanged addresses.\n\nIf an address has been changed through NCOALink, we are required to suppress the following response\nfields for that address:\n- `address_line1`\n- `address_line2`\n- The +4 portion of the ZIP+4 (5-digit ZIP code will still be present)\n\nSee the `ncoa_us_live` example under [Response samples](#operation/address_create) within the \"Create an Address\" section in Addresses\n
\n\n\n## NCOALink Test Environment\n\nIn addition to sending live requests, you may also want to simulate what an NCOALink response might\nlook like so that you can ensure your application behaves as expected. The behavior of NCOALink in\nLob's Test Environment is very similar to our [US Verifications Test Mode](#section/US-Verifications-Test-Env).\n\nTo simulate an NCOALink request, send a POST request to any of the four endpoints below with an `address_line1` field equal to `NCOA`:\n- `POST /v1/addresses`\n- `POST /v1/checks`\n- `POST /v1/letters`\n- `POST /v1/postcards`\n- `POST /v1/self_mailers`\n\nA static address will always be returned, as documented in the `ncoa_us_test` example under [Response samples](#operation/address_create) within the \"Create an Address\"\nsection in Addresses (along with the corresponding request under \"Request samples\").\n\n", + "type": "text/plain" + }, + "item": [], + "event": [] + }, + { + "id": "0f38a0d1-869b-4740-ac48-09e945346abf", + "name": "Postcards", + "description": { + "content": "The postcards endpoint allows you to easily print and mail postcards. The API provides endpoints for creating postcards,\nretrieving individual postcards, canceling postcards, and retrieving a list of postcards.\n\n", + "type": "text/plain" + }, + "item": [ + { + "id": "3c17ee69-f937-41b0-82b1-3965f48f21b7", + "name": "Retrieve", + "request": { + "name": "Retrieve", + "description": { + "content": "Retrieves the details of an existing postcard. You need only supply the unique customer identifier that was returned upon postcard creation.", + "type": "text/plain" + }, + "url": { + "path": [ + "postcards", + ":psc_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "psc_id", + "description": "(Required) id of the postcard" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "auth": null + }, + "response": [ + { + "id": "3565bd96-ff73-4a91-aefb-f2c4e81cfa7d", + "name": "Returns a postcard object", + "originalRequest": { + "url": { + "path": [ + "postcards", + ":psc_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "psc_id", + "description": "(Required) id of the postcard" + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Basic " + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"id\": \"psc_208e45e48d271294\",\n \"description\": null,\n \"metadata\": {},\n \"to\": {\n \"id\": \"adr_210a8d4b0b76d77b\",\n \"description\": null,\n \"name\": null,\n \"company\": \"LOB\",\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2018-12-08T03:01:07.651Z\",\n \"date_modified\": \"2018-12-08T03:01:07.651Z\",\n \"object\": \"address\"\n },\n \"url\": \"https://lob-assets.com/postcards/psc_208e45e48d271294.pdf?version=v1&expires=1619218302&signature=NfHHLBSr5tOHA_Z4kij4dKqZG8f3vMDtwvuFVeeF9pV_lylcjLsVVODhNCE5hR6-2slUr6t9WMNsi429Pj7_DA\",\n \"carrier\": \"USPS\",\n \"front_template_id\": null,\n \"back_template_id\": null,\n \"date_created\": \"2021-03-24T22:51:42.838Z\",\n \"date_modified\": \"2021-03-24T22:51:42.838Z\",\n \"send_date\": \"2021-03-24T22:51:42.838Z\",\n \"use_type\": \"marketing\",\n \"fsc\": false,\n \"object\": \"postcard\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "c6767908-7788-4153-8207-26ce94f7d9ee", + "name": "Error", + "originalRequest": { + "url": { + "path": [ + "postcards", + ":psc_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "psc_id", + "description": "(Required) id of the postcard" + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Basic " + } + ], + "method": "GET", + "body": {} + }, + "status": "Internal Server Error", + "code": 500, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"to address not found\",\n \"status_code\": 404\n }\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [] + }, + { + "id": "9ee433d3-f248-412f-bbaa-5d146a8ba9bb", + "name": "Cancel", + "request": { + "name": "Cancel", + "description": { + "content": "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.", + "type": "text/plain" + }, + "url": { + "path": [ + "postcards", + ":psc_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "psc_id", + "description": "(Required) id of the postcard" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "DELETE", + "auth": null + }, + "response": [ + { + "id": "1799a75e-0655-4013-a9e6-58b620a17353", + "name": "Deleted", + "originalRequest": { + "url": { + "path": [ + "postcards", + ":psc_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "psc_id", + "description": "(Required) id of the postcard" + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Basic " + } + ], + "method": "DELETE", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"id\": \"psc_123456789\",\n \"deleted\": true\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "d49bdac7-59bd-48e5-a0a8-deb000491c9e", + "name": "Error", + "originalRequest": { + "url": { + "path": [ + "postcards", + ":psc_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "psc_id", + "description": "(Required) id of the postcard" + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Basic " + } + ], + "method": "DELETE", + "body": {} + }, + "status": "Internal Server Error", + "code": 500, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"to address not found\",\n \"status_code\": 404\n }\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [] + }, + { + "id": "278b38ad-eb78-4f14-b21a-bc908dfb9d06", + "name": "List", + "request": { + "name": "List", + "description": { + "content": "Returns a list of your postcards. The addresses are returned sorted by creation date, with the most recently created addresses appearing first.", + "type": "text/plain" + }, + "url": { + "path": [ + "postcards" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "key": "limit", + "value": "10", + "description": "How many results to return." + }, + { + "disabled": false, + "key": "before", + "value": "", + "description": "`before` and `after` are both optional but only one of them can be in the query at a time.\n" + }, + { + "disabled": false, + "key": "after", + "value": "", + "description": "`before` and `after` are both optional but only one of them can be in the query at a time.\n" + }, + { + "disabled": false, + "key": "include", + "value": "", + "description": "Request that the response include the total count by specifying `include=[\"total_count\"]`.\n" + }, + { + "disabled": false, + "key": "include", + "value": "", + "description": "Request that the response include the total count by specifying `include=[\"total_count\"]`.\n" + }, + { + "disabled": false, + "key": "date_created[ut_ad]", + "value": "", + "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 ≤." + }, + { + "disabled": false, + "key": "campaign_id", + "value": "", + "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_`." + }, + { + "disabled": false, + "key": "status", + "value": "", + "description": "A string describing the render status:\n* `processed` - the rendering process is currently underway.\n* `rendered` - the rendering process has completed successfully.\n* `failed` - the rendering process has failed.\n" + }, + { + "disabled": false, + "key": "size", + "value": "4x6", + "description": "Specifies the size of the postcard. Only `4x6` postcards can be sent to international destinations." + }, + { + "disabled": false, + "key": "size", + "value": "4x6", + "description": "Specifies the size of the postcard. Only `4x6` postcards can be sent to international destinations." + }, + { + "disabled": false, + "key": "scheduled", + "value": "", + "description": "* `true` - only return orders (past or future) where `send_date` is\ngreater than `date_created`\n* `false` - only return orders where `send_date` is equal to `date_created`\n" + }, + { + "disabled": false, + "key": "mail_type", + "value": "usps_first_class", + "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.\n" + }, + { + "disabled": false, + "key": "date_created", + "value": "", + "description": "Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both.\n" + }, + { + "disabled": false, + "key": "send_date", + "value": "", + "description": "Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both.\n" + } + ], + "variable": [] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "auth": null + }, + "response": [ + { + "id": "c43b6705-b2db-40a2-bb72-6c5d093613e5", + "name": "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.", + "originalRequest": { + "url": { + "path": [ + "postcards" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "key": "limit", + "value": "10" + }, + { + "key": "before", + "value": "" + }, + { + "key": "after", + "value": "" + }, + { + "key": "include", + "value": "" + }, + { + "key": "include", + "value": "" + }, + { + "key": "date_created[dolore09b]", + "value": "" + }, + { + "key": "date_created[ind8]", + "value": "" + }, + { + "key": "campaign_id", + "value": "" + }, + { + "key": "status", + "value": "" + }, + { + "key": "size", + "value": "4x6" + }, + { + "key": "size", + "value": "4x6" + }, + { + "key": "scheduled", + "value": "" + }, + { + "key": "mail_type", + "value": "usps_first_class" + }, + { + "key": "date_created", + "value": "" + }, + { + "key": "send_date", + "value": "" + } + ], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Basic " + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"data\": [\n {\n \"id\": \"psc_208e45e48d271294\",\n \"description\": null,\n \"metadata\": {},\n \"to\": {\n \"id\": \"adr_210a8d4b0b76d77b\",\n \"description\": null,\n \"name\": \"LEORE AVIDAR\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2018-12-08T03:01:07.651Z\",\n \"date_modified\": \"2018-12-08T03:01:07.651Z\",\n \"object\": \"address\"\n },\n \"url\": \"https://lob-assets.com/postcards/psc_208e45e48d271294.pdf?version=v1&expires=1619218302&signature=NfHHLBSr5tOHA_Z4kij4dKqZG8f3vMDtwvuFVeeF9pV_lylcjLsVVODhNCE5hR6-2slUr6t9WMNsi429Pj7_DA\",\n \"carrier\": \"USPS\",\n \"front_template_id\": null,\n \"back_template_id\": null,\n \"front_template_version_id\": null,\n \"back_template_version_id\": null,\n \"date_created\": \"2021-03-24T22:51:42.838Z\",\n \"date_modified\": \"2021-03-24T22:51:42.838Z\",\n \"send_date\": \"2021-03-24T22:51:42.838Z\",\n \"use_type\": \"marketing\",\n \"fsc\": false,\n \"object\": \"postcard\"\n },\n {\n \"id\": \"psc_0e03d1ad7d31f151\",\n \"description\": null,\n \"metadata\": {},\n \"to\": {\n \"id\": \"adr_c7cb63d68f8d6\",\n \"description\": null,\n \"name\": \"JANE DOE\",\n \"company\": \"LOB\",\n \"phone\": \"5555555555\",\n \"email\": \"jane.doe@lob.com\",\n \"address_line1\": \"370 WATER ST\",\n \"address_line2\": \"\",\n \"address_city\": \"SUMMERSIDE\",\n \"address_state\": \"PE\",\n \"address_zip\": \"C1N 1C4\",\n \"address_country\": \"CANADA\",\n \"metadata\": {},\n \"date_created\": \"2018-12-08T03:01:07.651Z\",\n \"date_modified\": \"2018-12-08T03:01:07.651Z\",\n \"object\": \"address\",\n \"recipient_moved\": false\n },\n \"from\": {\n \"id\": \"adr_210a8d4b0b76d77b\",\n \"description\": null,\n \"name\": \"LEORE AVIDAR\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2018-12-08T03:01:07.651Z\",\n \"date_modified\": \"2018-12-08T03:01:07.651Z\",\n \"object\": \"address\"\n },\n \"url\": \"https://lob-assets.com/postcards/psc_208e45e48d271294.pdf?version=v1&expires=1619218302&signature=NfHHLBSr5tOHA_Z4kij4dKqZG8f3vMDtwvuFVeeF9pV_lylcjLsVVODhNCE5hR6-2slUr6t9WMNsi429Pj7_DA\",\n \"carrier\": \"USPS\",\n \"front_template_id\": null,\n \"back_template_id\": null,\n \"front_template_version_id\": null,\n \"back_template_version_id\": null,\n \"tracking_events\": [],\n \"size\": \"6x11\",\n \"mail_type\": \"usps_first_class\",\n \"merge_variables\": {},\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_small_1.png?expires=1540372221&signature=a5fRBJ22ZA78Vgpg34M9UfmHWTS3eha\",\n \"medium\": \"https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_medium_1.png?expires=1540372221&signature=bAzL8sv935PY09FWSkpDpWKkyvGSWYF\",\n \"large\": \"https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_large_1.png?expires=1540372221&signature=gsKvxXgrm4v4iZD3bOibK7jApNkEMdW\"\n }\n ],\n \"expected_delivery_date\": \"2021-03-30\",\n \"date_created\": \"2021-03-24T22:51:42.838Z\",\n \"date_modified\": \"2021-03-24T22:51:42.838Z\",\n \"send_date\": \"2021-03-24T22:51:42.838Z\",\n \"use_type\": \"marketing\",\n \"fsc\": false,\n \"object\": \"postcard\"\n }\n ],\n \"object\": \"list\",\n \"previous_url\": null,\n \"next_url\": null,\n \"count\": 2\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "bf3b48ca-4f5e-46c9-a2c1-a4173aa001a0", + "name": "Error", + "originalRequest": { + "url": { + "path": [ + "postcards" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "key": "limit", + "value": "10" + }, + { + "key": "before", + "value": "" + }, + { + "key": "after", + "value": "" + }, + { + "key": "include", + "value": "" + }, + { + "key": "include", + "value": "" + }, + { + "key": "date_created[dolore09b]", + "value": "" + }, + { + "key": "date_created[ind8]", + "value": "" + }, + { + "key": "campaign_id", + "value": "" + }, + { + "key": "status", + "value": "" + }, + { + "key": "size", + "value": "4x6" + }, + { + "key": "size", + "value": "4x6" + }, + { + "key": "scheduled", + "value": "" + }, + { + "key": "mail_type", + "value": "usps_first_class" + }, + { + "key": "date_created", + "value": "" + }, + { + "key": "send_date", + "value": "" + } + ], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Basic " + } + ], + "method": "GET", + "body": {} + }, + "status": "Internal Server Error", + "code": 500, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"to address not found\",\n \"status_code\": 404\n }\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [] + }, + { + "id": "5c7d8163-b79e-484e-bcab-beee52a508c6", + "name": "Create", + "request": { + "name": "Create", + "description": { + "content": "Creates a new postcard given information", + "type": "text/plain" + }, + "url": { + "path": [ + "postcards" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "key": "idempotency_key", + "value": "", + "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.\n" + } + ], + "variable": [] + }, + "header": [ + { + "disabled": 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.\n", + "key": "Idempotency-Key", + "value": "" + }, + { + "key": "Content-Type", + "value": "application/x-www-form-urlencoded" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "POST", + "auth": null, + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "key": "to[value]", + "value": "" + }, + { + "disabled": false, + "key": "value", + "value": "" + }, + { + "disabled": false, + "key": "value", + "value": "" + }, + { + "disabled": false, + "key": "use_type", + "value": "" + }, + { + "disabled": false, + "key": "value", + "value": "" + }, + { + "disabled": false, + "key": "metadata[value]", + "value": "" + }, + { + "disabled": false, + "key": "value", + "value": "" + }, + { + "disabled": false, + "key": "merge_variables[value]", + "value": "" + }, + { + "disabled": false, + "key": "value", + "value": "" + }, + { + "disabled": false, + "key": "value", + "value": "" + }, + { + "disabled": false, + "key": "from[value]", + "value": "" + }, + { + "disabled": false, + "key": "billing_group_id", + "value": "" + }, + { + "disabled": false, + "key": "position", + "value": "" + }, + { + "disabled": false, + "key": "redirect_url", + "value": "" + }, + { + "disabled": false, + "key": "width", + "value": "" + }, + { + "disabled": false, + "key": "top", + "value": "" + }, + { + "disabled": false, + "key": "right", + "value": "" + }, + { + "disabled": false, + "key": "left", + "value": "" + }, + { + "disabled": false, + "key": "bottom", + "value": "" + }, + { + "disabled": false, + "key": "pages", + "value": "" + }, + { + "disabled": false, + "key": "logo", + "value": "{\"url\":{\"value\":\"\"}}" + }, + { + "disabled": false, + "key": "style", + "value": "{\"background_color\":{\"value\":\"\"},\"foreground_color\":{\"value\":\"\"}}" + }, + { + "disabled": false, + "key": "fsc", + "value": "false" + } + ] + } + }, + "response": [ + { + "id": "70d9c352-de3c-499d-b195-4fc8ed4ef79a", + "name": "Returns a postcard object", + "originalRequest": { + "url": { + "path": [ + "postcards" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "key": "idempotency_key", + "value": "026e7634-24d7-486c-a0bb-4a17fd0eebc5" + } + ], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Basic " + }, + { + "disabled": 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.\n", + "key": "Idempotency-Key", + "value": "026e7634-24d7-486c-a0bb-4a17fd0eebc5" + } + ], + "method": "POST", + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "key": "description", + "value": "demo" + }, + { + "disabled": false, + "key": "to[description]", + "value": "Harry - Office" + }, + { + "disabled": false, + "key": "to[name]", + "value": "Harry Zhang" + }, + { + "disabled": false, + "key": "to[company]", + "value": "Lob" + }, + { "disabled": false, "key": "to[email]", "value": "harry@lob.com" @@ -9716,10 +11713,30 @@ "key": "to[address_country]", "value": "US" }, + { + "disabled": false, + "key": "from[description]", + "value": "Harry - Office" + }, { "disabled": false, "key": "from[name]", - "value": "Harry" + "value": "Harry Zhang" + }, + { + "disabled": false, + "key": "from[company]", + "value": "Lob" + }, + { + "disabled": false, + "key": "from[email]", + "value": "harry@lob.com" + }, + { + "disabled": false, + "key": "from[phone]", + "value": "5555555555" }, { "disabled": false, @@ -9748,44 +11765,29 @@ }, { "disabled": false, - "key": "file", - "value": "HTML Letter for {{name}}" - }, - { - "disabled": false, - "key": "color", - "value": "true" + "key": "from[address_country]", + "value": "US" }, { "disabled": false, - "key": "cards", - "value": "card_c51ae96f5cebf3e" + "key": "front", + "value": "tmpl_c94e83ca2cd5121" }, { "disabled": false, - "key": "double_sided", - "value": "false" + "key": "back", + "value": "tmpl_c94e83ca2cd5121" }, { "disabled": false, - "key": "address_placement", - "value": "top_first_page" + "key": "size", + "value": "6x9" }, { "disabled": false, "key": "mail_type", "value": "usps_first_class" }, - { - "disabled": false, - "key": "return_envelope", - "value": "true" - }, - { - "disabled": false, - "key": "perforated_page", - "value": "1" - }, { "disabled": false, "key": "merge_variables[name]", @@ -9801,11 +11803,6 @@ "key": "send_date", "value": "2017-11-01T00:00:00.000Z" }, - { - "disabled": false, - "key": "extra_service", - "value": "registered" - }, { "disabled": false, "key": "use_type", @@ -9824,22 +11821,22 @@ { "disabled": false, "key": "width", - "value": "2" + "value": "2.5" }, { "disabled": false, "key": "bottom", - "value": "2" + "value": "2.5" }, { "disabled": false, "key": "right", - "value": "2" + "value": "2.5" }, { "disabled": false, "key": "pages", - "value": "1,4" + "value": "back" }, { "disabled": false, @@ -9875,17 +11872,17 @@ "value": "application/json" } ], - "body": "{\n \"id\": \"ltr_4868c3b754655f90\",\n \"description\": \"Demo Letter\",\n \"metadata\": {},\n \"to\": {\n \"id\": \"adr_d3489cd64c791ab5\",\n \"description\": null,\n \"name\": \"HARRY ZHANG\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2017-09-05T15:54:53.264Z\",\n \"date_modified\": \"2017-09-05T15:54:53.264Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"from\": {\n \"id\": \"adr_b8fb5acf3a2b55db\",\n \"description\": null,\n \"name\": \"LEORE AVIDAR\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2017-09-05T15:54:53.264Z\",\n \"date_modified\": \"2017-09-05T15:54:53.264Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"color\": true,\n \"double_sided\": true,\n \"address_placement\": \"top_first_page\",\n \"return_envelope\": false,\n \"perforated_page\": null,\n \"custom_envelope\": null,\n \"extra_service\": null,\n \"mail_type\": \"usps_first_class\",\n \"url\": \"https://lob-assets.com/letters/ltr_4868c3b754655f90.pdf?expires=1540372221&signature=8r94fse8uam7wGWmW5baxXulU88X2CA\",\n \"carrier\": \"USPS\",\n \"tracking_number\": null,\n \"tracking_events\": [],\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_small_1.png?expires=1540372221&signature=a5fRBJ22ZA78Vgpg34M9UfmHWTS3eha\",\n \"medium\": \"https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_medium_1.png?expires=1540372221&signature=bAzL8sv935PY09FWSkpDpWKkyvGSWYF\",\n \"large\": \"https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_large_1.png?expires=1540372221&signature=gsKvxXgrm4v4iZD3bOibK7jApNkEMdW\"\n }\n ],\n \"merge_variables\": {\n \"name\": \"Harry\"\n },\n \"expected_delivery_date\": \"2017-09-12\",\n \"date_created\": \"2017-09-05T15:54:53.346Z\",\n \"date_modified\": \"2017-09-05T15:54:53.346Z\",\n \"send_date\": \"2017-09-05T15:54:53.346Z\",\n \"cards\": [\n {\n \"id\": \"card_c51ae96f5cebf3e\",\n \"account_id\": \"fa9ea650fc7b31a89f92\",\n \"description\": null,\n \"url\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e.pdf?version=v1&expires=1636910992&signature=mnsDH2DAxdkN9VibdlLMxJC86sME5WYDqkNtmvGwdNsAaUWfbnv0rJhJ1mR8Ol4uxQq61j5wYZ0r3s-lBkQfDA\",\n \"size\": \"2.125x3.375\",\n \"auto_reorder\": false,\n \"reorder_quantity\": null,\n \"raw_url\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw\",\n \"front_original_url\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw\",\n \"back_original_url\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw\",\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_small_1.png?version=v1&expires=1636910992&signature=mrv8JDvpZK4I8WUGH0tPdtK-My5oes0Ltj_gL7BDw96SpCTTeZFHkz81SzclyFP9dQRtlsvAsjcuGcTBvCvOCg\",\n \"medium\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_medium_1.png?version=v1&expires=1636910992&signature=VgL_2Ckm_kxKiWGgWtdNoy9HHOn8dGYSVOn7UqyCbwdbVlUtx28TRN4Bo8Iru3n0keKp9He0YhKT1ILotznMDA\",\n \"large\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_large_1.png?version=v1&expires=1636910992&signature=FKSzymA13j-CQ0uk20cGHZTzT3vimzNBYrgp-xifLFg4mMdo1BZALR5O0aF_jVhsX614hKP35ONdYl47TQxXAw\"\n },\n {\n \"small\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_small_2.png?version=v1&expires=1636910992&signature=IWsmPa_ULlv2yyqjX564d_YfHHY_M7i9YxDnw-WXDr2jtOFcArmRZQbnHeE9g_rYxnddJbgosuv8-c2utiu7Cg\",\n \"medium\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_medium_2.png?version=v1&expires=1636910992&signature=zxK7VKGiTvz5Ywrkaydd0v3GcYf58R7A08J4tNfI7-aiNODDcTF3l0MqY13n9Pyc8RXSdD0XVBY-OpbA1VM-Ag\",\n \"large\": \"https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_large_2.png?version=v1&expires=1636910992&signature=r0OFUhh315ZwN0raMZdIwJd2oCIEYsz0BABaMxIuO1PKTD0ckGWrhcGdzk2dlWQ6vSvp0CUQ5k1RXGqkIIqkDw\"\n }\n ],\n \"available_quantity\": 10000,\n \"pending_quantity\": 0,\n \"countries\": null,\n \"status\": \"rendered\",\n \"mode\": \"test\",\n \"orientation\": \"horizontal\",\n \"threshold_amount\": 0,\n \"date_created\": \"2017-08-05T15:54:53.346Z\",\n \"date_modified\": \"2017-08-05T15:54:53.346Z\",\n \"object\": \"card\"\n }\n ],\n \"use_type\": \"marketing\",\n \"fsc\": false,\n \"object\": \"letter\"\n}", + "body": "{\n \"id\": \"psc_208e45e48d271294\",\n \"description\": null,\n \"metadata\": {},\n \"to\": {\n \"id\": \"adr_210a8d4b0b76d77b\",\n \"description\": null,\n \"name\": null,\n \"company\": \"LOB\",\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2018-12-08T03:01:07.651Z\",\n \"date_modified\": \"2018-12-08T03:01:07.651Z\",\n \"object\": \"address\"\n },\n \"url\": \"https://lob-assets.com/postcards/psc_208e45e48d271294.pdf?version=v1&expires=1619218302&signature=NfHHLBSr5tOHA_Z4kij4dKqZG8f3vMDtwvuFVeeF9pV_lylcjLsVVODhNCE5hR6-2slUr6t9WMNsi429Pj7_DA\",\n \"carrier\": \"USPS\",\n \"front_template_id\": null,\n \"back_template_id\": null,\n \"date_created\": \"2021-03-24T22:51:42.838Z\",\n \"date_modified\": \"2021-03-24T22:51:42.838Z\",\n \"send_date\": \"2021-03-24T22:51:42.838Z\",\n \"use_type\": \"marketing\",\n \"fsc\": false,\n \"object\": \"postcard\"\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "b1f0e2a2-0eb9-4a1c-97ed-7c8514784d18", + "id": "6ae1069c-e408-490e-8e88-6cb39d5215ea", "name": "Error", "originalRequest": { "url": { "path": [ - "letters" + "postcards" ], "host": [ "{{baseUrl}}" @@ -9912,12 +11909,6 @@ "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.\n", "key": "Idempotency-Key", "value": "026e7634-24d7-486c-a0bb-4a17fd0eebc5" - }, - { - "disabled": 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.\n", - "key": "Lob-Version", - "value": "2024-01-01" } ], "method": "POST", @@ -9984,10 +11975,30 @@ "key": "to[address_country]", "value": "US" }, + { + "disabled": false, + "key": "from[description]", + "value": "Harry - Office" + }, { "disabled": false, "key": "from[name]", - "value": "Harry" + "value": "Harry Zhang" + }, + { + "disabled": false, + "key": "from[company]", + "value": "Lob" + }, + { + "disabled": false, + "key": "from[email]", + "value": "harry@lob.com" + }, + { + "disabled": false, + "key": "from[phone]", + "value": "5555555555" }, { "disabled": false, @@ -10016,103 +12027,475 @@ }, { "disabled": false, - "key": "file", - "value": "HTML Letter for {{name}}" + "key": "from[address_country]", + "value": "US" }, { "disabled": false, - "key": "color", + "key": "front", + "value": "tmpl_c94e83ca2cd5121" + }, + { + "disabled": false, + "key": "back", + "value": "tmpl_c94e83ca2cd5121" + }, + { + "disabled": false, + "key": "size", + "value": "6x9" + }, + { + "disabled": false, + "key": "mail_type", + "value": "usps_first_class" + }, + { + "disabled": false, + "key": "merge_variables[name]", + "value": "Harry" + }, + { + "disabled": false, + "key": "metadata[spiffy]", "value": "true" }, { "disabled": false, - "key": "cards", - "value": "card_c51ae96f5cebf3e" + "key": "send_date", + "value": "2017-11-01T00:00:00.000Z" }, { "disabled": false, - "key": "double_sided", - "value": "false" + "key": "use_type", + "value": "marketing" + }, + { + "disabled": false, + "key": "position", + "value": "relative" + }, + { + "disabled": false, + "key": "redirect_url", + "value": "https://www.lob.com" + }, + { + "disabled": false, + "key": "width", + "value": "2.5" + }, + { + "disabled": false, + "key": "bottom", + "value": "2.5" }, { "disabled": false, - "key": "address_placement", - "value": "top_first_page" + "key": "right", + "value": "2.5" }, { "disabled": false, - "key": "mail_type", - "value": "usps_first_class" + "key": "pages", + "value": "back" }, { "disabled": false, - "key": "return_envelope", + "key": "fsc", "value": "true" - }, + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"to address not found\",\n \"status_code\": 404\n }\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + } + ], + "event": [] + }, + { + "id": "5057ac59-f333-44d7-88a5-ea74001b104a", + "name": "QR Codes", + "description": { + "content": "\nLob QR codes allow you to generate a QR code that is unique to each mailpiece, thereby allowing each and every customers to receive a personalized link. See the Create endpoint for Letters, Postcards or Self Mailers to learn how to embed a QR code into your mail piece.\n\nWebhooks can be used to integrate Lob QR code scans into your omni channel marketing strategy. See the 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.\n\nFurthermore, our QR code Analytics endpoint can be used to track the impact and engagement rate of your mail sends. Lob can tell you exactly which recipients opened your mailpiece. Our Analytics endpoint allows you to see exactly which recipient scanned a mailpiece, when they scanned it, and more!\n\n\n", + "type": "text/plain" + }, + "item": [ + { + "id": "24f6a123-d0df-46d6-8623-b3b7cd97c9e7", + "name": "List", + "request": { + "name": "List", + "description": { + "content": "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.", + "type": "text/plain" + }, + "url": { + "path": [ + "qr_code_analytics" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "key": "limit", + "value": "10", + "description": "How many results to return." + }, + { + "disabled": false, + "key": "offset", + "value": "0", + "description": "An integer that designates the offset at which to begin returning results. Defaults to 0." + }, + { + "disabled": false, + "key": "include", + "value": "", + "description": "Request that the response include the total count by specifying `include=[\"total_count\"]`.\n" + }, + { + "disabled": false, + "key": "include", + "value": "", + "description": "Request that the response include the total count by specifying `include=[\"total_count\"]`.\n" + }, + { + "disabled": false, + "key": "date_created[ut_ad]", + "value": "", + "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 ≤." + }, + { + "disabled": false, + "key": "scanned", + "value": "", + "description": "Filter list of responses to only include QR codes with at least one scan event." + } + ], + "variable": [] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "auth": null + }, + "response": [ + { + "id": "5cd95835-9f3c-479b-bec0-a6271599f3b2", + "name": "Returns a list of QR Codes and their analytics.", + "originalRequest": { + "url": { + "path": [ + "qr_code_analytics" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ { - "disabled": false, - "key": "perforated_page", - "value": "1" + "key": "limit", + "value": "10" }, { - "disabled": false, - "key": "merge_variables[name]", - "value": "Harry" + "key": "offset", + "value": "0" }, { - "disabled": false, - "key": "metadata[spiffy]", - "value": "true" + "key": "include", + "value": "" }, { - "disabled": false, - "key": "send_date", - "value": "2017-11-01T00:00:00.000Z" + "key": "include", + "value": "" }, { - "disabled": false, - "key": "extra_service", - "value": "registered" + "key": "date_created[dolore09b]", + "value": "" }, { - "disabled": false, - "key": "use_type", - "value": "marketing" + "key": "date_created[ind8]", + "value": "" }, { - "disabled": false, - "key": "position", - "value": "relative" + "key": "scanned", + "value": "" + } + ], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" }, + "key": "Authorization", + "value": "Basic " + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"data\": [\n {\n \"resource_id\": \"ltr_d5a5a89da9106f8\",\n \"date_created\": \"2019-07-27T23:49:01.511Z\",\n \"number_of_scans\": 2,\n \"scans\": [\n {\n \"ip_location\": \"127.0.0.1\",\n \"scan_date\": \"2022-07-27T23:49:01.511Z\"\n },\n {\n \"ip_location\": \"127.0.0.1\",\n \"scan_date\": \"2022-07-29T23:45:00.436Z\"\n }\n ]\n },\n {\n \"resource_id\": \"psc_d5a5a89da9106f8\",\n \"date_created\": \"2022-09-27T23:49:01.511Z\",\n \"number_of_scans\": 1,\n \"scans\": [\n {\n \"ip_location\": \"127.0.0.1\",\n \"scan_date\": \"2022-09-27T23:49:01.511Z\"\n }\n ]\n }\n ],\n \"object\": \"list\",\n \"count\": 2,\n \"scanned_count\": 2,\n \"total_count\": 2\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [] + } + ], + "event": [] + }, + { + "id": "a0d4028c-e29d-480d-b8b8-f9dfaf57317d", + "name": "Rate Limiting", + "description": { + "content": "To prevent misuse, we enforce a rate limit on an API Key and endpoint basis, similar to the way many other APIs enforce rate limits. By default, all accounts and their corresponding Test and Live API Keys have a rate limit of 150 requests per 5 seconds per endpoint. The `POST /v1/us_verifications` and `POST /v1/us_autocompletions` endpoints have a limit of 300 requests per 5 seconds for all accounts.\n\nWhen your application exceeds the rate limit for a given API endpoint, the Lob API will return an HTTP 429 \"Too Many Requests\" response code instead of the variety of codes you would find across the other API endpoints.\n\n**HTTP Headers**\n\nHTTP headers are returned on each request to a rate limited endpoint. Ensure that you inspect these headers during your requests as they provide relevant data on how many more requests your application is allowed to make for the endpoint you just utilized.\n\nWhile the headers are documented here in titlecase, HTTP headers are case insensitive and certain libraries may transform them to lowercase. Please inspect your headers carefully to see how they will be represented in your chosen development scenario.\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
X-Rate-Limit-Limit:the rate limit ceiling for a given request
X-Rate-Limit-Remaining:the number of requests remaining in this window
X-Rate-Limit-Reset:the time at which the rate limit window resets (in UTC epoch seconds)\n
\n\n### Example HTTP Headers\n\n```bash\n X-Rate-Limit-Limit:150\n X-Rate-Limit-Remaining:100\n X-Rate-Limit-Reset:1528749846\n```\n\n### Example Response\n\nIf you hit the rate limit on a given endpoint, this is the body of the HTTP 429 message that you will see:\n\n```javascript\n {\n \"error\": {\n \"message\": \"Rate limit exceeded. Please wait 5 seconds and try your request again.\",\n \"code\": \"rate_limit_exceeded\",\n \"status_code\": 429\n }\n }\n``` ", + "type": "text/plain" + }, + "item": [], + "event": [] + }, + { + "id": "5d536ec6-fde0-4faf-bd1c-871aad4d690d", + "name": "Requests and Responses", + "description": { + "content": "## Asset URLs\n\nAll asset URLs returned by the Lob API (postcards, letters, thumbnails,\netc) are signed links served over HTTPS. All links returned will expire in\n30 days to prevent mis-sharing. Each time a GET request is initiated, a\nnew signed URL will be generated.\n
\n\n\n## Query Parameters\n\nQuery parameters which consist of lists of strings require that all elements of\nthe list be double-quoted, as per query filter standards.\n
\n\n\n## Idempotent Requests\n\nLob supports idempotency for safely retrying `POST` requests to create\npostcards, self mailers, letters, and checks without accidentally creating\nduplicates.\n\nFor example, if a request to create a check fails due to a network error,\nyou can safely retry the same request with the same idempotency key and\nguarantee that only one check will ultimately be created and sent. When a\nrequest is sent with an idempotency key for an already created resource,\nthe response object for the existing resource will be returned.\n\nTo perform an idempotent `POST` request to one of the mailpiece product\nendpoints, provide an additional `Idempotency-Key` header or an `idempotency_key`\nquery parameter to the request. If multiple idempotency keys are provided,\nthe request will fail. How you create unique keys is up to you, but we\nsuggest using random values, such as V4 UUIDs. Idempotency keys are intended\nto prevent issues over a short periods of time, therefore keys expire after\n24 hours. Keys are unique by mode (Test vs. Live) as well as by resource\n(postcard vs. letter, etc.).\n\nBy default, all `GET` and `DELETE` requests are idempotent by nature, so\nthey do not require an additional idempotency key.\n\nFor more help integrating idempotency keys, refer to our\nimplementation guide.\n\n**Headers**\n\n \n \n \n \n \n \n
Idempotency-Key:\n optional\n

\n \n A string of no longer than 256 characters\n that uniquely identifies this resource.\n \n

\n
\n\n**Query Parameters**\n\n \n \n \n \n \n \n
idempotency-key:\n optional\n

\n \n A string of no longer than 256 characters\n that uniquely identifies this resource.\n \n

\n
\n\n### Example Request\n\n```bash\n curl https://api.lob.com/v1/postcards \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -H \"Idempotency-Key: 026e7634-24d7-486c-a0bb-4a17fd0eebc5\" \\\n -d \"to=adr_bae820679f3f536b\" \\\n -d \"from=adr_210a8d4b0b76d77b\" \\\n --data-urlencode \"front=Front HTML for {{name}}\" \\\n --data-urlencode \"back=Back HTML\" \\\n -d \"merge_variables[name]=Harry\"\n```\n
\n\n\n## Metadata\n\nWhen creating any Lob object, you can include a metadata object with up to 20 key-value pairs of\ncustom data. You can use metadata to store information like `metadata[customer_id] = \"987654\"` or\n`metadata[campaign] = \"NEWYORK2015\"`. This is especially useful for filtering and matching to internal\nsystems.\n\nEach metadata key must be less than 40 characters long and values must be less than 500 characters.\nMetadata does not support nested objects.\n\n### Example Create Request with Metadata\n\n```bash\n curl https://api.lob.com/v1/postcards \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -d \"description=Demo Postcard job\" \\\n -d \"metadata[campaign]=NEWYORK2015\" \\\n -d \"to=adr_bae820679f3f536b\" \\\n -d \"from=adr_210a8d4b0b76d77b\" \\\n --data-urlencode \"front=Front HTML for {{name}}\" \\\n --data-urlencode \"back=Back HTML\" \\\n -d \"merge_variables[name]=Harry\"\n```\n\n### Example List Request with Metadata Filter\n\n```bash\n curl -g \"https://api.lob.com/v1/postcards?metadata[campaign]=NEWYORK2015&limit=2\" \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n```\n
\n\n\n\n## Request Body\n\nWhen manually sending a POST HTTP request directly to the Lob API, without\nthe use of a library, you may represent the body as either a Form URL\nEncoded request, a JSON document, or a Multipart Form Data request.\n\nHowever, if you're using one of our [SDKs](#tag/SDKs-and-Tools),\nthe generation of the request bodies is done for you automatically and you don't\nneed to worry about the format.\n\nFor fields that are intended to accept only string values, submitting JSON objects in string format (stringified JSON objects) is not supported. \nOur system automatically parses and validates incoming data according to their expected types. \nAs a result, providing a stringified JSON object in a field designated for string input can cause parsing errors or lead to unexpected validation results.\n\n### Form URL Encoded\n\nThis request body encoding is accompanied with the\n`Content-Type: application/x-www-form-urlencoded` header. The content is an\nexample of what the [Verify a US address](index.html#operation/us_verification)\nendpoint accepts. An example of a request body encoded in this format follows.\n\n\n```javascript\n primary_line=210 King Street&city=San Francisco&state=CA&zip_code=94107\n```\n\n### JSON\n\nThis request body encoding is accompanied with the `Content-Type: application/json` header.\nThe content is an example of what the [Verify a US address endpoint](index.html#operation/us_verification)\naccepts. An example of a request body encoded in this format follows.\n\n\n```javascript\n {\n \"primary_line\": \"210 King Street\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zip_code\": \"94107\"\n }\n```\n\n### Multipart Form Data\n\nThis request body encoding is accompanied with the `Content-Type: multipart/form-data`\nheader. This is the only format that can be used for uploading a file to the API. The\ncontent is an example of what the [Create a check](index.html#operation/check_create)\nendpoint accepts. An example of a request body encoded in this format follows.\n\n\n```javascript\n --------------------------7015ebe79c0a5f8c\n Content-Disposition: form-data; name=\"description\"\n\n Demo Letter\n --------------------------7015ebe79c0a5f8c\n Content-Disposition: form-data; name=\"to\"\n\n adr_bae820679f3f536b\n --------------------------7015ebe79c0a5f8c\n Content-Disposition: form-data; name=\"from\"\n\n adr_210a8d4b0b76d77b\n --------------------------7015ebe79c0a5f8c\n Content-Disposition: form-data; name=\"file\"; filename=\"file.pdf\"\n Content-Type: application/pdf\n\n \n --------------------------7015ebe79c0a5f8c\n Content-Disposition: form-data; name=\"color\"\n\n true\n --------------------------7015ebe79c0a5f8c--\n```\n\n", + "type": "text/plain" + }, + "item": [], + "event": [] + }, + { + "id": "53b4f38c-7505-4c54-a308-04ca16bc9db4", + "name": "Reverse Geocode Lookups", + "description": { + "content": "Find a list of zip codes associated with a valid US location via latitude and longitude.
\n", + "type": "text/plain" + }, + "item": [ + { + "id": "97e6df62-dc8e-4b81-9df2-f06ed679b526", + "name": "Reverse Geocode Lookup", + "request": { + "name": "Reverse Geocode Lookup", + "description": { + "content": "Reverse geocode a valid US location with a live API key.", + "type": "text/plain" + }, + "url": { + "path": [ + "us_reverse_geocode_lookups" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "key": "size", + "value": "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." + } + ], + "variable": [] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/x-www-form-urlencoded" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "POST", + "auth": null, + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "key": "latitude", + "value": "", + "description": "(Required) A positive or negative decimal indicating the geographic latitude of the address, specifying the north-to-south position of a location. This should be input with `longitude` to pinpoint locations on a map.\n" + }, + { + "disabled": false, + "key": "longitude", + "value": "", + "description": "(Required) A positive or negative decimal indicating the geographic longitude of the address, specifying the north-to-south position of a location. This should be input with `latitude` to pinpoint locations on a map.\n" + } + ] + } + }, + "response": [ + { + "id": "bd67d084-54ad-4923-8012-b79f70f56317", + "name": "Returns a zip lookup object if a valid zip was provided.", + "originalRequest": { + "url": { + "path": [ + "us_reverse_geocode_lookups" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ { - "disabled": false, - "key": "redirect_url", - "value": "https://www.lob.com" + "key": "size", + "value": "5" + } + ], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" }, + "key": "Authorization", + "value": "Basic " + } + ], + "method": "POST", + "body": { + "mode": "urlencoded", + "urlencoded": [ { "disabled": false, - "key": "width", - "value": "2" + "description": { + "content": "(Required) A positive or negative decimal indicating the geographic latitude of the address, specifying the north-to-south position of a location. This should be input with `longitude` to pinpoint locations on a map.\n", + "type": "text/plain" + }, + "key": "latitude", + "value": "37.7749" }, { "disabled": false, - "key": "bottom", - "value": "2" - }, + "description": { + "content": "(Required) A positive or negative decimal indicating the geographic longitude of the address, specifying the north-to-south position of a location. This should be input with `latitude` to pinpoint locations on a map.\n", + "type": "text/plain" + }, + "key": "longitude", + "value": "122.4194" + } + ] + } + }, + "status": "OK", + "code": 200, + "header": [ + { + "disabled": false, + "description": "The rate limit for a given endpoint.", + "key": "ratelimit-limit", + "value": "150" + }, + { + "disabled": false, + "description": "The number of requests remaining in the current window.", + "key": "ratelimit-remaining", + "value": "100" + }, + { + "disabled": false, + "description": "The time at which the rate limit window resets in UTC epoch seconds\n", + "key": "ratelimit-reset", + "value": "1528749846" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"id\": \"us_reverse_geocode_8a013f3e\",\n \"addresses\": [\n {\n \"components\": {\n \"zip_code\": \"94107\",\n \"zip_code_plus_4\": \"1702\"\n },\n \"location_analysis\": {\n \"latitude\": 37.78271,\n \"longitude\": -122.416202,\n \"distance\": 1.32\n }\n },\n {\n \"components\": {\n \"zip_code\": \"94107\",\n \"zip_code_plus_4\": \"1702\"\n },\n \"location_analysis\": {\n \"latitude\": 37.782917,\n \"longitude\": -122.416131,\n \"distance\": 1.33\n }\n }\n ]\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "1f2c5686-2d20-4ec7-9956-c5263a703ee5", + "name": "Error", + "originalRequest": { + "url": { + "path": [ + "us_reverse_geocode_lookups" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ { - "disabled": false, - "key": "right", - "value": "2" + "key": "size", + "value": "5" + } + ], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" }, + "key": "Authorization", + "value": "Basic " + } + ], + "method": "POST", + "body": { + "mode": "urlencoded", + "urlencoded": [ { "disabled": false, - "key": "pages", - "value": "1,4" + "description": { + "content": "(Required) A positive or negative decimal indicating the geographic latitude of the address, specifying the north-to-south position of a location. This should be input with `longitude` to pinpoint locations on a map.\n", + "type": "text/plain" + }, + "key": "latitude", + "value": "37.7749" }, { "disabled": false, - "key": "fsc", - "value": "true" + "description": { + "content": "(Required) A positive or negative decimal indicating the geographic longitude of the address, specifying the north-to-south position of a location. This should be input with `latitude` to pinpoint locations on a map.\n", + "type": "text/plain" + }, + "key": "longitude", + "value": "122.4194" } ] } @@ -10125,7 +12508,7 @@ "value": "application/json" } ], - "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"to address not found\",\n \"status_code\": 404\n }\n}", + "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"latitude is required\",\n \"status_code\": 422\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } @@ -10139,46 +12522,36 @@ "event": [] }, { - "id": "8a94c454-660f-4863-94ee-53f6cfd898c8", - "name": "Manage Mail", - "description": { - "content": "## Cancellation Windows\n\nBy default, all new accounts have a 5 minute cancellation window for postcards,\nself mailers, letters, and checks. Within that timeframe, you can cancel\nmailings from production, free of charge. Once the window has passed for a\npostcard, self mailer, letter, or check, the mailing is no longer cancelable.\nIn addition, certain customers can customize their cancellation windows by\nproduct in their Dashboard Settings. Upgrade to\nthe appropriate Print & Mail Edition\nto automatically gain access to this ability. For more details on this feature,\ncheck out our Cancellation Guide.\n\nIf you schedule a postcard, self mailer, letter, or check for up to 180 days\nin the future by supplying the `send_date` parameter, that will override any\ncancellation window you may have for that product.\n
\n\n\n## Scheduled Mailings\n\nPostcards, self mailers, letters, and checks can be scheduled to be sent up\nto 180 days in advance. You can use this feature to:\n- Create automated drip campaigns (e.g. send a postcard at 15, 30, and 60\ndays)\n- Schedule recurring sends\n- Plan your mailing schedule ahead of time\n\nUp until the time a mailing is scheduled for, it can also be canceled.\nIf you use this feature in conjunction with [a cancellation window](\nindex.html#section/Cancellation-Windows), the `send_date` parameter will always\ntake precedence.\n\nFor implementation details, see documentation below for each respective\nendpoint. For more help, see our Scheduled Mailings Guide.\n\nThis feature is exclusive to certain customers. Upgrade to the appropriate\nPrint & Mail Edition to\ngain access.\n\n### Example Create Request using Send Date\n\n```bash\n curl https://api.lob.com/v1/postcards \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -d \"description=Demo Future Postcard\" \\\n -d \"to=adr_bae820679f3f536b\" \\\n -d \"from=adr_210a8d4b0b76d77b\" \\\n -d \"front=tmpl_b846a20859ae11a\" \\\n -d \"back=tmpl_01b0d396a10c268\" \\\n -d \"merge_variables[name]=Harry\" \\\n -d \"send_date=2021-07-26\"\n```\n\n", - "type": "text/plain" - }, - "item": [], - "event": [] - }, - { - "id": "b2bd40ad-d76b-4736-826e-e07e22ba8f43", - "name": "National Change of Address", + "id": "1e9db61e-adfb-49dd-81bc-2efecb2b42f0", + "name": "SDKs and Tools", "description": { - "content": "National Change of Address Linkage (NCOALink) is a service offered by the USPS, which allows individuals\nor businesses who have recently moved to have any mail forwarded from their previous address\nto their new address.\n\nAs a CASS-certified Address Verification Provider, Lob also offers NCOALink\nfunctionality to our Print & Mail customers. With the Lob NCOALink feature enabled, Postcards,\nLetters, Checks and Addresses can automatically be corrected to reflect an individual's or business's\nnew address in the case that they have moved (only if they have registered for NCOALink with the USPS).\n\nDue to privacy concerns and USPS constraints, for customers with NCOALink enabled, our API responses\nfor a limited set of endpoints differ slightly in the case when an address has been changed through NCOALink.\n\n**NOTE**: This feature is exclusive to certain customers. Upgrade to the appropriate Print & Mail Editions to gain access.\n\nFor more information, see our NCOALink guide.\n
\n\n\n## NCOALink Live Environment\nThough there are no changes to API requests, there are significant changes to our API responses, but\nonly in the event that an address has been changed through NCOALink. If an address has not been changed\nthrough NCOALink, the response would be identical to our standard responses, except the addition of a\n`recipient_moved` field, which is `false` for unchanged addresses.\n\nIf an address has been changed through NCOALink, we are required to suppress the following response\nfields for that address:\n- `address_line1`\n- `address_line2`\n- The +4 portion of the ZIP+4 (5-digit ZIP code will still be present)\n\nSee the `ncoa_us_live` example under [Response samples](#operation/address_create) within the \"Create an Address\" section in Addresses\n
\n\n\n## NCOALink Test Environment\n\nIn addition to sending live requests, you may also want to simulate what an NCOALink response might\nlook like so that you can ensure your application behaves as expected. The behavior of NCOALink in\nLob's Test Environment is very similar to our [US Verifications Test Mode](#section/US-Verifications-Test-Env).\n\nTo simulate an NCOALink request, send a POST request to any of the four endpoints below with an `address_line1` field equal to `NCOA`:\n- `POST /v1/addresses`\n- `POST /v1/checks`\n- `POST /v1/letters`\n- `POST /v1/postcards`\n- `POST /v1/self_mailers`\n\nA static address will always be returned, as documented in the `ncoa_us_test` example under [Response samples](#operation/address_create) within the \"Create an Address\"\nsection in Addresses (along with the corresponding request under \"Request samples\").\n\n", + "content": "Please visit our Github for a list of our supported libraries.\n- Typescript\n- PHP\n- Python\n- Java\n- Ruby\n- CSharp\n- Elixir\n- Go\n- Node.js (legacy)\n- Java (legacy)\n- PHP (legacy)\n- Python (Legacy)\n- Ruby (Legacy)\n\n

\n\n", "type": "text/plain" }, "item": [], "event": [] }, { - "id": "1aa87e7e-973b-46c2-85bf-465f8d7e9d16", - "name": "Postcards", + "id": "f58e1534-7f23-467f-875f-7ff2e12810a7", + "name": "Self Mailers", "description": { - "content": "The postcards endpoint allows you to easily print and mail postcards. The API provides endpoints for creating postcards,\nretrieving individual postcards, canceling postcards, and retrieving a list of postcards.\n\n", + "content": "The self mailer endpoint allows you to easily print and mail self mailers. The API provides endpoints\nfor creating self mailers, retrieving individual self mailers, canceling self mailers, and retrieving a list of self mailers.\n\n", "type": "text/plain" }, "item": [ { - "id": "165384b1-cb0a-404f-8cb3-a52addd5a5fd", + "id": "2c6bae7c-04f8-4b0e-a630-e443ef7bf574", "name": "Retrieve", "request": { "name": "Retrieve", "description": { - "content": "Retrieves the details of an existing postcard. You need only supply the unique customer identifier that was returned upon postcard creation.", + "content": "Retrieves the details of an existing self_mailer. You need only supply the unique self_mailer identifier that was returned upon self_mailer creation.", "type": "text/plain" }, "url": { "path": [ - "postcards", - ":psc_id" + "self_mailers", + ":sfm_id" ], "host": [ "{{baseUrl}}" @@ -10189,8 +12562,8 @@ "disabled": false, "type": "any", "value": "", - "key": "psc_id", - "description": "(Required) id of the postcard" + "key": "sfm_id", + "description": "(Required) id of the self_mailer" } ] }, @@ -10205,13 +12578,13 @@ }, "response": [ { - "id": "186b753d-0566-4a6b-b333-2e44e08aa611", - "name": "Returns a postcard object", + "id": "c1e033b9-1512-404f-af48-b098e0f4c323", + "name": "Returns a self_mailer object", "originalRequest": { "url": { "path": [ - "postcards", - ":psc_id" + "self_mailers", + ":sfm_id" ], "host": [ "{{baseUrl}}" @@ -10222,8 +12595,8 @@ "disabled": false, "type": "any", "value": "", - "key": "psc_id", - "description": "(Required) id of the postcard" + "key": "sfm_id", + "description": "(Required) id of the self_mailer" } ] }, @@ -10248,18 +12621,18 @@ "value": "application/json" } ], - "body": "{\n \"id\": \"psc_208e45e48d271294\",\n \"description\": null,\n \"metadata\": {},\n \"to\": {\n \"id\": \"adr_210a8d4b0b76d77b\",\n \"description\": null,\n \"name\": null,\n \"company\": \"LOB\",\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2018-12-08T03:01:07.651Z\",\n \"date_modified\": \"2018-12-08T03:01:07.651Z\",\n \"object\": \"address\"\n },\n \"url\": \"https://lob-assets.com/postcards/psc_208e45e48d271294.pdf?version=v1&expires=1619218302&signature=NfHHLBSr5tOHA_Z4kij4dKqZG8f3vMDtwvuFVeeF9pV_lylcjLsVVODhNCE5hR6-2slUr6t9WMNsi429Pj7_DA\",\n \"carrier\": \"USPS\",\n \"front_template_id\": null,\n \"back_template_id\": null,\n \"date_created\": \"2021-03-24T22:51:42.838Z\",\n \"date_modified\": \"2021-03-24T22:51:42.838Z\",\n \"send_date\": \"2021-03-24T22:51:42.838Z\",\n \"use_type\": \"marketing\",\n \"fsc\": false,\n \"object\": \"postcard\"\n}", + "body": "{\n \"id\": \"sfm_8ffbe811dea49dcf\",\n \"description\": \"April Campaign\",\n \"metadata\": {},\n \"to\": {\n \"id\": \"adr_bae820679f3f536b\",\n \"description\": null,\n \"name\": \"HARRY ZHANG\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2017-09-05T17:47:53.767Z\",\n \"date_modified\": \"2017-09-05T17:47:53.767Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"from\": {\n \"id\": \"adr_210a8d4b0b76d77b\",\n \"description\": null,\n \"name\": \"LEORE AVIDAR\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2017-09-05T17:47:53.767Z\",\n \"date_modified\": \"2017-09-05T17:47:53.767Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"url\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA\",\n \"outside_template_id\": \"tmpl_a3cb937f26d7eec\",\n \"inside_template_id\": \"tmpl_a3cb937f26d7eec\",\n \"inside_template_version_id\": \"vrsn_bfdf70893b00a85\",\n \"outside_template_version_id\": \"vrsn_bfdf70893b00a85\",\n \"carrier\": \"USPS\",\n \"tracking_events\": [],\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA\",\n \"medium\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_1.png?version=v1&expires=1618512040&signature=ryxN7bsXGtw_GRFSP3Cs3A3IYjxZi3cW9BHDCNgMt6p3nobVmsc_iFHt2e-S7ndAXhhN7nP-MQVov3bt3r37BQ\",\n \"large\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg\"\n },\n {\n \"small\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_2.png?version=v1&expires=1618512040&signature=3gTgU7Fd3KoT_vNlQnTGptRps5ZgnkhSnPrAwk7L98higIzSwfKoLvuu_DIpMM48dHbxckKT9waR8euJ4KSDBQ\",\n \"medium\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_2.png?version=v1&expires=1618512040&signature=Ue1lw5CMj7KRx6cMQL8xPeazaHCdJzWcACd1w3acuYPnWkVIpSt62OIO7hAtpAQK9xm1dhhlFj0rqRZMdRMMBA\",\n \"large\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_2.png?version=v1&expires=1618512040&signature=cICc7HEm1xG_eyM4a_wtvPk2FqoLRmtgGa29kJisWnMIYBL0OkyzG4ZCYGMhp-5cZpJlSpXfTgGKh_Qmeo1TDw\"\n }\n ],\n \"merge_variables\": {\n \"name\": null\n },\n \"size\": \"6x18_bifold\",\n \"mail_type\": \"usps_first_class\",\n \"expected_delivery_date\": \"2021-03-24\",\n \"date_created\": \"2021-03-16T18:40:40.504Z\",\n \"date_modified\": \"2021-03-16T18:40:40.504Z\",\n \"send_date\": \"2021-03-16T18:45:40.493Z\",\n \"use_type\": \"marketing\",\n \"fsc\": false,\n \"object\": \"self_mailer\"\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "e638b850-ee09-493d-933e-00b23fb40b3c", + "id": "faa1ef8d-2b65-48be-b9cb-27a41272a1a3", "name": "Error", "originalRequest": { "url": { "path": [ - "postcards", - ":psc_id" + "self_mailers", + ":sfm_id" ], "host": [ "{{baseUrl}}" @@ -10270,8 +12643,8 @@ "disabled": false, "type": "any", "value": "", - "key": "psc_id", - "description": "(Required) id of the postcard" + "key": "sfm_id", + "description": "(Required) id of the self_mailer" } ] }, @@ -10304,18 +12677,18 @@ "event": [] }, { - "id": "0142da39-e077-4aa2-9d2f-c427c259f189", - "name": "Cancel", + "id": "508f01c1-12e6-4f33-b788-dd4f0024baba", + "name": "Delete", "request": { - "name": "Cancel", + "name": "Delete", "description": { - "content": "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.", + "content": "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.", "type": "text/plain" }, "url": { "path": [ - "postcards", - ":psc_id" + "self_mailers", + ":sfm_id" ], "host": [ "{{baseUrl}}" @@ -10326,8 +12699,8 @@ "disabled": false, "type": "any", "value": "", - "key": "psc_id", - "description": "(Required) id of the postcard" + "key": "sfm_id", + "description": "(Required) id of the self_mailer" } ] }, @@ -10342,13 +12715,13 @@ }, "response": [ { - "id": "6a390fb1-61e1-401c-ab4f-cf97f4c83ac5", + "id": "cb847bff-af2a-4bcc-a0f3-704e0f1e9aef", "name": "Deleted", "originalRequest": { "url": { "path": [ - "postcards", - ":psc_id" + "self_mailers", + ":sfm_id" ], "host": [ "{{baseUrl}}" @@ -10359,8 +12732,8 @@ "disabled": false, "type": "any", "value": "", - "key": "psc_id", - "description": "(Required) id of the postcard" + "key": "sfm_id", + "description": "(Required) id of the self_mailer" } ] }, @@ -10385,18 +12758,18 @@ "value": "application/json" } ], - "body": "{\n \"id\": \"psc_123456789\",\n \"deleted\": true\n}", + "body": "{\n \"id\": \"sfm_123456789\",\n \"deleted\": true\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "94d01557-de7b-4f69-92c8-941cbe610275", + "id": "68472a85-484b-47e9-9cfc-7910b8c42f2b", "name": "Error", "originalRequest": { "url": { "path": [ - "postcards", - ":psc_id" + "self_mailers", + ":sfm_id" ], "host": [ "{{baseUrl}}" @@ -10407,8 +12780,8 @@ "disabled": false, "type": "any", "value": "", - "key": "psc_id", - "description": "(Required) id of the postcard" + "key": "sfm_id", + "description": "(Required) id of the self_mailer" } ] }, @@ -10441,17 +12814,17 @@ "event": [] }, { - "id": "d936b464-a6dc-45c2-8b9b-e3a3cee5e235", + "id": "69e2e07b-0f64-457b-8b0f-f0641f563aab", "name": "List", "request": { "name": "List", "description": { - "content": "Returns a list of your postcards. The addresses are returned sorted by creation date, with the most recently created addresses appearing first.", + "content": "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.", "type": "text/plain" }, "url": { "path": [ - "postcards" + "self_mailers" ], "host": [ "{{baseUrl}}" @@ -10489,45 +12862,21 @@ }, { "disabled": false, - "key": "date_created[elit_5_]", - "value": "", - "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 ≤." - }, - { - "disabled": false, - "key": "date_created[Ut3b0]", - "value": "", - "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 ≤." - }, - { - "disabled": false, - "key": "date_created[eu_f5]", + "key": "date_created[ut_ad]", "value": "", "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 ≤." }, - { - "disabled": false, - "key": "campaign_id", - "value": "", - "description": "Filters resources created by the provided campaign id, prefixed with `cmp_`." - }, - { - "disabled": false, - "key": "status", - "value": "", - "description": "A string describing the render status:\n* `processed` - the rendering process is currently underway.\n* `rendered` - the rendering process has completed successfully.\n* `failed` - the rendering process has failed.\n" - }, { "disabled": false, "key": "size", - "value": "4x6", - "description": "Specifies the size of the postcard. Only `4x6` postcards can be sent to international destinations." + "value": "6x18_bifold", + "description": "The self mailer sizes to be returned." }, { "disabled": false, "key": "size", - "value": "4x6", - "description": "Specifies the size of the postcard. Only `4x6` postcards can be sent to international destinations." + "value": "6x18_bifold", + "description": "The self mailer sizes to be returned." }, { "disabled": false, @@ -10552,6 +12901,18 @@ "key": "send_date", "value": "", "description": "Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both.\n" + }, + { + "disabled": false, + "key": "campaign_id", + "value": "", + "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_`." + }, + { + "disabled": false, + "key": "status", + "value": "", + "description": "A string describing the render status:\n* `processed` - the rendering process is currently underway.\n* `rendered` - the rendering process has completed successfully.\n* `failed` - the rendering process has failed.\n" } ], "variable": [] @@ -10567,12 +12928,12 @@ }, "response": [ { - "id": "3732066c-2ef2-4269-b83f-e852bf1741e0", - "name": "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.", + "id": "25584663-61db-4a3d-b60e-11b2b3adb6ba", + "name": "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.", "originalRequest": { "url": { "path": [ - "postcards" + "self_mailers" ], "host": [ "{{baseUrl}}" @@ -10599,28 +12960,20 @@ "value": "" }, { - "key": "date_created[do_7c]", - "value": "" - }, - { - "key": "date_created[velit_c]", - "value": "" - }, - { - "key": "campaign_id", + "key": "date_created[dolore09b]", "value": "" }, { - "key": "status", + "key": "date_created[ind8]", "value": "" }, { "key": "size", - "value": "4x6" + "value": "6x18_bifold" }, { "key": "size", - "value": "4x6" + "value": "6x18_bifold" }, { "key": "scheduled", @@ -10637,6 +12990,14 @@ { "key": "send_date", "value": "" + }, + { + "key": "campaign_id", + "value": "" + }, + { + "key": "status", + "value": "" } ], "variable": [] @@ -10662,17 +13023,17 @@ "value": "application/json" } ], - "body": "{\n \"data\": [\n {\n \"id\": \"psc_208e45e48d271294\",\n \"description\": null,\n \"metadata\": {},\n \"to\": {\n \"id\": \"adr_210a8d4b0b76d77b\",\n \"description\": null,\n \"name\": \"LEORE AVIDAR\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2018-12-08T03:01:07.651Z\",\n \"date_modified\": \"2018-12-08T03:01:07.651Z\",\n \"object\": \"address\"\n },\n \"url\": \"https://lob-assets.com/postcards/psc_208e45e48d271294.pdf?version=v1&expires=1619218302&signature=NfHHLBSr5tOHA_Z4kij4dKqZG8f3vMDtwvuFVeeF9pV_lylcjLsVVODhNCE5hR6-2slUr6t9WMNsi429Pj7_DA\",\n \"carrier\": \"USPS\",\n \"front_template_id\": null,\n \"back_template_id\": null,\n \"front_template_version_id\": null,\n \"back_template_version_id\": null,\n \"date_created\": \"2021-03-24T22:51:42.838Z\",\n \"date_modified\": \"2021-03-24T22:51:42.838Z\",\n \"send_date\": \"2021-03-24T22:51:42.838Z\",\n \"use_type\": \"marketing\",\n \"fsc\": false,\n \"object\": \"postcard\"\n },\n {\n \"id\": \"psc_0e03d1ad7d31f151\",\n \"description\": null,\n \"metadata\": {},\n \"to\": {\n \"id\": \"adr_c7cb63d68f8d6\",\n \"description\": null,\n \"name\": \"JANE DOE\",\n \"company\": \"LOB\",\n \"phone\": \"5555555555\",\n \"email\": \"jane.doe@lob.com\",\n \"address_line1\": \"370 WATER ST\",\n \"address_line2\": \"\",\n \"address_city\": \"SUMMERSIDE\",\n \"address_state\": \"PE\",\n \"address_zip\": \"C1N 1C4\",\n \"address_country\": \"CANADA\",\n \"metadata\": {},\n \"date_created\": \"2018-12-08T03:01:07.651Z\",\n \"date_modified\": \"2018-12-08T03:01:07.651Z\",\n \"object\": \"address\",\n \"recipient_moved\": false\n },\n \"from\": {\n \"id\": \"adr_210a8d4b0b76d77b\",\n \"description\": null,\n \"name\": \"LEORE AVIDAR\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2018-12-08T03:01:07.651Z\",\n \"date_modified\": \"2018-12-08T03:01:07.651Z\",\n \"object\": \"address\"\n },\n \"url\": \"https://lob-assets.com/postcards/psc_208e45e48d271294.pdf?version=v1&expires=1619218302&signature=NfHHLBSr5tOHA_Z4kij4dKqZG8f3vMDtwvuFVeeF9pV_lylcjLsVVODhNCE5hR6-2slUr6t9WMNsi429Pj7_DA\",\n \"carrier\": \"USPS\",\n \"front_template_id\": null,\n \"back_template_id\": null,\n \"front_template_version_id\": null,\n \"back_template_version_id\": null,\n \"tracking_events\": [],\n \"size\": \"6x11\",\n \"mail_type\": \"usps_first_class\",\n \"merge_variables\": {},\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_small_1.png?expires=1540372221&signature=a5fRBJ22ZA78Vgpg34M9UfmHWTS3eha\",\n \"medium\": \"https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_medium_1.png?expires=1540372221&signature=bAzL8sv935PY09FWSkpDpWKkyvGSWYF\",\n \"large\": \"https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_large_1.png?expires=1540372221&signature=gsKvxXgrm4v4iZD3bOibK7jApNkEMdW\"\n }\n ],\n \"expected_delivery_date\": \"2021-03-30\",\n \"date_created\": \"2021-03-24T22:51:42.838Z\",\n \"date_modified\": \"2021-03-24T22:51:42.838Z\",\n \"send_date\": \"2021-03-24T22:51:42.838Z\",\n \"use_type\": \"marketing\",\n \"fsc\": false,\n \"object\": \"postcard\"\n }\n ],\n \"object\": \"list\",\n \"previous_url\": null,\n \"next_url\": null,\n \"count\": 2\n}", + "body": "{\n \"data\": [\n {\n \"id\": \"sfm_7239rhwqkrfaskas\",\n \"description\": \"April Campaign\",\n \"metadata\": {},\n \"to\": {\n \"id\": \"adr_asdi2y3riuasasoi\",\n \"description\": \"Harry - Office\",\n \"name\": \"Harry Zhang\",\n \"company\": \"Lob\",\n \"phone\": \"5555555555\",\n \"email\": \"harry@lob.com\",\n \"metadata\": {},\n \"address_line1\": \"370 WATER ST\",\n \"address_line2\": \"\",\n \"address_city\": \"SUMMERSIDE\",\n \"address_state\": \"PRINCE EDWARD ISLAND\",\n \"address_zip\": \"C1N 1C4\",\n \"address_country\": \"CANADA\",\n \"recipient_moved\": false,\n \"date_created\": \"2019-09-20T00:14:00.361Z\",\n \"date_modified\": \"2019-09-20T00:14:00.361Z\",\n \"object\": \"address\"\n },\n \"from\": {\n \"id\": \"adr_210a8d4b0b76d77b\",\n \"description\": null,\n \"name\": null,\n \"company\": \"LOB\",\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2018-12-08T03:01:07.651Z\",\n \"date_modified\": \"2018-12-08T03:01:07.651Z\",\n \"object\": \"address\"\n },\n \"url\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf.pdf?version=v1&expires=1618781264&signature=YP_bCwrgVA2lz1Gr1YVCJN1f-WspUGsH0aJp2ihjfLXU7lDUV12_xRv4uPch0mfWeOOxEqpyP8hGpgvjmQKNAw\",\n \"outside_template_id\": \"tmpl_a3cb937f26d7eec\",\n \"inside_template_id\": \"tmpl_a3cb937f26d7eec\",\n \"inside_template_version_id\": \"vrsn_bfdf70893b00a85\",\n \"outside_template_version_id\": \"vrsn_bfdf70893b00a85\",\n \"carrier\": \"USPS\",\n \"tracking_events\": [],\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_1.png?version=v1&expires=1618781264&signature=A7q5HbRO53sUYYnwGlmP5mTS6ylLE7kS2mYhfcEOdexjyqG7UseK0MD26DppE4Q0aE4u2msDVMxd5ukjMerYCg\",\n \"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\",\n \"large\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_1.png?version=v1&expires=1618781264&signature=g2jifhCselPqIj8au6lsbJMNFN8ZX3aM6GkLoAXiHBCS8X5mF9nhVbmO0odpnmwNlV1CWIp-MXVsZkC3NmxqBQ\"\n },\n {\n \"small\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_2.png?version=v1&expires=1618781264&signature=biJY4-ZbNNRydPYg3cZkq7wxjILbPBK_nIVyoyQsg5X5q4jlsa-2fzeMa48V9jprUetsC6WEuYvasHosRfG_DQ\",\n \"medium\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_2.png?version=v1&expires=1618781264&signature=xEAX7bURyc8fSphacuo5yb7iVIpT8Xvq05KgMaNQS4r3aCpx0z1p42wbPmW758B5Ae0li1YDYvVyzS7qJIoWAw\",\n \"large\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_2.png?version=v1&expires=1618781264&signature=NieHDnoQ7STZUvofHrFt7S987CzIkUJWpaSgpVQPZw-C3_wwTPsIrvxYdXEuFrr6ciTUcxRBFPlE0lurmMkyCA\"\n }\n ],\n \"merge_variables\": {\n \"name\": null\n },\n \"size\": \"6x18_bifold\",\n \"mail_type\": \"usps_first_class\",\n \"expected_delivery_date\": \"2021-03-24\",\n \"date_created\": \"2021-03-16T18:40:40.504Z\",\n \"date_modified\": \"2021-03-16T18:41:06.691Z\",\n \"send_date\": \"2021-03-16T18:45:40.493Z\",\n \"deleted\": true,\n \"use_type\": \"marketing\",\n \"fsc\": false,\n \"object\": \"self_mailer\"\n },\n {\n \"id\": \"sfm_8ffbe811dea49dcf\",\n \"description\": \"April Campaign\",\n \"metadata\": {},\n \"to\": {\n \"id\": \"adr_f9228b743884ff98\",\n \"description\": null,\n \"name\": \"AYA\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"2812 PARK RD\",\n \"address_line2\": null,\n \"address_city\": \"CHARLOTTE\",\n \"address_state\": \"NC\",\n \"address_zip\": \"28209-1314\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2021-03-16T18:40:40.410Z\",\n \"date_modified\": \"2021-03-16T18:40:40.410Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"from\": {\n \"id\": \"adr_210a8d4b0b76d77b\",\n \"description\": null,\n \"name\": null,\n \"company\": \"LOB\",\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2018-12-08T03:01:07.651Z\",\n \"date_modified\": \"2018-12-08T03:01:07.651Z\",\n \"object\": \"address\"\n },\n \"url\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf.pdf?version=v1&expires=1618781264&signature=YP_bCwrgVA2lz1Gr1YVCJN1f-WspUGsH0aJp2ihjfLXU7lDUV12_xRv4uPch0mfWeOOxEqpyP8hGpgvjmQKNAw\",\n \"outside_template_id\": \"tmpl_a3cb937f26d7eec\",\n \"inside_template_id\": \"tmpl_a3cb937f26d7eec\",\n \"inside_template_version_id\": \"vrsn_bfdf70893b00a85\",\n \"outside_template_version_id\": \"vrsn_bfdf70893b00a85\",\n \"carrier\": \"USPS\",\n \"tracking_events\": [],\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_1.png?version=v1&expires=1618781264&signature=A7q5HbRO53sUYYnwGlmP5mTS6ylLE7kS2mYhfcEOdexjyqG7UseK0MD26DppE4Q0aE4u2msDVMxd5ukjMerYCg\",\n \"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\",\n \"large\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_1.png?version=v1&expires=1618781264&signature=g2jifhCselPqIj8au6lsbJMNFN8ZX3aM6GkLoAXiHBCS8X5mF9nhVbmO0odpnmwNlV1CWIp-MXVsZkC3NmxqBQ\"\n },\n {\n \"small\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_2.png?version=v1&expires=1618781264&signature=biJY4-ZbNNRydPYg3cZkq7wxjILbPBK_nIVyoyQsg5X5q4jlsa-2fzeMa48V9jprUetsC6WEuYvasHosRfG_DQ\",\n \"medium\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_2.png?version=v1&expires=1618781264&signature=xEAX7bURyc8fSphacuo5yb7iVIpT8Xvq05KgMaNQS4r3aCpx0z1p42wbPmW758B5Ae0li1YDYvVyzS7qJIoWAw\",\n \"large\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_2.png?version=v1&expires=1618781264&signature=NieHDnoQ7STZUvofHrFt7S987CzIkUJWpaSgpVQPZw-C3_wwTPsIrvxYdXEuFrr6ciTUcxRBFPlE0lurmMkyCA\"\n }\n ],\n \"merge_variables\": {\n \"name\": null\n },\n \"size\": \"6x18_bifold\",\n \"mail_type\": \"usps_first_class\",\n \"expected_delivery_date\": \"2021-03-24\",\n \"date_created\": \"2021-03-16T18:40:40.504Z\",\n \"date_modified\": \"2021-03-16T18:41:06.691Z\",\n \"send_date\": \"2021-03-16T18:45:40.493Z\",\n \"deleted\": true,\n \"use_type\": \"marketing\",\n \"fsc\": true,\n \"object\": \"self_mailer\"\n }\n ],\n \"object\": \"list\",\n \"next_url\": null,\n \"previous_url\": null,\n \"count\": 2\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "0e1c9f2c-1488-42df-9d67-73668b5a1d7f", + "id": "a113b952-b075-4bf3-8944-0b97bb2307cf", "name": "Error", "originalRequest": { "url": { "path": [ - "postcards" + "self_mailers" ], "host": [ "{{baseUrl}}" @@ -10699,28 +13060,20 @@ "value": "" }, { - "key": "date_created[do_7c]", - "value": "" - }, - { - "key": "date_created[velit_c]", - "value": "" - }, - { - "key": "campaign_id", + "key": "date_created[dolore09b]", "value": "" }, { - "key": "status", + "key": "date_created[ind8]", "value": "" }, { "key": "size", - "value": "4x6" + "value": "6x18_bifold" }, { "key": "size", - "value": "4x6" + "value": "6x18_bifold" }, { "key": "scheduled", @@ -10737,6 +13090,14 @@ { "key": "send_date", "value": "" + }, + { + "key": "campaign_id", + "value": "" + }, + { + "key": "status", + "value": "" } ], "variable": [] @@ -10770,17 +13131,17 @@ "event": [] }, { - "id": "64d56f6b-273d-49d4-8216-dfb12184b771", + "id": "5a229ac2-5a6e-4f90-ada2-75ca549c1a4f", "name": "Create", "request": { "name": "Create", "description": { - "content": "Creates a new postcard given information", + "content": "Creates a new self_mailer given information", "type": "text/plain" }, "url": { "path": [ - "postcards" + "self_mailers" ], "host": [ "{{baseUrl}}" @@ -10818,18 +13179,18 @@ "urlencoded": [ { "disabled": false, - "key": "to[value]", + "key": "value", "value": "" }, { "disabled": false, - "key": "value", - "value": "" + "key": "inside", + "value": "" }, { "disabled": false, - "key": "value", - "value": "" + "key": "outside", + "value": "" }, { "disabled": false, @@ -10868,247 +13229,157 @@ }, { "disabled": false, - "key": "from[value]", + "key": "value", "value": "" }, { "disabled": false, "key": "billing_group_id", - "value": "" - }, - { - "disabled": false, - "key": "position", - "value": "" - }, - { - "disabled": false, - "key": "redirect_url", - "value": "" - }, - { - "disabled": false, - "key": "width", - "value": "" - }, - { - "disabled": false, - "key": "top", - "value": "" - }, - { - "disabled": false, - "key": "right", - "value": "" - }, - { - "disabled": false, - "key": "left", - "value": "" - }, - { - "disabled": false, - "key": "bottom", - "value": "" - }, - { - "disabled": false, - "key": "pages", - "value": "" - }, - { - "disabled": false, - "key": "fsc", - "value": "false" - } - ] - } - }, - "response": [ - { - "id": "09cc377b-c462-4b1e-af82-59d4aaa27cf5", - "name": "Returns a postcard object", - "originalRequest": { - "url": { - "path": [ - "postcards" - ], - "host": [ - "{{baseUrl}}" - ], - "query": [ - { - "key": "idempotency_key", - "value": "026e7634-24d7-486c-a0bb-4a17fd0eebc5" - } - ], - "variable": [] - }, - "header": [ - { - "description": { - "content": "Added as a part of security scheme: basic", - "type": "text/plain" - }, - "key": "Authorization", - "value": "Basic " - }, - { - "disabled": 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.\n", - "key": "Idempotency-Key", - "value": "026e7634-24d7-486c-a0bb-4a17fd0eebc5" - } - ], - "method": "POST", - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "key": "description", - "value": "demo" - }, - { - "disabled": false, - "key": "to[description]", - "value": "Harry - Office" - }, - { - "disabled": false, - "key": "to[name]", - "value": "Harry Zhang" - }, - { - "disabled": false, - "key": "to[company]", - "value": "Lob" - }, - { - "disabled": false, - "key": "to[email]", - "value": "harry@lob.com" - }, - { - "disabled": false, - "key": "to[phone]", - "value": "5555555555" - }, - { - "disabled": false, - "key": "to[address_line1]", - "value": "210 King St" - }, - { - "disabled": false, - "key": "to[address_line2]", - "value": "# 6100" - }, - { - "disabled": false, - "key": "to[address_city]", - "value": "San Francisco" - }, - { - "disabled": false, - "key": "to[address_state]", - "value": "CA" - }, - { - "disabled": false, - "key": "to[address_zip]", - "value": "94107" - }, - { - "disabled": false, - "key": "to[address_country]", - "value": "US" - }, - { - "disabled": false, - "key": "from[description]", - "value": "Harry - Office" - }, - { - "disabled": false, - "key": "from[name]", - "value": "Harry Zhang" - }, - { - "disabled": false, - "key": "from[company]", - "value": "Lob" - }, - { - "disabled": false, - "key": "from[email]", - "value": "harry@lob.com" - }, - { - "disabled": false, - "key": "from[phone]", - "value": "5555555555" - }, - { - "disabled": false, - "key": "from[address_line1]", - "value": "210 King St" - }, + "value": "" + }, + { + "disabled": false, + "key": "position", + "value": "" + }, + { + "disabled": false, + "key": "redirect_url", + "value": "" + }, + { + "disabled": false, + "key": "width", + "value": "" + }, + { + "disabled": false, + "key": "top", + "value": "" + }, + { + "disabled": false, + "key": "right", + "value": "" + }, + { + "disabled": false, + "key": "left", + "value": "" + }, + { + "disabled": false, + "key": "bottom", + "value": "" + }, + { + "disabled": false, + "key": "pages", + "value": "" + }, + { + "disabled": false, + "key": "logo", + "value": "{\"url\":{\"value\":\"\"}}" + }, + { + "disabled": false, + "key": "style", + "value": "{\"background_color\":{\"value\":\"\"},\"foreground_color\":{\"value\":\"\"}}" + }, + { + "disabled": false, + "key": "fsc", + "value": "false" + } + ] + } + }, + "response": [ + { + "id": "78780491-d78a-4022-89b5-4ebba3b7f976", + "name": "Returns a self_mailer object", + "originalRequest": { + "url": { + "path": [ + "self_mailers" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ { - "disabled": false, - "key": "from[address_line2]", - "value": "# 6100" + "key": "idempotency_key", + "value": "026e7634-24d7-486c-a0bb-4a17fd0eebc5" + } + ], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" }, + "key": "Authorization", + "value": "Basic " + }, + { + "disabled": 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.\n", + "key": "Idempotency-Key", + "value": "026e7634-24d7-486c-a0bb-4a17fd0eebc5" + } + ], + "method": "POST", + "body": { + "mode": "urlencoded", + "urlencoded": [ { "disabled": false, - "key": "from[address_city]", - "value": "San Francisco" + "key": "description", + "value": "Demo Self Mailer job" }, { "disabled": false, - "key": "from[address_state]", - "value": "CA" + "key": "to", + "value": "adr_bae820679f3f536b" }, { "disabled": false, - "key": "from[address_zip]", - "value": "94107" + "key": "from", + "value": "adr_210a8d4b0b76d77b" }, { "disabled": false, - "key": "from[address_country]", - "value": "US" + "key": "inside", + "value": "https://lob.com/selfmailerinside.pdf" }, { "disabled": false, - "key": "front", - "value": "tmpl_c94e83ca2cd5121" + "key": "outside", + "value": "https://lob.com/selfmaileroutside.pdf" }, { "disabled": false, - "key": "back", - "value": "tmpl_c94e83ca2cd5121" + "key": "size", + "value": "12x9_bifold" }, { "disabled": false, - "key": "size", - "value": "6x9" + "key": "metadata[spiffy]", + "value": "true" }, { "disabled": false, "key": "mail_type", - "value": "usps_first_class" + "value": "usps_standard" }, { "disabled": false, "key": "merge_variables[name]", "value": "Harry" }, - { - "disabled": false, - "key": "metadata[spiffy]", - "value": "true" - }, { "disabled": false, "key": "send_date", @@ -11136,7 +13407,7 @@ }, { "disabled": false, - "key": "bottom", + "key": "top", "value": "2.5" }, { @@ -11147,7 +13418,7 @@ { "disabled": false, "key": "pages", - "value": "back" + "value": "inside,outside" }, { "disabled": false, @@ -11183,194 +13454,94 @@ "value": "application/json" } ], - "body": "{\n \"id\": \"psc_208e45e48d271294\",\n \"description\": null,\n \"metadata\": {},\n \"to\": {\n \"id\": \"adr_210a8d4b0b76d77b\",\n \"description\": null,\n \"name\": null,\n \"company\": \"LOB\",\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2018-12-08T03:01:07.651Z\",\n \"date_modified\": \"2018-12-08T03:01:07.651Z\",\n \"object\": \"address\"\n },\n \"url\": \"https://lob-assets.com/postcards/psc_208e45e48d271294.pdf?version=v1&expires=1619218302&signature=NfHHLBSr5tOHA_Z4kij4dKqZG8f3vMDtwvuFVeeF9pV_lylcjLsVVODhNCE5hR6-2slUr6t9WMNsi429Pj7_DA\",\n \"carrier\": \"USPS\",\n \"front_template_id\": null,\n \"back_template_id\": null,\n \"date_created\": \"2021-03-24T22:51:42.838Z\",\n \"date_modified\": \"2021-03-24T22:51:42.838Z\",\n \"send_date\": \"2021-03-24T22:51:42.838Z\",\n \"use_type\": \"marketing\",\n \"fsc\": false,\n \"object\": \"postcard\"\n}", + "body": "{\n \"id\": \"sfm_8ffbe811dea49dcf\",\n \"description\": \"April Campaign\",\n \"metadata\": {},\n \"to\": {\n \"id\": \"adr_bae820679f3f536b\",\n \"description\": null,\n \"name\": \"HARRY ZHANG\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2017-09-05T17:47:53.767Z\",\n \"date_modified\": \"2017-09-05T17:47:53.767Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"from\": {\n \"id\": \"adr_210a8d4b0b76d77b\",\n \"description\": null,\n \"name\": \"LEORE AVIDAR\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2017-09-05T17:47:53.767Z\",\n \"date_modified\": \"2017-09-05T17:47:53.767Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"url\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA\",\n \"outside_template_id\": \"tmpl_a3cb937f26d7eec\",\n \"inside_template_id\": \"tmpl_a3cb937f26d7eec\",\n \"inside_template_version_id\": \"vrsn_bfdf70893b00a85\",\n \"outside_template_version_id\": \"vrsn_bfdf70893b00a85\",\n \"carrier\": \"USPS\",\n \"tracking_events\": [],\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA\",\n \"medium\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_1.png?version=v1&expires=1618512040&signature=ryxN7bsXGtw_GRFSP3Cs3A3IYjxZi3cW9BHDCNgMt6p3nobVmsc_iFHt2e-S7ndAXhhN7nP-MQVov3bt3r37BQ\",\n \"large\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg\"\n },\n {\n \"small\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_2.png?version=v1&expires=1618512040&signature=3gTgU7Fd3KoT_vNlQnTGptRps5ZgnkhSnPrAwk7L98higIzSwfKoLvuu_DIpMM48dHbxckKT9waR8euJ4KSDBQ\",\n \"medium\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_2.png?version=v1&expires=1618512040&signature=Ue1lw5CMj7KRx6cMQL8xPeazaHCdJzWcACd1w3acuYPnWkVIpSt62OIO7hAtpAQK9xm1dhhlFj0rqRZMdRMMBA\",\n \"large\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_2.png?version=v1&expires=1618512040&signature=cICc7HEm1xG_eyM4a_wtvPk2FqoLRmtgGa29kJisWnMIYBL0OkyzG4ZCYGMhp-5cZpJlSpXfTgGKh_Qmeo1TDw\"\n }\n ],\n \"merge_variables\": {\n \"name\": null\n },\n \"size\": \"6x18_bifold\",\n \"mail_type\": \"usps_first_class\",\n \"expected_delivery_date\": \"2021-03-24\",\n \"date_created\": \"2021-03-16T18:40:40.504Z\",\n \"date_modified\": \"2021-03-16T18:40:40.504Z\",\n \"send_date\": \"2021-03-16T18:45:40.493Z\",\n \"use_type\": \"marketing\",\n \"fsc\": false,\n \"object\": \"self_mailer\"\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "dfae50f0-0151-4234-93e2-a6bb736de813", + "id": "fb7912c1-f844-4f21-a20d-d7e5b0769315", "name": "Error", "originalRequest": { "url": { - "path": [ - "postcards" - ], - "host": [ - "{{baseUrl}}" - ], - "query": [ - { - "key": "idempotency_key", - "value": "026e7634-24d7-486c-a0bb-4a17fd0eebc5" - } - ], - "variable": [] - }, - "header": [ - { - "description": { - "content": "Added as a part of security scheme: basic", - "type": "text/plain" - }, - "key": "Authorization", - "value": "Basic " - }, - { - "disabled": 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.\n", - "key": "Idempotency-Key", - "value": "026e7634-24d7-486c-a0bb-4a17fd0eebc5" - } - ], - "method": "POST", - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "key": "description", - "value": "demo" - }, - { - "disabled": false, - "key": "to[description]", - "value": "Harry - Office" - }, - { - "disabled": false, - "key": "to[name]", - "value": "Harry Zhang" - }, - { - "disabled": false, - "key": "to[company]", - "value": "Lob" - }, - { - "disabled": false, - "key": "to[email]", - "value": "harry@lob.com" - }, - { - "disabled": false, - "key": "to[phone]", - "value": "5555555555" - }, - { - "disabled": false, - "key": "to[address_line1]", - "value": "210 King St" - }, - { - "disabled": false, - "key": "to[address_line2]", - "value": "# 6100" - }, - { - "disabled": false, - "key": "to[address_city]", - "value": "San Francisco" - }, - { - "disabled": false, - "key": "to[address_state]", - "value": "CA" - }, - { - "disabled": false, - "key": "to[address_zip]", - "value": "94107" - }, - { - "disabled": false, - "key": "to[address_country]", - "value": "US" - }, - { - "disabled": false, - "key": "from[description]", - "value": "Harry - Office" - }, - { - "disabled": false, - "key": "from[name]", - "value": "Harry Zhang" - }, - { - "disabled": false, - "key": "from[company]", - "value": "Lob" - }, - { - "disabled": false, - "key": "from[email]", - "value": "harry@lob.com" - }, - { - "disabled": false, - "key": "from[phone]", - "value": "5555555555" - }, - { - "disabled": false, - "key": "from[address_line1]", - "value": "210 King St" - }, + "path": [ + "self_mailers" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ { - "disabled": false, - "key": "from[address_line2]", - "value": "# 6100" + "key": "idempotency_key", + "value": "026e7634-24d7-486c-a0bb-4a17fd0eebc5" + } + ], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" }, + "key": "Authorization", + "value": "Basic " + }, + { + "disabled": 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.\n", + "key": "Idempotency-Key", + "value": "026e7634-24d7-486c-a0bb-4a17fd0eebc5" + } + ], + "method": "POST", + "body": { + "mode": "urlencoded", + "urlencoded": [ { "disabled": false, - "key": "from[address_city]", - "value": "San Francisco" + "key": "description", + "value": "Demo Self Mailer job" }, { "disabled": false, - "key": "from[address_state]", - "value": "CA" + "key": "to", + "value": "adr_bae820679f3f536b" }, { "disabled": false, - "key": "from[address_zip]", - "value": "94107" + "key": "from", + "value": "adr_210a8d4b0b76d77b" }, { "disabled": false, - "key": "from[address_country]", - "value": "US" + "key": "inside", + "value": "https://lob.com/selfmailerinside.pdf" }, { "disabled": false, - "key": "front", - "value": "tmpl_c94e83ca2cd5121" + "key": "outside", + "value": "https://lob.com/selfmaileroutside.pdf" }, { "disabled": false, - "key": "back", - "value": "tmpl_c94e83ca2cd5121" + "key": "size", + "value": "12x9_bifold" }, { "disabled": false, - "key": "size", - "value": "6x9" + "key": "metadata[spiffy]", + "value": "true" }, { "disabled": false, "key": "mail_type", - "value": "usps_first_class" + "value": "usps_standard" }, { "disabled": false, "key": "merge_variables[name]", "value": "Harry" }, - { - "disabled": false, - "key": "metadata[spiffy]", - "value": "true" - }, { "disabled": false, "key": "send_date", @@ -11398,7 +13569,7 @@ }, { "disabled": false, - "key": "bottom", + "key": "top", "value": "2.5" }, { @@ -11409,7 +13580,7 @@ { "disabled": false, "key": "pages", - "value": "back" + "value": "inside,outside" }, { "disabled": false, @@ -11432,142 +13603,303 @@ "_postman_previewlanguage": "json" } ], - "event": [], - "protocolProfileBehavior": { - "disableBodyPruning": true - } - } - ], - "event": [] - }, - { - "id": "da558859-06e8-4563-ab66-53f2f3097f96", - "name": "QR Codes", - "description": { - "content": "\nLob QR codes allow you to generate a QR code that is unique to each mailpiece, thereby allowing each and every customers to receive a personalized link. See the Create endpoint for Letters, Postcards or Self Mailers to learn how to embed a QR code into your mail piece.\n\nWebhooks can be used to integrate Lob QR code scans into your omni channel marketing strategy. See the 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.\n\nFurthermore, our QR code Analytics endpoint can be used to track the impact and engagement rate of your mail sends. Lob can tell you exactly which recipients opened your mailpiece. Our Analytics endpoint allows you to see exactly which recipient scanned a mailpiece, when they scanned it, and more!\n\n\n", - "type": "text/plain" - }, - "item": [ + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + } + ], + "event": [] + }, + { + "id": "5209f59f-09f2-43fd-9757-2522fe195e49", + "name": "Template Design", + "description": { + "content": "## HTML Templates\nYou can save commonly used HTML as templates within Lob to more easily manage them. You can reference\nyour saved templates in postcard, letter, and check requests instead of having to pass a long HTML\nstring on each request. Additionally, you can make changes to your HTML templates and update them\nindependently, without having to touch your API integration. Templates can be created, edited,\nand viewed on your Dashboard. To use a template in a postcard,\nletter, or check, see the documentation for each endpoint below. For help using templates, check out our\nHTML Templates Guide or get started with a\npre-designed template from our gallery. In Live mode, you can only have\nas many templates as allotted in your current\nPrint & Mail Edition. There is no limit in Test mode.\n\nIf you'd like to interact with templates programmatically, check out our Beta Program for API access\nto the [HTML Templates Endpoints](#tag/Templates).\n\n### Example Create Request using HTML Templates\n```bash\n curl https://api.lob.com/v1/postcards \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -d \"description=Demo Postcard job\" \\\n -d \"to=adr_78c304d54912c502\" \\\n -d \"from=adr_61a0865c8c573139\" \\\n -d \"front=tmpl_b846a20859ae11a\" \\\n -d \"back=tmpl_01b0d396a10c268\" \\\n -d \"merge_variables[name]=Harry\"\n```\n
\n\n\n## HTML Examples\nUse a pre-designed template from our gallery or follow these\nbasic guidelines as starting points for creating custom Postcards,\nSelf Mailers, Letters, and Checks.\n\nPlease follow the standards used in these templates, such as:\n- For any linked assets, you must use a performant file hosting provider with no rate limits such as Amazon\nS3.\n- Use inline styles or an internal stylesheet, do not link to external stylesheets.\n- Link to images that are 300DPI and sized at the final desired size on the physical mailing. For example,\nfor a photo that is desired to be 1in x 1in on the final postcard, the image asset should be sized at 1in\nx 1in at 300DPI (which equates to 300px by 300px).\n- The sum of all linked assets should not exceed 5MB in file size.\n- Use `-webkit` prefixes for CSS properties when recommended here.\n\nBecause different browsers have varying user-agent styles, the HTML you see in your browser will not\nalways look identical to what is produced through the API. It is **strongly** recommended that you test all\nHTML requests by reviewing the final PDF files in your Test Environment, as these are the files that will be\nprinted.\n
\n\n\n## Image Prepping\nCurrently we support the following file types for all endpoints:\n- PDF\n- PNG\n- JPEG\n\n**Templates**\n\nYou can find pre-made templates that already adhere to all of these guidelines here:\n- [Postcards](#tag/Postcards)\n- [Letters](#tag/Letters)\n- [Checks](#tag/Checks)\n- [Self Mailers](#tag/Self-Mailers)\n\n**Prepping All Images**\n\nThe following guidelines apply to image types:\n- Images should be 300 dpi or higher - PNG/JPEG files with less than 300 dpi will be rejected.\n- Your artwork should include a 1/8\" border around the final trim size. This means your final file size will be a total of 0.25\" larger than your expected printed piece (ie, a 4\"x6\" postcard should be submitted as 4.25\"x6.25\"). There is no need to include crop marks in your submitted content.\n- Include a safe zone – make sure no critical elements are within 1/8\" from the edge of the final size.\n- Do not include any additional postage marks or indicia.\n- File sizes should be no larger than 5MB.\n\n**Prepping PDFs**\n\nTo ensure that you are producing PDF's correctly please follow the guidelines [outlined in our help center here](https://help.lob.com/print-and-mail/designing-mail-creatives/creative-formatting/pdf-preflight-checklist#requirements-for-static-pdfs)\n\n**Prepping PNGs/JPEGs**\n\nTo ensure that you are producing PNG's/JPEG's correctly please follow the guidelines below:\n\n- Minimum 300 dpi. The dpi is calculated as (width of image in pixels) / (width of product in inches) and (length of image in pixels) / (length of product in inches). For Example: 1275px x 1875px image used to create a 4.25\" x 6.25\" postcard has a dpi of 300.\n- Submitted images must have the same length to width ratio as the chosen product. Images will not be cropped or stretched by the API.\n
\n\n\n## Standard PDF Fonts\nIdeally, all fonts in provided PDFs should be embedded. Embedding a font in a PDF ensures that the final\nprinted product will look as it was designed. Fonts can vary greatly in size and shape, even within the\nsame family. If the exact font that was used to design the artwork is not used to print, the look and\nplacement of the text is not guaranteed to be the same.\n\nIn general, requests that provide PDFs with un-embedded fonts will be rejected. We make an exception for\n\"standard fonts\", a set of fonts that we have identified as being common. PDFs that contain un-embedded\nfonts that are found in the list, and match the accepted font type\nwill be accepted. Otherwise, the request will be rejected.\n\nFont embedding is an essential part of standard PDF workflows. Fonts should be embedded automatically by\nPDF editing software that are compliant with PDF standards.\n\nPlease note, only standard base14 fonts can be Type 1.\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FONT NAMETYPES
ArialTrueType, CID TrueType
Arial,BoldTrueType, CID TrueType
Arial,BoldItalicTrueType, CID TrueType
Arial,ItalicTrueType, CID TrueType
ArialMTTrueType, CID TrueType
Arial-BoldMTTrueType
Arial-BoldItalicMTTrueType
Arial-ItalicMTTrueType
ArialNarrowTrueType
ArialNarrow-BoldTrueType
CalibriTrueType
Calibri-BoldTrueType
Calibri-ItalicTrueType
CourierType 1
Courier-ObliqueType 1
Courier-BoldType 1
Courier-BoldObliqueType 1
CourierNewPSMTTrueType
CourierNewPS-ItalicMTTrueType
CourierNewPS-BoldMTTrueType
HelveticaType 1
Helvetica-BoldType 1
Helvetica-BoldObliqueType 1
Helvetica-ObliqueType 1
LucidaConsoleTrueType
MsSansSerifTrueType
MsSansSerif,BoldTrueType
SymbolType 1, TrueType
TahomaTrueType
Tahoma-BoldTrueType
Times-BoldType 1
Times-BoldItalicType 1
Times-ItalicType 1
Times-RomanType 1
TimesNewRomanPS-BoldItalicMTTrueType
TimesNewRomanPS-BoldMTTrueType
TimesNewRomanPS-ItalicMTTrueType
TimesNewRomanPSMTTrueType, CID TrueType
TimesNewRomanPSMT,BoldTrueType
VerdanaTrueType
Verdana-BoldTrueType
Verdana,ItalicTrueType
ZapfDingbatsType 1
\n\n", + "type": "text/plain" + }, + "item": [], + "event": [] + }, + { + "id": "d286e59d-ba24-4b77-bfc8-1dfa0d3c7ebe", + "name": "Template Versions", + "description": { + "content": "These API endpoints allow you to create, retrieve, update and delete versions of reusable HTML templates for use with the Print & Mail API.\n\n", + "type": "text/plain" + }, + "item": [ + { + "id": "6c3fb3bf-984c-4f8a-8bdf-c6bd86bb475d", + "name": "Retrieve", + "request": { + "name": "Retrieve", + "description": { + "content": "Retrieves the template version with the given template and version ids.", + "type": "text/plain" + }, + "url": { + "path": [ + "templates", + ":tmpl_id", + "versions", + ":vrsn_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "tmpl_id", + "description": "(Required) The ID of the template to which the version belongs." + }, + { + "disabled": false, + "type": "any", + "value": "", + "key": "vrsn_id", + "description": "(Required) id of the template_version" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "auth": null + }, + "response": [ + { + "id": "cffe99d7-337d-4608-8652-35674e97958c", + "name": "Returns the template version with the given template and version ids.", + "originalRequest": { + "url": { + "path": [ + "templates", + ":tmpl_id", + "versions", + ":vrsn_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "tmpl_id", + "description": "(Required) The ID of the template to which the version belongs." + }, + { + "disabled": false, + "type": "any", + "value": "", + "key": "vrsn_id", + "description": "(Required) id of the template_version" + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Basic " + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"id\": \"vrsn_534e339882d2282\",\n \"description\": \"Second Version\",\n \"html\": \"Second HTML for {{name}}\",\n \"date_created\": \"2017-11-09T04:49:38.016Z\",\n \"date_modified\": \"2017-11-09T04:49:38.016Z\",\n \"object\": \"version\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "72f7a882-c8d4-4135-bed5-91a75fa2f068", + "name": "Error", + "originalRequest": { + "url": { + "path": [ + "templates", + ":tmpl_id", + "versions", + ":vrsn_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "tmpl_id", + "description": "(Required) The ID of the template to which the version belongs." + }, + { + "disabled": false, + "type": "any", + "value": "", + "key": "vrsn_id", + "description": "(Required) id of the template_version" + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Basic " + } + ], + "method": "GET", + "body": {} + }, + "status": "Internal Server Error", + "code": 500, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"html is required\",\n \"status_code\": 422\n }\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [] + }, { - "id": "dc6aff9e-f6ac-4ef5-a1b3-769f2c54d2b7", - "name": "List", + "id": "f0d40171-4c5d-47c5-ad8c-2affd66c1d89", + "name": "Update", "request": { - "name": "List", + "name": "Update", "description": { - "content": "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.", + "content": "Updates the template version with the given template and version ids.", "type": "text/plain" }, "url": { "path": [ - "qr_code_analytics" + "templates", + ":tmpl_id", + "versions", + ":vrsn_id" ], "host": [ "{{baseUrl}}" ], - "query": [ - { - "disabled": false, - "key": "limit", - "value": "10", - "description": "How many results to return." - }, - { - "disabled": false, - "key": "offset", - "value": "0", - "description": "An integer that designates the offset at which to begin returning results. Defaults to 0." - }, + "query": [], + "variable": [ { "disabled": false, - "key": "include", + "type": "any", "value": "", - "description": "Request that the response include the total count by specifying `include=[\"total_count\"]`.\n" + "key": "tmpl_id", + "description": "(Required) The ID of the template to which the version belongs." }, { "disabled": false, - "key": "include", + "type": "any", "value": "", - "description": "Request that the response include the total count by specifying `include=[\"total_count\"]`.\n" - }, + "key": "vrsn_id", + "description": "(Required) id of the template_version" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/x-www-form-urlencoded" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "POST", + "auth": null, + "body": { + "mode": "urlencoded", + "urlencoded": [ { "disabled": false, - "key": "date_created[elit_5_]", - "value": "", - "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 ≤." + "key": "description", + "value": "" }, { "disabled": false, - "key": "date_created[Ut3b0]", - "value": "", - "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 ≤." + "key": "engine", + "value": "legacy" }, { "disabled": false, - "key": "date_created[eu_f5]", - "value": "", - "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 ≤." + "key": "required_vars", + "value": "" }, { "disabled": false, - "key": "scanned", - "value": "", - "description": "Filter list of responses to only include QR codes with at least one scan event." + "key": "required_vars", + "value": "" } - ], - "variable": [] - }, - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "method": "GET", - "auth": null + ] + } }, "response": [ { - "id": "0c50192a-ac07-4e8d-aa91-0118f4fedf90", - "name": "Returns a list of QR Codes and their analytics.", + "id": "26b74963-b0d0-4c81-8f54-3ec735a42476", + "name": "Returns the template version with the given template and version ids.", "originalRequest": { "url": { "path": [ - "qr_code_analytics" + "templates", + ":tmpl_id", + "versions", + ":vrsn_id" ], "host": [ "{{baseUrl}}" ], - "query": [ - { - "key": "limit", - "value": "10" - }, - { - "key": "offset", - "value": "0" - }, - { - "key": "include", - "value": "" - }, - { - "key": "include", - "value": "" - }, - { - "key": "date_created[do_7c]", - "value": "" - }, + "query": [], + "variable": [ { - "key": "date_created[velit_c]", - "value": "" + "disabled": false, + "type": "any", + "value": "", + "key": "tmpl_id", + "description": "(Required) The ID of the template to which the version belongs." }, { - "key": "scanned", - "value": "" + "disabled": false, + "type": "any", + "value": "", + "key": "vrsn_id", + "description": "(Required) id of the template_version" } - ], - "variable": [] + ] }, "header": [ { @@ -11579,130 +13911,198 @@ "value": "Basic " } ], - "method": "GET", - "body": {} + "method": "POST", + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "key": "description", + "value": "Some description" + } + ] + } }, "status": "OK", "code": 200, "header": [ + { + "disabled": false, + "description": "The rate limit for a given endpoint.", + "key": "ratelimit-limit", + "value": "150" + }, + { + "disabled": false, + "description": "The number of requests remaining in the current window.", + "key": "ratelimit-remaining", + "value": "100" + }, + { + "disabled": false, + "description": "The time at which the rate limit window resets in UTC epoch seconds\n", + "key": "ratelimit-reset", + "value": "1528749846" + }, { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"data\": [\n {\n \"resource_id\": \"ltr_d5a5a89da9106f8\",\n \"date_created\": \"2019-07-27T23:49:01.511Z\",\n \"number_of_scans\": 2,\n \"scans\": [\n {\n \"ip_location\": \"127.0.0.1\",\n \"scan_date\": \"2022-07-27T23:49:01.511Z\"\n },\n {\n \"ip_location\": \"127.0.0.1\",\n \"scan_date\": \"2022-07-29T23:45:00.436Z\"\n }\n ]\n },\n {\n \"resource_id\": \"psc_d5a5a89da9106f8\",\n \"date_created\": \"2022-09-27T23:49:01.511Z\",\n \"number_of_scans\": 1,\n \"scans\": [\n {\n \"ip_location\": \"127.0.0.1\",\n \"scan_date\": \"2022-09-27T23:49:01.511Z\"\n }\n ]\n }\n ],\n \"object\": \"list\",\n \"count\": 2,\n \"scanned_count\": 2,\n \"total_count\": 2\n}", + "body": "{\n \"id\": \"vrsn_534e339882d2282\",\n \"description\": \"Second Version\",\n \"html\": \"Second HTML for {{name}}\",\n \"date_created\": \"2017-11-09T04:49:38.016Z\",\n \"date_modified\": \"2017-11-09T04:49:38.016Z\",\n \"object\": \"version\"\n}", "cookie": [], "_postman_previewlanguage": "json" - } - ], - "event": [] - } - ], - "event": [] - }, - { - "id": "65d1cf9d-7847-4389-bc66-596962aa9545", - "name": "Rate Limiting", - "description": { - "content": "To prevent misuse, we enforce a rate limit on an API Key and endpoint basis, similar to the way many other APIs enforce rate limits. By default, all accounts and their corresponding Test and Live API Keys have a rate limit of 150 requests per 5 seconds per endpoint. The `POST /v1/us_verifications` and `POST /v1/us_autocompletions` endpoints have a limit of 300 requests per 5 seconds for all accounts.\n\nWhen your application exceeds the rate limit for a given API endpoint, the Lob API will return an HTTP 429 \"Too Many Requests\" response code instead of the variety of codes you would find across the other API endpoints.\n\n**HTTP Headers**\n\nHTTP headers are returned on each request to a rate limited endpoint. Ensure that you inspect these headers during your requests as they provide relevant data on how many more requests your application is allowed to make for the endpoint you just utilized.\n\nWhile the headers are documented here in titlecase, HTTP headers are case insensitive and certain libraries may transform them to lowercase. Please inspect your headers carefully to see how they will be represented in your chosen development scenario.\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
X-Rate-Limit-Limit:the rate limit ceiling for a given request
X-Rate-Limit-Remaining:the number of requests remaining in this window
X-Rate-Limit-Reset:the time at which the rate limit window resets (in UTC epoch seconds)\n
\n\n### Example HTTP Headers\n\n```bash\n X-Rate-Limit-Limit:150\n X-Rate-Limit-Remaining:100\n X-Rate-Limit-Reset:1528749846\n```\n\n### Example Response\n\nIf you hit the rate limit on a given endpoint, this is the body of the HTTP 429 message that you will see:\n\n```javascript\n {\n \"error\": {\n \"message\": \"Rate limit exceeded. Please wait 5 seconds and try your request again.\",\n \"code\": \"rate_limit_exceeded\",\n \"status_code\": 429\n }\n }\n``` ", - "type": "text/plain" - }, - "item": [], - "event": [] - }, - { - "id": "63384841-ee4f-4a03-a125-7655d9097d61", - "name": "Requests and Responses", - "description": { - "content": "## Asset URLs\n\nAll asset URLs returned by the Lob API (postcards, letters, thumbnails,\netc) are signed links served over HTTPS. All links returned will expire in\n30 days to prevent mis-sharing. Each time a GET request is initiated, a\nnew signed URL will be generated.\n
\n\n\n## Query Parameters\n\nQuery parameters which consist of lists of strings require that all elements of\nthe list be double-quoted, as per query filter standards.\n
\n\n\n## Idempotent Requests\n\nLob supports idempotency for safely retrying `POST` requests to create\npostcards, self mailers, letters, and checks without accidentally creating\nduplicates.\n\nFor example, if a request to create a check fails due to a network error,\nyou can safely retry the same request with the same idempotency key and\nguarantee that only one check will ultimately be created and sent. When a\nrequest is sent with an idempotency key for an already created resource,\nthe response object for the existing resource will be returned.\n\nTo perform an idempotent `POST` request to one of the mailpiece product\nendpoints, provide an additional `Idempotency-Key` header or an `idempotency_key`\nquery parameter to the request. If multiple idempotency keys are provided,\nthe request will fail. How you create unique keys is up to you, but we\nsuggest using random values, such as V4 UUIDs. Idempotency keys are intended\nto prevent issues over a short periods of time, therefore keys expire after\n24 hours. Keys are unique by mode (Test vs. Live) as well as by resource\n(postcard vs. letter, etc.).\n\nBy default, all `GET` and `DELETE` requests are idempotent by nature, so\nthey do not require an additional idempotency key.\n\nFor more help integrating idempotency keys, refer to our\nimplementation guide.\n\n**Headers**\n\n \n \n \n \n \n \n
Idempotency-Key:\n optional\n

\n \n A string of no longer than 256 characters\n that uniquely identifies this resource.\n \n

\n
\n\n**Query Parameters**\n\n \n \n \n \n \n \n
idempotency-key:\n optional\n

\n \n A string of no longer than 256 characters\n that uniquely identifies this resource.\n \n

\n
\n\n### Example Request\n\n```bash\n curl https://api.lob.com/v1/postcards \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -H \"Idempotency-Key: 026e7634-24d7-486c-a0bb-4a17fd0eebc5\" \\\n -d \"to=adr_bae820679f3f536b\" \\\n -d \"from=adr_210a8d4b0b76d77b\" \\\n --data-urlencode \"front=Front HTML for {{name}}\" \\\n --data-urlencode \"back=Back HTML\" \\\n -d \"merge_variables[name]=Harry\"\n```\n
\n\n\n## Metadata\n\nWhen creating any Lob object, you can include a metadata object with up to 20 key-value pairs of\ncustom data. You can use metadata to store information like `metadata[customer_id] = \"987654\"` or\n`metadata[campaign] = \"NEWYORK2015\"`. This is especially useful for filtering and matching to internal\nsystems.\n\nEach metadata key must be less than 40 characters long and values must be less than 500 characters.\nMetadata does not support nested objects.\n\n### Example Create Request with Metadata\n\n```bash\n curl https://api.lob.com/v1/postcards \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -d \"description=Demo Postcard job\" \\\n -d \"metadata[campaign]=NEWYORK2015\" \\\n -d \"to=adr_bae820679f3f536b\" \\\n -d \"from=adr_210a8d4b0b76d77b\" \\\n --data-urlencode \"front=Front HTML for {{name}}\" \\\n --data-urlencode \"back=Back HTML\" \\\n -d \"merge_variables[name]=Harry\"\n```\n\n### Example List Request with Metadata Filter\n\n```bash\n curl -g \"https://api.lob.com/v1/postcards?metadata[campaign]=NEWYORK2015&limit=2\" \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n```\n
\n\n\n\n## Request Body\n\nWhen manually sending a POST HTTP request directly to the Lob API, without\nthe use of a library, you may represent the body as either a Form URL\nEncoded request, a JSON document, or a Multipart Form Data request.\n\nHowever, if you're using one of our [SDKs](#tag/SDKs-and-Tools),\nthe generation of the request bodies is done for you automatically and you don't\nneed to worry about the format.\n\n### Form URL Encoded\n\nThis request body encoding is accompanied with the\n`Content-Type: application/x-www-form-urlencoded` header. The content is an\nexample of what the [Verify a US address](index.html#operation/us_verification)\nendpoint accepts. An example of a request body encoded in this format follows.\n\n\n```javascript\n primary_line=210 King Street&city=San Francisco&state=CA&zip_code=94107\n```\n\n### JSON\n\nThis request body encoding is accompanied with the `Content-Type: application/json` header.\nThe content is an example of what the [Verify a US address endpoint](index.html#operation/us_verification)\naccepts. An example of a request body encoded in this format follows.\n\n\n```javascript\n {\n \"primary_line\": \"210 King Street\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zip_code\": \"94107\"\n }\n```\n\n### Multipart Form Data\n\nThis request body encoding is accompanied with the `Content-Type: multipart/form-data`\nheader. This is the only format that can be used for uploading a file to the API. The\ncontent is an example of what the [Create a check](index.html#operation/check_create)\nendpoint accepts. An example of a request body encoded in this format follows.\n\n\n```javascript\n --------------------------7015ebe79c0a5f8c\n Content-Disposition: form-data; name=\"description\"\n\n Demo Letter\n --------------------------7015ebe79c0a5f8c\n Content-Disposition: form-data; name=\"to\"\n\n adr_bae820679f3f536b\n --------------------------7015ebe79c0a5f8c\n Content-Disposition: form-data; name=\"from\"\n\n adr_210a8d4b0b76d77b\n --------------------------7015ebe79c0a5f8c\n Content-Disposition: form-data; name=\"file\"; filename=\"file.pdf\"\n Content-Type: application/pdf\n\n \n --------------------------7015ebe79c0a5f8c\n Content-Disposition: form-data; name=\"color\"\n\n true\n --------------------------7015ebe79c0a5f8c--\n```\n\n", - "type": "text/plain" - }, - "item": [], - "event": [] - }, - { - "id": "c65af5a4-5d01-4181-9b93-83316eaae41b", - "name": "Reverse Geocode Lookups", - "description": { - "content": "Find a list of zip codes associated with a valid US location via latitude and longitude.
\n", - "type": "text/plain" - }, - "item": [ + }, + { + "id": "985cdf4e-1997-400e-8942-d08547682289", + "name": "Error", + "originalRequest": { + "url": { + "path": [ + "templates", + ":tmpl_id", + "versions", + ":vrsn_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "tmpl_id", + "description": "(Required) The ID of the template to which the version belongs." + }, + { + "disabled": false, + "type": "any", + "value": "", + "key": "vrsn_id", + "description": "(Required) id of the template_version" + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Basic " + } + ], + "method": "POST", + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "key": "description", + "value": "Some description" + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"html is required\",\n \"status_code\": 422\n }\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, { - "id": "e6ba6d88-4cc7-4552-9e08-e15ca141cfaa", - "name": "Reverse Geocode Lookup", + "id": "36a2e69a-19c1-4c10-8ee5-3d8e770db266", + "name": "Delete", "request": { - "name": "Reverse Geocode Lookup", + "name": "Delete", "description": { - "content": "Reverse geocode a valid US location with a live API key.", + "content": "Permanently deletes a template version. A template's `published_version` can not be deleted.", "type": "text/plain" }, "url": { "path": [ - "us_reverse_geocode_lookups" + "templates", + ":tmpl_id", + "versions", + ":vrsn_id" ], "host": [ "{{baseUrl}}" ], - "query": [ + "query": [], + "variable": [ { "disabled": false, - "key": "size", - "value": "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." + "type": "any", + "value": "", + "key": "tmpl_id", + "description": "(Required) The ID of the template to which the version belongs." + }, + { + "disabled": false, + "type": "any", + "value": "", + "key": "vrsn_id", + "description": "(Required) id of the template_version" } - ], - "variable": [] + ] }, "header": [ - { - "key": "Content-Type", - "value": "application/x-www-form-urlencoded" - }, { "key": "Accept", "value": "application/json" } ], - "method": "POST", - "auth": null, - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "key": "latitude", - "value": "", - "description": "(Required) A positive or negative decimal indicating the geographic latitude of the address, specifying the north-to-south position of a location. This should be input with `longitude` to pinpoint locations on a map.\n" - }, - { - "disabled": false, - "key": "longitude", - "value": "", - "description": "(Required) A positive or negative decimal indicating the geographic longitude of the address, specifying the north-to-south position of a location. This should be input with `latitude` to pinpoint locations on a map.\n" - } - ] - } + "method": "DELETE", + "auth": null }, "response": [ { - "id": "7b78d4bd-8d6c-47a6-abff-911f8636c9f0", - "name": "Returns a zip lookup object if a valid zip was provided.", + "id": "e4ffe411-8d09-4dd0-9b97-2466e0241490", + "name": "Deleted", "originalRequest": { "url": { "path": [ - "us_reverse_geocode_lookups" + "templates", + ":tmpl_id", + "versions", + ":vrsn_id" ], "host": [ "{{baseUrl}}" ], - "query": [ + "query": [], + "variable": [ { - "key": "size", - "value": "5" + "disabled": false, + "type": "any", + "value": "", + "key": "tmpl_id", + "description": "(Required) The ID of the template to which the version belongs." + }, + { + "disabled": false, + "type": "any", + "value": "", + "key": "vrsn_id", + "description": "(Required) id of the template_version" } - ], - "variable": [] + ] }, "header": [ { @@ -11714,79 +14114,52 @@ "value": "Basic " } ], - "method": "POST", - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "description": { - "content": "(Required) A positive or negative decimal indicating the geographic latitude of the address, specifying the north-to-south position of a location. This should be input with `longitude` to pinpoint locations on a map.\n", - "type": "text/plain" - }, - "key": "latitude", - "value": "37.7749" - }, - { - "disabled": false, - "description": { - "content": "(Required) A positive or negative decimal indicating the geographic longitude of the address, specifying the north-to-south position of a location. This should be input with `latitude` to pinpoint locations on a map.\n", - "type": "text/plain" - }, - "key": "longitude", - "value": "122.4194" - } - ] - } + "method": "DELETE", + "body": {} }, "status": "OK", "code": 200, "header": [ - { - "disabled": false, - "description": "The rate limit for a given endpoint.", - "key": "ratelimit-limit", - "value": "150" - }, - { - "disabled": false, - "description": "The number of requests remaining in the current window.", - "key": "ratelimit-remaining", - "value": "100" - }, - { - "disabled": false, - "description": "The time at which the rate limit window resets in UTC epoch seconds\n", - "key": "ratelimit-reset", - "value": "1528749846" - }, { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"id\": \"us_reverse_geocode_8a013f3e\",\n \"addresses\": [\n {\n \"components\": {\n \"zip_code\": \"94107\",\n \"zip_code_plus_4\": \"1702\"\n },\n \"location_analysis\": {\n \"latitude\": 37.78271,\n \"longitude\": -122.416202,\n \"distance\": 1.32\n }\n },\n {\n \"components\": {\n \"zip_code\": \"94107\",\n \"zip_code_plus_4\": \"1702\"\n },\n \"location_analysis\": {\n \"latitude\": 37.782917,\n \"longitude\": -122.416131,\n \"distance\": 1.33\n }\n }\n ]\n}", + "body": "{\n \"id\": \"vrsn_123456789\",\n \"deleted\": true\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "353bff5d-da63-429a-bef6-a6166b539c1b", + "id": "446c863c-d63b-4f7b-a6a7-a0cbed9f88cd", "name": "Error", "originalRequest": { "url": { "path": [ - "us_reverse_geocode_lookups" + "templates", + ":tmpl_id", + "versions", + ":vrsn_id" ], "host": [ "{{baseUrl}}" ], - "query": [ + "query": [], + "variable": [ { - "key": "size", - "value": "5" + "disabled": false, + "type": "any", + "value": "", + "key": "tmpl_id", + "description": "(Required) The ID of the template to which the version belongs." + }, + { + "disabled": false, + "type": "any", + "value": "", + "key": "vrsn_id", + "description": "(Required) id of the template_version" } - ], - "variable": [] + ] }, "header": [ { @@ -11798,30 +14171,8 @@ "value": "Basic " } ], - "method": "POST", - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "description": { - "content": "(Required) A positive or negative decimal indicating the geographic latitude of the address, specifying the north-to-south position of a location. This should be input with `longitude` to pinpoint locations on a map.\n", - "type": "text/plain" - }, - "key": "latitude", - "value": "37.7749" - }, - { - "disabled": false, - "description": { - "content": "(Required) A positive or negative decimal indicating the geographic longitude of the address, specifying the north-to-south position of a location. This should be input with `latitude` to pinpoint locations on a map.\n", - "type": "text/plain" - }, - "key": "longitude", - "value": "122.4194" - } - ] - } + "method": "DELETE", + "body": {} }, "status": "Internal Server Error", "code": 500, @@ -11831,62 +14182,76 @@ "value": "application/json" } ], - "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"latitude is required\",\n \"status_code\": 422\n }\n}", + "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"html is required\",\n \"status_code\": 422\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } ], - "event": [], - "protocolProfileBehavior": { - "disableBodyPruning": true - } - } - ], - "event": [] - }, - { - "id": "4ad9f28d-130a-43b8-b87a-0021a81309a4", - "name": "SDKs and Tools", - "description": { - "content": "Please visit our Github for a list of our supported libraries.\n- Typescript\n- PHP\n- Python\n- Java\n- Ruby\n- CSharp\n- Elixir\n- Go\n- Node.js (legacy)\n- Java (legacy)\n- PHP (legacy)\n- Python (Legacy)\n- Ruby (Legacy)\n\n

\n\n", - "type": "text/plain" - }, - "item": [], - "event": [] - }, - { - "id": "919cd890-74b0-4e3f-b008-ce22145fc99c", - "name": "Self Mailers", - "description": { - "content": "The self mailer endpoint allows you to easily print and mail self mailers. The API provides endpoints\nfor creating self mailers, retrieving individual self mailers, canceling self mailers, and retrieving a list of self mailers.\n\n", - "type": "text/plain" - }, - "item": [ + "event": [] + }, { - "id": "59dd68af-e72b-4be1-9bc1-98f46a7a7905", - "name": "Retrieve", + "id": "9abad2b1-5697-46ea-80f2-2abe36257087", + "name": "List", "request": { - "name": "Retrieve", + "name": "List", "description": { - "content": "Retrieves the details of an existing self_mailer. You need only supply the unique self_mailer identifier that was returned upon self_mailer creation.", + "content": "Returns a list of template versions for the given template ID. The template versions are sorted by creation date, with the most recently created appearing first.\n", "type": "text/plain" }, "url": { "path": [ - "self_mailers", - ":sfm_id" + "templates", + ":tmpl_id", + "versions" ], "host": [ "{{baseUrl}}" ], - "query": [], + "query": [ + { + "disabled": false, + "key": "limit", + "value": "10", + "description": "How many results to return." + }, + { + "disabled": false, + "key": "before", + "value": "", + "description": "`before` and `after` are both optional but only one of them can be in the query at a time.\n" + }, + { + "disabled": false, + "key": "after", + "value": "", + "description": "`before` and `after` are both optional but only one of them can be in the query at a time.\n" + }, + { + "disabled": false, + "key": "include", + "value": "", + "description": "Request that the response include the total count by specifying `include=[\"total_count\"]`.\n" + }, + { + "disabled": false, + "key": "include", + "value": "", + "description": "Request that the response include the total count by specifying `include=[\"total_count\"]`.\n" + }, + { + "disabled": false, + "key": "date_created[ut_ad]", + "value": "", + "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 ≤." + } + ], "variable": [ { "disabled": false, "type": "any", "value": "", - "key": "sfm_id", - "description": "(Required) id of the self_mailer" + "key": "tmpl_id", + "description": "(Required) The ID of the template associated with the retrieved versions" } ] }, @@ -11901,25 +14266,55 @@ }, "response": [ { - "id": "f08edff2-6abe-46dd-8e65-2ca5324ba4ac", - "name": "Returns a self_mailer object", + "id": "8d91dc02-f626-4bb3-bc07-8c38ad5125bb", + "name": "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.", "originalRequest": { "url": { "path": [ - "self_mailers", - ":sfm_id" + "templates", + ":tmpl_id", + "versions" ], "host": [ "{{baseUrl}}" ], - "query": [], + "query": [ + { + "key": "limit", + "value": "10" + }, + { + "key": "before", + "value": "" + }, + { + "key": "after", + "value": "" + }, + { + "key": "include", + "value": "" + }, + { + "key": "include", + "value": "" + }, + { + "key": "date_created[dolore09b]", + "value": "" + }, + { + "key": "date_created[ind8]", + "value": "" + } + ], "variable": [ { "disabled": false, "type": "any", "value": "", - "key": "sfm_id", - "description": "(Required) id of the self_mailer" + "key": "tmpl_id", + "description": "(Required) The ID of the template associated with the retrieved versions" } ] }, @@ -11944,30 +14339,60 @@ "value": "application/json" } ], - "body": "{\n \"id\": \"sfm_8ffbe811dea49dcf\",\n \"description\": \"April Campaign\",\n \"metadata\": {},\n \"to\": {\n \"id\": \"adr_bae820679f3f536b\",\n \"description\": null,\n \"name\": \"HARRY ZHANG\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2017-09-05T17:47:53.767Z\",\n \"date_modified\": \"2017-09-05T17:47:53.767Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"from\": {\n \"id\": \"adr_210a8d4b0b76d77b\",\n \"description\": null,\n \"name\": \"LEORE AVIDAR\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2017-09-05T17:47:53.767Z\",\n \"date_modified\": \"2017-09-05T17:47:53.767Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"url\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA\",\n \"outside_template_id\": \"tmpl_a3cb937f26d7eec\",\n \"inside_template_id\": \"tmpl_a3cb937f26d7eec\",\n \"inside_template_version_id\": \"vrsn_bfdf70893b00a85\",\n \"outside_template_version_id\": \"vrsn_bfdf70893b00a85\",\n \"carrier\": \"USPS\",\n \"tracking_events\": [],\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA\",\n \"medium\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_1.png?version=v1&expires=1618512040&signature=ryxN7bsXGtw_GRFSP3Cs3A3IYjxZi3cW9BHDCNgMt6p3nobVmsc_iFHt2e-S7ndAXhhN7nP-MQVov3bt3r37BQ\",\n \"large\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg\"\n },\n {\n \"small\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_2.png?version=v1&expires=1618512040&signature=3gTgU7Fd3KoT_vNlQnTGptRps5ZgnkhSnPrAwk7L98higIzSwfKoLvuu_DIpMM48dHbxckKT9waR8euJ4KSDBQ\",\n \"medium\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_2.png?version=v1&expires=1618512040&signature=Ue1lw5CMj7KRx6cMQL8xPeazaHCdJzWcACd1w3acuYPnWkVIpSt62OIO7hAtpAQK9xm1dhhlFj0rqRZMdRMMBA\",\n \"large\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_2.png?version=v1&expires=1618512040&signature=cICc7HEm1xG_eyM4a_wtvPk2FqoLRmtgGa29kJisWnMIYBL0OkyzG4ZCYGMhp-5cZpJlSpXfTgGKh_Qmeo1TDw\"\n }\n ],\n \"merge_variables\": {\n \"name\": null\n },\n \"size\": \"6x18_bifold\",\n \"mail_type\": \"usps_first_class\",\n \"expected_delivery_date\": \"2021-03-24\",\n \"date_created\": \"2021-03-16T18:40:40.504Z\",\n \"date_modified\": \"2021-03-16T18:40:40.504Z\",\n \"send_date\": \"2021-03-16T18:45:40.493Z\",\n \"use_type\": \"marketing\",\n \"fsc\": false,\n \"object\": \"self_mailer\"\n}", + "body": "{\n \"data\": [\n {\n \"id\": \"vrsn_4d6ff5d868bf630\",\n \"description\": \"Second Version\",\n \"html\": \"Second HTML for \",\n \"date_created\": \"2017-11-09T05:09:03.665Z\",\n \"date_modified\": \"2018-05-22T22:01:10.479Z\",\n \"object\": \"version\"\n },\n {\n \"id\": \"vrsn_2a17159c1911919\",\n \"description\": \"Test Template\",\n \"html\": \"HTML for \",\n \"date_created\": \"2017-11-09T05:08:40.004Z\",\n \"date_modified\": \"2018-05-22T22:01:11.309Z\",\n \"object\": \"version\"\n }\n ],\n \"object\": \"list\",\n \"count\": 2\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "e9be4611-64e3-4afc-90fb-c72fa376b473", + "id": "b494a9fd-c2ad-4174-a6a4-033086802dab", "name": "Error", "originalRequest": { "url": { "path": [ - "self_mailers", - ":sfm_id" + "templates", + ":tmpl_id", + "versions" ], "host": [ "{{baseUrl}}" ], - "query": [], + "query": [ + { + "key": "limit", + "value": "10" + }, + { + "key": "before", + "value": "" + }, + { + "key": "after", + "value": "" + }, + { + "key": "include", + "value": "" + }, + { + "key": "include", + "value": "" + }, + { + "key": "date_created[dolore09b]", + "value": "" + }, + { + "key": "date_created[ind8]", + "value": "" + } + ], "variable": [ { "disabled": false, "type": "any", "value": "", - "key": "sfm_id", - "description": "(Required) id of the self_mailer" + "key": "tmpl_id", + "description": "(Required) The ID of the template associated with the retrieved versions" } ] }, @@ -11992,7 +14417,7 @@ "value": "application/json" } ], - "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"to address not found\",\n \"status_code\": 404\n }\n}", + "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"html is required\",\n \"status_code\": 422\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } @@ -12000,18 +14425,19 @@ "event": [] }, { - "id": "cdc45e50-c052-4f0a-9255-519e7b3ffe39", - "name": "Delete", + "id": "0cb6c82d-acde-439b-9d35-e048e837a498", + "name": "Create", "request": { - "name": "Delete", + "name": "Create", "description": { - "content": "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.", + "content": "Creates a new template version attached to the specified template.", "type": "text/plain" }, "url": { "path": [ - "self_mailers", - ":sfm_id" + "templates", + ":tmpl_id", + "versions" ], "host": [ "{{baseUrl}}" @@ -12022,29 +14448,65 @@ "disabled": false, "type": "any", "value": "", - "key": "sfm_id", - "description": "(Required) id of the self_mailer" + "key": "tmpl_id", + "description": "(Required) The ID of the template the new version will be attached to" } ] }, "header": [ + { + "key": "Content-Type", + "value": "application/x-www-form-urlencoded" + }, { "key": "Accept", "value": "application/json" } ], - "method": "DELETE", - "auth": null + "method": "POST", + "auth": null, + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "key": "html", + "value": "", + "description": "(Required) " + }, + { + "disabled": false, + "key": "description", + "value": "" + }, + { + "disabled": false, + "key": "engine", + "value": "legacy" + }, + { + "disabled": false, + "key": "required_vars", + "value": "" + }, + { + "disabled": false, + "key": "required_vars", + "value": "" + } + ] + } }, "response": [ { - "id": "44141dec-ffa2-4814-8abf-afcd20d8c943", - "name": "Deleted", + "id": "e6caabe1-50a2-420a-9f8d-f0dce21502ec", + "name": "Returns the template version with the given template and version ids.", "originalRequest": { "url": { "path": [ - "self_mailers", - ":sfm_id" + "templates", + ":tmpl_id", + "versions" ], "host": [ "{{baseUrl}}" @@ -12055,8 +14517,8 @@ "disabled": false, "type": "any", "value": "", - "key": "sfm_id", - "description": "(Required) id of the self_mailer" + "key": "tmpl_id", + "description": "(Required) The ID of the template the new version will be attached to" } ] }, @@ -12070,29 +14532,66 @@ "value": "Basic " } ], - "method": "DELETE", - "body": {} + "method": "POST", + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "key": "description", + "value": "Some Description" + }, + { + "disabled": false, + "description": { + "content": "(Required) ", + "type": "text/plain" + }, + "key": "html", + "value": "HTML for {{name}}" + } + ] + } }, "status": "OK", "code": 200, "header": [ + { + "disabled": false, + "description": "The rate limit for a given endpoint.", + "key": "ratelimit-limit", + "value": "150" + }, + { + "disabled": false, + "description": "The number of requests remaining in the current window.", + "key": "ratelimit-remaining", + "value": "100" + }, + { + "disabled": false, + "description": "The time at which the rate limit window resets in UTC epoch seconds\n", + "key": "ratelimit-reset", + "value": "1528749846" + }, { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"id\": \"sfm_123456789\",\n \"deleted\": true\n}", + "body": "{\n \"id\": \"vrsn_534e339882d2282\",\n \"description\": \"Second Version\",\n \"html\": \"Second HTML for {{name}}\",\n \"date_created\": \"2017-11-09T04:49:38.016Z\",\n \"date_modified\": \"2017-11-09T04:49:38.016Z\",\n \"object\": \"version\"\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "5d35cfab-0363-45ea-8ea5-e311198f9fa9", + "id": "779a4cf0-7bff-4556-980a-ec1ca8adb67f", "name": "Error", "originalRequest": { "url": { "path": [ - "self_mailers", - ":sfm_id" + "templates", + ":tmpl_id", + "versions" ], "host": [ "{{baseUrl}}" @@ -12103,8 +14602,8 @@ "disabled": false, "type": "any", "value": "", - "key": "sfm_id", - "description": "(Required) id of the self_mailer" + "key": "tmpl_id", + "description": "(Required) The ID of the template the new version will be attached to" } ] }, @@ -12118,8 +14617,26 @@ "value": "Basic " } ], - "method": "DELETE", - "body": {} + "method": "POST", + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "key": "description", + "value": "Some Description" + }, + { + "disabled": false, + "description": { + "content": "(Required) ", + "type": "text/plain" + }, + "key": "html", + "value": "HTML for {{name}}" + } + ] + } }, "status": "Internal Server Error", "code": 500, @@ -12129,128 +14646,54 @@ "value": "application/json" } ], - "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"to address not found\",\n \"status_code\": 404\n }\n}", + "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"html is required\",\n \"status_code\": 422\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } ], - "event": [] - }, + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + } + ], + "event": [] + }, + { + "id": "9b70de27-7515-4b3c-83f5-c9b8f4d1d388", + "name": "Templates", + "description": { + "content": "These API endpoints allow you to create, retrieve, update and delete reusable HTML templates for use with the Print & Mail API.\n\n", + "type": "text/plain" + }, + "item": [ { - "id": "c85bf0d1-6125-453c-974c-c008247fa267", - "name": "List", + "id": "641ad8e8-cb49-40ca-8cef-6aef54d9b002", + "name": "Retrieve", "request": { - "name": "List", + "name": "Retrieve", "description": { - "content": "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.", + "content": "Retrieves the details of an existing template. You need only supply the unique template identifier that was returned upon template creation.", "type": "text/plain" }, "url": { "path": [ - "self_mailers" + "templates", + ":tmpl_id" ], "host": [ "{{baseUrl}}" ], - "query": [ - { - "disabled": false, - "key": "limit", - "value": "10", - "description": "How many results to return." - }, - { - "disabled": false, - "key": "before", - "value": "", - "description": "`before` and `after` are both optional but only one of them can be in the query at a time.\n" - }, - { - "disabled": false, - "key": "after", - "value": "", - "description": "`before` and `after` are both optional but only one of them can be in the query at a time.\n" - }, - { - "disabled": false, - "key": "include", - "value": "", - "description": "Request that the response include the total count by specifying `include=[\"total_count\"]`.\n" - }, - { - "disabled": false, - "key": "include", - "value": "", - "description": "Request that the response include the total count by specifying `include=[\"total_count\"]`.\n" - }, - { - "disabled": false, - "key": "date_created[elit_5_]", - "value": "", - "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 ≤." - }, - { - "disabled": false, - "key": "date_created[Ut3b0]", - "value": "", - "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 ≤." - }, - { - "disabled": false, - "key": "date_created[eu_f5]", - "value": "", - "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 ≤." - }, - { - "disabled": false, - "key": "size", - "value": "6x18_bifold", - "description": "The self mailer sizes to be returned." - }, - { - "disabled": false, - "key": "size", - "value": "6x18_bifold", - "description": "The self mailer sizes to be returned." - }, - { - "disabled": false, - "key": "scheduled", - "value": "", - "description": "* `true` - only return orders (past or future) where `send_date` is\ngreater than `date_created`\n* `false` - only return orders where `send_date` is equal to `date_created`\n" - }, - { - "disabled": false, - "key": "mail_type", - "value": "usps_first_class", - "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.\n" - }, - { - "disabled": false, - "key": "date_created", - "value": "", - "description": "Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both.\n" - }, - { - "disabled": false, - "key": "send_date", - "value": "", - "description": "Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both.\n" - }, - { - "disabled": false, - "key": "campaign_id", - "value": "", - "description": "Filters resources created by the provided campaign id, prefixed with `cmp_`." - }, + "query": [], + "variable": [ { "disabled": false, - "key": "status", + "type": "any", "value": "", - "description": "A string describing the render status:\n* `processed` - the rendering process is currently underway.\n* `rendered` - the rendering process has completed successfully.\n* `failed` - the rendering process has failed.\n" + "key": "tmpl_id", + "description": "(Required) id of the template" } - ], - "variable": [] + ] }, "header": [ { @@ -12263,79 +14706,27 @@ }, "response": [ { - "id": "b68fd918-93e6-4202-a3c7-f8c49c6b78dc", - "name": "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.", + "id": "1c3f039b-cca6-40f3-9e99-44175183ffbe", + "name": "Returns a template object", "originalRequest": { "url": { "path": [ - "self_mailers" + "templates", + ":tmpl_id" ], "host": [ "{{baseUrl}}" ], - "query": [ - { - "key": "limit", - "value": "10" - }, - { - "key": "before", - "value": "" - }, - { - "key": "after", - "value": "" - }, - { - "key": "include", - "value": "" - }, - { - "key": "include", - "value": "" - }, - { - "key": "date_created[do_7c]", - "value": "" - }, - { - "key": "date_created[velit_c]", - "value": "" - }, - { - "key": "size", - "value": "6x18_bifold" - }, - { - "key": "size", - "value": "6x18_bifold" - }, - { - "key": "scheduled", - "value": "" - }, - { - "key": "mail_type", - "value": "usps_first_class" - }, - { - "key": "date_created", - "value": "" - }, - { - "key": "send_date", - "value": "" - }, - { - "key": "campaign_id", - "value": "" - }, + "query": [], + "variable": [ { - "key": "status", - "value": "" + "disabled": false, + "type": "any", + "value": "", + "key": "tmpl_id", + "description": "(Required) id of the template" } - ], - "variable": [] + ] }, "header": [ { @@ -12358,84 +14749,32 @@ "value": "application/json" } ], - "body": "{\n \"data\": [\n {\n \"id\": \"sfm_7239rhwqkrfaskas\",\n \"description\": \"April Campaign\",\n \"metadata\": {},\n \"to\": {\n \"id\": \"adr_asdi2y3riuasasoi\",\n \"description\": \"Harry - Office\",\n \"name\": \"Harry Zhang\",\n \"company\": \"Lob\",\n \"phone\": \"5555555555\",\n \"email\": \"harry@lob.com\",\n \"metadata\": {},\n \"address_line1\": \"370 WATER ST\",\n \"address_line2\": \"\",\n \"address_city\": \"SUMMERSIDE\",\n \"address_state\": \"PRINCE EDWARD ISLAND\",\n \"address_zip\": \"C1N 1C4\",\n \"address_country\": \"CANADA\",\n \"recipient_moved\": false,\n \"date_created\": \"2019-09-20T00:14:00.361Z\",\n \"date_modified\": \"2019-09-20T00:14:00.361Z\",\n \"object\": \"address\"\n },\n \"from\": {\n \"id\": \"adr_210a8d4b0b76d77b\",\n \"description\": null,\n \"name\": null,\n \"company\": \"LOB\",\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2018-12-08T03:01:07.651Z\",\n \"date_modified\": \"2018-12-08T03:01:07.651Z\",\n \"object\": \"address\"\n },\n \"url\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf.pdf?version=v1&expires=1618781264&signature=YP_bCwrgVA2lz1Gr1YVCJN1f-WspUGsH0aJp2ihjfLXU7lDUV12_xRv4uPch0mfWeOOxEqpyP8hGpgvjmQKNAw\",\n \"outside_template_id\": \"tmpl_a3cb937f26d7eec\",\n \"inside_template_id\": \"tmpl_a3cb937f26d7eec\",\n \"inside_template_version_id\": \"vrsn_bfdf70893b00a85\",\n \"outside_template_version_id\": \"vrsn_bfdf70893b00a85\",\n \"carrier\": \"USPS\",\n \"tracking_events\": [],\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_1.png?version=v1&expires=1618781264&signature=A7q5HbRO53sUYYnwGlmP5mTS6ylLE7kS2mYhfcEOdexjyqG7UseK0MD26DppE4Q0aE4u2msDVMxd5ukjMerYCg\",\n \"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\",\n \"large\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_1.png?version=v1&expires=1618781264&signature=g2jifhCselPqIj8au6lsbJMNFN8ZX3aM6GkLoAXiHBCS8X5mF9nhVbmO0odpnmwNlV1CWIp-MXVsZkC3NmxqBQ\"\n },\n {\n \"small\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_2.png?version=v1&expires=1618781264&signature=biJY4-ZbNNRydPYg3cZkq7wxjILbPBK_nIVyoyQsg5X5q4jlsa-2fzeMa48V9jprUetsC6WEuYvasHosRfG_DQ\",\n \"medium\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_2.png?version=v1&expires=1618781264&signature=xEAX7bURyc8fSphacuo5yb7iVIpT8Xvq05KgMaNQS4r3aCpx0z1p42wbPmW758B5Ae0li1YDYvVyzS7qJIoWAw\",\n \"large\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_2.png?version=v1&expires=1618781264&signature=NieHDnoQ7STZUvofHrFt7S987CzIkUJWpaSgpVQPZw-C3_wwTPsIrvxYdXEuFrr6ciTUcxRBFPlE0lurmMkyCA\"\n }\n ],\n \"merge_variables\": {\n \"name\": null\n },\n \"size\": \"6x18_bifold\",\n \"mail_type\": \"usps_first_class\",\n \"expected_delivery_date\": \"2021-03-24\",\n \"date_created\": \"2021-03-16T18:40:40.504Z\",\n \"date_modified\": \"2021-03-16T18:41:06.691Z\",\n \"send_date\": \"2021-03-16T18:45:40.493Z\",\n \"deleted\": true,\n \"use_type\": \"marketing\",\n \"fsc\": false,\n \"object\": \"self_mailer\"\n },\n {\n \"id\": \"sfm_8ffbe811dea49dcf\",\n \"description\": \"April Campaign\",\n \"metadata\": {},\n \"to\": {\n \"id\": \"adr_f9228b743884ff98\",\n \"description\": null,\n \"name\": \"AYA\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"2812 PARK RD\",\n \"address_line2\": null,\n \"address_city\": \"CHARLOTTE\",\n \"address_state\": \"NC\",\n \"address_zip\": \"28209-1314\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2021-03-16T18:40:40.410Z\",\n \"date_modified\": \"2021-03-16T18:40:40.410Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"from\": {\n \"id\": \"adr_210a8d4b0b76d77b\",\n \"description\": null,\n \"name\": null,\n \"company\": \"LOB\",\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2018-12-08T03:01:07.651Z\",\n \"date_modified\": \"2018-12-08T03:01:07.651Z\",\n \"object\": \"address\"\n },\n \"url\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf.pdf?version=v1&expires=1618781264&signature=YP_bCwrgVA2lz1Gr1YVCJN1f-WspUGsH0aJp2ihjfLXU7lDUV12_xRv4uPch0mfWeOOxEqpyP8hGpgvjmQKNAw\",\n \"outside_template_id\": \"tmpl_a3cb937f26d7eec\",\n \"inside_template_id\": \"tmpl_a3cb937f26d7eec\",\n \"inside_template_version_id\": \"vrsn_bfdf70893b00a85\",\n \"outside_template_version_id\": \"vrsn_bfdf70893b00a85\",\n \"carrier\": \"USPS\",\n \"tracking_events\": [],\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_1.png?version=v1&expires=1618781264&signature=A7q5HbRO53sUYYnwGlmP5mTS6ylLE7kS2mYhfcEOdexjyqG7UseK0MD26DppE4Q0aE4u2msDVMxd5ukjMerYCg\",\n \"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\",\n \"large\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_1.png?version=v1&expires=1618781264&signature=g2jifhCselPqIj8au6lsbJMNFN8ZX3aM6GkLoAXiHBCS8X5mF9nhVbmO0odpnmwNlV1CWIp-MXVsZkC3NmxqBQ\"\n },\n {\n \"small\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_2.png?version=v1&expires=1618781264&signature=biJY4-ZbNNRydPYg3cZkq7wxjILbPBK_nIVyoyQsg5X5q4jlsa-2fzeMa48V9jprUetsC6WEuYvasHosRfG_DQ\",\n \"medium\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_2.png?version=v1&expires=1618781264&signature=xEAX7bURyc8fSphacuo5yb7iVIpT8Xvq05KgMaNQS4r3aCpx0z1p42wbPmW758B5Ae0li1YDYvVyzS7qJIoWAw\",\n \"large\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_2.png?version=v1&expires=1618781264&signature=NieHDnoQ7STZUvofHrFt7S987CzIkUJWpaSgpVQPZw-C3_wwTPsIrvxYdXEuFrr6ciTUcxRBFPlE0lurmMkyCA\"\n }\n ],\n \"merge_variables\": {\n \"name\": null\n },\n \"size\": \"6x18_bifold\",\n \"mail_type\": \"usps_first_class\",\n \"expected_delivery_date\": \"2021-03-24\",\n \"date_created\": \"2021-03-16T18:40:40.504Z\",\n \"date_modified\": \"2021-03-16T18:41:06.691Z\",\n \"send_date\": \"2021-03-16T18:45:40.493Z\",\n \"deleted\": true,\n \"use_type\": \"marketing\",\n \"fsc\": true,\n \"object\": \"self_mailer\"\n }\n ],\n \"object\": \"list\",\n \"next_url\": null,\n \"previous_url\": null,\n \"count\": 2\n}", + "body": "{\n \"id\": \"tmpl_c94e83ca2cd5121\",\n \"description\": \"Test Template\",\n \"versions\": [\n {\n \"id\": \"vrsn_362184d96d9b0c9\",\n \"suggest_json_editor\": true,\n \"description\": \"Test Template\",\n \"engine\": \"legacy\",\n \"html\": \"HTML for {{name}}\",\n \"date_created\": \"2017-11-07T22:56:10.962Z\",\n \"date_modified\": \"2017-11-07T22:56:10.962Z\",\n \"object\": \"version\"\n }\n ],\n \"published_version\": {\n \"id\": \"vrsn_362184d96d9b0c9\",\n \"suggest_json_editor\": false,\n \"description\": \"Test Template\",\n \"engine\": \"handlebars\",\n \"html\": \"HTML for {{name}}\",\n \"date_created\": \"2017-11-07T22:56:10.962Z\",\n \"date_modified\": \"2017-11-07T22:56:10.962Z\",\n \"object\": \"version\"\n },\n \"metadata\": {},\n \"date_created\": \"2017-11-07T22:56:10.962Z\",\n \"date_modified\": \"2017-11-07T22:56:10.962Z\",\n \"object\": \"template\"\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "ec38b6d9-5546-4c54-b751-34a6befac69f", + "id": "77160935-43e9-4cda-884a-f78369113c9a", "name": "Error", "originalRequest": { "url": { "path": [ - "self_mailers" - ], - "host": [ - "{{baseUrl}}" - ], - "query": [ - { - "key": "limit", - "value": "10" - }, - { - "key": "before", - "value": "" - }, - { - "key": "after", - "value": "" - }, - { - "key": "include", - "value": "" - }, - { - "key": "include", - "value": "" - }, - { - "key": "date_created[do_7c]", - "value": "" - }, - { - "key": "date_created[velit_c]", - "value": "" - }, - { - "key": "size", - "value": "6x18_bifold" - }, - { - "key": "size", - "value": "6x18_bifold" - }, - { - "key": "scheduled", - "value": "" - }, - { - "key": "mail_type", - "value": "usps_first_class" - }, - { - "key": "date_created", - "value": "" - }, - { - "key": "send_date", - "value": "" - }, - { - "key": "campaign_id", - "value": "" - }, + "templates", + ":tmpl_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ { - "key": "status", - "value": "" + "disabled": false, + "type": "any", + "value": "", + "key": "tmpl_id", + "description": "(Required) id of the template" } - ], - "variable": [] + ] }, "header": [ { @@ -12458,7 +14797,7 @@ "value": "application/json" } ], - "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"to address not found\",\n \"status_code\": 404\n }\n}", + "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"html is required\",\n \"status_code\": 422\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } @@ -12466,38 +14805,34 @@ "event": [] }, { - "id": "c103d10f-4920-4ce6-9b2c-1083dbab148a", - "name": "Create", + "id": "908d4bc1-4132-4ac2-86c2-3bfe1fd6816e", + "name": "Update", "request": { - "name": "Create", + "name": "Update", "description": { - "content": "Creates a new self_mailer given information", + "content": "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.", "type": "text/plain" }, "url": { "path": [ - "self_mailers" + "templates", + ":tmpl_id" ], "host": [ "{{baseUrl}}" ], - "query": [ + "query": [], + "variable": [ { "disabled": false, - "key": "idempotency_key", + "type": "any", "value": "", - "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.\n" + "key": "tmpl_id", + "description": "(Required) id of the template" } - ], - "variable": [] + ] }, "header": [ - { - "disabled": 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.\n", - "key": "Idempotency-Key", - "value": "" - }, { "key": "Content-Type", "value": "application/x-www-form-urlencoded" @@ -12514,131 +14849,40 @@ "urlencoded": [ { "disabled": false, - "key": "value", - "value": "" - }, - { - "disabled": false, - "key": "inside", - "value": "" - }, - { - "disabled": false, - "key": "outside", - "value": "" - }, - { - "disabled": false, - "key": "use_type", - "value": "" - }, - { - "disabled": false, - "key": "value", - "value": "" - }, - { - "disabled": false, - "key": "metadata[value]", - "value": "" - }, - { - "disabled": false, - "key": "value", - "value": "" - }, - { - "disabled": false, - "key": "merge_variables[value]", - "value": "" - }, - { - "disabled": false, - "key": "value", - "value": "" - }, - { - "disabled": false, - "key": "value", - "value": "" - }, - { - "disabled": false, - "key": "value", - "value": "" - }, - { - "disabled": false, - "key": "billing_group_id", - "value": "" - }, - { - "disabled": false, - "key": "position", - "value": "" - }, - { - "disabled": false, - "key": "redirect_url", - "value": "" - }, - { - "disabled": false, - "key": "width", - "value": "" - }, - { - "disabled": false, - "key": "top", - "value": "" - }, - { - "disabled": false, - "key": "right", - "value": "" - }, - { - "disabled": false, - "key": "left", - "value": "" - }, - { - "disabled": false, - "key": "bottom", + "key": "description", "value": "" }, { "disabled": false, - "key": "pages", + "key": "published_version", "value": "" - }, - { - "disabled": false, - "key": "fsc", - "value": "false" } ] } }, "response": [ { - "id": "bcaa908f-ee68-4559-b011-8f6d3deddf59", - "name": "Returns a self_mailer object", + "id": "b08922d4-a1e1-4512-93d5-bddcc25c7b85", + "name": "Returns the updated template object", "originalRequest": { "url": { "path": [ - "self_mailers" + "templates", + ":tmpl_id" ], "host": [ "{{baseUrl}}" ], - "query": [ + "query": [], + "variable": [ { - "key": "idempotency_key", - "value": "026e7634-24d7-486c-a0bb-4a17fd0eebc5" + "disabled": false, + "type": "any", + "value": "", + "key": "tmpl_id", + "description": "(Required) id of the template" } - ], - "variable": [] + ] }, "header": [ { @@ -12646,109 +14890,23 @@ "content": "Added as a part of security scheme: basic", "type": "text/plain" }, - "key": "Authorization", - "value": "Basic " - }, - { - "disabled": 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.\n", - "key": "Idempotency-Key", - "value": "026e7634-24d7-486c-a0bb-4a17fd0eebc5" - } - ], - "method": "POST", - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "key": "description", - "value": "Demo Self Mailer job" - }, - { - "disabled": false, - "key": "to", - "value": "adr_bae820679f3f536b" - }, - { - "disabled": false, - "key": "from", - "value": "adr_210a8d4b0b76d77b" - }, - { - "disabled": false, - "key": "inside", - "value": "https://lob.com/selfmailerinside.pdf" - }, - { - "disabled": false, - "key": "outside", - "value": "https://lob.com/selfmaileroutside.pdf" - }, - { - "disabled": false, - "key": "size", - "value": "12x9_bifold" - }, - { - "disabled": false, - "key": "metadata[spiffy]", - "value": "true" - }, - { - "disabled": false, - "key": "mail_type", - "value": "usps_standard" - }, - { - "disabled": false, - "key": "merge_variables[name]", - "value": "Harry" - }, - { - "disabled": false, - "key": "send_date", - "value": "2017-11-01T00:00:00.000Z" - }, - { - "disabled": false, - "key": "use_type", - "value": "marketing" - }, - { - "disabled": false, - "key": "position", - "value": "relative" - }, - { - "disabled": false, - "key": "redirect_url", - "value": "https://www.lob.com" - }, - { - "disabled": false, - "key": "width", - "value": "2.5" - }, - { - "disabled": false, - "key": "top", - "value": "2.5" - }, - { - "disabled": false, - "key": "right", - "value": "2.5" - }, + "key": "Authorization", + "value": "Basic " + } + ], + "method": "POST", + "body": { + "mode": "urlencoded", + "urlencoded": [ { "disabled": false, - "key": "pages", - "value": "inside,outside" + "key": "description", + "value": "Updated Example" }, { "disabled": false, - "key": "fsc", - "value": "true" + "key": "published_version", + "value": "vrsn_a" } ] } @@ -12779,28 +14937,32 @@ "value": "application/json" } ], - "body": "{\n \"id\": \"sfm_8ffbe811dea49dcf\",\n \"description\": \"April Campaign\",\n \"metadata\": {},\n \"to\": {\n \"id\": \"adr_bae820679f3f536b\",\n \"description\": null,\n \"name\": \"HARRY ZHANG\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2017-09-05T17:47:53.767Z\",\n \"date_modified\": \"2017-09-05T17:47:53.767Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"from\": {\n \"id\": \"adr_210a8d4b0b76d77b\",\n \"description\": null,\n \"name\": \"LEORE AVIDAR\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2017-09-05T17:47:53.767Z\",\n \"date_modified\": \"2017-09-05T17:47:53.767Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"url\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA\",\n \"outside_template_id\": \"tmpl_a3cb937f26d7eec\",\n \"inside_template_id\": \"tmpl_a3cb937f26d7eec\",\n \"inside_template_version_id\": \"vrsn_bfdf70893b00a85\",\n \"outside_template_version_id\": \"vrsn_bfdf70893b00a85\",\n \"carrier\": \"USPS\",\n \"tracking_events\": [],\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA\",\n \"medium\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_1.png?version=v1&expires=1618512040&signature=ryxN7bsXGtw_GRFSP3Cs3A3IYjxZi3cW9BHDCNgMt6p3nobVmsc_iFHt2e-S7ndAXhhN7nP-MQVov3bt3r37BQ\",\n \"large\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg\"\n },\n {\n \"small\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_small_2.png?version=v1&expires=1618512040&signature=3gTgU7Fd3KoT_vNlQnTGptRps5ZgnkhSnPrAwk7L98higIzSwfKoLvuu_DIpMM48dHbxckKT9waR8euJ4KSDBQ\",\n \"medium\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_medium_2.png?version=v1&expires=1618512040&signature=Ue1lw5CMj7KRx6cMQL8xPeazaHCdJzWcACd1w3acuYPnWkVIpSt62OIO7hAtpAQK9xm1dhhlFj0rqRZMdRMMBA\",\n \"large\": \"https://lob-assets.com/self-mailers/sfm_8ffbe811dea49dcf_thumb_large_2.png?version=v1&expires=1618512040&signature=cICc7HEm1xG_eyM4a_wtvPk2FqoLRmtgGa29kJisWnMIYBL0OkyzG4ZCYGMhp-5cZpJlSpXfTgGKh_Qmeo1TDw\"\n }\n ],\n \"merge_variables\": {\n \"name\": null\n },\n \"size\": \"6x18_bifold\",\n \"mail_type\": \"usps_first_class\",\n \"expected_delivery_date\": \"2021-03-24\",\n \"date_created\": \"2021-03-16T18:40:40.504Z\",\n \"date_modified\": \"2021-03-16T18:40:40.504Z\",\n \"send_date\": \"2021-03-16T18:45:40.493Z\",\n \"use_type\": \"marketing\",\n \"fsc\": false,\n \"object\": \"self_mailer\"\n}", + "body": "{\n \"id\": \"tmpl_c94e83ca2cd5121\",\n \"description\": \"Test Template\",\n \"versions\": [\n {\n \"id\": \"vrsn_362184d96d9b0c9\",\n \"suggest_json_editor\": true,\n \"description\": \"Test Template\",\n \"engine\": \"legacy\",\n \"html\": \"HTML for {{name}}\",\n \"date_created\": \"2017-11-07T22:56:10.962Z\",\n \"date_modified\": \"2017-11-07T22:56:10.962Z\",\n \"object\": \"version\"\n }\n ],\n \"published_version\": {\n \"id\": \"vrsn_362184d96d9b0c9\",\n \"suggest_json_editor\": false,\n \"description\": \"Test Template\",\n \"engine\": \"handlebars\",\n \"html\": \"HTML for {{name}}\",\n \"date_created\": \"2017-11-07T22:56:10.962Z\",\n \"date_modified\": \"2017-11-07T22:56:10.962Z\",\n \"object\": \"version\"\n },\n \"metadata\": {},\n \"date_created\": \"2017-11-07T22:56:10.962Z\",\n \"date_modified\": \"2017-11-07T22:56:10.962Z\",\n \"object\": \"template\"\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "43fb7344-3c78-4a74-8eab-8595a28498e1", + "id": "5d1092d7-5e0a-4cb0-a4e6-6d58121ba6b7", "name": "Error", "originalRequest": { "url": { "path": [ - "self_mailers" + "templates", + ":tmpl_id" ], "host": [ "{{baseUrl}}" ], - "query": [ + "query": [], + "variable": [ { - "key": "idempotency_key", - "value": "026e7634-24d7-486c-a0bb-4a17fd0eebc5" + "disabled": false, + "type": "any", + "value": "", + "key": "tmpl_id", + "description": "(Required) id of the template" } - ], - "variable": [] + ] }, "header": [ { @@ -12810,12 +14972,6 @@ }, "key": "Authorization", "value": "Basic " - }, - { - "disabled": 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.\n", - "key": "Idempotency-Key", - "value": "026e7634-24d7-486c-a0bb-4a17fd0eebc5" } ], "method": "POST", @@ -12825,95 +14981,155 @@ { "disabled": false, "key": "description", - "value": "Demo Self Mailer job" - }, - { - "disabled": false, - "key": "to", - "value": "adr_bae820679f3f536b" - }, - { - "disabled": false, - "key": "from", - "value": "adr_210a8d4b0b76d77b" - }, - { - "disabled": false, - "key": "inside", - "value": "https://lob.com/selfmailerinside.pdf" - }, - { - "disabled": false, - "key": "outside", - "value": "https://lob.com/selfmaileroutside.pdf" - }, - { - "disabled": false, - "key": "size", - "value": "12x9_bifold" - }, - { - "disabled": false, - "key": "metadata[spiffy]", - "value": "true" - }, - { - "disabled": false, - "key": "mail_type", - "value": "usps_standard" - }, - { - "disabled": false, - "key": "merge_variables[name]", - "value": "Harry" - }, - { - "disabled": false, - "key": "send_date", - "value": "2017-11-01T00:00:00.000Z" - }, - { - "disabled": false, - "key": "use_type", - "value": "marketing" - }, - { - "disabled": false, - "key": "position", - "value": "relative" - }, - { - "disabled": false, - "key": "redirect_url", - "value": "https://www.lob.com" - }, - { - "disabled": false, - "key": "width", - "value": "2.5" - }, - { - "disabled": false, - "key": "top", - "value": "2.5" + "value": "Updated Example" }, { "disabled": false, - "key": "right", - "value": "2.5" - }, + "key": "published_version", + "value": "vrsn_a" + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"html is required\",\n \"status_code\": 422\n }\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "2fd67f1c-5c32-4bd6-890f-37e39f76301d", + "name": "Delete", + "request": { + "name": "Delete", + "description": { + "content": "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.", + "type": "text/plain" + }, + "url": { + "path": [ + "templates", + ":tmpl_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "tmpl_id", + "description": "(Required) id of the template" + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "DELETE", + "auth": null + }, + "response": [ + { + "id": "63bf5ffd-7330-404a-815e-e8a52e54ff9d", + "name": "Deleted", + "originalRequest": { + "url": { + "path": [ + "templates", + ":tmpl_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ { "disabled": false, - "key": "pages", - "value": "inside,outside" + "type": "any", + "value": "", + "key": "tmpl_id", + "description": "(Required) id of the template" + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" }, + "key": "Authorization", + "value": "Basic " + } + ], + "method": "DELETE", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"id\": \"tmpl_123456789\",\n \"deleted\": true\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "60715d82-2640-4da5-8b54-a8458b6bf63b", + "name": "Error", + "originalRequest": { + "url": { + "path": [ + "templates", + ":tmpl_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ { "disabled": false, - "key": "fsc", - "value": "true" + "type": "any", + "value": "", + "key": "tmpl_id", + "description": "(Required) id of the template" } ] - } + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Basic " + } + ], + "method": "DELETE", + "body": {} }, "status": "Internal Server Error", "code": 500, @@ -12923,73 +15139,68 @@ "value": "application/json" } ], - "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"to address not found\",\n \"status_code\": 404\n }\n}", + "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"html is required\",\n \"status_code\": 422\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } ], - "event": [], - "protocolProfileBehavior": { - "disableBodyPruning": true - } - } - ], - "event": [] - }, - { - "id": "a8896b19-b5db-48dd-a70b-7971484d64c7", - "name": "Template Design", - "description": { - "content": "## HTML Templates\nYou can save commonly used HTML as templates within Lob to more easily manage them. You can reference\nyour saved templates in postcard, letter, and check requests instead of having to pass a long HTML\nstring on each request. Additionally, you can make changes to your HTML templates and update them\nindependently, without having to touch your API integration. Templates can be created, edited,\nand viewed on your Dashboard. To use a template in a postcard,\nletter, or check, see the documentation for each endpoint below. For help using templates, check out our\nHTML Templates Guide or get started with a\npre-designed template from our gallery. In Live mode, you can only have\nas many templates as allotted in your current\nPrint & Mail Edition. There is no limit in Test mode.\n\nIf you'd like to interact with templates programmatically, check out our Beta Program for API access\nto the [HTML Templates Endpoints](#tag/Templates).\n\n### Example Create Request using HTML Templates\n```bash\n curl https://api.lob.com/v1/postcards \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -d \"description=Demo Postcard job\" \\\n -d \"to=adr_78c304d54912c502\" \\\n -d \"from=adr_61a0865c8c573139\" \\\n -d \"front=tmpl_b846a20859ae11a\" \\\n -d \"back=tmpl_01b0d396a10c268\" \\\n -d \"merge_variables[name]=Harry\"\n```\n
\n\n\n## HTML Examples\nUse a pre-designed template from our gallery or follow these\nbasic guidelines as starting points for creating custom Postcards,\nSelf Mailers, Letters, and Checks.\n\nPlease follow the standards used in these templates, such as:\n- For any linked assets, you must use a performant file hosting provider with no rate limits such as Amazon\nS3.\n- Use inline styles or an internal stylesheet, do not link to external stylesheets.\n- Link to images that are 300DPI and sized at the final desired size on the physical mailing. For example,\nfor a photo that is desired to be 1in x 1in on the final postcard, the image asset should be sized at 1in\nx 1in at 300DPI (which equates to 300px by 300px).\n- The sum of all linked assets should not exceed 5MB in file size.\n- Use `-webkit` prefixes for CSS properties when recommended here.\n\nBecause different browsers have varying user-agent styles, the HTML you see in your browser will not\nalways look identical to what is produced through the API. It is **strongly** recommended that you test all\nHTML requests by reviewing the final PDF files in your Test Environment, as these are the files that will be\nprinted.\n
\n\n\n## Image Prepping\nCurrently we support the following file types for all endpoints:\n- PDF\n- PNG\n- JPEG\n\n**Templates**\n\nYou can find pre-made templates that already adhere to all of these guidelines here:\n- [Postcards](#tag/Postcards)\n- [Letters](#tag/Letters)\n- [Checks](#tag/Checks)\n- [Self Mailers](#tag/Self-Mailers)\n\n**Prepping All Images**\n\nThe following guidelines apply to image types:\n- Images should be 300 dpi or higher - PNG/JPEG files with less than 300 dpi will be rejected.\n- Your artwork should include a 1/8\" border around the final trim size. This means your final file size will be a total of 0.25\" larger than your expected printed piece (ie, a 4\"x6\" postcard should be submitted as 4.25\"x6.25\"). There is no need to include crop marks in your submitted content.\n- Include a safe zone – make sure no critical elements are within 1/8\" from the edge of the final size.\n- Do not include any additional postage marks or indicia.\n- File sizes should be no larger than 5MB.\n\n**Prepping PDFs**\n\nTo ensure that you are producing PDF's correctly please follow the guidelines below:\n- [Make sure all non-standard fonts are embedded.](#section/Standard-PDF-Fonts)\n- Generated PDF's need to be be PDF/A compliant.\n\n**Prepping PNGs/JPEGs**\n\nTo ensure that you are producing PNG's/JPEG's correctly please follow the guidelines below:\n\n- Minimum 300 dpi. The dpi is calculated as (width of image in pixels) / (width of product in inches) and (length of image in pixels) / (length of product in inches). For Example: 1275px x 1875px image used to create a 4.25\" x 6.25\" postcard has a dpi of 300.\n- Submitted images must have the same length to width ratio as the chosen product. Images will not be cropped or stretched by the API.\n
\n\n\n## Standard PDF Fonts\nIdeally, all fonts in provided PDFs should be embedded. Embedding a font in a PDF ensures that the final\nprinted product will look as it was designed. Fonts can vary greatly in size and shape, even within the\nsame family. If the exact font that was used to design the artwork is not used to print, the look and\nplacement of the text is not guaranteed to be the same.\n\nIn general, requests that provide PDFs with un-embedded fonts will be rejected. We make an exception for\n\"standard fonts\", a set of fonts that we have identified as being common. PDFs that contain un-embedded\nfonts that are found in the list, and match the accepted font type\nwill be accepted. Otherwise, the request will be rejected.\n\nFont embedding is an essential part of standard PDF workflows. Fonts should be embedded automatically by\nPDF editing software that are compliant with PDF standards.\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FONT NAMETYPES
ArialType 1, TrueType, CID TrueType
Arial,BoldType 1, TrueType, CID TrueType
Arial,BoldItalicType 1, TrueType, CID TrueType
Arial,ItalicTrueType, CID TrueType
ArialMTTrueType, CID TrueType
Arial-BoldMTTrueType
Arial-BoldItalicMTTrueType
Arial-ItalicMTTrueType
ArialNarrowTrueType
ArialNarrow-BoldTrueType
CalibriTrueType
Calibri-BoldTrueType
Calibri-ItalicTrueType
CourierType 1
Courier-ObliqueType 1
Courier-BoldType 1
Courier-BoldObliqueType 1
CourierNewPSMTTrueType
CourierNewPS-ItalicMTTrueType
CourierNewPS-BoldMTTrueType
HelveticaType 1
Helvetica-BoldType 1
Helvetica-BoldObliqueType 1
Helvetica-ObliqueType 1
LucidaConsoleTrueType
MsSansSerifTrueType
MsSansSerif,BoldTrueType
SymbolType 1, TrueType
TahomaTrueType
Tahoma-BoldTrueType
Times-BoldType 1
Times-BoldItalicType 1
Times-ItalicType 1
Times-RomanType 1
TimesNewRomanPS-BoldItalicMTTrueType
TimesNewRomanPS-BoldMTTrueType
TimesNewRomanPS-ItalicMTTrueType
TimesNewRomanPSMTTrueType, CID TrueType
TimesNewRomanPSMT,BoldTrueType
VerdanaTrueType
Verdana-BoldTrueType
Verdana,ItalicTrueType
ZapfDingbatsType 1
\n\n", - "type": "text/plain" - }, - "item": [], - "event": [] - }, - { - "id": "e02e3654-96e0-4dd4-9433-3afaa5891190", - "name": "Template Versions", - "description": { - "content": "These API endpoints allow you to create, retrieve, update and delete versions of reusable HTML templates for use with the Print & Mail API.\n\n", - "type": "text/plain" - }, - "item": [ + "event": [] + }, { - "id": "7a46f5c8-9a07-422d-867d-b510d8431c68", - "name": "Retrieve", + "id": "f7b60657-96ad-4cd3-a3d5-f31713210a09", + "name": "List", "request": { - "name": "Retrieve", + "name": "List", "description": { - "content": "Retrieves the template version with the given template and version ids.", + "content": "Returns a list of your templates. The templates are returned sorted by creation date, with the most recently created templates appearing first.", "type": "text/plain" }, "url": { "path": [ - "templates", - ":tmpl_id", - "versions", - ":vrsn_id" + "templates" ], "host": [ "{{baseUrl}}" ], - "query": [], - "variable": [ + "query": [ { "disabled": false, - "type": "any", + "key": "limit", + "value": "10", + "description": "How many results to return." + }, + { + "disabled": false, + "key": "before", "value": "", - "key": "tmpl_id", - "description": "(Required) The ID of the template to which the version belongs." + "description": "`before` and `after` are both optional but only one of them can be in the query at a time.\n" }, { "disabled": false, - "type": "any", + "key": "after", "value": "", - "key": "vrsn_id", - "description": "(Required) id of the template_version" + "description": "`before` and `after` are both optional but only one of them can be in the query at a time.\n" + }, + { + "disabled": false, + "key": "include", + "value": "", + "description": "Request that the response include the total count by specifying `include=[\"total_count\"]`.\n" + }, + { + "disabled": false, + "key": "include", + "value": "", + "description": "Request that the response include the total count by specifying `include=[\"total_count\"]`.\n" + }, + { + "disabled": false, + "key": "date_created[ut_ad]", + "value": "", + "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 ≤." } - ] + ], + "variable": [] }, "header": [ { @@ -13002,36 +15213,47 @@ }, "response": [ { - "id": "d9fa6177-d7cc-42af-ad33-93d00de8e382", - "name": "Returns the template version with the given template and version ids.", + "id": "e771332f-170c-4213-b4de-8b4473cf6263", + "name": "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.", "originalRequest": { "url": { "path": [ - "templates", - ":tmpl_id", - "versions", - ":vrsn_id" + "templates" ], "host": [ "{{baseUrl}}" ], - "query": [], - "variable": [ + "query": [ { - "disabled": false, - "type": "any", - "value": "", - "key": "tmpl_id", - "description": "(Required) The ID of the template to which the version belongs." + "key": "limit", + "value": "10" }, { - "disabled": false, - "type": "any", - "value": "", - "key": "vrsn_id", - "description": "(Required) id of the template_version" + "key": "before", + "value": "" + }, + { + "key": "after", + "value": "" + }, + { + "key": "include", + "value": "" + }, + { + "key": "include", + "value": "" + }, + { + "key": "date_created[dolore09b]", + "value": "" + }, + { + "key": "date_created[ind8]", + "value": "" } - ] + ], + "variable": [] }, "header": [ { @@ -13054,41 +15276,52 @@ "value": "application/json" } ], - "body": "{\n \"id\": \"vrsn_534e339882d2282\",\n \"description\": \"Second Version\",\n \"html\": \"Second HTML for {{name}}\",\n \"date_created\": \"2017-11-09T04:49:38.016Z\",\n \"date_modified\": \"2017-11-09T04:49:38.016Z\",\n \"object\": \"version\"\n}", + "body": "{\n \"data\": [\n {\n \"id\": \"tmpl_d5a5a89da9106f8\",\n \"description\": \"Test Template\",\n \"versions\": [\n {\n \"id\": \"vrsn_232a02fb8224791\",\n \"suggest_json_editor\": true,\n \"description\": \"Test Template\",\n \"engine\": \"legacy\",\n \"html\": \"HTML for \",\n \"date_created\": \"2019-07-27T23:49:01.512Z\",\n \"date_modified\": \"2019-07-27T23:49:01.512Z\",\n \"object\": \"version\"\n }\n ],\n \"published_version\": {\n \"id\": \"vrsn_232a02fb8224791\",\n \"suggest_json_editor\": false,\n \"description\": \"Test Template\",\n \"engine\": \"handlebars\",\n \"html\": \"HTML for \",\n \"date_created\": \"2019-07-27T23:49:01.512Z\",\n \"date_modified\": \"2019-07-27T23:49:01.512Z\",\n \"object\": \"version\"\n },\n \"metadata\": {},\n \"date_created\": \"2019-07-27T23:49:01.511Z\",\n \"date_modified\": \"2019-07-27T23:49:01.511Z\",\n \"object\": \"template\"\n },\n {\n \"id\": \"tmpl_59b2150ae120887\",\n \"description\": \"Test Template\",\n \"versions\": [\n {\n \"id\": \"vrsn_2a7eb63ccb795b9\",\n \"description\": \"Test Template\",\n \"html\": \"HTML for \",\n \"date_created\": \"2019-03-29T10:22:34.643Z\",\n \"date_modified\": \"2019-03-29T10:22:34.643Z\",\n \"object\": \"version\"\n }\n ],\n \"published_version\": {\n \"id\": \"vrsn_2a7eb63ccb795b9\",\n \"description\": \"Test Template\",\n \"html\": \"HTML for \",\n \"date_created\": \"2019-03-29T10:22:34.643Z\",\n \"date_modified\": \"2019-03-29T10:22:34.643Z\",\n \"object\": \"version\"\n },\n \"metadata\": {},\n \"date_created\": \"2019-03-29T10:22:34.642Z\",\n \"date_modified\": \"2019-03-29T10:22:34.642Z\",\n \"object\": \"template\"\n }\n ],\n \"object\": \"list\",\n \"previous_url\": null,\n \"next_url\": \"https://api.lob.com/v1/templates?limit=2&after=eyJkYXRlT2Zmc2V0IjoiMjAxOS0wMy0yOVQxMDoyMjozNC42NDJaIiwiaWRPZmZzZXQiOiJ0bXBsXzU5YjIxNTBhZTEyMDg4NyJ9\",\n \"count\": 2\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "037ac76a-810d-47cc-94f2-ceedebd71d6b", + "id": "ff0fca7e-1aa4-40b9-9973-cf5617841711", "name": "Error", "originalRequest": { "url": { "path": [ - "templates", - ":tmpl_id", - "versions", - ":vrsn_id" + "templates" ], "host": [ "{{baseUrl}}" ], - "query": [], - "variable": [ + "query": [ { - "disabled": false, - "type": "any", - "value": "", - "key": "tmpl_id", - "description": "(Required) The ID of the template to which the version belongs." + "key": "limit", + "value": "10" }, { - "disabled": false, - "type": "any", - "value": "", - "key": "vrsn_id", - "description": "(Required) id of the template_version" + "key": "before", + "value": "" + }, + { + "key": "after", + "value": "" + }, + { + "key": "include", + "value": "" + }, + { + "key": "include", + "value": "" + }, + { + "key": "date_created[dolore09b]", + "value": "" + }, + { + "key": "date_created[ind8]", + "value": "" } - ] + ], + "variable": [] }, "header": [ { @@ -13119,41 +15352,23 @@ "event": [] }, { - "id": "20fa6c6a-4c7f-4029-8346-74a50b6bae69", - "name": "Update", + "id": "961b9b31-b7e0-4e84-a8ea-d9c7994a59ac", + "name": "Create", "request": { - "name": "Update", + "name": "Create", "description": { - "content": "Updates the template version with the given template and version ids.", + "content": "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.", "type": "text/plain" }, "url": { "path": [ - "templates", - ":tmpl_id", - "versions", - ":vrsn_id" + "templates" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "type": "any", - "value": "", - "key": "tmpl_id", - "description": "(Required) The ID of the template to which the version belongs." - }, - { - "disabled": false, - "type": "any", - "value": "", - "key": "vrsn_id", - "description": "(Required) id of the template_version" - } - ] + "variable": [] }, "header": [ { @@ -13170,11 +15385,22 @@ "body": { "mode": "urlencoded", "urlencoded": [ + { + "disabled": false, + "key": "html", + "value": "", + "description": "(Required) " + }, { "disabled": false, "key": "description", "value": "" }, + { + "disabled": false, + "key": "metadata", + "value": "&W~=Mx]:`yA30&5[2BV[TD (@joaWku` HWpe,+zDGMGRC;nX}nsK?=e0%ce6Zl'DSK X)^78_95tT)NnC{fyoPK ;i6$=V4];.H9R.GGY^@f" + }, { "disabled": false, "key": "engine", @@ -13195,36 +15421,18 @@ }, "response": [ { - "id": "834c670b-a0b3-41df-adde-0d4842616e11", - "name": "Returns the template version with the given template and version ids.", + "id": "d86ed29c-4716-4904-a94f-db4d701113f8", + "name": "Returns a template object", "originalRequest": { "url": { "path": [ - "templates", - ":tmpl_id", - "versions", - ":vrsn_id" + "templates" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "type": "any", - "value": "", - "key": "tmpl_id", - "description": "(Required) The ID of the template to which the version belongs." - }, - { - "disabled": false, - "type": "any", - "value": "", - "key": "vrsn_id", - "description": "(Required) id of the template_version" - } - ] + "variable": [] }, "header": [ { @@ -13243,7 +15451,26 @@ { "disabled": false, "key": "description", - "value": "Some description" + "value": "demo" + }, + { + "disabled": false, + "description": { + "content": "(Required) ", + "type": "text/plain" + }, + "key": "html", + "value": "HTML for {{name}}" + }, + { + "disabled": false, + "key": "spiffy", + "value": "true" + }, + { + "disabled": false, + "key": "engine", + "value": "handlebars" } ] } @@ -13274,41 +15501,23 @@ "value": "application/json" } ], - "body": "{\n \"id\": \"vrsn_534e339882d2282\",\n \"description\": \"Second Version\",\n \"html\": \"Second HTML for {{name}}\",\n \"date_created\": \"2017-11-09T04:49:38.016Z\",\n \"date_modified\": \"2017-11-09T04:49:38.016Z\",\n \"object\": \"version\"\n}", + "body": "{\n \"id\": \"tmpl_c94e83ca2cd5121\",\n \"description\": \"Test Template\",\n \"versions\": [\n {\n \"id\": \"vrsn_362184d96d9b0c9\",\n \"suggest_json_editor\": true,\n \"description\": \"Test Template\",\n \"engine\": \"legacy\",\n \"html\": \"HTML for {{name}}\",\n \"date_created\": \"2017-11-07T22:56:10.962Z\",\n \"date_modified\": \"2017-11-07T22:56:10.962Z\",\n \"object\": \"version\"\n }\n ],\n \"published_version\": {\n \"id\": \"vrsn_362184d96d9b0c9\",\n \"suggest_json_editor\": false,\n \"description\": \"Test Template\",\n \"engine\": \"handlebars\",\n \"html\": \"HTML for {{name}}\",\n \"date_created\": \"2017-11-07T22:56:10.962Z\",\n \"date_modified\": \"2017-11-07T22:56:10.962Z\",\n \"object\": \"version\"\n },\n \"metadata\": {},\n \"date_created\": \"2017-11-07T22:56:10.962Z\",\n \"date_modified\": \"2017-11-07T22:56:10.962Z\",\n \"object\": \"template\"\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "e03f7d41-0de5-40e2-8011-1f28af9069aa", + "id": "cf2b9300-cc3d-4916-b1ba-d2a65796cd18", "name": "Error", "originalRequest": { "url": { - "path": [ - "templates", - ":tmpl_id", - "versions", - ":vrsn_id" + "path": [ + "templates" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "type": "any", - "value": "", - "key": "tmpl_id", - "description": "(Required) The ID of the template to which the version belongs." - }, - { - "disabled": false, - "type": "any", - "value": "", - "key": "vrsn_id", - "description": "(Required) id of the template_version" - } - ] + "variable": [] }, "header": [ { @@ -13327,7 +15536,26 @@ { "disabled": false, "key": "description", - "value": "Some description" + "value": "demo" + }, + { + "disabled": false, + "description": { + "content": "(Required) ", + "type": "text/plain" + }, + "key": "html", + "value": "HTML for {{name}}" + }, + { + "disabled": false, + "key": "spiffy", + "value": "true" + }, + { + "disabled": false, + "key": "engine", + "value": "handlebars" } ] } @@ -13349,43 +15577,63 @@ "protocolProfileBehavior": { "disableBodyPruning": true } - }, + } + ], + "event": [] + }, + { + "id": "22820f89-b4e9-4a1a-8125-07ce9e8eba7c", + "name": "Test and Live Environments", + "description": { + "content": "To make the API as explorable as possible, accounts have test and live\nenvironment API keys. You're not charged any fees in the test environment,\nso we encourage you to use it to try out services, perform quality\nassurance, and run automated testing. Objects―addresses, letters, checks,\netc―in one environment cannot be manipulated by objects in the other.\n\nIn general, a payment method (either credit card or ACH account) must be\nadded to your account to make live API requests. However, a payment method\nis not required for the first 300 live requests per month to the\n`/v1/us_verifications` endpoint. After the first 300 requests, you will\nbegin receiving errors with status code `403`.\n\nRequests made in the test environment always validate request arguments,\nsimulate live environment behavior, and enforce rate limits. _They never\nprint, mail nor, for verification services, verify addresses._ The US &\nInternational verification services trigger behavior with specific\nargument values, and, if you plan on using those, we recommend reading\n[US Verification Test Environment](#tag/US-Verifications-Test-Environment)\nand [Intl Verification Test Environment](#tag/Intl-Verifications-Test-Environment).\n\nTo switch between environments, use the appropriate key for that\nenvironment when performing a request. You can find each environment's API\nkey in your dashboard under Settings; test API keys are always prefixed\nwith `test_` and production API keys with `live_`.\n\n", + "type": "text/plain" + }, + "item": [], + "event": [] + }, + { + "id": "5c5b62e5-7d62-4ce0-a3cd-ef884902aa3d", + "name": "Tracking Events", + "description": { + "content": "As mailpieces travel through the mail stream, USPS scans their unique barcodes, and Lob processes these mail scans to generate tracking events.\n\n

Certified Tracking Event Details

\n\nLetters sent with USPS Certified Mail are fully tracked by USPS, and\ntherefore their [tracking events](#operation/tracking_event) have an\nadditional `details` object with more detailed information about the\ntracking event. The following table shows the potential values for\nthe fields in the `details` object mapped to the tracking event `name`.\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NAMEEVENTDESCRIPTIONACTION REQUIRED
Mailedpackage_acceptedPackage has been accepted into the carrier network for delivery.false
In Transitpackage_arrivedPackage has arrived at an intermediate location in the carrier network.false
In Transitpackage_departedPackage has departed from an intermediate location in the carrier network.false
In Transitpackage_processingPackage is processing at an intermediate location in the carrier network.false
In Transitpackage_processedPackage has been processed at an intermediate location.false
In Local Areapackage_in_local_areaPackage is at a location near the end destination.false
Processed For Deliverydelivery_scheduledPackage is scheduled for delivery.false
Processed For Deliveryout_for_deliveryPackage is out for delivery.false
Pickup Availablepickup_availablePackage is available for pickup at carrier location.true
DelivereddeliveredPackage has been delivered.false
Re-Routedpackage_forwardedPackage has been forwarded.false
Returned to Senderreturned_to_senderPackage is to be returned to sender.false
Issueaddress_issueAddress information is incorrect. Contact carrier to ensure delivery.true
Issuecontact_carrierContact the carrier for more information.true
IssuedelayedDelivery of package is delayed.false
Issuedelivery_attemptedDelivery of package has been attempted. Contact carrier to ensure delivery.true
Issuedelivery_rescheduledDelivery of package has been rescheduled.false
Issuelocation_inaccessibleDelivery location inaccessible to carrier. Contact carrier to ensure delivery.true
Issuenotice_leftCarrier left notice during attempted delivery. Follow carrier instructions on notice.true
Issuepackage_damagedPackage has been damaged. Contact carrier for more details.true
Issuepackage_disposedPackage has been disposed.false
Issuepackage_heldPackage held at carrier location. Contact carrier for more details.true
Issuepackage_lostPackage has been lost. Contact carrier for more details.true
Issuepackage_unclaimedPackage is unclaimed.true
Issuepackage_undeliverablePackage is not able to be delivered.true
Issuereschedule_deliveryContact carrier to reschedule delivery.true
IssueotherUnrecognized carrier status.false
\n\n", + "type": "text/plain" + }, + "item": [], + "event": [] + }, + { + "id": "6a2e01c8-e1e3-4e66-8403-50b0b512a8d4", + "name": "Uploads", + "description": { + "content": "The uploads endpoint allows you to upload audience files that are then associated with a given campaign.\nAt this time, only CSV files are allowed. The API provides endpoints for creating uploads, uploading audience files,\nand marking uploaded files as ready for processing. The API also provides endpoints for downloading files that\ndescribe the results, both successful and not, of the processing.\n", + "type": "text/plain" + }, + "item": [ { - "id": "95c01974-aad1-4fd8-ad2c-483057ee1e11", - "name": "Delete", + "id": "792f41ee-adde-407b-b458-37be8ff9a590", + "name": "List", "request": { - "name": "Delete", + "name": "List", "description": { - "content": "Permanently deletes a template version. A template's `published_version` can not be deleted.", + "content": "Returns a list of your uploads. Optionally, filter uploads by campaign.", "type": "text/plain" }, "url": { "path": [ - "templates", - ":tmpl_id", - "versions", - ":vrsn_id" + "uploads" ], "host": [ "{{baseUrl}}" ], - "query": [], - "variable": [ - { - "disabled": false, - "type": "any", - "value": "", - "key": "tmpl_id", - "description": "(Required) The ID of the template to which the version belongs." - }, + "query": [ { "disabled": false, - "type": "any", + "key": "campaignId", "value": "", - "key": "vrsn_id", - "description": "(Required) id of the template_version" + "description": "id of the campaign" } - ] + ], + "variable": [] }, "header": [ { @@ -13393,41 +15641,28 @@ "value": "application/json" } ], - "method": "DELETE", + "method": "GET", "auth": null }, "response": [ { - "id": "d3dcd83b-7b87-45c6-90e0-1a3c31673a35", - "name": "Deleted", + "id": "439d6739-2539-41ff-8618-acf9eefc07cf", + "name": "An array of matching uploads. Each entry in the array is a separate upload.", "originalRequest": { "url": { "path": [ - "templates", - ":tmpl_id", - "versions", - ":vrsn_id" + "uploads" ], "host": [ "{{baseUrl}}" ], - "query": [], - "variable": [ - { - "disabled": false, - "type": "any", - "value": "", - "key": "tmpl_id", - "description": "(Required) The ID of the template to which the version belongs." - }, + "query": [ { - "disabled": false, - "type": "any", - "value": "", - "key": "vrsn_id", - "description": "(Required) id of the template_version" + "key": "campaignId", + "value": "" } - ] + ], + "variable": [] }, "header": [ { @@ -13439,7 +15674,7 @@ "value": "Basic " } ], - "method": "DELETE", + "method": "GET", "body": {} }, "status": "OK", @@ -13450,41 +15685,115 @@ "value": "application/json" } ], - "body": "{\n \"id\": \"vrsn_123456789\",\n \"deleted\": true\n}", + "body": "[\n {\n \"id\": \"upl_71be866e430b11e9\",\n \"accountId\": \"fa9ea650fc7b31a89f92\",\n \"campaignId\": \"cmp_1933ad629bae1408\",\n \"mode\": \"test\",\n \"failuresUrl\": \"https://www.example.com\",\n \"originalFilename\": \"my_audience.csv\",\n \"state\": \"Draft\",\n \"totalMailpieces\": 100,\n \"failedMailpieces\": 5,\n \"validatedMailpieces\": 95,\n \"bytesProcessed\": 17268,\n \"dateCreated\": \"2017-09-05T17:47:53.767Z\",\n \"dateModified\": \"2017-09-05T17:47:53.767Z\",\n \"requiredAddressColumnMapping\": {\n \"name\": \"recipient_name\",\n \"address_line1\": \"primary_line\",\n \"address_city\": \"city\",\n \"address_state\": \"state\",\n \"address_zip\": \"zip_code\"\n },\n \"optionalAddressColumnMapping\": {\n \"address_line2\": \"secondary_line\",\n \"company\": \"company\",\n \"address_country\": \"country\"\n },\n \"mergeVariableColumnMapping\": {\n \"gift_code\": \"code\"\n },\n \"metadata\": {\n \"columns\": [\n \"recipient_name\",\n \"zip_code\"\n ]\n }\n }\n]", "cookie": [], "_postman_previewlanguage": "json" + } + ], + "event": [] + }, + { + "id": "80eac0fa-e67e-4cfd-9611-e21ae7e66198", + "name": "Create", + "request": { + "name": "Create", + "description": { + "content": "Creates a new upload with the provided properties.", + "type": "text/plain" + }, + "url": { + "path": [ + "uploads" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "POST", + "auth": null, + "body": { + "mode": "raw", + "raw": "{\n \"campaignId\": \"\",\n \"requiredAddressColumnMapping\": {\n \"name\": null,\n \"address_line1\": null,\n \"address_city\": null,\n \"address_state\": null,\n \"address_zip\": null\n },\n \"optionalAddressColumnMapping\": {\n \"address_line2\": null,\n \"company\": null,\n \"address_country\": null\n },\n \"metadata\": {\n \"columns\": []\n },\n \"mergeVariableColumnMapping\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "response": [ { - "id": "7073a3ad-0fb0-472d-bfae-678e16409eb1", - "name": "Error", + "id": "dba60652-1a12-4b39-8566-78a7e65306f6", + "name": "Upload created successfully", "originalRequest": { "url": { "path": [ - "templates", - ":tmpl_id", - "versions", - ":vrsn_id" + "uploads" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "type": "any", - "value": "", - "key": "tmpl_id", - "description": "(Required) The ID of the template to which the version belongs." + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" }, - { - "disabled": false, - "type": "any", - "value": "", - "key": "vrsn_id", - "description": "(Required) id of the template_version" + "key": "Authorization", + "value": "Basic " + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"campaignId\": \"cmp_1933ad629bae1408\",\n \"requiredAddressColumnMapping\": {\n \"name\": \"recipient_name\",\n \"address_line1\": \"primary_line\",\n \"address_city\": \"city\",\n \"address_state\": \"state\",\n \"address_zip\": \"zip_code\"\n },\n \"optionalAddressColumnMapping\": {\n \"address_line2\": \"secondary_line\",\n \"company\": \"company\",\n \"address_country\": \"country,\"\n },\n \"metadata\": {\n \"columns\": []\n },\n \"mergeVariableColumnMapping\": {\n \"name\": \"recipient_name\",\n \"gift_code\": \"code\",\n \"qr_code_redirect_url\": \"redirect_url\"\n }\n}", + "options": { + "raw": { + "language": "json" } - ] + } + } + }, + "status": "Created", + "code": 201, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"id\": \"upl_71be866e430b11e9\",\n \"accountId\": \"fa9ea650fc7b31a89f92\",\n \"campaignId\": \"cmp_1933ad629bae1408\",\n \"mode\": \"live\",\n \"failuresUrl\": \"http://www.example.com\",\n \"originalFilename\": \"my_audience.csv\",\n \"state\": \"Draft\",\n \"totalMailpieces\": 100,\n \"failedMailpieces\": 5,\n \"validatedMailpieces\": 95,\n \"bytesProcessed\": 17628,\n \"dateCreated\": \"2017-09-05T17:47:53.767Z\",\n \"dateModified\": \"2017-09-05T17:47:53.767Z\",\n \"requiredAddressColumnMapping\": {\n \"name\": null,\n \"address_line1\": null,\n \"address_city\": null,\n \"address_state\": null,\n \"address_zip\": null\n },\n \"optionalAddressColumnMapping\": {\n \"address_line2\": null,\n \"company\": null,\n \"address_country\": null\n },\n \"mergeVariableColumnMapping\": null,\n \"metadata\": {\n \"columns\": []\n }\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "983a97a8-b12c-45fc-a5a7-c6ed5115d926", + "name": "Validation Error", + "originalRequest": { + "url": { + "path": [ + "uploads" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] }, "header": [ { @@ -13496,99 +15805,60 @@ "value": "Basic " } ], - "method": "DELETE", - "body": {} + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"campaignId\": \"cmp_1933ad629bae1408\",\n \"requiredAddressColumnMapping\": {\n \"name\": \"recipient_name\",\n \"address_line1\": \"primary_line\",\n \"address_city\": \"city\",\n \"address_state\": \"state\",\n \"address_zip\": \"zip_code\"\n },\n \"optionalAddressColumnMapping\": {\n \"address_line2\": \"secondary_line\",\n \"company\": \"company\",\n \"address_country\": \"country,\"\n },\n \"metadata\": {\n \"columns\": []\n },\n \"mergeVariableColumnMapping\": {\n \"name\": \"recipient_name\",\n \"gift_code\": \"code\",\n \"qr_code_redirect_url\": \"redirect_url\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + } }, - "status": "Internal Server Error", - "code": 500, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, "header": [ { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"html is required\",\n \"status_code\": 422\n }\n}", + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"in ullamco\",\n \"ipsum repr\"\n ],\n \"msg\": \"velit commodo\",\n \"type\": \"voluptate eiusmod\"\n },\n {\n \"loc\": [\n \"dolore ad reprehenderit magna\",\n \"elit occaecat Duis\"\n ],\n \"msg\": \"proident sed nulla ut\",\n \"type\": \"esse magna\"\n }\n ]\n}", "cookie": [], "_postman_previewlanguage": "json" } ], - "event": [] + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } }, { - "id": "57b514dc-d93d-42b8-a1a9-9cf30f912bae", - "name": "List", + "id": "ae67ccf9-f3f4-4f6a-b0f0-90e819a79c9f", + "name": "Retrieve", "request": { - "name": "List", + "name": "Retrieve", "description": { - "content": "Returns a list of template versions for the given template ID. The template versions are sorted by creation date, with the most recently created appearing first.\n", + "content": "Retrieves the details of an existing upload. You need only supply the unique upload identifier that was returned upon upload creation.", "type": "text/plain" }, "url": { "path": [ - "templates", - ":tmpl_id", - "versions" + "uploads", + ":upl_id" ], "host": [ "{{baseUrl}}" ], - "query": [ - { - "disabled": false, - "key": "limit", - "value": "10", - "description": "How many results to return." - }, - { - "disabled": false, - "key": "before", - "value": "", - "description": "`before` and `after` are both optional but only one of them can be in the query at a time.\n" - }, - { - "disabled": false, - "key": "after", - "value": "", - "description": "`before` and `after` are both optional but only one of them can be in the query at a time.\n" - }, - { - "disabled": false, - "key": "include", - "value": "", - "description": "Request that the response include the total count by specifying `include=[\"total_count\"]`.\n" - }, - { - "disabled": false, - "key": "include", - "value": "", - "description": "Request that the response include the total count by specifying `include=[\"total_count\"]`.\n" - }, - { - "disabled": false, - "key": "date_created[elit_5_]", - "value": "", - "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 ≤." - }, - { - "disabled": false, - "key": "date_created[Ut3b0]", - "value": "", - "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 ≤." - }, - { - "disabled": false, - "key": "date_created[eu_f5]", - "value": "", - "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 ≤." - } - ], + "query": [], "variable": [ { "disabled": false, "type": "any", "value": "", - "key": "tmpl_id", - "description": "(Required) The ID of the template associated with the retrieved versions" + "key": "upl_id", + "description": "(Required) id of the upload" } ] }, @@ -13603,55 +15873,25 @@ }, "response": [ { - "id": "27cfa645-722e-41cc-b6b6-51d141246b35", - "name": "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.", + "id": "8f299404-1220-4972-a315-9dc590d989d9", + "name": "Returns an upload object", "originalRequest": { "url": { "path": [ - "templates", - ":tmpl_id", - "versions" + "uploads", + ":upl_id" ], "host": [ "{{baseUrl}}" ], - "query": [ - { - "key": "limit", - "value": "10" - }, - { - "key": "before", - "value": "" - }, - { - "key": "after", - "value": "" - }, - { - "key": "include", - "value": "" - }, - { - "key": "include", - "value": "" - }, - { - "key": "date_created[do_7c]", - "value": "" - }, - { - "key": "date_created[velit_c]", - "value": "" - } - ], + "query": [], "variable": [ { "disabled": false, "type": "any", "value": "", - "key": "tmpl_id", - "description": "(Required) The ID of the template associated with the retrieved versions" + "key": "upl_id", + "description": "(Required) id of the upload" } ] }, @@ -13676,60 +15916,78 @@ "value": "application/json" } ], - "body": "{\n \"data\": [\n {\n \"id\": \"vrsn_4d6ff5d868bf630\",\n \"description\": \"Second Version\",\n \"html\": \"Second HTML for \",\n \"date_created\": \"2017-11-09T05:09:03.665Z\",\n \"date_modified\": \"2018-05-22T22:01:10.479Z\",\n \"object\": \"version\"\n },\n {\n \"id\": \"vrsn_2a17159c1911919\",\n \"description\": \"Test Template\",\n \"html\": \"HTML for \",\n \"date_created\": \"2017-11-09T05:08:40.004Z\",\n \"date_modified\": \"2018-05-22T22:01:11.309Z\",\n \"object\": \"version\"\n }\n ],\n \"object\": \"list\",\n \"count\": 2\n}", + "body": "{\n \"id\": \"upl_71be866e430b11e9\",\n \"accountId\": \"fa9ea650fc7b31a89f92\",\n \"campaignId\": \"cmp_1933ad629bae1408\",\n \"mode\": \"live\",\n \"failuresUrl\": \"http://www.example.com\",\n \"originalFilename\": \"my_audience.csv\",\n \"state\": \"Draft\",\n \"totalMailpieces\": 100,\n \"failedMailpieces\": 5,\n \"validatedMailpieces\": 95,\n \"bytesProcessed\": 17628,\n \"dateCreated\": \"2017-09-05T17:47:53.767Z\",\n \"dateModified\": \"2017-09-05T17:47:53.767Z\",\n \"requiredAddressColumnMapping\": {\n \"name\": null,\n \"address_line1\": null,\n \"address_city\": null,\n \"address_state\": null,\n \"address_zip\": null\n },\n \"optionalAddressColumnMapping\": {\n \"address_line2\": null,\n \"company\": null,\n \"address_country\": null\n },\n \"mergeVariableColumnMapping\": null,\n \"metadata\": {\n \"columns\": []\n }\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "e1a5de6f-c734-47db-9132-6fa75c91b9ee", - "name": "Error", + "id": "fe2fe9d1-e0c3-4a74-89cd-e0a23fcb8f77", + "name": "Not Found Error", "originalRequest": { "url": { "path": [ - "templates", - ":tmpl_id", - "versions" + "uploads", + ":upl_id" ], "host": [ "{{baseUrl}}" ], - "query": [ - { - "key": "limit", - "value": "10" - }, - { - "key": "before", - "value": "" - }, - { - "key": "after", - "value": "" - }, - { - "key": "include", - "value": "" - }, - { - "key": "include", - "value": "" - }, - { - "key": "date_created[do_7c]", - "value": "" - }, + "query": [], + "variable": [ { - "key": "date_created[velit_c]", - "value": "" + "disabled": false, + "type": "any", + "value": "", + "key": "upl_id", + "description": "(Required) id of the upload" } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Basic " + } + ], + "method": "GET", + "body": {} + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"upload not found\",\n \"status_code\": 404\n }\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "195bd38a-75f1-4316-aa9d-f26cef844794", + "name": "Validation Error", + "originalRequest": { + "url": { + "path": [ + "uploads", + ":upl_id" ], + "host": [ + "{{baseUrl}}" + ], + "query": [], "variable": [ { "disabled": false, "type": "any", "value": "", - "key": "tmpl_id", - "description": "(Required) The ID of the template associated with the retrieved versions" + "key": "upl_id", + "description": "(Required) id of the upload" } ] }, @@ -13746,15 +16004,15 @@ "method": "GET", "body": {} }, - "status": "Internal Server Error", - "code": 500, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, "header": [ { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"html is required\",\n \"status_code\": 422\n }\n}", + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"elit exercitation dolor ullamco\",\n \"amet dolore Duis est officia\"\n ],\n \"msg\": \"tempor in\",\n \"type\": \"adipisicing la\"\n },\n {\n \"loc\": [\n \"sint ut minim cupidatat\",\n \"tempor eiusmod magna Excepteur\"\n ],\n \"msg\": \"laboris si\",\n \"type\": \"nisi aliqua in est sed\"\n }\n ]\n}", "cookie": [], "_postman_previewlanguage": "json" } @@ -13762,19 +16020,18 @@ "event": [] }, { - "id": "1e752890-d0d5-4319-94e5-5f49e9b0f29e", - "name": "Create", + "id": "92e5c0c2-5379-4df7-a0e6-64092f8ff4d7", + "name": "Update", "request": { - "name": "Create", + "name": "Update", "description": { - "content": "Creates a new template version attached to the specified template.", + "content": "Update the details of an existing upload. You need only supply the unique identifier that was returned upon upload creation.", "type": "text/plain" }, "url": { "path": [ - "templates", - ":tmpl_id", - "versions" + "uploads", + ":upl_id" ], "host": [ "{{baseUrl}}" @@ -13782,68 +16039,45 @@ "query": [], "variable": [ { - "disabled": false, - "type": "any", - "value": "", - "key": "tmpl_id", - "description": "(Required) The ID of the template the new version will be attached to" - } - ] - }, - "header": [ - { - "key": "Content-Type", - "value": "application/x-www-form-urlencoded" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "method": "POST", - "auth": null, - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "key": "html", - "value": "", - "description": "(Required) " - }, - { - "disabled": false, - "key": "description", - "value": "" - }, - { - "disabled": false, - "key": "engine", - "value": "legacy" - }, - { - "disabled": false, - "key": "required_vars", - "value": "" - }, - { - "disabled": false, - "key": "required_vars", - "value": "" + "disabled": false, + "type": "any", + "value": "", + "key": "upl_id", + "description": "(Required) id of the upload" } ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "PATCH", + "auth": null, + "body": { + "mode": "raw", + "raw": "{\n \"originalFilename\": \"\",\n \"requiredAddressColumnMapping\": {\n \"name\": null,\n \"address_line1\": null,\n \"address_city\": null,\n \"address_state\": null,\n \"address_zip\": null\n },\n \"optionalAddressColumnMapping\": {\n \"address_line2\": null,\n \"company\": null,\n \"address_country\": null\n },\n \"metadata\": {\n \"columns\": []\n },\n \"mergeVariableColumnMapping\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } } }, "response": [ { - "id": "2434e3d4-eed7-42a0-a44e-ee471d9528ba", - "name": "Returns the template version with the given template and version ids.", + "id": "3d64a90b-adc2-4d4e-8459-d26ac4505c74", + "name": "Returns an upload object", "originalRequest": { "url": { "path": [ - "templates", - ":tmpl_id", - "versions" + "uploads", + ":upl_id" ], "host": [ "{{baseUrl}}" @@ -13854,8 +16088,8 @@ "disabled": false, "type": "any", "value": "", - "key": "tmpl_id", - "description": "(Required) The ID of the template the new version will be attached to" + "key": "upl_id", + "description": "(Required) id of the upload" } ] }, @@ -13869,66 +16103,37 @@ "value": "Basic " } ], - "method": "POST", + "method": "PATCH", "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "key": "description", - "value": "Some Description" - }, - { - "disabled": false, - "description": { - "content": "(Required) ", - "type": "text/plain" - }, - "key": "html", - "value": "HTML for {{name}}" + "mode": "raw", + "raw": "{\n \"originalFilename\": \"\",\n \"requiredAddressColumnMapping\": {\n \"name\": \"recipient_name\",\n \"address_line1\": \"primary_line\",\n \"address_city\": \"city\",\n \"address_state\": \"state\",\n \"address_zip\": \"zip_code\"\n },\n \"optionalAddressColumnMapping\": {\n \"address_line2\": \"secondary_line\",\n \"company\": \"company\",\n \"address_country\": \"country,\"\n },\n \"metadata\": {\n \"columns\": []\n },\n \"mergeVariableColumnMapping\": {\n \"name\": \"recipient_name\",\n \"gift_code\": \"code\",\n \"qr_code_redirect_url\": \"redirect_url\"\n }\n}", + "options": { + "raw": { + "language": "json" } - ] + } } }, "status": "OK", "code": 200, "header": [ - { - "disabled": false, - "description": "The rate limit for a given endpoint.", - "key": "ratelimit-limit", - "value": "150" - }, - { - "disabled": false, - "description": "The number of requests remaining in the current window.", - "key": "ratelimit-remaining", - "value": "100" - }, - { - "disabled": false, - "description": "The time at which the rate limit window resets in UTC epoch seconds\n", - "key": "ratelimit-reset", - "value": "1528749846" - }, { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"id\": \"vrsn_534e339882d2282\",\n \"description\": \"Second Version\",\n \"html\": \"Second HTML for {{name}}\",\n \"date_created\": \"2017-11-09T04:49:38.016Z\",\n \"date_modified\": \"2017-11-09T04:49:38.016Z\",\n \"object\": \"version\"\n}", + "body": "{\n \"id\": \"upl_71be866e430b11e9\",\n \"accountId\": \"fa9ea650fc7b31a89f92\",\n \"campaignId\": \"cmp_1933ad629bae1408\",\n \"mode\": \"live\",\n \"failuresUrl\": \"http://www.example.com\",\n \"originalFilename\": \"my_audience.csv\",\n \"state\": \"Draft\",\n \"totalMailpieces\": 100,\n \"failedMailpieces\": 5,\n \"validatedMailpieces\": 95,\n \"bytesProcessed\": 17628,\n \"dateCreated\": \"2017-09-05T17:47:53.767Z\",\n \"dateModified\": \"2017-09-05T17:47:53.767Z\",\n \"requiredAddressColumnMapping\": {\n \"name\": null,\n \"address_line1\": null,\n \"address_city\": null,\n \"address_state\": null,\n \"address_zip\": null\n },\n \"optionalAddressColumnMapping\": {\n \"address_line2\": null,\n \"company\": null,\n \"address_country\": null\n },\n \"mergeVariableColumnMapping\": null,\n \"metadata\": {\n \"columns\": []\n }\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "27a290e4-a5b8-4daa-9685-7a300e441f6b", - "name": "Error", + "id": "459d149d-8884-4296-b90e-788c17179f38", + "name": "Not Found Error", "originalRequest": { "url": { "path": [ - "templates", - ":tmpl_id", - "versions" + "uploads", + ":upl_id" ], "host": [ "{{baseUrl}}" @@ -13939,8 +16144,8 @@ "disabled": false, "type": "any", "value": "", - "key": "tmpl_id", - "description": "(Required) The ID of the template the new version will be attached to" + "key": "upl_id", + "description": "(Required) id of the upload" } ] }, @@ -13954,102 +16159,37 @@ "value": "Basic " } ], - "method": "POST", + "method": "PATCH", "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "key": "description", - "value": "Some Description" - }, - { - "disabled": false, - "description": { - "content": "(Required) ", - "type": "text/plain" - }, - "key": "html", - "value": "HTML for {{name}}" + "mode": "raw", + "raw": "{\n \"originalFilename\": \"\",\n \"requiredAddressColumnMapping\": {\n \"name\": \"recipient_name\",\n \"address_line1\": \"primary_line\",\n \"address_city\": \"city\",\n \"address_state\": \"state\",\n \"address_zip\": \"zip_code\"\n },\n \"optionalAddressColumnMapping\": {\n \"address_line2\": \"secondary_line\",\n \"company\": \"company\",\n \"address_country\": \"country,\"\n },\n \"metadata\": {\n \"columns\": []\n },\n \"mergeVariableColumnMapping\": {\n \"name\": \"recipient_name\",\n \"gift_code\": \"code\",\n \"qr_code_redirect_url\": \"redirect_url\"\n }\n}", + "options": { + "raw": { + "language": "json" } - ] + } } }, - "status": "Internal Server Error", - "code": 500, + "status": "Not Found", + "code": 404, "header": [ { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"html is required\",\n \"status_code\": 422\n }\n}", + "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"upload not found\",\n \"status_code\": 404\n }\n}", "cookie": [], "_postman_previewlanguage": "json" - } - ], - "event": [], - "protocolProfileBehavior": { - "disableBodyPruning": true - } - } - ], - "event": [] - }, - { - "id": "65ba2e04-ec21-4474-a3ce-1e03f57f2ee6", - "name": "Templates", - "description": { - "content": "These API endpoints allow you to create, retrieve, update and delete reusable HTML templates for use with the Print & Mail API.\n\n", - "type": "text/plain" - }, - "item": [ - { - "id": "df084a3f-27e4-4fe6-a0c0-4e615e02da6e", - "name": "Retrieve", - "request": { - "name": "Retrieve", - "description": { - "content": "Retrieves the details of an existing template. You need only supply the unique template identifier that was returned upon template creation.", - "type": "text/plain" - }, - "url": { - "path": [ - "templates", - ":tmpl_id" - ], - "host": [ - "{{baseUrl}}" - ], - "query": [], - "variable": [ - { - "disabled": false, - "type": "any", - "value": "", - "key": "tmpl_id", - "description": "(Required) id of the template" - } - ] }, - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "method": "GET", - "auth": null - }, - "response": [ { - "id": "72ad6134-d06b-4804-8e1d-7b8597a27996", - "name": "Returns a template object", + "id": "6d56a749-b5c3-4fce-a4e2-e43933270f76", + "name": "Validation Error", "originalRequest": { "url": { "path": [ - "templates", - ":tmpl_id" + "uploads", + ":upl_id" ], "host": [ "{{baseUrl}}" @@ -14060,8 +16200,8 @@ "disabled": false, "type": "any", "value": "", - "key": "tmpl_id", - "description": "(Required) id of the template" + "key": "upl_id", + "description": "(Required) id of the upload" } ] }, @@ -14075,29 +16215,75 @@ "value": "Basic " } ], - "method": "GET", - "body": {} + "method": "PATCH", + "body": { + "mode": "raw", + "raw": "{\n \"originalFilename\": \"\",\n \"requiredAddressColumnMapping\": {\n \"name\": \"recipient_name\",\n \"address_line1\": \"primary_line\",\n \"address_city\": \"city\",\n \"address_state\": \"state\",\n \"address_zip\": \"zip_code\"\n },\n \"optionalAddressColumnMapping\": {\n \"address_line2\": \"secondary_line\",\n \"company\": \"company\",\n \"address_country\": \"country,\"\n },\n \"metadata\": {\n \"columns\": []\n },\n \"mergeVariableColumnMapping\": {\n \"name\": \"recipient_name\",\n \"gift_code\": \"code\",\n \"qr_code_redirect_url\": \"redirect_url\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + } }, - "status": "OK", - "code": 200, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, "header": [ { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"id\": \"tmpl_c94e83ca2cd5121\",\n \"description\": \"Test Template\",\n \"versions\": [\n {\n \"id\": \"vrsn_362184d96d9b0c9\",\n \"suggest_json_editor\": true,\n \"description\": \"Test Template\",\n \"engine\": \"legacy\",\n \"html\": \"HTML for {{name}}\",\n \"date_created\": \"2017-11-07T22:56:10.962Z\",\n \"date_modified\": \"2017-11-07T22:56:10.962Z\",\n \"object\": \"version\"\n }\n ],\n \"published_version\": {\n \"id\": \"vrsn_362184d96d9b0c9\",\n \"suggest_json_editor\": false,\n \"description\": \"Test Template\",\n \"engine\": \"handlebars\",\n \"html\": \"HTML for {{name}}\",\n \"date_created\": \"2017-11-07T22:56:10.962Z\",\n \"date_modified\": \"2017-11-07T22:56:10.962Z\",\n \"object\": \"version\"\n },\n \"metadata\": {},\n \"date_created\": \"2017-11-07T22:56:10.962Z\",\n \"date_modified\": \"2017-11-07T22:56:10.962Z\",\n \"object\": \"template\"\n}", + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"elit exercitation dolor ullamco\",\n \"amet dolore Duis est officia\"\n ],\n \"msg\": \"tempor in\",\n \"type\": \"adipisicing la\"\n },\n {\n \"loc\": [\n \"sint ut minim cupidatat\",\n \"tempor eiusmod magna Excepteur\"\n ],\n \"msg\": \"laboris si\",\n \"type\": \"nisi aliqua in est sed\"\n }\n ]\n}", "cookie": [], "_postman_previewlanguage": "json" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "1d2dfbef-3eb4-403a-b712-3c939b2809a0", + "name": "Delete", + "request": { + "name": "Delete", + "description": { + "content": "Delete an existing upload. You need only supply the unique identifier that was returned upon upload creation.", + "type": "text/plain" + }, + "url": { + "path": [ + "uploads", + ":upl_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "upl_id", + "description": "(Required) id of the upload" + } + ] }, + "method": "DELETE", + "auth": null + }, + "response": [ { - "id": "27062a7f-5224-4b52-b34c-51ac24b2061a", - "name": "Error", + "id": "8d26db36-1023-46f4-92fe-dc296999b64d", + "name": "Successful Response", "originalRequest": { "url": { "path": [ - "templates", - ":tmpl_id" + "uploads", + ":upl_id" ], "host": [ "{{baseUrl}}" @@ -14108,8 +16294,8 @@ "disabled": false, "type": "any", "value": "", - "key": "tmpl_id", - "description": "(Required) id of the template" + "key": "upl_id", + "description": "(Required) id of the upload" } ] }, @@ -14123,37 +16309,38 @@ "value": "Basic " } ], - "method": "GET", + "method": "DELETE", "body": {} }, - "status": "Internal Server Error", - "code": 500, + "status": "No Content", + "code": 204, "header": [ { "key": "Content-Type", - "value": "application/json" + "value": "text/plain" } ], - "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"html is required\",\n \"status_code\": 422\n }\n}", + "body": "", "cookie": [], - "_postman_previewlanguage": "json" + "_postman_previewlanguage": "text" } ], "event": [] }, { - "id": "24459f9a-8c01-48ca-8782-2fae40dba856", - "name": "Update", + "id": "52280f50-5bb4-4be1-a367-cf9fee72853c", + "name": "Upload file", "request": { - "name": "Update", + "name": "Upload file", "description": { - "content": "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.", + "content": "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.", "type": "text/plain" }, "url": { "path": [ - "templates", - ":tmpl_id" + "uploads", + ":upl_id", + "file" ], "host": [ "{{baseUrl}}" @@ -14164,15 +16351,15 @@ "disabled": false, "type": "any", "value": "", - "key": "tmpl_id", - "description": "(Required) id of the template" + "key": "upl_id", + "description": "(Required) ID of the upload" } ] }, "header": [ { "key": "Content-Type", - "value": "application/x-www-form-urlencoded" + "value": "multipart/form-data" }, { "key": "Accept", @@ -14182,30 +16369,26 @@ "method": "POST", "auth": null, "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "key": "description", - "value": "" - }, + "mode": "formdata", + "formdata": [ { - "disabled": false, - "key": "published_version", - "value": "" + "key": "file", + "type": "file", + "description": "" } ] } }, "response": [ { - "id": "ce03ee94-9ede-4d86-a27e-10ee66700b95", - "name": "Returns the updated template object", + "id": "7243e6db-ca4f-47ca-b5bf-324a610b810a", + "name": "Successful Response", "originalRequest": { "url": { "path": [ - "templates", - ":tmpl_id" + "uploads", + ":upl_id", + "file" ], "host": [ "{{baseUrl}}" @@ -14216,8 +16399,8 @@ "disabled": false, "type": "any", "value": "", - "key": "tmpl_id", - "description": "(Required) id of the template" + "key": "upl_id", + "description": "(Required) ID of the upload" } ] }, @@ -14233,59 +16416,41 @@ ], "method": "POST", "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "key": "description", - "value": "Updated Example" - }, + "mode": "formdata", + "formdata": [ { - "disabled": false, - "key": "published_version", - "value": "vrsn_a" + "description": { + "content": "", + "type": "text/plain" + }, + "key": "file", + "value": "", + "type": "text" } ] } }, - "status": "OK", - "code": 200, + "status": "Accepted", + "code": 202, "header": [ - { - "disabled": false, - "description": "The rate limit for a given endpoint.", - "key": "ratelimit-limit", - "value": "150" - }, - { - "disabled": false, - "description": "The number of requests remaining in the current window.", - "key": "ratelimit-remaining", - "value": "100" - }, - { - "disabled": false, - "description": "The time at which the rate limit window resets in UTC epoch seconds\n", - "key": "ratelimit-reset", - "value": "1528749846" - }, { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"id\": \"tmpl_c94e83ca2cd5121\",\n \"description\": \"Test Template\",\n \"versions\": [\n {\n \"id\": \"vrsn_362184d96d9b0c9\",\n \"suggest_json_editor\": true,\n \"description\": \"Test Template\",\n \"engine\": \"legacy\",\n \"html\": \"HTML for {{name}}\",\n \"date_created\": \"2017-11-07T22:56:10.962Z\",\n \"date_modified\": \"2017-11-07T22:56:10.962Z\",\n \"object\": \"version\"\n }\n ],\n \"published_version\": {\n \"id\": \"vrsn_362184d96d9b0c9\",\n \"suggest_json_editor\": false,\n \"description\": \"Test Template\",\n \"engine\": \"handlebars\",\n \"html\": \"HTML for {{name}}\",\n \"date_created\": \"2017-11-07T22:56:10.962Z\",\n \"date_modified\": \"2017-11-07T22:56:10.962Z\",\n \"object\": \"version\"\n },\n \"metadata\": {},\n \"date_created\": \"2017-11-07T22:56:10.962Z\",\n \"date_modified\": \"2017-11-07T22:56:10.962Z\",\n \"object\": \"template\"\n}", + "body": "{\n \"message\": \"File uploaded successfully\",\n \"filename\": \"consequat tempor labor\"\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "650fd7a6-2431-4daf-bdca-f8506b73948c", - "name": "Error", + "id": "d2ecb057-71dc-4067-b141-270399500aa7", + "name": "Validation Error", "originalRequest": { "url": { "path": [ - "templates", - ":tmpl_id" + "uploads", + ":upl_id", + "file" ], "host": [ "{{baseUrl}}" @@ -14296,8 +16461,8 @@ "disabled": false, "type": "any", "value": "", - "key": "tmpl_id", - "description": "(Required) id of the template" + "key": "upl_id", + "description": "(Required) ID of the upload" } ] }, @@ -14313,30 +16478,29 @@ ], "method": "POST", "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "key": "description", - "value": "Updated Example" - }, + "mode": "formdata", + "formdata": [ { - "disabled": false, - "key": "published_version", - "value": "vrsn_a" + "description": { + "content": "", + "type": "text/plain" + }, + "key": "file", + "value": "", + "type": "text" } ] } }, - "status": "Internal Server Error", - "code": 500, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, "header": [ { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"html is required\",\n \"status_code\": 422\n }\n}", + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"elit exercitation dolor ullamco\",\n \"amet dolore Duis est officia\"\n ],\n \"msg\": \"tempor in\",\n \"type\": \"adipisicing la\"\n },\n {\n \"loc\": [\n \"sint ut minim cupidatat\",\n \"tempor eiusmod magna Excepteur\"\n ],\n \"msg\": \"laboris si\",\n \"type\": \"nisi aliqua in est sed\"\n }\n ]\n}", "cookie": [], "_postman_previewlanguage": "json" } @@ -14347,18 +16511,19 @@ } }, { - "id": "f0f6fbeb-6f12-4f78-b3f9-59f219337803", - "name": "Delete", + "id": "5d09a105-a310-48e7-8fa9-9dda4f6ac917", + "name": "Create Export", "request": { - "name": "Delete", + "name": "Create Export", "description": { - "content": "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.", + "content": "Campaign Exports can help you understand exactly which records in a campaign could not be created. By initiating and retrieving an export, you will get row-by-row errors for your campaign. For a step-by-step walkthrough of creating a campaign and exporting failures, see our [Campaigns Guide](https://help.lob.com/print-and-mail/building-a-mail-strategy/campaign-or-triggered-sends/launch-your-first-campaign).\n\nCreate an export file associated with an upload.", "type": "text/plain" }, "url": { "path": [ - "templates", - ":tmpl_id" + "uploads", + ":upl_id", + "exports" ], "host": [ "{{baseUrl}}" @@ -14369,29 +16534,43 @@ "disabled": false, "type": "any", "value": "", - "key": "tmpl_id", - "description": "(Required) id of the template" + "key": "upl_id", + "description": "(Required) ID of the upload" } ] }, "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, { "key": "Accept", "value": "application/json" } ], - "method": "DELETE", - "auth": null + "method": "POST", + "auth": null, + "body": { + "mode": "raw", + "raw": "{\n \"type\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + } }, "response": [ { - "id": "9b85d8eb-7ef8-4038-a677-c5cdee1e7903", - "name": "Deleted", + "id": "a7ed543a-482a-4ab2-b1c1-a12f6a6e4f4c", + "name": "Successful Response", "originalRequest": { "url": { "path": [ - "templates", - ":tmpl_id" + "uploads", + ":upl_id", + "exports" ], "host": [ "{{baseUrl}}" @@ -14402,8 +16581,8 @@ "disabled": false, "type": "any", "value": "", - "key": "tmpl_id", - "description": "(Required) id of the template" + "key": "upl_id", + "description": "(Required) ID of the upload" } ] }, @@ -14417,8 +16596,16 @@ "value": "Basic " } ], - "method": "DELETE", - "body": {} + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"type\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + } }, "status": "OK", "code": 200, @@ -14428,18 +16615,19 @@ "value": "application/json" } ], - "body": "{\n \"id\": \"tmpl_123456789\",\n \"deleted\": true\n}", + "body": "{\n \"message\": \"Export is processing\",\n \"exportId\": \"ex_2dafd758ed3da9c43\"\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "3b43395a-23bf-4edc-9595-34dc5e731d99", - "name": "Error", + "id": "34363eed-96cd-4a59-8975-f373dda430c8", + "name": "Create Export Error", "originalRequest": { "url": { "path": [ - "templates", - ":tmpl_id" + "uploads", + ":upl_id", + "exports" ], "host": [ "{{baseUrl}}" @@ -14450,8 +16638,8 @@ "disabled": false, "type": "any", "value": "", - "key": "tmpl_id", - "description": "(Required) id of the template" + "key": "upl_id", + "description": "(Required) ID of the upload" } ] }, @@ -14465,36 +16653,49 @@ "value": "Basic " } ], - "method": "DELETE", - "body": {} + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"type\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + } }, - "status": "Internal Server Error", - "code": 500, + "status": "Bad Request", + "code": 400, "header": [ { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"html is required\",\n \"status_code\": 422\n }\n}", + "body": "{\n \"code\": 400,\n \"message\": \"Invalid body, check 'errors' property for more info.\",\n \"errors\": [\n \"type must be a string\"\n ]\n}", "cookie": [], "_postman_previewlanguage": "json" } ], - "event": [] + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } }, { - "id": "04f06d60-3693-441e-ac95-6719b65f9937", - "name": "List", + "id": "0a9d572e-9dc1-442e-ac1a-ac77cfeb3696", + "name": "Retrieve Line Item Report", "request": { - "name": "List", + "name": "Retrieve Line Item Report", "description": { - "content": "Returns a list of your templates. The templates are returned sorted by creation date, with the most recently created templates appearing first.", + "content": "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.", "type": "text/plain" }, "url": { "path": [ - "templates" + "uploads", + ":upl_id", + "report" ], "host": [ "{{baseUrl}}" @@ -14502,54 +16703,32 @@ "query": [ { "disabled": false, - "key": "limit", - "value": "10", - "description": "How many results to return." - }, - { - "disabled": false, - "key": "before", - "value": "", - "description": "`before` and `after` are both optional but only one of them can be in the query at a time.\n" - }, - { - "disabled": false, - "key": "after", - "value": "", - "description": "`before` and `after` are both optional but only one of them can be in the query at a time.\n" - }, - { - "disabled": false, - "key": "include", - "value": "", - "description": "Request that the response include the total count by specifying `include=[\"total_count\"]`.\n" - }, - { - "disabled": false, - "key": "include", + "key": "status", "value": "", - "description": "Request that the response include the total count by specifying `include=[\"total_count\"]`.\n" + "description": "The status of line items to filter and retrieve. By default all line items are returned." }, { "disabled": false, - "key": "date_created[elit_5_]", - "value": "", - "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 ≤." + "key": "limit", + "value": "100", + "description": "How many results to return." }, { "disabled": false, - "key": "date_created[Ut3b0]", - "value": "", - "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 ≤." - }, + "key": "offset", + "value": "0", + "description": "An integer that designates the offset at which to begin returning results. Defaults to 0." + } + ], + "variable": [ { "disabled": false, - "key": "date_created[eu_f5]", + "type": "any", "value": "", - "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 ≤." + "key": "upl_id", + "description": "(Required) ID of the upload" } - ], - "variable": [] + ] }, "header": [ { @@ -14562,47 +16741,41 @@ }, "response": [ { - "id": "61cf8f76-4996-4882-b5f6-13a09feed76f", - "name": "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.", + "id": "5c71df63-02e5-4243-a450-e50e54bd0f9e", + "name": "Returns an report object", "originalRequest": { "url": { "path": [ - "templates" + "uploads", + ":upl_id", + "report" ], "host": [ "{{baseUrl}}" ], "query": [ { - "key": "limit", - "value": "10" - }, - { - "key": "before", - "value": "" - }, - { - "key": "after", - "value": "" - }, - { - "key": "include", - "value": "" - }, - { - "key": "include", + "key": "status", "value": "" }, { - "key": "date_created[do_7c]", - "value": "" + "key": "limit", + "value": "10" }, { - "key": "date_created[velit_c]", - "value": "" + "key": "offset", + "value": "0" } ], - "variable": [] + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "upl_id", + "description": "(Required) ID of the upload" + } + ] }, "header": [ { @@ -14625,52 +16798,46 @@ "value": "application/json" } ], - "body": "{\n \"data\": [\n {\n \"id\": \"tmpl_d5a5a89da9106f8\",\n \"description\": \"Test Template\",\n \"versions\": [\n {\n \"id\": \"vrsn_232a02fb8224791\",\n \"suggest_json_editor\": true,\n \"description\": \"Test Template\",\n \"engine\": \"legacy\",\n \"html\": \"HTML for \",\n \"date_created\": \"2019-07-27T23:49:01.512Z\",\n \"date_modified\": \"2019-07-27T23:49:01.512Z\",\n \"object\": \"version\"\n }\n ],\n \"published_version\": {\n \"id\": \"vrsn_232a02fb8224791\",\n \"suggest_json_editor\": false,\n \"description\": \"Test Template\",\n \"engine\": \"handlebars\",\n \"html\": \"HTML for \",\n \"date_created\": \"2019-07-27T23:49:01.512Z\",\n \"date_modified\": \"2019-07-27T23:49:01.512Z\",\n \"object\": \"version\"\n },\n \"metadata\": {},\n \"date_created\": \"2019-07-27T23:49:01.511Z\",\n \"date_modified\": \"2019-07-27T23:49:01.511Z\",\n \"object\": \"template\"\n },\n {\n \"id\": \"tmpl_59b2150ae120887\",\n \"description\": \"Test Template\",\n \"versions\": [\n {\n \"id\": \"vrsn_2a7eb63ccb795b9\",\n \"description\": \"Test Template\",\n \"html\": \"HTML for \",\n \"date_created\": \"2019-03-29T10:22:34.643Z\",\n \"date_modified\": \"2019-03-29T10:22:34.643Z\",\n \"object\": \"version\"\n }\n ],\n \"published_version\": {\n \"id\": \"vrsn_2a7eb63ccb795b9\",\n \"description\": \"Test Template\",\n \"html\": \"HTML for \",\n \"date_created\": \"2019-03-29T10:22:34.643Z\",\n \"date_modified\": \"2019-03-29T10:22:34.643Z\",\n \"object\": \"version\"\n },\n \"metadata\": {},\n \"date_created\": \"2019-03-29T10:22:34.642Z\",\n \"date_modified\": \"2019-03-29T10:22:34.642Z\",\n \"object\": \"template\"\n }\n ],\n \"object\": \"list\",\n \"previous_url\": null,\n \"next_url\": \"https://api.lob.com/v1/templates?limit=2&after=eyJkYXRlT2Zmc2V0IjoiMjAxOS0wMy0yOVQxMDoyMjozNC42NDJaIiwiaWRPZmZzZXQiOiJ0bXBsXzU5YjIxNTBhZTEyMDg4NyJ9\",\n \"count\": 2\n}", + "body": "{\n \"id\": \"ex_6a94fe68fd151e0f8\",\n \"dateCreated\": \"2021-07-06T22:51:42.838Z\",\n \"dateModified\": \"2022-07-06T22:51:42.838Z\",\n \"deleted\": false,\n \"s3Url\": null,\n \"state\": \"in_progress\",\n \"type\": \"failures\",\n \"uploadId\": \"upl_71be866e430b11e9\"\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "b3aca131-c830-4000-bdd8-b99a79f3167e", - "name": "Error", + "id": "3cb5e95b-f034-4653-a56f-355fc8aedbbe", + "name": "Forbidden Error", "originalRequest": { "url": { "path": [ - "templates" + "uploads", + ":upl_id", + "report" ], "host": [ "{{baseUrl}}" ], "query": [ { - "key": "limit", - "value": "10" - }, - { - "key": "before", - "value": "" - }, - { - "key": "after", - "value": "" - }, - { - "key": "include", - "value": "" - }, - { - "key": "include", + "key": "status", "value": "" }, { - "key": "date_created[do_7c]", - "value": "" + "key": "limit", + "value": "10" }, { - "key": "date_created[velit_c]", - "value": "" + "key": "offset", + "value": "0" } ], - "variable": [] + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "upl_id", + "description": "(Required) ID of the upload" + } + ] }, "header": [ { @@ -14685,188 +16852,54 @@ "method": "GET", "body": {} }, - "status": "Internal Server Error", - "code": 500, - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"html is required\",\n \"status_code\": 422\n }\n}", - "cookie": [], - "_postman_previewlanguage": "json" - } - ], - "event": [] - }, - { - "id": "3609626f-c6e9-4775-b096-6ce6a03cd11f", - "name": "Create", - "request": { - "name": "Create", - "description": { - "content": "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.", - "type": "text/plain" - }, - "url": { - "path": [ - "templates" - ], - "host": [ - "{{baseUrl}}" - ], - "query": [], - "variable": [] - }, - "header": [ - { - "key": "Content-Type", - "value": "application/x-www-form-urlencoded" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "method": "POST", - "auth": null, - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "key": "html", - "value": "", - "description": "(Required) " - }, - { - "disabled": false, - "key": "description", - "value": "" - }, - { - "disabled": false, - "key": "metadata", - "value": "!|zR6WJ@!J[k79tBD.(]>lp2$g0*w)l8n=OqQF5!8^r^!u&:>EWE~W#&y4u,p6R0wkD!2=qrKj;M9^|;s}5(L5Ce.@5na?4&>_7&Z7h^CJ9" - }, - { - "disabled": false, - "key": "engine", - "value": "legacy" - }, - { - "disabled": false, - "key": "required_vars", - "value": "" - }, - { - "disabled": false, - "key": "required_vars", - "value": "" - } - ] - } - }, - "response": [ - { - "id": "c22ab511-ecdc-4452-a15c-50b87cbb5786", - "name": "Returns a template object", - "originalRequest": { - "url": { - "path": [ - "templates" - ], - "host": [ - "{{baseUrl}}" - ], - "query": [], - "variable": [] - }, - "header": [ - { - "description": { - "content": "Added as a part of security scheme: basic", - "type": "text/plain" - }, - "key": "Authorization", - "value": "Basic " - } - ], - "method": "POST", - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "key": "description", - "value": "demo" - }, - { - "disabled": false, - "description": { - "content": "(Required) ", - "type": "text/plain" - }, - "key": "html", - "value": "HTML for {{name}}" - }, - { - "disabled": false, - "key": "spiffy", - "value": "true" - }, - { - "disabled": false, - "key": "engine", - "value": "handlebars" - } - ] - } - }, - "status": "OK", - "code": 200, + "status": "Forbidden", + "code": 403, "header": [ - { - "disabled": false, - "description": "The rate limit for a given endpoint.", - "key": "ratelimit-limit", - "value": "150" - }, - { - "disabled": false, - "description": "The number of requests remaining in the current window.", - "key": "ratelimit-remaining", - "value": "100" - }, - { - "disabled": false, - "description": "The time at which the rate limit window resets in UTC epoch seconds\n", - "key": "ratelimit-reset", - "value": "1528749846" - }, { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"id\": \"tmpl_c94e83ca2cd5121\",\n \"description\": \"Test Template\",\n \"versions\": [\n {\n \"id\": \"vrsn_362184d96d9b0c9\",\n \"suggest_json_editor\": true,\n \"description\": \"Test Template\",\n \"engine\": \"legacy\",\n \"html\": \"HTML for {{name}}\",\n \"date_created\": \"2017-11-07T22:56:10.962Z\",\n \"date_modified\": \"2017-11-07T22:56:10.962Z\",\n \"object\": \"version\"\n }\n ],\n \"published_version\": {\n \"id\": \"vrsn_362184d96d9b0c9\",\n \"suggest_json_editor\": false,\n \"description\": \"Test Template\",\n \"engine\": \"handlebars\",\n \"html\": \"HTML for {{name}}\",\n \"date_created\": \"2017-11-07T22:56:10.962Z\",\n \"date_modified\": \"2017-11-07T22:56:10.962Z\",\n \"object\": \"version\"\n },\n \"metadata\": {},\n \"date_created\": \"2017-11-07T22:56:10.962Z\",\n \"date_modified\": \"2017-11-07T22:56:10.962Z\",\n \"object\": \"template\"\n}", + "body": "{\n \"message\": \"This feature is not enabled for this account: access_upload_report\",\n \"code\": 403\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "94d12230-c0bb-4f8e-ae26-2dc6225a72e6", - "name": "Error", + "id": "f6652cef-f778-4300-a07c-7bdb6edbc0f8", + "name": "Not Found Error", "originalRequest": { "url": { "path": [ - "templates" + "uploads", + ":upl_id", + "report" ], "host": [ "{{baseUrl}}" ], - "query": [], - "variable": [] + "query": [ + { + "key": "status", + "value": "" + }, + { + "key": "limit", + "value": "10" + }, + { + "key": "offset", + "value": "0" + } + ], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "upl_id", + "description": "(Required) ID of the upload" + } + ] }, "header": [ { @@ -14878,111 +16911,60 @@ "value": "Basic " } ], - "method": "POST", - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "key": "description", - "value": "demo" - }, - { - "disabled": false, - "description": { - "content": "(Required) ", - "type": "text/plain" - }, - "key": "html", - "value": "HTML for {{name}}" - }, - { - "disabled": false, - "key": "spiffy", - "value": "true" - }, - { - "disabled": false, - "key": "engine", - "value": "handlebars" - } - ] - } + "method": "GET", + "body": {} }, - "status": "Internal Server Error", - "code": 500, + "status": "Not Found", + "code": 404, "header": [ { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"html is required\",\n \"status_code\": 422\n }\n}", + "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"upload not found\",\n \"status_code\": 404\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } ], - "event": [], - "protocolProfileBehavior": { - "disableBodyPruning": true - } - } - ], - "event": [] - }, - { - "id": "d1ca32cf-61ad-4890-b72e-81f2aadd92a9", - "name": "Test and Live Environments", - "description": { - "content": "To make the API as explorable as possible, accounts have test and live\nenvironment API keys. You're not charged any fees in the test environment,\nso we encourage you to use it to try out services, perform quality\nassurance, and run automated testing. Objects―addresses, letters, checks,\netc―in one environment cannot be manipulated by objects in the other.\n\nIn general, a payment method (either credit card or ACH account) must be\nadded to your account to make live API requests. However, a payment method\nis not required for the first 300 live requests per month to the\n`/v1/us_verifications` endpoint. After the first 300 requests, you will\nbegin receiving errors with status code `403`.\n\nRequests made in the test environment always validate request arguments,\nsimulate live environment behavior, and enforce rate limits. _They never\nprint, mail nor, for verification services, verify addresses._ The US &\nInternational verification services trigger behavior with specific\nargument values, and, if you plan on using those, we recommend reading\n[US Verification Test Environment](#tag/US-Verifications-Test-Environment)\nand [Intl Verification Test Environment](#tag/Intl-Verifications-Test-Environment).\n\nTo switch between environments, use the appropriate key for that\nenvironment when performing a request. You can find each environment's API\nkey in your dashboard under Settings; test API keys are always prefixed\nwith `test_` and production API keys with `live_`.\n\n", - "type": "text/plain" - }, - "item": [], - "event": [] - }, - { - "id": "9def2d2e-26cf-4600-8868-92553907ffcf", - "name": "Tracking Events", - "description": { - "content": "As mailpieces travel through the mail stream, USPS scans their unique barcodes, and Lob processes these mail scans to generate tracking events.\n\n

Certified Tracking Event Details

\n\nLetters sent with USPS Certified Mail are fully tracked by USPS, and\ntherefore their [tracking events](#operation/tracking_event) have an\nadditional `details` object with more detailed information about the\ntracking event. The following table shows the potential values for\nthe fields in the `details` object mapped to the tracking event `name`.\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NAMEEVENTDESCRIPTIONACTION REQUIRED
Mailedpackage_acceptedPackage has been accepted into the carrier network for delivery.false
In Transitpackage_arrivedPackage has arrived at an intermediate location in the carrier network.false
In Transitpackage_departedPackage has departed from an intermediate location in the carrier network.false
In Transitpackage_processingPackage is processing at an intermediate location in the carrier network.false
In Transitpackage_processedPackage has been processed at an intermediate location.false
In Local Areapackage_in_local_areaPackage is at a location near the end destination.false
Processed For Deliverydelivery_scheduledPackage is scheduled for delivery.false
Processed For Deliveryout_for_deliveryPackage is out for delivery.false
Pickup Availablepickup_availablePackage is available for pickup at carrier location.true
DelivereddeliveredPackage has been delivered.false
Re-Routedpackage_forwardedPackage has been forwarded.false
Returned to Senderreturned_to_senderPackage is to be returned to sender.false
Issueaddress_issueAddress information is incorrect. Contact carrier to ensure delivery.true
Issuecontact_carrierContact the carrier for more information.true
IssuedelayedDelivery of package is delayed.false
Issuedelivery_attemptedDelivery of package has been attempted. Contact carrier to ensure delivery.true
Issuedelivery_rescheduledDelivery of package has been rescheduled.false
Issuelocation_inaccessibleDelivery location inaccessible to carrier. Contact carrier to ensure delivery.true
Issuenotice_leftCarrier left notice during attempted delivery. Follow carrier instructions on notice.true
Issuepackage_damagedPackage has been damaged. Contact carrier for more details.true
Issuepackage_disposedPackage has been disposed.false
Issuepackage_heldPackage held at carrier location. Contact carrier for more details.true
Issuepackage_lostPackage has been lost. Contact carrier for more details.true
Issuepackage_unclaimedPackage is unclaimed.true
Issuepackage_undeliverablePackage is not able to be delivered.true
Issuereschedule_deliveryContact carrier to reschedule delivery.true
IssueotherUnrecognized carrier status.false
\n\n", - "type": "text/plain" - }, - "item": [], - "event": [] - }, - { - "id": "ce07edf2-0552-4dfb-8a2f-ff96227c5c6f", - "name": "Uploads", - "description": { - "content": "The uploads endpoint allows you to upload audience files that are then associated with a given campaign.\nAt this time, only CSV files are allowed. The API provides endpoints for creating uploads, uploading audience files,\nand marking uploaded files as ready for processing. The API also provides endpoints for downloading files that\ndescribe the results, both successful and not, of the processing.\n", - "type": "text/plain" - }, - "item": [ + "event": [] + }, { - "id": "1644e486-dfe1-455c-bf59-b6e3c2c50fd3", - "name": "List", + "id": "e2b445b1-1e38-4e2f-bcba-f10ff9bfb31b", + "name": "Retrieve Export", "request": { - "name": "List", + "name": "Retrieve Export", "description": { - "content": "Returns a list of your uploads. Optionally, filter uploads by campaign.", + "content": "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`.", "type": "text/plain" }, "url": { "path": [ - "uploads" + "uploads", + ":upl_id", + "exports", + ":ex_id" ], "host": [ "{{baseUrl}}" ], - "query": [ + "query": [], + "variable": [ { "disabled": false, - "key": "campaignId", + "type": "any", "value": "", - "description": "id of the campaign" + "key": "upl_id", + "description": "(Required) ID of the upload" + }, + { + "disabled": false, + "type": "any", + "value": "", + "key": "ex_id", + "description": "(Required) ID of the export" } - ], - "variable": [] + ] }, "header": [ { @@ -14995,23 +16977,36 @@ }, "response": [ { - "id": "4d061b41-b3d8-47bd-974d-0538a2392e10", - "name": "An array of matching uploads. Each entry in the array is a separate upload.", + "id": "07c2c482-3a6a-41df-a0e0-5fb3a75b34c2", + "name": "Returns an export object", "originalRequest": { "url": { "path": [ - "uploads" + "uploads", + ":upl_id", + "exports", + ":ex_id" ], "host": [ "{{baseUrl}}" ], - "query": [ + "query": [], + "variable": [ { - "key": "campaignId", - "value": "" + "disabled": false, + "type": "any", + "value": "", + "key": "upl_id", + "description": "(Required) ID of the upload" + }, + { + "disabled": false, + "type": "any", + "value": "", + "key": "ex_id", + "description": "(Required) ID of the export" } - ], - "variable": [] + ] }, "header": [ { @@ -15034,68 +17029,84 @@ "value": "application/json" } ], - "body": "[\n {\n \"id\": \"upl_71be866e430b11e9\",\n \"accountId\": \"fa9ea650fc7b31a89f92\",\n \"campaignId\": \"cmp_1933ad629bae1408\",\n \"mode\": \"test\",\n \"failuresUrl\": \"https://www.example.com\",\n \"originalFilename\": \"my_audience.csv\",\n \"state\": \"Draft\",\n \"totalMailpieces\": 100,\n \"failedMailpieces\": 5,\n \"validatedMailpieces\": 95,\n \"bytesProcessed\": 17268,\n \"dateCreated\": \"2017-09-05T17:47:53.767Z\",\n \"dateModified\": \"2017-09-05T17:47:53.767Z\",\n \"requiredAddressColumnMapping\": {\n \"name\": \"recipient_name\",\n \"address_line1\": \"primary_line\",\n \"address_city\": \"city\",\n \"address_state\": \"state\",\n \"address_zip\": \"zip_code\"\n },\n \"optionalAddressColumnMapping\": {\n \"address_line2\": \"secondary_line\",\n \"company\": \"company\",\n \"address_country\": \"country\"\n },\n \"mergeVariableColumnMapping\": {\n \"gift_code\": \"code\"\n },\n \"metadata\": {\n \"columns\": [\n \"recipient_name\",\n \"zip_code\"\n ]\n }\n }\n]", + "body": "{\n \"id\": \"ex_6a94fe68fd151e0f8\",\n \"dateCreated\": \"2021-07-06T22:51:42.838Z\",\n \"dateModified\": \"2022-07-06T22:51:42.838Z\",\n \"deleted\": false,\n \"s3Url\": null,\n \"state\": \"in_progress\",\n \"type\": \"failures\",\n \"uploadId\": \"upl_71be866e430b11e9\"\n}", "cookie": [], "_postman_previewlanguage": "json" } ], "event": [] - }, + } + ], + "event": [] + }, + { + "id": "6bca618f-6052-4f4b-9e44-edf31a95bef0", + "name": "URL Shortener", + "description": { + "content": "Lob's URL shortener allows you to generate unique short links, either with Lob's own domain or your own custom domains. Each custom link enables Lob to track mail individually and provide customers the relevant tracking data in their dashboard.\n\nWebhooks can be used to integrate Lob's URL Shortener scans into your omni channel marketing stratergy. See the 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.\n\nFurthermore, you can use our Retrieve endpoints to track the impact and engagement rate of links created. \n\n\n", + "type": "text/plain" + }, + "item": [ { - "id": "430c7317-cb02-4c94-9499-8bec68bdc7ac", - "name": "Create", + "id": "231800d0-f98c-4f99-a19b-533f637e6d8a", + "name": "Retrieve a domain", "request": { - "name": "Create", + "name": "Retrieve a domain", "description": { - "content": "Creates a new upload with the provided properties.", + "content": "Retrieve details for a single domain.", "type": "text/plain" }, "url": { "path": [ - "uploads" + "domains", + ":domain_id" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [] + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "domain_id", + "description": "(Required) Unique identifier for a domain." + } + ] }, "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, { "key": "Accept", "value": "application/json" } ], - "method": "POST", - "auth": null, - "body": { - "mode": "raw", - "raw": "{\n \"campaignId\": \"\",\n \"requiredAddressColumnMapping\": {\n \"name\": null,\n \"address_line1\": null,\n \"address_city\": null,\n \"address_state\": null,\n \"address_zip\": null\n },\n \"optionalAddressColumnMapping\": {\n \"address_line2\": null,\n \"company\": null,\n \"address_country\": null\n },\n \"metadata\": {\n \"columns\": []\n },\n \"mergeVariableColumnMapping\": \"\"\n}", - "options": { - "raw": { - "language": "json" - } - } - } + "method": "GET", + "auth": null }, "response": [ { - "id": "af5866f1-ee26-4108-bf8e-7b0c68de4d63", - "name": "Upload created successfully", + "id": "7fd1990f-b3a0-4b0d-a310-91e5dc3997f8", + "name": "Returns domain related details.", "originalRequest": { "url": { "path": [ - "uploads" + "domains", + ":domain_id" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [] + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "domain_id", + "description": "(Required) Unique identifier for a domain." + } + ] }, "header": [ { @@ -15107,42 +17118,43 @@ "value": "Basic " } ], - "method": "POST", - "body": { - "mode": "raw", - "raw": "{\n \"campaignId\": \"cmp_1933ad629bae1408\",\n \"requiredAddressColumnMapping\": {\n \"name\": \"recipient_name\",\n \"address_line1\": \"primary_line\",\n \"address_city\": \"city\",\n \"address_state\": \"state\",\n \"address_zip\": \"zip_code\"\n },\n \"optionalAddressColumnMapping\": {\n \"address_line2\": \"secondary_line\",\n \"company\": \"company\",\n \"address_country\": \"country,\"\n },\n \"metadata\": {\n \"columns\": []\n },\n \"mergeVariableColumnMapping\": {\n \"name\": \"recipient_name\",\n \"gift_code\": \"code\"\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - } + "method": "GET", + "body": {} }, - "status": "Created", - "code": 201, + "status": "OK", + "code": 200, "header": [ { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"id\": \"upl_71be866e430b11e9\",\n \"accountId\": \"fa9ea650fc7b31a89f92\",\n \"campaignId\": \"cmp_1933ad629bae1408\",\n \"mode\": \"live\",\n \"failuresUrl\": \"http://www.example.com\",\n \"originalFilename\": \"my_audience.csv\",\n \"state\": \"Draft\",\n \"totalMailpieces\": 100,\n \"failedMailpieces\": 5,\n \"validatedMailpieces\": 95,\n \"bytesProcessed\": 17628,\n \"dateCreated\": \"2017-09-05T17:47:53.767Z\",\n \"dateModified\": \"2017-09-05T17:47:53.767Z\",\n \"requiredAddressColumnMapping\": {\n \"name\": null,\n \"address_line1\": null,\n \"address_city\": null,\n \"address_state\": null,\n \"address_zip\": null\n },\n \"optionalAddressColumnMapping\": {\n \"address_line2\": null,\n \"company\": null,\n \"address_country\": null\n },\n \"mergeVariableColumnMapping\": null,\n \"metadata\": {\n \"columns\": []\n }\n}", + "body": "{\n \"id\": \"ea Ut\",\n \"domain\": \"cillum\",\n \"error_redirect_link\": \"cillum mollit tempor\",\n \"created_at\": \"eiusmod adipisicing sed\",\n \"updated_at\": \"adipisicing eu quis aliquip\"\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "3e29aef9-bd66-4e27-97bf-cddacb1ec796", - "name": "Validation Error", + "id": "e9496567-59b8-4fa5-ab6d-61c09ce29002", + "name": "Error", "originalRequest": { "url": { "path": [ - "uploads" + "domains", + ":domain_id" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [] + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "domain_id", + "description": "(Required) Unique identifier for a domain." + } + ] }, "header": [ { @@ -15154,48 +17166,37 @@ "value": "Basic " } ], - "method": "POST", - "body": { - "mode": "raw", - "raw": "{\n \"campaignId\": \"cmp_1933ad629bae1408\",\n \"requiredAddressColumnMapping\": {\n \"name\": \"recipient_name\",\n \"address_line1\": \"primary_line\",\n \"address_city\": \"city\",\n \"address_state\": \"state\",\n \"address_zip\": \"zip_code\"\n },\n \"optionalAddressColumnMapping\": {\n \"address_line2\": \"secondary_line\",\n \"company\": \"company\",\n \"address_country\": \"country,\"\n },\n \"metadata\": {\n \"columns\": []\n },\n \"mergeVariableColumnMapping\": {\n \"name\": \"recipient_name\",\n \"gift_code\": \"code\"\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - } + "method": "GET", + "body": {} }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, + "status": "Internal Server Error", + "code": 500, "header": [ { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"ut occaecat\",\n \"dolore nulla pariatur tempor culpa\"\n ],\n \"msg\": \"proident non\",\n \"type\": \"officia nostrud Duis veni\"\n },\n {\n \"loc\": [\n \"ut et aute esse reprehenderit\",\n \"deserunt irure\"\n ],\n \"msg\": \"labore tempor Duis\",\n \"type\": \"et in nisi Ut\"\n }\n ]\n}", + "body": "{\n \"error\": {\n \"message\": \"Rate limit exceeded. Please wait 5 seconds and try your request again.\",\n \"status_code\": null,\n \"code\": \"unsupported_lob_version\"\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } ], - "event": [], - "protocolProfileBehavior": { - "disableBodyPruning": true - } + "event": [] }, { - "id": "e4a199dd-16fc-4dd6-a526-263610cb2cc6", - "name": "Retrieve", + "id": "672f0332-af5d-4048-a20e-44a57612f9ee", + "name": "Delete a Domain", "request": { - "name": "Retrieve", + "name": "Delete a Domain", "description": { - "content": "Retrieves the details of an existing upload. You need only supply the unique upload identifier that was returned upon upload creation.", + "content": "Delete a registered domain. This operation can only be performed if all associated links with the domain are deleted.", "type": "text/plain" }, "url": { "path": [ - "uploads", - ":upl_id" + "domains", + ":domain_id" ], "host": [ "{{baseUrl}}" @@ -15206,8 +17207,8 @@ "disabled": false, "type": "any", "value": "", - "key": "upl_id", - "description": "(Required) id of the upload" + "key": "domain_id", + "description": "(Required) Unique identifier for a domain." } ] }, @@ -15217,18 +17218,18 @@ "value": "application/json" } ], - "method": "GET", + "method": "DELETE", "auth": null }, "response": [ { - "id": "e1a4a8fa-7142-427d-be76-fa2c8abf514b", - "name": "Returns an upload object", + "id": "aca3854e-609b-4795-b687-f235f1290a5b", + "name": "Returns the deleted link object.", "originalRequest": { "url": { "path": [ - "uploads", - ":upl_id" + "domains", + ":domain_id" ], "host": [ "{{baseUrl}}" @@ -15239,8 +17240,8 @@ "disabled": false, "type": "any", "value": "", - "key": "upl_id", - "description": "(Required) id of the upload" + "key": "domain_id", + "description": "(Required) Unique identifier for a domain." } ] }, @@ -15254,7 +17255,7 @@ "value": "Basic " } ], - "method": "GET", + "method": "DELETE", "body": {} }, "status": "OK", @@ -15265,66 +17266,18 @@ "value": "application/json" } ], - "body": "{\n \"id\": \"upl_71be866e430b11e9\",\n \"accountId\": \"fa9ea650fc7b31a89f92\",\n \"campaignId\": \"cmp_1933ad629bae1408\",\n \"mode\": \"live\",\n \"failuresUrl\": \"http://www.example.com\",\n \"originalFilename\": \"my_audience.csv\",\n \"state\": \"Draft\",\n \"totalMailpieces\": 100,\n \"failedMailpieces\": 5,\n \"validatedMailpieces\": 95,\n \"bytesProcessed\": 17628,\n \"dateCreated\": \"2017-09-05T17:47:53.767Z\",\n \"dateModified\": \"2017-09-05T17:47:53.767Z\",\n \"requiredAddressColumnMapping\": {\n \"name\": null,\n \"address_line1\": null,\n \"address_city\": null,\n \"address_state\": null,\n \"address_zip\": null\n },\n \"optionalAddressColumnMapping\": {\n \"address_line2\": null,\n \"company\": null,\n \"address_country\": null\n },\n \"mergeVariableColumnMapping\": null,\n \"metadata\": {\n \"columns\": []\n }\n}", - "cookie": [], - "_postman_previewlanguage": "json" - }, - { - "id": "0c999bbf-5f37-4477-a2ea-6b230acc50b5", - "name": "Not Found Error", - "originalRequest": { - "url": { - "path": [ - "uploads", - ":upl_id" - ], - "host": [ - "{{baseUrl}}" - ], - "query": [], - "variable": [ - { - "disabled": false, - "type": "any", - "value": "", - "key": "upl_id", - "description": "(Required) id of the upload" - } - ] - }, - "header": [ - { - "description": { - "content": "Added as a part of security scheme: basic", - "type": "text/plain" - }, - "key": "Authorization", - "value": "Basic " - } - ], - "method": "GET", - "body": {} - }, - "status": "Not Found", - "code": 404, - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"upload not found\",\n \"status_code\": 404\n }\n}", + "body": "{\n \"id\": \"veniam labore\",\n \"deleted\": true\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "91935405-df60-43bc-932c-bc74c12a3d8d", - "name": "Validation Error", + "id": "a310b7b0-1610-4446-ad6b-2b88c7e13ebf", + "name": "Error", "originalRequest": { "url": { "path": [ - "uploads", - ":upl_id" + "domains", + ":domain_id" ], "host": [ "{{baseUrl}}" @@ -15335,8 +17288,8 @@ "disabled": false, "type": "any", "value": "", - "key": "upl_id", - "description": "(Required) id of the upload" + "key": "domain_id", + "description": "(Required) Unique identifier for a domain." } ] }, @@ -15350,18 +17303,18 @@ "value": "Basic " } ], - "method": "GET", + "method": "DELETE", "body": {} }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, + "status": "Internal Server Error", + "code": 500, "header": [ { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"velit consequat elit dolore\",\n \"cupidat\"\n ],\n \"msg\": \"voluptate Duis Excepteur\",\n \"type\": \"esse in culpa occaecat\"\n },\n {\n \"loc\": [\n \"id \",\n \"proident ex nisi reprehenderit\"\n ],\n \"msg\": \"est sint exercitation occaecat\",\n \"type\": \"incididunt officia dolor\"\n }\n ]\n}", + "body": "{\n \"error\": {\n \"message\": \"Rate limit exceeded. Please wait 5 seconds and try your request again.\",\n \"status_code\": null,\n \"code\": \"unsupported_lob_version\"\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } @@ -15369,78 +17322,67 @@ "event": [] }, { - "id": "29bb94db-0c3e-4c32-9b6c-4dd54f4e2ef1", - "name": "Update", + "id": "40f825dd-2a78-4a4a-8517-f942f67a3fb7", + "name": "Create Domain", "request": { - "name": "Update", + "name": "Create Domain", "description": { - "content": "Update the details of an existing upload. You need only supply the unique identifier that was returned upon upload creation.", + "content": "Add a new custom domain that can be used to create custom links.", "type": "text/plain" }, "url": { "path": [ - "uploads", - ":upl_id" + "domains" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "type": "any", - "value": "", - "key": "upl_id", - "description": "(Required) id of the upload" - } - ] + "variable": [] }, "header": [ { "key": "Content-Type", - "value": "application/json" + "value": "application/x-www-form-urlencoded" }, { "key": "Accept", "value": "application/json" } ], - "method": "PATCH", + "method": "POST", "auth": null, "body": { - "mode": "raw", - "raw": "{\n \"originalFilename\": \"\",\n \"requiredAddressColumnMapping\": {\n \"name\": null,\n \"address_line1\": null,\n \"address_city\": null,\n \"address_state\": null,\n \"address_zip\": null\n },\n \"optionalAddressColumnMapping\": {\n \"address_line2\": null,\n \"company\": null,\n \"address_country\": null\n },\n \"metadata\": {\n \"columns\": []\n },\n \"mergeVariableColumnMapping\": \"\"\n}", - "options": { - "raw": { - "language": "json" + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "key": "domain", + "value": "", + "description": "(Required) " + }, + { + "disabled": false, + "key": "error_redirect_link", + "value": "" } - } + ] } }, "response": [ { - "id": "b02e5837-033a-4a0b-ba2e-51707a753a49", - "name": "Returns an upload object", + "id": "c232a2f9-3121-4de5-bfd2-471877dc379b", + "name": "Returns a domain object with details.", "originalRequest": { "url": { "path": [ - "uploads", - ":upl_id" + "domains" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "type": "any", - "value": "", - "key": "upl_id", - "description": "(Required) id of the upload" - } - ] + "variable": [] }, "header": [ { @@ -15452,107 +17394,47 @@ "value": "Basic " } ], - "method": "PATCH", + "method": "POST", "body": { - "mode": "raw", - "raw": "{\n \"originalFilename\": \"\",\n \"requiredAddressColumnMapping\": {\n \"name\": \"recipient_name\",\n \"address_line1\": \"primary_line\",\n \"address_city\": \"city\",\n \"address_state\": \"state\",\n \"address_zip\": \"zip_code\"\n },\n \"optionalAddressColumnMapping\": {\n \"address_line2\": \"secondary_line\",\n \"company\": \"company\",\n \"address_country\": \"country,\"\n },\n \"metadata\": {\n \"columns\": []\n },\n \"mergeVariableColumnMapping\": {\n \"name\": \"recipient_name\",\n \"gift_code\": \"code\"\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - } - }, - "status": "OK", - "code": 200, - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": "{\n \"id\": \"upl_71be866e430b11e9\",\n \"accountId\": \"fa9ea650fc7b31a89f92\",\n \"campaignId\": \"cmp_1933ad629bae1408\",\n \"mode\": \"live\",\n \"failuresUrl\": \"http://www.example.com\",\n \"originalFilename\": \"my_audience.csv\",\n \"state\": \"Draft\",\n \"totalMailpieces\": 100,\n \"failedMailpieces\": 5,\n \"validatedMailpieces\": 95,\n \"bytesProcessed\": 17628,\n \"dateCreated\": \"2017-09-05T17:47:53.767Z\",\n \"dateModified\": \"2017-09-05T17:47:53.767Z\",\n \"requiredAddressColumnMapping\": {\n \"name\": null,\n \"address_line1\": null,\n \"address_city\": null,\n \"address_state\": null,\n \"address_zip\": null\n },\n \"optionalAddressColumnMapping\": {\n \"address_line2\": null,\n \"company\": null,\n \"address_country\": null\n },\n \"mergeVariableColumnMapping\": null,\n \"metadata\": {\n \"columns\": []\n }\n}", - "cookie": [], - "_postman_previewlanguage": "json" - }, - { - "id": "da3e21a8-b3e1-4d76-882d-8409414f6624", - "name": "Not Found Error", - "originalRequest": { - "url": { - "path": [ - "uploads", - ":upl_id" - ], - "host": [ - "{{baseUrl}}" - ], - "query": [], - "variable": [ + "mode": "urlencoded", + "urlencoded": [ { "disabled": false, - "type": "any", - "value": "", - "key": "upl_id", - "description": "(Required) id of the upload" + "description": { + "content": "(Required) ", + "type": "text/plain" + }, + "key": "domain", + "value": "lob.st" } ] - }, - "header": [ - { - "description": { - "content": "Added as a part of security scheme: basic", - "type": "text/plain" - }, - "key": "Authorization", - "value": "Basic " - } - ], - "method": "PATCH", - "body": { - "mode": "raw", - "raw": "{\n \"originalFilename\": \"\",\n \"requiredAddressColumnMapping\": {\n \"name\": \"recipient_name\",\n \"address_line1\": \"primary_line\",\n \"address_city\": \"city\",\n \"address_state\": \"state\",\n \"address_zip\": \"zip_code\"\n },\n \"optionalAddressColumnMapping\": {\n \"address_line2\": \"secondary_line\",\n \"company\": \"company\",\n \"address_country\": \"country,\"\n },\n \"metadata\": {\n \"columns\": []\n },\n \"mergeVariableColumnMapping\": {\n \"name\": \"recipient_name\",\n \"gift_code\": \"code\"\n }\n}", - "options": { - "raw": { - "language": "json" - } - } } }, - "status": "Not Found", - "code": 404, + "status": "OK", + "code": 200, "header": [ { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"upload not found\",\n \"status_code\": 404\n }\n}", + "body": "{\n \"id\": \"ea Ut\",\n \"domain\": \"cillum\",\n \"error_redirect_link\": \"cillum mollit tempor\",\n \"created_at\": \"eiusmod adipisicing sed\",\n \"updated_at\": \"adipisicing eu quis aliquip\"\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "8ba5bc91-f102-4025-8cd3-8cd13f5fe4e4", - "name": "Validation Error", + "id": "f950d63a-5c64-466d-b650-5b2dba41a0f6", + "name": "Error", "originalRequest": { "url": { "path": [ - "uploads", - ":upl_id" + "domains" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "type": "any", - "value": "", - "key": "upl_id", - "description": "(Required) id of the upload" - } - ] + "variable": [] }, "header": [ { @@ -15564,26 +17446,31 @@ "value": "Basic " } ], - "method": "PATCH", + "method": "POST", "body": { - "mode": "raw", - "raw": "{\n \"originalFilename\": \"\",\n \"requiredAddressColumnMapping\": {\n \"name\": \"recipient_name\",\n \"address_line1\": \"primary_line\",\n \"address_city\": \"city\",\n \"address_state\": \"state\",\n \"address_zip\": \"zip_code\"\n },\n \"optionalAddressColumnMapping\": {\n \"address_line2\": \"secondary_line\",\n \"company\": \"company\",\n \"address_country\": \"country,\"\n },\n \"metadata\": {\n \"columns\": []\n },\n \"mergeVariableColumnMapping\": {\n \"name\": \"recipient_name\",\n \"gift_code\": \"code\"\n }\n}", - "options": { - "raw": { - "language": "json" + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "description": { + "content": "(Required) ", + "type": "text/plain" + }, + "key": "domain", + "value": "lob.st" } - } + ] } }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, + "status": "Internal Server Error", + "code": 500, "header": [ { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"velit consequat elit dolore\",\n \"cupidat\"\n ],\n \"msg\": \"voluptate Duis Excepteur\",\n \"type\": \"esse in culpa occaecat\"\n },\n {\n \"loc\": [\n \"id \",\n \"proident ex nisi reprehenderit\"\n ],\n \"msg\": \"est sint exercitation occaecat\",\n \"type\": \"incididunt officia dolor\"\n }\n ]\n}", + "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"domain is required\",\n \"status_code\": 422\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } @@ -15594,59 +17481,47 @@ } }, { - "id": "7734b449-dac0-4ed8-8a1d-1a34b66696a1", - "name": "Delete", + "id": "fe9f3ee8-6187-4478-b4da-cc2d45baaabb", + "name": "List all domains", "request": { - "name": "Delete", + "name": "List all domains", "description": { - "content": "Delete an existing upload. You need only supply the unique identifier that was returned upon upload creation.", + "content": "Retrieve a list of all created domains.", "type": "text/plain" }, "url": { "path": [ - "uploads", - ":upl_id" + "domains" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "type": "any", - "value": "", - "key": "upl_id", - "description": "(Required) id of the upload" - } - ] + "variable": [] }, - "method": "DELETE", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", "auth": null }, "response": [ { - "id": "cd4b94a6-305c-4787-a81d-2e38076c9ebf", - "name": "Successful Response", + "id": "2a6a0cbe-e936-4e2b-a7d0-c3c9b2626cd1", + "name": "Returns a list of all domains.", "originalRequest": { "url": { "path": [ - "uploads", - ":upl_id" + "domains" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "type": "any", - "value": "", - "key": "upl_id", - "description": "(Required) id of the upload" - } - ] + "variable": [] }, "header": [ { @@ -15658,38 +17533,76 @@ "value": "Basic " } ], - "method": "DELETE", + "method": "GET", "body": {} }, - "status": "No Content", - "code": 204, + "status": "OK", + "code": 200, "header": [ { "key": "Content-Type", - "value": "text/plain" + "value": "application/json" } ], - "body": "", + "body": "{\n \"data\": [\n {\n \"id\": \"nisi sunt in\",\n \"domain\": \"dolore amet\",\n \"error_redirect_link\": \"consequat fugiat veniam\",\n \"created_at\": \"consectetur cillum\",\n \"updated_at\": \"laboris incididunt non dolor in\"\n },\n {\n \"id\": \"aliquip proident adipisicing ipsum enim\",\n \"domain\": \"dolor ut veniam\",\n \"error_redirect_link\": \"ad proident deserunt\",\n \"created_at\": \"ea et\",\n \"updated_at\": \"voluptate\"\n }\n ]\n}", "cookie": [], - "_postman_previewlanguage": "text" + "_postman_previewlanguage": "json" + }, + { + "id": "1b28776f-1279-4d1a-9216-f92acefb0b9d", + "name": "Error", + "originalRequest": { + "url": { + "path": [ + "domains" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Basic " + } + ], + "method": "GET", + "body": {} + }, + "status": "Internal Server Error", + "code": 500, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"error\": {\n \"message\": \"Rate limit exceeded. Please wait 5 seconds and try your request again.\",\n \"status_code\": null,\n \"code\": \"unsupported_lob_version\"\n }\n}", + "cookie": [], + "_postman_previewlanguage": "json" } ], "event": [] }, { - "id": "1f788fa3-ac95-4ff4-8de7-8e56805e0d30", - "name": "Upload file", + "id": "358ed518-4271-47be-a5a4-886c18fda5a6", + "name": "Retrieve a link", "request": { - "name": "Upload file", + "name": "Retrieve a link", "description": { - "content": "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.", + "content": "Retrieves a single shortened link.", "type": "text/plain" }, "url": { "path": [ - "uploads", - ":upl_id", - "file" + "links", + ":link_id" ], "host": [ "{{baseUrl}}" @@ -15700,44 +17613,29 @@ "disabled": false, "type": "any", "value": "", - "key": "upl_id", - "description": "(Required) ID of the upload" + "key": "link_id", + "description": "(Required) Unique identifier for a link." } ] }, "header": [ - { - "key": "Content-Type", - "value": "multipart/form-data" - }, { "key": "Accept", "value": "application/json" } ], - "method": "POST", - "auth": null, - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "file", - "type": "file", - "description": "" - } - ] - } + "method": "GET", + "auth": null }, "response": [ { - "id": "76892bd7-654a-4006-8aa1-026e1586f3da", - "name": "Successful Response", + "id": "fb1f08b7-a3dd-4668-9696-ec3f2dcaf391", + "name": "Returns a single link.", "originalRequest": { "url": { "path": [ - "uploads", - ":upl_id", - "file" + "links", + ":link_id" ], "host": [ "{{baseUrl}}" @@ -15748,8 +17646,8 @@ "disabled": false, "type": "any", "value": "", - "key": "upl_id", - "description": "(Required) ID of the upload" + "key": "link_id", + "description": "(Required) Unique identifier for a link." } ] }, @@ -15763,43 +17661,29 @@ "value": "Basic " } ], - "method": "POST", - "body": { - "mode": "formdata", - "formdata": [ - { - "description": { - "content": "", - "type": "text/plain" - }, - "key": "file", - "value": "", - "type": "text" - } - ] - } + "method": "GET", + "body": {} }, - "status": "Accepted", - "code": 202, + "status": "OK", + "code": 200, "header": [ { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"message\": \"File uploaded successfully\",\n \"filename\": \"of\"\n}", + "body": "{\n \"id\": \"dolore\",\n \"title\": \"nulla reprehenderit in\",\n \"domain_id\": \"exercitation tempor\",\n \"redirect_link\": \"incididunt do\",\n \"short_link\": \"fugiat Lorem\",\n \"metadata\": \"abu&/COwMo!;V9ugV.^jqx(=8Mt#E=Cl7+m'cT%/b6aO`9$$T6_ah#L'lQ[4=#x%N(DeAdd`Rl7xb+m-6Os|ngx>'<}D_]36g/E:5T{Z,/dr6Y56L=#q065Em4%VkF@Ibcs%n@;g8B5>N-i>a9b[R!1Pls{8O)_1|&6>*;BRr:yG:|5`z:", - "key": "upl_id", - "description": "(Required) ID of the upload" + "key": "link_id", + "description": "(Required) Unique identifier for a link." } ] }, @@ -15825,54 +17709,37 @@ "value": "Basic " } ], - "method": "POST", - "body": { - "mode": "formdata", - "formdata": [ - { - "description": { - "content": "", - "type": "text/plain" - }, - "key": "file", - "value": "", - "type": "text" - } - ] - } + "method": "GET", + "body": {} }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, + "status": "Internal Server Error", + "code": 500, "header": [ { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"velit consequat elit dolore\",\n \"cupidat\"\n ],\n \"msg\": \"voluptate Duis Excepteur\",\n \"type\": \"esse in culpa occaecat\"\n },\n {\n \"loc\": [\n \"id \",\n \"proident ex nisi reprehenderit\"\n ],\n \"msg\": \"est sint exercitation occaecat\",\n \"type\": \"incididunt officia dolor\"\n }\n ]\n}", + "body": "{\n \"error\": {\n \"message\": \"Rate limit exceeded. Please wait 5 seconds and try your request again.\",\n \"status_code\": null,\n \"code\": \"unsupported_lob_version\"\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } ], - "event": [], - "protocolProfileBehavior": { - "disableBodyPruning": true - } + "event": [] }, { - "id": "f4f01e0b-e759-4961-befb-d9e371120543", - "name": "Create Export", + "id": "34ea9195-c091-46c2-be0f-7dfdff455d9f", + "name": "Update a Link", "request": { - "name": "Create Export", + "name": "Update a Link", "description": { - "content": "Campaign Exports can help you understand exactly which records in a campaign could not be created. By initiating and retrieving an export, you will get row-by-row errors for your campaign. For a step-by-step walkthrough of creating a campaign and exporting failures, see our [Campaigns Guide](https://help.lob.com/print-and-mail/building-a-mail-strategy/campaign-or-triggered-sends/launch-your-first-campaign).\n\nCreate an export file associated with an upload.", + "content": "Update any of the properties of a shortened link.", "type": "text/plain" }, "url": { "path": [ - "uploads", - ":upl_id", - "exports" + "links", + ":link_id" ], "host": [ "{{baseUrl}}" @@ -15883,43 +17750,55 @@ "disabled": false, "type": "any", "value": "", - "key": "upl_id", - "description": "(Required) ID of the upload" + "key": "link_id", + "description": "(Required) Unique identifier for a link." } ] }, "header": [ { "key": "Content-Type", - "value": "application/json" + "value": "application/x-www-form-urlencoded" }, { "key": "Accept", "value": "application/json" } ], - "method": "POST", + "method": "PATCH", "auth": null, "body": { - "mode": "raw", - "raw": "{\n \"type\": \"\"\n}", - "options": { - "raw": { - "language": "json" + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "key": "redirect_link", + "value": "", + "description": "(Required) " + }, + { + "disabled": false, + "key": "title", + "value": "", + "description": "The title of the URL." + }, + { + "disabled": false, + "key": "metadata", + "value": "r__aWxXjJ_|yJ0|J,M$GqOh29d9.l7/ZVTmO8'DnUN)`0KU.d=(8>s*VF^Y,'%)3`q{g*5hVA{K2LdqF01NbSEA`[)e-UwC=QW[$$EP0A8>D3*L0NwxW38'QY_W;O/rCDW=7(&~B>m]RI9UGB&" } - } + ] } }, "response": [ { - "id": "1088da6b-d65f-4085-9846-b5f8d7d8b7cb", - "name": "Successful Response", + "id": "dcf0445b-293d-497c-a049-55026e0a63d1", + "name": "Returns the updated link.", "originalRequest": { "url": { "path": [ - "uploads", - ":upl_id", - "exports" + "links", + ":link_id" ], "host": [ "{{baseUrl}}" @@ -15930,8 +17809,8 @@ "disabled": false, "type": "any", "value": "", - "key": "upl_id", - "description": "(Required) ID of the upload" + "key": "link_id", + "description": "(Required) Unique identifier for a link." } ] }, @@ -15945,15 +17824,16 @@ "value": "Basic " } ], - "method": "POST", + "method": "PATCH", "body": { - "mode": "raw", - "raw": "{\n \"type\": \"\"\n}", - "options": { - "raw": { - "language": "json" + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "key": "resource_id", + "value": "ltr_133" } - } + ] } }, "status": "OK", @@ -15964,19 +17844,18 @@ "value": "application/json" } ], - "body": "{\n \"message\": \"Export is processing\",\n \"exportId\": \"ex_2dafd758ed3da9c43\"\n}", + "body": "{\n \"id\": \"consectetur minim proident aliquip\",\n \"title\": \"sunt mollit\",\n \"domain_id\": \"enim aute ad Lorem aliquip\",\n \"redirect_link\": \"\",\n \"short_link\": \"sint dolore\",\n \"metadata\": \"tW~>eRs: OmOz6V5Q%9~**`H>Gc93v9V 2AmxG&Cr1tR:aHd.HPT1^^E!t?9ZT.&z(b|R!i2RA,AgV`B6t/cWiax`RYw|q|lpK3Dg/W bTa1M>rkXrB?v;B'!6tTqESHSk69S7!& u?P+K21CoVSUq:kiFJgc3D>)o*iDs,z_Ce,69};Tov=kbo5B0+=h]?!3eG^m3fONW|'t{q>w2v'CiS7@qJ.^Xk00c\"\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "b0e8939d-7567-422f-99c4-c7555aacd3c3", - "name": "Create Export Error", + "id": "512c75e6-a3c2-4202-ae22-6c92f5ad0a1c", + "name": "Error", "originalRequest": { "url": { "path": [ - "uploads", - ":upl_id", - "exports" + "links", + ":link_id" ], "host": [ "{{baseUrl}}" @@ -15987,8 +17866,8 @@ "disabled": false, "type": "any", "value": "", - "key": "upl_id", - "description": "(Required) ID of the upload" + "key": "link_id", + "description": "(Required) Unique identifier for a link." } ] }, @@ -16002,26 +17881,27 @@ "value": "Basic " } ], - "method": "POST", + "method": "PATCH", "body": { - "mode": "raw", - "raw": "{\n \"type\": \"\"\n}", - "options": { - "raw": { - "language": "json" + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "key": "resource_id", + "value": "ltr_133" } - } + ] } }, - "status": "Bad Request", - "code": 400, + "status": "Internal Server Error", + "code": 500, "header": [ { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"code\": 400,\n \"message\": \"Invalid body, check 'errors' property for more info.\",\n \"errors\": [\n \"type must be a string\"\n ]\n}", + "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"redirect_link is required\",\n \"status_code\": 422\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } @@ -16032,50 +17912,30 @@ } }, { - "id": "746f662e-9ed3-4241-98df-1d6ca4dffca4", - "name": "Retrieve Line Item Report", + "id": "cb4ad569-6cc7-49a8-81a0-8abdba00ad3b", + "name": "Delete Link", "request": { - "name": "Retrieve Line Item Report", + "name": "Delete Link", "description": { - "content": "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.", + "content": "Delete the shortened link.", "type": "text/plain" }, "url": { "path": [ - "uploads", - ":upl_id", - "report" + "links", + ":link_id" ], "host": [ "{{baseUrl}}" ], - "query": [ - { - "disabled": false, - "key": "status", - "value": "", - "description": "The status of line items to filter and retrieve. By default all line items are returned." - }, - { - "disabled": false, - "key": "limit", - "value": "100", - "description": "How many results to return." - }, - { - "disabled": false, - "key": "offset", - "value": "0", - "description": "An integer that designates the offset at which to begin returning results. Defaults to 0." - } - ], + "query": [], "variable": [ { "disabled": false, "type": "any", "value": "", - "key": "upl_id", - "description": "(Required) ID of the upload" + "key": "link_id", + "description": "(Required) Unique identifier for a link." } ] }, @@ -16085,44 +17945,30 @@ "value": "application/json" } ], - "method": "GET", + "method": "DELETE", "auth": null }, "response": [ { - "id": "de7c3dae-c4bd-4ded-b10f-c2f2f0edae96", - "name": "Returns an report object", + "id": "2d8f06f5-28ea-4c95-9490-2366b14c3abd", + "name": "Returns the deleted short link object", "originalRequest": { "url": { "path": [ - "uploads", - ":upl_id", - "report" + "links", + ":link_id" ], "host": [ "{{baseUrl}}" ], - "query": [ - { - "key": "status", - "value": "" - }, - { - "key": "limit", - "value": "10" - }, - { - "key": "offset", - "value": "0" - } - ], + "query": [], "variable": [ { "disabled": false, "type": "any", "value": "", - "key": "upl_id", - "description": "(Required) ID of the upload" + "key": "link_id", + "description": "(Required) Unique identifier for a link." } ] }, @@ -16136,7 +17982,7 @@ "value": "Basic " } ], - "method": "GET", + "method": "DELETE", "body": {} }, "status": "OK", @@ -16147,106 +17993,30 @@ "value": "application/json" } ], - "body": "{\n \"id\": \"ex_6a94fe68fd151e0f8\",\n \"dateCreated\": \"2021-07-06T22:51:42.838Z\",\n \"dateModified\": \"2022-07-06T22:51:42.838Z\",\n \"deleted\": false,\n \"s3Url\": null,\n \"state\": \"in_progress\",\n \"type\": \"failures\",\n \"uploadId\": \"upl_71be866e430b11e9\"\n}", - "cookie": [], - "_postman_previewlanguage": "json" - }, - { - "id": "05084f98-97af-42fe-9b93-553cb3ca5044", - "name": "Forbidden Error", - "originalRequest": { - "url": { - "path": [ - "uploads", - ":upl_id", - "report" - ], - "host": [ - "{{baseUrl}}" - ], - "query": [ - { - "key": "status", - "value": "" - }, - { - "key": "limit", - "value": "10" - }, - { - "key": "offset", - "value": "0" - } - ], - "variable": [ - { - "disabled": false, - "type": "any", - "value": "", - "key": "upl_id", - "description": "(Required) ID of the upload" - } - ] - }, - "header": [ - { - "description": { - "content": "Added as a part of security scheme: basic", - "type": "text/plain" - }, - "key": "Authorization", - "value": "Basic " - } - ], - "method": "GET", - "body": {} - }, - "status": "Forbidden", - "code": 403, - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": "{\n \"message\": \"This feature is not enabled for this account: access_upload_report\",\n \"code\": 403\n}", + "body": "{\n \"id\": \"sit elit quis id\",\n \"deleted\": false\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "a905993e-79cf-45db-943d-10761c8bb963", - "name": "Not Found Error", + "id": "b3402c46-1457-4ac9-80dc-e823d5ebc03e", + "name": "Error", "originalRequest": { "url": { "path": [ - "uploads", - ":upl_id", - "report" + "links", + ":link_id" ], "host": [ "{{baseUrl}}" ], - "query": [ - { - "key": "status", - "value": "" - }, - { - "key": "limit", - "value": "10" - }, - { - "key": "offset", - "value": "0" - } - ], + "query": [], "variable": [ { "disabled": false, "type": "any", "value": "", - "key": "upl_id", - "description": "(Required) ID of the upload" + "key": "link_id", + "description": "(Required) Unique identifier for a link." } ] }, @@ -16260,18 +18030,18 @@ "value": "Basic " } ], - "method": "GET", + "method": "DELETE", "body": {} }, - "status": "Not Found", - "code": 404, + "status": "Internal Server Error", + "code": 500, "header": [ { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"upload not found\",\n \"status_code\": 404\n }\n}", + "body": "{\n \"error\": {\n \"message\": \"Rate limit exceeded. Please wait 5 seconds and try your request again.\",\n \"status_code\": null,\n \"code\": \"unsupported_lob_version\"\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } @@ -16279,83 +18049,146 @@ "event": [] }, { - "id": "50fcdd91-8656-4985-bd77-3ba0c103d468", - "name": "Retrieve Export", + "id": "0b3d51f6-fe57-4080-a98f-44977df15135", + "name": "Create Link", "request": { - "name": "Retrieve Export", + "name": "Create Link", "description": { - "content": "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`.", + "content": "Given a long URL, shorten your URL either by using a custom domain or Lob's own short domain.", "type": "text/plain" }, "url": { "path": [ - "uploads", - ":upl_id", - "exports", - ":ex_id" + "links" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [ + "variable": [] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/x-www-form-urlencoded" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "POST", + "auth": null, + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "key": "redirect_link", + "value": "", + "description": "(Required) " + }, + { + "disabled": false, + "key": "title", + "value": "", + "description": "The title of the URL." + }, { "disabled": false, - "type": "any", + "key": "domain", "value": "", - "key": "upl_id", - "description": "(Required) ID of the upload" + "description": "The registered domain to be used for the short URL." }, { "disabled": false, - "type": "any", + "key": "slug", "value": "", - "key": "ex_id", - "description": "(Required) ID of the export" + "description": "The unique path for the shortened URL, if empty a unique path will be used." + }, + { + "disabled": false, + "key": "metadata", + "value": "dY={6V+?.*0yJGwj^?~t&5Ko0/MIV0C$aW?Dh!T=a`iIGS[N" } ] - }, - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "method": "GET", - "auth": null + } }, "response": [ { - "id": "614f4c41-60b2-4068-81a1-00a363b71926", - "name": "Returns an export object", + "id": "a8e5fd78-a0cd-495b-9695-048362c4a2ae", + "name": "Returns a successfully created link.", "originalRequest": { "url": { "path": [ - "uploads", - ":upl_id", - "exports", - ":ex_id" + "links" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [ + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: basic", + "type": "text/plain" + }, + "key": "Authorization", + "value": "Basic " + } + ], + "method": "POST", + "body": { + "mode": "urlencoded", + "urlencoded": [ { "disabled": false, - "type": "any", - "value": "", - "key": "upl_id", - "description": "(Required) ID of the upload" + "description": { + "content": "(Required) ", + "type": "text/plain" + }, + "key": "redirect_link", + "value": "https://www.lob.com" }, { "disabled": false, - "type": "any", - "value": "", - "key": "ex_id", - "description": "(Required) ID of the export" + "description": { + "content": "The registered domain to be used for the short URL.", + "type": "text/plain" + }, + "key": "domain", + "value": "lob.st" } ] + } + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"id\": \"consectetur minim proident aliquip\",\n \"title\": \"sunt mollit\",\n \"domain_id\": \"enim aute ad Lorem aliquip\",\n \"redirect_link\": \"\",\n \"short_link\": \"sint dolore\",\n \"metadata\": \"tW~>eRs: OmOz6V5Q%9~**`H>Gc93v9V 2AmxG&Cr1tR:aHd.HPT1^^E!t?9ZT.&z(b|R!i2RA,AgV`B6t/cWiax`RYw|q|lpK3Dg/W bTa1M>rkXrB?v;B'!6tTqESHSk69S7!& u?P+K21CoVSUq:kiFJgc3D>)o*iDs,z_Ce,69};Tov=kbo5B0+=h]?!3eG^m3fONW|'t{q>w2v'CiS7@qJ.^Xk00c\"\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "id": "4f16aed6-77bb-468e-b7c5-7b9acfd3ad9a", + "name": "Error", + "originalRequest": { + "url": { + "path": [ + "links" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] }, "header": [ { @@ -16367,62 +18200,80 @@ "value": "Basic " } ], - "method": "GET", - "body": {} + "method": "POST", + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "description": { + "content": "(Required) ", + "type": "text/plain" + }, + "key": "redirect_link", + "value": "https://www.lob.com" + }, + { + "disabled": false, + "description": { + "content": "The registered domain to be used for the short URL.", + "type": "text/plain" + }, + "key": "domain", + "value": "lob.st" + } + ] + } }, - "status": "OK", - "code": 200, + "status": "Internal Server Error", + "code": 500, "header": [ { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"id\": \"ex_6a94fe68fd151e0f8\",\n \"dateCreated\": \"2021-07-06T22:51:42.838Z\",\n \"dateModified\": \"2022-07-06T22:51:42.838Z\",\n \"deleted\": false,\n \"s3Url\": null,\n \"state\": \"in_progress\",\n \"type\": \"failures\",\n \"uploadId\": \"upl_71be866e430b11e9\"\n}", + "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"redirect_link is required\",\n \"status_code\": 422\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } ], - "event": [] - } - ], - "event": [] - }, - { - "id": "b78bf416-ab1a-42e1-baae-a6eb6ed47198", - "name": "URL Shortener", - "description": { - "content": "Lob's URL shortener allows you to generate unique short links, either with Lob's own domain or your own custom domains. Each custom link enables Lob to track mail individually and provide customers the relevant tracking data in their dashboard.\n\nWebhooks can be used to integrate Lob's URL Shortener scans into your omni channel marketing stratergy. See the 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.\n\nFurthermore, you can use our Retrieve endpoints to track the impact and engagement rate of links created. \n\n\n", - "type": "text/plain" - }, - "item": [ + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, { - "id": "c8499c5f-629f-49bf-88da-d9179790bc0f", - "name": "Retrieve a domain", + "id": "dbc994d2-f7f4-4eb5-b679-63c52793d8b7", + "name": "List all links", "request": { - "name": "Retrieve a domain", + "name": "List all links", "description": { - "content": "Retrieve details for a single domain.", + "content": "Retrieves a list of shortened links. The list is sorted by creation date, with the most recently created appearing first.", "type": "text/plain" }, "url": { "path": [ - "domains", - ":domain_id" + "links" ], "host": [ "{{baseUrl}}" ], - "query": [], - "variable": [ + "query": [ { "disabled": false, - "type": "any", - "value": "", - "key": "domain_id", - "description": "(Required) Unique identifier for a domain." + "key": "limit", + "value": "10", + "description": "How many results to return." + }, + { + "disabled": false, + "key": "offset", + "value": "0", + "description": "An integer that designates the offset at which to begin returning results. Defaults to 0." } - ] + ], + "variable": [] }, "header": [ { @@ -16435,27 +18286,27 @@ }, "response": [ { - "id": "0037b428-5636-4883-b082-b10480d2a806", - "name": "Returns domain related details.", + "id": "0a26560f-5b03-42fa-b235-777c8ced7c9b", + "name": "Returns the deleted link object.", "originalRequest": { "url": { "path": [ - "domains", - ":domain_id" + "links" ], "host": [ "{{baseUrl}}" ], - "query": [], - "variable": [ + "query": [ { - "disabled": false, - "type": "any", - "value": "", - "key": "domain_id", - "description": "(Required) Unique identifier for a domain." + "key": "limit", + "value": "10" + }, + { + "key": "offset", + "value": "0" } - ] + ], + "variable": [] }, "header": [ { @@ -16478,32 +18329,32 @@ "value": "application/json" } ], - "body": "{\n \"id\": \"eu\",\n \"domain\": \"Ut tempor ullamco deserunt\",\n \"account_id\": \"elit esse sint qui\"\n}", + "body": "{\n \"count\": 23656454,\n \"limit\": 44214202,\n \"offset\": 87253551,\n \"data\": [\n {\n \"id\": \"nisi id tempor velit\",\n \"title\": \"quis irure qui\",\n \"domain_id\": \"cupidatat eu sed officia\",\n \"redirect_link\": {\n \"value\": \"\"\n },\n \"short_link\": \"veniam sunt culpa dolor\",\n \"metadata\": {\n \"value\": \"\"\n }\n },\n {\n \"id\": \"eiusmod nulla ipsum labore dolore\",\n \"title\": \"aliquip est magna\",\n \"domain_id\": \"deserunt dolor Lorem nostrud\",\n \"redirect_link\": {\n \"value\": \"\"\n },\n \"short_link\": \"sunt in mollit\",\n \"metadata\": {\n \"value\": \"\"\n }\n }\n ]\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "19ee4f15-7621-449b-9c79-faeab2f70983", + "id": "97acb82c-e1c0-4b62-a51e-515a37de5eff", "name": "Error", "originalRequest": { "url": { "path": [ - "domains", - ":domain_id" + "links" ], "host": [ "{{baseUrl}}" ], - "query": [], - "variable": [ + "query": [ { - "disabled": false, - "type": "any", - "value": "", - "key": "domain_id", - "description": "(Required) Unique identifier for a domain." + "key": "limit", + "value": "10" + }, + { + "key": "offset", + "value": "0" } - ] + ], + "variable": [] }, "header": [ { @@ -16526,73 +18377,127 @@ "value": "application/json" } ], - "body": "{\n \"error\": {\n \"message\": \"Rate limit exceeded. Please wait 5 seconds and try your request again.\",\n \"status_code\": null,\n \"code\": \"conflict\"\n }\n}", + "body": "{\n \"error\": {\n \"message\": \"Rate limit exceeded. Please wait 5 seconds and try your request again.\",\n \"status_code\": null,\n \"code\": \"unsupported_lob_version\"\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } ], "event": [] - }, + } + ], + "event": [] + }, + { + "id": "4680a45f-7d56-4f13-b2a8-f2afbe6f62de", + "name": "US Autocompletions", + "description": { + "content": "Given partial address information, this endpoint returns up to 10 address suggestions.
\n## Autocompletion Test Env\nYour test API key does not autocomplete US addresses and is used to simulate behavior. With your test API key, requests with specific values for `address_prefix` return predetermined values. When `address_prefix` is set to:\n- `0 suggestions` - Returns no suggestions - `[PRIMARY NUMBER] s[uggestion]` - Returns a maximum of ten predefined suggested addresses.\n `[PRIMARY NUMBER]` does not have to be a valid primary number when sending a test request.\n Each additional letter in `suggestion` reduces the number of suggestions by one (e.g.\n `1 su` returns 9 suggested addresses). `[PRIMARY NUMBER]` does not affect the number of\n suggestions returned.\n\nCity and state filters work as expected and filter the list of predetermined suggested addresses.\nSee the `test` request & response examples under [Autocomplete Examples](#operation/autocompletion) within the \"Autocomplete a partial address\" section in US Autocompletions. \n", + "type": "text/plain" + }, + "item": [ { - "id": "795f1bd5-8175-4d84-a7ca-c3ae18f2892b", - "name": "Delete a Domain", + "id": "56dd11d4-6902-498e-83d7-fceccbbfc10c", + "name": "Autocomplete", "request": { - "name": "Delete a Domain", + "name": "Autocomplete", "description": { - "content": "Delete a registered domain. This operation can only be performed if all associated links with the domain are deleted.", + "content": "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).", "type": "text/plain" }, "url": { "path": [ - "domains", - ":domain_id" + "us_autocompletions" ], "host": [ "{{baseUrl}}" ], - "query": [], - "variable": [ + "query": [ { "disabled": false, - "type": "any", - "value": "", - "key": "domain_id", - "description": "(Required) Unique identifier for a domain." + "key": "case", + "value": "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`." + }, + { + "disabled": false, + "key": "valid_addresses", + "value": "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." } - ] + ], + "variable": [] }, "header": [ + { + "key": "Content-Type", + "value": "application/x-www-form-urlencoded" + }, { "key": "Accept", "value": "application/json" } ], - "method": "DELETE", - "auth": null + "method": "POST", + "auth": null, + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "key": "address_prefix", + "value": "", + "description": "(Required) Only accepts numbers and street names in an alphanumeric format.\n" + }, + { + "disabled": false, + "key": "city", + "value": "", + "description": "An optional city input used to filter suggestions. Case insensitive and does not match partial abbreviations.\n" + }, + { + "disabled": false, + "key": "state", + "value": "", + "description": "An optional state input used to filter suggestions. Case insensitive and does not match partial abbreviations.\n" + }, + { + "disabled": false, + "key": "zip_code", + "value": "", + "description": "An optional ZIP Code input used to filter suggestions. Matches partial entries.\n" + }, + { + "disabled": false, + "key": "geo_ip_sort", + "value": "", + "description": "If `true`, sort suggestions by proximity to the IP set in the `X-Forwarded-For` header.\n" + } + ] + } }, "response": [ { - "id": "dd263143-9bbf-4795-b206-914c307b3d6e", - "name": "Returns the deleted link object.", + "id": "a4ff08be-7e23-4fb6-9aae-c964202c4c08", + "name": "Returns a US autocompletion object.", "originalRequest": { "url": { "path": [ - "domains", - ":domain_id" + "us_autocompletions" ], "host": [ "{{baseUrl}}" ], - "query": [], - "variable": [ + "query": [ { - "disabled": false, - "type": "any", - "value": "", - "key": "domain_id", - "description": "(Required) Unique identifier for a domain." + "key": "case", + "value": "upper" + }, + { + "key": "valid_addresses", + "value": "false" } - ] + ], + "variable": [] }, "header": [ { @@ -16604,43 +18509,110 @@ "value": "Basic " } ], - "method": "DELETE", - "body": {} + "method": "POST", + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "description": { + "content": "(Required) Only accepts numbers and street names in an alphanumeric format.\n", + "type": "text/plain" + }, + "key": "address_prefix", + "value": "185 B" + }, + { + "disabled": false, + "description": { + "content": "An optional city input used to filter suggestions. Case insensitive and does not match partial abbreviations.\n", + "type": "text/plain" + }, + "key": "city", + "value": "San Francisco" + }, + { + "disabled": false, + "description": { + "content": "An optional state input used to filter suggestions. Case insensitive and does not match partial abbreviations.\n", + "type": "text/plain" + }, + "key": "state", + "value": "CA" + }, + { + "disabled": false, + "description": { + "content": "An optional ZIP Code input used to filter suggestions. Matches partial entries.\n", + "type": "text/plain" + }, + "key": "zip_code", + "value": "94107" + }, + { + "disabled": false, + "description": { + "content": "If `true`, sort suggestions by proximity to the IP set in the `X-Forwarded-For` header.\n", + "type": "text/plain" + }, + "key": "geo_ip_sort", + "value": "false" + } + ] + } }, "status": "OK", "code": 200, "header": [ + { + "disabled": false, + "description": "The rate limit for a given endpoint.", + "key": "ratelimit-limit", + "value": "150" + }, + { + "disabled": false, + "description": "The number of requests remaining in the current window.", + "key": "ratelimit-remaining", + "value": "100" + }, + { + "disabled": false, + "description": "The time at which the rate limit window resets in UTC epoch seconds\n", + "key": "ratelimit-reset", + "value": "1528749846" + }, { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"id\": \"eu\",\n \"domain\": \"Ut tempor ullamco deserunt\",\n \"account_id\": \"elit esse sint qui\"\n}", + "body": "{\n \"id\": \"us_auto_a3ac97bcfbb2460ab20c\",\n \"suggestions\": [\n {\n \"primary_line\": \"185 BAYSIDE VILLAGE PL\",\n \"city\": \"SAN FRANCISCO\",\n \"state\": \"CA\",\n \"zip_code\": \"94107\"\n },\n {\n \"primary_line\": \"185 BRANNAN ST\",\n \"city\": \"SAN FRANCISCO\",\n \"state\": \"CA\",\n \"zip_code\": \"94107\"\n },\n {\n \"primary_line\": \"185 BONIFACIO ST\",\n \"city\": \"SAN FRANCISCO\",\n \"state\": \"CA\",\n \"zip_code\": \"94107\"\n },\n {\n \"primary_line\": \"185 BLAIR TER\",\n \"city\": \"SAN FRANCISCO\",\n \"state\": \"CA\",\n \"zip_code\": \"94107\"\n },\n {\n \"primary_line\": \"185 BLUXOME ST\",\n \"city\": \"SAN FRANCISCO\",\n \"state\": \"CA\",\n \"zip_code\": \"94107\"\n },\n {\n \"primary_line\": \"210 KING ST\",\n \"city\": \"SAN FRANCISCO\",\n \"state\": \"CA\",\n \"zip_code\": \"94107\"\n },\n {\n \"primary_line\": \"185 BRYANT ST\",\n \"city\": \"SAN FRANCISCO\",\n \"state\": \"CA\",\n \"zip_code\": \"94107\"\n }\n ],\n \"object\": \"us_autocompletion\"\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "ca2a5d60-fa4d-40e2-b186-4612ce177c16", + "id": "c5a1fff7-117b-464f-9da2-d7b772c5bc60", "name": "Error", "originalRequest": { "url": { "path": [ - "domains", - ":domain_id" + "us_autocompletions" ], "host": [ "{{baseUrl}}" ], - "query": [], - "variable": [ + "query": [ { - "disabled": false, - "type": "any", - "value": "", - "key": "domain_id", - "description": "(Required) Unique identifier for a domain." + "key": "case", + "value": "upper" + }, + { + "key": "valid_addresses", + "value": "false" } - ] + ], + "variable": [] }, "header": [ { @@ -16652,8 +18624,57 @@ "value": "Basic " } ], - "method": "DELETE", - "body": {} + "method": "POST", + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "description": { + "content": "(Required) Only accepts numbers and street names in an alphanumeric format.\n", + "type": "text/plain" + }, + "key": "address_prefix", + "value": "185 B" + }, + { + "disabled": false, + "description": { + "content": "An optional city input used to filter suggestions. Case insensitive and does not match partial abbreviations.\n", + "type": "text/plain" + }, + "key": "city", + "value": "San Francisco" + }, + { + "disabled": false, + "description": { + "content": "An optional state input used to filter suggestions. Case insensitive and does not match partial abbreviations.\n", + "type": "text/plain" + }, + "key": "state", + "value": "CA" + }, + { + "disabled": false, + "description": { + "content": "An optional ZIP Code input used to filter suggestions. Matches partial entries.\n", + "type": "text/plain" + }, + "key": "zip_code", + "value": "94107" + }, + { + "disabled": false, + "description": { + "content": "If `true`, sort suggestions by proximity to the IP set in the `X-Forwarded-For` header.\n", + "type": "text/plain" + }, + "key": "geo_ip_sort", + "value": "false" + } + ] + } }, "status": "Internal Server Error", "code": 500, @@ -16663,30 +18684,62 @@ "value": "application/json" } ], - "body": "{\n \"error\": {\n \"message\": \"Rate limit exceeded. Please wait 5 seconds and try your request again.\",\n \"status_code\": null,\n \"code\": \"conflict\"\n }\n}", + "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"address_prefix is required\",\n \"status_code\": 422\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } ], - "event": [] - }, + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + } + ], + "event": [] + }, + { + "id": "3cb42f20-82c3-4c22-ba52-fba670b87e0c", + "name": "US Verification Types", + "description": { + "content": "These are detailed definitions for various fields in the [US verification object](#operation/us_verification).\n\n

ZIP Code Types - components[zip_code_type]

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
standardThe default ZIP code type. Used when none of the other types apply.
po_boxThe ZIP code contains only PO Boxes.
uniqueThe ZIP code is uniquely assigned to a single organization (such as a government agency) that receives a large volume of mail.
militaryThe ZIP code contains military addresses.
empty stringA match could not be made with the provided inputs.
\n\n

Record Types - components[record_type]

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
streetThe default address type.
highriseThe address is a commercial building, apartment complex, highrise, etc.
firmThe address is of an organizational entity which receives a minimum number of mailpieces per day.
po_boxThe address is a PO Box.
rural_routeThe address exists on a Rural Route. This is an older system of mail delivery which is still used in some parts of the country.
general_deliveryThe address is part of the USPS General Delivery service, which allows individuals without permanent addresses to receive mail.
empty stringA match could not be made with the provided inputs.
\n\n

Carrier Route Types - components[carrier_route_type]

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
city_deliveryThe default carrier route type. Used when none of the other types apply.
rural_routeThe carrier route is a Rural Route. This is an older system of mail delivery which is still used in some parts of the country.
highway_contractThe carrier route is a Highway Contract Route. This is an older system of mail delivery which is still used in some parts of the country.
po_boxThe carrier route consists of PO Boxes.
general_deliveryThe carrier route is part of the USPS General Delivery service, which allows individuals without permanent addresses to receive mail.
empty stringA match could not be made with the provided inputs.
\n\n

DPV Footnotes - deliverability_analysis[dpv_footnotes]

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
AASome parts of the address (such as the street and ZIP code) are valid.
A1The address is invalid based on given inputs.
BBThe address is deliverable.
CCThe address is deliverable by removing the provided secondary unit designator.
TAThe address is deliverable by dropping a trailing alphabet from the primary number.
IAThe address is an Informed Address. The recipient and the street address is replaced with a special code provided by the USPS.
N1The address is deliverable but is missing a secondary information (apartment, unit, etc).
F1The address is a deliverable military address.
G1The address is a deliverable General Delivery address. General Delivery is a USPS service which allows individuals without permanent addresses to receive mail.
U1The address is a deliverable unique address. A unique ZIP code is assigned to a single organization (such as a government agency) that receives a large volume of mail.
C1The primary number was confirmed whereas the secondary number is unconfirmed and required to be deliverable.
M1The primary number is missing.
M3The primary number is invalid.
P1PO Box, Rural Route, or Highway Contract box number is missing.
P3PO Box, Rural Route, or Highway Contract box number is invalid.
PBThe address is identified as PO Box street address.
R1The address matched to a CMRA and private mailbox information is not present.
R7The address matched to a Phantom Carrier Route (carrier_route of R777), which corresponds to physical addresses that are not eligible for delivery.
RRThe address matched to a CMRA and private mailbox information is present.
\n\n", + "type": "text/plain" + }, + "item": [], + "event": [] + }, + { + "id": "1b0c5140-0604-4ac7-9854-597740f3b4f0", + "name": "US Verifications", + "description": { + "content": "Validate, automatically correct, and standardize the addresses in your\naddress book based on USPS's Coding Accuracy Support System (CASS).\n
\n\n\n## US Verifications Test Env\n\nWhen verifying US addresses, you'll likely want to test against a wide array of addresses to\nensure you're handling responses correctly. With your test API key, requests that use specific\nvalues for `address` or `primary_line` and (if using `primary_line`) an arbitrary five digit\nnumber for `zip_code` (e.g. \"11111\") let you explore the responses to many types of addresses:\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ADDRESS TYPE FOR SAMPLE RESPONSEDELIVERABILITYSET primary_line OR address TO
Commercial highrisedeliverablecommercial highrise
Residential highrisedeliverableresidential highrise
Residential housedeliverableresidential house
PO Boxdeliverablepo box
Rural routedeliverablerural route
Puerty Rico address w/ urbanizationdeliverablepuerto rico
Military addressdeliverablemilitary
Department of statedeliverabledepartment of state
Generic deliverabledeliverabledeliverable
Missing a suite numberdeliverable_missing_unitmissing unit
Suite number doesn't existdeliverable_incorrect_unitincorrect unit
Residential house with unnecessary suite numberdeliverable_unnecessary_unitunnecessary unit
Undeliverable and block matchedundeliverableundeliverable block match
Undeliverable and no block matchedundeliverableundeliverable no match
\n\nSee the `test` request & response examples under [US Verification Examples](#operation/us_verification) within the\n\"Verify a US or US territory address\" section in US Verifications.\n\nYou can rely on the response from these examples generally matching the response you'd see in the live environment with an\naddress of that type (excluding the `recipient` field).\n\nThe test API key does not perform any verification, automatic correction, or standardization for addresses. If you wish to\ntry these features out, use our live demo or the free plan (see our pricing for details).\n\n", + "type": "text/plain" + }, + "item": [ { - "id": "7bc99f54-e01c-4f31-bbcc-3518a4ee5dc0", - "name": "Create Domain", + "id": "c677313e-9bc9-4a82-9f06-9b368baf1cee", + "name": "Bulk Verify", "request": { - "name": "Create Domain", + "name": "Bulk Verify", "description": { - "content": "Add a new custom domain that can be used to create custom links.", + "content": "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.", "type": "text/plain" }, "url": { "path": [ - "domains" + "bulk", + "us_verifications" ], "host": [ "{{baseUrl}}" ], - "query": [], + "query": [ + { + "disabled": false, + "key": "case", + "value": "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`." + } + ], "variable": [] }, "header": [ @@ -16706,8 +18759,8 @@ "urlencoded": [ { "disabled": false, - "key": "domain", - "value": "", + "key": "addresses", + "value": "{\"primary_line\":{\"value\":\"\"},\"recipient\":{\"value\":\"\"},\"secondary_line\":{\"value\":\"\"},\"urbanization\":{\"value\":\"\"},\"city\":{\"value\":\"\"},\"state\":{\"value\":\"\"},\"zip_code\":{\"value\":\"\"}}", "description": "(Required) " } ] @@ -16715,17 +18768,23 @@ }, "response": [ { - "id": "8bc95981-9a3c-40f2-b556-074576dd7243", - "name": "Returns a domain object with details.", + "id": "ea9948db-91f1-4380-bf27-3e7040c6ef3b", + "name": "Returns a list of US verification objects.", "originalRequest": { "url": { "path": [ - "domains" + "bulk", + "us_verifications" ], "host": [ "{{baseUrl}}" ], - "query": [], + "query": [ + { + "key": "case", + "value": "upper" + } + ], "variable": [] }, "header": [ @@ -16748,8 +18807,17 @@ "content": "(Required) ", "type": "text/plain" }, - "key": "domain", - "value": "lob.st" + "key": "addresses", + "value": "{\"primary_line\":\"210 King Street\",\"city\":\"San Francisco\",\"state\":\"CA\",\"zip_code\":\"94107\"}" + }, + { + "disabled": false, + "description": { + "content": "(Required) ", + "type": "text/plain" + }, + "key": "addresses", + "value": "{\"recipient\":\"Walgreens\",\"primary_line\":\"Ave Wilson Churchill 123\",\"secondary_line\":\"\",\"urbanization\":\"URB FAIR OAKS\",\"city\":\"RIO PIEDRAS\",\"state\":\"PR\",\"zip_code\":\"00926\"}" } ] } @@ -16757,27 +18825,51 @@ "status": "OK", "code": 200, "header": [ + { + "disabled": false, + "description": "The rate limit for a given endpoint.", + "key": "ratelimit-limit", + "value": "150" + }, + { + "disabled": false, + "description": "The number of requests remaining in the current window.", + "key": "ratelimit-remaining", + "value": "100" + }, + { + "disabled": false, + "description": "The time at which the rate limit window resets in UTC epoch seconds\n", + "key": "ratelimit-reset", + "value": "1528749846" + }, { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"id\": \"eu\",\n \"domain\": \"Ut tempor ullamco deserunt\",\n \"account_id\": \"elit esse sint qui\"\n}", + "body": "{\n \"addresses\": [\n {\n \"id\": \"us_ver_c7cb63d68f8d6\",\n \"recipient\": \"LOB.COM\",\n \"primary_line\": \"210 KING ST\",\n \"secondary_line\": \"\",\n \"urbanization\": \"\",\n \"last_line\": \"SAN FRANCISCO CA 94107-1702\",\n \"deliverability\": \"deliverable\",\n \"valid_address\": true,\n \"components\": {\n \"primary_number\": \"210\",\n \"street_predirection\": \"\",\n \"street_name\": \"KING\",\n \"street_suffix\": \"ST\",\n \"street_postdirection\": \"\",\n \"secondary_designator\": \"\",\n \"secondary_number\": \"\",\n \"pmb_designator\": \"\",\n \"pmb_number\": \"\",\n \"extra_secondary_designator\": \"\",\n \"extra_secondary_number\": \"\",\n \"city\": \"SAN FRANCISCO\",\n \"state\": \"CA\",\n \"zip_code\": \"94107\",\n \"zip_code_plus_4\": \"1702\",\n \"zip_code_type\": \"standard\",\n \"delivery_point_barcode\": \"941071728506\",\n \"address_type\": \"commercial\",\n \"record_type\": \"street\",\n \"default_building_address\": false,\n \"county\": \"SAN FRANCISCO\",\n \"county_fips\": \"06075\",\n \"carrier_route\": \"C032\",\n \"carrier_route_type\": \"city_delivery\",\n \"po_box_only_flag\": \"N\",\n \"latitude\": 37.77597542841264,\n \"longitude\": -122.3929557343685\n },\n \"deliverability_analysis\": {\n \"dpv_confirmation\": \"Y\",\n \"dpv_cmra\": \"N\",\n \"dpv_vacant\": \"N\",\n \"dpv_active\": \"Y\",\n \"dpv_inactive_reason\": \"\",\n \"dpv_throwback\": \"N\",\n \"dpv_non_delivery_day_flag\": \"N\",\n \"dpv_non_delivery_day_values\": \"\",\n \"dpv_no_secure_location\": \"N\",\n \"dpv_door_not_accessible\": \"N\",\n \"dpv_footnotes\": [\n \"AA\",\n \"BB\"\n ],\n \"ews_match\": false,\n \"lacs_indicator\": \"\",\n \"lacs_return_code\": \"\",\n \"suite_return_code\": \"\"\n },\n \"lob_confidence_score\": {\n \"score\": 100,\n \"level\": \"high\"\n },\n \"object\": \"us_verification\"\n }\n ],\n \"errors\": false\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "3aef78a8-01a7-4f6b-ab55-3ce091ecfefa", + "id": "2fca1674-3024-49ab-bb66-58fca82e75f2", "name": "Error", "originalRequest": { "url": { "path": [ - "domains" + "bulk", + "us_verifications" ], "host": [ "{{baseUrl}}" ], - "query": [], + "query": [ + { + "key": "case", + "value": "upper" + } + ], "variable": [] }, "header": [ @@ -16800,8 +18892,17 @@ "content": "(Required) ", "type": "text/plain" }, - "key": "domain", - "value": "lob.st" + "key": "addresses", + "value": "{\"primary_line\":\"210 King Street\",\"city\":\"San Francisco\",\"state\":\"CA\",\"zip_code\":\"94107\"}" + }, + { + "disabled": false, + "description": { + "content": "(Required) ", + "type": "text/plain" + }, + "key": "addresses", + "value": "{\"recipient\":\"Walgreens\",\"primary_line\":\"Ave Wilson Churchill 123\",\"secondary_line\":\"\",\"urbanization\":\"URB FAIR OAKS\",\"city\":\"RIO PIEDRAS\",\"state\":\"PR\",\"zip_code\":\"00926\"}" } ] } @@ -16814,7 +18915,7 @@ "value": "application/json" } ], - "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"domain is required\",\n \"status_code\": 422\n }\n}", + "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"primary_line is required or address is required\",\n \"status_code\": 422\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } @@ -16825,85 +18926,102 @@ } }, { - "id": "9e32d986-9098-42c7-a47a-c318be4e6697", - "name": "List all domains", + "id": "f79f1eb6-aba6-4b55-861c-708120516ded", + "name": "Single Verify", "request": { - "name": "List all domains", + "name": "Single Verify", "description": { - "content": "Retrieve a list of all created domains.", + "content": "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.", "type": "text/plain" }, "url": { "path": [ - "domains" + "us_verifications" ], "host": [ "{{baseUrl}}" ], - "query": [], + "query": [ + { + "disabled": false, + "key": "case", + "value": "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`." + } + ], "variable": [] }, "header": [ + { + "key": "Content-Type", + "value": "application/x-www-form-urlencoded" + }, { "key": "Accept", "value": "application/json" } ], - "method": "GET", - "auth": null - }, - "response": [ - { - "id": "2287b565-e5c8-4bfc-9d89-e91b21b82078", - "name": "Returns a list of all domains.", - "originalRequest": { - "url": { - "path": [ - "domains" - ], - "host": [ - "{{baseUrl}}" - ], - "query": [], - "variable": [] + "method": "POST", + "auth": null, + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "key": "value", + "value": "" }, - "header": [ - { - "description": { - "content": "Added as a part of security scheme: basic", - "type": "text/plain" - }, - "key": "Authorization", - "value": "Basic " - } - ], - "method": "GET", - "body": {} - }, - "status": "OK", - "code": 200, - "header": [ { - "key": "Content-Type", - "value": "application/json" + "disabled": false, + "key": "value", + "value": "" + }, + { + "disabled": false, + "key": "value", + "value": "" + }, + { + "disabled": false, + "key": "value", + "value": "" + }, + { + "disabled": false, + "key": "value", + "value": "" + }, + { + "disabled": false, + "key": "state", + "value": "" + }, + { + "disabled": false, + "key": "value", + "value": "" } - ], - "body": "{\n \"data\": [\n {\n \"id\": \"eu sit minim tempor id\",\n \"domain\": \"pariatur officia sunt mollit\",\n \"account_id\": \"ex Duis laborum\"\n },\n {\n \"id\": \"laborum sunt do Excepteur reprehenderit\",\n \"domain\": \"in qui nulla eu in\",\n \"account_id\": \"quis\"\n }\n ]\n}", - "cookie": [], - "_postman_previewlanguage": "json" - }, + ] + } + }, + "response": [ { - "id": "b2587e4c-d2bd-45c5-904c-332b320d3f3f", - "name": "Error", + "id": "e49c80f3-1aaa-4b26-a7f1-458f4c92fc45", + "name": "Returns a US verification object.", "originalRequest": { "url": { "path": [ - "domains" + "us_verifications" ], "host": [ "{{baseUrl}}" ], - "query": [], + "query": [ + { + "key": "case", + "value": "upper" + } + ], "variable": [] }, "header": [ @@ -16916,135 +19034,81 @@ "value": "Basic " } ], - "method": "GET", - "body": {} - }, - "status": "Internal Server Error", - "code": 500, - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": "{\n \"error\": {\n \"message\": \"Rate limit exceeded. Please wait 5 seconds and try your request again.\",\n \"status_code\": null,\n \"code\": \"conflict\"\n }\n}", - "cookie": [], - "_postman_previewlanguage": "json" - } - ], - "event": [] - }, - { - "id": "447e8779-db64-4050-af56-2ce6c18266f6", - "name": "Delete all links for a domain", - "request": { - "name": "Delete all links for a domain", - "description": { - "content": "Delete all associated links for a domain", - "type": "text/plain" - }, - "url": { - "path": [ - "domains", - ":domain_id", - "links" - ], - "host": [ - "{{baseUrl}}" - ], - "query": [], - "variable": [ - { - "disabled": false, - "type": "any", - "value": "", - "key": "domain_id", - "description": "(Required) Unique identifier for a domain." - } - ] - }, - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "method": "DELETE", - "auth": null - }, - "response": [ - { - "id": "cf976a72-7168-462e-9fb3-a31bc983166d", - "name": "Returns the deleted objects.", - "originalRequest": { - "url": { - "path": [ - "domains", - ":domain_id", - "links" - ], - "host": [ - "{{baseUrl}}" - ], - "query": [], - "variable": [ + "method": "POST", + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "key": "primary_line", + "value": "210 King Street" + }, + { + "disabled": false, + "key": "city", + "value": "San Francisco" + }, { "disabled": false, - "type": "any", - "value": "", - "key": "domain_id", - "description": "(Required) Unique identifier for a domain." + "key": "state", + "value": "CA" + }, + { + "disabled": false, + "key": "zip_code", + "value": "94107" } ] - }, - "header": [ - { - "description": { - "content": "Added as a part of security scheme: basic", - "type": "text/plain" - }, - "key": "Authorization", - "value": "Basic " - } - ], - "method": "DELETE", - "body": {} + } }, "status": "OK", "code": 200, "header": [ + { + "disabled": false, + "description": "The rate limit for a given endpoint.", + "key": "ratelimit-limit", + "value": "150" + }, + { + "disabled": false, + "description": "The number of requests remaining in the current window.", + "key": "ratelimit-remaining", + "value": "100" + }, + { + "disabled": false, + "description": "The time at which the rate limit window resets in UTC epoch seconds\n", + "key": "ratelimit-reset", + "value": "1528749846" + }, { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"data\": [\n {\n \"id\": \"au\",\n \"domain\": \"nisi irure laboris n\",\n \"account_id\": \"incididunt dolor\"\n },\n {\n \"id\": \"id\",\n \"domain\": \"aliquip sunt aliqua sed cupidatat\",\n \"account_id\": \"Ut in eu\"\n }\n ]\n}", + "body": "{\n \"id\": \"us_ver_c7cb63d68f8d6\",\n \"recipient\": \"LOB.COM\",\n \"primary_line\": \"210 KING ST\",\n \"secondary_line\": \"\",\n \"urbanization\": \"\",\n \"last_line\": \"SAN FRANCISCO CA 94107-1702\",\n \"deliverability\": \"deliverable\",\n \"valid_address\": true,\n \"components\": {\n \"primary_number\": \"210\",\n \"street_predirection\": \"\",\n \"street_name\": \"KING\",\n \"street_suffix\": \"ST\",\n \"street_postdirection\": \"\",\n \"secondary_designator\": \"\",\n \"secondary_number\": \"\",\n \"pmb_designator\": \"\",\n \"pmb_number\": \"\",\n \"extra_secondary_designator\": \"\",\n \"extra_secondary_number\": \"\",\n \"city\": \"SAN FRANCISCO\",\n \"state\": \"CA\",\n \"zip_code\": \"94107\",\n \"zip_code_plus_4\": \"1702\",\n \"zip_code_type\": \"standard\",\n \"delivery_point_barcode\": \"941071702108\",\n \"address_type\": \"commercial\",\n \"record_type\": \"street\",\n \"default_building_address\": false,\n \"county\": \"SAN FRANCISCO\",\n \"county_fips\": \"06075\",\n \"carrier_route\": \"C032\",\n \"carrier_route_type\": \"city_delivery\",\n \"po_box_only_flag\": \"N\",\n \"latitude\": 37.77597542841264,\n \"longitude\": -122.3929557343685\n },\n \"deliverability_analysis\": {\n \"dpv_confirmation\": \"Y\",\n \"dpv_cmra\": \"N\",\n \"dpv_vacant\": \"N\",\n \"dpv_active\": \"Y\",\n \"dpv_inactive_reason\": \"\",\n \"dpv_throwback\": \"N\",\n \"dpv_non_delivery_day_flag\": \"N\",\n \"dpv_non_delivery_day_values\": \"\",\n \"dpv_no_secure_location\": \"N\",\n \"dpv_door_not_accessible\": \"N\",\n \"dpv_footnotes\": [\n \"AA\",\n \"BB\"\n ],\n \"ews_match\": false,\n \"lacs_indicator\": \"\",\n \"lacs_return_code\": \"\",\n \"suite_return_code\": \"\"\n },\n \"lob_confidence_score\": {\n \"score\": 100,\n \"level\": \"high\"\n },\n \"object\": \"us_verification\"\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "43339f1d-d6b2-4fbc-b487-dec3523b89aa", + "id": "7f562ee5-d543-4f02-99f3-34782ee6fa35", "name": "Error", "originalRequest": { "url": { "path": [ - "domains", - ":domain_id", - "links" + "us_verifications" ], "host": [ "{{baseUrl}}" ], - "query": [], - "variable": [ + "query": [ { - "disabled": false, - "type": "any", - "value": "", - "key": "domain_id", - "description": "(Required) Unique identifier for a domain." + "key": "case", + "value": "upper" } - ] + ], + "variable": [] }, "header": [ { @@ -17056,8 +19120,32 @@ "value": "Basic " } ], - "method": "DELETE", - "body": {} + "method": "POST", + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "key": "primary_line", + "value": "210 King Street" + }, + { + "disabled": false, + "key": "city", + "value": "San Francisco" + }, + { + "disabled": false, + "key": "state", + "value": "CA" + }, + { + "disabled": false, + "key": "zip_code", + "value": "94107" + } + ] + } }, "status": "Internal Server Error", "code": 500, @@ -17067,152 +19155,103 @@ "value": "application/json" } ], - "body": "{\n \"error\": {\n \"message\": \"Rate limit exceeded. Please wait 5 seconds and try your request again.\",\n \"status_code\": null,\n \"code\": \"conflict\"\n }\n}", + "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"primary_line is required or address is required\",\n \"status_code\": 422\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } ], - "event": [] - }, + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + } + ], + "event": [] + }, + { + "id": "eb92318f-c86d-434e-9177-8cb19089821c", + "name": "Versioning and Changelog", + "description": { + "content": "### API Versioning\n\nWhen backwards-incompatible changes are made to the API, a new dated version\nis released. The latest version of the API is version **2024-01-01**. \nAll versions prior to, and inclusive of, 2019-02-11 have been sunsetted. You can\nview your version and upgrade to the latest version in your\nDashboard Settings. You will\nonly need to specify a version if you would like to test a newer version of\nthe API without doing a full upgrade. The API will return an error if a\nversion older than your current one is passed in.\n\n### Example Request\n\n```bash\n curl https://api.lob.com/v1/addresses \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -H \"Lob-Version: 2024-01-01\"\n```\n\n### Specification Versioning\nYou might be wondering why our API and specification use different versioning schemes.\nLob's API predates our specification and follows the Stripe versioning\napproach. This works well to manage backwards-incompatible changes to our API.\n\nFor our API specification (used to create this documentation), we've chosen semantic\nversioning. This versioning reflects the backward-compatible\nchanges that do not require a versioning of Lob's API.\n\nLob's API specification will be used to generate artifacts like documentation, client SDKs,\nand other developer tooling. Semantic versioning of our specification will inform how we\nversion those artifacts like SDKs. It is helpful to know the version of a specification\nused to produce an artifact in order reference the specification release notes.\n\n\n### Changelog\n View our Changelog here.\n", + "type": "text/plain" + }, + "item": [], + "event": [] + }, + { + "id": "a24d70c8-5a82-4ca7-80d1-eb421b7a02f4", + "name": "Webhooks", + "description": { + "content": "Webhooks are an easy way to get notifications on events happening asynchronously\nwithin Lob's architecture. For example, when a postcard gets a \"Processed For\nDelivery\" tracking event, an event object of type `postcard.processed_for_delivery`\nwill be created. If you are subscribed to that event type in that Environment\n(Test vs. Live), Lob will send that event to any URLs you've specified via an\nHTTP POST request. In Live mode, you can only have as many webhooks as allotted\nin your current Print & Mail Edition.\nThere is no limit in Test mode.\nYou can view and create webhooks on the\nLob Dashboard, as well as view your events.\nSee our Webhooks Integration Guide for more\ndetails on how to integrate. Please see the full list of event types available for\nsubscription here.\n\n", + "type": "text/plain" + }, + "item": [], + "event": [] + }, + { + "id": "e49c8772-4e61-4c9f-add1-66d0226e9a44", + "name": "Zip Lookups", + "description": { + "content": "Find a list of cities, states and associated information about a US ZIP code. \n", + "type": "text/plain" + }, + "item": [ { - "id": "3863e926-fd10-4231-bc80-154cfc5c5842", - "name": "Retrieve all shortened links", + "id": "3350898a-aeab-4dae-8939-8f2525a014d4", + "name": "Lookups", "request": { - "name": "Retrieve all shortened links", + "name": "Lookups", "description": { - "content": "Retrieves a list of shortened links. The list is sorted by creation date, with the most recently created appearing first.", + "content": "Returns information about a ZIP code", "type": "text/plain" }, "url": { "path": [ - "links" + "us_zip_lookups" ], "host": [ "{{baseUrl}}" ], - "query": [ - { - "disabled": false, - "key": "limit", - "value": "10", - "description": "How many results to return." - }, - { - "disabled": false, - "key": "offset", - "value": "0", - "description": "An integer that designates the offset at which to begin returning results. Defaults to 0." - }, - { - "disabled": false, - "key": "include", - "value": "", - "description": "Request that the response include the total count by specifying `include=[\"total_count\"]`.\n" - }, - { - "disabled": false, - "key": "include", - "value": "", - "description": "Request that the response include the total count by specifying `include=[\"total_count\"]`.\n" - }, - { - "disabled": false, - "key": "date_created[elit_5_]", - "value": "", - "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 ≤." - }, - { - "disabled": false, - "key": "date_created[Ut3b0]", - "value": "", - "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 ≤." - }, - { - "disabled": false, - "key": "date_created[eu_f5]", - "value": "", - "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 ≤." - }, - { - "disabled": false, - "key": "campaign_id", - "value": "", - "description": "Filter the links generated for a particular campaign using its campaign id." - }, - { - "disabled": false, - "key": "clicked", - "value": "", - "description": "Retrieve the list of links that have been opened." - }, - { - "disabled": false, - "key": "billing_group_id", - "value": "", - "description": "Filter the links generated for a particular billing group id." - } - ], + "query": [], "variable": [] }, "header": [ + { + "key": "Content-Type", + "value": "application/x-www-form-urlencoded" + }, { "key": "Accept", "value": "application/json" } ], - "method": "GET", - "auth": null + "method": "POST", + "auth": null, + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "key": "zip_code", + "value": "", + "description": "(Required) A 5-digit ZIP code." + } + ] + } }, "response": [ { - "id": "fc39c020-f2d5-482d-a9bc-65f93b73b27f", - "name": "Returns the deleted link object.", + "id": "1275c301-9dea-41c6-aeac-5940dd62faa5", + "name": "Returns a zip lookup object if a valid zip was provided.", "originalRequest": { "url": { "path": [ - "links" + "us_zip_lookups" ], "host": [ "{{baseUrl}}" ], - "query": [ - { - "key": "limit", - "value": "10" - }, - { - "key": "offset", - "value": "0" - }, - { - "key": "include", - "value": "" - }, - { - "key": "include", - "value": "" - }, - { - "key": "date_created[do_7c]", - "value": "" - }, - { - "key": "date_created[velit_c]", - "value": "" - }, - { - "key": "campaign_id", - "value": "" - }, - { - "key": "clicked", - "value": "" - }, - { - "key": "billing_group_id", - "value": "" - } - ], + "query": [], "variable": [] }, "header": [ @@ -17225,70 +19264,64 @@ "value": "Basic " } ], - "method": "GET", - "body": {} + "method": "POST", + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "description": { + "content": "(Required) A 5-digit ZIP code.", + "type": "text/plain" + }, + "key": "zip_code", + "value": "94107" + } + ] + } }, "status": "OK", "code": 200, "header": [ + { + "disabled": false, + "description": "The rate limit for a given endpoint.", + "key": "ratelimit-limit", + "value": "150" + }, + { + "disabled": false, + "description": "The number of requests remaining in the current window.", + "key": "ratelimit-remaining", + "value": "100" + }, + { + "disabled": false, + "description": "The time at which the rate limit window resets in UTC epoch seconds\n", + "key": "ratelimit-reset", + "value": "1528749846" + }, { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"count\": -29861400,\n \"limit\": 73569195,\n \"offset\": -19726994,\n \"data\": [\n {\n \"id\": \"culpa\",\n \"campaign_id\": {\n \"value\": \"\"\n },\n \"domain_id\": \"aliquip sed\",\n \"resource_id\": \"anim consequat\",\n \"redirect_link\": {\n \"value\": \"\"\n },\n \"short_link\": \"Excepteur fugiat\",\n \"metadata_tag\": {\n \"value\": \"\"\n },\n \"billing_group_id\": {\n \"value\": \"\"\n }\n },\n {\n \"id\": \"ex proident\",\n \"campaign_id\": {\n \"value\": \"\"\n },\n \"domain_id\": \"incididunt laboris dolore ullamco U\",\n \"resource_id\": \"aliqua do officia\",\n \"redirect_link\": {\n \"value\": \"\"\n },\n \"short_link\": \"adipisicing exercitation\",\n \"metadata_tag\": {\n \"value\": \"\"\n },\n \"billing_group_id\": {\n \"value\": \"\"\n }\n }\n ]\n}", + "body": "{\n \"id\": \"us_zip_c7cb63d68f8d6\",\n \"cities\": [\n {\n \"city\": \"SAN FRANCISCO\",\n \"state\": \"CA\",\n \"county\": \"SAN FRANCISCO\",\n \"county_fips\": \"06075\",\n \"preferred\": true\n }\n ],\n \"zip_code_type\": \"standard\",\n \"object\": \"us_zip_lookup\",\n \"zip_code\": \"94107\"\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "8575fa6a-681a-4da9-a87c-f14001fa7f55", + "id": "5923bfbe-603d-4cb6-b396-351501665f9c", "name": "Error", "originalRequest": { "url": { "path": [ - "links" + "us_zip_lookups" ], "host": [ "{{baseUrl}}" ], - "query": [ - { - "key": "limit", - "value": "10" - }, - { - "key": "offset", - "value": "0" - }, - { - "key": "include", - "value": "" - }, - { - "key": "include", - "value": "" - }, - { - "key": "date_created[do_7c]", - "value": "" - }, - { - "key": "date_created[velit_c]", - "value": "" - }, - { - "key": "campaign_id", - "value": "" - }, - { - "key": "clicked", - "value": "" - }, - { - "key": "billing_group_id", - "value": "" - } - ], + "query": [], "variable": [] }, "header": [ @@ -17301,8 +19334,21 @@ "value": "Basic " } ], - "method": "GET", - "body": {} + "method": "POST", + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "disabled": false, + "description": { + "content": "(Required) A 5-digit ZIP code.", + "type": "text/plain" + }, + "key": "zip_code", + "value": "94107" + } + ] + } }, "status": "Internal Server Error", "code": 500, @@ -17312,40 +19358,45 @@ "value": "application/json" } ], - "body": "{\n \"error\": {\n \"message\": \"Rate limit exceeded. Please wait 5 seconds and try your request again.\",\n \"status_code\": null,\n \"code\": \"conflict\"\n }\n}", + "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"zip_code is required\",\n \"status_code\": 422\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } ], - "event": [] - }, + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + } + ], + "event": [] + }, + { + "id": "e6620b7a-6b65-4699-bdde-e0d744c2ed41", + "name": "Accounts", + "description": { + "content": "", + "type": "text/plain" + }, + "item": [ { - "id": "34b8ac8c-eec5-4f2c-bc9a-f6e06cdc05b7", - "name": "Retrieve a link", + "id": "457423ec-e898-4d3f-9b26-af26eccf7f01", + "name": "Get Lob Credits Balance", "request": { - "name": "Retrieve a link", + "name": "Get Lob Credits Balance", "description": { - "content": "Retrievs a single shortened link.", + "content": "Returns the account's current balance of Lob Credits.", "type": "text/plain" }, "url": { "path": [ - "links", - ":link_id" + "accounts" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "type": "any", - "value": "", - "key": "link_id", - "description": "(Required) Unique identifier for a link." - } - ] + "variable": [] }, "header": [ { @@ -17358,27 +19409,18 @@ }, "response": [ { - "id": "5084229d-bf19-48de-9e8f-e365fec1ab3d", - "name": "Returns a single link.", + "id": "d495cfd4-7aec-4912-bf56-ea392b40d063", + "name": "Returns a lob_credits_balance object.", "originalRequest": { "url": { "path": [ - "links", - ":link_id" + "accounts" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "type": "any", - "value": "", - "key": "link_id", - "description": "(Required) Unique identifier for a link." - } - ] + "variable": [] }, "header": [ { @@ -17401,32 +19443,66 @@ "value": "application/json" } ], - "body": "{\n \"id\": \"ea tempor\",\n \"campaign_id\": \"\",\n \"domain_id\": \"anim occaecat\",\n \"resource_id\": \"nulla dolore pariatur commodo cillum\",\n \"redirect_link\": \"enim amet Lorem\",\n \"short_link\": \"ullamco consectetur sit amet consequat\",\n \"metadata_tag\": \"6+.Ht/{^]BH+/>^?q^v}JS/z)RSCd1aT#g2hI0JU%/BpOQ9QSewa:Wr6i)ngVpK%@)=4IiD.T1/[tZ8jKsA1`7(_h02v%zlum,hJ4xX-iq>G96DuI?c^S]3doe]-rlFU(#BFX}3a4R6]JP#[5zH&PMD)o$}E>0y+&AUo/V|qpx3[t2@k?cuULo@S::ky3d>}}(Z?pb`*^m+VsI3n}.$$|[EE>OZ?8rG,|[]{geklr!kc`W-&DLhEOmRegc^g5WV;Z~{0ZbXk~#}+mt6M4A9o1ZNJ{JIWF)BtSwF6I4N!-8mY0T_^QOPk~e5TtW'/s\",\n \"billing_group_id\": \"\"\n}", + "body": "{\n \"balance\": 0\n}", "cookie": [], "_postman_previewlanguage": "json" + } + ], + "event": [] + } + ], + "event": [] + }, + { + "id": "e20b4965-f064-419f-a6ab-4e017cb65bea", + "name": "Lob Credits", + "description": { + "content": "", + "type": "text/plain" + }, + "item": [ + { + "id": "78d8c047-0b35-49cc-b05b-5297694cb530", + "name": "Get Lob Credits Balance", + "request": { + "name": "Get Lob Credits Balance", + "description": { + "content": "Returns the account's current balance of Lob Credits.", + "type": "text/plain" + }, + "url": { + "path": [ + "accounts" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "auth": null + }, + "response": [ { - "id": "f22904cc-54dc-4f2a-9834-06599cf66fcf", - "name": "Error", + "id": "fe569f2e-b3bd-4b7e-9a9f-e9436d445d2e", + "name": "Returns a lob_credits_balance object.", "originalRequest": { "url": { "path": [ - "links", - ":link_id" + "accounts" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "type": "any", - "value": "", - "key": "link_id", - "description": "(Required) Unique identifier for a link." - } - ] + "variable": [] }, "header": [ { @@ -17441,104 +19517,78 @@ "method": "GET", "body": {} }, - "status": "Internal Server Error", - "code": 500, + "status": "OK", + "code": 200, "header": [ { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"error\": {\n \"message\": \"Rate limit exceeded. Please wait 5 seconds and try your request again.\",\n \"status_code\": null,\n \"code\": \"conflict\"\n }\n}", + "body": "{\n \"balance\": 0\n}", "cookie": [], "_postman_previewlanguage": "json" } ], "event": [] - }, + } + ], + "event": [] + }, + { + "id": "835cc90d-4ed0-4562-b83b-5d5e663f163b", + "name": "Booklets", + "description": { + "content": "", + "type": "text/plain" + }, + "item": [ { - "id": "e7159149-046b-4a66-b4d6-ae82903afb60", - "name": "Update a Link", - "request": { - "name": "Update a Link", - "description": { - "content": "Update any of the properties of a shortened link.", - "type": "text/plain" - }, - "url": { - "path": [ - "links", - ":link_id" - ], - "host": [ - "{{baseUrl}}" - ], - "query": [], - "variable": [ - { - "disabled": false, - "type": "any", - "value": "", - "key": "link_id", - "description": "(Required) Unique identifier for a link." - } - ] - }, - "header": [ - { - "key": "Content-Type", - "value": "application/x-www-form-urlencoded" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "method": "PATCH", - "auth": null, - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "key": "redirect_link", - "value": "", - "description": "(Required) " - }, - { - "disabled": false, - "key": "domain", - "value": "", - "description": "The registered domain to be used for the short URL." - }, + "id": "f5f60f7e-239c-4393-8dc0-5c1bc57ccef7", + "name": "Retrieve", + "request": { + "name": "Retrieve", + "description": { + "content": "Retrieves the details of an existing booklet. You need to only supply the unique booklet identifier that was returned upon booklet creation.", + "type": "text/plain" + }, + "url": { + "path": [ + "booklets", + ":booklet_id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ { "disabled": false, - "key": "slug", + "type": "any", "value": "", - "description": "The unique path for the shortened URL, if empty a unique path will be used." - }, - { - "disabled": false, - "key": "metadata_tag", - "value": "*AG=(P* xi!wbn}_q{7gU|u(XWpG>chyKo'j#:>u6Q0BN_4`!N!ES=@T[l 9" - }, - { - "disabled": false, - "key": "billing_group_id", - "value": "" + "key": "booklet_id", + "description": "(Required) id of the booklet" } ] - } + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "auth": null }, "response": [ { - "id": "d5f66b89-391b-401a-b93f-e351c4d3c1ae", - "name": "Returns the updated link.", + "id": "4081474d-3a80-4f4f-8dd2-0e6a0e520804", + "name": "Returns a booklet object", "originalRequest": { "url": { "path": [ - "links", - ":link_id" + "booklets", + ":booklet_id" ], "host": [ "{{baseUrl}}" @@ -17549,8 +19599,8 @@ "disabled": false, "type": "any", "value": "", - "key": "link_id", - "description": "(Required) Unique identifier for a link." + "key": "booklet_id", + "description": "(Required) id of the booklet" } ] }, @@ -17564,17 +19614,8 @@ "value": "Basic " } ], - "method": "PATCH", - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "key": "resource_id", - "value": "ltr_133" - } - ] - } + "method": "GET", + "body": {} }, "status": "OK", "code": 200, @@ -17584,18 +19625,18 @@ "value": "application/json" } ], - "body": "{\n \"id\": \"Duis et\",\n \"campaign_id\": \"\",\n \"domain_id\": \"enim dolore\",\n \"resource_id\": \"ut ex\",\n \"redirect_link\": \"\",\n \"short_link\": \"quis sint culpa aliqua\",\n \"metadata_tag\": \"piN,-K/M8D_@=sv*D~{XI{=,:?Kpa'P\",\n \"billing_group_id\": \"\"\n}", + "body": "{\n \"id\": \"ord_0d6a16a3fff6318ac8f8008dc1\",\n \"description\": \"April Campaign\",\n \"metadata\": {},\n \"to\": {\n \"id\": \"adr_d3489cd64c791ab5\",\n \"description\": null,\n \"name\": \"HARRY ZHANG\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2017-09-05T15:54:53.264Z\",\n \"date_modified\": \"2017-09-05T15:54:53.264Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"from\": {\n \"id\": \"adr_b8fb5acf3a2b55db\",\n \"description\": null,\n \"name\": \"LEORE AVIDAR\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2017-09-05T15:54:53.264Z\",\n \"date_modified\": \"2017-09-05T15:54:53.264Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"mail_type\": \"usps_first_class\",\n \"url\": \"https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA\",\n \"carrier\": \"USPS\",\n \"tracking_number\": null,\n \"tracking_events\": [],\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA\",\n \"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\",\n \"large\": \"https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg\"\n }\n ],\n \"merge_variables\": {\n \"name\": \"Harry\"\n },\n \"size\": \"8.375x5.375\",\n \"pages\": 8,\n \"source_material\": \"60# Gloss Text\",\n \"expected_delivery_date\": \"2021-03-24\",\n \"date_created\": \"2021-03-16T18:40:40.504Z\",\n \"date_modified\": \"2021-03-16T18:40:40.504Z\",\n \"send_date\": \"2021-03-16T18:45:40.493Z\",\n \"use_type\": \"marketing\",\n \"fsc\": false,\n \"object\": \"booklet\"\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "4465b56d-f35b-4689-99ec-3b3022f2c9e6", + "id": "5a696297-0b74-4897-9cea-1df437e86742", "name": "Error", "originalRequest": { "url": { "path": [ - "links", - ":link_id" + "booklets", + ":booklet_id" ], "host": [ "{{baseUrl}}" @@ -17606,8 +19647,8 @@ "disabled": false, "type": "any", "value": "", - "key": "link_id", - "description": "(Required) Unique identifier for a link." + "key": "booklet_id", + "description": "(Required) id of the booklet" } ] }, @@ -17621,17 +19662,8 @@ "value": "Basic " } ], - "method": "PATCH", - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "key": "resource_id", - "value": "ltr_133" - } - ] - } + "method": "GET", + "body": {} }, "status": "Internal Server Error", "code": 500, @@ -17641,29 +19673,26 @@ "value": "application/json" } ], - "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"redirect_link is required\",\n \"status_code\": 422\n }\n}", + "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"to address not found\",\n \"status_code\": 404\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } ], - "event": [], - "protocolProfileBehavior": { - "disableBodyPruning": true - } + "event": [] }, { - "id": "3f34e4a4-8468-4e4c-ad14-d8a6eb0a73d9", - "name": "Delete Link", + "id": "4c9cbad2-25d9-4e0f-99fc-0b638af99624", + "name": "Delete", "request": { - "name": "Delete Link", + "name": "Delete", "description": { - "content": "Delete the shortened link.", + "content": "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.", "type": "text/plain" }, "url": { "path": [ - "links", - ":link_id" + "booklets", + ":booklet_id" ], "host": [ "{{baseUrl}}" @@ -17674,8 +19703,8 @@ "disabled": false, "type": "any", "value": "", - "key": "link_id", - "description": "(Required) Unique identifier for a link." + "key": "booklet_id", + "description": "(Required) id of the booklet" } ] }, @@ -17690,13 +19719,13 @@ }, "response": [ { - "id": "ca447791-4c41-4938-9020-48e2f6bd4c2c", - "name": "Returns the deleted short link object", + "id": "355e3943-141c-4017-826d-51c26a59276a", + "name": "Deleted", "originalRequest": { "url": { "path": [ - "links", - ":link_id" + "booklets", + ":booklet_id" ], "host": [ "{{baseUrl}}" @@ -17707,8 +19736,8 @@ "disabled": false, "type": "any", "value": "", - "key": "link_id", - "description": "(Required) Unique identifier for a link." + "key": "booklet_id", + "description": "(Required) id of the booklet" } ] }, @@ -17733,18 +19762,18 @@ "value": "application/json" } ], - "body": "{\n \"id\": \"Duis et\",\n \"campaign_id\": \"\",\n \"domain_id\": \"enim dolore\",\n \"resource_id\": \"ut ex\",\n \"redirect_link\": \"\",\n \"short_link\": \"quis sint culpa aliqua\",\n \"metadata_tag\": \"piN,-K/M8D_@=sv*D~{XI{=,:?Kpa'P\",\n \"billing_group_id\": \"\"\n}", + "body": "{\n \"id\": \"ord_0d6a16a3fff6318ac8f8008dc1\",\n \"deleted\": true\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "85326612-0eed-4ef4-aed6-eea0cadbf695", + "id": "34dc2852-670e-4cb2-aa52-8495ef285f80", "name": "Error", "originalRequest": { "url": { "path": [ - "links", - ":link_id" + "booklets", + ":booklet_id" ], "host": [ "{{baseUrl}}" @@ -17755,8 +19784,8 @@ "disabled": false, "type": "any", "value": "", - "key": "link_id", - "description": "(Required) Unique identifier for a link." + "key": "booklet_id", + "description": "(Required) id of the booklet" } ] }, @@ -17781,7 +19810,7 @@ "value": "application/json" } ], - "body": "{\n \"error\": {\n \"message\": \"Rate limit exceeded. Please wait 5 seconds and try your request again.\",\n \"status_code\": null,\n \"code\": \"conflict\"\n }\n}", + "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"to address not found\",\n \"status_code\": 404\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } @@ -17789,281 +19818,162 @@ "event": [] }, { - "id": "5b4d8fd8-8210-436a-9141-7c076f6adcc7", - "name": "Create Link", + "id": "3f56dc28-41f8-4203-917b-1ac53665067f", + "name": "List", "request": { - "name": "Create Link", + "name": "List", "description": { - "content": "Given a long URL, shorten your URL either by using a custom domain or Lob's own short domain.", + "content": "Returns a list of your booklets. The booklets are returned sorted by creation date, with the most recently created booklets appearing first.", "type": "text/plain" }, "url": { "path": [ - "links", - "shorten" + "booklets" ], "host": [ "{{baseUrl}}" ], - "query": [], - "variable": [] - }, - "header": [ - { - "key": "Content-Type", - "value": "application/x-www-form-urlencoded" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "method": "POST", - "auth": null, - "body": { - "mode": "urlencoded", - "urlencoded": [ + "query": [ { "disabled": false, - "key": "redirect_link", - "value": "", - "description": "(Required) " + "key": "limit", + "value": "10", + "description": "How many results to return." }, { "disabled": false, - "key": "domain", + "key": "before", "value": "", - "description": "The registered domain to be used for the short URL." + "description": "`before` and `after` are both optional but only one of them can be in the query at a time.\n" }, { "disabled": false, - "key": "slug", + "key": "after", "value": "", - "description": "The unique path for the shortened URL, if empty a unique path will be used." + "description": "`before` and `after` are both optional but only one of them can be in the query at a time.\n" }, { "disabled": false, - "key": "metadata_tag", - "value": "*AG=(P* xi!wbn}_q{7gU|u(XWpG>chyKo'j#:>u6Q0BN_4`!N!ES=@T[l 9" + "key": "include", + "value": "", + "description": "Request that the response include the total count by specifying `include=[\"total_count\"]`.\n" }, { "disabled": false, - "key": "billing_group_id", - "value": "" - } - ] - } - }, - "response": [ - { - "id": "6ec94cb7-fa87-4873-97f1-422d32ef6d3c", - "name": "Returns a successfully created link.", - "originalRequest": { - "url": { - "path": [ - "links", - "shorten" - ], - "host": [ - "{{baseUrl}}" - ], - "query": [], - "variable": [] - }, - "header": [ - { - "description": { - "content": "Added as a part of security scheme: basic", - "type": "text/plain" - }, - "key": "Authorization", - "value": "Basic " - } - ], - "method": "POST", - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "description": { - "content": "(Required) ", - "type": "text/plain" - }, - "key": "redirect_link", - "value": "https://www.lob.com" - }, - { - "disabled": false, - "description": { - "content": "The registered domain to be used for the short URL.", - "type": "text/plain" - }, - "key": "domain", - "value": "lob.st" - } - ] - } - }, - "status": "OK", - "code": 200, - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": "{\n \"id\": \"Duis et\",\n \"campaign_id\": \"\",\n \"domain_id\": \"enim dolore\",\n \"resource_id\": \"ut ex\",\n \"redirect_link\": \"\",\n \"short_link\": \"quis sint culpa aliqua\",\n \"metadata_tag\": \"piN,-K/M8D_@=sv*D~{XI{=,:?Kpa'P\",\n \"billing_group_id\": \"\"\n}", - "cookie": [], - "_postman_previewlanguage": "json" - }, - { - "id": "e43ce093-e85f-4eb8-b77e-9daf297d309a", - "name": "Error", - "originalRequest": { - "url": { - "path": [ - "links", - "shorten" - ], - "host": [ - "{{baseUrl}}" - ], - "query": [], - "variable": [] - }, - "header": [ - { - "description": { - "content": "Added as a part of security scheme: basic", - "type": "text/plain" - }, - "key": "Authorization", - "value": "Basic " - } - ], - "method": "POST", - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "description": { - "content": "(Required) ", - "type": "text/plain" - }, - "key": "redirect_link", - "value": "https://www.lob.com" - }, - { - "disabled": false, - "description": { - "content": "The registered domain to be used for the short URL.", - "type": "text/plain" - }, - "key": "domain", - "value": "lob.st" - } - ] - } - }, - "status": "Internal Server Error", - "code": 500, - "header": [ + "key": "include", + "value": "", + "description": "Request that the response include the total count by specifying `include=[\"total_count\"]`.\n" + }, { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"redirect_link is required\",\n \"status_code\": 422\n }\n}", - "cookie": [], - "_postman_previewlanguage": "json" - } - ], - "event": [], - "protocolProfileBehavior": { - "disableBodyPruning": true - } - }, - { - "id": "662da5d7-4d2f-4d1a-b79f-317db02d9a68", - "name": "Bulk Create Links", - "request": { - "name": "Bulk Create Links", - "description": { - "content": "Shortens a list of links in a single request.", - "type": "text/plain" - }, - "url": { - "path": [ - "links", - "shorten", - "bulk" - ], - "host": [ - "{{baseUrl}}" - ], - "query": [], - "variable": [] - }, - "header": [ - { - "key": "Content-Type", - "value": "application/x-www-form-urlencoded" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "method": "POST", - "auth": null, - "body": { - "mode": "urlencoded", - "urlencoded": [ + "disabled": false, + "key": "date_created[ut_ad]", + "value": "", + "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 ≤." + }, { "disabled": false, - "key": "redirect_link", - "value": "" + "key": "mail_type", + "value": "usps_first_class", + "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.\n" }, { "disabled": false, - "key": "domain", - "value": "" + "key": "date_created", + "value": "", + "description": "Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both.\n" }, { "disabled": false, - "key": "slug", - "value": "" + "key": "send_date", + "value": "", + "description": "Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both.\n" }, { "disabled": false, - "key": "metadata_tag", - "value": "E(ew[v|: {%xuL#U(RZsW'cWytY}p_xBicn1n0n-jlUq^)mhBIOgPIPT&8IL,=@:y:*/kJb-ohI492>StmS", + "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_`." }, { "disabled": false, - "key": "billing_group_id", - "value": "" + "key": "status", + "value": "", + "description": "A string describing the render status:\n* `processed` - the rendering process is currently underway.\n* `rendered` - the rendering process has completed successfully.\n* `failed` - the rendering process has failed.\n" } - ] - } + ], + "variable": [] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "auth": null }, "response": [ { - "id": "56813d50-7064-46b9-be51-60a261f5fe18", - "name": "Returns all successfully created links", + "id": "ccd4a84d-b820-4439-bc19-71d65e393d0c", + "name": "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.", "originalRequest": { "url": { "path": [ - "links", - "shorten", - "bulk" + "booklets" ], "host": [ "{{baseUrl}}" ], - "query": [], + "query": [ + { + "key": "limit", + "value": "10" + }, + { + "key": "before", + "value": "" + }, + { + "key": "after", + "value": "" + }, + { + "key": "include", + "value": "" + }, + { + "key": "include", + "value": "" + }, + { + "key": "date_created[dolore09b]", + "value": "" + }, + { + "key": "date_created[ind8]", + "value": "" + }, + { + "key": "mail_type", + "value": "usps_first_class" + }, + { + "key": "date_created", + "value": "" + }, + { + "key": "send_date", + "value": "" + }, + { + "key": "campaign_id", + "value": "" + }, + { + "key": "status", + "value": "" + } + ], "variable": [] }, "header": [ @@ -18076,22 +19986,8 @@ "value": "Basic " } ], - "method": "POST", - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "key": "links", - "value": "{\"redirect_link\":\"https://www.lob.com\",\"slug\":\"a1b2c3\"}" - }, - { - "disabled": false, - "key": "links", - "value": "{\"redirect_link\":\"https://www.lob.com\",\"slug\":\"a1b2c3\"}" - } - ] - } + "method": "GET", + "body": {} }, "status": "OK", "code": 200, @@ -18101,24 +19997,71 @@ "value": "application/json" } ], - "body": "{\n \"count\": -87122405,\n \"limit\": -39573635,\n \"offset\": 1924736,\n \"data\": [\n {\n \"id\": \"eu Lorem consequat\",\n \"campaign_id\": {\n \"value\": \"\"\n },\n \"domain_id\": \"sint ut\",\n \"resource_id\": \"magna\",\n \"redirect_link\": {\n \"value\": \"\"\n },\n \"short_link\": \"do Ut ea \",\n \"metadata_tag\": {\n \"value\": \"\"\n },\n \"billing_group_id\": {\n \"value\": \"\"\n }\n },\n {\n \"id\": \"incididunt sit\",\n \"campaign_id\": {\n \"value\": \"\"\n },\n \"domain_id\": \"eiusmod sed irure\",\n \"resource_id\": \"aliquip\",\n \"redirect_link\": {\n \"value\": \"\"\n },\n \"short_link\": \"laboris est i\",\n \"metadata_tag\": {\n \"value\": \"\"\n },\n \"billing_group_id\": {\n \"value\": \"\"\n }\n }\n ]\n}", + "body": "{\n \"data\": [\n {\n \"id\": \"ord_0d6a16a3fff6318ac8f8008dc1\",\n \"description\": \"April Campaign\",\n \"metadata\": {},\n \"to\": {\n \"id\": \"adr_d3489cd64c791ab5\",\n \"description\": null,\n \"name\": \"HARRY ZHANG\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2017-09-05T15:54:53.264Z\",\n \"date_modified\": \"2017-09-05T15:54:53.264Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"from\": {\n \"id\": \"adr_b8fb5acf3a2b55db\",\n \"description\": null,\n \"name\": \"LEORE AVIDAR\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2017-09-05T15:54:53.264Z\",\n \"date_modified\": \"2017-09-05T15:54:53.264Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"mail_type\": \"usps_first_class\",\n \"url\": \"https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA\",\n \"carrier\": \"USPS\",\n \"tracking_number\": null,\n \"tracking_events\": [],\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA\",\n \"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\",\n \"large\": \"https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg\"\n }\n ],\n \"merge_variables\": {\n \"name\": \"Harry\"\n },\n \"size\": \"8.375x5.375\",\n \"pages\": 8,\n \"source_material\": \"60# Gloss Text\",\n \"expected_delivery_date\": \"2021-03-24\",\n \"date_created\": \"2021-03-16T18:40:40.504Z\",\n \"date_modified\": \"2021-03-16T18:40:40.504Z\",\n \"send_date\": \"2021-03-16T18:45:40.493Z\",\n \"use_type\": \"marketing\",\n \"fsc\": false,\n \"object\": \"booklet\"\n },\n {\n \"id\": \"ord_851100000f31bb1a872f794cee\",\n \"description\": \"April Campaign\",\n \"metadata\": {},\n \"to\": {\n \"id\": \"adr_f9228b743884ff98\",\n \"description\": null,\n \"name\": \"AYA\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"2812 PARK RD\",\n \"address_line2\": null,\n \"address_city\": \"CHARLOTTE\",\n \"address_state\": \"NC\",\n \"address_zip\": \"28209-1314\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2021-03-16T18:40:40.410Z\",\n \"date_modified\": \"2021-03-16T18:40:40.410Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"from\": {\n \"id\": \"adr_210a8d4b0b76d77b\",\n \"description\": null,\n \"name\": null,\n \"company\": \"LOB\",\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2018-12-08T03:01:07.651Z\",\n \"date_modified\": \"2018-12-08T03:01:07.651Z\",\n \"object\": \"address\"\n },\n \"mail_type\": \"usps_first_class\",\n \"url\": \"https://lob-assets.com/order-creatives/ord_851100000f31bb1a872f794cee_comp_a20fd48ba4efda76ee827400d.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA\",\n \"carrier\": \"USPS\",\n \"tracking_number\": null,\n \"tracking_events\": [],\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/order-creatives/ord_851100000f31bb1a872f794cee_comp_a20fd48ba4efda76ee827400d_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA\",\n \"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\",\n \"large\": \"https://lob-assets.com/order-creatives/ord_851100000f31bb1a872f794cee_comp_a20fd48ba4efda76ee827400d_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg\"\n }\n ],\n \"merge_variables\": {\n \"name\": \"Harry\"\n },\n \"size\": \"8.375x5.375\",\n \"pages\": 8,\n \"source_material\": \"60# Gloss Text\",\n \"expected_delivery_date\": \"2021-03-24\",\n \"date_created\": \"2021-03-16T18:40:40.504Z\",\n \"date_modified\": \"2021-03-16T18:40:40.504Z\",\n \"send_date\": \"2021-03-16T18:45:40.493Z\",\n \"use_type\": \"marketing\",\n \"fsc\": false,\n \"object\": \"booklet\"\n }\n ],\n \"object\": \"list\",\n \"next_url\": null,\n \"previous_url\": null,\n \"count\": 2\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "cc39dd77-9c13-4d1e-8143-4051324891bb", + "id": "59e60397-bce0-441c-819e-46c886bcf383", "name": "Error", "originalRequest": { "url": { "path": [ - "links", - "shorten", - "bulk" + "booklets" ], "host": [ "{{baseUrl}}" ], - "query": [], + "query": [ + { + "key": "limit", + "value": "10" + }, + { + "key": "before", + "value": "" + }, + { + "key": "after", + "value": "" + }, + { + "key": "include", + "value": "" + }, + { + "key": "include", + "value": "" + }, + { + "key": "date_created[dolore09b]", + "value": "" + }, + { + "key": "date_created[ind8]", + "value": "" + }, + { + "key": "mail_type", + "value": "usps_first_class" + }, + { + "key": "date_created", + "value": "" + }, + { + "key": "send_date", + "value": "" + }, + { + "key": "campaign_id", + "value": "" + }, + { + "key": "status", + "value": "" + } + ], "variable": [] }, "header": [ @@ -18131,22 +20074,8 @@ "value": "Basic " } ], - "method": "POST", - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "key": "links", - "value": "{\"redirect_link\":\"https://www.lob.com\",\"slug\":\"a1b2c3\"}" - }, - { - "disabled": false, - "key": "links", - "value": "{\"redirect_link\":\"https://www.lob.com\",\"slug\":\"a1b2c3\"}" - } - ] - } + "method": "GET", + "body": {} }, "status": "Internal Server Error", "code": 500, @@ -18156,39 +20085,25 @@ "value": "application/json" } ], - "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"redirect_link is required\",\n \"status_code\": 422\n }\n}", + "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"to address not found\",\n \"status_code\": 404\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } ], - "event": [], - "protocolProfileBehavior": { - "disableBodyPruning": true - } - } - ], - "event": [] - }, - { - "id": "9c6c25be-5b47-4799-8145-63118900da97", - "name": "US Autocompletions", - "description": { - "content": "Given partial address information, this endpoint returns up to 10 address suggestions.
\n## Autocompletion Test Env\nYour test API key does not autocomplete US addresses and is used to simulate behavior. With your test API key, requests with specific values for `address_prefix` return predetermined values. When `address_prefix` is set to:\n- `0 suggestions` - Returns no suggestions - `[PRIMARY NUMBER] s[uggestion]` - Returns a maximum of ten predefined suggested addresses.\n `[PRIMARY NUMBER]` does not have to be a valid primary number when sending a test request.\n Each additional letter in `suggestion` reduces the number of suggestions by one (e.g.\n `1 su` returns 9 suggested addresses). `[PRIMARY NUMBER]` does not affect the number of\n suggestions returned.\n\nCity and state filters work as expected and filter the list of predetermined suggested addresses.\nSee the `test` request & response examples under [Autocomplete Examples](#operation/autocompletion) within the \"Autocomplete a partial address\" section in US Autocompletions. \n", - "type": "text/plain" - }, - "item": [ + "event": [] + }, { - "id": "c9509d2c-5abe-4158-90ae-7d37d1492023", - "name": "Autocomplete", + "id": "33704a55-a8ae-4810-9331-f7b7e2c72355", + "name": "Create", "request": { - "name": "Autocomplete", + "name": "Create", "description": { - "content": "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).", + "content": "Creates a new booklet.", "type": "text/plain" }, "url": { "path": [ - "us_autocompletions" + "booklets" ], "host": [ "{{baseUrl}}" @@ -18196,20 +20111,20 @@ "query": [ { "disabled": false, - "key": "case", - "value": "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`." - }, - { - "disabled": false, - "key": "valid_addresses", - "value": "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." + "key": "idempotency_key", + "value": "", + "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.\n" } ], "variable": [] }, "header": [ + { + "disabled": 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.\n", + "key": "Idempotency-Key", + "value": "" + }, { "key": "Content-Type", "value": "application/x-www-form-urlencoded" @@ -18226,57 +20141,143 @@ "urlencoded": [ { "disabled": false, - "key": "address_prefix", - "value": "", - "description": "(Required) Only accepts numbers and street names in an alphanumeric format.\n" + "key": "value", + "value": "" }, { "disabled": false, - "key": "city", - "value": "", - "description": "An optional city input used to filter suggestions. Case insensitive and does not match partial abbreviations.\n" + "key": "value", + "value": "" }, { "disabled": false, - "key": "state", - "value": "", - "description": "An optional state input used to filter suggestions. Case insensitive and does not match partial abbreviations.\n" + "key": "value", + "value": "" }, { "disabled": false, - "key": "zip_code", - "value": "", - "description": "An optional ZIP Code input used to filter suggestions. Matches partial entries.\n" + "key": "use_type", + "value": "" }, { "disabled": false, - "key": "geo_ip_sort", - "value": "", - "description": "If `true`, sort suggestions by proximity to the IP set in the `X-Forwarded-For` header.\n" + "key": "pages", + "value": "" + }, + { + "disabled": false, + "key": "size", + "value": "8.375x5.375" + }, + { + "disabled": false, + "key": "description", + "value": "" + }, + { + "disabled": false, + "key": "metadata", + "value": "J`X6#7s?_ JnFs`5#FW[/@iOa&i+)O['l`iwW~8BBtX#O|F#&gT/5+h+DvQOxoo.JPhty*1t4RC:n=HF{WGhEpE,zOhzX[tidbB!81]R3rA(9*f5Egzf=OcVg{Buf2*pIaJ2#OaO[99=h&VTrDt:&x!O^AQaW" + }, + { + "disabled": false, + "key": "mail_type", + "value": "usps_first_class" + }, + { + "disabled": false, + "key": "merge_variables", + "value": "" + }, + { + "disabled": false, + "key": "value", + "value": "" + }, + { + "disabled": false, + "key": "billing_group_id", + "value": "" + }, + { + "disabled": false, + "key": "position", + "value": "" + }, + { + "disabled": false, + "key": "redirect_url", + "value": "" + }, + { + "disabled": false, + "key": "width", + "value": "" + }, + { + "disabled": false, + "key": "top", + "value": "" + }, + { + "disabled": false, + "key": "right", + "value": "" + }, + { + "disabled": false, + "key": "left", + "value": "" + }, + { + "disabled": false, + "key": "bottom", + "value": "" + }, + { + "disabled": false, + "key": "pages", + "value": "" + }, + { + "disabled": false, + "key": "logo", + "value": "{\"url\":{\"value\":\"\"}}" + }, + { + "disabled": false, + "key": "style", + "value": "{\"background_color\":{\"value\":\"\"},\"foreground_color\":{\"value\":\"\"}}" + }, + { + "disabled": false, + "key": "fsc", + "value": "false" + }, + { + "disabled": false, + "key": "source_material", + "value": "60# Gloss Text" } ] } }, "response": [ { - "id": "61ee70cc-55db-4191-a316-be7ba39948b1", - "name": "Returns a US autocompletion object.", + "id": "1e449167-1a5f-447e-a6dd-5074508ef778", + "name": "Returns a booklet object", "originalRequest": { "url": { "path": [ - "us_autocompletions" + "booklets" ], "host": [ "{{baseUrl}}" ], "query": [ { - "key": "case", - "value": "upper" - }, - { - "key": "valid_addresses", - "value": "false" + "key": "idempotency_key", + "value": "026e7634-24d7-486c-a0bb-4a17fd0eebc5" } ], "variable": [] @@ -18289,6 +20290,12 @@ }, "key": "Authorization", "value": "Basic " + }, + { + "disabled": 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.\n", + "key": "Idempotency-Key", + "value": "026e7634-24d7-486c-a0bb-4a17fd0eebc5" } ], "method": "POST", @@ -18297,48 +20304,163 @@ "urlencoded": [ { "disabled": false, - "description": { - "content": "(Required) Only accepts numbers and street names in an alphanumeric format.\n", - "type": "text/plain" - }, - "key": "address_prefix", - "value": "185 B" + "key": "description", + "value": "demo" + }, + { + "disabled": false, + "key": "description", + "value": "Harry - Office" + }, + { + "disabled": false, + "key": "name", + "value": "Harry Zhang" + }, + { + "disabled": false, + "key": "company", + "value": "Lob" + }, + { + "disabled": false, + "key": "email", + "value": "harry@lob.com" + }, + { + "disabled": false, + "key": "phone", + "value": "5555555555" + }, + { + "disabled": false, + "key": "address_line1", + "value": "210 King St" + }, + { + "disabled": false, + "key": "address_line2", + "value": "# 6100" + }, + { + "disabled": false, + "key": "address_city", + "value": "San Francisco" + }, + { + "disabled": false, + "key": "address_state", + "value": "CA" + }, + { + "disabled": false, + "key": "address_zip", + "value": "94107" + }, + { + "disabled": false, + "key": "address_country", + "value": "US" + }, + { + "disabled": false, + "key": "name", + "value": "Harry" + }, + { + "disabled": false, + "key": "address_line1", + "value": "210 King St" + }, + { + "disabled": false, + "key": "address_line2", + "value": "# 6100" + }, + { + "disabled": false, + "key": "address_city", + "value": "San Francisco" + }, + { + "disabled": false, + "key": "address_state", + "value": "CA" + }, + { + "disabled": false, + "key": "address_zip", + "value": "94107" + }, + { + "disabled": false, + "key": "file", + "value": "HTML Booklet for {{name}}" + }, + { + "disabled": false, + "key": "mail_type", + "value": "usps_first_class" + }, + { + "disabled": false, + "key": "name", + "value": "Harry" + }, + { + "disabled": false, + "key": "spiffy", + "value": "true" + }, + { + "disabled": false, + "key": "send_date", + "value": "2017-11-01T00:00:00.000Z" + }, + { + "disabled": false, + "key": "use_type", + "value": "marketing" + }, + { + "disabled": false, + "key": "position", + "value": "relative" + }, + { + "disabled": false, + "key": "redirect_url", + "value": "https://www.lob.com" + }, + { + "disabled": false, + "key": "width", + "value": "2" + }, + { + "disabled": false, + "key": "top", + "value": "2" }, { "disabled": false, - "description": { - "content": "An optional city input used to filter suggestions. Case insensitive and does not match partial abbreviations.\n", - "type": "text/plain" - }, - "key": "city", - "value": "San Francisco" + "key": "right", + "value": "2" }, { "disabled": false, - "description": { - "content": "An optional state input used to filter suggestions. Case insensitive and does not match partial abbreviations.\n", - "type": "text/plain" - }, - "key": "state", - "value": "CA" + "key": "pages", + "value": "1-2,4-5" }, { "disabled": false, - "description": { - "content": "An optional ZIP Code input used to filter suggestions. Matches partial entries.\n", - "type": "text/plain" - }, - "key": "zip_code", - "value": "94107" + "key": "fsc", + "value": "true" }, { "disabled": false, - "description": { - "content": "If `true`, sort suggestions by proximity to the IP set in the `X-Forwarded-For` header.\n", - "type": "text/plain" - }, - "key": "geo_ip_sort", - "value": "false" + "key": "size", + "value": "8.375x5.375" } ] } @@ -18369,29 +20491,25 @@ "value": "application/json" } ], - "body": "{\n \"id\": \"us_auto_a3ac97bcfbb2460ab20c\",\n \"suggestions\": [\n {\n \"primary_line\": \"185 BAYSIDE VILLAGE PL\",\n \"city\": \"SAN FRANCISCO\",\n \"state\": \"CA\",\n \"zip_code\": \"94107\"\n },\n {\n \"primary_line\": \"185 BRANNAN ST\",\n \"city\": \"SAN FRANCISCO\",\n \"state\": \"CA\",\n \"zip_code\": \"94107\"\n },\n {\n \"primary_line\": \"185 BONIFACIO ST\",\n \"city\": \"SAN FRANCISCO\",\n \"state\": \"CA\",\n \"zip_code\": \"94107\"\n },\n {\n \"primary_line\": \"185 BLAIR TER\",\n \"city\": \"SAN FRANCISCO\",\n \"state\": \"CA\",\n \"zip_code\": \"94107\"\n },\n {\n \"primary_line\": \"185 BLUXOME ST\",\n \"city\": \"SAN FRANCISCO\",\n \"state\": \"CA\",\n \"zip_code\": \"94107\"\n },\n {\n \"primary_line\": \"210 KING ST\",\n \"city\": \"SAN FRANCISCO\",\n \"state\": \"CA\",\n \"zip_code\": \"94107\"\n },\n {\n \"primary_line\": \"185 BRYANT ST\",\n \"city\": \"SAN FRANCISCO\",\n \"state\": \"CA\",\n \"zip_code\": \"94107\"\n }\n ],\n \"object\": \"us_autocompletion\"\n}", + "body": "{\n \"id\": \"ord_0d6a16a3fff6318ac8f8008dc1\",\n \"description\": \"April Campaign\",\n \"metadata\": {},\n \"to\": {\n \"id\": \"adr_d3489cd64c791ab5\",\n \"description\": null,\n \"name\": \"HARRY ZHANG\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2017-09-05T15:54:53.264Z\",\n \"date_modified\": \"2017-09-05T15:54:53.264Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"from\": {\n \"id\": \"adr_b8fb5acf3a2b55db\",\n \"description\": null,\n \"name\": \"LEORE AVIDAR\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2017-09-05T15:54:53.264Z\",\n \"date_modified\": \"2017-09-05T15:54:53.264Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"mail_type\": \"usps_first_class\",\n \"url\": \"https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA\",\n \"carrier\": \"USPS\",\n \"tracking_number\": null,\n \"tracking_events\": [],\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA\",\n \"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\",\n \"large\": \"https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg\"\n }\n ],\n \"merge_variables\": {\n \"name\": \"Harry\"\n },\n \"size\": \"8.375x5.375\",\n \"pages\": 8,\n \"source_material\": \"60# Gloss Text\",\n \"expected_delivery_date\": \"2021-03-24\",\n \"date_created\": \"2021-03-16T18:40:40.504Z\",\n \"date_modified\": \"2021-03-16T18:40:40.504Z\",\n \"send_date\": \"2021-03-16T18:45:40.493Z\",\n \"use_type\": \"marketing\",\n \"fsc\": false,\n \"object\": \"booklet\"\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "231e9e97-c92d-4fb3-a705-b36383e282b2", + "id": "4e45ae19-1bfe-4202-8ba2-845c999e0d06", "name": "Error", "originalRequest": { "url": { "path": [ - "us_autocompletions" + "booklets" ], "host": [ "{{baseUrl}}" ], "query": [ { - "key": "case", - "value": "upper" - }, - { - "key": "valid_addresses", - "value": "false" + "key": "idempotency_key", + "value": "026e7634-24d7-486c-a0bb-4a17fd0eebc5" } ], "variable": [] @@ -18404,6 +20522,12 @@ }, "key": "Authorization", "value": "Basic " + }, + { + "disabled": 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.\n", + "key": "Idempotency-Key", + "value": "026e7634-24d7-486c-a0bb-4a17fd0eebc5" } ], "method": "POST", @@ -18412,279 +20536,163 @@ "urlencoded": [ { "disabled": false, - "description": { - "content": "(Required) Only accepts numbers and street names in an alphanumeric format.\n", - "type": "text/plain" - }, - "key": "address_prefix", - "value": "185 B" + "key": "description", + "value": "demo" }, { "disabled": false, - "description": { - "content": "An optional city input used to filter suggestions. Case insensitive and does not match partial abbreviations.\n", - "type": "text/plain" - }, - "key": "city", + "key": "description", + "value": "Harry - Office" + }, + { + "disabled": false, + "key": "name", + "value": "Harry Zhang" + }, + { + "disabled": false, + "key": "company", + "value": "Lob" + }, + { + "disabled": false, + "key": "email", + "value": "harry@lob.com" + }, + { + "disabled": false, + "key": "phone", + "value": "5555555555" + }, + { + "disabled": false, + "key": "address_line1", + "value": "210 King St" + }, + { + "disabled": false, + "key": "address_line2", + "value": "# 6100" + }, + { + "disabled": false, + "key": "address_city", "value": "San Francisco" }, { "disabled": false, - "description": { - "content": "An optional state input used to filter suggestions. Case insensitive and does not match partial abbreviations.\n", - "type": "text/plain" - }, - "key": "state", + "key": "address_state", "value": "CA" }, { "disabled": false, - "description": { - "content": "An optional ZIP Code input used to filter suggestions. Matches partial entries.\n", - "type": "text/plain" - }, - "key": "zip_code", + "key": "address_zip", "value": "94107" }, { "disabled": false, - "description": { - "content": "If `true`, sort suggestions by proximity to the IP set in the `X-Forwarded-For` header.\n", - "type": "text/plain" - }, - "key": "geo_ip_sort", - "value": "false" - } - ] - } - }, - "status": "Internal Server Error", - "code": 500, - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"address_prefix is required\",\n \"status_code\": 422\n }\n}", - "cookie": [], - "_postman_previewlanguage": "json" - } - ], - "event": [], - "protocolProfileBehavior": { - "disableBodyPruning": true - } - } - ], - "event": [] - }, - { - "id": "f92795cd-1ffc-4ac6-9e44-9ff43d79020a", - "name": "US Verification Types", - "description": { - "content": "These are detailed definitions for various fields in the [US verification object](#operation/us_verification).\n\n

ZIP Code Types - components[zip_code_type]

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
standardThe default ZIP code type. Used when none of the other types apply.
po_boxThe ZIP code contains only PO Boxes.
uniqueThe ZIP code is uniquely assigned to a single organization (such as a government agency) that receives a large volume of mail.
militaryThe ZIP code contains military addresses.
empty stringA match could not be made with the provided inputs.
\n\n

Record Types - components[record_type]

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
streetThe default address type.
highriseThe address is a commercial building, apartment complex, highrise, etc.
firmThe address is of an organizational entity which receives a minimum number of mailpieces per day.
po_boxThe address is a PO Box.
rural_routeThe address exists on a Rural Route. This is an older system of mail delivery which is still used in some parts of the country.
general_deliveryThe address is part of the USPS General Delivery service, which allows individuals without permanent addresses to receive mail.
empty stringA match could not be made with the provided inputs.
\n\n

Carrier Route Types - components[carrier_route_type]

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
city_deliveryThe default carrier route type. Used when none of the other types apply.
rural_routeThe carrier route is a Rural Route. This is an older system of mail delivery which is still used in some parts of the country.
highway_contractThe carrier route is a Highway Contract Route. This is an older system of mail delivery which is still used in some parts of the country.
po_boxThe carrier route consists of PO Boxes.
general_deliveryThe carrier route is part of the USPS General Delivery service, which allows individuals without permanent addresses to receive mail.
empty stringA match could not be made with the provided inputs.
\n\n

DPV Footnotes - deliverability_analysis[dpv_footnotes]

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
AASome parts of the address (such as the street and ZIP code) are valid.
A1The address is invalid based on given inputs.
BBThe address is deliverable.
CCThe address is deliverable by removing the provided secondary unit designator.
TAThe address is deliverable by dropping a trailing alphabet from the primary number.
IAThe address is an Informed Address. The recipient and the street address is replaced with a special code provided by the USPS.
N1The address is deliverable but is missing a secondary information (apartment, unit, etc).
F1The address is a deliverable military address.
G1The address is a deliverable General Delivery address. General Delivery is a USPS service which allows individuals without permanent addresses to receive mail.
U1The address is a deliverable unique address. A unique ZIP code is assigned to a single organization (such as a government agency) that receives a large volume of mail.
C1The primary number was confirmed whereas the secondary number is unconfirmed and required to be deliverable.
M1The primary number is missing.
M3The primary number is invalid.
P1PO Box, Rural Route, or Highway Contract box number is missing.
P3PO Box, Rural Route, or Highway Contract box number is invalid.
PBThe address is identified as PO Box street address.
R1The address matched to a CMRA and private mailbox information is not present.
R7The address matched to a Phantom Carrier Route (carrier_route of R777), which corresponds to physical addresses that are not eligible for delivery.
RRThe address matched to a CMRA and private mailbox information is present.
\n\n", - "type": "text/plain" - }, - "item": [], - "event": [] - }, - { - "id": "44ad14ed-4e4b-4eac-8b2d-247c7f289f4a", - "name": "US Verifications", - "description": { - "content": "Validate, automatically correct, and standardize the addresses in your\naddress book based on USPS's Coding Accuracy Support System (CASS).\n
\n\n\n## US Verifications Test Env\n\nWhen verifying US addresses, you'll likely want to test against a wide array of addresses to\nensure you're handling responses correctly. With your test API key, requests that use specific\nvalues for `address` or `primary_line` and (if using `primary_line`) an arbitrary five digit\nnumber for `zip_code` (e.g. \"11111\") let you explore the responses to many types of addresses:\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ADDRESS TYPE FOR SAMPLE RESPONSEDELIVERABILITYSET primary_line OR address TO
Commercial highrisedeliverablecommercial highrise
Residential highrisedeliverableresidential highrise
Residential housedeliverableresidential house
PO Boxdeliverablepo box
Rural routedeliverablerural route
Puerty Rico address w/ urbanizationdeliverablepuerto rico
Military addressdeliverablemilitary
Department of statedeliverabledepartment of state
Generic deliverabledeliverabledeliverable
Missing a suite numberdeliverable_missing_unitmissing unit
Suite number doesn't existdeliverable_incorrect_unitincorrect unit
Residential house with unnecessary suite numberdeliverable_unnecessary_unitunnecessary unit
Undeliverable and block matchedundeliverableundeliverable block match
Undeliverable and no block matchedundeliverableundeliverable no match
\n\nSee the `test` request & response examples under [US Verification Examples](#operation/us_verification) within the\n\"Verify a US or US territory address\" section in US Verifications.\n\nYou can rely on the response from these examples generally matching the response you'd see in the live environment with an\naddress of that type (excluding the `recipient` field).\n\nThe test API key does not perform any verification, automatic correction, or standardization for addresses. If you wish to\ntry these features out, use our live demo or the free plan (see our pricing for details).\n\n", - "type": "text/plain" - }, - "item": [ - { - "id": "19540f3d-e2fb-45a6-99d3-8cd2af6da316", - "name": "Bulk Verify", - "request": { - "name": "Bulk Verify", - "description": { - "content": "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.", - "type": "text/plain" - }, - "url": { - "path": [ - "bulk", - "us_verifications" - ], - "host": [ - "{{baseUrl}}" - ], - "query": [ - { - "disabled": false, - "key": "case", - "value": "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`." - } - ], - "variable": [] - }, - "header": [ - { - "key": "Content-Type", - "value": "application/x-www-form-urlencoded" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "method": "POST", - "auth": null, - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "key": "addresses", - "value": "{\"primary_line\":{\"value\":\"\"},\"recipient\":{\"value\":\"\"},\"secondary_line\":{\"value\":\"\"},\"urbanization\":{\"value\":\"\"},\"city\":{\"value\":\"\"},\"state\":{\"value\":\"\"},\"zip_code\":{\"value\":\"\"}}", - "description": "(Required) " - } - ] - } - }, - "response": [ - { - "id": "2e7864f8-5672-479d-b99c-5b843ea643b7", - "name": "Returns a list of US verification objects.", - "originalRequest": { - "url": { - "path": [ - "bulk", - "us_verifications" - ], - "host": [ - "{{baseUrl}}" - ], - "query": [ + "key": "address_country", + "value": "US" + }, + { + "disabled": false, + "key": "name", + "value": "Harry" + }, + { + "disabled": false, + "key": "address_line1", + "value": "210 King St" + }, + { + "disabled": false, + "key": "address_line2", + "value": "# 6100" + }, + { + "disabled": false, + "key": "address_city", + "value": "San Francisco" + }, + { + "disabled": false, + "key": "address_state", + "value": "CA" + }, + { + "disabled": false, + "key": "address_zip", + "value": "94107" + }, { - "key": "case", - "value": "upper" - } - ], - "variable": [] - }, - "header": [ - { - "description": { - "content": "Added as a part of security scheme: basic", - "type": "text/plain" + "disabled": false, + "key": "file", + "value": "HTML Booklet for {{name}}" }, - "key": "Authorization", - "value": "Basic " - } - ], - "method": "POST", - "body": { - "mode": "urlencoded", - "urlencoded": [ { "disabled": false, - "description": { - "content": "(Required) ", - "type": "text/plain" - }, - "key": "addresses", - "value": "{\"primary_line\":\"210 King Street\",\"city\":\"San Francisco\",\"state\":\"CA\",\"zip_code\":\"94107\"}" + "key": "mail_type", + "value": "usps_first_class" }, { "disabled": false, - "description": { - "content": "(Required) ", - "type": "text/plain" - }, - "key": "addresses", - "value": "{\"recipient\":\"Walgreens\",\"primary_line\":\"Ave Wilson Churchill 123\",\"secondary_line\":\"\",\"urbanization\":\"URB FAIR OAKS\",\"city\":\"RIO PIEDRAS\",\"state\":\"PR\",\"zip_code\":\"00926\"}" - } - ] - } - }, - "status": "OK", - "code": 200, - "header": [ - { - "disabled": false, - "description": "The rate limit for a given endpoint.", - "key": "ratelimit-limit", - "value": "150" - }, - { - "disabled": false, - "description": "The number of requests remaining in the current window.", - "key": "ratelimit-remaining", - "value": "100" - }, - { - "disabled": false, - "description": "The time at which the rate limit window resets in UTC epoch seconds\n", - "key": "ratelimit-reset", - "value": "1528749846" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": "{\n \"addresses\": [\n {\n \"id\": \"us_ver_c7cb63d68f8d6\",\n \"recipient\": \"LOB.COM\",\n \"primary_line\": \"210 KING ST\",\n \"secondary_line\": \"\",\n \"urbanization\": \"\",\n \"last_line\": \"SAN FRANCISCO CA 94107-1702\",\n \"deliverability\": \"deliverable\",\n \"valid_address\": true,\n \"components\": {\n \"primary_number\": \"210\",\n \"street_predirection\": \"\",\n \"street_name\": \"KING\",\n \"street_suffix\": \"ST\",\n \"street_postdirection\": \"\",\n \"secondary_designator\": \"\",\n \"secondary_number\": \"\",\n \"pmb_designator\": \"\",\n \"pmb_number\": \"\",\n \"extra_secondary_designator\": \"\",\n \"extra_secondary_number\": \"\",\n \"city\": \"SAN FRANCISCO\",\n \"state\": \"CA\",\n \"zip_code\": \"94107\",\n \"zip_code_plus_4\": \"1702\",\n \"zip_code_type\": \"standard\",\n \"delivery_point_barcode\": \"941071728506\",\n \"address_type\": \"commercial\",\n \"record_type\": \"street\",\n \"default_building_address\": false,\n \"county\": \"SAN FRANCISCO\",\n \"county_fips\": \"06075\",\n \"carrier_route\": \"C032\",\n \"carrier_route_type\": \"city_delivery\",\n \"po_box_only_flag\": \"N\",\n \"latitude\": 37.77597542841264,\n \"longitude\": -122.3929557343685\n },\n \"deliverability_analysis\": {\n \"dpv_confirmation\": \"Y\",\n \"dpv_cmra\": \"N\",\n \"dpv_vacant\": \"N\",\n \"dpv_active\": \"Y\",\n \"dpv_inactive_reason\": \"\",\n \"dpv_throwback\": \"N\",\n \"dpv_non_delivery_day_flag\": \"N\",\n \"dpv_non_delivery_day_values\": \"\",\n \"dpv_no_secure_location\": \"N\",\n \"dpv_door_not_accessible\": \"N\",\n \"dpv_footnotes\": [\n \"AA\",\n \"BB\"\n ],\n \"ews_match\": false,\n \"lacs_indicator\": \"\",\n \"lacs_return_code\": \"\",\n \"suite_return_code\": \"\"\n },\n \"lob_confidence_score\": {\n \"score\": 100,\n \"level\": \"high\"\n },\n \"object\": \"us_verification\"\n }\n ],\n \"errors\": false\n}", - "cookie": [], - "_postman_previewlanguage": "json" - }, - { - "id": "58221ff6-f8b3-4847-b847-86c5f362cc10", - "name": "Error", - "originalRequest": { - "url": { - "path": [ - "bulk", - "us_verifications" - ], - "host": [ - "{{baseUrl}}" - ], - "query": [ + "key": "name", + "value": "Harry" + }, { - "key": "case", - "value": "upper" - } - ], - "variable": [] - }, - "header": [ - { - "description": { - "content": "Added as a part of security scheme: basic", - "type": "text/plain" + "disabled": false, + "key": "spiffy", + "value": "true" }, - "key": "Authorization", - "value": "Basic " - } - ], - "method": "POST", - "body": { - "mode": "urlencoded", - "urlencoded": [ { "disabled": false, - "description": { - "content": "(Required) ", - "type": "text/plain" - }, - "key": "addresses", - "value": "{\"primary_line\":\"210 King Street\",\"city\":\"San Francisco\",\"state\":\"CA\",\"zip_code\":\"94107\"}" + "key": "send_date", + "value": "2017-11-01T00:00:00.000Z" }, { "disabled": false, - "description": { - "content": "(Required) ", - "type": "text/plain" - }, - "key": "addresses", - "value": "{\"recipient\":\"Walgreens\",\"primary_line\":\"Ave Wilson Churchill 123\",\"secondary_line\":\"\",\"urbanization\":\"URB FAIR OAKS\",\"city\":\"RIO PIEDRAS\",\"state\":\"PR\",\"zip_code\":\"00926\"}" + "key": "use_type", + "value": "marketing" + }, + { + "disabled": false, + "key": "position", + "value": "relative" + }, + { + "disabled": false, + "key": "redirect_url", + "value": "https://www.lob.com" + }, + { + "disabled": false, + "key": "width", + "value": "2" + }, + { + "disabled": false, + "key": "top", + "value": "2" + }, + { + "disabled": false, + "key": "right", + "value": "2" + }, + { + "disabled": false, + "key": "pages", + "value": "1-2,4-5" + }, + { + "disabled": false, + "key": "fsc", + "value": "true" + }, + { + "disabled": false, + "key": "size", + "value": "8.375x5.375" } ] } @@ -18697,7 +20705,7 @@ "value": "application/json" } ], - "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"primary_line is required or address is required\",\n \"status_code\": 422\n }\n}", + "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"to address not found\",\n \"status_code\": 404\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } @@ -18706,105 +20714,78 @@ "protocolProfileBehavior": { "disableBodyPruning": true } - }, + } + ], + "event": [] + }, + { + "id": "8c5c8dd8-82a9-41ec-997f-ee3436e2cd8f", + "name": "Snap Packs", + "description": { + "content": "", + "type": "text/plain" + }, + "item": [ { - "id": "9da4c84f-b704-440a-8cc4-53d713e018b2", - "name": "Single Verify", + "id": "1e3e7565-322c-4a81-bb7e-8da5a61718a0", + "name": "Retrieve", "request": { - "name": "Single Verify", + "name": "Retrieve", "description": { - "content": "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.", + "content": "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.", "type": "text/plain" }, "url": { "path": [ - "us_verifications" + "snap_packs", + ":snap_pack_id" ], "host": [ "{{baseUrl}}" ], - "query": [ + "query": [], + "variable": [ { "disabled": false, - "key": "case", - "value": "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`." + "type": "any", + "value": "", + "key": "snap_pack_id", + "description": "(Required) id of the snap_pack" } - ], - "variable": [] + ] }, "header": [ - { - "key": "Content-Type", - "value": "application/x-www-form-urlencoded" - }, { "key": "Accept", "value": "application/json" } ], - "method": "POST", - "auth": null, - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "key": "value", - "value": "" - }, - { - "disabled": false, - "key": "value", - "value": "" - }, - { - "disabled": false, - "key": "value", - "value": "" - }, - { - "disabled": false, - "key": "value", - "value": "" - }, - { - "disabled": false, - "key": "value", - "value": "" - }, - { - "disabled": false, - "key": "state", - "value": "" - }, - { - "disabled": false, - "key": "value", - "value": "" - } - ] - } + "method": "GET", + "auth": null }, "response": [ { - "id": "b45fd3dd-fda2-4dd1-af79-d52ca9cc0bd2", - "name": "Returns a US verification object.", + "id": "4a15434f-0c04-47bc-b8c2-a68d5ab11399", + "name": "Returns a snap_pack object", "originalRequest": { "url": { "path": [ - "us_verifications" + "snap_packs", + ":snap_pack_id" ], "host": [ "{{baseUrl}}" ], - "query": [ + "query": [], + "variable": [ { - "key": "case", - "value": "upper" + "disabled": false, + "type": "any", + "value": "", + "key": "snap_pack_id", + "description": "(Required) id of the snap_pack" } - ], - "variable": [] + ] }, "header": [ { @@ -18816,81 +20797,43 @@ "value": "Basic " } ], - "method": "POST", - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "key": "primary_line", - "value": "210 King Street" - }, - { - "disabled": false, - "key": "city", - "value": "San Francisco" - }, - { - "disabled": false, - "key": "state", - "value": "CA" - }, - { - "disabled": false, - "key": "zip_code", - "value": "94107" - } - ] - } + "method": "GET", + "body": {} }, "status": "OK", "code": 200, "header": [ - { - "disabled": false, - "description": "The rate limit for a given endpoint.", - "key": "ratelimit-limit", - "value": "150" - }, - { - "disabled": false, - "description": "The number of requests remaining in the current window.", - "key": "ratelimit-remaining", - "value": "100" - }, - { - "disabled": false, - "description": "The time at which the rate limit window resets in UTC epoch seconds\n", - "key": "ratelimit-reset", - "value": "1528749846" - }, { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"id\": \"us_ver_c7cb63d68f8d6\",\n \"recipient\": \"LOB.COM\",\n \"primary_line\": \"210 KING ST\",\n \"secondary_line\": \"\",\n \"urbanization\": \"\",\n \"last_line\": \"SAN FRANCISCO CA 94107-1702\",\n \"deliverability\": \"deliverable\",\n \"valid_address\": true,\n \"components\": {\n \"primary_number\": \"210\",\n \"street_predirection\": \"\",\n \"street_name\": \"KING\",\n \"street_suffix\": \"ST\",\n \"street_postdirection\": \"\",\n \"secondary_designator\": \"\",\n \"secondary_number\": \"\",\n \"pmb_designator\": \"\",\n \"pmb_number\": \"\",\n \"extra_secondary_designator\": \"\",\n \"extra_secondary_number\": \"\",\n \"city\": \"SAN FRANCISCO\",\n \"state\": \"CA\",\n \"zip_code\": \"94107\",\n \"zip_code_plus_4\": \"1702\",\n \"zip_code_type\": \"standard\",\n \"delivery_point_barcode\": \"941071702108\",\n \"address_type\": \"commercial\",\n \"record_type\": \"street\",\n \"default_building_address\": false,\n \"county\": \"SAN FRANCISCO\",\n \"county_fips\": \"06075\",\n \"carrier_route\": \"C032\",\n \"carrier_route_type\": \"city_delivery\",\n \"po_box_only_flag\": \"N\",\n \"latitude\": 37.77597542841264,\n \"longitude\": -122.3929557343685\n },\n \"deliverability_analysis\": {\n \"dpv_confirmation\": \"Y\",\n \"dpv_cmra\": \"N\",\n \"dpv_vacant\": \"N\",\n \"dpv_active\": \"Y\",\n \"dpv_inactive_reason\": \"\",\n \"dpv_throwback\": \"N\",\n \"dpv_non_delivery_day_flag\": \"N\",\n \"dpv_non_delivery_day_values\": \"\",\n \"dpv_no_secure_location\": \"N\",\n \"dpv_door_not_accessible\": \"N\",\n \"dpv_footnotes\": [\n \"AA\",\n \"BB\"\n ],\n \"ews_match\": false,\n \"lacs_indicator\": \"\",\n \"lacs_return_code\": \"\",\n \"suite_return_code\": \"\"\n },\n \"lob_confidence_score\": {\n \"score\": 100,\n \"level\": \"high\"\n },\n \"object\": \"us_verification\"\n}", + "body": "{\n \"id\": \"ord_0d6a16a3fff6318ac8f8008dc1\",\n \"description\": \"April Campaign\",\n \"to\": {\n \"id\": \"adr_bae820679f3f536b\",\n \"description\": null,\n \"name\": \"HARRY ZHANG\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2017-09-05T17:47:53.767Z\",\n \"date_modified\": \"2017-09-05T17:47:53.767Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"from\": {\n \"id\": \"adr_210a8d4b0b76d77b\",\n \"description\": null,\n \"name\": \"LEORE AVIDAR\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2017-09-05T17:47:53.767Z\",\n \"date_modified\": \"2017-09-05T17:47:53.767Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"url\": \"https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA\",\n \"outside_template_id\": \"tmpl_a3cb937f26d7eec\",\n \"inside_template_id\": \"tmpl_a3cb937f26d7eec\",\n \"inside_template_version_id\": \"vrsn_bfdf70893b00a85\",\n \"outside_template_version_id\": \"vrsn_bfdf70893b00a85\",\n \"carrier\": \"USPS\",\n \"tracking_events\": [],\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA\",\n \"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\",\n \"large\": \"https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg\"\n },\n {\n \"small\": \"https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_small_2.png?version=v1&expires=1618512040&signature=3gTgU7Fd3KoT_vNlQnTGptRps5ZgnkhSnPrAwk7L98higIzSwfKoLvuu_DIpMM48dHbxckKT9waR8euJ4KSDBQ\",\n \"medium\": \"https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_medium_2.png?version=v1&expires=1618512040&signature=Ue1lw5CMj7KRx6cMQL8xPeazaHCdJzWcACd1w3acuYPnWkVIpSt62OIO7hAtpAQK9xm1dhhlFj0rqRZMdRMMBA\",\n \"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\"\n }\n ],\n \"merge_variables\": {\n \"name\": null\n },\n \"size\": \"8.5x11\",\n \"mail_type\": \"usps_first_class\",\n \"expected_delivery_date\": \"2021-03-24\",\n \"date_created\": \"2021-03-16T18:40:40.504Z\",\n \"date_modified\": \"2021-03-16T18:40:40.504Z\",\n \"send_date\": \"2021-03-16T18:45:40.493Z\",\n \"use_type\": \"marketing\",\n \"fsc\": false,\n \"color\": false,\n \"object\": \"snap_pack\"\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "937b476d-fee2-4932-8ad6-868ce0f91980", + "id": "e3904a0e-5ae2-4a7b-bb17-075101af5225", "name": "Error", "originalRequest": { "url": { "path": [ - "us_verifications" + "snap_packs", + ":snap_pack_id" ], "host": [ "{{baseUrl}}" ], - "query": [ + "query": [], + "variable": [ { - "key": "case", - "value": "upper" + "disabled": false, + "type": "any", + "value": "", + "key": "snap_pack_id", + "description": "(Required) id of the snap_pack" } - ], - "variable": [] + ] }, "header": [ { @@ -18902,32 +20845,8 @@ "value": "Basic " } ], - "method": "POST", - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "key": "primary_line", - "value": "210 King Street" - }, - { - "disabled": false, - "key": "city", - "value": "San Francisco" - }, - { - "disabled": false, - "key": "state", - "value": "CA" - }, - { - "disabled": false, - "key": "zip_code", - "value": "94107" - } - ] - } + "method": "GET", + "body": {} }, "status": "Internal Server Error", "code": 500, @@ -18937,104 +20856,73 @@ "value": "application/json" } ], - "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"primary_line is required or address is required\",\n \"status_code\": 422\n }\n}", + "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"to address not found\",\n \"status_code\": 404\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } ], - "event": [], - "protocolProfileBehavior": { - "disableBodyPruning": true - } - } - ], - "event": [] - }, - { - "id": "7396429b-56ab-4849-92c1-38aabf862549", - "name": "Versioning and Changelog", - "description": { - "content": "### API Versioning\n\nWhen backwards-incompatible changes are made to the API, a new dated version\nis released. The latest version of the API is version **2024-01-01**. \nAll versions prior to, and inclusive of, 2019-02-11 have been sunsetted. You can\nview your version and upgrade to the latest version in your\nDashboard Settings. You will\nonly need to specify a version if you would like to test a newer version of\nthe API without doing a full upgrade. The API will return an error if a\nversion older than your current one is passed in.\n\n### Example Request\n\n```bash\n curl https://api.lob.com/v1/addresses \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -H \"Lob-Version: 2024-01-01\"\n```\n\n### Specification Versioning\nYou might be wondering why our API and specification use different versioning schemes.\nLob's API predates our specification and follows the Stripe versioning\napproach. This works well to manage backwards-incompatible changes to our API.\n\nFor our API specification (used to create this documentation), we've chosen semantic\nversioning. This versioning reflects the backward-compatible\nchanges that do not require a versioning of Lob's API.\n\nLob's API specification will be used to generate artifacts like documentation, client SDKs,\nand other developer tooling. Semantic versioning of our specification will inform how we\nversion those artifacts like SDKs. It is helpful to know the version of a specification\nused to produce an artifact in order reference the specification release notes.\n\n\n### Changelog\n View our Changelog here.\n", - "type": "text/plain" - }, - "item": [], - "event": [] - }, - { - "id": "0a3d4cc7-1cc6-4c79-ac59-2cce5b9d033d", - "name": "Webhooks", - "description": { - "content": "Webhooks are an easy way to get notifications on events happening asynchronously\nwithin Lob's architecture. For example, when a postcard gets a \"Processed For\nDelivery\" tracking event, an event object of type `postcard.processed_for_delivery`\nwill be created. If you are subscribed to that event type in that Environment\n(Test vs. Live), Lob will send that event to any URLs you've specified via an\nHTTP POST request. In Live mode, you can only have as many webhooks as allotted\nin your current Print & Mail Edition.\nThere is no limit in Test mode.\nYou can view and create webhooks on the\nLob Dashboard, as well as view your events.\nSee our Webhooks Integration Guide for more\ndetails on how to integrate. Please see the full list of event types available for\nsubscription here.\n\n", - "type": "text/plain" - }, - "item": [], - "event": [] - }, - { - "id": "94d7ece2-d12d-4614-a4b2-524227e285aa", - "name": "Zip Lookups", - "description": { - "content": "Find a list of cities, states and associated information about a US ZIP code. \n", - "type": "text/plain" - }, - "item": [ + "event": [] + }, { - "id": "18c26f8f-1419-4a60-832c-bf40b6f054b5", - "name": "Lookups", + "id": "fa66d1f9-f29a-4f85-a0b1-ee4833a4153f", + "name": "Delete", "request": { - "name": "Lookups", + "name": "Delete", "description": { - "content": "Returns information about a ZIP code", + "content": "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.", "type": "text/plain" }, "url": { "path": [ - "us_zip_lookups" + "snap_packs", + ":snap_pack_id" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [] + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "snap_pack_id", + "description": "(Required) id of the snap_pack" + } + ] }, "header": [ - { - "key": "Content-Type", - "value": "application/x-www-form-urlencoded" - }, { "key": "Accept", "value": "application/json" } ], - "method": "POST", - "auth": null, - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "key": "zip_code", - "value": "", - "description": "(Required) A 5-digit ZIP code." - } - ] - } + "method": "DELETE", + "auth": null }, "response": [ { - "id": "6c3eb69f-020d-479f-82e1-0f315b108b84", - "name": "Returns a zip lookup object if a valid zip was provided.", + "id": "0795a683-257d-4a7b-8a95-6d7da197c31f", + "name": "Deleted", "originalRequest": { "url": { "path": [ - "us_zip_lookups" + "snap_packs", + ":snap_pack_id" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [] + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "snap_pack_id", + "description": "(Required) id of the snap_pack" + } + ] }, "header": [ { @@ -19046,65 +20934,43 @@ "value": "Basic " } ], - "method": "POST", - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "description": { - "content": "(Required) A 5-digit ZIP code.", - "type": "text/plain" - }, - "key": "zip_code", - "value": "94107" - } - ] - } + "method": "DELETE", + "body": {} }, "status": "OK", "code": 200, "header": [ - { - "disabled": false, - "description": "The rate limit for a given endpoint.", - "key": "ratelimit-limit", - "value": "150" - }, - { - "disabled": false, - "description": "The number of requests remaining in the current window.", - "key": "ratelimit-remaining", - "value": "100" - }, - { - "disabled": false, - "description": "The time at which the rate limit window resets in UTC epoch seconds\n", - "key": "ratelimit-reset", - "value": "1528749846" - }, { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"id\": \"us_zip_c7cb63d68f8d6\",\n \"cities\": [\n {\n \"city\": \"SAN FRANCISCO\",\n \"state\": \"CA\",\n \"county\": \"SAN FRANCISCO\",\n \"county_fips\": \"06075\",\n \"preferred\": true\n }\n ],\n \"zip_code_type\": \"standard\",\n \"object\": \"us_zip_lookup\",\n \"zip_code\": \"94107\"\n}", + "body": "{\n \"id\": \"ord_0d6a16a3fff6318ac8f8008dc1\",\n \"deleted\": true\n}", "cookie": [], "_postman_previewlanguage": "json" }, { - "id": "19b280a0-3579-4c2c-9adf-9b6ff2e32c22", + "id": "1620d47d-d7be-411f-8634-0aeeb2afa3e5", "name": "Error", "originalRequest": { "url": { "path": [ - "us_zip_lookups" + "snap_packs", + ":snap_pack_id" ], "host": [ "{{baseUrl}}" ], "query": [], - "variable": [] + "variable": [ + { + "disabled": false, + "type": "any", + "value": "", + "key": "snap_pack_id", + "description": "(Required) id of the snap_pack" + } + ] }, "header": [ { @@ -19116,68 +20982,108 @@ "value": "Basic " } ], - "method": "POST", - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "disabled": false, - "description": { - "content": "(Required) A 5-digit ZIP code.", - "type": "text/plain" - }, - "key": "zip_code", - "value": "94107" - } - ] - } + "method": "DELETE", + "body": {} }, "status": "Internal Server Error", "code": 500, "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": "{\n \"error\": {\n \"code\": \"invalid\",\n \"message\": \"zip_code is required\",\n \"status_code\": 422\n }\n}", - "cookie": [], - "_postman_previewlanguage": "json" - } - ], - "event": [], - "protocolProfileBehavior": { - "disableBodyPruning": true - } - } - ], - "event": [] - }, - { - "id": "d2bbe350-530b-40f0-aeda-7d49414dcbd1", - "name": "Accounts", - "description": { - "content": "", - "type": "text/plain" - }, - "item": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"to address not found\",\n \"status_code\": 404\n }\n}", + "cookie": [], + "_postman_previewlanguage": "json" + } + ], + "event": [] + }, { - "id": "5c9aa09c-1e89-4860-8be4-6c89cbe5ac0a", - "name": "Get Lob Credits Balance", + "id": "da3f1050-645a-48ce-90f6-8c5e07b327f6", + "name": "List", "request": { - "name": "Get Lob Credits Balance", + "name": "List", "description": { - "content": "Returns the account's current balance of Lob Credits.", + "content": "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.", "type": "text/plain" }, "url": { "path": [ - "accounts" + "snap_packs" ], "host": [ "{{baseUrl}}" ], - "query": [], + "query": [ + { + "disabled": false, + "key": "limit", + "value": "10", + "description": "How many results to return." + }, + { + "disabled": false, + "key": "before", + "value": "", + "description": "`before` and `after` are both optional but only one of them can be in the query at a time.\n" + }, + { + "disabled": false, + "key": "after", + "value": "", + "description": "`before` and `after` are both optional but only one of them can be in the query at a time.\n" + }, + { + "disabled": false, + "key": "include", + "value": "", + "description": "Request that the response include the total count by specifying `include=[\"total_count\"]`.\n" + }, + { + "disabled": false, + "key": "include", + "value": "", + "description": "Request that the response include the total count by specifying `include=[\"total_count\"]`.\n" + }, + { + "disabled": false, + "key": "date_created[ut_ad]", + "value": "", + "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 ≤." + }, + { + "disabled": false, + "key": "mail_type", + "value": "usps_first_class", + "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.\n" + }, + { + "disabled": false, + "key": "date_created", + "value": "", + "description": "Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both.\n" + }, + { + "disabled": false, + "key": "send_date", + "value": "", + "description": "Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both.\n" + }, + { + "disabled": false, + "key": "campaign_id", + "value": "", + "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_`." + }, + { + "disabled": false, + "key": "status", + "value": "", + "description": "A string describing the render status:\n* `processed` - the rendering process is currently underway.\n* `rendered` - the rendering process has completed successfully.\n* `failed` - the rendering process has failed.\n" + } + ], "variable": [] }, "header": [ @@ -19191,17 +21097,66 @@ }, "response": [ { - "id": "78d7ced8-fa7e-41e7-ad69-bd08b501c87f", - "name": "Returns a lob_credits_balance object.", + "id": "28da7f23-cb15-4fdd-b100-16208c9c3aa4", + "name": "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.", "originalRequest": { "url": { "path": [ - "accounts" + "snap_packs" ], "host": [ "{{baseUrl}}" ], - "query": [], + "query": [ + { + "key": "limit", + "value": "10" + }, + { + "key": "before", + "value": "" + }, + { + "key": "after", + "value": "" + }, + { + "key": "include", + "value": "" + }, + { + "key": "include", + "value": "" + }, + { + "key": "date_created[dolore09b]", + "value": "" + }, + { + "key": "date_created[ind8]", + "value": "" + }, + { + "key": "mail_type", + "value": "usps_first_class" + }, + { + "key": "date_created", + "value": "" + }, + { + "key": "send_date", + "value": "" + }, + { + "key": "campaign_id", + "value": "" + }, + { + "key": "status", + "value": "" + } + ], "variable": [] }, "header": [ @@ -19225,65 +21180,71 @@ "value": "application/json" } ], - "body": "{\n \"balance\": 0\n}", + "body": "{\n \"data\": [\n {\n \"id\": \"ord_0d6a16a3fff6318ac8f8008dc1\",\n \"description\": \"April Campaign\",\n \"to\": {\n \"id\": \"adr_bae820679f3f536b\",\n \"description\": null,\n \"name\": \"HARRY ZHANG\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2017-09-05T17:47:53.767Z\",\n \"date_modified\": \"2017-09-05T17:47:53.767Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"from\": {\n \"id\": \"adr_210a8d4b0b76d77b\",\n \"description\": null,\n \"name\": \"LEORE AVIDAR\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2017-09-05T17:47:53.767Z\",\n \"date_modified\": \"2017-09-05T17:47:53.767Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"url\": \"https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA\",\n \"outside_template_id\": \"tmpl_a3cb937f26d7eec\",\n \"inside_template_id\": \"tmpl_a3cb937f26d7eec\",\n \"inside_template_version_id\": \"vrsn_bfdf70893b00a85\",\n \"outside_template_version_id\": \"vrsn_bfdf70893b00a85\",\n \"carrier\": \"USPS\",\n \"tracking_events\": [],\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA\",\n \"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\",\n \"large\": \"https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg\"\n },\n {\n \"small\": \"https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_small_2.png?version=v1&expires=1618512040&signature=3gTgU7Fd3KoT_vNlQnTGptRps5ZgnkhSnPrAwk7L98higIzSwfKoLvuu_DIpMM48dHbxckKT9waR8euJ4KSDBQ\",\n \"medium\": \"https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_medium_2.png?version=v1&expires=1618512040&signature=Ue1lw5CMj7KRx6cMQL8xPeazaHCdJzWcACd1w3acuYPnWkVIpSt62OIO7hAtpAQK9xm1dhhlFj0rqRZMdRMMBA\",\n \"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\"\n }\n ],\n \"merge_variables\": {\n \"name\": null\n },\n \"size\": \"8.5x11\",\n \"mail_type\": \"usps_first_class\",\n \"expected_delivery_date\": \"2021-03-24\",\n \"date_created\": \"2021-03-16T18:40:40.504Z\",\n \"date_modified\": \"2021-03-16T18:40:40.504Z\",\n \"send_date\": \"2021-03-16T18:45:40.493Z\",\n \"use_type\": \"marketing\",\n \"fsc\": false,\n \"color\": false,\n \"object\": \"snap_pack\"\n },\n {\n \"id\": \"ord_851100000f31bb1a872f794cee\",\n \"description\": \"April Campaign\",\n \"to\": {\n \"id\": \"adr_f9228b743884ff98\",\n \"description\": null,\n \"name\": \"AYA\",\n \"company\": null,\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"2812 PARK RD\",\n \"address_line2\": null,\n \"address_city\": \"CHARLOTTE\",\n \"address_state\": \"NC\",\n \"address_zip\": \"28209-1314\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2021-03-16T18:40:40.410Z\",\n \"date_modified\": \"2021-03-16T18:40:40.410Z\",\n \"deleted\": true,\n \"object\": \"address\"\n },\n \"from\": {\n \"id\": \"adr_210a8d4b0b76d77b\",\n \"description\": null,\n \"name\": null,\n \"company\": \"LOB\",\n \"phone\": null,\n \"email\": null,\n \"address_line1\": \"210 KING ST STE 6100\",\n \"address_line2\": null,\n \"address_city\": \"SAN FRANCISCO\",\n \"address_state\": \"CA\",\n \"address_zip\": \"94107-1741\",\n \"address_country\": \"UNITED STATES\",\n \"metadata\": {},\n \"date_created\": \"2018-12-08T03:01:07.651Z\",\n \"date_modified\": \"2018-12-08T03:01:07.651Z\",\n \"object\": \"address\"\n },\n \"url\": \"https://lob-assets.com/order-creatives/ord_851100000f31bb1a872f794cee_comp_a20fd48ba4efda76ee827400d.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA\",\n \"outside_template_id\": \"tmpl_a3cb937f26d7eec\",\n \"inside_template_id\": \"tmpl_a3cb937f26d7eec\",\n \"inside_template_version_id\": \"vrsn_bfdf70893b00a85\",\n \"outside_template_version_id\": \"vrsn_bfdf70893b00a85\",\n \"carrier\": \"USPS\",\n \"tracking_events\": [],\n \"thumbnails\": [\n {\n \"small\": \"https://lob-assets.com/order-creatives/ord_851100000f31bb1a872f794cee_comp_a20fd48ba4efda76ee827400d_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA\",\n \"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\",\n \"large\": \"https://lob-assets.com/order-creatives/ord_851100000f31bb1a872f794cee_comp_a20fd48ba4efda76ee827400d_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg\"\n },\n {\n \"small\": \"https://lob-assets.com/order-creatives/ord_851100000f31bb1a872f794cee_comp_a20fd48ba4efda76ee827400d_thumb_small_2.png?version=v1&expires=1618512040&signature=3gTgU7Fd3KoT_vNlQnTGptRps5ZgnkhSnPrAwk7L98higIzSwfKoLvuu_DIpMM48dHbxckKT9waR8euJ4KSDBQ\",\n \"medium\": \"https://lob-assets.com/order-creatives/ord_851100000f31bb1a872f794cee_comp_a20fd48ba4efda76ee827400d_thumb_medium_2.png?version=v1&expires=1618512040&signature=Ue1lw5CMj7KRx6cMQL8xPeazaHCdJzWcACd1w3acuYPnWkVIpSt62OIO7hAtpAQK9xm1dhhlFj0rqRZMdRMMBA\",\n \"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\"\n }\n ],\n \"merge_variables\": {\n \"name\": null\n },\n \"size\": \"8.5x11\",\n \"mail_type\": \"usps_first_class\",\n \"expected_delivery_date\": \"2021-03-24\",\n \"date_created\": \"2021-03-16T18:40:40.504Z\",\n \"date_modified\": \"2021-03-16T18:40:40.504Z\",\n \"send_date\": \"2021-03-16T18:45:40.493Z\",\n \"use_type\": \"marketing\",\n \"fsc\": false,\n \"color\": false,\n \"object\": \"snap_pack\"\n }\n ],\n \"object\": \"list\",\n \"next_url\": null,\n \"previous_url\": null,\n \"count\": 2\n}", "cookie": [], "_postman_previewlanguage": "json" - } - ], - "event": [] - } - ], - "event": [] - }, - { - "id": "32f5b8d3-dd84-4872-9b2e-af8e39bdc542", - "name": "Lob Credits", - "description": { - "content": "", - "type": "text/plain" - }, - "item": [ - { - "id": "fb2488cd-bcc0-4f42-9085-15d618e9787d", - "name": "Get Lob Credits Balance", - "request": { - "name": "Get Lob Credits Balance", - "description": { - "content": "Returns the account's current balance of Lob Credits.", - "type": "text/plain" }, - "url": { - "path": [ - "accounts" - ], - "host": [ - "{{baseUrl}}" - ], - "query": [], - "variable": [] - }, - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "method": "GET", - "auth": null - }, - "response": [ { - "id": "c035ec5f-629d-44cb-bffd-84ae363cad6a", - "name": "Returns a lob_credits_balance object.", + "id": "b9f0539b-3a68-4ada-be02-744bb310a5df", + "name": "Error", "originalRequest": { "url": { "path": [ - "accounts" + "snap_packs" ], "host": [ "{{baseUrl}}" ], - "query": [], + "query": [ + { + "key": "limit", + "value": "10" + }, + { + "key": "before", + "value": "" + }, + { + "key": "after", + "value": "" + }, + { + "key": "include", + "value": "" + }, + { + "key": "include", + "value": "" + }, + { + "key": "date_created[dolore09b]", + "value": "" + }, + { + "key": "date_created[ind8]", + "value": "" + }, + { + "key": "mail_type", + "value": "usps_first_class" + }, + { + "key": "date_created", + "value": "" + }, + { + "key": "send_date", + "value": "" + }, + { + "key": "campaign_id", + "value": "" + }, + { + "key": "status", + "value": "" + } + ], "variable": [] }, "header": [ @@ -19299,34 +21260,23 @@ "method": "GET", "body": {} }, - "status": "OK", - "code": 200, + "status": "Internal Server Error", + "code": 500, "header": [ { "key": "Content-Type", "value": "application/json" } ], - "body": "{\n \"balance\": 0\n}", + "body": "{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"to address not found\",\n \"status_code\": 404\n }\n}", "cookie": [], "_postman_previewlanguage": "json" } ], "event": [] - } - ], - "event": [] - }, - { - "id": "164cb0a6-050b-4140-8478-b3b36c897d46", - "name": "Snap Packs", - "description": { - "content": "", - "type": "text/plain" - }, - "item": [ + }, { - "id": "3bf9ee40-ad0d-4da4-9b4c-bdd47b5e8beb", + "id": "0d029d53-7468-4327-b1e7-87cb639c2342", "name": "Create", "request": { "name": "Create", @@ -19449,13 +21399,19 @@ "value": "", "type": "text", "description": "undefined" + }, + { + "key": "qr_code", + "value": "{\"position\":\"\",\"redirect_url\":\"\",\"width\":\"\",\"top\":\"\",\"right\":\"\",\"left\":\"\",\"bottom\":\"\",\"pages\":\"\",\"logo\":{\"url\":{\"value\":\"\"}},\"style\":{\"background_color\":{\"value\":\"\"},\"foreground_color\":{\"value\":\"\"}}}", + "type": "text", + "description": "undefined" } ] } }, "response": [ { - "id": "d756ef2d-ba2d-412f-86fa-56e4b247e636", + "id": "cc385c46-5330-405e-b26e-d4d5b2853d31", "name": "Returns a snap_pack object", "originalRequest": { "url": { @@ -19626,7 +21582,7 @@ "_postman_previewlanguage": "json" }, { - "id": "514b2f8e-f131-449a-a36d-b5ca657f4902", + "id": "39d4cf33-a1e6-4670-835a-e86720aba8b2", "name": "Error", "originalRequest": { "url": { @@ -19810,7 +21766,7 @@ ] }, "info": { - "_postman_id": "ab64dce5-56ab-43d6-a9c9-2a1ee2ef3b03", + "_postman_id": "b98a1e2a-ae63-4a7f-9f1c-a72ec240c3df", "name": "Lob", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "description": { diff --git a/docs/index.html b/docs/index.html index b8992beb..b6f9e47b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3007,7 +3007,7 @@ 55.627 l 55.6165,55.627 -231.245496,231.24803 c -127.185,127.1864 -231.5279,231.248 -231.873,231.248 -0.3451,0 -104.688, -104.0616 -231.873,-231.248 z - " fill="currentColor">

Lob (1.19.42)

Lob Developer Experience: lob-openapi@lob.com URL: https://support.lob.com/ License: MIT Terms of Service

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.

+ " fill="currentColor">

Lob (1.19.43)

Lob Developer Experience: lob-openapi@lob.com URL: https://support.lob.com/ License: MIT Terms of Service

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.

Introduction

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.

@@ -3268,7 +3268,7 @@

3. Learn more

Array of objects or null (tracking_event_normal)

An array of tracking_event objects ordered by ascending time. Will not be populated for postcards created in test mode.

campaign_id
string or null (campaign_id) ^(cmp|camp)_[a-zA-Z0-9]+$

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_.

use_type
string or null (psc_use_type)
Enum: "marketing" "operational" null

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.

-
fsc
boolean
Default: false

This is in beta. Contact support@lob.com or your account contact to learn more. Not available for 4x6 or A5 postcard sizes.

+
fsc
boolean
Default: false

This is in beta. Contact support@lob.com or your account contact to learn more. Not available for 4x6 or A5 postcard sizes.

status
string (status)
Enum: "processed" "rendered" "failed"

A string describing the PDF render status:

  • processed - the rendering process is currently in progress.
  • @@ -3363,7 +3363,7 @@

    3. Learn more

adr_id (string) or (address_editable_us (address obj with `name` defined (object) or address obj with `company` defined (object)))

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.

billing_group_id
string (billing_group_id)

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.

object (qr_code)

Customize and place a QR code on the creative at the required position.

-
fsc
boolean
Default: false

This is in beta. Contact support@lob.com or your account contact to learn more. Not available for 4x6 or A5 postcard sizes.

+
fsc
boolean
Default: false

This is in beta. Contact support@lob.com or your account contact to learn more. Not available for 4x6 or A5 postcard sizes.

Responses

Response Headers
ratelimit-limit
integer
Example: 150

The rate limit for a given endpoint.

ratelimit-remaining
integer
Example: 100

The number of requests remaining in the current window.

@@ -3393,7 +3393,7 @@

3. Learn more

Array of objects or null (tracking_event_normal)

An array of tracking_event objects ordered by ascending time. Will not be populated for postcards created in test mode.

campaign_id
string or null (campaign_id) ^(cmp|camp)_[a-zA-Z0-9]+$

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_.

use_type
string or null (psc_use_type)
Enum: "marketing" "operational" null

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.

-
fsc
boolean
Default: false

This is in beta. Contact support@lob.com or your account contact to learn more. Not available for 4x6 or A5 postcard sizes.

+
fsc
boolean
Default: false

This is in beta. Contact support@lob.com or your account contact to learn more. Not available for 4x6 or A5 postcard sizes.

status
string (status)
Enum: "processed" "rendered" "failed"

A string describing the PDF render status:

  • processed - the rendering process is currently in progress.
  • @@ -3424,7 +3424,7 @@

    3. Learn more

merge_variables
object or null (merge_variables) <= 25000 characters

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.

string or string (send_date)

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

-
size
string (self_mailer_size)
Default: "6x18_bifold"
Enum: "6x18_bifold" "11x9_bifold" "12x9_bifold" "17.75x9_trifold"

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.

+
size
string (self_mailer_size)
Default: "6x18_bifold"
Enum: "6x18_bifold" "11x9_bifold" "12x9_bifold" "17.75x9_trifold"

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.

Array of objects (thumbnail)
expected_delivery_date
string <date> (expected_delivery_date)

A date in YYYY-MM-DD format of the mailpiece's expected delivery date based on its send_date.

date_created
string <date-time> (date_created)

A timestamp in ISO 8601 format of the date the resource was created.

date_modified
string <date-time> (date_modified)

A timestamp in ISO 8601 format of the date the resource was last modified.

@@ -3435,7 +3435,7 @@

3. Learn more

inside_template_version_id
string or null^vrsn_[a-zA-Z0-9]+$

The unique ID of the specific version of the HTML template used for the inside of the self mailer.

object
string
Default: "self_mailer"
Value: "self_mailer"

Value is resource type.

Array of objects (tracking_event_certified)

An array of certified tracking events ordered by ascending time. Not populated in test mode.

-
fsc
boolean
Default: false

This is in beta. Contact support@lob.com or your account contact to learn more. Not available for 11x9_bifold self-mailer size.

+
fsc
boolean
Default: false

This is in beta. Contact support@lob.com or your account contact to learn more. Not available for 11x9_bifold self-mailer size.

status
string (status)
Enum: "processed" "rendered" "failed"

A string describing the PDF render status:

  • processed - the rendering process is currently in progress.
  • @@ -3526,11 +3526,11 @@

    3. Learn more

merge_variables
object or null (merge_variables) <= 25000 characters

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.

string or string (send_date)

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

-
size
string (self_mailer_size)
Default: "6x18_bifold"
Enum: "6x18_bifold" "11x9_bifold" "12x9_bifold" "17.75x9_trifold"

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.

+
size
string (self_mailer_size)
Default: "6x18_bifold"
Enum: "6x18_bifold" "11x9_bifold" "12x9_bifold" "17.75x9_trifold"

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.

adr_id (string) or (address_editable_us (address obj with `name` defined (object) or address obj with `company` defined (object)))

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.

billing_group_id
string (billing_group_id)

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.

object (qr_code)

Customize and place a QR code on the creative at the required position.

-
fsc
boolean
Default: false

This is in beta. Contact support@lob.com or your account contact to learn more. Not available for 11x9_bifold self-mailer size.

+
fsc
boolean
Default: false

This is in beta. Contact support@lob.com or your account contact to learn more. Not available for 11x9_bifold self-mailer size.

Responses

Response Headers
ratelimit-limit
integer
Example: 150

The rate limit for a given endpoint.

ratelimit-remaining
integer
Example: 100

The number of requests remaining in the current window.

@@ -3549,7 +3549,7 @@

3. Learn more

merge_variables
object or null (merge_variables) <= 25000 characters

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.

string or string (send_date)

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

-
size
string (self_mailer_size)
Default: "6x18_bifold"
Enum: "6x18_bifold" "11x9_bifold" "12x9_bifold" "17.75x9_trifold"

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.

+
size
string (self_mailer_size)
Default: "6x18_bifold"
Enum: "6x18_bifold" "11x9_bifold" "12x9_bifold" "17.75x9_trifold"

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.

Array of objects (thumbnail)
expected_delivery_date
string <date> (expected_delivery_date)

A date in YYYY-MM-DD format of the mailpiece's expected delivery date based on its send_date.

date_created
string <date-time> (date_created)

A timestamp in ISO 8601 format of the date the resource was created.

date_modified
string <date-time> (date_modified)

A timestamp in ISO 8601 format of the date the resource was last modified.

@@ -3560,7 +3560,7 @@

3. Learn more

inside_template_version_id
string or null^vrsn_[a-zA-Z0-9]+$

The unique ID of the specific version of the HTML template used for the inside of the self mailer.

object
string
Default: "self_mailer"
Value: "self_mailer"

Value is resource type.

Array of objects (tracking_event_certified)

An array of certified tracking events ordered by ascending time. Not populated in test mode.

-
fsc
boolean
Default: false

This is in beta. Contact support@lob.com or your account contact to learn more. Not available for 11x9_bifold self-mailer size.

+
fsc
boolean
Default: false

This is in beta. Contact support@lob.com or your account contact to learn more. Not available for 11x9_bifold self-mailer size.

status
string (status)
Enum: "processed" "rendered" "failed"

A string describing the PDF render status:

  • processed - the rendering process is currently in progress.
  • @@ -3614,7 +3614,7 @@

    3. Learn more

template_id
string^tmpl_[a-zA-Z0-9]+$

The unique ID of the HTML template used for the letter.

template_version_id
string^vrsn_[a-zA-Z0-9]+$

The unique ID of the specific version of the HTML template used for the letter.

campaign_id
string or null (campaign_id) ^(cmp|camp)_[a-zA-Z0-9]+$

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_.

-
fsc
boolean
Default: false

This is in beta. Contact support@lob.com or your account contact to learn more. Not available for A4 letter size.

+
fsc
boolean
Default: false

This is in beta. Contact support@lob.com or your account contact to learn more. Not available for A4 letter size.

status
string (status)
Enum: "processed" "rendered" "failed"

A string describing the PDF render status:

  • processed - the rendering process is currently in progress.
  • @@ -3721,7 +3721,7 @@

    3. Learn more

custom_envelope
string or null (user_provided) ^env_[a-zA-Z0-9]+$

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.

billing_group_id
string (billing_group_id)

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.

object (qr_code)

Customize and place a QR code on the creative at the required position.

-
fsc
boolean
Default: false

This is in beta. Contact support@lob.com or your account contact to learn more. Not available for A4 and us_legal letter size.

+
fsc
boolean
Default: false

This is in beta. Contact support@lob.com or your account contact to learn more. Not available for A4 and us_legal letter size.

size
string (ltr_size)
Default: "us_letter"
Enum: "us_letter" "us_legal"

Specifies the size of the letter. It accepts two values us_letter and us_legal. If the Lob-Version header 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.

Responses

template_id
string^tmpl_[a-zA-Z0-9]+$

The unique ID of the HTML template used for the letter.

template_version_id
string^vrsn_[a-zA-Z0-9]+$

The unique ID of the specific version of the HTML template used for the letter.

campaign_id
string or null (campaign_id) ^(cmp|camp)_[a-zA-Z0-9]+$

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_.

-
fsc
boolean
Default: false

This is in beta. Contact support@lob.com or your account contact to learn more. Not available for A4 letter size.

+
fsc
boolean
Default: false

This is in beta. Contact support@lob.com or your account contact to learn more. Not available for A4 letter size.

status
string (status)
Enum: "processed" "rendered" "failed"

A string describing the PDF render status:

  • processed - the rendering process is currently in progress.
  • @@ -3973,7 +3973,7 @@

    3. Learn more

inside_template_version_id
string or null^vrsn_[a-zA-Z0-9]+$

The unique ID of the specific version of the HTML template used for the inside of the snap pack.

object
string
Default: "snap_pack"
Value: "snap_pack"

Value is resource type.

Array of objects (tracking_event_normal)

An array of tracking events ordered by ascending time. Not populated in test mode.

-
fsc
boolean
Default: false

Contact support@lob.com or your account contact to learn more. Not available for snap_pack currently.

+
fsc
boolean
Default: false

Contact support@lob.com or your account contact to learn more. Not available for snap_pack currently.

status
string (status)
Enum: "processed" "rendered" "failed"

A string describing the PDF render status:

  • processed - the rendering process is currently in progress.
  • @@ -4091,7 +4091,7 @@

    3. Learn more

inside_template_version_id
string or null^vrsn_[a-zA-Z0-9]+$

The unique ID of the specific version of the HTML template used for the inside of the snap pack.

object
string
Default: "snap_pack"
Value: "snap_pack"

Value is resource type.

Array of objects (tracking_event_normal)

An array of tracking events ordered by ascending time. Not populated in test mode.

-
fsc
boolean
Default: false

Contact support@lob.com or your account contact to learn more. Not available for snap_pack currently.

+
fsc
boolean
Default: false

Contact support@lob.com or your account contact to learn more. Not available for snap_pack currently.

status
string (status)
Enum: "processed" "rendered" "failed"

A string describing the PDF render status:

  • processed - the rendering process is currently in progress.
  • @@ -4130,7 +4130,7 @@

    3. Learn more

campaign_id
string or null (campaign_id) ^(cmp|camp)_[a-zA-Z0-9]+$

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_.

size
string (booklet_size)
Default: "8.375x5.375"
Value: "8.375x5.375"

Specifies the size of the booklet.

pages
integer (booklet_pages)

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.

-
fsc
boolean
Default: false

This is in beta. Contact support@lob.com or your account contact to learn more.

+
fsc
boolean
Default: false

This is in beta. Contact support@lob.com or your account contact to learn more.

status
string (status)
Enum: "processed" "rendered" "failed"

A string describing the PDF render status:

  • processed - the rendering process is currently in progress.
  • @@ -4208,7 +4208,7 @@

    3. Learn more

string or string (send_date)

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

billing_group_id
string (billing_group_id)

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.

object (qr_code)

Customize and place a QR code on the creative at the required position.

-
fsc
boolean
Default: false

This is in beta. Contact support@lob.com or your account contact to learn more. Not available for A4 and us_legal letter size.

+
fsc
boolean
Default: false

This is in beta. Contact support@lob.com or your account contact to learn more. Not available for A4 and us_legal letter size.

source_material
string (booklet_source_material)
Default: "60# Gloss Text"
Value: "60# Gloss Text"

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.

Responses

Response Headers
ratelimit-limit
integer
Example: 150

The rate limit for a given endpoint.

@@ -4238,7 +4238,7 @@

3. Learn more

campaign_id
string or null (campaign_id) ^(cmp|camp)_[a-zA-Z0-9]+$

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_.

size
string (booklet_size)
Default: "8.375x5.375"
Value: "8.375x5.375"

Specifies the size of the booklet.

pages
integer (booklet_pages)

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.

-
fsc
boolean
Default: false

This is in beta. Contact support@lob.com or your account contact to learn more.

+
fsc
boolean
Default: false

This is in beta. Contact support@lob.com or your account contact to learn more.

status
string (status)
Enum: "processed" "rendered" "failed"

A string describing the PDF render status:

  • processed - the rendering process is currently in progress.
  • @@ -5316,7 +5316,9 @@

    Example Create Request using Sen

total_count
integer

Indicates the total number of records. Provided when the request specifies an "include" query parameter

Array of objects (response)

list of Informed Delivery campaigns

Response samples

Content type
application/json
{
  • "data": [
    • {
      },
    • {
      }
    ],
  • "object": "list",
  • "next_url": null,
  • "previous_url": null,
  • "count": 2
}

Create

Creates a new Informed Delivery campaign

+
https://api.lob.com/v1/informed_delivery_campaigns

Request samples

curl https://api.lob.com/v1/informed_delivery_campaign \
+  -u <YOUR API KEY>:
+

Response samples

Content type
application/json
{
  • "data": [
    • {
      },
    • {
      }
    ],
  • "object": "list",
  • "next_url": null,
  • "previous_url": null,
  • "count": 2
}

Create

Creates a new Informed Delivery campaign

Authorizations:
basicAuth
Request Body schema: multipart/form-data
quantity
required
integer [ 2 .. 10000000 ]

The number of mail pieces that will be part of this Informed Delivery campaign. USPS requires that IMB Codes are in sequence, so any mail pieces sent beyond this quantity will be rejected.

ride_along_image
required
object

JPG Image. Maximum file size is 200 KBs. Maximum pixel size is 300 pixels wide x 200 pixels high

ride_along_url
required
string [ 10 .. 255 ] characters ^https:\/\/.{5,247}$

To qualify as part of a promotion, the base domain must match the domain used to register the promotion. @@ -5362,7 +5364,7 @@

Example Create Request using Sen

service_request_number
required
string or null

The USPS promotion service request number used to create this campaign (if there was one used).

Request samples

curl --request POST \
+
https://api.lob.com/v1/informed_delivery_campaigns

Request samples

curl --request POST \
   --url https://api.lob.com/v1/informed_delivery_campaigns \
   -u <YOUR API KEY>: \
   --header 'Content-Type: multipart/form-data' \
@@ -5371,7 +5373,7 @@ 

Example Create Request using Sen --form quantity=2 \ --form start_date=2024-01-01 \ --form status=pending_approval -

Response samples

Content type
application/json
{
  • "id": "infd_234g5324g324g23",
  • "object": "informed_delivery_campaign",
  • "account_id": "xxxxxxxxxxxxxxxxxxxx",
  • "quantity": 20,
  • "usps_campaign_id": "1234567890",
  • "usps_title": "Campaign: 1a1a1a1a-9657-423b-b3c7-2",
  • "start_date": "2024-08-31T00:00:00.000Z",
  • "end_date": "2024-10-15T00:00:00.000Z",
  • "start_serial": 3183487,
  • "end_serial": 3183506,
  • "ride_along_url": "https://www.lob.com",
  • "representative_image_s3_link": null,
  • "status": "approved",
  • "date_created": "2024-08-30T23:30:02.980Z",
  • "date_modified": "2024-08-30T23:30:05.027Z",
  • "mode": "live",
  • "lob_campaign_id": null,
  • "deleted": false,
  • "campaign_code": "1a1a1a1a-9657-423b-b3c7-2+Code",
  • "brand_name": "Lob",
  • "service_request_number": null
}

Retrieve

Retrieves the details of an existing Informed Delivery campaign. You need only supply the usps_campaign_id returned in the campaign creation request.

+

Response samples

Content type
application/json
{
  • "id": "infd_234g5324g324g23",
  • "object": "informed_delivery_campaign",
  • "account_id": "xxxxxxxxxxxxxxxxxxxx",
  • "quantity": 20,
  • "usps_campaign_id": "1234567890",
  • "usps_title": "Campaign: 1a1a1a1a-9657-423b-b3c7-2",
  • "start_date": "2024-08-31T00:00:00.000Z",
  • "end_date": "2024-10-15T00:00:00.000Z",
  • "start_serial": 3183487,
  • "end_serial": 3183506,
  • "ride_along_url": "https://www.lob.com",
  • "representative_image_s3_link": null,
  • "status": "approved",
  • "date_created": "2024-08-30T23:30:02.980Z",
  • "date_modified": "2024-08-30T23:30:05.027Z",
  • "mode": "live",
  • "lob_campaign_id": null,
  • "deleted": false,
  • "campaign_code": "1a1a1a1a-9657-423b-b3c7-2+Code",
  • "brand_name": "Lob",
  • "service_request_number": null
}

Retrieve

Retrieves the details of an existing Informed Delivery campaign. You need only supply the usps_campaign_id returned in the campaign creation request.

Authorizations:
basicAuth
path Parameters
usps_campaign_id
required
string (usps_campaign_id) ^[0-9]+$
Example: 1200772869

usps_campaign_id of the Informed Delivery campaign

Responses

Response Schema: application/json
id
required
string (infd_id) ^infd_[a-zA-Z0-9]+$

Unique identifier prefixed with infd_.

@@ -5403,9 +5405,9 @@

Example Create Request using Sen

service_request_number
required
string or null

The USPS promotion service request number used to create this campaign (if there was one used).

Request samples

curl https://api.lob.com/v1/informed_delivery_campaign/1200772869 \
+
https://api.lob.com/v1/informed_delivery_campaigns/{usps_campaign_id}

Request samples

curl https://api.lob.com/v1/informed_delivery_campaign/1200772869 \
   -u <YOUR API KEY>:
-

Response samples

Content type
application/json
{
  • "id": "infd_234g5324g324g23",
  • "object": "informed_delivery_campaign",
  • "account_id": "xxxxxxxxxxxxxxxxxxxx",
  • "quantity": 20,
  • "usps_campaign_id": "1234567890",
  • "usps_title": "Campaign: 1a1a1a1a-9657-423b-b3c7-2",
  • "start_date": "2024-08-31T00:00:00.000Z",
  • "end_date": "2024-10-15T00:00:00.000Z",
  • "start_serial": 3183487,
  • "end_serial": 3183506,
  • "ride_along_url": "https://www.lob.com",
  • "representative_image_s3_link": null,
  • "status": "approved",
  • "date_created": "2024-08-30T23:30:02.980Z",
  • "date_modified": "2024-08-30T23:30:05.027Z",
  • "mode": "live",
  • "lob_campaign_id": null,
  • "deleted": false,
  • "campaign_code": "1a1a1a1a-9657-423b-b3c7-2+Code",
  • "brand_name": "Lob",
  • "service_request_number": null
}

Update

Update the details of an existing Informed Delivery campaign.
NOTE: you can only update a campaign in the pending_approval status.

+

Response samples

Content type
application/json
{
  • "id": "infd_234g5324g324g23",
  • "object": "informed_delivery_campaign",
  • "account_id": "xxxxxxxxxxxxxxxxxxxx",
  • "quantity": 20,
  • "usps_campaign_id": "1234567890",
  • "usps_title": "Campaign: 1a1a1a1a-9657-423b-b3c7-2",
  • "start_date": "2024-08-31T00:00:00.000Z",
  • "end_date": "2024-10-15T00:00:00.000Z",
  • "start_serial": 3183487,
  • "end_serial": 3183506,
  • "ride_along_url": "https://www.lob.com",
  • "representative_image_s3_link": null,
  • "status": "approved",
  • "date_created": "2024-08-30T23:30:02.980Z",
  • "date_modified": "2024-08-30T23:30:05.027Z",
  • "mode": "live",
  • "lob_campaign_id": null,
  • "deleted": false,
  • "campaign_code": "1a1a1a1a-9657-423b-b3c7-2+Code",
  • "brand_name": "Lob",
  • "service_request_number": null
}

Update

Update the details of an existing Informed Delivery campaign.
NOTE: you can only update a campaign in the pending_approval status.

Authorizations:
basicAuth
path Parameters
usps_campaign_id
required
string (usps_campaign_id) ^[0-9]+$
Example: 1200772869

usps_campaign_id of the Informed Delivery campaign

Request Body schema: multipart/form-data
quantity
integer [ 2 .. 10000000 ]

The number of mail pieces that will be part of this Informed Delivery campaign. USPS requires that IMB Codes are in sequence, so any mail pieces sent beyond this quantity will be rejected.

status
string
Value: "approved"

After setting an Informed Delivery campaign to “approved” said campaign will activate, and you can start sending mail using it. @@ -5452,10 +5454,10 @@

Example Create Request using Sen

Request samples

curl -X PATCH https://api.lob.com/v1/creatives/crv_2a3b096c409b32c \
+
https://api.lob.com/v1/informed_delivery_campaigns/{usps_campaign_id}

Request samples

curl -X PATCH https://api.lob.com/v1/creatives/crv_2a3b096c409b32c \
   -u <YOUR API KEY>: \
   -d '{"status":"approved"}'
-

Response samples

Content type
application/json
{
  • "id": "infd_234g5324g324g23",
  • "object": "informed_delivery_campaign",
  • "account_id": "xxxxxxxxxxxxxxxxxxxx",
  • "quantity": 20,
  • "usps_campaign_id": "1234567890",
  • "usps_title": "Campaign: 1a1a1a1a-9657-423b-b3c7-2",
  • "start_date": "2024-08-31T00:00:00.000Z",
  • "end_date": "2024-10-15T00:00:00.000Z",
  • "start_serial": 3183487,
  • "end_serial": 3183506,
  • "ride_along_url": "https://www.lob.com",
  • "representative_image_s3_link": null,
  • "status": "approved",
  • "date_created": "2024-08-30T23:30:02.980Z",
  • "date_modified": "2024-08-30T23:30:05.027Z",
  • "mode": "live",
  • "lob_campaign_id": null,
  • "deleted": false,
  • "campaign_code": "1a1a1a1a-9657-423b-b3c7-2+Code",
  • "brand_name": "Lob",
  • "service_request_number": null
}

US Verifications

Validate, automatically correct, and standardize the addresses in your +

Response samples

Content type
application/json
{
  • "id": "infd_234g5324g324g23",
  • "object": "informed_delivery_campaign",
  • "account_id": "xxxxxxxxxxxxxxxxxxxx",
  • "quantity": 20,
  • "usps_campaign_id": "1234567890",
  • "usps_title": "Campaign: 1a1a1a1a-9657-423b-b3c7-2",
  • "start_date": "2024-08-31T00:00:00.000Z",
  • "end_date": "2024-10-15T00:00:00.000Z",
  • "start_serial": 3183487,
  • "end_serial": 3183506,
  • "ride_along_url": "https://www.lob.com",
  • "representative_image_s3_link": null,
  • "status": "approved",
  • "date_created": "2024-08-30T23:30:02.980Z",
  • "date_modified": "2024-08-30T23:30:05.027Z",
  • "mode": "live",
  • "lob_campaign_id": null,
  • "deleted": false,
  • "campaign_code": "1a1a1a1a-9657-423b-b3c7-2+Code",
  • "brand_name": "Lob",
  • "service_request_number": null
}

US Verifications

Validate, automatically correct, and standardize the addresses in your address book based on USPS's Coding Accuracy Support System (CASS).

@@ -5557,7 +5559,7 @@

Example Create Request using Sen

Response Schema: application/json
required
Array of us_verification (object) or error (object)
errors
required
boolean

Indicates whether any errors occurred during the verification process.

Request samples

Content type
{
  • "addresses": [
    • {
      },
    • {
      }
    ]
}

Response samples

Content type
application/json
{
  • "addresses": [
    • {
      }
    ],
  • "errors": false
}

Single Verify

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 for details.

+
https://api.lob.com/v1/bulk/us_verifications

Request samples

Content type
{
  • "addresses": [
    • {
      },
    • {
      }
    ]
}

Response samples

Content type
application/json
{
  • "addresses": [
    • {
      }
    ],
  • "errors": false
}

Single Verify

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 for details.

Authorizations:
basicAuth
query Parameters
case
string
Default: "upper"
Enum: "upper" "proper"

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.

Request Body schema:
One of
Any of
city
required
string <= 200 characters

The name of the city. city and state are required if no zip_code is passed.

state
required
string <= 50 characters

The ISO 3166-2 two letter code or subdivision name for the state. city and state are required if no zip_code is passed.

@@ -5623,7 +5625,7 @@

Example Create Request using Sen

object
string
Default: "us_verification"
Value: "us_verification"

Value is resource type.

Request samples

Content type
Example
{
  • "primary_line": "210 King Street",
  • "city": "San Francisco",
  • "state": "CA",
  • "zip_code": "94107"
}

Response samples

Content type
application/json
Example
{
  • "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": [
      ],
    • "ews_match": false,
    • "lacs_indicator": "",
    • "lacs_return_code": "",
    • "suite_return_code": ""
    },
  • "lob_confidence_score": {
    • "score": 100,
    • "level": "high"
    },
  • "object": "us_verification"
}

US Verification Types

These are detailed definitions for various fields in the US verification object.

+
https://api.lob.com/v1/us_verifications

Request samples

Content type
Example
{
  • "primary_line": "210 King Street",
  • "city": "San Francisco",
  • "state": "CA",
  • "zip_code": "94107"
}

Response samples

Content type
application/json
Example
{
  • "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": [
      ],
    • "ews_match": false,
    • "lacs_indicator": "",
    • "lacs_return_code": "",
    • "suite_return_code": ""
    },
  • "lob_confidence_score": {
    • "score": 100,
    • "level": "high"
    },
  • "object": "us_verification"
}

US Verification Types

These are detailed definitions for various fields in the US verification object.

ZIP Code Types - components[zip_code_type]

@@ -5828,7 +5830,7 @@

DPV Footnotes - deliverability_analysis[dpv_footnotes]

object
string
Default: "us_autocompletion"
Value: "us_autocompletion"

Value is resource type.

Request samples

Content type
Example
{
  • "address_prefix": "185 B",
  • "city": "San Francisco",
  • "state": "CA",
  • "zip_code": "94107",
  • "geo_ip_sort": false
}

Response samples

Content type
application/json
Example
{
  • "id": "us_auto_a3ac97bcfbb2460ab20c",
  • "suggestions": [
    • {
      },
    • {
      },
    • {
      },
    • {
      },
    • {
      },
    • {
      },
    • {
      }
    ],
  • "object": "us_autocompletion"
}

Reverse Geocode Lookups

Find a list of zip codes associated with a valid US location via latitude and longitude.

+
https://api.lob.com/v1/us_autocompletions

Request samples

Content type
Example
{
  • "address_prefix": "185 B",
  • "city": "San Francisco",
  • "state": "CA",
  • "zip_code": "94107",
  • "geo_ip_sort": false
}

Response samples

Content type
application/json
Example
{
  • "id": "us_auto_a3ac97bcfbb2460ab20c",
  • "suggestions": [
    • {
      },
    • {
      },
    • {
      },
    • {
      },
    • {
      },
    • {
      },
    • {
      }
    ],
  • "object": "us_autocompletion"
}

Reverse Geocode Lookups

Find a list of zip codes associated with a valid US location via latitude and longitude.

Reverse Geocode Lookup

Reverse geocode a valid US location with a live API key.

Authorizations:
basicAuth
query Parameters
size
integer [ 1 .. 50 ]
Default: 5
Example: size=5

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.

Request Body schema:
latitude
required
number or null <float> [ -90 .. 90 ]

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.

@@ -5842,7 +5844,7 @@

DPV Footnotes - deliverability_analysis[dpv_footnotes]

object
string
Default: "us_reverse_geocode_lookup"
Value: "us_reverse_geocode_lookup"

Value is resource type.

Request samples

Content type
{
  • "latitude": 37.7749,
  • "longitude": 122.4194
}

Response samples

Content type
application/json
{
  • "id": "us_reverse_geocode_8a013f3e",
  • "addresses": [
    • {
      },
    • {
      }
    ]
}

Zip Lookups

Find a list of cities, states and associated information about a US ZIP code.

+
https://api.lob.com/v1/us_reverse_geocode_lookups

Request samples

Content type
{
  • "latitude": 37.7749,
  • "longitude": 122.4194
}

Response samples

Content type
application/json
{
  • "id": "us_reverse_geocode_8a013f3e",
  • "addresses": [
    • {
      },
    • {
      }
    ]
}

Zip Lookups

Find a list of cities, states and associated information about a US ZIP code.

Lookups

Returns information about a ZIP code

Authorizations:
basicAuth
Request Body schema:
zip_code
required
string^\d{5}$

A 5-digit ZIP code.

Responses

object
required
string
Default: "us_zip_lookup"
Value: "us_zip_lookup"

Value is resource type.

Request samples

Content type
{
  • "zip_code": "94107"
}

Response samples

Content type
application/json
{
  • "id": "us_zip_c7cb63d68f8d6",
  • "cities": [
    • {
      }
    ],
  • "zip_code_type": "standard",
  • "object": "us_zip_lookup",
  • "zip_code": "94107"
}

Identity Validation

Validates whether a given name is associated with an address.

+
https://api.lob.com/v1/us_zip_lookups

Request samples

Content type
{
  • "zip_code": "94107"
}

Response samples

Content type
application/json
{
  • "id": "us_zip_c7cb63d68f8d6",
  • "cities": [
    • {
      }
    ],
  • "zip_code_type": "standard",
  • "object": "us_zip_lookup",
  • "zip_code": "94107"
}

Identity Validation

Validates whether a given name is associated with an address.

Identity Validation

Validates whether a given name is associated with an address.

Authorizations:
basicAuth
Request Body schema:
One of
Any of
city
required
string <= 200 characters

The name of the city. city and state are required if no zip_code is passed.

@@ -5918,7 +5920,7 @@

DPV Footnotes - deliverability_analysis[dpv_footnotes]

object
string
Default: "id_validation"
Value: "id_validation"

Value is resource type.

Request samples

Content type
{
  • "recipient": "Larry Lobster",
  • "primary_line": "210 King St.",
  • "secondary_line": "",
  • "city": "San Francisco",
  • "state": "CA",
  • "zip_code": "94107"
}

Response samples

Content type
application/json
{
  • "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

Address autocompletion for non-US addresses. Given partial address information, this endpoint returns up to 10 address suggestions.

+
https://api.lob.com/v1/identity_validation

Request samples

Content type
{
  • "recipient": "Larry Lobster",
  • "primary_line": "210 King St.",
  • "secondary_line": "",
  • "city": "San Francisco",
  • "state": "CA",
  • "zip_code": "94107"
}

Response samples

Content type
application/json
{
  • "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

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 return predetermined values. When address_prefix is set to:

@@ -5954,7 +5956,7 @@

DPV Footnotes - deliverability_analysis[dpv_footnotes]

Array of objects (intl_suggestions) [ 0 .. 10 ] items

An array of objects representing suggested addresses.

Request samples

Content type
Example
{
  • "address_prefix": "340 Wat",
  • "city": "Summerside",
  • "state": "Prince Edward Island",
  • "zip_code": "C1N 1C4",
  • "country": "CA",
  • "geo_ip_sort": false
}

Response samples

Content type
application/json
Example
{
  • "id": "intl_auto_a3ac97bcfbb2460ab20c",
  • "suggestions": [
    • {
      },
    • {
      },
    • {
      },
    • {
      },
    • {
      },
    • {
      },
    • {
      },
    • {
      },
    • {
      },
    • {
      }
    ],
  • "object": "intl_autocompletion"
}

Intl Verifications

Address verification for non-US addresses +

https://api.lob.com/v1/intl_autocompletions

Request samples

Content type
Example
{
  • "address_prefix": "340 Wat",
  • "city": "Summerside",
  • "state": "Prince Edward Island",
  • "zip_code": "C1N 1C4",
  • "country": "CA",
  • "geo_ip_sort": false
}

Response samples

Content type
application/json
Example
{
  • "id": "intl_auto_a3ac97bcfbb2460ab20c",
  • "suggestions": [
    • {
      },
    • {
      },
    • {
      },
    • {
      },
    • {
      },
    • {
      },
    • {
      },
    • {
      },
    • {
      },
    • {
      }
    ],
  • "object": "intl_autocompletion"
}

Intl Verifications

Address verification for non-US addresses

@@ -6000,7 +6002,7 @@

DPV Footnotes - deliverability_analysis[dpv_footnotes]

Response Schema: application/json
required
Array of intl_verification (object) or error (object)
errors
required
boolean

Indicates whether any errors occurred during the verification process.

Request samples

Content type
{
  • "addresses": [
    • {
      },
    • {
      }
    ]
}

Response samples

Content type
application/json
{
  • "addresses": [
    • {
      }
    ],
  • "errors": false
}

Single Verify

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.

+
https://api.lob.com/v1/bulk/intl_verifications

Request samples

Content type
{
  • "addresses": [
    • {
      },
    • {
      }
    ]
}

Response samples

Content type
application/json
{
  • "addresses": [
    • {
      }
    ],
  • "errors": false
}

Single Verify

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.

Authorizations:
basicAuth
header Parameters
x-lang-output
string
Enum: "native" "match"
  • native - Translate response to the native language of the country in the request
  • match - match the response to the language in the request
  • @@ -6065,7 +6067,7 @@

    DPV Footnotes - deliverability_analysis[dpv_footnotes]

object
string
Default: "intl_verification"
Value: "intl_verification"

Value is resource type.

Request samples

Content type
Example
{
  • "recipient": "Harry Zhang",
  • "primary_line": "370 Water St",
  • "secondary_line": "",
  • "city": "Summerside",
  • "state": "Prince Edward Island",
  • "postal code": "C1N 1C4",
  • "country": "CA"
}

Response samples

Content type
application/json
Example
{
  • "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"
}

Webhooks

Webhooks are an easy way to get notifications on events happening asynchronously +

https://api.lob.com/v1/intl_verifications

Request samples

Content type
Example
{
  • "recipient": "Harry Zhang",
  • "primary_line": "370 Water St",
  • "secondary_line": "",
  • "city": "Summerside",
  • "state": "Prince Edward Island",
  • "postal code": "C1N 1C4",
  • "country": "CA"
}

Response samples

Content type
application/json
Example
{
  • "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"
}

Webhooks

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 @@ -6094,6 +6096,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 @@ -6174,6 +6181,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 @@ -6255,6 +6267,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 @@ -6412,6 +6429,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 @@ -6521,7 +6543,7 @@

Bank Accounts

reference_id
required
string

Unique identifier of the related resource for the event.

required
object (event_type)
date_created
required
string <date-time> (date_created)

A timestamp in ISO 8601 format of the date the resource was created.

object
required
string
Default: "event"
Value: "event"

Value is resource type.

-

Response samples

Content type
application/json
{}

Tracking Events

As mailpieces travel through the mail stream, USPS scans their unique barcodes, and Lob processes these mail scans to generate tracking events.

+

Response samples

Content type
application/json
{}

Tracking Events

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 @@ -6746,7 +6768,7 @@

Certified Tracking Event Details

time
string <date-time>

A timestamp in ISO 8601 format of the date USPS registered the event.

details
object or null
Value: null

Will be null for type=normal events

location
string or null

The zip code in which the scan event occurred. Null for Mailed events.

-

Response samples

Content type
application/json
Example
{
  • "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"
}

Billing Groups

The Billing Groups API allows you to create and view labels that can be attached to certain consumption-based +

Response samples

Content type
application/json
Example
{
  • "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"
}

Billing Groups

The Billing Groups API allows you to create and view labels that can be attached to certain consumption-based usages of Letters, Checks, Postcards and Self-Mailers to customize your bill. Please check each resource API section to learn more about how to access the Billing Groups API.

@@ -6761,9 +6783,9 @@

Certified Tracking Event Details

object
string
Default: "billing_group"
Value: "billing_group"

Value is resource type.

Request samples

curl https://api.lob.com/v1/billing_groups/bg_4bb02b527a72667d0 \
+
https://api.lob.com/v1/billing_groups/{bg_id}

Request samples

curl https://api.lob.com/v1/billing_groups/bg_4bb02b527a72667d0 \
 -u <YOUR API KEY>:
-

Response samples

Content type
application/json
{
  • "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"
}

Update

Updates all editable attributes of the billing_group with the given id.

+

Response samples

Content type
application/json
{
  • "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"
}

Update

Updates all editable attributes of the billing_group with the given id.

Authorizations:
basicAuth
path Parameters
bg_id
required
string (bg_id) ^bg_[a-zA-Z0-9]+$

id of the billing_group

Request Body schema:
description
string (bg_description) <= 255 characters

Description of the billing group.

name
string (name) <= 255 characters

Name of the billing group.

@@ -6779,7 +6801,7 @@

Certified Tracking Event Details

object
string
Default: "billing_group"
Value: "billing_group"

Value is resource type.

Request samples

Content type
{
  • "name": "Marketing Dept",
  • "description": "Usage group used for the Marketing Dept resource sends"
}

Response samples

Content type
application/json
{
  • "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"
}

List

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.

+
https://api.lob.com/v1/billing_groups/{bg_id}

Request samples

Content type
{
  • "name": "Marketing Dept",
  • "description": "Usage group used for the Marketing Dept resource sends"
}

Response samples

Content type
application/json
{
  • "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"
}

List

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.

Authorizations:
basicAuth
query Parameters
limit
integer [ 1 .. 100 ]
Default: 10
Example: limit=10

How many results to return.

offset
integer
Default: 0

An integer that designates the offset at which to begin returning results. Defaults to 0.

include
Array of strings

Request that the response include the total count by specifying include=["total_count"].

@@ -6795,9 +6817,9 @@

Certified Tracking Event Details

Array of objects (billing_group)

list of billing_groups

Request samples

curl -X GET "https://api.lob.com/v1/billing_groups?limit=2" \
+
https://api.lob.com/v1/billing_groups

Request samples

curl -X GET "https://api.lob.com/v1/billing_groups?limit=2" \
 -u <YOUR API KEY>:
-

Response samples

Content type
application/json
{
  • "data": [
    • {
      },
    • {
      }
    ],
  • "object": "list",
  • "next_url": null,
  • "prev_url": null,
  • "count": 2
}

Create

Creates a new billing_group with the provided properties.

+

Response samples

Content type
application/json
{
  • "data": [
    • {
      },
    • {
      }
    ],
  • "object": "list",
  • "next_url": null,
  • "prev_url": null,
  • "count": 2
}

Create

Creates a new billing_group with the provided properties.

Authorizations:
basicAuth
Request Body schema:
name
required
string (name) <= 255 characters

Name of the billing group.

description
string (bg_description) <= 255 characters

Description of the billing group.

Responses

object
string
Default: "billing_group"
Value: "billing_group"

Value is resource type.

Request samples

Content type
{
  • "name": "Marketing Dept",
  • "description": "Usage group used for the Marketing Dept resource sends"
}

Response samples

Content type
application/json
{
  • "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"
}

Buckslips

The Buckslips endpoint allows you to easily create buckslips that can later be used as add-ons for Letters Campaigns. Note that a Letter Campaign with Buckslip add-on requires a minimum send quantity of 5,000 letters. +

https://api.lob.com/v1/billing_groups

Request samples

Content type
{
  • "name": "Marketing Dept",
  • "description": "Usage group used for the Marketing Dept resource sends"
}

Response samples

Content type
application/json
{
  • "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"
}

Buckslips

The Buckslips endpoint allows you to easily create buckslips that can later be used as add-ons for Letters Campaigns. Note that a Letter Campaign with Buckslip add-on requires a minimum send quantity of 5,000 letters. The API provides endpoints for creating buckslips, retrieving individual buckslips, creating buckslip orders, and retrieving a list of buckslips.

List

Returns a list of your buckslips. The buckslips are returned sorted by creation date, with the most recently created buckslips appearing first.

@@ -6828,9 +6850,9 @@

Certified Tracking Event Details

Array of objects (buckslip)

list of buckslips

Request samples

curl -X GET "https://api.lob.com/v1/buckslips?limit=2" \
+
https://api.lob.com/v1/buckslips

Request samples

curl -X GET "https://api.lob.com/v1/buckslips?limit=2" \
   -u <YOUR API KEY>:
-

Response samples

Content type
application/json
{}

Create

Creates a new buckslip given information

+

Response samples

Content type
application/json
{}

Create

Creates a new buckslip given information

Authorizations:
basicAuth
Request Body schema:
required
remote_file_url (string) or local_file_path (string)

A PDF template for the front of the buckslip

description
string or null (buckslip_description) <= 255 characters

Description of the buckslip.

size
string
Default: "8.75x3.75"
Value: "8.75x3.75"

The size of the buckslip

@@ -6858,7 +6880,7 @@

Certified Tracking Event Details

size
string
Default: "8.75x3.75"
Value: "8.75x3.75"

The size of the buckslip

Request samples

Content type

Response samples

Content type
application/json
{}

Retrieve

Retrieves the details of an existing buckslip. You need only supply the unique customer identifier that was returned upon buckslip creation.

+
https://api.lob.com/v1/buckslips

Request samples

Content type

Response samples

Content type
application/json
{}

Retrieve

Retrieves the details of an existing buckslip. You need only supply the unique customer identifier that was returned upon buckslip creation.

Authorizations:
basicAuth
path Parameters
buckslip_id
required
string (buckslip_id) ^bck_[a-zA-Z0-9]+$

id of the buckslip

Responses

Response Schema: application/json
date_created
required
string <date-time> (date_created)

A timestamp in ISO 8601 format of the date the resource was created.

@@ -6883,9 +6905,9 @@

Certified Tracking Event Details

size
string
Default: "8.75x3.75"
Value: "8.75x3.75"

The size of the buckslip

Request samples

curl https://api.lob.com/v1/buckslips/bck_7a6d73c5c8457fc \
+
https://api.lob.com/v1/buckslips/{buckslip_id}

Request samples

curl https://api.lob.com/v1/buckslips/bck_7a6d73c5c8457fc \
   -u <YOUR API KEY>:
-

Response samples

Content type
application/json
{}

Update

Update the details of an existing buckslip. You need only supply the unique identifier that was returned upon buckslip creation.

+

Response samples

Content type
application/json
{}

Update

Update the details of an existing buckslip. You need only supply the unique identifier that was returned upon buckslip creation.

Authorizations:
basicAuth
path Parameters
buckslip_id
required
string (buckslip_id) ^bck_[a-zA-Z0-9]+$

id of the buckslip

Request Body schema:
description
string or null (buckslip_description) <= 255 characters

Description of the buckslip.

auto_reorder
boolean

Allows for auto reordering

@@ -6913,16 +6935,16 @@

Certified Tracking Event Details

size
string
Default: "8.75x3.75"
Value: "8.75x3.75"

The size of the buckslip

Request samples

Content type
{
  • "description": "Test buckslip",
  • "auto_reorder": true
}

Response samples

Content type
application/json
{}

Delete

Delete an existing buckslip. You need only supply the unique identifier that was returned upon buckslip creation.

+
https://api.lob.com/v1/buckslips/{buckslip_id}

Request samples

Content type
{
  • "description": "Test buckslip",
  • "auto_reorder": true
}

Response samples

Content type
application/json
{}

Delete

Delete an existing buckslip. You need only supply the unique identifier that was returned upon buckslip creation.

Authorizations:
basicAuth
path Parameters
buckslip_id
required
string (buckslip_id) ^bck_[a-zA-Z0-9]+$

id of the buckslip

Responses

Response Schema: application/json
id
string (buckslip_id) ^bck_[a-zA-Z0-9]+$

Unique identifier prefixed with bck_.

deleted
boolean (deleted)

Only returned if the resource has been successfully deleted.

Request samples

curl -X DELETE https://api.lob.com/v1/buckslips/bck_7a6d73c5c8457fc \
+
https://api.lob.com/v1/buckslips/{buckslip_id}

Request samples

curl -X DELETE https://api.lob.com/v1/buckslips/bck_7a6d73c5c8457fc \
   -u <YOUR API KEY>:
-

Response samples

Content type
application/json
{
  • "id": "buckslip_123456789",
  • "deleted": true
}

Buckslip Orders

The Buckslip Orders endpoint allows you to easily create buckslip orders for existing buckslips. +

Response samples

Content type
application/json
{
  • "id": "buckslip_123456789",
  • "deleted": true
}

Buckslip Orders

The Buckslip Orders endpoint allows you to easily create buckslip orders for existing buckslips. The API provides endpoints for creating buckslip orders and listing buckslip orders for a given buckslip.

Retrieve

Retrieves the buckslip orders associated with the given buckslip id.

@@ -6938,9 +6960,9 @@

Certified Tracking Event Details

Array of objects (buckslip_order)

List of buckslip orders

Request samples

curl https://api.lob.com/v1/buckslips/bck_6afffd19045076c/orders/ \
+
https://api.lob.com/v1/buckslips/{buckslip_id}/orders

Request samples

curl https://api.lob.com/v1/buckslips/bck_6afffd19045076c/orders/ \
   -u <YOUR API KEY>:
-

Response samples

Content type
application/json
{
  • "data": [
    • {
      }
    ],
  • "object": "list",
  • "next_url": null,
  • "previous_url": null,
  • "count": 1
}

Create

Creates a new buckslip order given information

+

Response samples

Content type
application/json
{
  • "data": [
    • {
      }
    ],
  • "object": "list",
  • "next_url": null,
  • "previous_url": null,
  • "count": 1
}

Create

Creates a new buckslip order given information

Authorizations:
basicAuth
path Parameters
buckslip_id
required
string (buckslip_id) ^bck_[a-zA-Z0-9]+$

The ID of the buckslip to which the buckslip orders belong.

Request Body schema:
quantity
required
integer [ 5000 .. 10000000 ]

The quantity of buckslips in the order (minimum 5,000).

Responses

expected_availability_date
string <date-time>

The fixed deadline for the buckslips to be printed.

Request samples

Content type
{
  • "quantity": 10000
}

Response samples

Content type
application/json
{
  • "id": "bo_e0f8a0562a06bea7f",
  • "buckslip_id": "bck_6afffd19045076c",
  • "status": "available",
  • "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": "buckslip_order"
}

Cards

The cards endpoint allows you to easily create cards that can later be affixed to Letters. +

https://api.lob.com/v1/buckslips/{buckslip_id}/orders

Request samples

Content type
{
  • "quantity": 10000
}

Response samples

Content type
application/json
{
  • "id": "bo_e0f8a0562a06bea7f",
  • "buckslip_id": "bck_6afffd19045076c",
  • "status": "available",
  • "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": "buckslip_order"
}

Cards

The cards endpoint allows you to easily create cards that can later be affixed to Letters. The API provides endpoints for creating cards, retrieving individual cards, creating card orders, and retrieving a list of cards.

List

Returns a list of your cards. The cards are returned sorted by creation date, with the most recently created addresses appearing first.

@@ -6975,9 +6997,9 @@

Certified Tracking Event Details

Array of objects (card)

list of cards

Request samples

curl -X GET "https://api.lob.com/v1/cards?limit=2" \
+
https://api.lob.com/v1/cards

Request samples

curl -X GET "https://api.lob.com/v1/cards?limit=2" \
   -u <YOUR API KEY>:
-

Response samples

Content type
application/json
{}

Create

Creates a new card given information

+

Response samples

Content type
application/json
{}

Create

Creates a new card given information

Authorizations:
basicAuth
Request Body schema:
required
remote_file_url (string) or local_file_path (string)

A PDF template for the front of the card

description
string or null (card_description) <= 255 characters

Description of the card.

size
string
Default: "2.125x3.375"
Enum: "3.375x2.125" "2.125x3.375"

The size of the card

@@ -7002,7 +7024,7 @@

Certified Tracking Event Details

size
string
Default: "2.125x3.375"
Enum: "3.375x2.125" "2.125x3.375"

The size of the card

Request samples

Content type

Response samples

Content type
application/json
{}

Retrieve

Retrieves the details of an existing card. You need only supply the unique customer identifier that was returned upon card creation.

+
https://api.lob.com/v1/cards

Request samples

Content type

Response samples

Content type
application/json
{}

Retrieve

Retrieves the details of an existing card. You need only supply the unique customer identifier that was returned upon card creation.

Authorizations:
basicAuth
path Parameters
card_id
required
string (card_id) ^card_[a-zA-Z0-9]+$

id of the card

Responses

Response Schema: application/json
date_created
required
string <date-time> (date_created)

A timestamp in ISO 8601 format of the date the resource was created.

@@ -7024,9 +7046,9 @@

Certified Tracking Event Details

size
string
Default: "2.125x3.375"
Enum: "3.375x2.125" "2.125x3.375"

The size of the card

Request samples

curl https://api.lob.com/v1/cards/card_7a6d73c5c8457fc \
+
https://api.lob.com/v1/cards/{card_id}

Request samples

curl https://api.lob.com/v1/cards/card_7a6d73c5c8457fc \
   -u <YOUR API KEY>:
-

Response samples

Content type
application/json
{}

Update

Update the details of an existing card. You need only supply the unique identifier that was returned upon card creation.

+

Response samples

Content type
application/json
{}

Update

Update the details of an existing card. You need only supply the unique identifier that was returned upon card creation.

Authorizations:
basicAuth
path Parameters
card_id
required
string (card_id) ^card_[a-zA-Z0-9]+$

id of the card

Request Body schema:
description
string or null (card_description) <= 255 characters

Description of the card.

auto_reorder
boolean

Allows for auto reordering

@@ -7051,16 +7073,16 @@

Certified Tracking Event Details

size
string
Default: "2.125x3.375"
Enum: "3.375x2.125" "2.125x3.375"

The size of the card

Request samples

Content type
{
  • "description": "Test card",
  • "auto_reorder": true
}

Response samples

Content type
application/json
{}

Delete

Delete an existing card. You need only supply the unique identifier that was returned upon card creation.

+
https://api.lob.com/v1/cards/{card_id}

Request samples

Content type
{
  • "description": "Test card",
  • "auto_reorder": true
}

Response samples

Content type
application/json
{}

Delete

Delete an existing card. You need only supply the unique identifier that was returned upon card creation.

Authorizations:
basicAuth
path Parameters
card_id
required
string (card_id) ^card_[a-zA-Z0-9]+$

id of the card

Responses

Response Schema: application/json
id
string (card_id) ^card_[a-zA-Z0-9]+$

Unique identifier prefixed with card_.

deleted
boolean (deleted)

Only returned if the resource has been successfully deleted.

Request samples

curl -X DELETE https://api.lob.com/v1/cards/card_7a6d73c5c8457fc \
+
https://api.lob.com/v1/cards/{card_id}

Request samples

curl -X DELETE https://api.lob.com/v1/cards/card_7a6d73c5c8457fc \
   -u <YOUR API KEY>:
-

Response samples

Content type
application/json
{
  • "id": "card_123456789",
  • "deleted": true
}

Card Orders

The card orders endpoint allows you to easily create card orders for existing cards. +

Response samples

Content type
application/json
{
  • "id": "card_123456789",
  • "deleted": true
}

Card Orders

The card orders endpoint allows you to easily create card orders for existing cards. The API provides endpoints for creating card orders and listing card orders for a given card.

Retrieve

Retrieves the card orders associated with the given card id.

@@ -7076,9 +7098,9 @@

Certified Tracking Event Details

Array of objects (card_order)

List of card orders

Request samples

curl https://api.lob.com/v1/cards/card_6afffd19045076c/orders/ \
+
https://api.lob.com/v1/cards/{card_id}/orders

Request samples

curl https://api.lob.com/v1/cards/card_6afffd19045076c/orders/ \
   -u <YOUR API KEY>:
-

Response samples

Content type
application/json
{
  • "data": [
    • {
      }
    ],
  • "object": "list",
  • "next_url": null,
  • "previous_url": null,
  • "count": 1
}

Create

Creates a new card order given information

+

Response samples

Content type
application/json
{
  • "data": [
    • {
      }
    ],
  • "object": "list",
  • "next_url": null,
  • "previous_url": null,
  • "count": 1
}

Create

Creates a new card order given information

Authorizations:
basicAuth
path Parameters
card_id
required
string (card_id) ^card_[a-zA-Z0-9]+$

The ID of the card to which the card orders belong.

Request Body schema:
quantity
required
integer [ 10000 .. 10000000 ]

The quantity of cards in the order (minimum 10,000).

Responses

expected_availability_date
string <date-time>

The fixed deadline for the cards to be printed.

Request samples

Content type
{
  • "quantity": 10000
}

Response samples

Content type
application/json
{
  • "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"
}

QR Codes

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.

+
https://api.lob.com/v1/cards/{card_id}/orders

Request samples

Content type
{
  • "quantity": 10000
}

Response samples

Content type
application/json
{
  • "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"
}

QR Codes

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.

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!

@@ -7115,9 +7137,9 @@

Certified Tracking Event Details

scanned_count
integer

Indicates the number of QR Codes out of count that were scanned atleast once.

Array of objects (qr_code_scans)

List of QR code analytics

Request samples

curl -X GET "https://api.lob.com/v1/qr_code_analytics?limit=2&scanned=true" \
+
https://api.lob.com/v1/qr_code_analytics

Request samples

curl -X GET "https://api.lob.com/v1/qr_code_analytics?limit=2&scanned=true" \
 -u <YOUR API KEY>:
-

Response samples

Content type
application/json
{
  • "data": [
    • {
      },
    • {
      }
    ],
  • "object": "list",
  • "count": 2,
  • "scanned_count": 2,
  • "total_count": 2
}

URL Shortener

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.

+

Response samples

Content type
application/json
{
  • "data": [
    • {
      },
    • {
      }
    ],
  • "object": "list",
  • "count": 2,
  • "scanned_count": 2,
  • "total_count": 2
}

URL Shortener

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.

Furthermore, you can use our Retrieve endpoints to track the impact and engagement rate of links created.

@@ -7131,16 +7153,16 @@

Certified Tracking Event Details

updated_at
string

The date and time the domain was last updated.

Request samples

curl -X GET "https://api.lob.com/v1/domains/{domain_id}" \
+
https://api.lob.com/v1/domains/{domain_id}

Request samples

curl -X GET "https://api.lob.com/v1/domains/{domain_id}" \
   -u <YOUR_LIVE_API_KEY>:
-

Response samples

Content type
application/json
{
  • "id": "string",
  • "domain": "string",
  • "error_redirect_link": "string",
  • "created_at": "string",
  • "updated_at": "string"
}

Delete a Domain

Delete a registered domain. This operation can only be performed if all associated links with the domain are deleted.

+

Response samples

Content type
application/json
{
  • "id": "string",
  • "domain": "string",
  • "error_redirect_link": "string",
  • "created_at": "string",
  • "updated_at": "string"
}

Delete a Domain

Delete a registered domain. This operation can only be performed if all associated links with the domain are deleted.

Authorizations:
basicAuth
path Parameters
domain_id
required
string

Unique identifier for a domain.

Responses

Response Schema: application/json
id
string

Unique identifier for a domain.

deleted
boolean

Only returned if the domain was successfully deleted.

Response samples

Content type
application/json
{
  • "id": "string",
  • "deleted": true
}

Create Domain

Add a new custom domain that can be used to create custom links.

+
https://api.lob.com/v1/domains/{domain_id}

Response samples

Content type
application/json
{
  • "id": "string",
  • "deleted": true
}

Create Domain

Add a new custom domain that can be used to create custom links.

Authorizations:
basicAuth
Request Body schema:
domain
required
string (domain)

The registered domain/hostname.

error_redirect_link
string (error_redirect_link)

The 404 error redirect link.

Responses

updated_at
string

The date and time the domain was last updated.

Request samples

Content type
Example
{
  • "domain": "lob.st"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "domain": "string",
  • "error_redirect_link": "string",
  • "created_at": "string",
  • "updated_at": "string"
}

List all domains

Retrieve a list of all created domains.

+
https://api.lob.com/v1/domains

Request samples

Content type
Example
{
  • "domain": "lob.st"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "domain": "string",
  • "error_redirect_link": "string",
  • "created_at": "string",
  • "updated_at": "string"
}

List all domains

Retrieve a list of all created domains.

Authorizations:
basicAuth

Responses

Response Schema: application/json
Array of objects (domain_response)

List of domains.

Request samples

curl -X GET "https://api.lob.com/v1/domains?limit=2" \
+
https://api.lob.com/v1/domains

Request samples

curl -X GET "https://api.lob.com/v1/domains?limit=2" \
   -u <YOUR_LIVE_API_KEY>:
-

Response samples

Content type
application/json
{
  • "data": [
    • {
      }
    ]
}

Request samples

Content type
Example
{
  • "resource_id": "ltr_133"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "title": "string",
  • "domain_id": "string",
  • "redirect_link": "string",
  • "short_link": "string",
  • "metadata": {
    • "property1": "string",
    • "property2": "string"
    }
}

Request samples

Content type
Example
{}

Response samples

Content type
application/json
{
  • "id": "string",
  • "title": "string",
  • "domain_id": "string",
  • "redirect_link": "string",
  • "short_link": "string",
  • "metadata": {
    • "property1": "string",
    • "property2": "string"
    }
}

Request samples

curl -X GET "https://api.lob.com/v1/links?limit=2" \
+
https://api.lob.com/v1/links

Request samples

curl -X GET "https://api.lob.com/v1/links?limit=2" \
   -u <YOUR_LIVE_API_KEY>:
-

Response samples

Content type
application/json
{
  • "count": 0,
  • "limit": 0,
  • "offset": 0,
  • "data": [
    • {
      }
    ]
}

Beta Program

At Lob, we pride ourselves on building high quality platform capabilities rapidly +

Response samples

Content type
application/json
{
  • "count": 0,
  • "limit": 0,
  • "offset": 0,
  • "data": [
    • {
      }
    ]
}

Beta Program

At Lob, we pride ourselves on building high quality platform capabilities rapidly and iteratively, so we can constantly be delivering additional value to our customers. When evaluating a new product or feature from Lob, you may see that it has been released in Beta.

Typically, something in Beta means that the feature is early in its lifecycle here at @@ -7802,7 +7824,7 @@

Changelog

View our Changelog here.