> ## Documentation Index
> Fetch the complete documentation index at: https://docs.upwell.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Link invoice to shipment

> Create an association between an invoice and a shipment.



## OpenAPI

````yaml /api-reference/openapi.json post /api/rest/invoice_shipments
openapi: 3.1.0
info:
  description: >-
    Upwell is Accounts Receivable automation software for the logistics
    industry. We serve freight brokers, carriers, factors, and anyone who needs
    to get transportation invoices paid.


    Learn more at:


    - [Upwell.com](https://upwell.com)
  title: Upwell REST API
  version: 3.30.2
  termsOfService: https://upwell.com/legal
  contact:
    name: Upwell
    url: https://upwell.com
    email: contact@upwell.com
servers:
  - url: https://api.upwell.com
    description: Production server
  - url: https://staging.api.upwell.com
    description: Staging server
security: []
tags:
  - name: Invoice Approval
    description: Endpoints for managing customer invoice approval workflow
paths:
  /api/rest/invoice_shipments:
    post:
      tags:
        - Invoice Shipments
      summary: Link invoice to shipment
      description: Create an association between an invoice and a shipment.
      parameters:
        - description: >-
            Your API key will be used for authentication of the request.
            `Authorization: YOUR_API_KEY`
          in: header
          name: authorization
          schema:
            type: string
        - description: >-
            _"invoiceId" is required (enter it either in parameters or request
            body)_
          in: query
          name: invoiceId
          schema:
            type: string
        - description: >-
            _"shipmentId" is required (enter it either in parameters or request
            body)_
          in: query
          name: shipmentId
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                invoiceId:
                  nullable: false
                  title: String
                  type: string
                shipmentId:
                  nullable: false
                  title: String
                  type: string
              type: object
        description: >-
          Query parameters can also be provided in the request body as a JSON
          object
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  insertInvoiceShipmentsOne:
                    description: columns and relationships of "invoice_shipments"
                    nullable: true
                    properties:
                      createdAt:
                        $ref: '#/components/schemas/timestamp'
                      invoiceId:
                        nullable: false
                        title: String
                        type: string
                      shipmentId:
                        nullable: false
                        title: String
                        type: string
                    title: InvoiceShipments
                    type: object
          description: Responses for POST /api/rest/invoice_shipments
components:
  schemas:
    timestamp:
      nullable: false
      title: timestamp

````