openapi: 3.0.1
info:
  title: LettrLabs Public API Documentation
  description: LettrLabs Public API Documentation.
  version: 1.0.0
servers:
  - url: https://app.lettrlabs.com/api
paths:
  /v1/me:
    get:
      tags:
        - Profile
      summary: Validate
      description: Validate your API key.
      operationId: Me
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiResponseExternal_profile'
          x-ms-summary: successful operation
        '401':
          description: Authorization key not valid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiResponseExternal_profile'
          x-ms-summary: Unauthorized
      security:
        - apikey: []
      x-ms-visibility: important
  /v1/conversions:
    post:
      tags:
        - Conversions
      summary: Post multiple conversions
      description: >-
        Posts multiple conversions with validation. Returns validation
        information and processes valid records even if some are invalid.
      operationId: PostConversions
      requestBody:
        description: >-
          Provide conversion events and values for matchback and attribution.
          The more personal information that can be provided, the better the
          matchback quality. Must provide atleast 1 piece of personal
          information, and a conversion value. If no date is provided, the event
          is assumed to occur at the time of the call.
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/conversionViewModel'
        required: true
      responses:
        '200':
          description: >-
            Returns processed conversions with validation statistics in
            Metadata. The Metadata includes TotalRecords, ValidRecords,
            InvalidRecords, PrimaryEmails, SecondaryEmails, PrimaryAddresses,
            SecondaryAddresses, PrimaryPhones, SecondaryPhones, CouponCodes, and
            may include DetailedErrors and DetailedWarnings with specific
            validation data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiResponseExternal_iList`1'
          x-ms-summary: Successful operation
        '400':
          description: Invalid format or processing errors occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiResponseExternal_iList`1'
          x-ms-summary: Bad Request
        '401':
          description: Authorization key not valid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiResponseExternal_iList`1'
          x-ms-summary: Unauthorized
        '422':
          description: >-
            All records are invalid. Check Metadata for validation details and
            Warnings for specific validation failures.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiResponseExternal_iList`1'
          x-ms-summary: Cannot process conversions
        '499':
          description: The operation was canceled by the client.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiResponseExternal_iList`1'
          x-ms-summary: Client Closed Request
      security:
        - apikey: []
      x-ms-visibility: important
    get:
      tags:
        - Conversions
      summary: List all conversions
      description: Retrieves all conversions for the authenticated user
      operationId: ListConversions
      responses:
        '200':
          description: >-
            Returns all conversions with metadata about the response. The
            Metadata may include pagination details and total record counts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiResponseExternal_iList`1'
          x-ms-summary: Successful operation
        '401':
          description: Authorization key not valid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiResponseExternal_iList`1'
          x-ms-summary: Unauthorized
      security:
        - apikey: []
      x-ms-visibility: important
  /v1/conversions/{id}:
    delete:
      tags:
        - Conversions
      summary: Delete conversions
      description: >-
        Marks a specific conversion for deletion by validating its status and
        preparing for removal. Client must subsequently check deletion status
        via status endpoint.
      operationId: DeleteConversions
      responses:
        '200':
          description: >-
            Specified conversion has been validated and queued for deletion
            process
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiResponseExternal_string'
          x-ms-summary: Conversion queued for deletion
      security:
        - apikey: []
      x-ms-visibility: important
  /v1/conversions/{id}/status:
    get:
      tags:
        - Conversions
      summary: Check the status of a specific conversion
      description: Returns the processing status of a specified conversion by its ID
      operationId: CheckConversionStatus
      parameters:
        - name: id
          in: path
          description: The ID of the conversion to check
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: >-
            Returns the status of the specified conversion with metadata. The
            Metadata may include processing timestamps and status details.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_conversionItemResponse
          x-ms-summary: Status retrieved successfully
        '401':
          description: Authorization key not valid
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_conversionItemResponse
          x-ms-summary: Unauthorized
        '404':
          description: Specified conversion ID does not exist
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_conversionItemResponse
          x-ms-summary: Conversion not found
      security:
        - apikey: []
      x-ms-visibility: important
  /v1/order:
    post:
      tags:
        - Orders
      summary: Create from Template
      description: Create an order using a specified template Id.
      operationId: V1-External-Orders-CreateOrderFromTemplate
      requestBody:
        description: Template to use
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/externalOrdersCreateOrderFromTemplateIdVm'
        required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_externalOrdersCreateOrderResponseVm
          x-ms-summary: Successful operation
        '400':
          description: Something went wrong
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_externalOrdersCreateOrderResponseVm
          x-ms-summary: Bad Request
        '401':
          description: Authorization key not valid
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_externalOrdersCreateOrderResponseVm
          x-ms-summary: Unauthorized
        '403':
          description: >-
            Profile's subscription tier does not have access to OpenAPI
            integrations
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_externalOrdersCreateOrderResponseVm
          x-ms-summary: Forbidden
      security:
        - apikey: []
      x-ms-visibility: important
    get:
      tags:
        - Orders
      summary: Retrieve
      description: >-
        Retrieve all orders created by OpenAPI calls. This endpoint does not
        return orders created on-platform.
      operationId: V1-External-Orders-GetOrders
      parameters:
        - name: OrderIds
          in: query
          description: Filter orders by a list of order IDs separated by comma.
          style: form
          explode: false
          schema:
            type: array
            items:
              type: integer
              format: int32
          x-ms-summary: List of order IDs separated by comma to filter by
        - name: OrderStatus
          in: query
          description: Filter orders by status (e.g., 'Draft', 'Mailed').
          schema:
            type: string
          x-ms-summary: Order status to filter by
        - name: Paid
          in: query
          description: Filter orders by whether they are paid or not.
          schema:
            type: boolean
          x-ms-summary: Filter by paid status
        - name: ProductType
          in: query
          description: Filter orders by product type.
          schema:
            type: string
          x-ms-summary: Product type to filter by
        - name: PostageType
          in: query
          description: Filter orders by postage type.
          schema:
            type: string
          x-ms-summary: Postage type to filter by
        - name: ShowRecipients
          in: query
          description: Filter whether to return recipient information.
          schema:
            type: boolean
          x-ms-summary: Show recipients
        - name: Skip
          in: query
          description: Used for pagination, the number of records to skip. Defaults to 0.
          schema:
            type: integer
            format: int32
          x-ms-summary: Number of items to skip for pagination
        - name: Take
          in: query
          description: >-
            Used for pagination, the number of records to retrieve. Defaults to
            100.
          schema:
            type: integer
            format: int32
          x-ms-summary: Number of items to take for pagination
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: string
                format: binary
          x-ms-summary: Successful operation
        '400':
          description: Something went wrong
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseInternal_externalOrdersGetOrdersResponseVm
          x-ms-summary: Bad Request
        '401':
          description: Authorization key not valid
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseInternal_externalOrdersGetOrdersResponseVm
          x-ms-summary: Unauthorized
        '403':
          description: >-
            Profile's subscription tier does not have access to OpenAPI
            integrations
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseInternal_externalOrdersGetOrdersResponseVm
          x-ms-summary: Forbidden
      security:
        - apikey: []
      x-ms-visibility: important
  /v1/order/{id}:
    delete:
      tags:
        - Orders
      summary: Delete
      description: Deletes an order that is in draft or edits needs status.
      operationId: V1-External-Orders-DeleteOrder
      parameters:
        - name: Id
          in: query
          description: The Id of the order to delete.
          required: true
          schema:
            type: integer
            format: int32
          x-ms-summary: Order Id
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_externalOrdersDeleteOrderResponseVm
          x-ms-summary: Successful operation
        '400':
          description: Something went wrong
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_externalOrdersDeleteOrderResponseVm
          x-ms-summary: Bad Request
        '401':
          description: Authorization key not valid
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_externalOrdersDeleteOrderResponseVm
          x-ms-summary: Unauthorized
        '403':
          description: >-
            Profile's subscription tier does not have access to OpenAPI
            integrations
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_externalOrdersDeleteOrderResponseVm
          x-ms-summary: Forbidden
      security:
        - apikey: []
      x-ms-visibility: important
  /v1/order/{id}/proof/{recipient?}:
    get:
      tags:
        - Orders
      summary: Proof
      description: >-
        Retrieve the auto-generated proof for a specified order in PDF format.
        The proof contains front, page and envelope (if applicable) pages.
      operationId: V1-External-Orders-GetOrderProof
      parameters:
        - name: Id
          in: query
          description: The Id of the order to generate proof.
          required: true
          schema:
            type: integer
            format: int32
          x-ms-summary: Order Id
        - name: Recipient
          in: query
          description: Recipient Id to substitute mail merge fields.
          schema:
            type: integer
            format: int32
          x-ms-summary: Recipient Id to substitute mail merge fields
      responses:
        '200':
          description: Successful operation
          content:
            application/pdf:
              schema:
                type: string
                format: binary
          x-ms-summary: Successful operation
        '400':
          description: Something went wrong
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiResponseInternal_boolean'
          x-ms-summary: Bad Request
        '401':
          description: Authorization key not valid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiResponseInternal_boolean'
          x-ms-summary: Unauthorized
        '403':
          description: >-
            Profile's subscription tier does not have access to OpenAPI
            integrations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiResponseInternal_boolean'
          x-ms-summary: Forbidden
      security:
        - apikey: []
      x-ms-visibility: important
  /v1/order/{id}/analytics:
    get:
      tags:
        - Orders
      summary: Analytics
      description: >-
        Retrieve order analytics such as delivery, number of recipients and
        order status from a given order id.
      operationId: V1-External-Orders-Statistics
      parameters:
        - name: Id
          in: query
          description: The Id of the order to retrieve analytics information from.
          required: true
          schema:
            type: integer
            format: int32
          x-ms-summary: Order Id
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_externalOrdersGetOrderStatistics
          x-ms-summary: Successful operation
        '400':
          description: Something went wrong
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_externalOrdersGetOrderStatistics
          x-ms-summary: Bad Request
        '401':
          description: Authorization key not valid
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_externalOrdersGetOrderStatistics
          x-ms-summary: Unauthorized
        '403':
          description: >-
            Profile's subscription tier does not have access to OpenAPI
            integrations
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_externalOrdersGetOrderStatistics
          x-ms-summary: Forbidden
      security:
        - apikey: []
      x-ms-visibility: important
  /v1/order/{id}/transaction:
    get:
      tags:
        - Orders
      summary: Transactions
      description: Retrieve transaction data from order id.
      operationId: V1-External-Orders-Transactions
      parameters:
        - name: Id
          in: query
          description: The Id of the order to retrieve transaction information from.
          required: true
          schema:
            type: integer
            format: int32
          x-ms-summary: Order Id
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_externalOrdersGetOrderFinancialData
          x-ms-summary: Successful operation
        '400':
          description: Something went wrong
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_externalOrdersGetOrderFinancialData
          x-ms-summary: Bad Request
        '401':
          description: Authorization key not valid
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_externalOrdersGetOrderFinancialData
          x-ms-summary: Unauthorized
        '403':
          description: >-
            Profile's subscription tier does not have access to OpenAPI
            integrations
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_externalOrdersGetOrderFinancialData
          x-ms-summary: Forbidden
      security:
        - apikey: []
      x-ms-visibility: important
  /v1/order/{id}/checkout:
    get:
      tags:
        - Orders
      summary: Checkout Summary
      description: >-
        Calculate and retrieves the line item cost, production and estimated
        delivery details for a specific order for review prior to executing the
        checkout.

        This is not required to be called before executing a checkout.
      operationId: V1-External-Orders-CalculateOrderCheckout
      parameters:
        - name: Id
          in: query
          description: The Id of the order to calculate checkout details.
          required: true
          schema:
            type: integer
            format: int32
          x-ms-summary: Order Id
        - name: PostageType
          in: query
          description: >-
            The type of postage for the order. Available values: Standard,
            FirstClass.
          schema:
            type: string
          x-ms-summary: The type of postage for the order
        - name: ProductionSpeed
          in: query
          description: >-
            The speed of production for the order. Available values: Normal,
            ExpeditedFaster, ExpeditedFastest.
          schema:
            type: string
          x-ms-summary: The speed of production for the order
        - name: HoldUntilDate
          in: query
          description: >-
            The date to hold order production until. This date must be further
            in the future than the normal estimated production completion date.
          schema:
            type: string
            format: date-time
          x-ms-summary: The date to hold the order until
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_externalOrdersGetCheckoutResponseVm
          x-ms-summary: Successful operation
        '400':
          description: Something went wrong
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_externalOrdersGetCheckoutResponseVm
          x-ms-summary: Bad Request
        '401':
          description: Authorization key not valid
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_externalOrdersGetCheckoutResponseVm
          x-ms-summary: Unauthorized
        '403':
          description: >-
            Profile's subscription tier does not have access to OpenAPI
            integrations
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_externalOrdersGetCheckoutResponseVm
          x-ms-summary: Forbidden
      security:
        - apikey: []
      x-ms-visibility: important
    post:
      tags:
        - Orders
      summary: Checkout
      description: >-
        Executes the checkout process for a specified order using its unique
        Order Id. Upon success, credits or payment methods will be charged for
        the order. To review the cost prior to execution, call Checkout Review.
      operationId: V1-External-Orders-PostOrderCheckout
      parameters:
        - name: Id
          in: query
          description: >-
            The Id of the order to execute checkout and finalize the
            transaction.
          required: true
          schema:
            type: integer
            format: int32
          x-ms-summary: Order Id
      requestBody:
        description: >-
          The body of the checkout request including postage type, production
          speed, and hold until date.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/externalOrdersPostCheckoutVm'
        required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_externalOrdersPostCheckoutResponseVm
          x-ms-summary: Successful operation
        '400':
          description: Something went wrong
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_externalOrdersPostCheckoutResponseVm
          x-ms-summary: Bad Request
        '401':
          description: Authorization key not valid
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_externalOrdersPostCheckoutResponseVm
          x-ms-summary: Unauthorized
        '403':
          description: >-
            Profile's subscription tier does not have access to OpenAPI
            integrations
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_externalOrdersPostCheckoutResponseVm
          x-ms-summary: Forbidden
      security:
        - apikey: []
      x-ms-visibility: important
  /v1/order/{id}/recipients:
    get:
      tags:
        - Orders
      summary: Retrieve Recipients
      description: Retrieve a list of recipients associated to a specific order.
      operationId: V1-External-Orders-GetRecipientsFromOrder
      parameters:
        - name: Id
          in: query
          description: The Id of the order to retrieve the recipient list from.
          required: true
          schema:
            type: integer
            format: int32
          x-ms-summary: Order Id
        - name: Query
          in: query
          description: >-
            Search filter for recipient data. Filter by recipient name, address
            or organization.
          schema:
            type: string
          x-ms-summary: Filter string
        - name: Skip
          in: query
          description: 'For pagination: Number of records to skip.'
          schema:
            type: integer
            format: int32
          x-ms-summary: Skip count
        - name: Take
          in: query
          description: 'For pagination: Number of records to retrieve.'
          schema:
            type: integer
            format: int32
          x-ms-summary: Take count
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: string
                format: binary
          x-ms-summary: Successful operation
        '400':
          description: Something went wrong
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseInternal_externalOrdersGetRecipientsResponseVm
          x-ms-summary: Bad Request
        '401':
          description: Authorization key not valid
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseInternal_externalOrdersGetRecipientsResponseVm
          x-ms-summary: Unauthorized
        '403':
          description: >-
            Profile's subscription tier does not have access to OpenAPI
            integrations
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseInternal_externalOrdersGetRecipientsResponseVm
          x-ms-summary: Forbidden
      security:
        - apikey: []
      x-ms-visibility: important
    delete:
      tags:
        - Orders
      summary: Delete Recipients
      description: >-
        Delete recipients associated with a specific order in draft or edits
        needed status.
      operationId: V1-External-Orders-DeleteRecipientsFromOrder
      requestBody:
        description: Recipients to delete.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/externalOrdersDeleteRecipientVm'
        required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseInternal_externalOrdersDeleteRecipientsResponseVm
          x-ms-summary: Successful operation
        '400':
          description: Something went wrong
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseInternal_externalOrdersDeleteRecipientsResponseVm
          x-ms-summary: Bad Request
        '401':
          description: Authorization key not valid
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseInternal_externalOrdersDeleteRecipientsResponseVm
          x-ms-summary: Unauthorized
        '403':
          description: >-
            Profile's subscription tier does not have access to OpenAPI
            integrations
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseInternal_externalOrdersDeleteRecipientsResponseVm
          x-ms-summary: Forbidden
      security:
        - apikey: []
      x-ms-visibility: important
  /v1/order/{id}/recipients:append:
    put:
      tags:
        - Orders
      summary: Add Recipients
      description: >-
        Add recipients to a specified order in draft or edits needed status.

        Recipients will run through address validation, and the response will
        return how many are valid.

        Any recipients that have incomplete addresses will not be added to the
        order. Define mail-merge, image-merge, return address override, and
        other metadata at the recipient level.
      operationId: V1-External-Orders-AppendRecipientsToOrder
      parameters:
        - name: Id
          in: query
          description: The Id of the order to add recipients to.
          required: true
          schema:
            type: integer
            format: int32
          x-ms-summary: Order Id
      requestBody:
        description: List of Recipients to add to order.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/externalOrdersAddRecipientsToOrderVm'
        required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_externalOrdersAddRecipientsToOrderResponseVm
          x-ms-summary: Successful operation
        '400':
          description: Something went wrong
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_externalOrdersAddRecipientsToOrderResponseVm
          x-ms-summary: Bad Request
        '401':
          description: Authorization key not valid
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_externalOrdersAddRecipientsToOrderResponseVm
          x-ms-summary: Unauthorized
        '403':
          description: >-
            Profile's subscription tier does not have access to OpenAPI
            integrations
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_externalOrdersAddRecipientsToOrderResponseVm
          x-ms-summary: Forbidden
      security:
        - apikey: []
      x-ms-visibility: important
  /v1/integration-orders:
    get:
      tags:
        - Automations
      summary: Retrieve Integration Orders
      description: Gets all integration orders for the profile.
      operationId: GetIntegrationOrders
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiResponseExternal_iList`1'
          x-ms-summary: successful operation
        '401':
          description: Authorization key not valid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiResponseExternal_profile'
          x-ms-summary: Unauthorized
      security:
        - apikey: []
      x-ms-visibility: important
  /v1/integration-orders/{id}/recipients:
    post:
      tags:
        - Automations
      summary: Add Recipient
      description: >-
        Add a recipient into a integration order by Id. If the integration order
        is Active, recipient will be added to queue to be mailed to.
      operationId: PostRecipientToIntegrationOrder
      parameters:
        - name: id
          in: path
          description: ID of integration order to add recipient to.
          required: true
          schema:
            type: integer
            format: int32
          x-ms-summary: ID of integration order to add recipient to.
          x-ms-visibility: important
      requestBody:
        description: The recipient to add.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/integrationOrderRecipient'
        required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiResponseExternal_integrationOrder'
          x-ms-summary: successful operation
        '400':
          description: Something went wrong
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiResponseExternal_integrationOrder'
          x-ms-summary: Bad Request
        '401':
          description: Authorization key not valid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiResponseExternal_integrationOrder'
          x-ms-summary: Unauthorized
        '422':
          description: Input is not in a valid format
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiResponseExternal_integrationOrder'
          x-ms-summary: Cannot process recipient
      security:
        - apikey: []
      x-ms-visibility: important
  /v1/integration-orders/{id:int}:mail-by-proximity:
    post:
      tags:
        - Automations
      summary: Radius Mail
      description: >-
        Initiate a Radius Mail order centered around the list of provided
        addresses. Each address in the list will initiate a Radius Mailing with
        the provided filter settings. Recipients will be queried and added to
        the provided integration order.
      operationId: MailByProximity
      parameters:
        - name: id
          in: path
          description: ID of integration order add recipients to.
          required: true
          schema:
            type: integer
            format: int32
          x-ms-summary: ID of integration order add recipients to.
          x-ms-visibility: important
      requestBody:
        description: >-
          Filters to be used when finding recipients around the provided
          coordinates.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/proximitySearch'
        required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiResponseExternal_integrationOrder'
          x-ms-summary: successful operation
        '400':
          description: >-
            Parameters does not contain proper data. Check Errors from the
            response for more data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiResponseExternal_integrationOrder'
          x-ms-summary: Parameters misassigned
        '401':
          description: Authorization key not valid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiResponseExternal_integrationOrder'
          x-ms-summary: Unauthorized
      security:
        - apikey: []
      x-ms-visibility: important
  /v1/order-recipients-statistics:
    post:
      tags:
        - Order Recipient Analytics
      summary: Update QR Scans
      description: Updates order recipients statistics when a QR Code is scanned.
      operationId: ScanOrderRecipientQrCode
      requestBody:
        description: The Order Recipient Statistic to add or update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/orderRecipientStatistic'
        required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_orderRecipientStatistic
          x-ms-summary: successful operation
        '400':
          description: Something went wrong
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_orderRecipientStatistic
          x-ms-summary: Bad Request
        '401':
          description: Authorization key not valid
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_orderRecipientStatistic
          x-ms-summary: Unauthorized
        '422':
          description: Input is not in a valid format
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/apiResponseExternal_orderRecipientStatistic
          x-ms-summary: Cannot process recipient
      security:
        - apikey: []
      x-ms-visibility: internal
  /v1/zapierActions/address-book:
    post:
      tags:
        - Address Book
      summary: Add Recipient
      description: Add a new recipient into the address book.
      operationId: AddAddressBookEntry
      requestBody:
        description: Recipient data.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/addressBookRequest'
        required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiResponseExternal_addressBookResponse'
          x-ms-summary: successful operation
        '400':
          description: >-
            Parameters does not contain proper data. Check Errors from the
            response for more data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiResponseExternal_addressBookResponse'
          x-ms-summary: Parameters misassigned
        '401':
          description: Authorization key not valid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiResponseExternal_addressBookResponse'
          x-ms-summary: Unauthorized
      security:
        - apikey: []
      x-ms-visibility: important
