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

# Update Carrier Invoice Approval Request

> Update a carrier invoice approval request status and response payload



## OpenAPI

````yaml /api-reference/openapi.json patch /api/rest/carrier_invoice_approval_requests/{id}
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/carrier_invoice_approval_requests/{id}:
    patch:
      tags:
        - Carrier Invoice Approval Requests
      summary: Update Carrier Invoice Approval Request
      description: Update a carrier invoice approval request status and response payload
      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: _"id" is required
          in: path
          name: id
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              properties:
                id:
                  nullable: false
                  title: String
                  type: string
                input:
                  $ref: '#/components/schemas/CarrierInvoiceApprovalRequestSetInput'
                  properties:
                    status:
                      type: string
                      enum:
                        - SUCCEEDED
                        - FAILED
                      description: >-
                        The approval request status. Only SUCCEEDED or FAILED
                        are allowed.
                    response_payload:
                      type: object
                      description: The response payload from the approval request
              type: object
              required:
                - input
        description: >-
          Query parameters can also be provided in the request body as a JSON
          object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  updatedCarrierInvoiceApprovalRequest:
                    description: >-
                      Tracks carrier invoice approval requests with retry logic
                      and state management
                    nullable: true
                    properties:
                      id:
                        nullable: false
                        title: String
                        type: string
                        description: The approval request ID
                      status:
                        $ref: >-
                          #/components/schemas/CarrierInvoiceApprovalRequestStatusEnum
                        type: string
                        description: The updated status
                    title: CarrierInvoiceApprovalRequest
                    type: object
          description: Successful response
components:
  schemas:
    CarrierInvoiceApprovalRequestSetInput:
      description: input type for updating data in table "carrier_invoice_approval_request"
      nullable: false
      properties:
        carrierInvoiceId:
          nullable: true
          title: String
          type: string
        createdAt:
          $ref: '#/components/schemas/timestamptz'
        integrationId:
          nullable: true
          title: String
          type: string
        requestPayload:
          $ref: '#/components/schemas/jsonb'
        requestedByUserId:
          $ref: '#/components/schemas/uuid'
        responsePayload:
          $ref: '#/components/schemas/jsonb'
        retryCount:
          nullable: true
          title: Int
          type: integer
        status:
          $ref: '#/components/schemas/CarrierInvoiceApprovalRequestStatusEnum'
        updatedAt:
          $ref: '#/components/schemas/timestamptz'
      title: CarrierInvoiceApprovalRequestSetInput
      type: object
    CarrierInvoiceApprovalRequestStatusEnum:
      enum:
        - ABANDONED
        - FAILED
        - INITIATED
        - IN_PROGRESS
        - RETRYING
        - SUCCEEDED
      nullable: false
      title: CarrierInvoiceApprovalRequestStatusEnum
    timestamptz:
      nullable: false
      title: timestamptz
      type: string
      format: date-time
      description: >-
        A timestamp with timezone in ISO 8601 format, such as
        2024-12-16T21:57:14.525733+00:00
    jsonb:
      nullable: false
      title: jsonb
    uuid:
      nullable: false
      pattern: '[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}'
      title: uuid
      type: string

````