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

# Patch P46 Car

> Partially update a P46 Car's content.

Rejected if the car is tied to a submission, which is in progress or successfully processed.



## OpenAPI

````yaml /api-reference/preview.json patch /gb/organizations/{organization_id}/exb/p46cars/{car_id}
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /gb/organizations/{organization_id}/exb/p46cars/{car_id}:
    patch:
      tags:
        - Great Britain
        - Expenses and Benefits
        - Great Britain
        - EXB P46 Car
      summary: Patch P46 Car
      description: >-
        Partially update a P46 Car's content.


        Rejected if the car is tied to a submission, which is in progress or
        successfully processed.
      operationId: >-
        patch_p46_car_gb_organizations__organization_id__exb_p46cars__car_id__patch
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            anyOf:
              - type: string
              - type: string
                format: uuid
            title: Organization Id
        - name: car_id
          in: path
          required: true
          schema:
            anyOf:
              - type: string
              - type: string
                format: uuid
            title: Car Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/P46CarPatchRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/P46CarItemResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerToken: []
components:
  schemas:
    P46CarPatchRequest:
      properties:
        submission_reason:
          anyOf:
            - $ref: '#/components/schemas/SubmissionReason-Input'
            - type: 'null'
        car_details:
          anyOf:
            - $ref: '#/components/schemas/P46CarDetails-Input'
            - type: 'null'
        co2_emissions:
          anyOf:
            - $ref: '#/components/schemas/CO2Emissions-Input'
            - type: 'null'
        monetary_details:
          anyOf:
            - $ref: '#/components/schemas/P46CarMonetaryDetails-Input'
            - type: 'null'
        fuel:
          anyOf:
            - $ref: '#/components/schemas/P46CarFuel-Input'
            - type: 'null'
      additionalProperties: false
      type: object
      title: P46CarPatchRequest
      description: |-
        Partial update of a P46 Car's content.

        Top-level fields are shallow-merged into the existing JSONB content;
        to edit a field inside a nested section (e.g. `car_details.fuel_type`),
        send the full nested section.
    P46CarItemResponse:
      properties:
        SubmissionReason:
          $ref: '#/components/schemas/SubmissionReason-Output'
        CarDetails:
          anyOf:
            - $ref: '#/components/schemas/P46CarDetails-Output'
            - type: 'null'
        CO2Emissions:
          anyOf:
            - $ref: '#/components/schemas/CO2Emissions-Output'
            - type: 'null'
        MonetaryDetails:
          anyOf:
            - $ref: '#/components/schemas/P46CarMonetaryDetails-Output'
            - type: 'null'
        Fuel:
          anyOf:
            - $ref: '#/components/schemas/P46CarFuel-Output'
            - type: 'null'
        employee_id:
          type: string
          title: Employee Id
        id:
          type: string
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        status:
          $ref: '#/components/schemas/P46CarStatus'
      additionalProperties: false
      type: object
      required:
        - SubmissionReason
        - employee_id
        - id
        - created_at
        - status
      title: P46CarItemResponse
      description: >-
        Full P46 Car record (stored content as typed fields + id + created_at +
        status).
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SubmissionReason-Input:
      properties:
        is_car_provided:
          anyOf:
            - $ref: '#/components/schemas/YesNoType'
            - type: 'null'
          description: Whether a car has been provided
        replaced_car:
          anyOf:
            - $ref: '#/components/schemas/ReplacedCar-Input'
            - type: 'null'
        is_second_car:
          anyOf:
            - $ref: '#/components/schemas/YesNoType'
            - type: 'null'
          description: Whether this is a second or subsequent car
        is_director:
          anyOf:
            - $ref: '#/components/schemas/YesNoType'
            - type: 'null'
          description: Whether the employee is a director
        car_withdrawn:
          anyOf:
            - $ref: '#/components/schemas/CarWithdrawn-Input'
            - type: 'null'
      additionalProperties: false
      type: object
      title: SubmissionReason
      description: Reason for P46Car submission.
    P46CarDetails-Input:
      properties:
        make_and_model:
          type: string
          maxLength: 35
          minLength: 1
          pattern: ^[A-Za-z0-9 ()\-./]*$
          title: Make And Model
          description: Car make and model
        engine_size:
          $ref: '#/components/schemas/EngineSize-Input'
        date_first_registered:
          type: string
          format: date
          title: Date First Registered
          description: Date car was first registered
        fuel_type:
          anyOf:
            - $ref: '#/components/schemas/FuelType'
            - type: 'null'
          description: Fuel type
      additionalProperties: false
      type: object
      required:
        - make_and_model
        - engine_size
        - date_first_registered
      title: P46CarDetails
      description: Car details for P46Car form.
    CO2Emissions-Input:
      properties:
        emissions:
          anyOf:
            - type: integer
              maximum: 999
              minimum: 0
            - type: 'null'
          title: Emissions
          description: CO2 emissions (g/km)
        zero_emission_mileage:
          anyOf:
            - type: integer
              maximum: 9999
              minimum: 0
            - type: 'null'
          title: Zero Emission Mileage
          description: Zero emission mileage (miles)
        before_1998:
          anyOf:
            - $ref: '#/components/schemas/YesType'
            - type: 'null'
          description: Car registered before 1998
        no_approved:
          anyOf:
            - $ref: '#/components/schemas/YesType'
            - type: 'null'
          description: No approved CO2 figure available
      additionalProperties: false
      type: object
      title: CO2Emissions
      description: >-
        CO2 emissions — choice of (Emissions + ZeroEmissionMileage), Before1998,
        or NoApproved.
    P46CarMonetaryDetails-Input:
      properties:
        car_price:
          anyOf:
            - type: number
              maximum: 9999999
              minimum: 1
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Car Price
          description: List price of car when new
        accessories_price:
          anyOf:
            - anyOf:
                - type: number
                - type: string
                  pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
              ge: '1.00'
              le: '999999.00'
            - type: 'null'
          title: Accessories Price
          description: Price of accessories provided
        date_first_available:
          type: string
          format: date
          title: Date First Available
          description: Date car first available to employee
        cash_forgone:
          anyOf:
            - anyOf:
                - type: number
                - type: string
                  pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
              ge: '1.00'
              le: '9999999.00'
            - type: 'null'
          title: Cash Forgone
          description: Amount of cash or salary foregone for the car
        capital_contributions:
          anyOf:
            - type: number
              maximum: 5000
              minimum: 0
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Capital Contributions
          description: Employee capital contributions towards cost of car
        private_use_payment:
          anyOf:
            - $ref: '#/components/schemas/PrivateUsePaymentValue-Input'
            - type: 'null'
          description: Amount employee pays for private use (with optional interval)
      additionalProperties: false
      type: object
      required:
        - car_price
        - date_first_available
        - capital_contributions
      title: P46CarMonetaryDetails
      description: Monetary details for P46Car form.
    P46CarFuel-Input:
      properties:
        is_private_use:
          $ref: '#/components/schemas/YesNoType'
          description: Whether fuel is provided for private use
        is_fuel_paid_by_employee:
          anyOf:
            - $ref: '#/components/schemas/YesNoType'
            - type: 'null'
          description: Whether the employee pays for all fuel
      additionalProperties: false
      type: object
      required:
        - is_private_use
      title: P46CarFuel
      description: Fuel benefit details for P46Car.
    SubmissionReason-Output:
      properties:
        ProvidedCar:
          anyOf:
            - $ref: '#/components/schemas/YesNoType'
            - type: 'null'
          description: Whether a car has been provided
        ReplacedCar:
          anyOf:
            - $ref: '#/components/schemas/ReplacedCar-Output'
            - type: 'null'
        SecondCar:
          anyOf:
            - $ref: '#/components/schemas/YesNoType'
            - type: 'null'
          description: Whether this is a second or subsequent car
        Director:
          anyOf:
            - $ref: '#/components/schemas/YesNoType'
            - type: 'null'
          description: Whether the employee is a director
        CarWithdrawn:
          anyOf:
            - $ref: '#/components/schemas/CarWithdrawn-Output'
            - type: 'null'
      additionalProperties: false
      type: object
      title: SubmissionReason
      description: Reason for P46Car submission.
    P46CarDetails-Output:
      properties:
        MakeAndModel:
          type: string
          maxLength: 35
          minLength: 1
          pattern: ^[A-Za-z0-9 ()\-./]*$
          title: Makeandmodel
          description: Car make and model
        EngineSize:
          $ref: '#/components/schemas/EngineSize-Output'
        DateFirstRegistered:
          type: string
          format: date
          title: Datefirstregistered
          description: Date car was first registered
        FuelType:
          anyOf:
            - $ref: '#/components/schemas/FuelType'
            - type: 'null'
          description: Fuel type
      additionalProperties: false
      type: object
      required:
        - MakeAndModel
        - EngineSize
        - DateFirstRegistered
      title: P46CarDetails
      description: Car details for P46Car form.
    CO2Emissions-Output:
      properties:
        Emissions:
          anyOf:
            - type: integer
              maximum: 999
              minimum: 0
            - type: 'null'
          title: Emissions
          description: CO2 emissions (g/km)
        ZeroEmissionMileage:
          anyOf:
            - type: integer
              maximum: 9999
              minimum: 0
            - type: 'null'
          title: Zeroemissionmileage
          description: Zero emission mileage (miles)
        Before1998:
          anyOf:
            - $ref: '#/components/schemas/YesType'
            - type: 'null'
          description: Car registered before 1998
        NoApproved:
          anyOf:
            - $ref: '#/components/schemas/YesType'
            - type: 'null'
          description: No approved CO2 figure available
      additionalProperties: false
      type: object
      title: CO2Emissions
      description: >-
        CO2 emissions — choice of (Emissions + ZeroEmissionMileage), Before1998,
        or NoApproved.
    P46CarMonetaryDetails-Output:
      properties:
        CarPrice:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Carprice
          description: List price of car when new
        AccessoriesPrice:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
              ge: '1.00'
              le: '999999.00'
            - type: 'null'
          title: Accessoriesprice
          description: Price of accessories provided
        DateFirstAvailable:
          type: string
          format: date
          title: Datefirstavailable
          description: Date car first available to employee
        CashForgone:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
              ge: '1.00'
              le: '9999999.00'
            - type: 'null'
          title: Cashforgone
          description: Amount of cash or salary foregone for the car
        CapitalContributions:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Capitalcontributions
          description: Employee capital contributions towards cost of car
        PrivateUsePayment:
          anyOf:
            - $ref: '#/components/schemas/PrivateUsePaymentValue-Output'
            - type: 'null'
          description: Amount employee pays for private use (with optional interval)
      additionalProperties: false
      type: object
      required:
        - CarPrice
        - DateFirstAvailable
        - CapitalContributions
      title: P46CarMonetaryDetails
      description: Monetary details for P46Car form.
    P46CarFuel-Output:
      properties:
        PrivateUse:
          $ref: '#/components/schemas/YesNoType'
          description: Whether fuel is provided for private use
        FuelPaidByEmployee:
          anyOf:
            - $ref: '#/components/schemas/YesNoType'
            - type: 'null'
          description: Whether the employee pays for all fuel
      additionalProperties: false
      type: object
      required:
        - PrivateUse
      title: P46CarFuel
      description: Fuel benefit details for P46Car.
    P46CarStatus:
      type: string
      enum:
        - waiting_for_submission
        - submission_in_progress
        - submission_failed
        - successfully_submitted
        - archived
      title: P46CarStatus
      description: >-
        Summarized status for a P46 Car, derived from the latest submission's
        FSM state.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    YesNoType:
      type: string
      enum:
        - 'yes'
        - 'no'
      title: YesNoType
      description: Yes/No type for EXB forms.
    ReplacedCar-Input:
      properties:
        is_replaced:
          $ref: '#/components/schemas/YesNoType'
          description: Whether the car was replaced
        has_multiple_cars:
          anyOf:
            - $ref: '#/components/schemas/YesNoType'
            - type: 'null'
          description: Whether multiple cars are being replaced
        multiple_cars:
          anyOf:
            - $ref: '#/components/schemas/MultipleCars-Input'
            - type: 'null'
      additionalProperties: false
      type: object
      required:
        - is_replaced
      title: ReplacedCar
      description: Replaced car details within submission reason.
    CarWithdrawn-Input:
      properties:
        is_withdrawn:
          $ref: '#/components/schemas/YesType'
          description: Whether the car was withdrawn
        date_withdrawn:
          type: string
          format: date
          title: Date Withdrawn
          description: Date car was withdrawn
        make_and_model:
          type: string
          maxLength: 35
          minLength: 1
          pattern: ^[A-Za-z0-9 ()\-./]*$
          title: Make And Model
          description: Make and model of withdrawn car
        engine_size:
          $ref: '#/components/schemas/EngineSize-Input'
      additionalProperties: false
      type: object
      required:
        - is_withdrawn
        - date_withdrawn
        - make_and_model
        - engine_size
      title: CarWithdrawn
      description: Car withdrawn details within submission reason.
    EngineSize-Input:
      properties:
        value:
          type: integer
          maximum: 9999
          minimum: 0
          title: Value
          description: Engine size in cc
        category:
          $ref: '#/components/schemas/EngineSizeCategory'
          description: Engine size category (1-4)
      additionalProperties: false
      type: object
      required:
        - value
        - category
      title: EngineSize
      description: |-
        Engine size with required Category attribute (P46Car).

        XML: ``<EngineSize Category="1">1600</EngineSize>``
    FuelType:
      type: string
      enum:
        - F
        - D
        - A
      title: FuelType
      description: Car fuel types for P11D and P46Car.
    YesType:
      type: string
      enum:
        - 'yes'
      title: YesType
      description: Yes type
    PrivateUsePaymentValue-Input:
      properties:
        amount:
          anyOf:
            - type: number
              multipleOf: 1
              maximum: 9999999
              minimum: 1
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Amount
          description: Payment amount
        interval:
          anyOf:
            - $ref: '#/components/schemas/IntervalType'
            - type: 'null'
          description: Payment interval
      additionalProperties: false
      type: object
      required:
        - amount
      title: PrivateUsePaymentValue
      description: >-
        Private use payment with optional Interval attribute (P46Car).


        XML: ``<PrivateUsePayment
        Interval="monthly">500.00</PrivateUsePayment>``
    ReplacedCar-Output:
      properties:
        Replaced:
          $ref: '#/components/schemas/YesNoType'
          description: Whether the car was replaced
        MultipleCarIndicator:
          anyOf:
            - $ref: '#/components/schemas/YesNoType'
            - type: 'null'
          description: Whether multiple cars are being replaced
        MultipleCars:
          anyOf:
            - $ref: '#/components/schemas/MultipleCars-Output'
            - type: 'null'
      additionalProperties: false
      type: object
      required:
        - Replaced
      title: ReplacedCar
      description: Replaced car details within submission reason.
    CarWithdrawn-Output:
      properties:
        Withdrawn:
          $ref: '#/components/schemas/YesType'
          description: Whether the car was withdrawn
        DateWithdrawn:
          type: string
          format: date
          title: Datewithdrawn
          description: Date car was withdrawn
        MakeAndModel:
          type: string
          maxLength: 35
          minLength: 1
          pattern: ^[A-Za-z0-9 ()\-./]*$
          title: Makeandmodel
          description: Make and model of withdrawn car
        EngineSize:
          $ref: '#/components/schemas/EngineSize-Output'
      additionalProperties: false
      type: object
      required:
        - Withdrawn
        - DateWithdrawn
        - MakeAndModel
        - EngineSize
      title: CarWithdrawn
      description: Car withdrawn details within submission reason.
    EngineSize-Output:
      properties:
        __value__:
          type: integer
          maximum: 9999
          minimum: 0
          title: Value
          description: Engine size in cc
        Category:
          $ref: '#/components/schemas/EngineSizeCategory'
          description: Engine size category (1-4)
      additionalProperties: false
      type: object
      required:
        - __value__
        - Category
      title: EngineSize
      description: |-
        Engine size with required Category attribute (P46Car).

        XML: ``<EngineSize Category="1">1600</EngineSize>``
    PrivateUsePaymentValue-Output:
      properties:
        __value__:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Value
          description: Payment amount
        Interval:
          anyOf:
            - $ref: '#/components/schemas/IntervalType'
            - type: 'null'
          description: Payment interval
      additionalProperties: false
      type: object
      required:
        - __value__
      title: PrivateUsePaymentValue
      description: >-
        Private use payment with optional Interval attribute (P46Car).


        XML: ``<PrivateUsePayment
        Interval="monthly">500.00</PrivateUsePayment>``
    MultipleCars-Input:
      properties:
        make_and_model:
          type: string
          maxLength: 35
          minLength: 1
          pattern: ^[A-Za-z0-9 ()\-./]*$
          title: Make And Model
          description: Car make and model
        engine_size:
          $ref: '#/components/schemas/EngineSize-Input'
      additionalProperties: false
      type: object
      required:
        - make_and_model
        - engine_size
      title: MultipleCars
      description: Details of multiple cars being replaced.
    EngineSizeCategory:
      type: integer
      enum:
        - 1
        - 2
        - 3
        - 4
      title: EngineSizeCategory
      description: Engine size category for P46Car.
    IntervalType:
      type: string
      enum:
        - 'Y'
        - Q
        - M
        - W
      title: IntervalType
      description: Payment interval for P46Car PrivateUsePayment.
    MultipleCars-Output:
      properties:
        MakeAndModel:
          type: string
          maxLength: 35
          minLength: 1
          pattern: ^[A-Za-z0-9 ()\-./]*$
          title: Makeandmodel
          description: Car make and model
        EngineSize:
          $ref: '#/components/schemas/EngineSize-Output'
      additionalProperties: false
      type: object
      required:
        - MakeAndModel
        - EngineSize
      title: MultipleCars
      description: Details of multiple cars being replaced.
  securitySchemes:
    BearerToken:
      type: oauth2
      flows:
        password:
          scopes:
            read:all: Read all
            write:all: Write all
            read:health_check: Read health check
            write:health_check: Write health check
            read:wage_types: Read wage types
            write:wage_types: Write wage types
          tokenUrl: >-
            https://auth-preview.intermezzo.ai/authorize?audience=api-preview.intermezzo.ai

````