openapi: 3.0.3
info:
  title: Lob API
  version: 1.20.2
  description: "Experience direct mail like never before, with unmatched personalization and scalability \x14 all in one intuitive platform."
  license:
    name: MIT
    url: https://mit-license.org/
  contact:
    name: Lob Developer Experience
    url: https://support.lob.com/
    email: lob-openapi@lob.com
  termsOfService: https://www.lob.com/legal
servers:
  - url: https://api.lob.com/v1
    description: production
security:
  - basicAuth: []
tags:
  - name: 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.

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - name: Authentication
    x-traitTag: true
    description: >
      Requests made to the API are protected with <a
      href="https://en.wikipedia.org/wiki/Basic_access_authentication"
      target="_blank">HTTP Basic authentication</a>.

      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 <a href="https://dashboard.lob.com/settings/api-keys"
      target="_blank">Dashboard Settings</a>.

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

      ```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
        one that is incorrect or outdated, Lob returns an error with a `401`
        HTTP response code. You can find all API keys in your dashboard
        under <a href="https://dashboard.lob.com/settings/api-keys" target="_blank">Settings</a>.
        There are two types of API keys: *secret* and *publishable*.
        - **Secret API keys** should be kept confidential and only stored on your own servers.
        Your account's secret API key can perform any API request to Lob without restriction.
        - **Publishable API keys** are limited to US verifications, international verifications,
        and US autocomplete requests. For maximum security, we encourage you to not expose your 
        secret key. You can include the publishable keys in JavaScript code or in an Android or iPhone app
        without exposing your Lob Print and Mail account services or your secret key. Publishable keys are always
        prefixed with `[environment]_pub`.
        Every type comes with a pair of keys: one for the testing environment and one for the
        live environment. We recommend reading [Test and Live Environments](#tag/Test-and-Live-Environments)
        for more information.
        <br><br>
        <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to top</a></div>
  - 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.

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - 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

      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

      than our more mature APIs.


      If you are participating in a Beta program and want to provide feedback,
      please feel free to

      <a href="https://lob.com/support#contact" target="_blank">contact us</a>!

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - 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.

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - 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.

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - 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.

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - name: Bulk Intl Verifications
    description: >
      Verify a list of non-US addresses.

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - name: Bulk US Verifications
    description: >
      Verify a list of US addresses.

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - 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

      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.

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - 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.

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - 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.

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - 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,

      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.


      <table>
        <tr>
          <th style="white-space: nowrap">ATTRIBUTE</th>
          <th style="white-space: nowrap">DESCRIPTION</th>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>code</code></td>
          <td style="white-space: nowrap">A consistent machine-keyable string identifying the error</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>status_code</code></td>
          <td style="white-space: nowrap">A conventional HTTP status code</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>message</code></td>
          <td style="white-space: nowrap">A human-readable, subject-to-change message with more details about the error</td>
        </tr>
      </table>


      ### HTTP Status Code Summary


      <table>
        <tr>
          <th style="white-space: nowrap">STATUS_CODE</th>
          <th style="white-space: nowrap">CODE</th>
          <th style="white-space: nowrap">MESSAGE</th>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>200</code></td>
          <td style="white-space: nowrap">SUCCESS</td>
          <td style="white-space: nowrap">Successful API request</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>401</code></td>
          <td style="white-space: nowrap">UNAUTHORIZED</td>
          <td style="white-space: nowrap">Authorization error with your API key or account</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>403</code></td>
          <td style="white-space: nowrap">FORBIDDEN</td>
          <td style="white-space: nowrap">Forbidden error with your API key or account</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>404</code></td>
          <td style="white-space: nowrap">NOT FOUND</td>
          <td style="white-space: nowrap">The requested item does not exist</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">BAD REQUEST</td>
          <td style="white-space: nowrap">The query or body parameters did not pass validation</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>429</code></td>
          <td style="white-space: nowrap">TOO MANY REQUESTS</td>
          <td style="white-space: nowrap">Too many requests have been sent with an API key in a given amount of time</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>500</code></td>
          <td style="white-space: nowrap">SERVER ERROR</td>
          <td style="white-space: nowrap">An internal server error occurred, please contact support@lob.com</td>
        </tr>
      </table>


      ### Error Codes - Generic


      <table>
        <tr>
          <th style="white-space: nowrap">STATUS_CODE</th>
          <th style="white-space: nowrap">CODE</th>
          <th style="white-space: nowrap">MESSAGE</th>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">BAD_REQUEST</td>
          <td style="white-space: nowrap">An invalid request was made. See error message for details.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>409/422</code></td>
          <td style="white-space: nowrap">CONFLICT</td>
          <td style="white-space: nowrap">This operation would leave data in a conflicted state.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>403</code></td>
          <td style="white-space: nowrap">FEATURE_LIMIT_REACHED</td>
          <td style="white-space: nowrap">The account has reached its resource limit and requires upgrading to add more.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>500</code></td>
          <td style="white-space: nowrap">INTERNAL_SERVER_ERROR</td>
          <td style="white-space: nowrap">An error has occured on Lob's servers. Please try request again.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">INVALID</td>
          <td style="white-space: nowrap">An invalid request was made. See error message for details.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">NOT_DELETABLE</td>
          <td style="white-space: nowrap">An attempt was made to delete a resource, but the resource cannot be deleted.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>404</code></td>
          <td style="white-space: nowrap">NOT_FOUND</td>
          <td style="white-space: nowrap">The requested resource was not found.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>408</code></td>
          <td style="white-space: nowrap">REQUEST_TIMEOUT</td>
          <td style="white-space: nowrap">The request took too long. Please try again.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>503</code></td>
          <td style="white-space: nowrap">SERVICE_UNAVAILABLE</td>
          <td style="white-space: nowrap">The Lob servers are temporarily unavailable. Please try again.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>404</code></td>
          <td style="white-space: nowrap">UNRECOGNIZED_ENDPOINT</td>
          <td style="white-space: nowrap">The requested endpoint doesn't exist.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">UNSUPPORTED_LOB_VERSION</td>
          <td style="white-space: nowrap">An unsupported Lob API version was requested.</td>
        </tr>
      </table>


      ### Error Codes - Authentication


      <table>
        <tr>
          <th style="white-space: nowrap">STATUS_CODE</th>
          <th style="white-space: nowrap">CODE</th>
          <th style="white-space: nowrap">MESSAGE</th>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>401</code></td>
          <td style="white-space: nowrap">EMAIL_REQUIRED</td>
          <td style="white-space: nowrap">Account must have a verified email address before creating live resources.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>401</code></td>
          <td style="white-space: nowrap">UNAUTHORIZED</td>
          <td style="white-space: nowrap">The request isn't authorized.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>401</code></td>
          <td style="white-space: nowrap">UNAUTHORIZED_TOKEN</td>
          <td style="white-space: nowrap">Token isn't authorized.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>401/403</code></td>
          <td style="white-space: nowrap">INVALID_API_KEY</td>
          <td style="white-space: nowrap">The API key is invalid.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>403</code></td>
          <td style="white-space: nowrap">PUBLISHABLE_KEY_NOT_ALLOWED</td>
          <td style="white-space: nowrap">The requested operation needs a secret key, not a publishable key. See [API Keys](#tag/API-Keys) for more information.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>429</code></td>
          <td style="white-space: nowrap">RATE_LIMIT_EXCEEDED</td>
          <td style="white-space: nowrap">Requests were sent too quickly and must be slowed down.</td>
        </tr>
      </table>

       ### Error Codes - Advanced

       <table>
        <tr>
          <th style="white-space: nowrap">STATUS_CODE</th>
          <th style="white-space: nowrap">CODE</th>
          <th style="white-space: nowrap">MESSAGE</th>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>401</code></td>
          <td style="white-space: nowrap">PAYMENT_METHOD_UNVERIFIED</td>
          <td style="white-space: nowrap">You must have a verified bank account or credit card to submit live requests.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>404</code></td>
          <td style="white-space: nowrap">DELETED_BANK_ACCOUNT</td>
          <td style="white-space: nowrap">Checks cannot be created with a deleted bank account.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">ADDRESS_LENGTH_EXCEEDS_LIMIT</td>
          <td style="white-space: nowrap">The sum of to.address_line1 and to.address_line2 cannot surpass 50 characters.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">BANK_ACCOUNT_ALREADY_VERIFIED</td>
          <td style="white-space: nowrap">The bank account has already been verified.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">BANK_ERROR</td>
          <td style="white-space: nowrap">There's an issue with the bank account.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>403</code></td>
          <td style="white-space: nowrap">BILLING_ADDRESS_REQUIRED</td>
          <td style="white-space: nowrap">In order to create a live mail piece, your account needs to set up a billing address.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">CUSTOM_ENVELOPE_INVENTORY_DEPLETED</td>
          <td style="white-space: nowrap">Custom envelope inventory is depleted, and more will need to be ordered.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">FAILED_DELIVERABILITY_STRICTNESS</td>
          <td style="white-space: nowrap">The to address doesn't meet strictness requirements.
          See <a href="https://dashboard.lob.com/#/settings/account" target="_blank">Account Settings</a> to configure strictness.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">FILE_PAGES_BELOW_MIN</td>
          <td style="white-space: nowrap">Not enough pages.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">FILE_PAGES_EXCEED_MAX</td>
          <td style="white-space: nowrap">Too many pages.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">FILE_SIZE_EXCEEDS_LIMIT</td>
          <td style="white-space: nowrap">The file size is too large. See description for details.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">FOREIGN_RETURN_ADDRESS</td>
          <td style="white-space: nowrap">The 'from' address must be a US address.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">INCONSISTENT_PAGE_DIMENSIONS</td>
          <td style="white-space: nowrap">All pages of the input file must have the same dimensions.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">INVALID_BANK_ACCOUNT</td>
          <td style="white-space: nowrap">The provided bank routing number is invalid.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">INVALID_BANK_ACCOUNT_VERIFICATION</td>
          <td style="white-space: nowrap">Verification amounts do not match.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">INVALID_CHECK_INTERNATIONAL</td>
          <td style="white-space: nowrap">Checks cannot be sent internationally.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">INVALID_COUNTRY_COVID</td>
          <td style="white-space: nowrap">The postal service in the specified country is currently unable to process the request due to COVID-19 restrictions.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">INVALID_FILE</td>
          <td style="white-space: nowrap">The file is invalid.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">INVALID_FILE_DIMENSIONS</td>
          <td style="white-space: nowrap">File dimensions are incorrect for the selected mail type.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">INVALID_FILE_DOWNLOAD_TIME</td>
          <td style="white-space: nowrap">File download from remote server took too long.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">INVALID_FILE_URL</td>
          <td style="white-space: nowrap">The file URL when creating a resource is invalid.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">INVALID_IMAGE_DPI</td>
          <td style="white-space: nowrap">DPI must be at least 300.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">INVALID_INTERNATIONAL_FEATURE</td>
          <td style="white-space: nowrap">The specified product cannot be sent to the destination.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">INVALID_PERFORATION_RETURN_ENVELOPE</td>
          <td style="white-space: nowrap">Both `return_envelope` and `perforation` must be used together.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">INVALID_TEMPLATE_HTML</td>
          <td style="white-space: nowrap">The provided HTML is invalid.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">MAIL_USE_TYPE_CAN_NOT_BE_NULL</td>
          <td style="white-space: nowrap">`use_type` must be one of "marketing" or "operational". Alternatively, an admin can set the account default use type in Account Settings.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">MERGE_VARIABLE_REQUIRED</td>
          <td style="white-space: nowrap">A required merge variable is missing.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">MERGE_VARIABLE_WHITESPACE</td>
          <td style="white-space: nowrap">Merge variable names cannot contain whitespace.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">PDF_ENCRYPTED</td>
          <td style="white-space: nowrap">An encrypted PDF was provided.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">SPECIAL_CHARACTERS_RESTRICTED</td>
          <td style="white-space: nowrap">Cannot use special characters for merge variable names.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>422</code></td>
          <td style="white-space: nowrap">UNEMBEDDED_FONTS</td>
          <td style="white-space: nowrap">The provided PDF contains non-standard unembedded fonts. See description for details.</td>
        </tr>
      </table>

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - name: Events
    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).


      <h3>Postcards</h3>


      <table>
        <tr>
          <th style="white-space: nowrap">EVENT TYPE</th>
          <th style="white-space: nowrap">LIVE-ONLY</th>
          <th style="white-space: nowrap">WHEN EVENT TYPE OCCURS</th>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>postcard.created</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A postcard is successfully created (Lob returns a 200 status code).</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>postcard.rejected</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A postcard was not successfully created (Usually happens when one or more postcards fail the creation step during a batch request)</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>postcard.rendered_pdf</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A postcard's PDF proof is successfully rendered.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>postcard.rendered_thumbnails</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A postcard's thumbnails are successfully rendered.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>postcard.deleted</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A postcard is successfully canceled.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>postcard.mailed</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A postcard receives a "Mailed" <a href='#operation/tracking_event'>tracking event</a>. Only enabled for certain <a href='https://dashboard.lob.com/#/settings/editions' target="_blank">Print & Mail Editions</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>postcard.in_transit</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A postcard receives an "In Transit" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>postcard.in_local_area</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A postcard receives an "In Local Area" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>postcard.processed_for_delivery</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A postcard receives a "Processed for Delivery" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>postcard.delivered</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A postcard receives a "Delivered" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>postcard.failed</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A postcard receives a "Failed" <a href="https://help.lob.com/print-and-mail/designing-mail-creatives/creative-formatting/rendering-errors">rendering error</a> or <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>postcard.re-routed</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A postcard receives a "Re-Routed" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>postcard.returned_to_sender</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A postcard receives a "Returned to Sender" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>postcard.international_exit</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A postcard receives a "International Exit" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>postcard.viewed</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A postcard QR code or URL was scanned or viewed by the recipient. </td>
        </tr>
      </table>


      <h3>Self Mailers</h3>


      <table>
        <tr>
          <th style="white-space: nowrap">EVENT TYPE</th>
          <th style="white-space: nowrap">LIVE-ONLY</th>
          <th style="white-space: nowrap">WHEN EVENT TYPE OCCURS</th>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>self_mailer.created</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A self_mailer is successfully created (Lob returns a 200 status code).</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>self_mailer.rejected</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A self_mailer was not successfully created (Usually happens when one or more self_mailers fail the creation step during a batch request)</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>self_mailer.rendered_pdf</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A self_mailer's PDF proof is successfully rendered.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>self_mailer.rendered_thumbnails</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A self_mailer's thumbnails are successfully rendered.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>self_mailer.deleted</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A self_mailer is successfully canceled.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>self_mailer.mailed</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A self_mailer receives a "Mailed" <a href='#operation/tracking_event'>tracking event</a>. Only enabled for certain
          <a href="https://dashboard.lob.com/#/settings/editions" target="_blank">Print & Mail Editions</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>self_mailer.in_transit</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A self_mailer receives an "In Transit" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>self_mailer.in_local_area</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A self_mailer receives an "In Local Area" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>self_mailer.processed_for_delivery</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A self_mailer receives a "Processed for Delivery" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>self_mailer.delivered</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A self_mailer receives an "Delivered" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>self_mailer.failed</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A self_mailer receives an "Failed" <a href="https://help.lob.com/print-and-mail/designing-mail-creatives/creative-formatting/rendering-errors">rendering error</a> or <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>self_mailer.re-routed</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A self_mailer receives a "Re-Routed" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>self_mailer.returned_to_sender</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A self_mailer receives a "Returned to Sender" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>self_mailer.international_exit</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A self_mailer receives an "International Exit" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>self_mailer.viewed</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A self_mailer's QR code or URL was scanned or viewed by the recipient. </td>
        </tr>
      </table>


      <h3>Letters</h3>


      <table>
        <tr>
          <th style="white-space: nowrap">EVENT TYPE</th>
          <th style="white-space: nowrap">LIVE-ONLY</th>
          <th style="white-space: nowrap">WHEN EVENT TYPE OCCURS</th>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.created</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A letter is successfully created (Lob returns a 200 status code).</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.rejected</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A letter was not successfully created (Usually happens when one or more letters fail the creation step during a batch request)</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.rendered_pdf</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A letter's PDF proof is successfully rendered.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.rendered_thumbnails</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A letter's thumbnails are successfully rendered.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.deleted</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A letter is successfully canceled.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.mailed</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A letter receives a "Mailed" <a href='#operation/tracking_event'>tracking event</a>. Only enabled for certain
          <a href="https://dashboard.lob.com/#/settings/editions" target="_blank">Print & Mail Editions</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.in_transit</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A letter receives an "In Transit" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.in_local_area</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A letter receives an "In Local Area" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.processed_for_delivery</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A letter receives a "Processed for Delivery" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.delivered</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A letter receives a "Delivered" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.failed</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A letter receives a "Failed" <a href="https://help.lob.com/print-and-mail/designing-mail-creatives/creative-formatting/rendering-errors">rendering error</a> or <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.re-routed</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A letter receives a "Re-Routed" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.returned_to_sender</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A letter receives a "Returned to Sender" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.international_exit</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A letter receives a "International Exit" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.viewed</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A letter's QR code or URL was scanned or viewed by the recipient. </td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.certified.mailed</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A certified letter receives a "Mailed" <a href='#operation/tracking_event'>tracking event</a>. Only enabled for certain
          <a href="https://dashboard.lob.com/#/settings/editions" target="_blank">Print & Mail Editions</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.certified.in_transit</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A certified letter receives an "In Transit" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.certified.in_local_area</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A certified letter receives an "In Transit" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.certified.processed_for_delivery</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A certified letter receives a "Processed for Delivery" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.certified.re-routed</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A certified letter receives a "Re-Routed" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.certified.returned_to_sender</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A certified letter receives a "Returned to Sender" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.certified.delivered</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A certified letter receives a "Delivered" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.certified.pickup_available</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A certified letter receives a "Pickup Available" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.certified.issue</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A certified letter receives an "Issue" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.return_envelope.created</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A return envelope is created (occurs simultaneously with letter creation).</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.return_envelope.in_transit</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A return envelope receives an "In Transit" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.return_envelope.in_local_area</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A return envelope receives an "In Local Area" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.return_envelope.processed_for_delivery</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A return envelope receives a "Processed for Delivery" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.return_envelope.re-routed</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A return envelope receives a "Re-Routed" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>letter.return_envelope.returned_to_sender</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A return envelope receives a "Returned to Sender" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
      </table>


      <h3>Checks</h3>


      <table>
        <tr>
          <th style="white-space: nowrap">EVENT TYPE</th>
          <th style="white-space: nowrap">LIVE-ONLY</th>
          <th style="white-space: nowrap">WHEN EVENT TYPE OCCURS</th>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>check.created</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A check is successfully created (Lob returns a 200 status code).</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>check.rejected</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A check was not successfully created (Usually happens when one or more checks fail the creation step during a batch request)</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>check.rendered_pdf</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A check's PDF proof is successfully rendered.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>check.rendered_thumbnails</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A check's thumbnails are successfully rendered.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>check.deleted</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A check is successfully canceled.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>check.mailed</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A check receives a "Mailed" <a href='#operation/tracking_event'>tracking event</a>. Only enabled for certain <a href="https://dashboard.lob.com/#/settings/editions" target="_blank">Print & Mail Editions</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>check.in_transit</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A check receives an "In Transit" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>check.in_local_area</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A check receives an "In Local Area" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>check.processed_for_delivery</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A check receives a "Processed for Delivery" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>check.delivered</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A check receives a "Delivered" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>check.failed</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A check receives a "Failed" <a href="https://help.lob.com/print-and-mail/designing-mail-creatives/creative-formatting/rendering-errors">rendering error</a> or <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>check.re-routed</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A check receives a "Re-Routed" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>check.returned_to_sender</code></td>
          <td style="white-space: nowrap"><code>true</code></td>
          <td style="white-space: nowrap">A check receives a "Returned to Sender" <a href='#operation/tracking_event'>tracking event</a>.</td>
        </tr>
      </table>


      <h3>Addresses</h3>


      <table>
        <tr>
          <th style="white-space: nowrap">EVENT TYPE</th>
          <th style="white-space: nowrap">LIVE-ONLY</th>
          <th style="white-space: nowrap">WHEN EVENT TYPE OCCURS</th>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>address.created</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">An address is successfully created (Lob returns a 200 status code).</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>address.deleted</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">An address is successfully deleted.</td>
        </tr>
      </table>


      <h3>Bank Accounts</h3>


      <table>
        <tr>
          <th style="white-space: nowrap">EVENT TYPE</th>
          <th style="white-space: nowrap">LIVE-ONLY</th>
          <th style="white-space: nowrap">WHEN EVENT TYPE OCCURS</th>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>bank_account.created</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A bank account is successfully created (Lob returns a 200 status code).</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>bank_account.deleted</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A bank account is successfully deleted.</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>bank_account.verified</code></td>
          <td style="white-space: nowrap"><code>false</code></td>
          <td style="white-space: nowrap">A bank account is successfully verified.</td>
        </tr>
      </table>

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - name: Getting Started
    x-traitTag: true
    description: >
      ### 1. Get Setup

      * Create an account at <a href="https://dashboard.lob.com/#/register"
      target="_blank">Lob.com</a>

      * Obtain your API keys in the Lob dashboard <a
      href="https://dashboard.lob.com/settings/api-keys"
      target="_blank">settings</a>

      * You'll use the format, `test_*.` for your Test API key and `live_*.` for
      your Live API key.


      ### 2. Explore

      * Try out in Postman:

      <div class="postman-run-button"

      data-postman-action="collection/fork"

      data-postman-var-1="16169677-975ecb9f-ea22-4d8f-a4f9-53a42f2aee03"

      data-postman-collection-url="entityId=16169677-975ecb9f-ea22-4d8f-a4f9-53a42f2aee03&entityType=collection&workspaceId=5404d3a5-5a84-4df6-b078-a1547e1a68a7"

      style="background:#0099d7;color: white;display: flex;justify-content:
      center;align-items: center;">
        Run in Postman
      </div>

      <script type="text/javascript">
        (function (p,o,s,t,m,a,n) {
          !p[s] && (p[s] = function () { (p[t] || (p[t] = [])).push(arguments); });
          !o.getElementById(s+t) && o.getElementsByTagName("head")[0].appendChild((
            (n = o.createElement("script")),
            (n.id = s+t), (n.async = 1), (n.src = m), n
          ));
        }(window, document, "_pm", "PostmanRunObject", "https://run.pstmn.io/button.js"));
      </script>

      * 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)


      ### 3. Learn more

      Try our quick start (TypeScript, Python, PHP, Java or Ruby):

      * <a href="https://help.lob.com/developer-docs/quickstart-guide"
      target="_blank">Send your first Postcards</a>


      Use Case guides

      * <a
      href="https://help.lob.com/developer-docs/use-case-guides/mass-deletion-setup"
      target="_blank">Mass Deletion Setup</a>

      * <a
      href="https://help.lob.com/developer-docs/use-case-guides/ncoa-restrictions"
      target="_blank">NCOA Restrictions</a>

      * <a
      href="https://help.lob.com/developer-docs/use-case-guides/override-cancellation-window"
      target="_blank">Override Cancellation Window</a>

      * <a
      href="https://help.lob.com/developer-docs/use-case-guides/visibility-of-address-changes"
      target="_blank">Visibility of Address Changes</a>

      * <a
      href="https://help.lob.com/developer-docs/use-case-guides/ingesting-tracking-events-with-webhooks"
      target="_blank">Ingesting Tracking Events with Webhooks</a>

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - name: Identity Validation
    description: >
      Validates whether a given name is associated with an address.

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - name: Informed Delivery Campaign
    description: >
      The Informed Delivery campaigns API allows you to create and view Informed
      Delivery campaigns.

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - name: Intl Verifications
    description: >
      Address verification for non-US addresses

      <br>

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>


      ## 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`

      let you explore the responses to many types of addresses:


      <table>
        <tr>
          <th style="white-space: nowrap">DELIVERABILITY OF SAMPLE RESPONSE</th>
          <th style="white-space: nowrap">SET <code>primary_line</code> TO</th>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>deliverable</code></td>
          <td style="white-space: nowrap">deliverable</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>deliverable_missing_info</code></td>
          <td style="white-space: nowrap">deliverable missing info</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>undeliverable</code></td>
          <td style="white-space: nowrap">undeliverable</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>no_match</code></td>
          <td style="white-space: nowrap">no match</td>
        </tr>
      </table>


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


      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 <a
      href="https://lob.com/address-verification" target="_blank">live demo</a>

      or the free plan (see <a
      href="https://lob.com/pricing/address-verification" target="_blank">our
      pricing</a> for details).

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - name: Introduction
    x-traitTag: true
    description: >
      Lobs 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

      CRM or customer data systems.


      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.


      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.

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - name: Manage Mail
    x-traitTag: true
    description: >
      ## Cancellation Windows


      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.

      In addition, certain customers can customize their cancellation windows by

      product in their <a href="https://dashboard.lob.com/#"
      target="_blank">Dashboard Settings</a>. Upgrade to

      the appropriate <a href="https://dashboard.lob.com/#/settings/editions"
      target="_blank">Print & Mail Edition</a>

      to automatically gain access to this ability. For more details on this
      feature,

      check out our <a
      href="https://help.lob.com/print-and-mail/building-a-mail-strategy/managing-mail-settings#cancellation-windows-4"
      target="_blank">Cancellation Guide</a>.


      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.

      <br>

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>


      ## Scheduled Mailings


      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

      take precedence.


      For implementation details, see documentation below for each respective

      endpoint. For more help, see our <a
      href="https://help.lob.com/print-and-mail/building-a-mail-strategy/choosing-a-delivery-strategy#scheduled-mailings-15"
      target="_blank">Scheduled Mailings Guide</a>.


      This feature is exclusive to certain customers. Upgrade to the appropriate

      <a href="https://dashboard.lob.com/#/settings/editions"
      target="_blank">Print & Mail Edition</a> to

      gain access.


      ### Example Create Request using Send Date


      ```bash
        curl https://api.lob.com/v1/postcards \
          -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \
          -d "description=Demo Future Postcard" \
          -d "to=adr_bae820679f3f536b" \
          -d "from=adr_210a8d4b0b76d77b" \
          -d "front=tmpl_b846a20859ae11a" \
          -d "back=tmpl_01b0d396a10c268" \
          -d "merge_variables[name]=Harry" \
          -d "send_date=2021-07-26"
      ```

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - 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

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


      Due to privacy concerns and USPS constraints, for customers with NCOALink
      enabled, our API responses

      for a limited set of endpoints differ slightly in the case when an address
      has been changed through NCOALink.


      **NOTE**: This feature is exclusive to certain customers. Upgrade to the
      appropriate <a href='https://dashboard.lob.com/#/settings/editions'
      target="_blank">Print & Mail Editions</a> to gain access.


      For more information, see our <a
      href="https://help.lob.com/print-and-mail/all-about-addresses#national-change-of-address-ncoa-7"
      target="_blank">NCOALink guide</a>.

      <br>

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>


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

      `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

      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

      <br>

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>


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


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

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - 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.

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - 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 <a
      href="#tag/Letters/operation/letter_create">Letters</a>, <a
      href="#tag/Postcards/operation/postcard_create">Postcards</a> or <a
      href="#tag/Self-Mailers/operation/self_mailer_create">Self Mailers</a> to
      learn how to embed a QR code into your mail piece.


      Webhooks can be used to integrate Lob QR code scans into your omni channel
      marketing strategy. See the <a href="#tag/Webhooks">Webhooks</a> section
      of our documentation to learn how to enable the `letter.viewed`,
      `postcard.viewed` and `self_mailer.viewed` event notifications for your
      mail pieces.


      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!


      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - 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.


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


      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.

      <table>
        <tbody>
          <tr>
            <td>X-Rate-Limit-Limit:</td>
            <td>the rate limit ceiling for a given request</td>
          </tr>
          <tr>
            <td>X-Rate-Limit-Remaining:</td>
            <td>the number of requests remaining in this window</td>
          </tr>
          <tr>
            <td>X-Rate-Limit-Reset:</td>
            <td>the time at which the rate limit window resets (in <a  href="https://en.wikipedia.org/wiki/Unix_time"  target="_blank">UTC epoch seconds</a>)
          </td>
          </tr>
        </tbody>
      </table>


      ### 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:


      ```javascript
        {
          "error": {
            "message": "Rate limit exceeded. Please wait 5 seconds and try your request again.",
            "code": "rate_limit_exceeded",
            "status_code": 429
          }
        }
      ``` <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - name: Requests and Responses
    x-traitTag: true
    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.

      <br>

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>


      ## Query Parameters


      Query parameters which consist of lists of strings require that all
      elements of

      the list be double-quoted, as per query filter standards.

      <br>

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>


      ## 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`

      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

      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

      <a
      href="https://help.lob.com/print-and-mail/building-a-mail-strategy/managing-mail-settings#idempotent-requests-12"
      target="_blank">implementation guide</a>.


      **Headers**

      <table>
        <tbody>
          <tr>
            <td>Idempotency-Key:</td>
            <td>
              optional
              <p style="color:#888;margin-top:0px;">
                <font size="-1">
                  A string of no longer than 256 characters
                  that uniquely identifies this resource.
                </font>
              </p>
            </td>
          </tr>
        </tbody>
      </table>


      **Query Parameters**

      <table>
        <tbody>
          <tr>
            <td>idempotency-key:</td>
            <td>
              optional
              <p style="color:#888;margin-top:0px;">
                <font size="-1">
                  A string of no longer than 256 characters
                  that uniquely identifies this resource.
                </font>
              </p>
            </td>
          </tr>
        </tbody>
      </table>


      ### Example Request


      ```bash
        curl https://api.lob.com/v1/postcards \
          -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \
          -H "Idempotency-Key: 026e7634-24d7-486c-a0bb-4a17fd0eebc5" \
          -d "to=adr_bae820679f3f536b" \
          -d "from=adr_210a8d4b0b76d77b" \
          --data-urlencode "front=<html style='margin: 130px; font-size: 50;'>Front HTML for {{name}}</html>" \
          --data-urlencode "back=<html style='margin: 130px; font-size: 50;'>Back HTML</html>" \
          -d "merge_variables[name]=Harry"
      ```

      <br>

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>


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

      systems.


      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: \
          -d "description=Demo Postcard job" \
          -d "metadata[campaign]=NEWYORK2015" \
          -d "to=adr_bae820679f3f536b" \
          -d "from=adr_210a8d4b0b76d77b" \
          --data-urlencode "front=<html style='margin: 130px; font-size: 50;'>Front HTML for {{name}}</html>" \
          --data-urlencode "back=<html style='margin: 130px; font-size: 50;'>Back HTML</html>" \
          -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:
      ```

      <br>

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>



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

      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.


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



      ```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)

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


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



      ```javascript
        --------------------------7015ebe79c0a5f8c
        Content-Disposition: form-data; name="description"

        Demo Letter
        --------------------------7015ebe79c0a5f8c
        Content-Disposition: form-data; name="to"

        adr_bae820679f3f536b
        --------------------------7015ebe79c0a5f8c
        Content-Disposition: form-data; name="from"

        adr_210a8d4b0b76d77b
        --------------------------7015ebe79c0a5f8c
        Content-Disposition: form-data; name="file"; filename="file.pdf"
        Content-Type: application/pdf

        <FILE CONTENT>
        --------------------------7015ebe79c0a5f8c
        Content-Disposition: form-data; name="color"

        true
        --------------------------7015ebe79c0a5f8c--
      ```

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - name: Reverse Geocode Lookups
    description: >
      Find a list of zip codes associated with a valid US location via latitude
      and longitude. <br> <div class="back-to-top" ><a href="#"
      onclick="toTopLink()">back to top</a></div>
  - name: SDKs and Tools
    x-traitTag: true
    description: >
      Please visit our <a href="https://www.github.com/lob"
      target="_blank">Github</a> for a list of our supported libraries.

      - <a href="https://github.com/lob/lob-typescript-sdk"
      target="_blank">Typescript</a>

      - <a href="https://github.com/lob/lob-php" target="_blank">PHP</a>

      - <a href="https://github.com/lob/lob-python" target="_blank">Python</a>

      - <a href="https://github.com/lob/lob-java" target="_blank">Java</a>

      - <a href="https://github.com/lob/lob-ruby/tree/main"
      target="_blank">Ruby</a>

      - <a href="https://github.com/lob/lob-dotnet" target="_blank">CSharp</a>

      - <a href="https://github.com/lob/lob-elixir" target="_blank">Elixir</a>

      - <a href="https://github.com/lob/lob-go" target="_blank">Go</a>

      - <a href="https://github.com/lob/lob-node" target="_blank">Node.js
      (legacy)</a>

      - <a href="https://github.com/lob/lob-java/tree/12.3.7-Legacy"
      target="_blank">Java (legacy)</a>

      - <a href="https://github.com/lob/lob-php/tree/v3-legacy"
      target="_blank">PHP (legacy)</a>

      - <a href="https://github.com/lob/lob-python/tree/legacy_v4"
      target="_blank">Python (Legacy)</a>

      - <a href="https://github.com/lob/lob-ruby/tree/legacy-v5"
      target="_blank">Ruby (Legacy)</a>


      <br><br>

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - 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.

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - name: Template Design
    x-traitTag: true
    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 <a href="https://dashboard.lob.com/#/templates"
      target="_blank">Dashboard</a>. To use a template in a postcard,

      letter, or check, see the documentation for each endpoint below. For help
      using templates, check out our

      <a
      href="https://help.lob.com/print-and-mail/designing-mail-creatives/dynamic-personalization#html-templates-1"
      target="_blank">HTML Templates Guide</a> or get started with a

      <a href="https://lob.com/template-gallery" target="_blank">pre-designed
      template from our gallery</a>. In Live mode, you can only have

      as many templates as allotted in your current

      <a href="https://dashboard.lob.com/#/settings/editions"
      target="_blank">Print & Mail Edition</a>. There is no limit in Test mode.


      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: \
          -d "description=Demo Postcard job" \
          -d "to=adr_78c304d54912c502" \
          -d "from=adr_61a0865c8c573139" \
          -d "front=tmpl_b846a20859ae11a" \
          -d "back=tmpl_01b0d396a10c268" \
          -d "merge_variables[name]=Harry"
      ```

      <br>

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>


      ## HTML Examples

      Use a pre-designed template from our <a
      href="https://lob.com/resources/template-gallery"
      target="_blank">gallery</a> or follow these

      basic <a href="https://github.com/lob/examples"
      target="_blank">guidelines</a> 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

      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

      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 <a
      href="http://shouldiprefix.com/" target="_blank">here</a>.


      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.

      <br>

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>


      ## 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:

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

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


      **Prepping PNGs/JPEGs**


      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.

      <br>

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>


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

      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 <a
      href="https://en.wikipedia.org/wiki/Category:Font_formats"
      target="_blank">font type</a>

      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

      PDF editing software that are compliant with PDF standards.


      Please note, only standard base14 fonts can be Type 1.


      <table>
        <tr>
          <th style="white-space: nowrap">FONT NAME</th>
          <th style="white-space: nowrap">TYPES</th>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Arial</code></td>
          <td style="white-space: nowrap">TrueType, CID TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Arial,Bold</code></td>
          <td style="white-space: nowrap">TrueType, CID TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Arial,BoldItalic</code></td>
          <td style="white-space: nowrap">TrueType, CID TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Arial,Italic</code></td>
          <td style="white-space: nowrap">TrueType, CID TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>ArialMT</code></td>
          <td style="white-space: nowrap">TrueType, CID TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Arial-BoldMT</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Arial-BoldItalicMT</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Arial-ItalicMT</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>ArialNarrow</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>ArialNarrow-Bold</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Calibri</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Calibri-Bold</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Calibri-Italic</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Courier</code></td>
          <td style="white-space: nowrap">Type 1</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Courier-Oblique</code></td>
          <td style="white-space: nowrap">Type 1</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Courier-Bold</code></td>
          <td style="white-space: nowrap">Type 1</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Courier-BoldOblique</code></td>
          <td style="white-space: nowrap">Type 1</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>CourierNewPSMT</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>CourierNewPS-ItalicMT</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>CourierNewPS-BoldMT</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Helvetica</code></td>
          <td style="white-space: nowrap">Type 1</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Helvetica-Bold</code></td>
          <td style="white-space: nowrap">Type 1</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Helvetica-BoldOblique</code></td>
          <td style="white-space: nowrap">Type 1</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Helvetica-Oblique</code></td>
          <td style="white-space: nowrap">Type 1</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>LucidaConsole</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>MsSansSerif</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>MsSansSerif,Bold</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Symbol</code></td>
          <td style="white-space: nowrap">Type 1, TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Tahoma</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Tahoma-Bold</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Times-Bold</code></td>
          <td style="white-space: nowrap">Type 1</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Times-BoldItalic</code></td>
          <td style="white-space: nowrap">Type 1</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Times-Italic</code></td>
          <td style="white-space: nowrap">Type 1</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Times-Roman</code></td>
          <td style="white-space: nowrap">Type 1</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>TimesNewRomanPS-BoldItalicMT</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>TimesNewRomanPS-BoldMT</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>TimesNewRomanPS-ItalicMT</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>TimesNewRomanPSMT</code></td>
          <td style="white-space: nowrap">TrueType, CID TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>TimesNewRomanPSMT,Bold</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Verdana</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Verdana-Bold</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>Verdana,Italic</code></td>
          <td style="white-space: nowrap">TrueType</td>
        </tr>
        <tr>
          <td style="white-space: nowrap"><code>ZapfDingbats</code></td>
          <td style="white-space: nowrap">Type 1</td>
        </tr>
      </table>

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - 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.

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - name: Templates
    description: >
      These API endpoints allow you to create, retrieve, update and delete
      reusable HTML templates for use with the Print & Mail API.

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - name: Test and Live Environments
    x-traitTag: true
    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. Objectsaddresses, letters, checks,

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


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

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - 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.


      <h3>Certified Tracking Event Details</h3>


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


      <table>
        <tr>
          <th style="white-space: nowrap">NAME</th>
          <th style="white-space: nowrap">EVENT</th>
          <th style="white-space: nowrap">DESCRIPTION</th>
          <th style="white-space: nowrap">ACTION REQUIRED</th>
        </tr>
        <tr>
          <td style="white-space: nowrap">Mailed</td>
          <td style="white-space: nowrap"><code>package_accepted</code></td>
          <td>Package has been accepted into the carrier network for delivery.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">In Transit</td>
          <td style="white-space: nowrap"><code>package_arrived</code></td>
          <td>Package has arrived at an intermediate location in the carrier network.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">In Transit</td>
          <td style="white-space: nowrap"><code>package_departed</code></td>
          <td>Package has departed from an intermediate location in the carrier network.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">In Transit</td>
          <td style="white-space: nowrap"><code>package_processing</code></td>
          <td>Package is processing at an intermediate location in the carrier network.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">In Transit</td>
          <td style="white-space: nowrap"><code>package_processed</code></td>
          <td>Package has been processed at an intermediate location.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">In Local Area</td>
          <td style="white-space: nowrap"><code>package_in_local_area</code></td>
          <td>Package is at a location near the end destination.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Processed For Delivery</td>
          <td style="white-space: nowrap"><code>delivery_scheduled</code></td>
          <td>Package is scheduled for delivery.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Processed For Delivery</td>
          <td style="white-space: nowrap"><code>out_for_delivery</code></td>
          <td>Package is out for delivery.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Pickup Available</td>
          <td style="white-space: nowrap"><code>pickup_available</code></td>
          <td>Package is available for pickup at carrier location.</td>
          <td style="white-space: nowrap"><code>true</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Delivered</td>
          <td style="white-space: nowrap"><code>delivered</code></td>
          <td>Package has been delivered.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Re-Routed</td>
          <td style="white-space: nowrap"><code>package_forwarded</code></td>
          <td>Package has been forwarded.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Returned to Sender</td>
          <td style="white-space: nowrap"><code>returned_to_sender</code></td>
          <td>Package is to be returned to sender.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>address_issue</code></td>
          <td>Address information is incorrect. Contact carrier to ensure delivery.</td>
          <td style="white-space: nowrap"><code>true</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>contact_carrier</code></td>
          <td>Contact the carrier for more information.</td>
          <td style="white-space: nowrap"><code>true</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>delayed</code></td>
          <td>Delivery of package is delayed.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>delivery_attempted</code></td>
          <td>Delivery of package has been attempted. Contact carrier to ensure delivery.</td>
          <td style="white-space: nowrap"><code>true</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>delivery_rescheduled</code></td>
          <td>Delivery of package has been rescheduled.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>location_inaccessible</code></td>
          <td>Delivery location inaccessible to carrier. Contact carrier to ensure delivery.</td>
          <td style="white-space: nowrap"><code>true</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>notice_left</code></td>
          <td>Carrier left notice during attempted delivery. Follow carrier instructions on notice.</td>
          <td style="white-space: nowrap"><code>true</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>package_damaged</code></td>
          <td>Package has been damaged. Contact carrier for more details.</td>
          <td style="white-space: nowrap"><code>true</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>package_disposed</code></td>
          <td>Package has been disposed.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>package_held</code></td>
          <td>Package held at carrier location. Contact carrier for more details.</td>
          <td style="white-space: nowrap"><code>true</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>package_lost</code></td>
          <td>Package has been lost. Contact carrier for more details.</td>
          <td style="white-space: nowrap"><code>true</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>package_unclaimed</code></td>
          <td>Package is unclaimed.</td>
          <td style="white-space: nowrap"><code>true</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>package_undeliverable</code></td>
          <td>Package is not able to be delivered.</td>
          <td style="white-space: nowrap"><code>true</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>reschedule_delivery</code></td>
          <td>Contact carrier to reschedule delivery.</td>
          <td style="white-space: nowrap"><code>true</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Issue</td>
          <td style="white-space: nowrap"><code>other</code></td>
          <td>Unrecognized carrier status.</td>
          <td style="white-space: nowrap"><code>false</code></td>
        </tr>
      </table>

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - 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

      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 <a href="#tag/Webhooks">Webhooks</a>
      section of our documentation to learn how to enable the `letter.viewed`,
      `postcard.viewed` and `self_mailer.viewed` event notifications for your
      mail pieces.


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


      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - name: US Autocompletions
    description: >
      Given partial address information, this endpoint returns up to 10 address
      suggestions. <br> <div class="back-to-top" ><a href="#"
      onclick="toTopLink()">back to top</a></div>

      ## 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.
        `[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. <div class="back-to-top" ><a
      href="#" onclick="toTopLink()">back to top</a></div>
  - name: US Verification Types
    x-traitTag: true
    description: >
      These are detailed definitions for various fields in the [US verification
      object](#operation/us_verification).


      <h3>ZIP Code Types - <code>components[zip_code_type]</code></h3>


      <table>
        <tbody>
          <tr>
            <td style="white-space: nowrap"><code>standard</code></td>
            <td>The default ZIP code type. Used when none of the other types apply.</td>
          </tr>
          <tr>
            <td><code>po_box</code></td>
            <td>The ZIP code contains only PO Boxes.</td>
          </tr>
          <tr>
            <td><code>unique</code></td>
            <td>The ZIP code is uniquely assigned to a single organization (such as a government agency) that receives a large volume of mail.</td>
          </tr>
          <tr>
            <td><code>military</code></td>
            <td>The ZIP code contains military addresses.</td>
          </tr>
          <tr>
            <td><i>empty string</i></td>
            <td>A match could not be made with the provided inputs.</td>
          </tr>
        </tbody>
      </table>


      <h3>Record Types - <code>components[record_type]</code></h3>


      <table>
        <tbody>
          <tr>
            <td><code>street</code></td>
            <td>The default address type.</td>
          </tr>
          <tr>
            <td><code>highrise</code></td>
            <td>The address is a commercial building, apartment complex, highrise, etc.</td>
          </tr>
          <tr>
            <td><code>firm</code></td>
            <td>The address is of an organizational entity which receives a minimum number of mailpieces per day.</td>
          </tr>
          <tr>
            <td><code>po_box</code></td>
            <td>The address is a PO Box.</td>
          </tr>
          <tr>
            <td><code>rural_route</code></td>
            <td>The address exists on a Rural Route. This is an older system of mail delivery which is still used in some parts of the country.</td>
          </tr>
          <tr>
            <td style="white-space: nowrap"><code>general_delivery</code></td>
            <td>The address is part of the USPS General Delivery service, which allows individuals without permanent addresses to receive mail.</td>
          </tr>
          <tr>
            <td><i>empty string</i></td>
            <td>A match could not be made with the provided inputs.</td>
          </tr>
        </tbody>
      </table>


      <h3>Carrier Route Types - <code>components[carrier_route_type]</code></h3>


      <table class="table-docs table-docs-code">
        <tbody>
          <tr>
            <td><code>city_delivery</code></td>
            <td>The default carrier route type. Used when none of the other types apply.</td>
          </tr>
          <tr>
            <td><code>rural_route</code></td>
            <td>The carrier route is a Rural Route. This is an older system of mail delivery which is still used in some parts of the country.</td>
          </tr>
          <tr>
            <td><code>highway_contract</code></td>
            <td>The carrier route is a Highway Contract Route. This is an older system of mail delivery which is still used in some parts of the country.</td>
          </tr>
          <tr>
            <td><code>po_box</code></td>
            <td>The carrier route consists of PO Boxes.</td>
          </tr>
          <tr>
            <td style="white-space: nowrap"><code>general_delivery</code></td>
            <td>The carrier route is part of the USPS General Delivery service, which allows individuals without permanent addresses to receive mail.</td>
          </tr>
          <tr>
            <td><i>empty string</i></td>
            <td>A match could not be made with the provided inputs.</td>
          </tr>
        </tbody>
      </table>


      <h3>DPV Footnotes -
      <code>deliverability_analysis[dpv_footnotes]</code></h3>


      <table class="table-docs table-docs-code">
        <tbody>
          <tr>
            <td style="white-space: nowrap"><code>AA</code></td>
            <td>Some parts of the address (such as the street and ZIP code) are valid.</td>
          </tr>
          <tr>
            <td><code>A1</code></td>
            <td>The address is invalid based on given inputs.</td>
          </tr>
          <tr>
            <td><code>BB</code></td>
            <td>The address is deliverable.</td>
          </tr>
          <tr>
            <td><code>CC</code></td>
            <td>The address is deliverable by removing the provided secondary unit designator.</td>
          </tr>
          <tr>
            <td><code>TA</code></td>
            <td>The address is deliverable by dropping a trailing alphabet from the primary number.</td>
          </tr>
          <tr>
            <td><code>IA</code></td>
            <td>The address is an <a href="https://www.usps.com/business/informed-address.htm" target="_blank">Informed Address</a>. The recipient and the street address is replaced with a special code provided by the USPS.</td>
          </tr>
          <tr>
            <td><code>N1</code></td>
            <td>The address is deliverable but is missing a secondary information (apartment, unit, etc).</td>
          </tr>
          <tr>
            <td><code>F1</code></td>
            <td>The address is a deliverable military address.</td>
          </tr>
          <tr>
            <td><code>G1</code></td>
            <td>The address is a deliverable General Delivery address. General Delivery is a USPS service which allows individuals without permanent addresses to receive mail.</td>
          </tr>
          <tr>
            <td><code>U1</code></td>
            <td>The address is a deliverable unique address. A unique ZIP code is assigned to a single organization (such as a government agency) that receives a large volume of mail.</td>
          </tr>
           <tr>
            <td><code>C1</code></td>
            <td>The primary number was confirmed whereas the secondary number is unconfirmed and required to be deliverable.</td>
          </tr>
          <tr>
            <td><code>M1</code></td>
            <td>The primary number is missing.</td>
          </tr>
          <tr>
            <td><code>M3</code></td>
            <td>The primary number is invalid.</td>
          </tr>
          <tr>
            <td><code>P1</code></td>
            <td>PO Box, Rural Route, or Highway Contract box number is missing.</td>
          </tr>
          <tr>
            <td><code>P3</code></td>
            <td>PO Box, Rural Route, or Highway Contract box number is invalid.</td>
          </tr>
          <tr>
            <td><code>PB</code></td>
            <td>The address is identified as PO Box street address.</td>
          </tr>
          <tr>
            <td><code>R1</code></td>
            <td>The address matched to a <a href="https://en.wikipedia.org/wiki/Commercial_mail_receiving_agency" target="_blank">CMRA</a> and private mailbox information is not present.</td>
          </tr>
          <tr>
            <td><code>R7</code></td>
            <td>The address matched to a Phantom Carrier Route (<code>carrier_route</code> of <code>R777</code>), which corresponds to physical addresses that are not eligible for delivery.</td>
          </tr>
          <tr>
            <td><code>RR</code></td>
            <td>The address matched to a <a href="https://en.wikipedia.org/wiki/Commercial_mail_receiving_agency" target="_blank">CMRA</a> and private mailbox information is present.</td>
          </tr>
        </tbody>
      </table>

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - name: US Verifications
    description: >
      Validate, automatically correct, and standardize the addresses in your

      address book based on USPS's <a
      href="https://postalpro.usps.com/certifications/cass"
      target="_blank">Coding Accuracy Support System (CASS)</a>.

      <br>

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>


      ## 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:


      <table>
        <tr>
          <th style="white-space: nowrap">ADDRESS TYPE FOR SAMPLE RESPONSE</th>
          <th style="white-space: nowrap">DELIVERABILITY</th>
          <th style="white-space: nowrap">SET <code>primary_line</code> OR <code>address</code> TO</th>
        </tr>
        <tr>
          <td style="white-space: nowrap">Commercial highrise</td>
          <td style="white-space: nowrap"><code>deliverable</code></td>
          <td style="white-space: nowrap"><code>commercial highrise</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Residential highrise</td>
          <td style="white-space: nowrap"><code>deliverable</code></td>
          <td style="white-space: nowrap"><code>residential highrise</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Residential house</td>
          <td style="white-space: nowrap"><code>deliverable</code></td>
          <td style="white-space: nowrap"><code>residential house</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">PO Box</td>
          <td style="white-space: nowrap"><code>deliverable</code></td>
          <td style="white-space: nowrap"><code>po box</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Rural route</td>
          <td style="white-space: nowrap"><code>deliverable</code></td>
          <td style="white-space: nowrap"><code>rural route</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Puerty Rico address w/ urbanization</td>
          <td style="white-space: nowrap"><code>deliverable</code></td>
          <td style="white-space: nowrap"><code>puerto rico</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Military address</td>
          <td style="white-space: nowrap"><code>deliverable</code></td>
          <td style="white-space: nowrap"><code>military</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Department of state</td>
          <td style="white-space: nowrap"><code>deliverable</code></td>
          <td style="white-space: nowrap"><code>department of state</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Generic deliverable</td>
          <td style="white-space: nowrap"><code>deliverable</code></td>
          <td style="white-space: nowrap"><code>deliverable</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Missing a suite number</td>
          <td style="white-space: nowrap"><code>deliverable_missing_unit</code></td>
          <td style="white-space: nowrap"><code>missing unit</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Suite number doesn't exist</td>
          <td style="white-space: nowrap"><code>deliverable_incorrect_unit</code></td>
          <td style="white-space: nowrap"><code>incorrect unit</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Residential house with unnecessary suite number</td>
          <td style="white-space: nowrap"><code>deliverable_unnecessary_unit</code></td>
          <td style="white-space: nowrap"><code>unnecessary unit</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Undeliverable and block matched</td>
          <td style="white-space: nowrap"><code>undeliverable</code></td>
          <td style="white-space: nowrap"><code>undeliverable block match</code></td>
        </tr>
        <tr>
          <td style="white-space: nowrap">Undeliverable and no block matched</td>
          <td style="white-space: nowrap"><code>undeliverable</code></td>
          <td style="white-space: nowrap"><code>undeliverable no match</code></td>
        </tr>
      </table>


      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

      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 <a
      href="https://lob.com/address-verification" target="_blank">live demo</a>
      or the free plan (see <a
      href="https://lob.com/pricing/address-verification" target="_blank">our
      pricing</a> for details).

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - name: Versioning and Changelog
    x-traitTag: true
    description: >
      ### API Versioning


      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

      view your version and upgrade to the latest version in your

      <a href="https://dashboard.lob.com/settings/api-keys"
      target="_blank">Dashboard Settings</a>. 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 <a
      href="https://stripe.com/blog/api-versioning" target="_blank">Stripe
      versioning</a>

      approach. This works well to manage backwards-incompatible changes to our
      API.


      For our API specification (used to create this documentation), we've
      chosen <a href="https://semver.org/" target="_blank">semantic

      versioning</a>. 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.



      ### Changelog
       <a href="https://app.getbeamer.com/lob/en?all" target="_blank">View our Changelog here.</a>
  - 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 <a href="https://dashboard.lob.com/#/settings/editions"
      target="_blank">Print & Mail Edition</a>.

      There is no limit in Test mode.

      You can view and create <a href="https://dashboard.lob.com/#/webhooks"
      target="_blank">webhooks</a> on the

      Lob Dashboard, as well as view your <a
      href="https://dashboard.lob.com/#/events" target="_blank">events</a>.

      See our <a
      href="https://help.lob.com/print-and-mail/getting-data-and-results/using-webhooks"
      target="_blank">Webhooks Integration Guide</a> for more

      details on how to integrate. Please see the full list of event types
      available for

      subscription here.

      <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
  - name: Zip Lookups
    description: >
      Find a list of cities, states and associated information about a US ZIP
      code. <div class="back-to-top" ><a href="#" onclick="toTopLink()">back to
      top</a></div>
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
      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 <YOUR API KEY>:
          label: CURL
  /addresses:
    get:
      operationId: addresses_list
      summary: List
      description: >-
        Returns a list of your addresses. The addresses are returned sorted by
        creation date, with the most recently created addresses appearing first.
      tags:
        - Addresses
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/before_after'
        - $ref: '#/components/parameters/include'
        - $ref: '#/components/parameters/date_created'
        - $ref: '#/components/parameters/metadata'
      responses:
        '200':
          $ref: '#/components/responses/all_addresses'
        default:
          $ref: '#/components/responses/address_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl -X GET "https://api.lob.com/v1/addresses?limit=2" \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:
          label: CURL
        - lang: Typescript
          source: |
            try {
              const addresses = await new AddressesApi(config).list(2);
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            Lob.addresses.list({limit: 2}, function (err, res) {
              console.log(err, res);
            });
          label: NODE
        - lang: Ruby
          source: |
            addressesApi = AddressesApi.new(config)

            begin
              addresses = addressesApi.list({ limit: 2 })
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = AddressesApi(api_client)

            try:
              addresses = api.list(limit=2)
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          source: >
            $apiInstance = new OpenAPI\Client\Api\AddressesApi($config, new
            GuzzleHttp\Client());


            try {
                $result = $apiInstance->list(
                  2, // limit
                );
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            AddressesApi apiInstance = new AddressesApi(config);

            try {
              AddressList response = apiInstance.list(
                2, // limit
                null, // before
                null, // after
                null, // include
                null, // dateCreated
                null // metadata
              );
            } catch (ApiException e) {
              e.printStackTrace();
            }
          label: JAVA
        - lang: Elixir
          source: |
            Lob.Address.list(%{limit: 2})
          label: ELIXIR
        - lang: CSharp
          source: >
            AddressesApi api = new AddressesApi(config);


            List<string> includeList = new List<string>();

            includeList.Add("total_count");

            Dictionary<String, String> metadata = new Dictionary<String,
            String>();

            metadata.Add("name", "Harry");

            Dictionary<String, DateTime> dateCreated = new Dictionary<String,
            DateTime>();

            DateTime dateCreatedDate = DateTime.Today.AddMonths(-1);

            dateCreated.Add("lt", dateCreatedDate);


            try {
              AddressList response = api.list(
                2, // limit
                null, // before
                null, // after
                includeList, // include
                dateCreated, // dateCreated
                metadata // metadata
              );
            } catch (ApiException e) {
              Console.WriteLine(e.ToString());
            }
          label: CSHARP
        - lang: Go
          source: >
            var context = context.Background()

            context = context.WithValue(suite.ctx, lob.ContextBasicAuth,
            lob.BasicAuth{UserName: os.Getenv("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)

            AddressList = apiClient.AddressesApi.List(context).Execute()

            if err != nil {
                return err
            }
          label: GO
    post:
      operationId: address_create
      summary: Create
      description: Creates a new address given information
      tags:
        - Addresses
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/address_editable'
            examples:
              full_us:
                value:
                  description: Harry - Office
                  name: Harry Zhang
                  company: Lob
                  email: harry@lob.com
                  phone: '5555555555'
                  address_line1: 210 King St
                  address_line2: '# 6100'
                  address_city: San Francisco
                  address_state: CA
                  address_zip: '94107'
                  address_country: US
              ncoa_us_test:
                value:
                  description: Harry - Office
                  name: Harry Zhang
                  company: Lob
                  email: harry@lob.com
                  phone: '5555555555'
                  address_line1: NCOA
                  address_line2: '#6100'
                  address_city: San Francisco
                  address_state: CA
                  address_zip: '94107'
                  address_country: US
              full_intl:
                value:
                  description: Harry - Office
                  name: Harry Zhang
                  company: Lob
                  email: harry@lob.com
                  phone: '5555555555'
                  address_line1: 370 WATER ST
                  address_line2: ''
                  address_city: SUMMERSIDE
                  address_state: PRINCE EDWARD ISLAND
                  address_zip: C1N 1C4
                  address_country: CA
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/address_editable'
            examples:
              full_us:
                value:
                  description: Harry - Office
                  name: Harry Zhang
                  company: Lob
                  email: harry@lob.com
                  phone: '5555555555'
                  address_line1: 210 King St
                  address_line2: '# 6100'
                  address_city: San Francisco
                  address_state: CA
                  address_zip: '94107'
                  address_country: US
              ncoa_us_test:
                value:
                  description: Harry - Office
                  name: Harry Zhang
                  company: Lob
                  email: harry@lob.com
                  phone: '5555555555'
                  address_line1: NCOA
                  address_line2: '# 6100'
                  address_city: San Francisco
                  address_state: CA
                  address_zip: '94107'
                  address_country: US
              full_intl:
                value:
                  description: Harry - Office
                  name: Harry Zhang
                  company: Lob
                  email: harry@lob.com
                  phone: '5555555555'
                  address_line1: 370 WATER ST
                  address_line2: ''
                  address_city: SUMMERSIDE
                  address_state: PRINCE EDWARD ISLAND
                  address_zip: C1N 1C4
                  address_country: CA
            encoding:
              metadata:
                style: deepObject
                explode: true
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/address_editable'
            examples:
              full_us:
                value:
                  description: Harry - Office
                  name: Harry Zhang
                  company: Lob
                  email: harry@lob.com
                  phone: '5555555555'
                  address_line1: 210 King St
                  address_line2: '# 6100'
                  address_city: San Francisco
                  address_state: CA
                  address_zip: '94107'
                  address_country: US
              ncoa_us_test:
                value:
                  description: Harry - Office
                  name: Harry Zhang
                  company: Lob
                  email: harry@lob.com
                  phone: '5555555555'
                  address_line1: NCOA
                  address_line2: '# 6100'
                  address_city: San Francisco
                  address_state: CA
                  address_zip: '94107'
                  address_country: US
              full_intl:
                value:
                  description: Harry - Office
                  name: Harry Zhang
                  company: Lob
                  email: harry@lob.com
                  phone: '5555555555'
                  address_line1: 370 WATER ST
                  address_line2: ''
                  address_city: SUMMERSIDE
                  address_state: PRINCE EDWARD ISLAND
                  address_zip: C1N 1C4
                  address_country: CA
      responses:
        '200':
          $ref: '#/components/responses/post_address'
        default:
          $ref: '#/components/responses/address_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl https://api.lob.com/v1/addresses \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \
              -d "description=Harry - Office" \
              -d "name=Harry Zhang" \
              -d "company=Lob" \
              -d "email=harry@lob.com" \
              -d "phone=5555555555" \
              -d "address_line1=210 King St" \
              -d "address_line2=# 6100" \
              -d "address_city=San Francisco" \
              -d "address_state=CA" \
              -d "address_zip=94107" \
              -d "address_country=US"
          label: CURL
        - lang: Typescript
          source: |
            const addressCreate = new AddressEditable({
              description: 'Harry - Office',
              name: 'Harry Zhang',
              company: 'Lob',
              email: 'harry@lob.com',
              phone: '5555555555',
              address_line1: '210 King St',
              address_line2: '# 6100',
              address_city: 'San Francisco',
              address_state: 'CA',
              address_zip: '94107',
              address_country: 'US'
            });

            try {
              const myAddress = await new AddressesApi(config).create(addressCreate);
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            Lob.addresses.create({
              description: 'Harry - Office',
              name: 'Harry Zhang',
              company: 'Lob',
              email: 'harry@lob.com',
              phone: '5555555555',
              address_line1: '210 King St',
              address_line2: '# 6100',
              address_city: 'San Francisco',
              address_state: 'CA',
              address_zip: '94107',
              address_country: 'US'
            }, function (err, res) {
              console.log(err, res);
            });
          label: NODE
        - lang: Ruby
          source: |
            addressCreate = AddressEditable.new({
              description: "Harry - Office",
              name: "Harry Zhang",
              company: "Lob",
              email: "harry@lob.com",
              phone: "5555555555",
              address_line1: "210 King St",
              address_line2: "# 6100",
              address_city: "San Francisco",
              address_state: "CA",
              address_zip: "94107",
              address_country: "US",
            });

            addressApi = AddressesApi.new(config)

            begin
              createdAddress = addressApi.create(addressCreate)
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            address_editable = AddressEditable(
              description = "Harry - Office",
              name = "Harry Zhang",
              company = "Lob",
              email = "harry@lob.com",
              phone = "5555555555",
              address_line1 = "210 King St",
              address_line2 = "# 6100",
              address_city = "San Francisco",
              address_state = "CA",
              address_zip = "94107",
              address_country = CountryExtended("US"),
            )

            with ApiClient(configuration) as api_client:
              api = AddressesApi(api_client)

            try:
              created_address = api.create(address_editable)
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          source: >
            $apiInstance = new OpenAPI\Client\Api\AddressesApi($config, new
            GuzzleHttp\Client());


            $address_editable = new OpenAPI\Client\Model\AddressEditable(
              array(
                "description"     => "Harry - Office",
                "name"     => "Harry Zhang",
                "company"     => "Lob",
                "email"     => "harry@lob.com",
                "phone"     => "5555555555",
                "address_line1"     => "210 King St",
                "address_line2"     => "# 6100",
                "address_city"     => "San Francisco",
                "address_state"     => "CA",
                "address_zip"     => "94107",
                "address_country"     => "US",
              )
            );


            try {
                $result = $apiInstance->create($address_editable);
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            AddressesApi apiInstance = new AddressesApi(config);

            try {
              AddressEditable addressEditable = new AddressEditable();
              addressEditable.setDescription("Harry - Office");
              addressEditable.setName("Harry Zhang");
              addressEditable.setCompany("Lob");
              addressEditable.setEmail("harry@lob.com");
              addressEditable.setPhone("5555555555");
              addressEditable.setAddressLine1("210 King St");
              addressEditable.setAddressLine2("# 6100");
              addressEditable.setAddressCity("San Francisco");
              addressEditable.setAddressState("CA");
              addressEditable.setAddressZip("94107");
              addressEditable.setAddressCountry(CountryExtended.US);

              Address result = apiInstance.create(addressEditable);
            } catch (ApiException e) {
              e.printStackTrace();
            }
          label: JAVA
        - lang: Elixir
          source: |
            Lob.Address.create(%{
              description: "Harry - Office",
              name: "Harry Zhang",
              company: "Lob",
              email: "harry@lob.com",
              phone: "5555555555",
              address_line1: "210 King St",
              address_line2: "# 6100",
              address_city: "San Francisco",
              address_state: "CA",
              address_country: "US",
              address_zip: "94107"
            })
          label: ELIXIR
        - lang: CSharp
          source: |
            AddressesApi api = new AddressesApi(config);

            AddressEditable addressEditable = new AddressEditable(
              "210 King St",  // addressLine1
              "# 6100",  // addressLine2
              "San Francisco",  // addressCity
              "CA",  // addressState
              "94107",  // addressZip
              CountryExtended.US,  // addressCountry
              "Harry - Office",  // description
              "Harry Zhang",  // name
              "Lob",  // company
              "5555555555",  // phone
              "harry@lob.com" // email
            );

            try {
              Address result = api.create(addressEditable);
            } catch (ApiException e) {
              Console.WriteLine(e.ToString());
            }
          label: CSHARP
        - lang: Go
          source: >
            var context = context.Background()

            context = context.WithValue(suite.ctx, lob.ContextBasicAuth,
            lob.BasicAuth{UserName: os.Getenv("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)



            var addressCreate = *lob.NewAddressEditable()

            addressCreate.SetDescription("Harry - Office")

            addressCreate.SetName("Harry Zhang")

            addressCreate.SetCompany("Lob")

            addressCreate.SetEmail("harry@lob.com")

            addressCreate.SetPhone("5555555555")

            addressCreate.SetAddressLine1("210 King St")

            addressCreate.SetAddressLine2("# 6100")

            addressCreate.SetAddressCity("San Francisco")

            addressCreate.SetAddressState("CA")

            addressCreate.SetAddressZip("94107")

            addressCreate.SetAddressCountry("US")




            createdaddress, _, err :=
            apiClient.AddressesApi.Create(context).AddressEditable(addressCreate).Execute()


            if err != nil {
                return err
            }
          label: GO
  /addresses/{adr_id}:
    parameters:
      - in: path
        name: adr_id
        description: id of the address
        required: true
        schema:
          $ref: '#/components/schemas/adr_id'
    get:
      operationId: address_retrieve
      summary: Retrieve
      description: >-
        Retrieves the details of an existing address. You need only supply the
        unique identifier that was returned upon address creation.
      tags:
        - Addresses
      responses:
        '200':
          $ref: '#/components/responses/address'
        default:
          $ref: '#/components/responses/address_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl https://api.lob.com/v1/addresses/adr_fa85158b26c3eb7c \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:
          label: CURL
        - lang: Typescript
          source: |
            try {
              const address = await new AddressesApi(config).get('adr_xxxx');
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            Lob.addresses.retrieve('adr_fa85158b26c3eb7c', function (err, res) {
              console.log(err, res);
            });
          label: NODE
        - lang: Ruby
          source: |
            addressApi = AddressesApi.new(config)

            begin
              retrievedAddress = addressApi.get("adr_fa85158b26c3eb7c")
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = AddressesApi(api_client)

            try:
              address = api.get("adr_fa85158b26c3eb7c")
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          source: >
            $apiInstance = new OpenAPI\Client\Api\AddressesApi($config, new
            GuzzleHttp\Client());


            try {
                $result = $apiInstance->get("adr_fa85158b26c3eb7c");
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            AddressesApi apiInstance = new AddressesApi(config);

            try {
              Address response = apiInstance.get("adr_fa85158b26c3eb7c");
            } catch (ApiException e) {
              e.printStackTrace();
            }
          label: JAVA
        - lang: Elixir
          source: |
            Lob.Address.retrieve("adr_fa85158b26c3eb7c")
          label: ELIXIR
        - lang: CSharp
          source: |
            AddressesApi api = new AddressesApi(config);

            try {
              Address response = api.get("adr_fa85158b26c3eb7c");
            } catch (ApiException e) {
              Console.WriteLine(e.ToString());
            }
          label: CSHARP
        - lang: Go
          source: >
            var context = context.Background()

            context = context.WithValue(suite.ctx, lob.ContextBasicAuth,
            lob.BasicAuth{UserName: os.Getenv("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)


            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)

            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)

            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());


            try {
                $result = $apiInstance->delete("adr_43769b47aed248c2");
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            AddressesApi apiInstance = new AddressesApi(config);

            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);

            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("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)


            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:
      operationId: bank_account_verify
      summary: Verify
      description: Verify a bank account in order to create a check.
      tags:
        - Bank_id
        - Verify
      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/post_bank_account'
        default:
          $ref: '#/components/responses/bank_account_error'
      x-codeSamples:
        - lang: Shell
          source: >
            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 verifiedAccount = await new BankAccountsApi(config).verify('bank_xxxx', verificationData);
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            Lob.bankAccounts.verify('bank_dfceb4a2a05b57e', {
              amounts: [25, 63]
            }, function (err, res) {
              console.log(err, res);
            });
          label: NODE
        - lang: Ruby
          source: |
            verificationData = BankAccountVerify.new({
              amounts: [
                25,
                63,
              ],
            })

            bankAccountsApi = BankAccountsApi.new(config)

            begin
              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 = BankAccountsApi(api_client)

            try:
              verified_account = api.verify("bank_dfceb4a2a05b57e", verification_data)
            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,
            ]);


            try {
                $result = $apiInstance->verify(
                  "bank_dfceb4a2a05b57e", $bankVerify
                );
            } 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);
            } catch (ApiException e) {
              e.printStackTrace();
            }
          label: JAVA
        - lang: Elixir
          source: |
            Lob.BankAccount.verify("bank_dfceb4a2a05b57e", %{amounts: [25, 63]})
          label: ELIXIR
        - lang: CSharp
          source: |
            List<int> amounts = new List<int>();
            amounts.Add(25);
            amounts.Add(63);

            BankAccountVerify verification = new BankAccountVerify(amounts);

            BankAccountsApi api = new BankAccountsApi(config);

            try {
              BankAccount verified_account = api.verify("bank_dfceb4a2a05b57e", verification);
            } 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("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)


            var bankAccountWritable = *lob.NewBankAccountWritable("322271627",
            "123456789", lob.BANKTYPEENUM_INDIVIDUAL, "Sinead Connor")


            createdBankAccount, _, _ :=
            apiClient.BankAccountsApi.Create(context).BankAccountWritable(bankAccountWritable).Execute()


            verifyAmounts := []int32{11, 35}

            verify := *lob.NewBankAccountVerify(verifyAmounts)


            verifiedAccount, _, err := apiClient.BankAccountsApi.Verify(context,
            createdBankAccount.Id).BankAccountVerify(verify).Execute()


            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'
    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_id
      responses:
        '200':
          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/bank_account_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl https://api.lob.com/v1/bank_accounts/bank_8cad8df5354d33f \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:
          label: CURL
        - lang: Typescript
          source: |
            try {
              const bankAccount = await new BankAccountsApi(config).get('bank_xxxx');
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: >
            Lob.bankAccounts.retrieve('bank_8cad8df5354d33f', function (err,
            res) {
              console.log(err, res);
            });
          label: NODE
        - lang: Ruby
          source: |
            bankAccountApi = BankAccountsApi.new(config)

            begin
              retrievedBankAccount = bankAccountApi.get("bank_8cad8df5354d33f")
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = BankAccountsApi(api_client)

            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());


            try {
                $result = $apiInstance->get("bank_8cad8df5354d33f");
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            BankAccountsApi apiInstance = new BankAccountsApi(config);

            try {
              BankAccount response = apiInstance.get("bank_8cad8df5354d33f");
            } catch (ApiException e) {
              e.printStackTrace();
            }
          label: JAVA
        - lang: Elixir
          source: |
            Lob.BankAccount.find("bank_8cad8df5354d33f")
          label: ELIXIR
        - lang: CSharp
          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("<YOUR_API_KEY>")})


            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.
      tags:
        - Bank_id
      responses:
        '200':
          $ref: '#/components/responses/bank_account_deleted'
        default:
          $ref: '#/components/responses/bank_account_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("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)


            deletedBankAccount, _, err :=
            apiClient.BankAccountsApi.Delete(context,
            "bank_3e64d9904356b20").Execute()


            if err != nil {
                return err
            }
          label: GO
  /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:
        - 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/all_bank_accounts'
        default:
          $ref: '#/components/responses/bank_account_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl -X GET "https://api.lob.com/v1/bank_accounts?limit=2" \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:
          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<string> includeList = new List<string>();

            includeList.Add("total_count");

            Dictionary<String, String> metadata = new Dictionary<String,
            String>();

            metadata.Add("name", "Harry");

            Dictionary<String, DateTime> dateCreated = new Dictionary<String,
            DateTime>();

            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("<YOUR_API_KEY>")})


            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".
      tags:
        - Bank  Accounts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/bank_account_base'
            example:
              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_base'
            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
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/bank_account_base'
            example:
              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'
        default:
          $ref: '#/components/responses/bank_account_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"
          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("<YOUR_API_KEY>")})


            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:
        - Bg_id
      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 <YOUR API KEY>:
        - 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("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)


            fetchedBillingGroup, _, err :=
            apiClient.BillingGroupsApi.Get(context,"bg_4bb02b527a72667d0").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:
        - Bg_id
      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 <YOUR API KEY>: \
            -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("<YOUR_API_KEY>")})


            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
      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
        default:
          $ref: '#/components/responses/billing_group_list_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl -X GET "https://api.lob.com/v1/billing_groups?limit=2" \
            -u <YOUR API KEY>:
        - lang: Ruby
          source: |
            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("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)

            BillingGroupList =
            apiClient.BillingGroupsApi.List(context).Execute()

            if err != nil {
                return err
            }
          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 <YOUR API KEY>: \

            -d "name=Marketing Department" \

            -d "description=Usage group used for the Marketing Department's
            resource sends"
        - lang: Ruby
          source: |
            bgCreate = BillingGroupEditable.new({
              description: "Usage group used for the Marketing Department's resource sends",
              name: "Marketing Department",
            });

            bgApi = BillingGroupsApi.new(config)

            begin
              createdBillingGroup = bgApi.create(bgCreate)
            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("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)



            var bgCreate = *lob.NewBillingGroupEditable()

            bgCreate.SetDescription("Usage group used for the Marketing
            Department's resource sends")

            bgCreate.SetName("Marketing Department")




            createdbg, _, err :=
            apiClient.BillingGroupsApi.Create(context).BillingGroupEditable(bgCreate).Execute()


            if err != nil {
                return err
            }
          label: GO
  /booklets/{booklet_id}:
    parameters:
      - in: path
        name: booklet_id
        description: id of the booklet
        required: true
        schema:
          $ref: '#/components/schemas/booklet_id'
    get:
      operationId: booklet_retrieve
      summary: Retrieve
      description: >-
        Retrieves the details of an existing booklet. You need to only supply
        the unique booklet identifier that was returned upon booklet creation.
      tags:
        - Booklet_id
      responses:
        '200':
          description: Returns a booklet object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/booklet'
              example:
                id: ord_0d6a16a3fff6318ac8f8008dc1
                description: April Campaign
                metadata: {}
                to:
                  id: adr_d3489cd64c791ab5
                  description: null
                  name: HARRY ZHANG
                  company: null
                  phone: null
                  email: null
                  address_line1: 210 KING ST STE 6100
                  address_line2: null
                  address_city: SAN FRANCISCO
                  address_state: CA
                  address_zip: 94107-1741
                  address_country: UNITED STATES
                  metadata: {}
                  date_created: '2017-09-05T15:54:53.264Z'
                  date_modified: '2017-09-05T15:54:53.264Z'
                  deleted: true
                  object: address
                from:
                  id: adr_b8fb5acf3a2b55db
                  description: null
                  name: LEORE AVIDAR
                  company: null
                  phone: null
                  email: null
                  address_line1: 210 KING ST STE 6100
                  address_line2: null
                  address_city: SAN FRANCISCO
                  address_state: CA
                  address_zip: 94107-1741
                  address_country: UNITED STATES
                  metadata: {}
                  date_created: '2017-09-05T15:54:53.264Z'
                  date_modified: '2017-09-05T15:54:53.264Z'
                  deleted: true
                  object: address
                mail_type: usps_first_class
                url: >-
                  https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d.pdf?version=v1&expires=1618512040&signature=qvyCqXI1ndBvc4AjvG8FlirqLXEcfmYo4sDrRtabaXMOsX88to9G3K49uIk_aqevvZXe8HoRYD_nWydbQHqaCA
                carrier: USPS
                tracking_number: null
                tracking_events: []
                thumbnails:
                  - small: >-
                      https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_small_1.png?version=v1&expires=1618512040&signature=-bipeUHP-hAMcCBSrWM0ZH1VwRdSPNVGGZN9hAZKr6Lh4ly6uxvratVd5LXJCK_zOEMYk_mTWASt0ge7OY6SDA
                    medium: >-
                      https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_medium_1.png?version=v1&expires=1618512040&signature=ryxN7bsXGtw_GRFSP3Cs3A3IYjxZi3cW9BHDCNgMt6p3nobVmsc_iFHt2e-S7ndAXhhN7nP-MQVov3bt3r37BQ
                    large: >-
                      https://lob-assets.com/order-creatives/ord_0d6a16a3fff6318ac8f8008dc1_comp_a20fd48ba4efda76ee827400d_thumb_large_1.png?version=v1&expires=1618512040&signature=kBrm00xkyCkJNJRHxH8HshFaebtOxnzjVWOs1VVmGMuw8H6OBNcMAMxt9s49K0jlpHoh3Nr9uSncEZMQaaNjAg
                merge_variables:
                  name: Harry
                size: 8.375x5.375
                pages: 8
                source_material: 60# Gloss Text
                expected_delivery_date: '2021-03-24'
                date_created: '2021-03-16T18:40:40.504Z'
                date_modified: '2021-03-16T18:40:40.504Z'
                send_date: '2021-03-16T18:45:40.493Z'
                use_type: marketing
                fsc: false
                object: booklet
        default:
          $ref: '#/components/responses/mailpiece_error'
      x-codeSamples:
        - lang: Shell
          source: >
            curl -X GET
            "https://api.lob.com/v1/booklets/ord_0d6a16a3fff6318ac8f8008dc1" \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:
          label: CURL
    delete:
      operationId: booklet_delete
      summary: Delete
      description: >-
        Completely removes a booklet from production. This can only be done if
        the booklet's `send_date` has not yet passed. If the booklet is
        successfully canceled, you will not be charged for it.
      tags:
        - Booklet_id
      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: []
      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: []
      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 style='padding-top: 3in; margin: .5in;'>HTML Booklet for
                {{name}}</html>
              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 style='padding-top: 3in; margin: .5in;'>HTML Booklet for
                {{name}}</html>
              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 style='padding-top: 3in; margin: .5in;'>HTML Booklet for
                {{name}}</html>
              mail_type: usps_first_class
              merge_variables:
                name: Harry
              metadata:
                spiffy: 'true'
              send_date: '2017-11-01T00:00:00.000Z'
              use_type: marketing
              qr_code:
                position: relative
                redirect_url: https://www.lob.com
                width: '2'
                top: '2'
                right: '2'
                pages: 1-2,4-5
              fsc: true
              size: 8.375x5.375
      responses:
        '200':
          $ref: '#/components/responses/post_booklet'
        default:
          $ref: '#/components/responses/mailpiece_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl https://api.lob.com/v1/booklets \
              -u YOUR_API_KEY \
              -d 'description=Demo Booklet' \
              -d 'to[name]=Harry Zhang' \
              -d 'to[address_line1]=210 King St' \
              -d 'to[address_line2]=# 6100' \
              -d 'to[address_city]=San Francisco' \
              -d 'to[address_state]=CA' \
              -d 'to[address_zip]=94107' \
              -d 'from=adr_210a8d4b0b76d77b' \
              --data-urlencode 'file=<html style="padding-top: 3in; margin: .5in;">HTML Booklet for {{name}}</html>' \
              -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: []
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/before_after'
        - $ref: '#/components/parameters/include'
      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'
      x-codeSamples:
        - lang: Shell
          source: |
            curl -X GET "https://api.lob.com/v1/buckslips?limit=2" \
              -u <YOUR API KEY>:
          label: CURL
    post:
      operationId: buckslip_create
      summary: Create
      description: Creates a new buckslip given information
      tags: []
      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 <YOUR API KEY>: \
              -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: 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:
        - Buckslip_id
      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 https://api.lob.com/v1/buckslips/bck_7a6d73c5c8457fc \
              -u <YOUR API KEY>:
          label: CURL
    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:
        - Buckslip_id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/buckslip_updatable'
            example:
              description: Test buckslip
              auto_reorder: true
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/buckslip_updatable'
            example:
              description: Test buckslip
              auto_reorder: true
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/buckslip_updatable'
            example:
              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 <YOUR API KEY>: \
              -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:
        - Buckslip_id
      responses:
        '200':
          $ref: '#/components/responses/buckslip_deleted'
        default:
          $ref: '#/components/responses/buckslip_error'
      x-codeSamples:
        - lang: Shell
          source: >
            curl -X DELETE https://api.lob.com/v1/buckslips/bck_7a6d73c5c8457fc
            \
              -u <YOUR API KEY>:
          label: CURL
  /buckslips/{buckslip_id}/orders:
    parameters:
      - in: path
        name: buckslip_id
        description: The ID of the buckslip to which the buckslip orders belong.
        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.
      tags:
        - Buckslip_id
        - 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 <YOUR API KEY>:
          label: CURL
    post:
      operationId: buckslip_order_create
      summary: Create
      description: Creates a new buckslip order given information
      tags:
        - Buckslip_id
        - 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: Buckslip order created successfully
          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 <YOUR API KEY>: \
              -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:
        - Bulk
        - U S  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'
        default:
          $ref: '#/components/responses/us_verifications_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl https://api.lob.com/v1/bulk/us_verifications \
            -u <YOUR LIVE API KEY>: \
            --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: |
            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,
              ],
            )

            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;
            }
        - 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<MultipleComponents> addresses = new List<MultipleComponents>();

            MultipleComponents bulkAddress0 = new MultipleComponents(
              null,  // recipient
              "210 King Street",  // primaryLine
              null,  // secondaryLine
              null,  // urbanization
              "San Francisco",  // city
              "CA",  // state
              "94017" // zipCode
            );

            addresses.Add(bulkAddress0);


            MultipleComponents bulkAddress1 = new MultipleComponents(
              null,  // recipient
              "185 BERRY ST STE 6600",  // primaryLine
              null,  // secondaryLine
              null,  // urbanization
              "San Francisco",  // city
              "CA",  // state
              "94017" // zipCode
            );

            addresses.Add(bulkAddress1);


            MultipleComponentsList bulkVerify = new
            MultipleComponentsList(addresses);


            UsVerificationsApi api = new UsVerificationsApi(config);

            try {
              UsVerifications bulkVerifyResponse = api.verifyBulk(bulkVerify, null);
            } catch (ApiException e) {
              Console.WriteLine(e.ToString());
            }
          label: CSHARP
  /bulk/intl_verifications:
    post:
      operationId: bulk_intl_verifications
      summary: Bulk Verify
      description: >-
        Verify a list of international (except US or US territories) address
        _with a live API key_. Requests to this endpoint with a test API key
        will return a dummy response based on the primary line you input.
      tags:
        - Bulk
        - Intl  Verifications
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/intl_verifications_payload'
            example:
              addresses:
                - recipient: John Doe
                  primary_line: 370 Water St
                  secondary_line: ''
                  city: Summerside
                  state: Prince Edwards Island
                  postal_code: C1N 1C4
                  country: CA
                - recipient: Jane Doe
                  primary_line: UL. DOLSKAYA 1
                  secondary_line: ''
                  city: MOSCOW
                  state: MOSCOW G
                  postal_code: '115569'
                  country: RU
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/intl_verifications_payload'
            example:
              addresses:
                - recipient: John Doe
                  primary_line: 370 Water St
                  secondary_line: ''
                  city: Summerside
                  state: Prince Edwards Island
                  postal_code: C1N 1C4
                  country: CA
                - recipient: Jane Doe
                  primary_line: UL. DOLSKAYA 1
                  secondary_line: ''
                  city: MOSCOW
                  state: MOSCOW G
                  postal_code: '115569'
                  country: RU
      responses:
        '200':
          $ref: '#/components/responses/bulk_intl_verifications'
        default:
          $ref: '#/components/responses/intl_verifications_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl https://api.lob.com/v1/bulk/intl_verifications \
            -u <YOUR LIVE API KEY>: \
            --header 'Content-Type: application/x-www-form-urlencoded' \
            --data-urlencode 'addresses[0][primary_line]=370 WATER ST' \
            --data-urlencode 'addresses[0][postal_code]=C1N 1C4' \
            --data-urlencode 'addresses[0][country]=CA'
          label: CURL
        - lang: Typescript
          source: |
            const IntlVerifications = new IntlVerificationsApi(av_config);
            let verificationData1: IntlVerificationWritable = {
                primary_line: '370 WATER ST',
                postal_code: 'C1N 1C4',
                country: CountryExtended.Ca
            };
            const verificationData2: IntlVerificationWritable = {
                primary_line: '012 PLACEHOLDER ST',
                postal_code: 'F0O 8A2',
                country: CountryExtended.Ca
            };
            let addressList = new IntlVerificationsPayload({
                addresses: [verificationData1, verificationData2]
            });

            try {
              const bulkVerified = await IntlVerifications.verifyBulk(addressList);

            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            Lob.bulkIntlVerifications.verify({
              addresses: [{
                primary_line: '370 Water St',
                secondary_line: '',
                city: 'Summerside',
                state: 'Prince Edward Island',
                postal_code: 'C1N 1C4',
                country: 'CA'
              }]
            }), function (err, res) {
              console.log(err, res);
            });
          label: NODE
        - lang: Ruby
          source: |
            intlVerificationsApi = IntlVerificationsApi.new(config)

            verificationData0 = MultipleComponentsIntl.new({
              primary_line: "35 Tower Hill",
              city: "London",
              postal_code: "EC3N 4DR",
              country: "GB",
            })

            verificationData1 = MultipleComponentsIntl.new({
              primary_line: "370 Water St",
              city: "Summerside",
              state: "Prince Edward Island",
              postal_code: "C1N 1C4",
              country: "CA",
            })


            addressList = IntlVerificationsPayload.new({
              addresses: [
                verificationData0,
                verificationData1,
              ],
            })

            begin
              bulkVerifiedAddrs = intlVerificationsApi.verifyBulk(addressList)
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = IntlVerificationsApi(api_client)

            verification_data_0 = MultipleComponentsIntl(
              primary_line = "35 Tower Hill",
              city = "London",
              postal_code = "EC3N 4DR",
              country = CountryExtended("GB"),
            )

            verification_data_1 = MultipleComponentsIntl(
              primary_line = "370 Water St",
              city = "Summerside",
              state = "Prince Edward Island",
              postal_code = "C1N 1C4",
              country = CountryExtended("CA"),
            )


            address_list = IntlVerificationsPayload(
              addresses = [
                verification_data_0,
                verification_data_1,
              ],
            )

            try:
              bulk_verified = api.verifyBulk(address_list)
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          source: >
            $verificationData0 = new
            OpenAPI\Client\Model\MultipleComponentsIntl(array(
              'primary_line'     => '35 Tower Hill',
              'city'     => 'London',
              'postal_code'     => 'EC3N 4DR',
              'country'     => 'GB',
            ));


            $verificationData1 = new
            OpenAPI\Client\Model\MultipleComponentsIntl(array(
              'primary_line'     => '370 Water St',
              'city'     => 'Summerside',
              'state'     => 'Prince Edward Island',
              'postal_code'     => 'C1N 1C4',
              'country'     => 'CA',
            ));


            $addressList = new
            OpenAPI\Client\Model\IntlVerificationsPayload(array(
              'addresses'     => [
                $verificationData0,
                $verificationData1,
              ]
            ));


            try {
                $result = $apiInstance->verifyBulk($addressList);
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: >
            List<IntlVerification.RequestBuilder> addresses = new
            ArrayList<IntlVerification.RequestBuilder>();

            addresses.add(new IntlVerification.RequestBuilder()
                    .setPrimaryLine("370 Water St")
                    .setCity("Summerside")
                    .setState("Prince Edward Island")
                    .setPostalCode("C1N 1C4")
                    .setCountry("CA"));
            LobResponse<BulkIntlVerification> 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<MultipleComponentsIntl> addresses = new
            List<MultipleComponentsIntl>();

            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);


            try {
              IntlVerifications bulkVerifyResponse = api.verifyBulk(bulkVerify);
            } 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 <YOUR API KEY>:
          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: 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 <YOUR API KEY>: \
              -d "name=My First Campaign" \
              -d "schedule_type=immediate"
          label: CURL
        - lang: Ruby
          source: |
            campaignCreate = CampaignWritable.new({
              name: "My First Campaign",
              schedule_type: "immediate",
            });

            campaignApi = CampaignsApi.new(config)

            begin
              createdCampaign = campaignApi.create(campaignCreate)
            rescue => err
              p err.message
            end
          label: RUBY
  /campaigns/{cmp_id}:
    parameters:
      - in: path
        name: cmp_id
        description: id of the campaign
        required: true
        schema:
          $ref: '#/components/schemas/cmp_id'
    get:
      operationId: campaign_retrieve
      summary: Retrieve
      description: >-
        Retrieves the details of an existing campaign. You need only supply the
        unique campaign identifier that was returned upon campaign creation.
      tags:
        - Campaigns
      responses:
        '200':
          description: Returns a campaign object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaign'
              example:
                id: cmp_e05ee61ff80764b
                billing_group_id: bg_fe3079dcdd80e5ae
                name: My Campaign
                description: My Campaign's description
                schedule_type: immediate
                cancel_window_campaign_minutes: 60
                metadata: {}
                use_type: marketing
                is_draft: true
                deleted: false
                creatives: []
                uploads: []
                auto_cancel_if_ncoa: false
                date_created: '2017-09-05T17:47:53.767Z'
                date_modified: '2017-09-05T17:47:53.767Z'
                object: campaign
        default:
          $ref: '#/components/responses/campaigns_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl https://api.lob.com/v1/campaigns/cmp_e05ee61ff80764b \
              -u <YOUR API KEY>:
          label: CURL
        - lang: Ruby
          source: |
            campaignApi = CampaignsApi.new(config)

            begin
              retrievedCampaign = campaignApi.get("cmp_e05ee61ff80764b")
            rescue => err
              p err.message
            end
          label: RUBY
    patch:
      operationId: campaign_update
      summary: Update
      description: >-
        Update the details of an existing campaign. You need only supply the
        unique identifier that was returned upon campaign creation.
      tags:
        - Campaigns
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/campaign_updatable'
            example:
              description: Test campaign
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/campaign_updatable'
            example:
              description: Test campaign
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/campaign_updatable'
            example:
              description: Test campaign
      responses:
        '200':
          description: Returns a campaign object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaign'
              example:
                id: cmp_e05ee61ff80764b
                billing_group_id: bg_fe3079dcdd80e5ae
                name: My Campaign
                description: My Campaign's description
                schedule_type: immediate
                cancel_window_campaign_minutes: 60
                metadata: {}
                use_type: marketing
                is_draft: true
                deleted: false
                creatives: []
                uploads: []
                auto_cancel_if_ncoa: false
                date_created: '2017-09-05T17:47:53.767Z'
                date_modified: '2017-09-05T17:47:53.767Z'
                object: campaign
        default:
          $ref: '#/components/responses/campaigns_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl -X PATCH https://api.lob.com/v1/campaigns/cmp_e05ee61ff80764b \
              -u <YOUR API KEY>: \
              -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: campaign_delete
      summary: Delete
      description: >-
        Delete an existing campaign. You need only supply the unique identifier
        that was returned upon campaign creation. Deleting a campaign also
        deletes any associated mail pieces that have been created but not sent.
        A campaign's `send_date` matches its associated mail pieces'
        `send_date`s.
      tags:
        - Campaigns
      responses:
        '200':
          $ref: '#/components/responses/campaign_deleted'
        default:
          $ref: '#/components/responses/campaigns_error'
      x-codeSamples:
        - lang: Shell
          source: >
            curl -X DELETE https://api.lob.com/v1/campaigns/cmp_e05ee61ff80764b
            \
              -u <YOUR API KEY>:
          label: CURL
        - 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: cmp_id
        description: id of the campaign
        required: true
        schema:
          $ref: '#/components/schemas/cmp_id'
    post:
      operationId: campaign_send
      summary: Send Campaign
      description: >-
        Sends a campaign. You need only supply the unique campaign identifier
        that was returned upon campaign creation.
      tags:
        - Campaigns
        - Send
      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 <YOUR API KEY>:
          label: CURL
  /cards:
    get:
      operationId: cards_list
      summary: List
      description: >-
        Returns a list of your cards. The cards are returned sorted by creation
        date, with the most recently created addresses appearing first.
      tags:
        - Cards
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/before_after'
        - $ref: '#/components/parameters/include'
      responses:
        '200':
          description: Returns a list of card objects
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/list'
                  - type: object
                    properties:
                      data:
                        type: array
                        description: list of cards
                        items:
                          $ref: '#/components/schemas/card'
              example:
                data:
                  - id: card_7a6d73c5c8457fc
                    account_id: fa9ea650fc7b31a89f92
                    description: null
                    url: >-
                      https://lob-assets.com/cards/card_c51ae96f5cebf3e.pdf?version=v1&expires=1636910992&signature=mnsDH2DAxdkN9VibdlLMxJC86sME5WYDqkNtmvGwdNsAaUWfbnv0rJhJ1mR8Ol4uxQq61j5wYZ0r3s-lBkQfDA
                    size: 2.125x3.375
                    auto_reorder: false
                    reorder_quantity: null
                    raw_url: >-
                      https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw
                    front_original_url: >-
                      https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw
                    back_original_url: >-
                      https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw
                    thumbnails:
                      - small: >-
                          https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_small_1.png?version=v1&expires=1636910992&signature=mrv8JDvpZK4I8WUGH0tPdtK-My5oes0Ltj_gL7BDw96SpCTTeZFHkz81SzclyFP9dQRtlsvAsjcuGcTBvCvOCg
                        medium: >-
                          https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_medium_1.png?version=v1&expires=1636910992&signature=VgL_2Ckm_kxKiWGgWtdNoy9HHOn8dGYSVOn7UqyCbwdbVlUtx28TRN4Bo8Iru3n0keKp9He0YhKT1ILotznMDA
                        large: >-
                          https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_large_1.png?version=v1&expires=1636910992&signature=FKSzymA13j-CQ0uk20cGHZTzT3vimzNBYrgp-xifLFg4mMdo1BZALR5O0aF_jVhsX614hKP35ONdYl47TQxXAw
                    available_quantity: 10000
                    pending_quantity: 0
                    countries: null
                    status: rendered
                    mode: test
                    orientation: horizontal
                    threshold_amount: 0
                    date_created: '2021-03-24T22:51:42.838Z'
                    date_modified: '2021-03-24T22:51:42.838Z'
                    send_date: '2021-03-24T22:51:42.838Z'
                    object: card
                object: list
                previous_url: null
                next_url: null
                count: 1
        default:
          $ref: '#/components/responses/mailpiece_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl -X GET "https://api.lob.com/v1/cards?limit=2" \
              -u <YOUR API KEY>:
          label: CURL
        - lang: Typescript
          source: |
            try {
              const cards = await new CardsApi(config).list(2);
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            Lob.cards.list({limit: 2}, function (err, res) {
              console.log(err, res);
            });
          label: NODE
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = CardsApi(api_client)

            try:
              cards = api.list(limit=2)
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          source: |
            $lob->cards()->all(array(
              'limit' => 2
            ));
        - lang: CSharp
          source: |
            CardsApi api = new CardsApi(config);
            List<string> includeList = new List<string>();
            includeList.Add("total_count");

            try {
              CardList response = api.list(
                2, // limit
                null, // before
                null, // after
                includeList // include
              );
            } catch (ApiException e) {
              Console.WriteLine(e.ToString());
            }
          label: CSHARP
        - lang: Ruby
          source: |
            cardsApi = CardsApi.new(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("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)

            CardList = apiClient.CardsApi.List(context).Execute()

            if err != nil {
                return err
            }
          label: GO
    post:
      operationId: card_create
      summary: Create
      description: Creates a new card given information
      tags:
        - Cards
      requestBody:
        required: true
        content:
          application/json:
            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
          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/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
      responses:
        '200':
          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/mailpiece_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl https://api.lob.com/v1/cards \
              -u <YOUR API KEY>: \
              -d "description=Test card" \
              -d "front=https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf" \
              -d "back=https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf" \
              -d "size=2.125x3.375"
          label: CURL
        - lang: Typescript
          source: |
            const cardsCreate = new CardEditable({
              front: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf',
              back: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf',
              size: CardEditableSizeEnum._2125x3375,
              description: 'Test card'
            });

            try {
              const myCard = await new CardsApi(config).create(cardsCreate);
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            Lob.cards.create({
              description: 'Test card',
              front: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf',
              back: 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf',
              size: '2.125x3.375'
            }, function (err, res) {
              console.log(err, res);
            });
          label: NODE
        - lang: Python
          source: |
            card_editable = CardEditable(
              front = "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf",
              back = "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf",
              size = "2.125x3.375",
              description = "Test Card",
            )

            with ApiClient(configuration) as api_client:
              api = CardsApi(api_client)

            try:
              created_card = api.create(card_editable)
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          source: |
            $lob->cards()->create(array(
              'description'           => 'Test card',
              'front'                 => 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf',
              'back'                  => 'https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf',
              'size' =>               => '2.125x3.375'
            ));
          label: PHP
        - lang: CSharp
          source: |
            CardsApi api = new CardsApi(config);

            CardEditable cardEditable = new CardEditable(
              "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf",  // front
              "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf",  // back
              CardEditable.SizeEnum._2125x3375,  // size
              "Test Card" // description
            );

            try {
              Card result = api.create(cardEditable);
            } catch (ApiException e) {
              Console.WriteLine(e.ToString());
            }
          label: CSHARP
        - lang: Ruby
          source: |
            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: >
            var context = context.Background()

            context = context.WithValue(suite.ctx, lob.ContextBasicAuth,
            lob.BasicAuth{UserName: os.Getenv("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)



            var cardCreate = *lob.NewCardEditable()

            cardCreate.SetFront("https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf")

            cardCreate.SetBack("https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf")

            cardCreate.SetSize("2.125x3.375")

            cardCreate.SetDescription("Test Card")




            createdcard, _, err :=
            apiClient.CardsApi.Create(context).CardEditable(cardCreate).Execute()


            if err != nil {
                return err
            }
          label: GO
  /cards/{card_id}:
    parameters:
      - in: path
        name: 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.
      tags:
        - Cards
      responses:
        '200':
          description: Returns a card object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/card'
              examples:
                basic:
                  value:
                    id: card_7a6d73c5c8457fc
                    account_id: fa9ea650fc7b31a89f92
                    description: Test card
                    url: >-
                      https://lob-assets.com/cards/card_c51ae96f5cebf3e.pdf?version=v1&expires=1636910992&signature=mnsDH2DAxdkN9VibdlLMxJC86sME5WYDqkNtmvGwdNsAaUWfbnv0rJhJ1mR8Ol4uxQq61j5wYZ0r3s-lBkQfDA
                    size: 2.125x3.375
                    auto_reorder: false
                    reorder_quantity: null
                    raw_url: >-
                      https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw
                    front_original_url: >-
                      https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw
                    back_original_url: >-
                      https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw
                    thumbnails:
                      - small: >-
                          https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_small_1.png?version=v1&expires=1636910992&signature=mrv8JDvpZK4I8WUGH0tPdtK-My5oes0Ltj_gL7BDw96SpCTTeZFHkz81SzclyFP9dQRtlsvAsjcuGcTBvCvOCg
                        medium: >-
                          https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_medium_1.png?version=v1&expires=1636910992&signature=VgL_2Ckm_kxKiWGgWtdNoy9HHOn8dGYSVOn7UqyCbwdbVlUtx28TRN4Bo8Iru3n0keKp9He0YhKT1ILotznMDA
                        large: >-
                          https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_large_1.png?version=v1&expires=1636910992&signature=FKSzymA13j-CQ0uk20cGHZTzT3vimzNBYrgp-xifLFg4mMdo1BZALR5O0aF_jVhsX614hKP35ONdYl47TQxXAw
                      - small: >-
                          https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_small_2.png?version=v1&expires=1636910992&signature=IWsmPa_ULlv2yyqjX564d_YfHHY_M7i9YxDnw-WXDr2jtOFcArmRZQbnHeE9g_rYxnddJbgosuv8-c2utiu7Cg
                        medium: >-
                          https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_medium_2.png?version=v1&expires=1636910992&signature=zxK7VKGiTvz5Ywrkaydd0v3GcYf58R7A08J4tNfI7-aiNODDcTF3l0MqY13n9Pyc8RXSdD0XVBY-OpbA1VM-Ag
                        large: >-
                          https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_large_2.png?version=v1&expires=1636910992&signature=r0OFUhh315ZwN0raMZdIwJd2oCIEYsz0BABaMxIuO1PKTD0ckGWrhcGdzk2dlWQ6vSvp0CUQ5k1RXGqkIIqkDw
                    available_quantity: 10000
                    pending_quantity: 0
                    countries: null
                    status: rendered
                    mode: test
                    orientation: horizontal
                    threshold_amount: 0
                    date_created: '2021-03-24T22:51:42.838Z'
                    date_modified: '2021-03-24T22:51:42.838Z'
                    send_date: '2021-03-24T22:51:42.838Z'
                    object: card
        default:
          $ref: '#/components/responses/mailpiece_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl https://api.lob.com/v1/cards/card_7a6d73c5c8457fc \
              -u <YOUR API KEY>:
          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: |
            cardApi = CardsApi.new(config)

            begin
              retrievedCard = cardApi.get("card_7a6d73c5c8457fc")
            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("<YOUR_API_KEY>")})


            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 card. You need only supply the unique
        identifier that was returned upon card creation.
      tags:
        - Cards
      requestBody:
        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
      responses:
        '200':
          description: Returns a card object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/card'
              examples:
                basic:
                  value:
                    id: card_7a6d73c5c8457fc
                    account_id: fa9ea650fc7b31a89f92
                    description: Test card
                    url: >-
                      https://lob-assets.com/cards/card_c51ae96f5cebf3e.pdf?version=v1&expires=1636910992&signature=mnsDH2DAxdkN9VibdlLMxJC86sME5WYDqkNtmvGwdNsAaUWfbnv0rJhJ1mR8Ol4uxQq61j5wYZ0r3s-lBkQfDA
                    size: 2.125x3.375
                    auto_reorder: false
                    reorder_quantity: null
                    raw_url: >-
                      https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw
                    front_original_url: >-
                      https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw
                    back_original_url: >-
                      https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw
                    thumbnails:
                      - small: >-
                          https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_small_1.png?version=v1&expires=1636910992&signature=mrv8JDvpZK4I8WUGH0tPdtK-My5oes0Ltj_gL7BDw96SpCTTeZFHkz81SzclyFP9dQRtlsvAsjcuGcTBvCvOCg
                        medium: >-
                          https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_medium_1.png?version=v1&expires=1636910992&signature=VgL_2Ckm_kxKiWGgWtdNoy9HHOn8dGYSVOn7UqyCbwdbVlUtx28TRN4Bo8Iru3n0keKp9He0YhKT1ILotznMDA
                        large: >-
                          https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_large_1.png?version=v1&expires=1636910992&signature=FKSzymA13j-CQ0uk20cGHZTzT3vimzNBYrgp-xifLFg4mMdo1BZALR5O0aF_jVhsX614hKP35ONdYl47TQxXAw
                      - small: >-
                          https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_small_2.png?version=v1&expires=1636910992&signature=IWsmPa_ULlv2yyqjX564d_YfHHY_M7i9YxDnw-WXDr2jtOFcArmRZQbnHeE9g_rYxnddJbgosuv8-c2utiu7Cg
                        medium: >-
                          https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_medium_2.png?version=v1&expires=1636910992&signature=zxK7VKGiTvz5Ywrkaydd0v3GcYf58R7A08J4tNfI7-aiNODDcTF3l0MqY13n9Pyc8RXSdD0XVBY-OpbA1VM-Ag
                        large: >-
                          https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_large_2.png?version=v1&expires=1636910992&signature=r0OFUhh315ZwN0raMZdIwJd2oCIEYsz0BABaMxIuO1PKTD0ckGWrhcGdzk2dlWQ6vSvp0CUQ5k1RXGqkIIqkDw
                    available_quantity: 10000
                    pending_quantity: 0
                    countries: null
                    status: rendered
                    mode: test
                    orientation: horizontal
                    threshold_amount: 0
                    date_created: '2021-03-24T22:51:42.838Z'
                    date_modified: '2021-03-24T22:51:42.838Z'
                    send_date: '2021-03-24T22:51:42.838Z'
                    object: card
        default:
          $ref: '#/components/responses/mailpiece_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl -X POST https://api.lob.com/v1/cards/card_7a6d73c5c8457fc \
              -u <YOUR API KEY>: \
              -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: |
            card_updatable = CardUpdatable(
              description = "Awesome card",
              auto_reorder = True,
              reorder_quantity = 10000,
            )

            with ApiClient(configuration) as api_client:
              api = CardsApi(api_client)

            try:
              updated_card = api.update("card_6afffd19045076c", card_updatable)
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: Ruby
          source: |
            cardUpdatable = CardUpdatable.new({
              description: "Awesome card",
              auto_reorder: "true",
              reorder_quantity: 10000,
            })

            cardApi = CardsApi.new(config)

            begin
              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("<YOUR_API_KEY>")})


            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: card_delete
      summary: Delete
      description: >-
        Delete an existing card. You need only supply the unique identifier that
        was returned upon card creation.
      tags:
        - Cards
      responses:
        '200':
          $ref: '#/components/responses/card_deleted'
        default:
          $ref: '#/components/responses/mailpiece_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl -X DELETE https://api.lob.com/v1/cards/card_7a6d73c5c8457fc \
              -u <YOUR API KEY>:
          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: |
            cardApi = CardsApi.new(config)

            begin
              deletedCard = cardApi.delete("card_6afffd19045076c")
            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("<YOUR_API_KEY>")})


            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: card_id
        description: The ID of the card to which the card orders belong.
        required: true
        schema:
          $ref: '#/components/schemas/card_id'
    get:
      operationId: card_orders_retrieve
      summary: Retrieve
      description: Retrieves the card orders associated with the given card id.
      tags:
        - Cards
        - Orders
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: Returns the card orders associated with the given card id
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/list'
                  - type: object
                    properties:
                      data:
                        type: array
                        description: List of card orders
                        items:
                          $ref: '#/components/schemas/card_order'
              example:
                data:
                  - id: co_e0f8a0562a06bea7f
                    card_id: card_6afffd19045076c
                    status: available
                    inventory: 9500
                    quantity_ordered: 10000
                    unit_price: 0.75
                    cancelled_reason: No longer needed
                    availability_date: '2021-10-12T21:41:48.326Z'
                    expected_availability_date: '2021-11-04T21:03:18.871Z'
                    date_created: '2021-10-07T21:03:18.871Z'
                    date_modified: '2021-10-16T01:00:30.144Z'
                    object: card_order
                object: list
                next_url: null
                previous_url: null
                count: 1
        default:
          $ref: '#/components/responses/card_order_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl https://api.lob.com/v1/cards/card_6afffd19045076c/orders/ \
              -u <YOUR API KEY>:
          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)

            begin
              retrievedCardOrderList = cardOrderApi.get("card_6afffd19045076c", { limit: 2, offset: 1 })
            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("<YOUR_API_KEY>")})


            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
      tags:
        - Cards
        - Orders
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/card_order_editable'
            example:
              quantity: 10000
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/card_order_editable'
            example:
              quantity: 10000
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/card_order_editable'
            example:
              quantity: 10000
      responses:
        '200':
          description: Card order created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/card_order'
              examples:
                basic:
                  value:
                    id: co_e0f8a0562a06bea7f
                    card_id: card_6afffd19045076c
                    status: available
                    inventory: 9500
                    quantity_ordered: 10000
                    unit_price: 0.75
                    cancelled_reason: No longer needed
                    availability_date: '2021-10-12T21:41:48.326Z'
                    expected_availability_date: '2021-11-04T21:03:18.871Z'
                    date_created: '2021-10-07T21:03:18.871Z'
                    date_modified: '2021-10-16T01:00:30.144Z'
                    object: card_order
        default:
          $ref: '#/components/responses/mailpiece_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl https://api.lob.com/v1/cards/card_6afffd19045076c/orders \
              -u <YOUR API KEY>: \
              -d "quantity=10000"
          label: CURL
        - lang: Typescript
          source: |
            const cardForCreate = new CardOrderEditable({
              quantity: 200
            });

            try {
              const myCardOrder = await new CardOrdersApi(config).create('card_xxxx', cardForCreate);
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            Lob.cardOrders.create('card_6afffd19045076c', {
              quantity: 10000
            }, function (err, res) {
              console.log(err, res);
            });
          label: NODE
        - lang: Python
          source: |
            card_order_editable = CardOrderEditable(
              quantity = 10000,
            )

            with ApiClient(configuration) as api_client:
              api = CardOrdersApi(api_client)

            try:
              created_card_order = api.create("card_6afffd19045076c", card_order_editable)
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          source: |
            $lob->cardOrders('card_6afffd19045076c')->create(array(
              'quantity'           => 10000
            ));
        - lang: CSharp
          source: |
            CardOrdersApi api = new CardOrdersApi(config);

            CardOrderEditable cardOrderEditable = new CardOrderEditable(
              10000 // quantity
            );

            try {
              CardOrder result = api.create("card_6afffd19045076c", cardOrderEditable);
            } catch (ApiException e) {
              Console.WriteLine(e.ToString());
            }
          label: CSHARP
        - 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("<YOUR_API_KEY>")})


            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: |
            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 = 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
          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: >
            ChecksApi api = new ChecksApi(config);


            List<string> includeList = new List<string>();

            includeList.Add("total_count");

            Dictionary<String, String> metadata = new Dictionary<String,
            String>();

            metadata.Add("name", "Harry");

            Dictionary<String, DateTime> dateCreated = new Dictionary<String,
            DateTime>();

            DateTime dateCreatedDate = DateTime.Today.AddMonths(-1);

            dateCreated.Add("lt", dateCreatedDate);

            Dictionary<String, String> sendDate = new Dictionary<String,
            String>();

            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("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)

            CheckList = apiClient.ChecksApi.List(context).Execute()

            if err != nil {
                return err
            }
          label: GO
    post:
      operationId: check_create
      summary: Create
      description: Creates a new check with the provided properties.
      tags:
        - 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':
          $ref: '#/components/responses/post_check'
        default:
          $ref: '#/components/responses/mailpiece_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=<h1 style="padding-top:4in;">Demo Check for {{name}}</h1>' \
              -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 myCheck = await new ChecksApi(config).create(checkCreate);
            } catch (err: any) {
              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: '<h1 style="padding-top:4in;">Demo Check for {{name}}</h1>',
              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: "<h1 style='padding-top:4in;'>Demo Check for {{name}}</h1>",
              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 = "<h1 style='padding-top:4in;'>Demo Check for {{name}}</h1>",
              _from = "adr_210a8d4b0b76d77b",
              to = AddressDomestic(
                name = "Harry Zhang",
                address_line1 = "210 King St",
                address_line2 = "# 6100",
                address_city = "San Francisco",
                address_state = "CA",
                address_zip = "94107",
              ),
              merge_variables = MergeVariables(
                name = "Harry",
              ),
              use_type = "operational"
            )

            with ApiClient(configuration) as api_client:
              api = ChecksApi(api_client)

            try:
              created_check = api.create(check_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 = "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"     => "<h1 style='padding-top:4in;'>Demo Check for {{name}}</h1>",
                "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<String, String> merge_variables = new HashMap<String, String>();
            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("<h1 style='padding-top:4in;'>Demo Check for {{name}}</h1>");
              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: '<h1 style="padding-top:4in;">Demo Check for {{name}}</h1>',
              merge_variables: %{
                name: 'Harry'
              },
              use_type: 'operational'
            })
          label: ELIXIR
        - lang: CSharp
          source: >
            Dictionary<string, string> mergeVariables = new Dictionary<string,
            string>();

            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
              "<h1 style='padding-top:4in;'>Demo Check for {{name}}</h1>",  // checkBottom
              default(string),  // attachment
              "Demo Check",  // description
              default(Dictionary<string, string>),  // metadata
              mergeVariables,  // mergeVariables
              default(DateTime),  // sendDate
              CheckEditable.MailTypeEnum.UspsFirstClass,  // mailType
              "rent", // memo
              "operational" // use_type
            );


            try {
              Check result = api.create(checkEditable, null);
            } catch (ApiException e) {
              Console.WriteLine(e.ToString());
            }
          label: CSHARP
        - lang: Go
          source: >
            var context = context.Background()

            context = context.WithValue(suite.ctx, lob.ContextBasicAuth,
            lob.BasicAuth{UserName: os.Getenv("<YOUR_API_KEY>")})


            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("<h1 style='padding-top:4in;'>Demo Check
            for {{name}}</h1>")

            checkCreate.SetFrom("adr_210a8d4b0b76d77b")

            checkCreate.SetTo(to)



            createdcheck, _, err :=
            apiClient.ChecksApi.Create(context).CheckEditable(checkCreate).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.
      tags:
        - Checks
      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
        default:
          $ref: '#/components/responses/mailpiece_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl https://api.lob.com/v1/checks/chk_534f10783683daa0 \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:
          label: CURL
        - lang: Typescript
          source: |
            try {
              const check = await new ChecksApi(config).get('chk_xxxx');
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            Lob.checks.retrieve('chk_534f10783683daa0', function (err, res) {
              console.log(err, res);
            });
          label: NODE
        - lang: Ruby
          source: |
            checkApi = ChecksApi.new(config)

            begin
              retrievedCheck = checkApi.get("chk_534f10783683daa0")
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = ChecksApi(api_client)

            try:
              check = api.get("chk_534f10783683daa0")
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          source: >
            $apiInstance = new OpenAPI\Client\Api\ChecksApi($config, new
            GuzzleHttp\Client());


            try {
                $result = $apiInstance->get("chk_534f10783683daa0");
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            ChecksApi apiInstance = new ChecksApi(config);

            try {
              Check response = apiInstance.get("chk_534f10783683daa0");
            } catch (ApiException e) {
              e.printStackTrace();
            }
          label: JAVA
        - lang: Elixir
          source: |
            Lob.Check.find("chk_534f10783683daa0")
          label: ELIXIR
        - lang: CSharp
          source: |
            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("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)


            fetchedCheck, _, err :=
            apiClient.ChecksApi.Get(context,"chk_534f10783683daa0").Execute()


            if err != nil {
                return err
            }
          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 <a
        href="https://dashboard.lob.com/#/settings/editions"
        target="_blank">Print & Mail Edition</a> to gain access.
      tags:
        - Checks
      responses:
        '200':
          $ref: '#/components/responses/check_canceled'
        default:
          $ref: '#/components/responses/mailpiece_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl -X DELETE https://api.lob.com/v1/checks/chk_534f10783683daa0 \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:
          label: CURL
        - lang: Typescript
          source: |
            try {
              const deleteCheck = await new ChecksApi(config).cancel('chk_xxxx');
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            Lob.checks.cancel('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 = ChecksApi(api_client)

            try:
              deleted_resource = api.cancel("chk_534f10783683daa0")
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          source: >
            $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: |
            ChecksApi api = new ChecksApi(config);

            try {
              CheckDeletion response = api.cancel("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("<YOUR_API_KEY>")})


            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: []
      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 <YOUR API KEY>: \
              -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.
      tags:
        - Crv_id
      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 https://api.lob.com/v1/creatives/crv_2a3b096c409b32c \
              -u <YOUR API KEY>:
          label: CURL
        - lang: Ruby
          source: |
            creativeApi = CreativesApi.new(config)

            begin
              retrievedCreative = creativeApi.get("crv_2a3b096c409b32c")
            rescue => err
              p err.message
            end
          label: RUBY
    patch:
      operationId: creative_update
      summary: Update
      description: >-
        Update the details of an existing creative. You need only supply the
        unique identifier that was returned upon creative creation.
      tags:
        - Crv_id
      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 <YOUR API KEY>: \
              -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)

            try:
              updated_creative = api.update("crv_2a3b096c409b32c", creative_patch)
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: Ruby
          source: |
            creativePatch = CreativePatch.new({
              description: "Our updated 4x6 postcard creative",
            })

            creativeApi = CreativesApi.new(config)

            begin
              updatedCreative = creativeApi.update("crv_2a3b096c409b32c", creativePatch)
            rescue => err
              p err.message
            end
          label: RUBY
  /identity_validation:
    post:
      operationId: identity_validation
      summary: Identity Validation
      description: Validates whether a given name is associated with an address.
      tags:
        - Identity  Validation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/identity_validation_writable'
            example:
              recipient: Larry Lobster
              primary_line: 210 King St.
              secondary_line: ''
              city: San Francisco
              state: CA
              zip_code: '94107'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/identity_validation_writable'
            example:
              recipient: Larry Lobster
              primary_line: 210 King St.
              secondary_line: ''
              city: San Francisco
              state: CA
              zip_code: '94107'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/identity_validation_writable'
            example:
              recipient: Larry Lobster
              primary_line: 210 King St.
              secondary_line: ''
              city: San Francisco
              state: CA
              zip_code: '94107'
      responses:
        '200':
          $ref: '#/components/responses/identity_validation'
        default:
          $ref: '#/components/responses/identity_validation_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl https://api.lob.com/v1/identity_validation \
              -u <YOUR_LIVE_API_KEY>: \
              -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: informed_delivery_campaign_list
      summary: List
      description: List Informed Delivery campaigns
      tags:
        - Informed  Delivery  Campaign
      responses:
        '200':
          $ref: '#/components/responses/all_informed_delivery_campaigns'
      x-codeSamples:
        - lang: Shell
          source: |
            curl https://api.lob.com/v1/informed_delivery_campaign \
              -u <YOUR API KEY>:
          label: CURL
    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: |
            curl --request POST \
              --url https://api.lob.com/v1/informed_delivery_campaigns \
              -u <YOUR API KEY>: \
              --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:
        - Usps_campaign_id
      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: |
            curl https://api.lob.com/v1/informed_delivery_campaign/1200772869 \
              -u <YOUR API KEY>:
          label: CURL
    patch:
      operationId: informed_delivery_campaign_update
      summary: Update
      description: >-
        Update the details of an existing Informed Delivery campaign.<br>
        **NOTE:** you can only update a campaign in the `pending_approval`
        status.
      tags:
        - Usps_campaign_id
      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: |
            curl -X PATCH https://api.lob.com/v1/creatives/crv_2a3b096c409b32c \
              -u <YOUR API KEY>: \
              -d '{"status":"approved"}'
          label: CURL
  /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:
        - 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':
          $ref: '#/components/responses/intl_verifications'
        default:
          $ref: '#/components/responses/intl_verifications_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl https://api.lob.com/v1/intl_verifications \
              -u <YOUR_LIVE_API_KEY>: \
              -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 singleVerified = await IntlVerifications.verifySingle(verificationData1);
            } 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'
            }, function (err, res) {
              console.log (err, res);
            });
          label: NODE
        - lang: Ruby
          source: |
            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
              verifiedAddr = intlVerificationsApi.verifySingle(verificationData)
            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"),
            )

            try:
              single_verified = api.verifySingle(verification_data_1)
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          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->verifySingle($verificationData);
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: >
            LobResponse<IntlVerification> response = new
            IntlVerification.RequestBuilder()
                    .setPrimaryLine("370 Water St")
                    .setCity("Summerside")
                    .setState("Prince Edward Island")
                    .setPostalCode("C1N 1C4")
                    .setCountry("CA")
                    .verify();

            IntlVerification intlVerification = response.getResponseBody();
          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"
            })
          label: ELIXIR
        - lang: CSharp
          source: >
            IntlVerificationWritable singleVerify = new
            IntlVerificationWritable(
              null,
              "370 Water St",
              null,
              "Summerside",
              "Prince Edward Island",
              "C1N 1C4",
              CountryExtended.CA
            );


            IntlVerificationsApi api = new IntlVerificationsApi(config);


            try {
              api.verifySingle(singleVerify, null);
            } catch (ApiException e) {
              Console.WriteLine(e.ToString());
            }
          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:
        - Ltr_id
      responses:
        '200':
          description: Returns a letter object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/letter'
              example:
                id: ltr_4868c3b754655f90
                description: Demo Letter
                metadata: {}
                to:
                  id: adr_d3489cd64c791ab5
                  description: null
                  name: HARRY ZHANG
                  company: null
                  phone: null
                  email: null
                  address_line1: 210 KING ST STE 6100
                  address_line2: null
                  address_city: SAN FRANCISCO
                  address_state: CA
                  address_zip: 94107-1741
                  address_country: UNITED STATES
                  metadata: {}
                  date_created: '2017-09-05T15:54:53.264Z'
                  date_modified: '2017-09-05T15:54:53.264Z'
                  deleted: true
                  object: address
                from:
                  id: adr_b8fb5acf3a2b55db
                  description: null
                  name: LEORE AVIDAR
                  company: null
                  phone: null
                  email: null
                  address_line1: 210 KING ST STE 6100
                  address_line2: null
                  address_city: SAN FRANCISCO
                  address_state: CA
                  address_zip: 94107-1741
                  address_country: UNITED STATES
                  metadata: {}
                  date_created: '2017-09-05T15:54:53.264Z'
                  date_modified: '2017-09-05T15:54:53.264Z'
                  deleted: true
                  object: address
                color: true
                double_sided: true
                address_placement: top_first_page
                return_envelope: false
                perforated_page: null
                custom_envelope: null
                extra_service: null
                mail_type: usps_first_class
                url: >-
                  https://lob-assets.com/letters/ltr_4868c3b754655f90.pdf?expires=1540372221&signature=8r94fse8uam7wGWmW5baxXulU88X2CA
                carrier: USPS
                tracking_number: null
                tracking_events: []
                thumbnails:
                  - small: >-
                      https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_small_1.png?expires=1540372221&signature=a5fRBJ22ZA78Vgpg34M9UfmHWTS3eha
                    medium: >-
                      https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_medium_1.png?expires=1540372221&signature=bAzL8sv935PY09FWSkpDpWKkyvGSWYF
                    large: >-
                      https://lob-assets.com/letters/ltr_4868c3b754655f90_thumb_large_1.png?expires=1540372221&signature=gsKvxXgrm4v4iZD3bOibK7jApNkEMdW
                merge_variables:
                  name: Harry
                expected_delivery_date: '2017-09-12'
                date_created: '2017-09-05T15:54:53.346Z'
                date_modified: '2017-09-05T15:54:53.346Z'
                send_date: '2017-09-05T15:54:53.346Z'
                cards:
                  - id: card_c51ae96f5cebf3e
                    account_id: fa9ea650fc7b31a89f92
                    description: null
                    url: >-
                      https://lob-assets.com/cards/card_c51ae96f5cebf3e.pdf?version=v1&expires=1636910992&signature=mnsDH2DAxdkN9VibdlLMxJC86sME5WYDqkNtmvGwdNsAaUWfbnv0rJhJ1mR8Ol4uxQq61j5wYZ0r3s-lBkQfDA
                    size: 2.125x3.375
                    auto_reorder: false
                    reorder_quantity: null
                    raw_url: >-
                      https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw
                    front_original_url: >-
                      https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw
                    back_original_url: >-
                      https://lob-assets.com/cards/card_c51ae96f5cebf3e_raw.pdf?version=v1&expires=1636910992&signature=-bZo31FMAp2vmNaZKyXn_Qa4APqwtNinw76FrQ7uyQejFZw6VBQQYfoiQ642iXh0H2K5i2aOo8_BAkt3UJdVDw
                    thumbnails:
                      - small: >-
                          https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_small_1.png?version=v1&expires=1636910992&signature=mrv8JDvpZK4I8WUGH0tPdtK-My5oes0Ltj_gL7BDw96SpCTTeZFHkz81SzclyFP9dQRtlsvAsjcuGcTBvCvOCg
                        medium: >-
                          https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_medium_1.png?version=v1&expires=1636910992&signature=VgL_2Ckm_kxKiWGgWtdNoy9HHOn8dGYSVOn7UqyCbwdbVlUtx28TRN4Bo8Iru3n0keKp9He0YhKT1ILotznMDA
                        large: >-
                          https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_large_1.png?version=v1&expires=1636910992&signature=FKSzymA13j-CQ0uk20cGHZTzT3vimzNBYrgp-xifLFg4mMdo1BZALR5O0aF_jVhsX614hKP35ONdYl47TQxXAw
                      - small: >-
                          https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_small_2.png?version=v1&expires=1636910992&signature=IWsmPa_ULlv2yyqjX564d_YfHHY_M7i9YxDnw-WXDr2jtOFcArmRZQbnHeE9g_rYxnddJbgosuv8-c2utiu7Cg
                        medium: >-
                          https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_medium_2.png?version=v1&expires=1636910992&signature=zxK7VKGiTvz5Ywrkaydd0v3GcYf58R7A08J4tNfI7-aiNODDcTF3l0MqY13n9Pyc8RXSdD0XVBY-OpbA1VM-Ag
                        large: >-
                          https://lob-assets.com/cards/card_c51ae96f5cebf3e_thumb_large_2.png?version=v1&expires=1636910992&signature=r0OFUhh315ZwN0raMZdIwJd2oCIEYsz0BABaMxIuO1PKTD0ckGWrhcGdzk2dlWQ6vSvp0CUQ5k1RXGqkIIqkDw
                    available_quantity: 10000
                    pending_quantity: 0
                    countries: null
                    status: rendered
                    mode: test
                    orientation: horizontal
                    threshold_amount: 0
                    date_created: '2017-08-05T15:54:53.346Z'
                    date_modified: '2017-08-05T15:54:53.346Z'
                    object: card
                use_type: marketing
                fsc: false
                object: letter
        default:
          $ref: '#/components/responses/mailpiece_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl https://api.lob.com/v1/letters/ltr_4868c3b754655f90 \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:
          label: CURL
        - lang: Typescript
          source: |
            try {
              const letter= await new LettersApi(config).get('ltr_xxxx');
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            Lob.letters.retrieve('ltr_4868c3b754655f90', function (err, res) {
              console.log(err, res);
            });
          label: NODE
        - lang: Ruby
          source: |
            letterApi = LettersApi.new(config)

            begin
              retrievedLetter = letterApi.get("ltr_4868c3b754655f90")
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = LettersApi(api_client)

            try:
              letter = api.get("ltr_4868c3b754655f90")
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          source: >
            $apiInstance = new OpenAPI\Client\Api\LettersApi($config, new
            GuzzleHttp\Client());


            try {
                $result = $apiInstance->get("ltr_4868c3b754655f90");
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            LettersApi apiInstance = new LettersApi(config);

            try {
              Letter response = apiInstance.get("ltr_4868c3b754655f90");
            } catch (ApiException e) {
              e.printStackTrace();
            }
          label: JAVA
        - lang: Elixir
          source: |
            Lob.Letter.find("ltr_4868c3b754655f90")
          label: ELIXIR
        - lang: CSharp
          source: |
            LettersApi api = new LettersApi(config);

            try {
              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("<YOUR_API_KEY>")})


            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 <a
        href="https://dashboard.lob.com/#/settings/editions"
        target="_blank">Print & Mail Edition</a> to gain access.
      tags:
        - Ltr_id
      responses:
        '200':
          $ref: '#/components/responses/letter_deleted'
        default:
          $ref: '#/components/responses/mailpiece_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl -X DELETE https://api.lob.com/v1/letters/ltr_4868c3b754655f90 \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:
          label: CURL
        - lang: Typescript
          source: |
            try {
              const deleteLetter = await new LettersApi(config).cancel('ltr_xxxx')
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            Lob.letters.cancel('ltr_4868c3b754655f90', function (err, res) {
              console.log(err, res);
            });
          label: NODE
        - lang: Ruby
          source: |
            letterApi = LettersApi.new(config)

            begin
              deletedLetter = letterApi.cancel("ltr_4868c3b754655f90")
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = LettersApi(api_client)

            try:
              deleted_resource = api.cancel("ltr_4868c3b754655f90")
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          source: >
            $apiInstance = new OpenAPI\Client\Api\LettersApi($config, new
            GuzzleHttp\Client());


            try {
                $result = $apiInstance->cancel("ltr_4868c3b754655f90");
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            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("<YOUR_API_KEY>")})


            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: []
      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/all_letters'
        default:
          $ref: '#/components/responses/mailpiece_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl -X GET "https://api.lob.com/v1/letters?limit=2" \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:
          label: CURL
        - lang: typescript
          source: |
            try {
              const letters = await new LettersApi(config).list(2);
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            Lob.letters.list({limit: 2}, function (err, res) {
              console.log(err, res);
            });
          label: NODE
        - lang: Ruby
          source: |
            lettersApi = LettersApi.new(config)

            begin
              letters = lettersApi.list({ limit: 2 })
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = LettersApi(api_client)

            try:
              letters = 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());


            try {
                $result = $apiInstance->list(
                  2, // limit
                );
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            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: |
            Lob.Letter.list(%{limit: 2})
          label: ELIXIR
        - lang: CSharp
          source: >
            LettersApi api = new LettersApi(config);


            List<string> includeList = new List<string>();

            includeList.Add("total_count");

            Dictionary<String, String> metadata = new Dictionary<String,
            String>();

            metadata.Add("name", "Harry");

            Dictionary<String, DateTime> dateCreated = new Dictionary<String,
            DateTime>();

            DateTime dateCreatedDate = DateTime.Today.AddMonths(-1);

            dateCreated.Add("lt", dateCreatedDate);

            Dictionary<String, String> sendDate = new Dictionary<String,
            String>();

            sendDate.Add("lt",
            DateTime.Now.ToString("yyyy-MM-ddTHH\\:mm\\:ss.fffffffzzz"));

            SortBy3 sortBy = new SortBy3(SortBy3.DateCreatedEnum.Asc);


            try {
              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: >
            var context = context.Background()

            context = context.WithValue(suite.ctx, lob.ContextBasicAuth,
            lob.BasicAuth{UserName: os.Getenv("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)

            LetterList = apiClient.LettersApi.List(context).Execute()

            if err != nil {
                return err
            }
          label: GO
    post:
      operationId: letter_create
      summary: Create
      description: Creates a new letter given information
      tags: []
      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'
            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 style='padding-top: 3in; margin: .5in;'>HTML Letter for
                {{name}}</html>
              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/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 style='padding-top: 3in; margin: .5in;'>HTML Letter for
                {{name}}</html>
              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/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 style='padding-top: 3in; margin: .5in;'>HTML Letter for
                {{name}}</html>
              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/post_letter'
        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' \
              -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 style="padding-top: 3in; margin: .5in;">HTML Letter for {{name}}</html>' \
              -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 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 myLetter = await new LettersApi(config).create(letterCreate);
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            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 style="padding-top: 3in; margin: .5in;">HTML Letter for {{name}}</html>',
              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);
            });
          label: NODE
        - lang: Ruby
          source: |
            letterCreate = LetterEditable.new({
              description: "Demo Letter",
              from: "adr_210a8d4b0b76d77b",
              file: "<html style='padding-top: 3in; margin: .5in;'>HTML Letter for {{name}}</html>",
              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
            });

            letterApi = LettersApi.new(config)

            begin
              createdLetter = letterApi.create(letterCreate)
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            letter_editable = LetterEditable(
              description = "Demo Letter",
              _from = "adr_210a8d4b0b76d77b",
              file = "<html style='padding-top: 3in; margin: .5in;'>HTML Letter for {{name}}</html>",
              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:
              created_letter = api.create(letter_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",
              )
            );


            $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";


            $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 style='padding-top: 3in; margin: .5in;'>HTML Letter for {{name}}</html>",
                "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->create($letter_editable);
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            Map<String, String> merge_variables = new HashMap<String, String>();
            merge_variables.put("name", "Harry");

            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<String> cards = new ArrayList<String>();
            cards.add("card_c51ae96f5cebf3e");
            cards.add("card_thingy");

            try {
              LetterEditable letterEditable = new LetterEditable();
              letterEditable.setDescription("Demo Letter");
              letterEditable.setFrom("adr_210a8d4b0b76d77b");
              letterEditable.setFile("<html style='padding-top: 3in; margin: .5in;'>HTML Letter for {{name}}</html>");
              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.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 style="padding-top: 3in; margin: .5in;">HTML Letter for {{name}}</html>',
              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: >
            Dictionary<string, string> mergeVariables = new Dictionary<string,
            string>();

            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);


            List<String> cards = new List<String>();

            cards.Add("card_c51ae96f5cebf3e");


            LetterEditable letterEditable = new LetterEditable(
              "Demo Letter",  // description
              default(Dictionary<string, string>),  // 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 style='padding-top: 3in; margin: .5in;'>HTML Letter for {{name}}</html>",  // file
              default(LetterEditable.ExtraServiceEnum?),  // extraService
              cards, // cards
              usetype,
              qrCode,
              fsc
            );


            try {
              Letter result = api.create(letterEditable, 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("<YOUR_API_KEY>")})


            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 style='padding-top: 3in; margin:
            .5in;'>HTML Letter for {{name}}</html>")

            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: psc_id
        description: id of the postcard
        required: true
        schema:
          $ref: '#/components/schemas/psc_id'
    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.
      tags:
        - Psc_id
      responses:
        '200':
          description: Returns a postcard object
          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
        default:
          $ref: '#/components/responses/mailpiece_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl https://api.lob.com/v1/postcards/psc_5c002b86ce47537a \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:
          label: CURL
        - lang: Typescript
          source: |
            try {
              const postcard = await new PostCardsApi(config).get('psc_xxxx');
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            Lob.postcards.retrieve('psc_5c002b86ce47537a', function (err, res) {
              console.log(err, res);
            });
          label: NODE
        - lang: Ruby
          source: |
            letterApi = LettersApi.new(config)

            begin
              retrievedLetter = letterApi.get("ltr_4868c3b754655f90")
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = PostcardsApi(api_client)

            try:
              postcard = api.get("psc_5c002b86ce47537a")
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          source: >
            $apiInstance = new OpenAPI\Client\Api\PostcardsApi($config, new
            GuzzleHttp\Client());


            try {
                $result = $apiInstance->get("psc_5c002b86ce47537a");
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            PostcardsApi apiInstance = new PostcardsApi(config);

            try {
              Postcard response = apiInstance.get("psc_5c002b86ce47537a");
            } catch (ApiException e) {
              e.printStackTrace();
            }
          label: JAVA
        - lang: Elixir
          source: |
            Lob.Postcard.find("psc_5c002b86ce47537a")
          label: ELIXIR
        - lang: CSharp
          source: |
            PostcardsApi api = new PostcardsApi(config);

            try {
              Postcard response = api.get("psc_5c002b86ce47537a");
            } 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("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)


            fetchedPostcard, _, err :=
            apiClient.PostcardsApi.Get(context,"psc_5c002b86ce47537a").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 <a
        href="https://dashboard.lob.com/#/settings/editions"
        target="_blank">Print & Mail Edition</a> to gain access.
      tags:
        - Psc_id
      responses:
        '200':
          $ref: '#/components/responses/postcard_deleted'
        default:
          $ref: '#/components/responses/mailpiece_error'
      x-codeSamples:
        - lang: Shell
          source: >
            curl -X DELETE https://api.lob.com/v1/postcards/psc_5c002b86ce47537a
            \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:
          label: CURL
        - lang: Typescript
          source: |
            try {
              const deletePostcard = await new PostcardsApi(config).cancel('psc_xxxx');
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            Lob.postcards.cancel('psc_5c002b86ce47537a', function (err, res) {
              console.log(err, res);
            });
          label: NODE
        - lang: Ruby
          source: |
            postcardApi = PostcardsApi.new(config)

            begin
              deletedPostcard = postcardApi.cancel("psc_4868c3b754655f90")
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = PostcardsApi(api_client)

            try:
              deleted_resource = api.cancel("psc_5c002b86ce47537a")
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          source: >
            $apiInstance = new OpenAPI\Client\Api\PostcardsApi($config, new
            GuzzleHttp\Client());


            try {
                $result = $apiInstance->cancel("psc_5c002b86ce47537a");
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            PostcardsApi apiInstance = new PostcardsApi(config);

            try {
                PostcardDeletion response = apiInstance.cancel("psc_5c002b86ce47537a");
            } catch (ApiException e) {
                e.printStackTrace();
            }
          label: JAVA
        - lang: Elixir
          source: |
            Lob.Postcard.destroy("psc_5c002b86ce47537a")
          label: ELIXIR
        - lang: CSharp
          source: |
            PostcardsApi api = new PostcardsApi(config);

            try {
              PostcardDeletion response = api.cancel("psc_5c002b86ce47537a");
            } 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("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)


            deletedPostcard, _, err := apiClient.PostcardsApi.Cancel(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.
      tags: []
      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'
      responses:
        '200':
          $ref: '#/components/responses/all_postcards'
        default:
          $ref: '#/components/responses/mailpiece_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl -X GET "https://api.lob.com/v1/postcards?limit=2" \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:
          label: CURL
        - lang: typescript
          source: |
            try {
              const postcards = await new PostcardsApi(config).list(2);
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            Lob.postcards.list({limit: 2}, function (err, res) {
              console.log(err, res);
            });
          label: NODE
        - lang: Ruby
          source: |
            postcardsApi = PostcardsApi.new(config)

            begin
              postcards = postcardsApi.list({ limit: 2 })
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = PostcardsApi(api_client)

            try:
              postcards = 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());


            try {
                $result = $apiInstance->list(
                  2, // limit
                );
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            PostcardsApi apiInstance = new PostcardsApi(config);

            try {
              PostcardList 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.Postcard.list(%{limit: 2})
          label: ELIXIR
        - lang: CSharp
          source: >
            PostcardsApi api = new PostcardsApi(config);


            List<string> includeList = new List<string>();

            includeList.Add("total_count");

            Dictionary<String, String> metadata = new Dictionary<String,
            String>();

            metadata.Add("name", "Harry");

            Dictionary<String, DateTime> dateCreated = new Dictionary<String,
            DateTime>();

            DateTime dateCreatedDate = DateTime.Today.AddMonths(-1);

            dateCreated.Add("lt", dateCreatedDate);

            Dictionary<String, String> sendDate = new Dictionary<String,
            String>();

            sendDate.Add("lt",
            DateTime.Now.ToString("yyyy-MM-ddTHH\\:mm\\:ss.fffffffzzz"));

            SortBy3 sortBy = new SortBy3(SortBy3.DateCreatedEnum.Asc);

            List<PostcardSize> sizeArray = new List<PostcardSize>();

            sizeArray.Add(PostcardSize._4x6);


            try {
              PostcardList 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
              );
            } 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("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)

            PostcardList = apiClient.PostcardsApi.List(context).Execute()

            if err != nil {
                return err
            }
          label: GO
    post:
      operationId: postcard_create
      summary: Create
      description: Creates a new postcard given information
      tags: []
      parameters:
        - $ref: '#/components/parameters/idem-header'
        - $ref: '#/components/parameters/idem-query'
      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
          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
          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
      responses:
        '200':
          $ref: '#/components/responses/post_postcard'
        default:
          $ref: '#/components/responses/mailpiece_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=<html style="padding: 1in; font-size: 50;">Front HTML for {{name}}</html>' \
              --data-urlencode 'back=<html style="padding: 1in; font-size: 20;">Back HTML for {{name}}</html>' \
              -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'
          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

            });


            try {
              const myPostcard = await new PostcardsApi(config).create(postcardCreate);
            } 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: '<html style="padding: 1in; font-size: 50;">Front HTML for {{name}}</html>',
              back: '<html style="padding: 1in; font-size: 20;">Back HTML for {{name}}</html>',
              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) {
              console.log(err, res);
            });
          label: NODE
        - lang: Ruby
          source: |
            postcardCreate = PostcardEditable.new({
              description: "Demo Postcard job",
              from: "adr_210a8d4b0b76d77b",
              front: "<html style='padding: 1in; font-size: 50;'>Front HTML for {{name}}</html>",
              back: "<html style='padding: 1in; font-size: 20;'>Back HTML for {{name}}</html>",
              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)

            begin
              createdPostcard = postcardApi.create(postcardCreate)
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            postcard_editable = PostcardEditable(
              description = "Demo Postcard job",
              _from = "adr_210a8d4b0b76d77b",
              front = "<html style='padding: 1in; font-size: 50;'>Front HTML for {{name}}</html>",
              back = "<html style='padding: 1in; font-size: 20;'>Back HTML for {{name}}</html>",
              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"     => "<html style='padding: 1in; font-size: 50;'>Front HTML for {{name}}</html>",
                "back"     => "<html style='padding: 1in; font-size: 20;'>Back HTML for {{name}}</html>",
                "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<String, String> merge_variables = new HashMap<String, String>();
            merge_variables.put("name", "Harry");

            PostcardsApi apiInstance = new PostcardsApi(config);

            AddressEditable to = new AddressEditable();
            to.setName("Harry Zhang");
            to.setAddressLine1("210 King St");
            to.setAddressLine2("# 6100");
            to.setAddressCity("San Francisco");
            to.setAddressState("CA");
            to.setAddressZip("94107");

            QRCode qrCode = new QRCode();
            qrCode.setPosition("relative");
            qrCode.setRedirectUrl("https://www.lob.com");
            qrCode.setWidth("2");
            qrCode.setLeft("2");
            qrCode.setBottom("2");
            qrCode.setPages("back");

            try {
              PostcardEditable postcardEditable = new PostcardEditable();
              postcardEditable.setDescription("Demo Postcard job");
              postcardEditable.setFrom("adr_210a8d4b0b76d77b");
              postcardEditable.setFront("<html style='padding: 1in; font-size: 50;'>Front HTML for {{name}}</html>");
              postcardEditable.setBack("<html style='padding: 1in; font-size: 20;'>Back HTML for {{name}}</html>");
              postcardEditable.setTo(to);
              postcardEditable.setMergeVariables(merge_variables);
              postcardEditable.setUseType("operational");
              postcardEditable.setQRCode(qrCode);
              postcardEditable.setFsc(true);

              Postcard result = apiInstance.create(postcardEditable, null);
            } 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: '<html style="padding: 1in; font-size: 50;">Front HTML for {{name}}</html>',
              back: '<html style="padding: 1in; font-size: 20;">Back HTML for {{name}}</html>',
              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
            })
          label: ELIXIR
        - lang: CSharp
          source: >
            Dictionary<string, string> mergeVariables = new Dictionary<string,
            string>();

            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
              "<html style='padding: 1in; font-size: 20;'>Back HTML for {{name}}</html>",  // front
              "<html style='padding: 1in; font-size: 20;'>Back HTML for {{name}}</html>", // back
              usetype,
              qrCode,
              fsc
            );


            try {
              Postcard result = api.create(postcardEditable, 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("<YOUR_API_KEY>")})


            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("<html style='padding: 1in; font-size:
            50;'>Front HTML for {{name}}</html>")

            postcardCreate.SetBack("<html style='padding: 1in; font-size:
            20;'>Back HTML for {{name}}</html>")

            postcardCreate.SetTo(to)

            postcardCreate.SetFsc(true)



            createdpostcard, _, err :=
            apiClient.PostcardsApi.Create(context).PostcardEditable(postcardCreate).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:
        - Q R  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 <YOUR API KEY>:
  /domains/{domain_id}:
    parameters:
      - in: path
        name: domain_id
        required: true
        description: Unique identifier for a domain.
        schema:
          type: string
    get:
      operationId: domain_get
      summary: Retrieve a domain
      description: Retrieve details for a single domain.
      tags:
        - Domains
        - U R L  Shortener
      responses:
        '200':
          description: Returns domain related details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/domain_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/domains/{domain_id}" \
              -u <YOUR_LIVE_API_KEY>:
          label: CURL
        - lang: Typescript
          source: |
            try {
              const domain = await new DomainsApi(config).get('xxxxxx');
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            Lob.domains.retrieve('xxxxxx', function (err, res) {
              console.log(err, res);
            });
          label: NODE
        - lang: Ruby
          source: |
            domainsAPI = DomainsApi.new(config)

            begin
              retrievedDomain = domainsAPI.get("xxxxxx")
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = DomainsApi(api_client)

            try:
              domain = api.get("xxxxxx")
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          source: >
            $apiInstance = new OpenAPI\Client\Api\DomainsApi($config, new
            GuzzleHttp\Client());


            try {
                $result = $apiInstance->get("xxxxxx");
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            DomainsApi apiInstance = new DomainsApi(config);

            try {
              Domain response = apiInstance.get("xxxxxx");
            } catch (ApiException e) {
              e.printStackTrace();
            }
          label: JAVA
        - lang: Elixir
          source: |
            Lob.Domain.retrieve("xxxxxx")
          label: ELIXIR
        - lang: CSharp
          source: |
            DomainsApi api = new DomainsApi(config);

            try {
              Domain response = api.get("xxxxxx");
            } 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("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)


            fetchedDomain, _, err :=
            apiClient.DomainsApi.Get(context,"xxxxxx").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:
        - Domains
        - U R L  Shortener
      responses:
        '200':
          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:
        - Domains
      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:
          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 https://api.lob.com/v1/domains \
              -u <YOUR_LIVE_API_KEY>: \
              -d "domain=lob.st"
          label: CURL
        - lang: Typescript
          source: |
            const domainApi = await new DomainsApi(config);
            const domainData: DomainsWritable = {
              domain: 'lob.st'
            }
            try {
              const createdDomain = await domainApi.createDomain(domainData);
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            Lob.domains.create({
              domain: 'lob.st'
            }, function (err, res) {
              console.log(err, res);
            });
          label: NODE
        - lang: Ruby
          source: |
            domainsAPI = DomainsApi.new(config)

            domainsData = DomainsWritable.new({
              domain: "lob.st"
            })

            begin
              createdDomain = domainsAPI.create(domainsData)
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = DomainsApi(api_client)

            domains_data = DomainsWritable(
              domain: "lob.st"
            )

            try:
              domain = api.create(domains_data)
            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',
            ));


            try {
                $result = $apiInstance->create($domainsData);
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            DomainsWritable domain = new DomainsWritable();
            domain.setDomain("lob.st");

            DomainsApi apiInstance = new DomainsApi(config);

            try {
              apiInstance.create(domain);
            } catch (ApiException e) {
              e.printStackTrace();
            }
          label: JAVA
        - lang: Elixir
          source: |
            Lob.Domain.create(%{
              domain: "lob.st"
            })
          label: ELIXIR
        - lang: CSharp
          source: |
            DomainsWritable domain = new DomainsWritable(
              "lob.st"
            )

            DomainsApi api = new DomainsApi(config);

            try {
              api.create(domain, null);
            } catch (ApiException e) {
              Console.WriteLine(e.ToString());
            }
          label: CSHARP
    get:
      operationId: domain_list
      summary: List all domains
      description: Retrieve a list of all created domains.
      tags:
        - Domains
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/before_after'
        - in: query
          name: status
          description: Filter domains by their configuration status.
          schema:
            type: string
            enum:
              - configured
              - not_configured
      responses:
        '200':
          description: Returns a list of all domains.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/domains_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/domains?limit=2" \
              -u <YOUR_LIVE_API_KEY>:
          label: CURL
        - lang: Typescript
          source: |
            try {
              const domains = await new DomainsApi(config).list(2);
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            Lob.domains.list({limit: 2}, function (err, res) {
              console.log(err, res);
            });
          label: NODE
        - lang: Ruby
          source: |
            domainsApi = DomainsApi.new(config)

            begin
              domains = domainsApi.list({ limit: 2 })
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = DomainsApi(api_client)

            try:
              domains = 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());


            try {
                $result = $apiInstance->list(
                  2, // limit
                );
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            DomainsApi apiInstance = new DomainsApi(config);

            try {
              DomainsList response = apiInstance.list(
                2, // limit
                null, // before
                null, // after
                null, // include
                null, // dateCreated
              );
            } catch (ApiException e) {
              e.printStackTrace();
            }
          label: JAVA
        - lang: Elixir
          source: |
            Lob.Domains.list(%{limit: 2})
          label: ELIXIR
        - lang: CSharp
          source: |
            DomainsApi api = new DomainsApi(config);

            try {
              DomainsList response = api.list(
                2, // limit
                null, // before
                null, // after
                null, // include
                null, // dateCreated
              );
            } catch (ApiException e) {
              Console.WriteLine(e.ToString());
            }
          label: CSHARP
        - lang: Go
          source: >
            var context = context.Background()

            context = context.WithValue(suite.ctx, lob.ContextBasicAuth,
            lob.BasicAuth{UserName: os.Getenv("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)

            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:
        - Links
        - U R L  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/<link_id>" \
              -u <YOUR_LIVE_API_KEY>:
          label: CURL
    patch:
      operationId: link_update
      summary: Update a Link
      description: Update any of the properties of a shortened link.
      tags:
        - Links
        - U R L  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/<link_id> \
              -u <YOUR_LIVE_API_KEY>: \
              -d "redirect_link=https://www.lob.com"
          label: CURL
    delete:
      operationId: links_delete
      summary: Delete Link
      description: Delete the shortened link.
      tags:
        - Links
        - U R L  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: 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:
        - Links
      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 <YOUR_LIVE_API_KEY>: \
              -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:
        - Links
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/before_after'
        - $ref: '#/components/parameters/campaign_id'
        - in: query
          name: domain_id
          description: Filters links by the provided domain id.
          schema:
            type: string
            pattern: ^(dom)_[a-zA-Z0-9]+$
      responses:
        '200':
          description: Returns the deleted link object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/links_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?limit=2" \
              -u <YOUR_LIVE_API_KEY>:
          label: CURL
        - lang: Typescript
          source: |
            try {
              const links = await new LinksApi(config).list(2);
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            Lob.links.list({limit: 2}, function (err, res) {
              console.log(err, res);
            });
          label: NODE
        - lang: Ruby
          source: |
            linksApi = LinksApi.new(config)

            begin
              links = linksApi.list({ limit: 2 })
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = LinksApi(api_client)

            try:
              links = api.list(limit=2)
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          source: >
            $apiInstance = new OpenAPI\Client\Api\LinksApi($config, new
            GuzzleHttp\Client());


            try {
                $result = $apiInstance->list(
                  2, // limit
                );
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            LinksApi apiInstance = new LinksApi(config);

            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.Links.list(%{limit: 2})
          label: ELIXIR
        - lang: CSharp
          source: |
            LinksApi api = new LinksApi(config);

            try {
              LinksList response = api.list(
                2, // limit
                null, // before
                null, // after
                null, // include
                null, // dateCreated
              );
            } catch (ApiException e) {
              Console.WriteLine(e.ToString());
            }
          label: CSHARP
        - lang: Go
          source: >
            var context = context.Background()

            context = context.WithValue(suite.ctx, lob.ContextBasicAuth,
            lob.BasicAuth{UserName: os.Getenv("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)

            LinksList = apiClient.LinksApi.List(context).Execute()

            if err != nil {
                return err
            }
          label: GO
  /self_mailers/{sfm_id}:
    parameters:
      - in: path
        name: sfm_id
        description: id of the self_mailer
        required: true
        schema:
          $ref: '#/components/schemas/sfm_id'
    get:
      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:
        - Sfm_id
      responses:
        '200':
          description: Returns a self_mailer object
          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
        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("<YOUR_API_KEY>")})


            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 <a
        href="https://dashboard.lob.com/#/settings/editions"
        target="_blank">Print & Mail Edition</a> to gain access.
      tags:
        - Sfm_id
      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).cancel('sfm_xxxx');
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            Lob.selfMailers.cancel('sfm_8ffbe811dea49dcf', function (err, res) {
              console.log(err, res);
            });
          label: NODE
        - lang: Ruby
          source: |
            selfMailerApi = SelfMailersApi.new(config)

            begin
              deletedSelfMailer = selfMailerApi.cancel("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.cancel("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->cancel("sfm_8ffbe811dea49dcf");
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            SelfMailersApi apiInstance = new SelfMailersApi(config);

            try {
                SelfMailerDeletion response = apiInstance.cancel("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.cancel("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("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)


            deletedSelfMailer, _, err :=
            apiClient.SelfMailersApi.Cancel(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'
        default:
          $ref: '#/components/responses/mailpiece_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl -X GET "https://api.lob.com/v1/self_mailers?limit=2" \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:
          label: CURL
        - lang: typescript
          source: |
            try {
              const selfMailers = await new selfMailersApi(config).list(2);
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            Lob.selfMailers.list({limit: 2}, function (err, res) {
              console.log(err, res);
            });
          label: NODE
        - lang: Ruby
          source: |
            selfMailersApi = SelfMailersApi.new(config)

            begin
              selfMailers = selfMailersApi.list({ limit: 2 })
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = SelfMailersApi(api_client)

            try:
              self_mailers = api.list(limit=2)
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          source: >
            $apiInstance = new OpenAPI\Client\Api\SelfMailersApi($config, new
            GuzzleHttp\Client());


            try {
                $result = $apiInstance->list(
                  2, // limit
                );
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            SelfMailersApi apiInstance = new SelfMailersApi(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
              );
            } catch (ApiException e) {
              e.printStackTrace();
            }
          label: JAVA
        - lang: Elixir
          source: |
            Lob.SelfMailer.list(%{limit: 2})
          label: ELIXIR
        - lang: CSharp
          source: >
            SelfMailersApi api = new SelfMailersApi(config);


            List<string> includeList = new List<string>();

            includeList.Add("total_count");

            Dictionary<String, String> metadata = new Dictionary<String,
            String>();

            metadata.Add("name", "Harry");

            Dictionary<String, DateTime> dateCreated = new Dictionary<String,
            DateTime>();

            DateTime dateCreatedDate = DateTime.Today.AddMonths(-1);

            dateCreated.Add("lt", dateCreatedDate);

            Dictionary<String, String> sendDate = new Dictionary<String,
            String>();

            sendDate.Add("lt",
            DateTime.Now.ToString("yyyy-MM-ddTHH\\:mm\\:ss.fffffffzzz"));

            SortBy3 sortBy = new SortBy3(SortBy3.DateCreatedEnum.Asc);


            try {
              SelfMailerList response = api.list(
                2, // limit
                null, // before
                null, // after
                includeList, // include
                dateCreated, // dateCreated
                metadata, // metadata
                null, // size
                true, // scheduled
                sendDate, // sendDate
                MailType.FirstClass, // mailType
                sortBy // sortBy
              );
            } 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("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)

            SelfMailerList = apiClient.SelfMailersApi.List(context).Execute()

            if err != nil {
                return err
            }
          label: GO
    post:
      operationId: self_mailer_create
      summary: Create
      description: Creates a new self_mailer given information
      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
      responses:
        '200':
          $ref: '#/components/responses/post_self_mailer'
        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=<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>" \
              --data-urlencode "outside=<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>" \
              -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 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: '<html style="padding: 1in; font-size: 50;">Inside HTML for {{name}}</html>',
              outside: '<html style="padding: 1in; font-size: 20;">Outside HTML for {{name}}</html>',
              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: |
            selfMailerCreate = SelfMailerEditable.new({
              description: "Demo Self Mailer job",
              from: "adr_210a8d4b0b76d77b",
              inside: "<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>",
              outside: "<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>",
              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
              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 = "<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>",
              outside = "<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>",
              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)

            try:
              created_self_mailer = api.create(self_mailer_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";

            $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"     => "<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>",
                "outside"     => "<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>",
                "to"     => $to,
                "merge_variables"     => $merge_variables,
                "use_type"    => $use_type,
                "qr_code"   => $qr_code,
                "fsc"  => $fsc
              )
            );


            try {
                $result = $apiInstance->create($self_mailer_editable);
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            Map<String, String> merge_variables = new HashMap<String, String>();
            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 {
              SelfMailerEditable selfMailerEditable = new SelfMailerEditable();
              selfMailerEditable.setDescription("Demo Self Mailer job");
              selfMailerEditable.setFrom("adr_210a8d4b0b76d77b");
              selfMailerEditable.setInside("<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>");
              selfMailerEditable.setOutside("<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>");
              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.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: "<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>",
              outside: "<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>",
              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: >
            Dictionary<string, string> mergeVariables = new Dictionary<string,
            string>();

            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<string, string>),  // metadata
              default(MailType),  // mailType
              mergeVariables,  // mergeVariables
              default(DateTime),  // sendDate
              "<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>",  // inside
              "<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>", // outside
              "marketing", // use_type 
              qrCode,
              fsc
            );


            try {
              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("<YOUR_API_KEY>")})


            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("<html style='padding: 1in; font-size:
            50;'>Inside HTML for {{name}}</html>")

            selfMailerCreate.SetOutside("<html style='padding: 1in; font-size:
            20;'>Outside HTML for {{name}}</html>")

            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: snap_pack_id
        description: id of the snap_pack
        required: true
        schema:
          $ref: '#/components/schemas/snap_pack_id'
    get:
      operationId: snap_pack_retrieve
      summary: Retrieve
      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:
        - Snap_pack_id
      responses:
        '200':
          description: Returns a snap_pack object
          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
        default:
          $ref: '#/components/responses/mailpiece_error'
      x-codeSamples:
        - lang: Shell
          source: >
            curl -X GET
            "https://api.lob.com/v1/snap_packs/ord_0d6a16a3fff6318ac8f8008dc1" \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:
          label: CURL
        - lang: typescript
          source: |
            try {
              const snapPack = await new SnapPacksApi(config).get('ord_xxxx');
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: >
            Lob.snapPacks.retrieve('ord_0d6a16a3fff6318ac8f8008dc1', function
            (err, res) {
              console.log(err, res);
            });
          label: NODE
        - lang: Ruby
          source: |
            snapPackApi = SnapPacksApi.new(config)

            begin
              retrievedSnapPack = snapPackApi.get("ord_0d6a16a3fff6318ac8f8008dc1")
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = SnapPacksApi(api_client)

            try:
              snap_pack = api.get("ord_0d6a16a3fff6318ac8f8008dc1")
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          source: >
            $apiInstance = new OpenAPI\Client\Api\SnapPacksApi($config, new
            GuzzleHttp\Client());


            try {
                $result = $apiInstance->get("ord_0d6a16a3fff6318ac8f8008dc1");
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            SnapPacksApi apiInstance = new SnapPacksApi(config);

            try {
              SnapPack response = apiInstance.get("ord_0d6a16a3fff6318ac8f8008dc1");
            } catch (ApiException e) {
              e.printStackTrace();
            }
          label: JAVA
        - lang: Elixir
          source: |
            Lob.SnapPack.find("ord_0d6a16a3fff6318ac8f8008dc1")
          label: ELIXIR
        - lang: CSharp
          source: |
            SnapPacksApi api = new SnapPacksApi(config);

            try {
              SnapPack response = api.get("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("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)


            fetchedSnapPack, _, err :=
            apiClient.SnapPacksApi.Get(context,"ord_0d6a16a3fff6318ac8f8008dc1").Execute()


            if err != nil {
                return err
            }
          label: GO
    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:
        - Snap_pack_id
      responses:
        '200':
          $ref: '#/components/responses/snap_pack_deleted'
        default:
          $ref: '#/components/responses/mailpiece_error'
      x-codeSamples:
        - lang: Shell
          source: >
            curl -X DELETE
            https://api.lob.com/v1/snap_packs/ord_0d6a16a3fff6318ac8f8008dc1 \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:
          label: CURL
        - 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: |
            snapPackApi = SnapPacksApi.new(config)

            begin
              deletedSnapPack = snapPackApi.delete("ord_0d6a16a3fff6318ac8f8008dc1")
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = SnapPacksApi(api_client)

            try:
              deleted_resource = api.delete("ord_0d6a16a3fff6318ac8f8008dc1")
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          source: >
            $apiInstance = new OpenAPI\Client\Api\SnapPacksApi($config, new
            GuzzleHttp\Client());


            try {
                $result = $apiInstance->delete("ord_0d6a16a3fff6318ac8f8008dc1");
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            SnapPacksApi apiInstance = new SnapPacksApi(config);

            try {
                SnapPackDeletion response = apiInstance.delete("ord_0d6a16a3fff6318ac8f8008dc1");
            } catch (ApiException e) {
                e.printStackTrace();
            }
          label: JAVA
        - lang: Elixir
          source: |
            Lob.SnapPack.destroy("ord_0d6a16a3fff6318ac8f8008dc1")
          label: ELIXIR
        - lang: CSharp
          source: |
            SnapPacksApi api = new SnapPacksApi(config);

            try {
              SnapPackDeletion response = api.delete("ord_0d6a16a3fff6318ac8f8008dc1");
            } catch (ApiException e) {
              Console.WriteLine(e.ToString());
            }
          label: CSHARP
        - lang: Go
          source: >
            var context = context.Background()

            context = context.WithValue(suite.ctx, lob.ContextBasicAuth,
            lob.BasicAuth{UserName: os.Getenv("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)


            deletedSnapPack, _, err := apiClient.SnapPacksApi.Delete(context,
            "ord_0d6a16a3fff6318ac8f8008dc1").Execute()


            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)

            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);

            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<string> includeList = new List<string>();

            includeList.Add("total_count");

            Dictionary<String, String> metadata = new Dictionary<String,
            String>();

            metadata.Add("name", "Harry");

            Dictionary<String, DateTime> dateCreated = new Dictionary<String,
            DateTime>();

            DateTime dateCreatedDate = DateTime.Today.AddMonths(-1);

            dateCreated.Add("lt", dateCreatedDate);

            Dictionary<String, String> sendDate = new Dictionary<String,
            String>();

            sendDate.Add("lt",
            DateTime.Now.ToString("yyyy-MM-ddTHH\\:mm\\:ss.fffffffzzz"));

            SortBy3 sortBy = new SortBy3(SortBy3.DateCreatedEnum.Asc);


            try {
              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: >
            var context = context.Background()

            context = context.WithValue(suite.ctx, lob.ContextBasicAuth,
            lob.BasicAuth{UserName: os.Getenv("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)

            SnapPackList = apiClient.SnapPacksApi.List(context).Execute()

            if err != nil {
                return err
            }
          label: GO
    post:
      operationId: snap_pack_create
      summary: Create
      description: Creates a new snap_pack given information
      tags:
        - Snap  Packs
      parameters:
        - $ref: '#/components/parameters/idem-header'
        - $ref: '#/components/parameters/idem-query'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/snap_pack_editable'
            example:
              description: Demo Snap Pack Job
              to: adr_bae820679f3f536b
              from: adr_210a8d4b0b76d77b
              inside: https://lob.com/snappackinside.pdf
              outside: https://lob.com/snappackoutside.pdf
              size: 8.5x11
              metadata:
                spiffy: 'true'
              mail_type: usps_standard
              merge_variables:
                name: Harry
              send_date: '2017-11-01T00:00:00.000Z'
              use_type: marketing
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/snap_pack_editable'
            example:
              description: Demo Snap Pack job
              to: adr_bae820679f3f536b
              from: adr_210a8d4b0b76d77b
              inside: https://lob.com/snappackinside.pdf
              outside: https://lob.com/snappackoutside.pdf
              size: 8.5x11
              metadata:
                spiffy: 'true'
              mail_type: usps_standard
              merge_variables:
                name: Harry
              send_date: '2017-11-01T00:00:00.000Z'
              use_type: marketing
      responses:
        '200':
          $ref: '#/components/responses/post_snap_pack'
        default:
          $ref: '#/components/responses/mailpiece_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl https://api.lob.com/v1/snap_packs \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \
              -d "description=Demo Snap Pack 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" \
              --data-urlencode "inside=<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>" \
              --data-urlencode "outside=<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>" \
              -d "merge_variables[name]=Harry" \
              -d 'fsc=false'
          label: CURL
        - lang: Typescript
          source: |
            const snapPackCreate = new SnapPackEditable({
              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/8.5x11_Snappack_template_address.pdf',
              outside:
              'https://s3.us-west-2.amazonaws.com/public.lob.com/assets/8.5x11_Snappack_template_address.pdf',
              use_type: 'marketing'
              fsc: false
            });

            try {
              const mySnapPack = await new SnapPacksApi(config).create(snapPackCreate);
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            Lob.snapPacks.create({
              description: 'Demo Snap Packs job',
              to: {
                name: 'Harry Zhang',
                address_line1: '210 King St',
                address_city: 'San Francisco',
                address_state: 'CA',
                address_zip: '94107'
              },
              from: 'adr_210a8d4b0b76d77b',
              inside: '<html style="padding: 1in; font-size: 50;">Inside HTML for {{name}}</html>',
              outside: '<html style="padding: 1in; font-size: 20;">Outside HTML for {{name}}</html>',
              merge_variables: {
                name: 'Harry'
              },
              use_type: 'marketing'
              fsc: false
            }, function (err, res) {
              console.log(err, res);
            });
          label: NODE
        - lang: Ruby
          source: |
            snapPackCreate = SnapPackEditable.new({
              description: "Demo Snap Pack job",
              from: "adr_210a8d4b0b76d77b",
              inside: "<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>",
              outside: "<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>",
              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',
              fsc: true
            });

            snapPackApi = SnapPacksApi.new(config)

            begin
              createdSnapPack = snapPackApi.create(snapPackCreate)
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            snap_pack_editable = SnapPackEditable(
              description = "Demo Snap Pack job",
              _from = "adr_210a8d4b0b76d77b",
              inside = "<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>",
              outside = "<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>",
              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",
              fsc = true
            )

            with ApiClient(configuration) as api_client:
              api = SnapPacksApi(api_client)

            try:
              created_snap_pack = api.create(snap_pack_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";

            $fsc = true;


            $apiInstance = new OpenAPI\Client\Api\SnapPacksApi($config, new
            GuzzleHttp\Client());

            $snap_pack_editable = new OpenAPI\Client\Model\SnapPackEditable(
              array(
                "description"     => "Demo Snap Pack job",
                "from"     => "adr_210a8d4b0b76d77b",
                "inside"     => "<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>",
                "outside"     => "<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>",
                "to"     => $to,
                "merge_variables"     => $merge_variables,
                "use_type"    => $use_type,
                "fsc"  => $fsc
              )
            );


            try {
                $result = $apiInstance->create($snap_pack_editable);
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            Map<String, String> merge_variables = new HashMap<String, String>();
            merge_variables.put("name", "Harry");

            SnapPacksApi apiInstance = new SnapPacksApi(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 {
              SnapPackEditable SnapPackEditable = new SnapPackEditable();
              SnapPackEditable.setDescription("Demo Snap Pack job");
              SnapPackEditable.setFrom("adr_210a8d4b0b76d77b");
              SnapPackEditable.setInside("<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>");
              SnapPackEditable.setOutside("<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>");
              SnapPackEditable.setTo(to);
              SnapPackEditable.setMergeVariables(merge_variables);
              SnapPackEditable.setUseType("marketing");
              SnapPackEditable.setFsc(true);


              SnapPack result = apiInstance.create(SnapPackEditable, null);
            } catch (ApiException e) {
              e.printStackTrace();
            }
          label: JAVA
        - lang: Elixir
          source: |
            Lob.SnapPack.create(%{
              description: "Demo Snap Pack job",
              to: %{
                name: "Harry Zhang",
                address_line1: "210 King St",
                address_city: "San Francisco",
                address_state: "CA",
                address_zip: "94107"
              },
              from: "adr_210a8d4b0b76d77b",
              inside: "<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>",
              outside: "<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>",
              merge_variables: %{
                name: "Harry"
              },
              use_type: "marketing",
              fsc: true
            })
          label: ELIXIR
        - lang: CSharp
          source: >
            Dictionary<string, string> mergeVariables = new Dictionary<string,
            string>();

            mergeVariables.Add("name", "Harry");


            SnapPacksApi api = new SnapPacksApi(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
            );


            Fsc fsc = new Fsc(true);


            SnapPackEditable SnapPackEditable = new SnapPackEditable(
              to.ToJson(),  // to
              "adr_249af768103d2810",  // from
              default(SnapPacksize),  // size
              "Demo Snap Pack Job",  // description
              default(Dictionary<string, string>),  // metadata
              default(MailType),  // mailType
              mergeVariables,  // mergeVariables
              default(DateTime),  // sendDate
              "<html style='padding: 1in; font-size: 50;'>Inside HTML for {{name}}</html>",  // inside
              "<html style='padding: 1in; font-size: 20;'>Outside HTML for {{name}}</html>", // outside
              "marketing", // use_type
              fsc
            );


            try {
              SnapPack result = api.create(SnapPackEditable, 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("<YOUR_API_KEY>")})


            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("<html style='padding: 1in; font-size:
            50;'>Inside HTML for {{name}}</html>")

            SnapPackCreate.SetOutside("<html style='padding: 1in; font-size:
            20;'>Outside HTML for {{name}}</html>")

            SnapPackCreate.SetTo(to)

            SnapPackCreate.SetFsc(true)



            createdSnapPack, _, err :=
            apiClient.SnapPacksApi.Create(context).SnapPackEditable(SnapPackCreate).Execute()


            if err != nil {
                return err
            }
          label: GO
  /templates/{tmpl_id}/versions/{vrsn_id}:
    parameters:
      - in: path
        name: tmpl_id
        description: The ID of the template to which the version belongs.
        required: true
        schema:
          $ref: '#/components/schemas/tmpl_id'
      - in: path
        name: vrsn_id
        description: id of the template_version
        required: true
        schema:
          $ref: '#/components/schemas/vrsn_id'
    get:
      operationId: template_version_retrieve
      summary: Retrieve
      description: Retrieves the template version with the given template and version ids.
      tags:
        - Templates
        - Versions
        - Template  Versions
      responses:
        '200':
          description: >-
            Returns the template version with the given template and version
            ids.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/template_version'
              example:
                id: vrsn_534e339882d2282
                description: Second Version
                html: <html>Second HTML for {{name}}</html>
                date_created: '2017-11-09T04:49:38.016Z'
                date_modified: '2017-11-09T04:49:38.016Z'
                object: version
        default:
          $ref: '#/components/responses/template_error'
      x-codeSamples:
        - lang: Shell
          source: >
            curl
            https://api.lob.com/v1/templates/tmpl_c94e83ca2cd5121/versions/vrsn_534e339882d2282
            \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:
          label: CURL
        - lang: Typescript
          source: |
            try {
              const templateVersion = await new TemplateVersionsApi(config).get('tmpl_xxxx', 'vrsn_xxxx');
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            This feature is not currently supported by this library.
          label: NODE
        - lang: Ruby
          source: |
            templateVersionApi = TemplateVersionsApi.new(config)

            begin
              retrievedTemplateVersion = templateVersionApi.get("tmpl_c94e83ca2cd5121", "vrsn_534e339882d2282")
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = TemplateVersionsApi(api_client)

            try:
              template_version = api.get("tmpl_c94e83ca2cd5121", "vrsn_534e339882d2282")
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          source: >
            $apiInstance = new OpenAPI\Client\Api\TemplateVersionsApi($config,
            new GuzzleHttp\Client());


            try {
                $result = $apiInstance->get("tmpl_c94e83ca2cd5121", "vrsn_534e339882d2282");
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            TemplateVersionsApi apiInstance = new TemplateVersionsApi(config);

            try {
              TemplateVersion response = apiInstance.get("vrsn_534e339882d2282");
            } catch (ApiException e) {
              e.printStackTrace();
            }
          label: JAVA
        - lang: Elixir
          source: |
            This feature is not currently supported by this library.
          label: ELIXIR
        - lang: CSharp
          source: |
            TemplateVersionsApi api = new TemplateVersionsApi(config);

            try {
              TemplateVersion response = api.get("tmpl_c94e83ca2cd5121", "vrsn_534e339882d2282");
            } 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("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)


            fetchedTemplateVersion, _, err :=
            apiClient.TemplateVersionsApi.Get(context,"tmpl_c94e83ca2cd5121",
            "vrsn_534e339882d2282").Execute()


            if err != nil {
                return err
            }
          label: GO
    post:
      operationId: template_version_update
      summary: Update
      description: Updates the template version with the given template and version ids.
      tags:
        - Templates
        - Versions
        - Template  Versions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/template_version_updatable'
            example:
              description: Some description
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/template_version_updatable'
            example:
              description: Some description
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/template_version_updatable'
            example:
              description: Some description
      responses:
        '200':
          $ref: '#/components/responses/post_template_version'
        default:
          $ref: '#/components/responses/template_error'
      x-codeSamples:
        - lang: Shell
          source: >
            curl
            https://api.lob.com/v1/templates/tmpl_c94e83ca2cd5121/versions/vrsn_534e339882d2282
            \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \
              -d "description=Updated description"
          label: CURL
        - lang: Typescript
          source: |
            const TemplateVersions = new TemplateVersionsApi(config);

            try {
              const updateData = new TemplateVersionUpdatable({
                description: 'updated template'
              });
              const updateTemplateVersion = await TemplateVersions.update('vrsn_xxxx', updateData);
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            This feature is not currently supported by this library.
          label: NODE
        - lang: Ruby
          source: |
            templateVersionUpdatable = TemplateUpdate.new({
              description: "updated template version",
            })

            templateVersionApi = TemplateVersionsApi.new(config)

            begin
              updatedTemplateVersion = templateVersionApi.update("tmpl_c94e83ca2cd5121", "vrsn_534e339882d2282", templateVersionUpdatable)
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = TemplateVersionsApi(api_client)

            update_data = TemplateVersionUpdatable(
              description = "updated template"
            )

            try:
              update_template_version = api.update("tmpl_c94e83ca2cd5121", "vrsn_534e339882d2282", update_data)
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          source: >
            $apiInstance = new OpenAPI\Client\Api\TemplateVersionsApi($config,
            new GuzzleHttp\Client());


            $templateVersionUpdate = new
            OpenAPI\Client\Model\TemplateUpdate(array(
                "description" =>  "Updated template version"
            ));


            try {
                $result = $apiInstance->update("tmpl_c94e83ca2cd5121", "vrsn_534e339882d2282", $templateVersionUpdate);
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            This feature is not currently supported by this library.
          label: JAVA
        - lang: Elixir
          source: |
            This feature is not currently supported by this library.
          label: ELIXIR
        - lang: CSharp
          source: >
            TemplateVersionsApi api = new TemplateVersionsApi(config);

            TemplateVersionUpdatable update = new
            TemplateVersionUpdatable("update template", EngineHtml.Handlebars);


            try {
              api.update("tmpl_c94e83ca2cd5121", "vrsn_534e339882d2282", update);
            } 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("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)


            var templateWritable = *lob.NewTemplateWritable("<html>Updated HTML
            for Template 1/html>")

            var templateVersionWritable =
            *lob.NewTemplateVersionWritable("<html>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.SetDescription("New Template Version")

            resp, _, err := apiClient.TemplatesApi.Update(context,
            createdTemplate.Id,
            createdTemplateVersion.Id).TemplateVersionWritable(templateVersionWritable).Execute()


            if err != nil {
                return err
            }
          label: GO
    delete:
      operationId: template_version_delete
      summary: Delete
      description: >-
        Permanently deletes a template version. A template's `published_version`
        can not be deleted.
      tags:
        - Templates
        - Versions
        - Template  Versions
      responses:
        '200':
          $ref: '#/components/responses/template_version_deleted'
        default:
          $ref: '#/components/responses/template_error'
      x-codeSamples:
        - lang: Shell
          source: >
            curl -X DELETE
            https://api.lob.com/v1/templates/tmpl_4aa14648113e45b/versions/vrsn_534e339882d2282
            \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:
          label: CURL
        - lang: Typescript
          source: |
            try {
              const deleteTemplateVersion = await new TemplateVersionsApi(config).delete("tmpl_xxxx","vrsn_xxxx");
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            This feature is not currently supported by this library.
          label: NODE
        - lang: Ruby
          source: |
            templateVersionApi = TemplateVersionsApi.new(config)

            begin
              deletedTemplateVersion = templateVersionApi.delete("tmpl_4aa14648113e45b", "vrsn_534e339882d2282")
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = TemplateVersionsApi(api_client)

            try:
              deleted_resource = api.delete("tmpl_4aa14648113e45b", "vrsn_534e339882d2282")
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          source: |
            This feature is not currently supported by this library.
        - lang: Java
          source: |
            This feature is not currently supported by this library.
          label: JAVA
        - lang: Elixir
          source: |
            This feature is not currently supported by this library.
          label: ELIXIR
        - lang: CSharp
          source: |
            TemplateVersionsApi api = new TemplateVersionsApi(config);

            try {
              TemplateVersionDeletion response = api.delete("tmpl_xxx", "vrsn_xxx");
            } 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("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)


            deletedTemplateVersion, _, err :=
            apiClient.TemplateVersionsApi.Delete(context,
            "tmpl_4aa14648113e45b", "vrsn_534e339882d2282").Execute()


            if err != nil {
                return err
            }
          label: GO
  /templates/{tmpl_id}/versions:
    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.
      tags:
        - Templates
        - Versions
      parameters:
        - in: path
          name: tmpl_id
          description: The ID of the template associated with the retrieved versions
          required: true
          schema:
            $ref: '#/components/schemas/tmpl_id'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/before_after'
        - $ref: '#/components/parameters/include'
        - $ref: '#/components/parameters/date_created'
      responses:
        '200':
          $ref: '#/components/responses/all_template_versions'
        default:
          $ref: '#/components/responses/template_error'
      x-codeSamples:
        - lang: Shell
          source: >
            curl -X GET
            "https://api.lob.com/v1/templates/tmpl_ea6e6a1abf01703/versions?limit=2"
            \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:
          label: CURL
        - lang: Typescript
          source: |
            try {
              const templateVersions = await new TemplateVersionsApi(config).list(tmpl_xxxx);
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            This feature is not currently supported by this library.
          label: NODE
        - lang: Ruby
          source: |
            templateVersionsApi = TemplateVersionsApi.new(config)

            begin
              templateVersions = templateVersionsApi.list("tmpl_dadaaf7b76c9f25", { limit: 2 })
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = TemplateVersionsApi(api_client)

            try:
              template_versions = api.list("tmpl_dadaaf7b76c9f25", limit=2)
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          source: >
            $apiInstance = new OpenAPI\Client\Api\TemplateVersionsApi($config,
            new GuzzleHttp\Client());


            try {
                $result = $apiInstance->list(
                  tmpl_dadaaf7b76c9f25, // tmplId
                  2, // limit
                );
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            TemplateVersionsApi apiInstance = new TemplateVersionsApi(config);

            try {
              List response = apiInstance.list(
                "tmpl_dadaaf7b76c9f25", // tmplId
                2, // limit
                null, // before
                null, // after
                null, // include
                null // dateCreated
              );
            } catch (ApiException e) {
              e.printStackTrace();
            }
          label: JAVA
        - lang: Elixir
          source: |
            This feature is not currently supported by this library.
          label: ELIXIR
        - lang: CSharp
          source: >
            TemplateVersionsApi api = new TemplateVersionsApi(config);


            List<string> includeList = new List<string>();

            includeList.Add("total_count");

            Dictionary<String, DateTime> dateCreated = new Dictionary<String,
            DateTime>();

            DateTime dateCreatedDate = DateTime.Today.AddMonths(-1);

            dateCreated.Add("lt", dateCreatedDate);


            try {
              TemplateVersionList response = api.list(
                "tmpl_dadaaf7b76c9f25", // tmplId
                2, // limit
                null, // before
                null, // after
                includeList, // include
                dateCreated // dateCreated
              );
            } 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("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)

            TemplateVersionList = apiClient.TemplateVersionsApi.List(context,
            "tmpl_4aa14648113e45b").Execute()

            if err != nil {
                return err
            }
          label: GO
    post:
      operationId: create_template_version
      summary: Create
      description: Creates a new template version attached to the specified template.
      tags:
        - Templates
        - Versions
      parameters:
        - in: path
          name: tmpl_id
          description: The ID of the template the new version will be attached to
          required: true
          schema:
            $ref: '#/components/schemas/tmpl_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/template_version_writable'
            example:
              description: Some Description
              html: <html>HTML for {{name}}</html>
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/template_version_writable'
            example:
              description: Some Description
              html: <html>HTML for {{name}}</html>
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/template_version_writable'
            example:
              description: Some Description
              html: <html>HTML for {{name}}</html>
      responses:
        '200':
          $ref: '#/components/responses/post_template_version'
        default:
          $ref: '#/components/responses/template_error'
      x-codeSamples:
        - lang: Shell
          source: >
            curl https://api.lob.com/v1/templates/tmpl_4aa14648113e45b/versions
            \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \
              -d "description=Second Version" \
              --data-urlencode "html=<html>Second HTML for {{name}}</html>"
          label: CURL
        - lang: Typescript
          source: |
            const templateVersionCreate = new TemplateVersionWritable({
              description: 'Newer Template',
              html: '<html>Updated HTML for {{name}}</html>'
            });

            try {
              const myTemplateVersion = await new TemplateVersionsApi(config).create('tmpl_xxxx', templateVersionCreate);
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            This feature is not currently supported by this library.
          label: NODE
        - lang: Ruby
          source: |
            templateVersionCreate = TemplateVersionWritable.new({
              description: "Second Version",
              html: "<html>Second HTML for {{name}}</html>",
            });

            templateVersionApi = TemplateVersionsApi.new(config)

            begin
              createdTemplateVersion = templateVersionApi.create("tmpl_4aa14648113e45b", templateVersionCreate)
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            template_version_writable = TemplateVersionWritable(
              description = "Second Version",
              html = "<html>Second HTML for {{name}}</html>",
            )

            with ApiClient(configuration) as api_client:
              api = TemplateVersionsApi(api_client)

            try:
              created_template_version = api.create("tmpl_4aa14648113e45b", template_version_writable)
            except ApiException as e:
              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(
              array(
                "description"     => "Second Version",
                "html"     => "<html>Second HTML for {{name}}</html>",
              )
            );


            try {
                $result = $apiInstance->create("tmpl_4aa14648113e45b", $template_version_writable);
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            TemplateVersionsApi apiInstance = new TemplateVersionsApi(config);

            try {
              TemplateVersionWritable  = new TemplateVersionWritable();
              .set("Second Version");
              .set("<html>Second HTML for {{name}}</html>");

              TemplateVersion result = apiInstance.create();
            } catch (ApiException e) {
              e.printStackTrace();
            }
          label: JAVA
        - lang: Elixir
          source: |
            This feature is not currently supported by this library.
          label: ELIXIR
        - lang: CSharp
          source: >
            TemplateVersionsApi api = new TemplateVersionsApi(config);


            TemplateVersionWritable templateVersionWritable = new
            TemplateVersionWritable(
              "Second Version",  // description
              "<html>Second HTML for {{name}}</html>" // html
            );


            try {
              TemplateVersion result = api.create("tmpl_4aa14648113e45b", templateVersionWritable);
            } 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("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)



            var templateVersionCreate = *lob.NewTemplateVersionWritable()

            templateVersionCreate.SetDescription("Second Version")

            templateVersionCreate.SetHtml("<html>Second HTML for
            {{name}}</html>")




            createdtemplateVersion, _, err :=
            apiClient.TemplateVersionsApi.Create(context,
            "tmpl_4aa14648113e45b").TemplateVersionWritable(templateVersionCreate).Execute()


            if err != nil {
                return err
            }
          label: GO
  /templates/{tmpl_id}:
    parameters:
      - in: path
        name: tmpl_id
        description: id of the template
        required: true
        schema:
          $ref: '#/components/schemas/tmpl_id'
    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.
      tags:
        - Templates
      responses:
        '200':
          description: Returns a template object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/template'
              example:
                id: tmpl_c94e83ca2cd5121
                description: Test Template
                versions:
                  - id: vrsn_362184d96d9b0c9
                    suggest_json_editor: true
                    description: Test Template
                    engine: legacy
                    html: <html>HTML for {{name}}</html>
                    date_created: '2017-11-07T22:56:10.962Z'
                    date_modified: '2017-11-07T22:56:10.962Z'
                    object: version
                published_version:
                  id: vrsn_362184d96d9b0c9
                  suggest_json_editor: false
                  description: Test Template
                  engine: handlebars
                  html: <html>HTML for {{name}}</html>
                  date_created: '2017-11-07T22:56:10.962Z'
                  date_modified: '2017-11-07T22:56:10.962Z'
                  object: version
                metadata: {}
                date_created: '2017-11-07T22:56:10.962Z'
                date_modified: '2017-11-07T22:56:10.962Z'
                object: template
        default:
          $ref: '#/components/responses/template_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl https://api.lob.com/v1/templates/tmpl_c94e83ca2cd5121 \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:
          label: CURL
        - lang: Typescript
          source: |
            try {
              const Template = await new TemplatesApi(config).get('tmpl_xxxx');
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            This feature is not currently supported by this library.
          label: NODE
        - lang: Ruby
          source: |
            templateApi = TemplatesApi.new(config)

            begin
              retrievedTemplate = templateApi.get("tmpl_c94e83ca2cd5121")
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = TemplatesApi(api_client)

            try:
              template = api.get("tmpl_c94e83ca2cd5121")
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          source: >
            $apiInstance = new OpenAPI\Client\Api\TemplatesApi($config, new
            GuzzleHttp\Client());


            try {
                $result = $apiInstance->get("tmpl_c94e83ca2cd5121");
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            TemplatesApi apiInstance = new TemplatesApi(config);

            try {
              Template response = apiInstance.get("tmpl_c94e83ca2cd5121");
            } catch (ApiException e) {
              e.printStackTrace();
            }
          label: JAVA
        - lang: Elixir
          source: |
            This feature is not currently supported by this library.
          label: ELIXIR
        - lang: CSharp
          source: |
            TemplatesApi api = new TemplatesApi(config);

            try {
              Template response = api.get("tmpl_c94e83ca2cd5121");
            } 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("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)


            fetchedTemplate, _, err :=
            apiClient.TemplatesApi.Get(context,"tmpl_c94e83ca2cd5121").Execute()


            if err != nil {
                return err
            }
          label: GO
    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.
      tags:
        - Templates
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/template_update'
            example:
              description: Updated Example
              published_version: vrsn_a
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/template_update'
            example:
              description: Updated Example
              published_version: vrsn_a
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/template_update'
            example:
              description: Updated Example
              published_version: vrsn_a
      responses:
        '200':
          description: Returns the updated template object
          headers:
            ratelimit-limit:
              $ref: '#/components/headers/ratelimit-limit'
            ratelimit-remaining:
              $ref: '#/components/headers/ratelimit-remaining'
            ratelimit-reset:
              $ref: '#/components/headers/ratelimit-reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/template'
              example:
                id: tmpl_c94e83ca2cd5121
                description: Test Template
                versions:
                  - id: vrsn_362184d96d9b0c9
                    suggest_json_editor: true
                    description: Test Template
                    engine: legacy
                    html: <html>HTML for {{name}}</html>
                    date_created: '2017-11-07T22:56:10.962Z'
                    date_modified: '2017-11-07T22:56:10.962Z'
                    object: version
                published_version:
                  id: vrsn_362184d96d9b0c9
                  suggest_json_editor: false
                  description: Test Template
                  engine: handlebars
                  html: <html>HTML for {{name}}</html>
                  date_created: '2017-11-07T22:56:10.962Z'
                  date_modified: '2017-11-07T22:56:10.962Z'
                  object: version
                metadata: {}
                date_created: '2017-11-07T22:56:10.962Z'
                date_modified: '2017-11-07T22:56:10.962Z'
                object: template
        default:
          $ref: '#/components/responses/template_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl https://api.lob.com/v1/templates/tmpl_c94e83ca2cd5121 \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \
              -d "description=Updated description" \
              -d "published_version=vrsn_362184d96d9b0c9"
          label: CURL
        - lang: Typescript
          source: |
            const Templates = new TemplatesApi(config);

            try {
              const updateData = new TemplateUpdate ({
                description: 'updated template',
                published_version: 'vrsn_xxxx'
            });
              const updateTemplate = await Templates.update('tmpl_xxxx', updateData);
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            This feature is not currently supported by this library.
          label: NODE
        - lang: Ruby
          source: |
            templateUpdate = TemplateUpdate.new({
              description: "updated template",
              published_version: "vrsn_362184d96d9b0c9",
            })

            templateApi = TemplatesApi.new(config)

            begin
              updatedTemplate = templateApi.update("tmpl_c94e83ca2cd5121", templateUpdate)
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = TemplatesApi(api_client)

            update_data = TemplateUpdate(
              description = "updated template",
              published_version = "vrsn_362184d96d9b0c9"
            )

            try:
              update_template = api.update("tmpl_c94e83ca2cd5121", update_data)
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          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) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            TemplatesApi apiInstance = new TemplatesApi(config);
            TemplateUpdate update = new TemplateUpdate();

            update.setDescription("update template");
            update.setPublishedVersion("vrsn_362184d96d9b0c9";

            try {
              apiInstance.update("tmpl_c94e83ca2cd5121", update);
            } catch (ApiException e) {
              e.printStackTrace();
            }
          label: JAVA
        - lang: Elixir
          source: |
            This feature is not currently supported by this library.
          label: ELIXIR
        - lang: CSharp
          source: >
            TemplatesApi api = new TemplatesApi(config);

            TemplateUpdate update = new TemplateUpdate("update template",
            "vrsn_362184d96d9b0c9");


            try {
              api.update("tmpl_c94e83ca2cd5121", update);
            } 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("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)


            var templateWritable = *lob.NewTemplateWritable("<html>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()


            if err != nil {
                return err
            }
          label: GO
    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.
      tags:
        - Templates
      responses:
        '200':
          $ref: '#/components/responses/template_deleted'
        default:
          $ref: '#/components/responses/template_error'
      x-codeSamples:
        - lang: Shell
          source: >
            curl -X DELETE https://api.lob.com/v1/templates/tmpl_df934eeda694203
            \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:
          label: CURL
        - lang: Typescript
          source: |
            try {
              const deleteTemplate = await new TemplatesApi(config).delete('tmpl_xxxx');
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            This feature is not currently supported by this library.
          label: NODE
        - lang: Ruby
          source: |
            templateApi = TemplatesApi.new(config)

            begin
              deletedTemplate = templateApi.delete("tmpl_df934eeda694203")
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = TemplatesApi(api_client)

            try:
              deleted_resource = api.delete("tmpl_df934eeda694203")
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          source: >
            $apiInstance = new OpenAPI\Client\Api\TemplatesApi($config, new
            GuzzleHttp\Client());


            try {
                $result = $apiInstance->delete("tmpl_df934eeda694203");
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            TemplatesApi apiInstance = new TemplatesApi(config);

            try {
                TemplateDeletion response = apiInstance.delete("tmpl_df934eeda694203");
            } catch (ApiException e) {
                e.printStackTrace();
            }
          label: JAVA
        - lang: Elixir
          source: |
            This feature is not currently supported by this library.
          label: ELIXIR
        - lang: CSharp
          source: |
            TemplatesApi api = new TemplatesApi(config);

            try {
              TemplateDeletion response = api.delete("tmpl_df934eeda694203");
            } 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("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)


            deletedTemplate, _, err := apiClient.TemplatesApi.Delete(context,
            "tmpl_df934eeda694203").Execute()


            if err != nil {
                return err
            }
          label: GO
  /templates:
    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.
      tags:
        - Templates
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/before_after'
        - $ref: '#/components/parameters/include'
        - $ref: '#/components/parameters/date_created'
        - $ref: '#/components/parameters/metadata'
      responses:
        '200':
          $ref: '#/components/responses/all_templates'
        default:
          $ref: '#/components/responses/template_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl -X GET "https://api.lob.com/v1/templates?limit=2" \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:
          label: CURL
        - lang: Typescript
          source: |
            try {
              const templates = await new TemplatesApi(config).list(2);
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            This feature is not currently supported by this library.
          label: NODE
        - lang: Ruby
          source: |
            templatesApi = TemplatesApi.new(config)

            begin
              templates = templatesApi.list({ limit: 2 })
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = TemplatesApi(api_client)

            try:
              templates = api.list(limit=2)
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          source: >
            $apiInstance = new OpenAPI\Client\Api\TemplatesApi($config, new
            GuzzleHttp\Client());


            try {
                $result = $apiInstance->list(
                  2, // limit
                );
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            TemplatesApi apiInstance = new TemplatesApi(config);

            try {
              List response = apiInstance.list(
                2, // limit
                null, // before
                null, // after
                null, // include
                null, // dateCreated
                null, // metadata
                null // size
              );
            } catch (ApiException e) {
              e.printStackTrace();
            }
          label: JAVA
        - lang: Elixir
          source: |
            This feature is not currently supported by this library.
          label: ELIXIR
        - lang: CSharp
          source: >
            TemplatesApi api = new TemplatesApi(config);


            List<string> includeList = new List<string>();

            includeList.Add("total_count");

            Dictionary<String, String> metadata = new Dictionary<String,
            String>();

            metadata.Add("name", "Harry");

            Dictionary<String, DateTime> dateCreated = new Dictionary<String,
            DateTime>();

            DateTime dateCreatedDate = DateTime.Today.AddMonths(-1);

            dateCreated.Add("lt", dateCreatedDate);


            try {
              TemplateList response = api.list(
                2, // limit
                null, // before
                null, // after
                includeList, // include
                dateCreated, // dateCreated
                metadata // metadata
              );
            } catch (ApiException e) {
              Console.WriteLine(e.ToString());
            }
          label: CSHARP
        - lang: Go
          source: >
            var context = context.Background()

            context = context.WithValue(suite.ctx, lob.ContextBasicAuth,
            lob.BasicAuth{UserName: os.Getenv("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)

            TemplateList = apiClient.TemplatesApi.List(context).Execute()

            if err != nil {
                return err
            }
          label: GO
    post:
      operationId: create_template
      summary: Create
      description: >-
        Creates a new template for use with the Print & Mail API. In Live mode,
        you can only have as many non-deleted templates as allotted in your
        current <a href="https://dashboard.lob.com/#/settings/editions"
        target="_blank">Print & Mail Edition</a>. If you attempt to create a
        template past your limit, you will receive a `403` error. There is no
        limit in Test mode.
      tags:
        - Templates
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/template_writable'
            example:
              description: demo
              html: <html>HTML for {{name}}</html>
              metadata:
                spiffy: 'true'
              engine: handlebars
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/template_writable'
            example:
              description: demo
              html: <html>HTML for {{name}}</html>
              metadata:
                spiffy: 'true'
              engine: handlebars
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/template_writable'
            example:
              description: demo
              html: <html>HTML for {{name}}</html>
              metadata:
                spiffy: 'true'
              engine: handlebars
      responses:
        '200':
          description: Returns a template object
          headers:
            ratelimit-limit:
              $ref: '#/components/headers/ratelimit-limit'
            ratelimit-remaining:
              $ref: '#/components/headers/ratelimit-remaining'
            ratelimit-reset:
              $ref: '#/components/headers/ratelimit-reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/template'
              example:
                id: tmpl_c94e83ca2cd5121
                description: Test Template
                versions:
                  - id: vrsn_362184d96d9b0c9
                    suggest_json_editor: true
                    description: Test Template
                    engine: legacy
                    html: <html>HTML for {{name}}</html>
                    date_created: '2017-11-07T22:56:10.962Z'
                    date_modified: '2017-11-07T22:56:10.962Z'
                    object: version
                published_version:
                  id: vrsn_362184d96d9b0c9
                  suggest_json_editor: false
                  description: Test Template
                  engine: handlebars
                  html: <html>HTML for {{name}}</html>
                  date_created: '2017-11-07T22:56:10.962Z'
                  date_modified: '2017-11-07T22:56:10.962Z'
                  object: version
                metadata: {}
                date_created: '2017-11-07T22:56:10.962Z'
                date_modified: '2017-11-07T22:56:10.962Z'
                object: template
        default:
          $ref: '#/components/responses/template_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl https://api.lob.com/v1/templates \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \
              -d "description=Test Template" \
              --data-urlencode "html=<html>HTML for {{name}}</html>"
          label: CURL
        - lang: Typescript
          source: |
            const templateCreate = new TemplateWritable({
              description: 'Newer Template',
              html: '<html>Updated HTML for {{name}}</html>'
            });

            try {
              const myTemplate = await new TemplatesApi(config).create(templateCreate);
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            This feature is not currently supported by this library.
          label: NODE
        - lang: Ruby
          source: |
            templateCreate = TemplateWritable.new({
              description: "Test Template",
              html: "<html>HTML for {{name}}</html>",
            });

            templateApi = TemplatesApi.new(config)

            begin
              createdTemplate = templateApi.create(templateCreate)
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            template_writable = TemplateWritable(
              description = "Test Template",
              html = "<html>HTML for {{name}}</html>",
            )

            with ApiClient(configuration) as api_client:
              api = TemplatesApi(api_client)

            try:
              created_template = api.create(template_writable)
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          source: >
            $apiInstance = new OpenAPI\Client\Api\TemplatesApi($config, new
            GuzzleHttp\Client());

            $template_writable = new OpenAPI\Client\Model\TemplateWritable(
              array(
                "description"     => "Test Template",
                "html"     => "<html>HTML for {{name}}</html>",
              )
            );


            try {
                $result = $apiInstance->create($template_writable);
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: |
            TemplatesApi apiInstance = new TemplatesApi(config);

            try {
              TemplateWritable  = new TemplateWritable();
              .set("Test Template");
              .set("<html>HTML for {{name}}</html>");

              Template result = apiInstance.create();
            } catch (ApiException e) {
              e.printStackTrace();
            }
          label: JAVA
        - lang: Elixir
          source: |
            This feature is not currently supported by this library.
          label: ELIXIR
        - lang: CSharp
          source: |
            TemplatesApi api = new TemplatesApi(config);

            TemplateWritable templateWritable = new TemplateWritable(
              "Test Template",  // description
              "<html>HTML for {{name}}</html>" // html
            );

            try {
              Template result = api.create(templateWritable);
            } catch (ApiException e) {
              Console.WriteLine(e.ToString());
            }
          label: CSHARP
        - lang: Go
          source: >
            var context = context.Background()

            context = context.WithValue(suite.ctx, lob.ContextBasicAuth,
            lob.BasicAuth{UserName: os.Getenv("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)



            var templateCreate = *lob.NewTemplateWritable()

            templateCreate.SetDescription("Test Template")

            templateCreate.SetHtml("<html>HTML for {{name}}</html>")




            createdtemplate, _, err :=
            apiClient.TemplatesApi.Create(context).TemplateWritable(templateCreate).Execute()


            if err != nil {
                return err
            }
          label: GO
  /uploads:
    get:
      operationId: uploads_list
      summary: List
      description: Returns a list of your uploads. Optionally, filter uploads by campaign.
      tags:
        - Uploads
      parameters:
        - required: false
          schema:
            $ref: '#/components/schemas/cmp_id'
          name: campaignId
          description: id of the campaign
          in: query
      responses:
        '200':
          $ref: '#/components/responses/all_uploads'
      x-codeSamples:
        - lang: Shell
          source: |
            curl https://api.lob.com/v1/uploads \
              -u <YOUR API KEY>:
          label: CURL
        - lang: Ruby
          source: |
            uploadsApi = UploadsApi.new(config)

            begin
              uploads = uploadsApi.list_upload({ campaign_id: "cmp_e05ee61ff80764b" })
            rescue => err
              p err.message
            end
          label: RUBY
    post:
      operationId: upload_create
      summary: Create
      description: Creates a new upload with the provided properties.
      tags:
        - Uploads
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/upload_writable'
      responses:
        '201':
          description: Upload created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/upload'
              example:
                id: upl_71be866e430b11e9
                accountId: fa9ea650fc7b31a89f92
                campaignId: cmp_1933ad629bae1408
                mode: live
                failuresUrl: http://www.example.com
                originalFilename: my_audience.csv
                state: Draft
                totalMailpieces: 100
                failedMailpieces: 5
                validatedMailpieces: 95
                bytesProcessed: 17628
                dateCreated: '2017-09-05T17:47:53.767Z'
                dateModified: '2017-09-05T17:47:53.767Z'
                requiredAddressColumnMapping:
                  name: null
                  address_line1: null
                  address_city: null
                  address_state: null
                  address_zip: null
                optionalAddressColumnMapping:
                  address_line2: null
                  company: null
                  address_country: null
                mergeVariableColumnMapping: null
                metadata:
                  columns: []
        '422':
          $ref: '#/components/responses/upload_validation_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl --location --request POST 'https://api.lob.com/v1/uploads' \
            --header 'Content-Type: application/json' \
            -u YOUR_KEY_HERE: \
            --data-raw '{
                "campaignId": "cmp_f33809b18b6f3ea8"
            }'
          label: CURL
        - lang: Ruby
          source: |
            uploadCreate = UploadWritable.new({
              campaign_id: "cmp_e05ee61ff80764b",
            });

            uploadApi = UploadsApi.new(config)

            begin
              createdUpload = uploadApi.create_upload(uploadCreate)
            rescue => err
              p err.message
            end
          label: RUBY
  /uploads/{upl_id}:
    parameters:
      - in: path
        name: upl_id
        description: id of the upload
        required: true
        schema:
          $ref: '#/components/schemas/upl_id'
    get:
      operationId: upload_retrieve
      summary: Retrieve
      description: >-
        Retrieves the details of an existing upload. You need only supply the
        unique upload identifier that was returned upon upload creation.
      tags:
        - Uploads
      responses:
        '200':
          description: Returns 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 <YOUR API KEY>: \
          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 <YOUR API KEY>: \
              -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 <YOUR API KEY>:
          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
        - Files
      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 <YOUR API KEY>: \
              -F file=@<YOUR FILE NAME HERE>
          label: CURL
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = UploadsApi(api_client)

            try:
              res = api.upload_file("upl_71be866e430b11e9", open("<PATH_TO_CSV>", "rb"))
            except ApiException as e:
              print(e)
          label: PYTHON
  /uploads/{upl_id}/exports:
    parameters:
      - in: path
        name: upl_id
        description: ID of the upload
        required: true
        schema:
          $ref: '#/components/schemas/upl_id'
    post:
      operationId: upload_export_create
      summary: Create Export
      description: >-
        Campaign Exports can help you understand exactly which records in a
        campaign could not be created. By initiating and retrieving an export,
        you will get row-by-row errors for your campaign. For a step-by-step
        walkthrough of creating a campaign and exporting failures, see our
        [Campaigns
        Guide](https://help.lob.com/print-and-mail/building-a-mail-strategy/campaign-or-triggered-sends/launch-your-first-campaign).


        Create an export file associated with an upload.
      tags:
        - Uploads
        - Exports
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - all
                    - failures
                    - successes
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/upload_create_export'
        4XX:
          $ref: '#/components/responses/upload_export_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl https://api.lob.com/v1/uploads/upl_71be866e430b11e9/exports \
              -u <YOUR API KEY>: \
              -d "type=failures" \
          label: CURL
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = UploadsApi(api_client)

            export_model = ExportModel(
              type = "all"
            )

            try:
              created_export = api.create_export("upl_71be866e430b11e9", export_model)
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: Ruby
          source: |
            exportModel = ExportModel.new({
              type: "all"
            })

            uploadsApi = UploadsApi.new(config)

            begin
              createdExport = uploadsApi.create_export("upl_71be866e430b11e9", exportModel)
            rescue => err
              p err.message
            end
          label: RUBY
  /uploads/{upl_id}/report:
    parameters:
      - in: path
        name: upl_id
        description: ID of the upload
        required: true
        schema:
          $ref: '#/components/schemas/upl_id'
      - in: query
        required: false
        name: status
        description: >-
          The status of line items to filter and retrieve. By default all line
          items are returned.
        schema:
          enum:
            - Validated
            - Failed
            - Processing
          type: string
      - in: query
        required: false
        name: limit
        description: How many results to return.
        schema:
          type: integer
          minimum: 1
          default: 100
          maximum: 100
          example: 10
      - $ref: '#/components/parameters/offset'
    get:
      operationId: report_retrieve
      summary: Retrieve Line Item Report
      description: >-
        Retrieves the line item data for each row from the csv file associated
        with the upload id record. NOTE: This endpoint is currently feature
        flagged. Please reach out to Lob's support team if you  would like
        access to this API endpoint.
      tags:
        - Uploads
        - Reports
      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
        '404':
          $ref: '#/components/responses/upload_not_found'
      x-codeSamples:
        - lang: Shell
          source: |
            curl https://api.lob.com/v1/uploads/upl_71be866e430b11e9/report \
              -u <YOUR API KEY>:
          label: CURL
        - lang: Python
          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
        - lang: Ruby
          source: |
            uploadsApi = UploadsApi.new(config)

            begin
              retrievedreport = uploadsApi.get_report("upl_71be866e430b11e9")
            rescue => err
              p err.message
            end
          label: RUBY
  /uploads/{upl_id}/exports/{ex_id}:
    parameters:
      - in: path
        name: upl_id
        description: ID of the upload
        required: true
        schema:
          $ref: '#/components/schemas/upl_id'
      - in: path
        name: ex_id
        description: ID of the export
        required: true
        schema:
          $ref: '#/components/schemas/ex_id'
    get:
      operationId: export_retrieve
      summary: Retrieve Export
      description: >-
        Retrieves the details of an existing export. You need only supply the
        unique export identifier that was returned upon export creation. If you
        try retrieving an export immediately after creating one (i.e., before
        we're done processing the export), you will get back an export object
        with `state = in_progress`.
      tags:
        - Uploads
        - Exports
      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 <YOUR API KEY>:
          label: CURL
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = UploadsApi(api_client)

            try:
              retrieved_export = api.get_export("upl_71be866e430b11e9", "ex_6a94fe68fd151e0f8")
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: Ruby
          source: |
            uploadsApi = UploadsApi.new(config)

            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:
        - U S  Autocompletions
      parameters:
        - in: query
          name: case
          schema:
            type: string
            enum:
              - upper
              - proper
            default: upper
          description: >-
            Casing of the verified address. Possible values are `upper` and
            `proper` for uppercased (e.g. "PO BOX") and proper-cased (e.g. "PO
            Box"), respectively. Only affects `primary_line`, `city`, and
            `state`. Default casing is `upper`.
          required: false
        - in: query
          name: valid_addresses
          schema:
            type: boolean
            enum:
              - true
              - false
            default: false
          description: >-
            Possible values are `true` and `false`. If false, not all of the
            suggestions in the response will be valid addresses; they'll need to
            be verified in order to determine the deliverability. The
            valid_addresses flag will greatly reduce the number of keystrokes
            needed before reaching an intended address.
          required: false
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/us_autocompletions_writable'
            examples:
              basic:
                value:
                  address_prefix: 185 B
                  city: San Francisco
                  state: CA
                  zip_code: '94107'
                  geo_ip_sort: false
              test:
                value:
                  address_prefix: 1 sugg
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/us_autocompletions_writable'
            examples:
              basic:
                value:
                  address_prefix: 185 B
                  city: San Francisco
                  state: CA
                  zip_code: '94107'
                  geo_ip_sort: false
              test:
                value:
                  address_prefix: 1 sugg
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/us_autocompletions_writable'
            examples:
              basic:
                value:
                  address_prefix: 185 B
                  city: San Francisco
                  state: CA
                  zip_code: '94107'
                  geo_ip_sort: false
              test:
                value:
                  address_prefix: 1 sugg
      responses:
        '200':
          $ref: '#/components/responses/us_autocompletions'
        default:
          $ref: '#/components/responses/us_autocompletions_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl https://api.lob.com/v1/us_autocompletions \
              -u <YOUR_LIVE_API_KEY>: \
              -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 = UsAutocompletionsApi(api_client)

            autocompletion_data = UsAutocompletionsWritable(
              address_prefix = "185 B",
              city = "San Francisco",
              state = "CA",
              zip_code = "94017",
            )

            try:
              autocompleted_addresses = api.autocomplete(autocompletion_data)
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          source: >
            $apiInstance = new OpenAPI\Client\Api\UsAutocompletionsApi($config,
            new GuzzleHttp\Client());


            $autocompletionData = new
            OpenAPI\Client\Model\UsAutocompletionsWritable(array(
                "address_prefix" =>  "185 B",
                "city" =>  "San Francisco",
                "state" =>  "CA",
                "zip_code" =>  "94017",
            ));


            try {
                $result = $apiInstance->autocomplete($autocompletionData);
            } catch (Exception $e) {
                echo $e->getMessage(), PHP_EOL;
            }
        - lang: Java
          source: >
            UsAutocompletionsApi apiInstance = new UsAutocompletionsApi(config);

            UsAutocompletionsWritable autoCompletionWritable = new
            UsAutocompletionsWritable();

            autoCompletionWritable.setAddressPrefix("185 B");

            autoCompletionWritable.setCity("San Francisco");

            autoCompletionWritable.setState("CA");

            autoCompletionWritable.setZipCode("94017");


            try {
              UsAutocompletions usAutocompletion = apiInstance.autocomplete(autoCompletionWritable);
            } catch (ApiException e) {
              e.printStackTrace();
            }
          label: JAVA
        - lang: Elixir
          source: |
            Lob.USAutocompletion.autocomplete(%{
              address_prefix: "185 B",
              city:           "San Francisco",
              state:          "CA",
              zip_code:       "94107"
            })
          label: ELIXIR
        - lang: CSharp
          source: >
            UsAutocompletionsApi api = new UsAutocompletionsApi(config);

            UsAutocompletionsWritable autoCompletionWritable = new
            UsAutocompletionsWritable(
              "185 B",  // address_prefix
              "San Francisco",  // city
              "CA",  // state
              "94017" // zip_code
            );


            try {
              UsAutocompletions usAutocompletion = api.autocomplete(autoCompletionWritable);
            } catch (ApiException e) {
              Console.WriteLine(e.ToString());
            }
          label: CSHARP
        - lang: Go
          source: >
            var context = context.Background()

            context = context.WithValue(context, lob.ContextBasicAuth,
            lob.BasicAuth{UserName: os.Getenv("<YOUR_API_KEY>")})


            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:
        - 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':
          $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/us_reverse_geocode_lookups \
              -u <YOUR_LIVE_API_KEY>: \
              -d "latitude=37.7749" \
              -d "longitude=122.4194" \
          label: CURL
        - 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: |
            Lob.reverseGeocodeLookups.lookup({
              latitude: 37.7749,
              longitude: 122.4194
            }, function (err, res) {
              console.log(err, res);
            });
          label: NODE
        - lang: Ruby
          source: |
            reverseGeocodeLookupsApi = ReverseGeocodeLookupsApi.new(config)

            coordinates = Location.new({
              latitude: 37.777456,
              longitude: -122.393039,
            })

            begin
              geocode = reverseGeocodeLookupsApi.lookup(coordinates)
            rescue => err
              p err.message
            end
          label: RUBY
        - lang: Python
          source: |
            with ApiClient(configuration) as api_client:
              api = ReverseGeocodeLookupsApi(api_client)

            coordinates = Location(
              latitude = 37.777456,
              longitude = -122.393039,
            )

            try:
              geocode = api.lookup(coordinates)
            except ApiException as e:
              print(e)
          label: PYTHON
        - lang: PHP
          source: >
            $apiInstance = new
            OpenAPI\Client\Api\ReverseGeocodeLookupsApi($config, new
            GuzzleHttp\Client());


            $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("<YOUR_API_KEY>")})


            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: 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:
        - U S  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 <YOUR_LIVE_API_KEY>: \
              -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'
            };

            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)

            verificationData = UsVerificationsWritable.new({
              primary_line: "210 King Street",
              city: "San Francisco",
              state: "CA",
              zip_code: "94017",
            })

            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",
            )

            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());


            $verificationData = new
            OpenAPI\Client\Model\UsVerificationsWritable(array(
              'primary_line'     => '210 King Street',
              'city'     => 'San Francisco',
              'state'     => 'CA',
              'zip_code'     => '94017',
            ));


            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");

            singleVerify.setCity("San Francisco");

            singleVerify.setState("CA");

            singleVerify.setZipCode("94017");


            UsVerificationsApi apiInstance = new UsVerificationsApi(config);

            try {
              apiInstance.verifySingle(singleVerify, null);
            } catch (ApiException e) {
              e.printStackTrace();
            }
          label: JAVA
        - lang: Elixir
          source: |
            Lob.USVerification.verify(%{
              primary_line: "210 King Street",
              city: "San Francisco",
              state: "CA",
              zip_code: "94107"
            })
          label: ELIXIR
        - lang: CSharp
          source: |
            UsVerificationsWritable singleVerify = new UsVerificationsWritable(
              null,
              null,
              "210 King Street",
              null,
              null,
              "San Francisco",
              "CA",
              "94017"
            );

            UsVerificationsApi api = new UsVerificationsApi(config);

            try {
              api.verifySingle(singleVerify, null);
            } catch (ApiException e) {
              Console.WriteLine(e.ToString());
            }
          label: CSHARP
  /us_zip_lookups:
    post:
      operationId: zip_lookup
      summary: Lookups
      description: Returns information about a ZIP code
      tags:
        - Zip  Lookups
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/zip5'
            example:
              zip_code: '94107'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/zip5'
            example:
              zip_code: '94107'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/zip5'
            example:
              zip_code: '94107'
      responses:
        '200':
          $ref: '#/components/responses/zip_lookups'
        default:
          $ref: '#/components/responses/zip_lookups_error'
      x-codeSamples:
        - lang: Shell
          source: |
            curl https://api.lob.com/v1/us_zip_lookups \
              -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \
              -d "zip_code=94107"
          label: CURL
        - lang: Typescript
          source: |
            const ZipLookup = new ZipLookupsApi(av_config);
            const zipRequest : ZipEditable = {
              zip_code: '07090'
            }
            try {
              const zipLookup : Zip = await ZipLookup.lookup(zipRequest);
            } catch (err: any) {
              console.error(err);
            }
          label: TYPESCRIPT
        - lang: Javascript
          source: |
            Lob.usZipLookups.lookup({
              zip_code: '94107'
            }, function (err, res) {
              console.log(err, res);
            });
          label: NODE
        - lang: Ruby
          source: |
            zipLookupsApi = ZipLookupsApi.new(config)

            zipRequest = ZipEditable.new({
              zip_code: "94107"
            })

            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)

            zip_request = ZipEditable(
              zip_code = "94107"
            )

            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());


            $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("<YOUR_API_KEY>")})


            var apiClient = *lob.NewAPIClient(configuration)


            var zipEditable = *lob.NewZipEditable()

            zipEditable.SetZipCode("94107")


            resp, _, err :=
            apiClient.ZipLookupsApi.Lookup(context).ZipEditable(zipEditable).Execute()


            if err != nil {
                return err
            }
          label: GO
x-webhooks:
  events:
    post:
      summary: Events
      description: Information about an event
      operationId: event
      tags:
        - Events
      responses:
        '200':
          $ref: '#/components/responses/events'
  tracking_events:
    post:
      summary: Tracking Events
      description: Information about tracking events
      operationId: tracking_event
      tags:
        - Tracking Events
      responses:
        '200':
          $ref: '#/components/responses/tracking_events'
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
  schemas:
    lob_credits_balance:
      type: object
      required:
        - balance
      properties:
        balance:
          type: number
          description: >-
            Account's current balance of Lob Credits. Can be positive, negative,
            or zero.
          example: 1000
    date_filter:
      type: object
      additionalProperties:
        type: string
      description: >-
        Filter by ISO-8601 date or datetime, e.g. `{ "gt": "2012-01-01", "lt":
        "2012-01-31T12:34:56Z" }` where `gt` is >, `lt` is <, `gte` is e, and
        `lte` is d.
    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 <a
                href="https://dashboard.lob.com/#/settings/account"
                target="_blank">Account Settings</a> 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.


                **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 <a
                href="https://dashboard.lob.com/#/settings/editions"
                target="_blank">Print &amp; Mail Editions</a>. Value is `true`
                if the address was altered because the recipient filed for a <a
                href="#tag/National-Change-of-Address">National Change of
                Address Linkage (NCOALink)</a>, `false` if the NCOALink check
                was run but no altered address was found, and `null` if the
                NCOALink check was not run. The NCOALink check does not happen
                for non-US addresses, for non-deliverable US addresses, or for
                addresses created before the NCOALink feature was added to your
                account.
              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 PEOPLES REPUBLIC OF)
                - KOREA, REPUBLIC OF
                - KUWAIT
                - KYRGYZSTAN
                - LAO PEOPLES 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 <a href="https://www.frbservices.org/index.html"
            target="_blank">valid US routing number</a>.
          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 <a
            href="https://dashboard.lob.com/#/login"
            target="_blank">Dashboard</a>.
          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. <a href="https://help.lob.com/print-and-mail/getting-data-and-results/tracking-your-mail#mailed-tracking-events-4" target="_blank">More about
                    Mailed.</a>
                    Note this data is only available in Enterprise editions of
                    Lob. <a href="https://lob.com/support/contact#contact" target="_blank">Contact Sales</a> 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 recipients 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.

                <a
                href="https://help.lob.com/print-and-mail/getting-data-and-results/tracking-your-mail#mailed-tracking-events-4"
                target="_blank">More about tracking</a>
            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 <a
        href="https://help.lob.com/print-and-mail/designing-mail-creatives/dynamic-personalization#using-html-and-merge-variables-10"
        target="_blank">our guide to using html and merge variables</a>.
        Depending on your <a href="https://dashboard.lob.com/#/settings/account"
        target="_blank">Merge Variable strictness</a> setting, if you define
        variables in your HTML but do not pass them here, you will either
        receive an error or the variable will render as an empty string. These
        settings only apply on HTML templates and not on QR code redirect URLs.
      maxLength: 25000
      nullable: true
    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 <a
        href="https://lob.com/pricing/print-mail#compare"
        target="_blank">cheaper option</a> which is

        less predictable and takes longer to deliver. `usps_standard` cannot be
        used with `4x6`

        postcards or for any postcards sent outside of the United States.
      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 <a
            href="https://dashboard.lob.com/#/settings/editions"
            target="_blank">Print & Mail Edition</a>, US addresses may also be
            run through <a href="#tag/National-Change-of-Address">National
            Change of Address Linkage(NCOALink)</a>. Non-US addresses will be
            standardized into uppercase only. If a US address used does not meet
            your accounts <a
            href="https://dashboard.lob.com/#/settings/account"
            target="_blank">US Mail strictness setting</a>, the request will
            fail. <a
            href="https://help.lob.com/print-and-mail/all-about-addresses"
            target="_blank">Lob Guide: Verification of Mailing Addresses</a>
          oneOf:
            - $ref: '#/components/schemas/adr_id'
            - $ref: '#/components/schemas/inline_address'
    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 <a
        href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_template.pdf"
        target="_blank">PDF</a> and [HTML](#section/HTML-Examples) templates.

        See <a href="https://lob.com/pricing/print-mail#compare"
        target="_blank">pricing</a> for extra costs incurred.
      oneOf:
        - $ref: '#/components/schemas/html_string'
        - $ref: '#/components/schemas/tmpl_id'
        - $ref: '#/components/schemas/remote_file_url'
        - 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 <a
        href="#tag/Billing-Groups">Billing Group API</a> 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 <a
            href="https://help.lob.com/print-and-mail/designing-mail-creatives/adding-qr-codes#destination-url-and-redirects"
            target="_blank">our help center</a>.
        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 <a
        href="https://pe.usps.com/text/pub28/28api_008.htm#:~:text=I51.,-4%20Urbanizations&text=In%20Puerto%20Rico%2C%20identical%20street,placed%20before%20the%20urbanization%20name."
        target="_blank">USPS documentation</a> for clarification.
      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 <a href="https://en.wikipedia.org/wiki/ISO_3166-2:US"
                target="_blank">ISO 3166-2</a> two letter code or subdivision
                name for the state. `city` and `state` are required if no
                `zip_code` is passed.
              maxLength: 50
            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 <a href="https://en.wikipedia.org/wiki/ISO_3166-2"
        target="_blank">ISO 3166-2</a> 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 <a href="https://en.wikipedia.org/wiki/FIPS_county_code"
        target="_blank">FIPS county code</a> which uniquely identifies
        `components[county]`. It consists of a 2-digit state code and a 3-digit
        county code.
      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 <a
            href="https://en.wikipedia.org/wiki/Commercial_mail_receiving_agency"
            target="_blank">CMRA-authorized</a> private mailbox.
        pmb_number:
          type: string
          description: >
            Number of a <a
            href="https://en.wikipedia.org/wiki/Commercial_mail_receiving_agency"
            target="_blank">CMRA-authorized</a> 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 <a
            href="https://www.usps.com/nationalpremieraccounts/rdi.htm"
            target="_blank">Residential Delivery Indicator (RDI)</a> 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 <a
            href="https://en.wikipedia.org/wiki/Commercial_mail_receiving_agency"
            target="_blank">CMRA-authorized</a>. 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 <a
            href="https://docs.informatica.com/data-engineering/data-engineering-quality/10-4-0/address-validator-port-reference/postal-carrier-certification-data-ports/early-warning-system-return-code.html"
            target="_blank">Early Warning System</a>, meaning the address is
            under development and not yet ready to receive mail. However, it
            should become available in a few months.
          example: false
        lacs_indicator:
          type: string
          enum:
            - 'Y'
            - 'N'
            - ''
          description: >
            Indicates whether this address has been converted by

            <a href="https://postalpro.usps.com/address-quality/lacslink"
            target="_blank">LACS<sup>Link</sup></a>.

            LACS<sup>Link</sup> corrects outdated addresses into their modern
            counterparts.

            Possible values are:

            * `Y`  New address produced with a matching record in
            LACS<sup>Link</sup>.

            * `N`  New address could not be produced with a matching record in
            LACS<sup>Link</sup>.

            * `''`  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
            LACS<sup>Link</sup>.

            * `92`  A LACS<sup>Link</sup> record was matched after dropping
            secondary information.

            * `14`  A match was found in LACS<sup>Link</sup>, but could not be
            converted to a deliverable address.

            * `00`  A match was not found in LACS<sup>Link</sup>, and no new
            address was produced.

            * `''`  LACS<sup>Link</sup> 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

            <a
            href="https://postalpro.usps.com/address-quality-solutions/suitelink"
            target="_blank">Suite<sup>Link</sup></a>.

            Suite<sup>Link</sup> attempts to provide secondary information to
            business addresses.

            Possible values are:

            * `A`  A Suite<sup>Link</sup> match was found and secondary
            information was added.

            * `00`  A Suite<sup>Link</sup> match could not be found and no
            secondary information was added.

            * `''`  Suite<sup>Link</sup> 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
        Lobs 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 <em>after</em> 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 <a href="https://dashboard.lob.com/#/settings/editions"
        target="_blank">Print & Mail Edition</a> 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 <a
        href="https://www.lob.com/pricing/print-mail#compare"
        target="_blank">pricing</a> 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: <a href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_certified_template.pdf" target="_blank">#10 envelope</a> and <a href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_certified_flat_template.pdf" target="_blank">flat envelope</a> (used for letters over 6 pages single-sided or 12 pages double-sided). You will not be charged for this extra sheet.
          * `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 <a
        href="https://help.lob.com/print-and-mail/building-a-mail-strategy/campaign-or-triggered-sends/campaign-audience-guide#required-columns-2"
        target="_blank">Campaign Audience Guide</a> for additional details.
    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 <a
        href="https://help.lob.com/print-and-mail/building-a-mail-strategy/campaign-or-triggered-sends/campaign-audience-guide#optional-columns-3"
        target="_blank">Campaign Audience Guide</a> for additional details.
    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 <a
        href="https://help.lob.com/print-and-mail/building-a-mail-strategy/campaign-or-triggered-sends/campaign-audience-guide#required-columns-2"
        target="_blank">Campaign Audience Guide</a> for additional details.
    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 <a
        href="https://help.lob.com/print-and-mail/building-a-mail-strategy/campaign-or-triggered-sends/campaign-audience-guide#step-3-map-merge-variable-data-if-applicable-7"
        target="_blank">Campaign Audience Guide</a> for additional details. <br
        />If a merge variable has the same "name" as a "key" in the
        `requiredAddressColumnMapping` or `optionalAddressColumnMapping`
        objects, then they **CANNOT** have a different value in this object. If
        a different value is provided, then when the campaign is processing it
        will get overwritten with the mapped value present in the
        `requiredAddressColumnMapping` or `optionalAddressColumnMapping`
        objects. The redirect URLs for QR codes can also be customized using
        this mapping. If the URL has a variable and the variable mapping
        existsing here, then data from the respective column in the audience
        file will be merged into the URL template.
    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 <a
                href="https://dashboard.lob.com/#/settings/editions"
                target="_blank">Print &amp; Mail Editions</a>. Value is `true`
                if the address was altered because the recipient filed for a <a
                href="#tag/National-Change-of-Address">National Change of
                Address Linkage (NCOALink)</a>, `false` if the NCOALink check
                was run but no altered address was found, and `null` if the
                NCOALink check was not run. The NCOALink check does not happen
                for non-US addresses, for non-deliverable US addresses, or for
                addresses created before the NCOALink feature was added to your
                account.
              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 <a
            href="https://dashboard.lob.com/#/settings/editions"
            target="_blank">Print & Mail Edition</a>, addresses may also be run
            through [National Change of Address
            (NCOALink)](#tag/National-Change-of-Address). If an address used
            does not meet your accounts <a
            href="https://dashboard.lob.com/#/settings/account"
            target="_blank">US Mail Strictness Setting</a>, the request will
            fail. <a
            href="https://help.lob.com/print-and-mail/all-about-addresses"
            target="_blank">More about verification of mailing addresses</a>
          oneOf:
            - $ref: '#/components/schemas/adr_id'
            - $ref: '#/components/schemas/inline_address_us_chk'
    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 <a
        href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/check_bottom_template.pdf"
        target="_blank">this template</a>.


        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:

                  * 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 <a
                href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/check_attachment_template.pdf"
                target="_blank">design guidelines</a>.


                See <a href="https://lob.com/pricing/print-mail#compare"
                target="_blank">pricing</a> for extra costs incurred. Need more
                help? Consult our [HTML examples](#section/HTML-Examples).
              oneOf:
                - $ref: '#/components/schemas/html_string'
                - $ref: '#/components/schemas/tmpl_id'
                - $ref: '#/components/schemas/remote_file_url'
                - $ref: '#/components/schemas/local_file_path'
            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:
          - <a href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/postcards/4x6_postcard.pdf" target="_blank">4x6 template</a>
          - <a href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/postcards/6x9_postcard.pdf" target="_blank">6x9 template</a>
          - <a href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/postcards/6x11_postcard.pdf" target="_blank">6x11 template</a>


        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 <a
        href="https://help.lob.com/print-and-mail/designing-mail-creatives/adding-qr-codes#destination-url-and-redirects"
        target="_blank">our help center.</a>
      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 <a
            href="https://help.lob.com/print-and-mail/designing-mail-creatives/adding-qr-codes#destination-url-and-redirects"
            target="_blank">our help center.</a>.

            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 <a
        href="https://dashboard.lob.com/#/settings/editions"
        target="_blank">Print & Mail Edition</a> to gain access.
      nullable: true
      pattern: ^env_[a-zA-Z0-9]+$
    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 <a
        href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_template.pdf"
        target="_blank">PDF</a> and [HTML](#section/HTML-Examples) templates.

        - If a `custom_envelope` is used, follow <a
        href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_custom_envelope.pdf"
        target="_blank">this template</a>.

        - 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 <a
        href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_flat_template.pdf"
        target="_blank">flat envelope</a> instead of the standard double window
        envelope.


        See <a href="https://lob.com/pricing/print-mail#compare"
        target="_blank">pricing</a> for extra costs incurred.
      oneOf:
        - $ref: '#/components/schemas/tmpl_id'
        - $ref: '#/components/schemas/local_file_path'
    crv_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:
          - <a href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/self_mailers/6x18_sfm_bifold_template.pdf" target="_blank">6x18 bifold template</a>
          - <a href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/self_mailers/11x9_sfm_bifold_template.pdf" target="_blank">11x9 bifold template</a>
          - <a href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/self_mailers/12x9_sfm_bifold_template.pdf" target="_blank">12x9 bifold template</a>


        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:
          - <a href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/self_mailers/6x18_sfm_bifold_template.pdf" target="_blank">6x18 bifold template</a>
          - <a href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/self_mailers/11x9_sfm_bifold_template.pdf" target="_blank">11x9 bifold template</a>
          - <a href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/self_mailers/12x9_sfm_bifold_template.pdf" target="_blank">12x9 bifold template</a>


        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 <a href="https://en.wikipedia.org/wiki/ISO_3166-2:US"
                target="_blank">ISO 3166-2</a> two letter code or subdivision
                name for the state. `city` and `state` are required if no
                `zip_code` is passed.
              maxLength: 50
            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 <a href="https://en.wikipedia.org/wiki/ISO_3166-2:US"
                target="_blank">ISO 3166-2</a> two letter code or subdivision
                name for the state. `city` and `state` are required if no
                `zip_code` is passed.
              maxLength: 50
            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 Lobs 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.
    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 <a
                href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_perf_template.pdf"
                target="_blank">perforation guide</a>.
              nullable: true
            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 <a
                href="https://www.lob.com/pricing/print-mail#compare"
                target="_blank">pricing</a> 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 <a
                href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_perf_template.pdf"
                target="_blank">perforation guide</a>.
              nullable: true
            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 <a
                href="https://www.lob.com/pricing/print-mail#compare"
                target="_blank">pricing</a> 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: <a href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_certified_template.pdf" target="_blank">#10 envelope</a> and <a href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_certified_flat_template.pdf" target="_blank">flat envelope</a> (used for letters over 6 pages single-sided or 12 pages double-sided). You will not be charged for this extra sheet.
                  * `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 <a
                href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_perf_template.pdf"
                target="_blank">perforation guide</a>.
              nullable: true
            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 <a
        href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_template.pdf"
        target="_blank">PDF</a> and [HTML](#section/HTML-Examples) templates.

        - If a `custom_envelope` is used, follow <a
        href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_custom_envelope.pdf"
        target="_blank">this template</a>.

        - 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 <a
        href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_flat_template.pdf"
        target="_blank">flat envelope</a> instead of the standard double window
        envelope.


        See <a href="https://lob.com/pricing/print-mail#compare"
        target="_blank">pricing</a> for extra costs incurred.
      oneOf:
        - $ref: '#/components/schemas/html_string'
        - $ref: '#/components/schemas/tmpl_id'
        - $ref: '#/components/schemas/remote_file_url'
        - 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 <a
        href="https://www.lob.com/pricing/print-mail#compare"
        target="_blank">pricing</a> for extra costs incurred.
      default: false
    ltr_size:
      type: string
      enum:
        - us_letter
        - us_legal
      description: >
        Specifies the size of the letter. It accepts two values `us_letter` and
        `us_legal`. If the [Lob-Version header](#tag/Versioning-and-Changelog)
        in the request is set to `2024-01-01` and above, the `size` property is
        automatically included with the default value of `us_letter`, unless
        explicitly specified.


        Please note that attempting to include the `size` property in the
        request with the `Lob-Version` header predating to `2024-01-01` will
        result in an error.
      default: us_letter
    letter_editable:
      allOf:
        - $ref: '#/components/schemas/input_to'
        - $ref: '#/components/schemas/input_from'
        - $ref: '#/components/schemas/editable'
        - type: object
          required:
            - to
            - from
            - file
            - color
            - use_type
          properties:
            file:
              $ref: '#/components/schemas/ltr_file'
            extra_service:
              $ref: '#/components/schemas/extra_service'
            cards:
              description: >-
                A single-element array containing an existing card id in a
                string format. See [cards](#tag/Cards) for more information. Not
                available for `us_legal` letter size.
              type: array
              items:
                $ref: '#/components/schemas/card_id'
              minItems: 0
              maxItems: 1
              nullable: true
            mail_type:
              $ref: '#/components/schemas/mail_type'
            color:
              allOf:
                - $ref: '#/components/schemas/color'
                - default: false
            double_sided:
              $ref: '#/components/schemas/double_sided'
            address_placement:
              $ref: '#/components/schemas/address_placement'
            return_envelope:
              $ref: '#/components/schemas/return_envelope_user_provided'
            perforated_page:
              type: integer
              description: >-
                Required if `return_envelope` is `true`. The number of the page
                that should be perforated for use with the return envelope. Must
                be greater than or equal to `1`. The blank page added by
                `address_placement=insert_blank_page` will be ignored when
                considering the perforated page number. To see how perforation
                will impact your letter design, view our <a
                href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_perf_template.pdf"
                target="_blank">perforation guide</a>.
              nullable: true
            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:
          - <a href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/postcards/4x6_postcard.pdf" target="_blank">4x6 template</a>
          - <a href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/postcards/6x9_postcard.pdf" target="_blank">6x9 template</a>
          - <a href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/postcards/6x11_postcard.pdf" target="_blank">6x11 template</a>


        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: URL to redirect customers if a short link is broken or inactive.
          type: string
        status:
          description: The configuration status of the domain.
          type: string
          enum:
            - configured
            - not_configured
        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:
      allOf:
        - $ref: '#/components/schemas/list'
        - 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: URL to redirect customers if a short link is broken or inactive.
    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'
        created_at:
          description: The date and time the link was created.
          type: string
        updated_at:
          description: The date and time the link was last updated.
          type: string
    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:
      allOf:
        - $ref: '#/components/schemas/list'
        - type: object
          properties:
            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.
          default: lob.st
          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.


                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:
                  - <a href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/self_mailers/6x18_sfm_bifold_template.pdf" target="_blank">6x18 bifold template</a>
                  - <a href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/self_mailers/12x9_sfm_bifold_template.pdf" target="_blank">12x9 bifold template</a>
                  - <a href="https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/self_mailers/17_75x9_trifold_sfm_template.pdf" target="_blank">17.75x9 trifold template</a>


                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_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:
                  - <a href="https://s3.us-west-2.amazonaws.com/public.lob.com/assets/8.5x11_Snappack_template_address.pdf" target="_blank">8.5x11 snap pack template</a>


                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'
    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 <a
            href="https://en.wikipedia.org/wiki/ZIP_Code#ZIP_Codes_and_previous_zoning_lines"
            target="_blank">USPS default city</a> (preferred city) of a ZIP
            code. There is only one preferred city per ZIP code, which will
            always be in position 0 in the array of cities.
          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 e, and `lte` is d.
      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 e, and `lte` is d.
      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 e, and
        `lte` is d.
      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 <a
        href="https://lob.com/pricing/print-mail#compare"
        target="_blank">cheaper option</a> which is less predictable and takes
        longer to deliver. `usps_standard` cannot be used with `4x6` postcards
        or for any postcards sent outside of the United States.
      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 <a
        href="https://help.lob.com/print-and-mail/building-a-mail-strategy/managing-mail-settings#idempotent-requests-12"
        target="_blank">implementation guide</a>.
      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 <a
        href="https://help.lob.com/print-and-mail/building-a-mail-strategy/managing-mail-settings#idempotent-requests-12"
        target="_blank">implementation guide</a>.
      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


        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.<br>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.<br>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.<br>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.<br>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_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.<br>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.<br>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.<br>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: <html>Second HTML for {{name}}</html>
            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.<br>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.<br>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
    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  <a
        href="https://en.wikipedia.org/wiki/Unix_time" target="_blank">UTC epoch
        seconds</a>
      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 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