components:
  schemas:
    address:
      type: object
      properties:
        address1:
          type: string
        address2:
          type: string
        city:
          type: string
        state:
          type: string
        zip:
          type: string
        desiredCount:
          type: integer
          format: int32
    addressBookRequest:
      type: object
      properties:
        firstName:
          type: string
        lastName:
          type: string
        toOrganization:
          type: string
        address1:
          type: string
        address2:
          type: string
        city:
          type: string
        state:
          type: string
        zip:
          type: string
    addressBookResponse:
      type: object
      properties:
        id:
          type: integer
          format: int32
    apiResponseExternal_addressBookResponse:
      type: object
      properties:
        profile:
          $ref: '#/components/schemas/profile'
        payload:
          $ref: '#/components/schemas/addressBookResponse'
        errors:
          type: array
          items:
            type: string
        hasErrors:
          type: boolean
        warnings:
          type: array
          items:
            type: string
        hasWarnings:
          type: boolean
        metadata:
          type: object
          additionalProperties:
            type: object
    apiResponseExternal_conversionItemResponse:
      type: object
      properties:
        profile:
          $ref: '#/components/schemas/profile'
        payload:
          $ref: '#/components/schemas/conversionItemResponse'
        errors:
          type: array
          items:
            type: string
        hasErrors:
          type: boolean
        warnings:
          type: array
          items:
            type: string
        hasWarnings:
          type: boolean
        metadata:
          type: object
          additionalProperties:
            type: object
    apiResponseExternal_externalOrdersAddRecipientsToOrderResponseVm:
      type: object
      properties:
        profile:
          $ref: '#/components/schemas/profile'
        payload:
          $ref: '#/components/schemas/externalOrdersAddRecipientsToOrderResponseVm'
        errors:
          type: array
          items:
            type: string
        hasErrors:
          type: boolean
        warnings:
          type: array
          items:
            type: string
        hasWarnings:
          type: boolean
        metadata:
          type: object
          additionalProperties:
            type: object
    apiResponseExternal_externalOrdersCreateOrderResponseVm:
      type: object
      properties:
        profile:
          $ref: '#/components/schemas/profile'
        payload:
          $ref: '#/components/schemas/externalOrdersCreateOrderResponseVm'
        errors:
          type: array
          items:
            type: string
        hasErrors:
          type: boolean
        warnings:
          type: array
          items:
            type: string
        hasWarnings:
          type: boolean
        metadata:
          type: object
          additionalProperties:
            type: object
    apiResponseExternal_externalOrdersDeleteOrderResponseVm:
      type: object
      properties:
        profile:
          $ref: '#/components/schemas/profile'
        payload:
          $ref: '#/components/schemas/externalOrdersDeleteOrderResponseVm'
        errors:
          type: array
          items:
            type: string
        hasErrors:
          type: boolean
        warnings:
          type: array
          items:
            type: string
        hasWarnings:
          type: boolean
        metadata:
          type: object
          additionalProperties:
            type: object
    apiResponseExternal_externalOrdersGetCheckoutResponseVm:
      type: object
      properties:
        profile:
          $ref: '#/components/schemas/profile'
        payload:
          $ref: '#/components/schemas/externalOrdersGetCheckoutResponseVm'
        errors:
          type: array
          items:
            type: string
        hasErrors:
          type: boolean
        warnings:
          type: array
          items:
            type: string
        hasWarnings:
          type: boolean
        metadata:
          type: object
          additionalProperties:
            type: object
    apiResponseExternal_externalOrdersGetOrderFinancialData:
      type: object
      properties:
        profile:
          $ref: '#/components/schemas/profile'
        payload:
          $ref: '#/components/schemas/externalOrdersGetOrderFinancialData'
        errors:
          type: array
          items:
            type: string
        hasErrors:
          type: boolean
        warnings:
          type: array
          items:
            type: string
        hasWarnings:
          type: boolean
        metadata:
          type: object
          additionalProperties:
            type: object
    apiResponseExternal_externalOrdersGetOrderStatistics:
      type: object
      properties:
        profile:
          $ref: '#/components/schemas/profile'
        payload:
          $ref: '#/components/schemas/externalOrdersGetOrderStatistics'
        errors:
          type: array
          items:
            type: string
        hasErrors:
          type: boolean
        warnings:
          type: array
          items:
            type: string
        hasWarnings:
          type: boolean
        metadata:
          type: object
          additionalProperties:
            type: object
    apiResponseExternal_externalOrdersPostCheckoutResponseVm:
      type: object
      properties:
        profile:
          $ref: '#/components/schemas/profile'
        payload:
          $ref: '#/components/schemas/externalOrdersPostCheckoutResponseVm'
        errors:
          type: array
          items:
            type: string
        hasErrors:
          type: boolean
        warnings:
          type: array
          items:
            type: string
        hasWarnings:
          type: boolean
        metadata:
          type: object
          additionalProperties:
            type: object
    apiResponseExternal_iList`1:
      type: object
      properties:
        profile:
          $ref: '#/components/schemas/profile'
        payload:
          type: array
          items:
            $ref: '#/components/schemas/conversionViewModel'
        errors:
          type: array
          items:
            type: string
        hasErrors:
          type: boolean
        warnings:
          type: array
          items:
            type: string
        hasWarnings:
          type: boolean
        metadata:
          type: object
          additionalProperties:
            type: object
    apiResponseExternal_integrationOrder:
      type: object
      properties:
        profile:
          $ref: '#/components/schemas/profile'
        payload:
          $ref: '#/components/schemas/integrationOrder'
        errors:
          type: array
          items:
            type: string
        hasErrors:
          type: boolean
        warnings:
          type: array
          items:
            type: string
        hasWarnings:
          type: boolean
        metadata:
          type: object
          additionalProperties:
            type: object
    apiResponseExternal_orderRecipientStatistic:
      type: object
      properties:
        profile:
          $ref: '#/components/schemas/profile'
        payload:
          $ref: '#/components/schemas/orderRecipientStatistic'
        errors:
          type: array
          items:
            type: string
        hasErrors:
          type: boolean
        warnings:
          type: array
          items:
            type: string
        hasWarnings:
          type: boolean
        metadata:
          type: object
          additionalProperties:
            type: object
    apiResponseExternal_profile:
      type: object
      properties:
        profile:
          $ref: '#/components/schemas/profile'
        payload:
          $ref: '#/components/schemas/profile'
        errors:
          type: array
          items:
            type: string
        hasErrors:
          type: boolean
        warnings:
          type: array
          items:
            type: string
        hasWarnings:
          type: boolean
        metadata:
          type: object
          additionalProperties:
            type: object
    apiResponseExternal_string:
      type: object
      properties:
        profile:
          $ref: '#/components/schemas/profile'
        payload:
          type: string
        errors:
          type: array
          items:
            type: string
        hasErrors:
          type: boolean
        warnings:
          type: array
          items:
            type: string
        hasWarnings:
          type: boolean
        metadata:
          type: object
          additionalProperties:
            type: object
    apiResponseInternal_boolean:
      type: object
      properties:
        payload:
          type: boolean
        errors:
          type: array
          items:
            type: string
        warnings:
          type: array
          items:
            type: string
        hasErrors:
          type: boolean
        hasWarnings:
          type: boolean
    apiResponseInternal_externalOrdersDeleteRecipientsResponseVm:
      type: object
      properties:
        payload:
          $ref: '#/components/schemas/externalOrdersDeleteRecipientsResponseVm'
        errors:
          type: array
          items:
            type: string
        warnings:
          type: array
          items:
            type: string
        hasErrors:
          type: boolean
        hasWarnings:
          type: boolean
    apiResponseInternal_externalOrdersGetOrdersResponseVm:
      type: object
      properties:
        payload:
          $ref: '#/components/schemas/externalOrdersGetOrdersResponseVm'
        errors:
          type: array
          items:
            type: string
        warnings:
          type: array
          items:
            type: string
        hasErrors:
          type: boolean
        hasWarnings:
          type: boolean
    apiResponseInternal_externalOrdersGetRecipientsResponseVm:
      type: object
      properties:
        payload:
          $ref: '#/components/schemas/externalOrdersGetRecipientsResponseVm'
        errors:
          type: array
          items:
            type: string
        warnings:
          type: array
          items:
            type: string
        hasErrors:
          type: boolean
        hasWarnings:
          type: boolean
    conversionAddressViewModel:
      type: object
      properties:
        fullAddress:
          maxLength: 255
          minLength: 0
          type: string
          description: Converted Entity's Full Address (Optional)
        address1:
          maxLength: 255
          minLength: 0
          type: string
          description: Converted Entity's Address Line 1
        address2:
          maxLength: 255
          minLength: 0
          type: string
          description: Converted Entity's Address Line 2
        city:
          maxLength: 255
          minLength: 0
          type: string
          description: Converted Entity's City
        state:
          maxLength: 255
          minLength: 0
          type: string
          description: Converted Entity's State
        zipCode:
          maxLength: 255
          minLength: 0
          type: string
          description: Converted Entity's Zip Code
        country:
          maxLength: 255
          minLength: 0
          type: string
          description: Converted Entity's Country (Optional)
      description: Converted Entity's Primary Address
    conversionItemResponse:
      type: object
      properties:
        id:
          type: integer
          format: int32
        fileName:
          type: string
        dataSourceType:
          type: string
        status:
          type: string
        uploadDate:
          type: string
          format: date-time
    conversionViewModel:
      type: object
      properties:
        firstName:
          maxLength: 255
          minLength: 0
          type: string
          description: Converted Person's First Name
        lastName:
          maxLength: 255
          minLength: 0
          type: string
          description: Converted Person's Last Name
        fullName:
          maxLength: 255
          minLength: 0
          type: string
          description: Converted Person's Full Name
        businessName:
          maxLength: 255
          minLength: 0
          type: string
          description: Converted Business' Name
        primaryAddress:
          $ref: '#/components/schemas/conversionAddressViewModel'
        secondaryAddress:
          $ref: '#/components/schemas/conversionAddressViewModel'
        couponCode:
          maxLength: 255
          minLength: 0
          type: string
          description: Converted Purchase Coupon Code
        primaryPhoneNumber:
          maxLength: 20
          minLength: 0
          type: string
          description: Converted Entity's Primary Phone Number
        secondaryPhoneNumber:
          maxLength: 20
          minLength: 0
          type: string
          description: Converted Entity's Secondary Phone Number
        primaryEmail:
          maxLength: 255
          minLength: 0
          type: string
          description: Converted Entity's Primary Email
          format: email
        secondaryEmail:
          maxLength: 255
          minLength: 0
          type: string
          description: Converted Entity's Secondary Email
          format: email
        revenue:
          maximum: 7.922816251426434e+28
          minimum: 0
          type: number
          description: Converted Revenue
          format: double
        orderId:
          maxLength: 255
          minLength: 0
          type: string
          description: >-
            Converted Order ID. Providing an Order ID is recommended to avoid
            duplication of conversions.
        storeId:
          maxLength: 255
          minLength: 0
          type: string
          description: >-
            Converted Store ID. Providing a Store ID is recommended to help
            classify conversions.
        uniqueId:
          maxLength: 255
          minLength: 0
          type: string
          description: >-
            Provide a Unique ID as a pass through field. This allows you to tie
            data back when exporting to your CRM.
        crmId:
          maxLength: 255
          minLength: 0
          type: string
          description: >-
            Provide a CRM ID as a pass through field. This allows you to tie
            data back when exporting to your CRM.
        customerId:
          maxLength: 255
          minLength: 0
          type: string
          description: >-
            Provide a unique Customer ID to help tie data back to a specific
            customer.
        eventDate:
          type: string
          description: >-
            Date and time of the conversion event (UTC). This is the date the
            conversion occurred. Providing no date will default to the current
            date and time. Please use standard IDO datetime formats.
          format: date-time
    externalOrdersAddRecipientsToOrderResponseVm:
      type: object
      properties:
        totalRecipients:
          type: integer
          format: int32
        deliverable:
          $ref: >-
            #/components/schemas/externalOrdersDeliverableRecipientsSummaryResponseVm
        undeliverable:
          $ref: >-
            #/components/schemas/externalOrdersUndeliverableRecipientsSummaryResponseVm
        orderId:
          type: integer
          format: int32
        status:
          type: string
    externalOrdersAddRecipientsToOrderVm:
      required:
        - recipients
      type: object
      properties:
        recipients:
          type: array
          items:
            $ref: '#/components/schemas/externalOrdersRecipientVm'
          description: Array of recipient Ids to add to order.
    externalOrdersCreateOrderFromTemplateIdVm:
      type: object
      properties:
        templateId:
          type: integer
          description: The Id of the template to use from within the portal
          format: int32
    externalOrdersCreateOrderResponseVm:
      type: object
      properties:
        orderId:
          type: integer
          format: int32
        status:
          type: string
    externalOrdersDeleteOrderResponseVm:
      type: object
      properties:
        orderId:
          type: integer
          format: int32
        status:
          type: string
    externalOrdersDeleteRecipientsResponseVm:
      type: object
      properties:
        orderId:
          type: integer
          format: int32
        status:
          type: string
    externalOrdersDeleteRecipientVm:
      type: object
      properties:
        recipientsIds:
          type: array
          items:
            type: integer
            format: int32
          description: Enum of Recipient Ids to delete from draft of edits needed order.
    externalOrdersDeliverableRecipientsSummaryResponseVm:
      type: object
      properties:
        addressValidated:
          type: integer
          format: int32
        addressInvalidated:
          type: integer
          format: int32
    externalOrdersGetCheckoutLineItemResponseVm:
      type: object
      properties:
        tax:
          type: number
          format: double
        name:
          type: string
        quantity:
          type: integer
          format: int32
        rate:
          type: number
          format: double
        total:
          type: number
          format: double
        transactionType:
          type: string
        transactionSubType:
          type: string
        subItems:
          type: array
          items:
            $ref: '#/components/schemas/externalOrdersGetCheckoutLineItemResponseVm'
    externalOrdersGetCheckoutResponseVm:
      type: object
      properties:
        lineItems:
          type: array
          items:
            $ref: '#/components/schemas/externalOrdersGetCheckoutLineItemResponseVm'
        credits:
          type: array
          items:
            $ref: '#/components/schemas/externalOrdersGetCheckoutLineItemResponseVm'
        totalCharges:
          type: number
          format: double
        totalTax:
          type: number
          format: double
        totalCredits:
          type: number
          format: double
        balance:
          type: number
          format: double
        productionSpeeds:
          type: object
          additionalProperties:
            type: string
            format: date-time
        productionSpeedPrices:
          type: object
          additionalProperties:
            type: number
            format: double
        postageTypePrices:
          type: object
          additionalProperties:
            type: number
            format: double
        estimatedDeliveryDateMin:
          type: string
          format: date-time
          nullable: true
        estimatedDeliveryDateMax:
          type: string
          format: date-time
          nullable: true
        orderId:
          type: integer
          format: int32
        status:
          type: string
    externalOrdersGetOrderFinancialData:
      type: object
      properties:
        volume:
          type: integer
          format: int32
        totalPrice:
          type: number
          format: double
        costPerPiece:
          type: number
          format: double
        detail:
          $ref: '#/components/schemas/externalOrdersGetOrderFinancialDataDetail'
        discount:
          $ref: '#/components/schemas/externalOrdersGetOrderFinancialDataDiscount'
        orderId:
          type: integer
          format: int32
        status:
          type: string
    externalOrdersGetOrderFinancialDataDetail:
      type: object
      properties:
        basePrice:
          type: number
          format: double
        doubleSided:
          type: number
          format: double
        postagePrice:
          type: number
          format: double
        extraText:
          type: number
          format: double
        expedited:
          type: number
          format: double
    externalOrdersGetOrderFinancialDataDiscount:
      type: object
      properties:
        basePrice:
          type: number
          format: double
        doubleSided:
          type: number
          format: double
        postagePrice:
          type: number
          format: double
        extraText:
          type: number
          format: double
        expedited:
          type: number
          format: double
    externalOrdersGetOrderRecipientStatistics:
      type: object
      properties:
        id:
          type: integer
          format: int32
        firstName:
          type: string
        lastName:
          type: string
        totalScans:
          type: string
        lastScan:
          type: string
          format: date-time
    externalOrdersGetOrdersDeliveredStatusResponseVm:
      type: object
      properties:
        mailed:
          type: number
          format: double
          nullable: true
        inTransit:
          type: number
          format: double
          nullable: true
        atLocalFacility:
          type: number
          format: double
          nullable: true
        delivered:
          type: number
          format: double
          nullable: true
    externalOrdersGetOrdersDetailResponseVm:
      type: object
      properties:
        id:
          type: integer
          format: int32
        status:
          type: string
        paidDate:
          type: string
          format: date-time
          nullable: true
        mailedDate:
          type: string
          format: date-time
          nullable: true
        holdUntilDate:
          type: string
          format: date-time
          nullable: true
        postageType:
          type: string
        productType:
          type: string
        productionSpeed:
          type: string
        handwrittenFont:
          type: string
        qrCodeUrl:
          type: string
        deliveredStatus:
          $ref: >-
            #/components/schemas/externalOrdersGetOrdersDeliveredStatusResponseVm
        recipients:
          type: array
          items:
            $ref: '#/components/schemas/externalOrdersRecipientDetailVm'
    externalOrdersGetOrdersResponseVm:
      type: object
      properties:
        orders:
          type: array
          items:
            $ref: '#/components/schemas/externalOrdersGetOrdersDetailResponseVm'
        orderId:
          type: integer
          format: int32
        status:
          type: string
    externalOrdersGetOrderStatistics:
      type: object
      properties:
        qrCode:
          $ref: '#/components/schemas/externalOrdersGetOrderStatisticsQrCode'
        orderId:
          type: integer
          format: int32
        status:
          type: string
    externalOrdersGetOrderStatisticsQrCode:
      type: object
      properties:
        totalScans:
          type: integer
          format: int32
        lastScan:
          type: string
          format: date-time
        recipients:
          type: array
          items:
            $ref: '#/components/schemas/externalOrdersGetOrderRecipientStatistics'
    externalOrdersGetRecipientsResponseVm:
      type: object
      properties:
        recipients:
          type: array
          items:
            $ref: '#/components/schemas/externalOrdersRecipientVm'
        orderId:
          type: integer
          format: int32
        status:
          type: string
    externalOrdersPostCheckoutResponseVm:
      type: object
      properties:
        orderId:
          type: integer
          format: int32
        status:
          type: string
    externalOrdersPostCheckoutVm:
      type: object
      properties:
        postageType:
          type: string
          description: >-
            The type of postage for the order. Available values: Standard,
            FirstClass.
        productionSpeed:
          type: string
          description: >-
            The speed of production for the order. Available values: Normal,
            ExpeditedFaster, ExpeditedFastest.
        holdUntilDate:
          type: string
          description: >-
            The date to hold order production until. This date must be further
            in the future than the normal estimated production completion date.
          format: date-time
        autoBill:
          type: boolean
          description: >-
            If set to true, allow auto-charging of your default payment method
            if insufficient credits are available in your account to complete
            the transaction.
    externalOrdersRecipientAddressVm:
      type: object
      properties:
        address1:
          type: string
          description: Recipient Address 1.
          nullable: true
        address2:
          type: string
          description: Recipient Address 2.
          nullable: true
        city:
          type: string
          description: Recipient City.
          nullable: true
        state:
          type: string
          description: Recipient State.
          nullable: true
        zipCode:
          type: string
          description: Recipient Zip Code.
          nullable: true
        zip4:
          type: string
          description: Recipient Zip+4.
          nullable: true
        zip2:
          type: string
          description: Recipient Delivery Point.
          nullable: true
        country:
          type: string
          description: Recipient Country (Optional, US only).
          nullable: true
      description: Recipient Mailing Address. Where the piece will be mailed to.
      nullable: true
    externalOrdersRecipientDeliveryDetailVm:
      type: object
      properties:
        status:
          type: string
        updatedDate:
          type: string
          format: date-time
          nullable: true
    externalOrdersRecipientDetailVm:
      type: object
      properties:
        id:
          type: integer
          format: int32
        orderId:
          type: integer
          format: int32
          nullable: true
        firstName:
          type: string
        lastName:
          type: string
        salutation:
          type: string
        toOrganization:
          type: string
        address1:
          type: string
        address2:
          type: string
        city:
          type: string
        state:
          type: string
        zipCode:
          type: string
        phoneNumber:
          type: string
        email:
          type: string
        country:
          type: string
        custom1:
          type: string
        custom2:
          type: string
        custom3:
          type: string
        custom4:
          type: string
        custom5:
          type: string
        custom6:
          type: string
        image1:
          type: string
        image2:
          type: string
        image3:
          type: string
        image4:
          type: string
        image5:
          type: string
        image6:
          type: string
        delivery:
          $ref: '#/components/schemas/externalOrdersRecipientDeliveryDetailVm'
    externalOrdersRecipientMetadataVm:
      type: object
      properties:
        dpvConfirmationCode:
          type: string
          description: USPS Delivery Point Verification confirmation code.
        custom1:
          type: string
          description: 'Mail-Merge Field: {{Custom 1}}'
        custom2:
          type: string
          description: 'Mail-Merge Field: {{Custom 2}}'
        custom3:
          type: string
          description: 'Mail-Merge Field: {{Custom 3}}'
        custom4:
          type: string
          description: 'Mail-Merge Field: {{Custom 4}}'
        custom5:
          type: string
          description: 'Mail-Merge Field: {{Custom 5}}'
        custom6:
          type: string
          description: 'Mail-Merge Field: {{Custom 6}}'
        image1:
          type: string
          description: >-
            Image-Merge Field: URL to Image 1 variable image defined in
            template. URL must be publicly accessible. Supported filed formats:
            JPEG , PNG , WebP , GIF , BMP , and SVG.
        image2:
          type: string
          description: >-
            Image-Merge Field: URL to Image 2 variable image defined in
            template. URL must be publicly accessible. Supported filed formats:
            JPEG , PNG , WebP , GIF , BMP , and SVG.
        image3:
          type: string
          description: >-
            Image-Merge Field: URL to Image 3 variable image defined in
            template. URL must be publicly accessible. Supported filed formats:
            JPEG , PNG , WebP , GIF , BMP , and SVG.
        image4:
          type: string
          description: >-
            Image-Merge Field: URL to Image 4 variable image defined in
            template. URL must be publicly accessible. Supported filed formats:
            JPEG , PNG , WebP , GIF , BMP , and SVG.
        image5:
          type: string
          description: >-
            Image-Merge Field: URL to Image 5 variable image defined in
            template. URL must be publicly accessible. Supported filed formats:
            JPEG , PNG , WebP , GIF , BMP , and SVG.
        image6:
          type: string
          description: >-
            Image-Merge Field: URL to Image 6 variable image defined in
            template. URL must be publicly accessible. Supported filed formats:
            JPEG , PNG , WebP , GIF , BMP , and SVG.
        salutation:
          type: string
          description: 'Mail-Merge Field: {{Salutation}}'
        returnTitle:
          type: string
          description: >-
            Return Address Override: Return Title. This overrides the return
            address fields set in the design template.
        returnFirstName:
          type: string
          description: >-
            Return Address Override: Return First Name. This overrides the
            return address fields set in the design template.
        returnLastName:
          type: string
          description: >-
            Return Address Override: Return Last Name. This overrides the return
            address fields set in the design template.
        returnOrganization:
          type: string
          description: >-
            Return Address Override: Return Organization Name. This overrides
            the return address fields set in the design template.
        returnAddress1:
          type: string
          description: >-
            Return Address Override: Return Address 1. This overrides the return
            address fields set in the design template.
        returnAddress2:
          type: string
          description: >-
            Return Address Override: Return Address 2. This overrides the return
            address fields set in the design template.
        returnCity:
          type: string
          description: >-
            Return Address Override: Return City. This overrides the return
            address fields set in the design template.
        returnZip:
          type: string
          description: >-
            Return Address Override: Return Zip. This overrides the return
            address fields set in the design template.
        returnState:
          type: string
          description: >-
            Return Address Override: Return State. This overrides the return
            address fields set in the design template.
        email:
          type: string
          description: 'Mail-Merge Field: {{Email}}'
        qrUrl:
          type: string
          description: >-
            QR URL Override: Providing a QR URL for a recipient overrides the QR
            URL in the design template. A QR must exist in the design template
            to provide this field.
        text:
          type: string
          description: >-
            Handwritten Text: Returns the handwritten text on the design
            template (if product is handwritten).
        text2:
          type: string
          description: >-
            Bifold Secondary Handwritten Text: Returns the handwritten text on
            the bottom panel of the bifold card in design template (if product
            is Bifold).
        radiusPinStreet:
          type: string
          description: 'Radius Mail: Returns the Radius Pin Street.'
        radiusPinAddress:
          type: string
          description: 'Radius Mail: Returns the Radius Pin Address.'
        fullAddress:
          type: string
          description: >-
            Full Address Field: If the full address is provided as single
            string, the address will be decomposed post-validation into the send
            address fields. Provide either the FullAddress, or the decomposed
            fields above (e.g. Address 1, City, State, etc.), both not both.
      description: >-
        Recipient Metadata. This is used for Mail-Merge and Image-merge fields
        to personalize the mailing to the individual.
      nullable: true
    externalOrdersRecipientPersonalDataVm:
      type: object
      properties:
        firstName:
          type: string
          description: Recipient First Name.
          nullable: true
        lastName:
          type: string
          description: Recipient Last Name.
          nullable: true
        toOrganization:
          type: string
          description: Recipient Organization.
          nullable: true
        salutation:
          type: string
          description: Recipient Salutation (used for Mail-Merge only).
      description: Recipient Personal Information
      nullable: true
    externalOrdersRecipientVm:
      type: object
      properties:
        id:
          type: integer
          format: int32
        address:
          $ref: '#/components/schemas/externalOrdersRecipientAddressVm'
        personal:
          $ref: '#/components/schemas/externalOrdersRecipientPersonalDataVm'
        metadata:
          $ref: '#/components/schemas/externalOrdersRecipientMetadataVm'
    externalOrdersUndeliverableRecipientsResponseVm:
      type: object
      properties:
        address:
          $ref: '#/components/schemas/externalOrdersRecipientAddressVm'
        personal:
          $ref: '#/components/schemas/externalOrdersRecipientPersonalDataVm'
        metadata:
          $ref: '#/components/schemas/externalOrdersRecipientMetadataVm'
    externalOrdersUndeliverableRecipientsSummaryResponseVm:
      type: object
      properties:
        duplicated:
          type: integer
          format: int32
        doNotMail:
          type: integer
          format: int32
        invalidAddress:
          type: integer
          format: int32
        undeliverableRecipients:
          type: array
          items:
            $ref: >-
              #/components/schemas/externalOrdersUndeliverableRecipientsResponseVm
    householdIncome:
      type: object
      properties:
        min:
          type: integer
          format: int32
          nullable: true
        max:
          type: integer
          format: int32
          nullable: true
    integrationOrder:
      type: object
      properties:
        id:
          type: integer
          description: Integration Order ID
          format: int32
        name:
          type: string
          description: Integration Order Name
        createdDate:
          type: string
          description: Integration Order Created Date
          format: date-time
        updatedDate:
          type: string
          description: Integration Order Updated Date
          format: date-time
        postageType:
          type: string
          description: Integration Order Postage Type. FirstClass or Standard.
        integrationOrderStatus:
          type: string
          description: >-
            Integration Order Status. Pending, In Progress, Completed, Failed,
            Cancelled.
    integrationOrderRecipient:
      type: object
      properties:
        id:
          type: integer
          description: Order Recipient ID
          format: int32
        firstName:
          type: string
          description: Order Recipient First Name
        lastName:
          type: string
          description: Order Recipient Last Name
        toOrganization:
          type: string
          description: Order Recipient Organization
        address1:
          type: string
          description: Order Recipient Address Line 1
        address2:
          type: string
          description: Order Recipient Address Line 2
        city:
          type: string
          description: Order Recipient City
        state:
          type: string
          description: Order Recipient State
        zipCode:
          type: string
          description: Order Recipient Zip Code
        country:
          type: string
          description: Order Recipient Country
        custom1:
          type: string
          description: Order Recipient Custom Field 1 for Mail-Merge.
        custom2:
          type: string
          description: Recipient Custom Field 2 for Mail-Merge.
        custom3:
          type: string
          description: Recipient Custom Field 3 for Mail-Merge.
        custom4:
          type: string
          description: Recipient Custom Field 4 for Mail-Merge.
        custom5:
          type: string
          description: Recipient Custom Field 5 for Mail-Merge.
        custom6:
          type: string
          description: Recipient Custom Field 6 for Mail-Merge.
        salutation:
          type: string
          description: Recipient Salutation
        birthDay:
          type: string
          description: Recipient Birthday
          format: date-time
        anniversary:
          type: string
          description: Recipient Anniversary
          format: date-time
        returnTitle:
          type: string
          description: Return Address Title
        returnFirstName:
          type: string
          description: >-
            Mailpiece Return Address First Name. Use this to override the
            template's return address. If using the override, must provide full
            return address through endpoint.
        returnLastName:
          type: string
          description: >-
            Mailpiece Return Address Last Name. Use this to override the
            template's return address. If using the override, must provide full
            return address through endpoint.
        returnOrganization:
          type: string
          description: >-
            Mailpiece Return Address Organization. Use this to override the
            template's return address. If using the override, must provide full
            return address through endpoint.
        returnAddress1:
          type: string
          description: >-
            Mailpiece Return Address Line 1. Use this to override the template's
            return address. If using the override, must provide full return
            address through endpoint.
        returnAddress2:
          type: string
          description: >-
            Mailpiece Return Address Line 2. Use this to override the template's
            return address. If using the override, must provide full return
            address through endpoint.
        returnCity:
          type: string
          description: >-
            Mailpiece Return Address City. Use this to override the template's
            return address. If using the override, must provide full return
            address through endpoint.
        returnState:
          type: string
          description: >-
            Mailpiece Return Address State. Use this to override the template's
            return address. If using the override, must provide full return
            address through endpoint.
        returnZip:
          type: string
          description: >-
            Mailpiece Return Address Zip Code. Use this to override the
            template's return address. If using the override, must provide full
            return address through endpoint.
        qrUrl:
          type: string
          description: >-
            Mailpiece QR Code URL. Use this to override the template's QR code
            and provide a unique QR URL per recipient.
        fullAddress:
          type: string
          description: Recipient Full Address (Optional)
    lengthOfResidence:
      type: object
      properties:
        min:
          type: integer
          format: int32
          nullable: true
        max:
          type: integer
          format: int32
          nullable: true
    orderRecipient:
      type: object
      properties:
        id:
          type: integer
          format: int32
        firstName:
          type: string
        lastName:
          type: string
        toOrganization:
          type: string
        fullAddress:
          type: string
        address1:
          type: string
        address2:
          type: string
        city:
          type: string
        state:
          type: string
        zipCode:
          type: string
        country:
          type: string
        createdDate:
          type: string
          format: date-time
        qrCode:
          type: string
        qrUrl:
          type: string
        qrCodeScanCount:
          type: integer
          format: int32
        customerEmail:
          type: string
        customerName:
          type: string
        customerOrganization:
          type: string
        salespersonName:
          type: string
      description: Order Recipient
    orderRecipientStatistic:
      type: object
      properties:
        orderRecipientId:
          type: integer
          description: Order Recipient ID
          format: int32
        orderRecipient:
          $ref: '#/components/schemas/orderRecipient'
        orderId:
          type: integer
          description: Order ID
          format: int32
        statisticName:
          enum:
            - 0
          type: integer
          description: Order Statistic Type
          format: int32
        statisticValue:
          type: string
          description: Order Statistic Value
    profile:
      type: object
      properties:
        id:
          type: integer
          description: Account ID
          format: int32
        aadId:
          type: string
          description: Account AAD ID
          format: uuid
        email:
          type: string
          description: Account Email
        firstName:
          type: string
          description: Account First Name
        lastName:
          type: string
          description: Account Last Name
        company:
          type: string
          description: Account Company
        created:
          type: string
          description: Account Created Date
          format: date-time
        shouldProcessQrCodes:
          type: boolean
          description: Account Setting - Should Process QR Codes
    proximitySearch:
      type: object
      properties:
        name:
          type: string
        ownerOrRenterFilter:
          enum:
            - 0
            - 1
          type: integer
          format: int32
          default: 0
          nullable: true
        propertyTypeFilter:
          enum:
            - 0
            - 1
            - 2
          type: integer
          format: int32
          default: 0
          nullable: true
        houseHoldIncomeFilter:
          $ref: '#/components/schemas/householdIncome'
        lengthOfResidenceFilter:
          $ref: '#/components/schemas/lengthOfResidence'
        yearBuiltFilter:
          $ref: '#/components/schemas/yearBuilt'
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/address'
        multiUse:
          type: boolean
          nullable: true
    yearBuilt:
      type: object
      properties:
        min:
          type: integer
          format: int32
          nullable: true
        max:
          type: integer
          format: int32
          nullable: true
  securitySchemes:
    apikey:
      type: apiKey
      name: X-API-KEY
      in: header
