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

# Create one or more trips (max 100)

> **Scopes:** `trip:create`



## OpenAPI

````yaml /api-reference/openapi.json post /v0/business/{business_id}/trips
openapi: 3.1.0
info:
  title: Asset API
  version: '0.1'
servers:
  - url: https://api.sandbox.getasset.com
    description: Sandbox
  - url: https://api.getasset.com
    description: Production
security: []
paths:
  /v0/business/{business_id}/trips:
    post:
      tags:
        - Mileage
      summary: Create one or more trips (max 100)
      description: '**Scopes:** `trip:create`'
      operationId: create_trips_v0_business__business_id__trips_post
      parameters:
        - name: business_id
          in: path
          required: true
          schema:
            type: string
            format: biz_string
            title: Business Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/CreateTripRequest'
              maxItems: 100
              title: Trips
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TripsSuccess'
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Content
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Service Unavailable
      security:
        - OAuth2PasswordBearer:
            - trip:create
components:
  schemas:
    CreateTripRequest:
      properties:
        vehicle_id:
          type: string
          format: vhc_string
          title: Vehicle Id
          description: The id of the Vehicle used for the trip
          examples:
            - vhc_GA6EG2qFxA97NZHtxeLPUy
        external_id:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: External Id
          description: The external ID of the Trip
          examples:
            - '1234567890'
        trip_date:
          type: string
          format: date
          title: Trip Date
          description: The date the trip occurred
          examples:
            - '2026-04-22'
        distance:
          anyOf:
            - type: number
              exclusiveMinimum: 0
            - type: string
              pattern: >-
                ^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,11}0*$)\d{0,8}\.\d{0,2}0*$)
          title: Distance
          description: The distance travelled, in units defined by distance_unit
          examples:
            - '42.50'
        distance_unit:
          $ref: '#/components/schemas/DistanceUnit'
          description: The unit of measurement for distance
          examples:
            - miles
        purpose:
          anyOf:
            - $ref: '#/components/schemas/TripPurpose'
            - type: 'null'
          description: Whether the trip was for business or personal use
          examples:
            - personal
        start_address:
          anyOf:
            - type: string
              maxLength: 500
            - type: 'null'
          title: Start Address
          description: Where the trip started (unstructured)
          examples:
            - 123 Main St, San Francisco, CA
        end_address:
          anyOf:
            - type: string
              maxLength: 500
            - type: 'null'
          title: End Address
          description: Where the trip ended (unstructured)
          examples:
            - 456 Market St, San Francisco, CA
        notes:
          anyOf:
            - type: string
              maxLength: 1000
            - type: 'null'
          title: Notes
          description: Free-form notes about the trip from the user
          examples:
            - Client lunch meeting
      type: object
      required:
        - vehicle_id
        - trip_date
        - distance
        - distance_unit
      title: CreateTripRequest
    TripsSuccess:
      properties:
        data:
          items:
            $ref: '#/components/schemas/TripPublic'
          type: array
          title: Data
        errors:
          items:
            $ref: '#/components/schemas/TripCreateError'
          type: array
          title: Errors
      type: object
      required:
        - data
        - errors
      title: TripsSuccess
    ErrorResponse:
      properties:
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: A description of the error
        data:
          title: Data
          description: Data associated with the error
      type: object
      required:
        - error
        - data
      title: ErrorResponse
    DistanceUnit:
      type: string
      enum:
        - miles
        - kilometers
      title: DistanceUnit
    TripPurpose:
      type: string
      enum:
        - business
        - personal
      title: TripPurpose
    TripPublic:
      properties:
        business_id:
          type: string
          format: biz_string
          title: Business Id
          description: The id of the Business that owns the trip
          examples:
            - biz_GA6EG2qFxA97NZHtxeLPUy
        vehicle_id:
          type: string
          format: vhc_string
          title: Vehicle Id
          description: The id of the Vehicle used for the trip
          examples:
            - vhc_GA6EG2qFxA97NZHtxeLPUy
        external_id:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: External Id
          description: The external ID of the Trip
          examples:
            - '1234567890'
        trip_date:
          type: string
          format: date
          title: Trip Date
          description: The date the trip occurred
          examples:
            - '2026-04-22'
        distance:
          type: number
          title: Distance
          description: The distance travelled, in units defined by distance_unit
          examples:
            - 42.5
        distance_unit:
          $ref: '#/components/schemas/DistanceUnit'
          description: The unit of measurement for distance
          examples:
            - miles
        start_address:
          anyOf:
            - type: string
            - type: 'null'
          title: Start Address
          description: Where the trip started (unstructured)
          examples:
            - 123 Main St, San Francisco, CA
        end_address:
          anyOf:
            - type: string
            - type: 'null'
          title: End Address
          description: Where the trip ended (unstructured)
          examples:
            - 456 Market St, San Francisco, CA
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
          description: Free-form notes about the trip from the user
          examples:
            - Client lunch meeting
        purpose:
          anyOf:
            - $ref: '#/components/schemas/TripPurpose'
            - type: 'null'
          description: Whether the trip was for business or personal use
          examples:
            - personal
        amount:
          anyOf:
            - type: number
            - type: 'null'
          title: Amount
          description: >-
            Computed mileage deduction amount in dollars (null for personal
            trips)
          examples:
            - 7.25
        amount_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Amount Reason
          description: The reason for the computed amount
          examples:
            - Standard rate applied
        id:
          type: string
          format: trp_string
          title: Id
          description: The id of the Trip
          examples:
            - trp_GA6EG2qFxA97NZHtxeLPUy
      type: object
      required:
        - business_id
        - vehicle_id
        - trip_date
        - distance
        - distance_unit
        - start_address
        - end_address
        - id
      title: TripPublic
    TripCreateError:
      properties:
        error:
          type: string
          title: Error
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
      type: object
      required:
        - error
        - external_id
      title: TripCreateError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /v0/auth/token

````