---
updatedAt: 2026-05-14T20:08:33.000Z
agentTools:
  projectIndex: https://developer.onefinops.com/llms.txt
---

# Change a vehicle in a multi-vehicle group

Swap a vehicle inside a multi-vehicle group (typical use — replacement after a breakdown). `ewbNumber` is carried in the body. Caller-acting GSTIN in the `gstin` header.


# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "OneFinOps API",
    "version": "1.0.0",
    "summary": "Programmatic access to the Indian GSTN portal — IRN registration, e-Way Bills, and GSP credential management.",
    "description": "The OneFinOps GST API lets you generate IRNs (e-invoices), manage e-Way Bills, and onboard GSP\ncredentials directly against your tenant. This reference documents every public endpoint exposed\non `api.in.onefinops.com` (production) and `sandbox-api.in.onefinops.com` (sandbox).\n\nAll endpoints are authenticated with OAuth 2.0 client credentials. See **Authentication** in the\nguides for token issuance, scope semantics, and SDK examples.\n",
    "contact": {
      "name": "OneFinOps Developer Support",
      "email": "developers@onefinops.com",
      "url": "https://onefinops.com"
    },
    "license": {
      "name": "Proprietary"
    }
  },
  "servers": [
    {
      "url": "https://api.in.onefinops.com",
      "description": "Production"
    },
    {
      "url": "https://sandbox-api.in.onefinops.com",
      "description": "Sandbox"
    }
  ],
  "tags": [
    {
      "name": "E-Way Bill",
      "description": "Generate, update, extend, cancel, reject and look up e-Way Bills against the NIC EWB portal."
    }
  ],
  "security": [
    {
      "oauth2": []
    }
  ],
  "paths": {
    "/v1/ewaybills/multivehicle/change": {
      "post": {
        "tags": [
          "E-Way Bill"
        ],
        "summary": "Change a vehicle in a multi-vehicle group",
        "description": "Swap a vehicle inside a multi-vehicle group (typical use — replacement after a breakdown). `ewbNumber` is carried in the body. Caller-acting GSTIN in the `gstin` header.\n",
        "security": [
          {
            "oauth2": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/GstinHeader"
          },
          {
            "$ref": "#/components/parameters/RequestIdHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeMultiVehicleRequest"
              },
              "examples": {
                "replaceVehicle": {
                  "summary": "Replace a vehicle in the group",
                  "value": {
                    "ewbNumber": 391010775670,
                    "groupNumber": 1,
                    "oldVehicleNumber": "UK10AB2222",
                    "newVehicleNumber": "UK11CD3333",
                    "fromPlace": "Roorkee",
                    "fromStateCode": 5,
                    "reasonCode": "1",
                    "reasonRemark": "Vehicle replaced en route"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChangeMultiVehicleResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request."
          },
          "401": {
            "description": "Missing or invalid OAuth token."
          },
          "404": {
            "description": "Resource not found."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "description": "OAuth 2.0 client credentials flow. Mint your token from `login.onefinops.com` using your `ofin_live_*` (production) or `ofin_test_*` (sandbox) credentials issued from the Developer console. The realm attaches `onefinops.api` as a **default scope** to every `ofin_*` client at provision time — you do not pass `scope=...` on the token request. The minted access token carries `aud=onefinops.api` and `client_class=external_customer`.",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://login.onefinops.com/realms/onefinops/protocol/openid-connect/token",
            "scopes": {}
          }
        }
      }
    },
    "parameters": {
      "GstinHeader": {
        "in": "header",
        "name": "gstin",
        "required": true,
        "description": "GSTIN whose NIC IRP / EWB-portal credential authorizes the call.\nSeed each GSTIN's credential through the Developer Console.\n",
        "schema": {
          "type": "string",
          "pattern": "^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z][A-Z0-9]{3}$",
          "minLength": 15,
          "maxLength": 15,
          "example": "05AAACG2409A1ZH"
        }
      },
      "RequestIdHeader": {
        "in": "header",
        "name": "X-Request-Id",
        "required": false,
        "description": "Optional client-supplied UUID for correlation across logs and dashboards. If omitted, OneFinOps mints one and echoes it back on the response.",
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      }
    },
    "schemas": {
      "ChangeMultiVehicleRequest": {
        "type": "object",
        "required": [
          "ewbNumber",
          "groupNumber",
          "fromPlace",
          "fromStateCode",
          "reasonCode"
        ],
        "properties": {
          "ewbNumber": {
            "type": "integer",
            "format": "int64",
            "description": "EWB the multi-vehicle group lives on. Carried in the body.",
            "example": 391010775670
          },
          "groupNumber": {
            "type": "integer",
            "example": 1
          },
          "oldVehicleNumber": {
            "type": "string",
            "nullable": true,
            "example": "UK07AB2222"
          },
          "newVehicleNumber": {
            "type": "string",
            "nullable": true,
            "example": "UK07CD3333"
          },
          "oldTransportNumber": {
            "type": "string",
            "nullable": true
          },
          "newTransportNumber": {
            "type": "string",
            "nullable": true
          },
          "fromPlace": {
            "type": "string",
            "example": "Roorkee"
          },
          "fromStateCode": {
            "type": "integer",
            "minimum": 1,
            "maximum": 37,
            "example": 5
          },
          "reasonCode": {
            "type": "string",
            "example": "1"
          },
          "reasonRemark": {
            "type": "string",
            "nullable": true,
            "example": "Vehicle replaced en route"
          }
        }
      },
      "ChangeMultiVehicleResponse": {
        "type": "object",
        "description": "Response from `POST /v1/ewaybills/multivehicle/change`.",
        "properties": {
          "ewbNumber": {
            "type": "integer",
            "format": "int64"
          },
          "groupNumber": {
            "type": "string"
          },
          "vehicleUpdatedDate": {
            "type": "string",
            "format": "date-time",
            "description": "When NIC recorded the vehicle change."
          }
        }
      }
    }
  }
}
```