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

# Contract Update Api

> Partially updates a contract.



## OpenAPI

````yaml patch /api/v1/contract/{contract_uuid}
openapi: 3.1.0
info:
  title: NinjaAPI
  version: 1.0.0
  description: ''
servers:
  - url: https://api.justpaid.io
security: []
paths:
  /api/v1/contract/{contract_uuid}:
    patch:
      summary: Contract Update Api
      description: Partially updates a contract.
      operationId: loopfour_backend_contract_external_api_contract_update_api
      parameters:
        - in: path
          name: contract_uuid
          schema:
            format: uuid
            title: Contract Uuid
            type: string
          required: true
        - name: contract_uuid
          in: path
          description: UUID of the contract to update
          required: true
          schema:
            type: string
          example: 123e4567-e89b-12d3-a456-426614174000
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContractUpdateIn'
        required: true
      responses:
        '200':
          description: Contract updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractOut'
        '404':
          description: Contract not found
      security:
        - HttpBearerAuth: []
components:
  schemas:
    ContractUpdateIn:
      description: Input schema for partially updating a contract (all fields optional).
      properties:
        customer_uuid:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          description: UUID of the new customer
          example: 123e4567-e89b-12d3-a456-426614174000
          title: Customer Uuid
        title:
          anyOf:
            - type: string
            - type: 'null'
          description: New contract title
          example: Updated Enterprise Agreement
          title: Title
        contract_start_date:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          description: New contract start date
          example: '2024-01-01'
          title: Contract Start Date
        contract_end_date:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          description: New contract end date
          example: '2025-01-01'
          title: Contract End Date
        contract_amount:
          anyOf:
            - type: number
            - type: 'null'
          description: Updated contract value
          example: 150000
          title: Contract Amount
        currency:
          anyOf:
            - type: string
            - type: 'null'
          description: ISO 4217 currency code
          example: USD
          title: Currency
        payment_terms:
          anyOf:
            - enum:
                - due upon receipt
                - net 3
                - net 7
                - net 15
                - net 30
                - net 45
                - net 60
                - net 90
                - net 120
              type: string
            - type: 'null'
          description: >-
            Updated payment terms. Valid values: due upon receipt, net 3, net 7,
            net 15, net 30, net 45, net 60, net 90, net 120
          example: net 60
          title: Payment Terms
        is_evergreen:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Whether the contract auto-renews
          example: false
          title: Is Evergreen
      title: ContractUpdateIn
      type: object
    ContractOut:
      description: Detailed contract information with plan items.
      properties:
        customer:
          anyOf:
            - $ref: '#/components/schemas/CustomerBasicOut'
            - type: 'null'
          description: Customer information
        plan_items:
          default: []
          description: List of plan items associated with this contract
          items:
            $ref: '#/components/schemas/PlanItemOut'
          title: Plan Items
          type: array
        contract_status:
          description: The current status of the contract
          example: accepted
          title: Contract Status
          type: string
        file_url:
          anyOf:
            - type: string
            - type: 'null'
          description: URL to download the contract PDF
          example: https://api.justpaid.io/files/contract.pdf
          title: File Url
        uuid:
          format: uuid
          title: Uuid
          type: string
        title:
          anyOf:
            - maxLength: 255
              type: string
            - type: 'null'
          title: Title
        contract_start_date:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Contract Start Date
        contract_end_date:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Contract End Date
        contract_amount:
          anyOf:
            - type: string
            - type: 'null'
          title: Contract Amount
        currency:
          anyOf:
            - maxLength: 3
              type: string
            - type: 'null'
          default: USD
          title: Currency
        payment_terms:
          anyOf:
            - maxLength: 60
              type: string
            - type: 'null'
          title: Payment Terms
        discounted_amount:
          anyOf:
            - type: string
            - type: 'null'
          title: Discounted Amount
        discount_percent:
          anyOf:
            - type: string
            - type: 'null'
          title: Discount Percent
        is_evergreen:
          default: false
          title: Is Evergreen
          type: boolean
        invoice_start_date:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Invoice Start Date
        preferred_invoice_day:
          anyOf:
            - type: integer
            - type: 'null'
          title: Preferred Invoice Day
        created_at:
          format: date-time
          title: Created At
          type: string
        contract_summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Contract Summary
      required:
        - contract_status
      title: ContractOut
      type: object
    CustomerBasicOut:
      description: Basic customer information for contract responses.
      properties:
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          description: External identifier for the customer
          example: CUST-001
          title: External Id
        uuid:
          format: uuid
          title: Uuid
          type: string
        name:
          anyOf:
            - maxLength: 100
              type: string
            - type: 'null'
          description: Customer name
          title: Name
        email:
          anyOf:
            - maxLength: 100
              type: string
            - type: 'null'
          title: Email
      title: CustomerBasicOut
      type: object
    PlanItemOut:
      description: Plan item with pricing information.
      properties:
        billing_alias:
          anyOf:
            - type: string
            - type: 'null'
          description: The billing alias for this plan item
          example: api_calls
          title: Billing Alias
        prices:
          default: []
          description: List of prices for this plan item
          items:
            $ref: '#/components/schemas/PlanItemPriceOut'
          title: Prices
          type: array
        uuid:
          format: uuid
          title: Uuid
          type: string
        name:
          maxLength: 255
          title: Name
          type: string
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
      required:
        - name
      title: PlanItemOut
      type: object
    PlanItemPriceOut:
      description: Detailed plan item price information.
      properties:
        price:
          anyOf:
            - type: number
            - type: 'null'
          description: The price of the plan item
          example: 99.99
          title: Price
        billing_cycle:
          anyOf:
            - type: string
            - type: 'null'
          description: The billing cycle for this price
          example: monthly
          title: Billing Cycle
        price_type:
          anyOf:
            - type: string
            - type: 'null'
          description: The type of price (fixed_fee, usage_based_fee, tiered_fee, etc.)
          example: fixed_fee
          title: Price Type
        minimum_spend:
          anyOf:
            - type: number
            - type: 'null'
          description: Minimum amount to be charged for usage-based pricing
          example: 100
          title: Minimum Spend
        minimum_units:
          anyOf:
            - type: number
            - type: 'null'
          description: >-
            Minimum number of units to be billed if usage is below this
            threshold
          example: 1000
          title: Minimum Units
        allocated_units:
          anyOf:
            - type: number
            - type: 'null'
          description: Number of units allocated before overage charges apply
          example: 10000
          title: Allocated Units
        uuid:
          format: uuid
          title: Uuid
          type: string
      title: PlanItemPriceOut
      type: object
  securitySchemes:
    HttpBearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.