---
updatedAt: 2025-09-09T22:37:59.000Z
agentTools:
  projectIndex: https://docs.smartlane.ai/llms.txt
---

# /territories/{territory_id}/secondary_vehicles

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Smartlane OpenAPI Description",
    "description": "Smartlane Transport Intelligence API endpoints specification",
    "version": "1.1"
  },
  "servers": [
    {
      "url": "https://customer_id.prod.smartlane.io/api"
    }
  ],
  "security": [
    {
      "jwt": []
    }
  ],
  "tags": [
    {
      "name": "Territories",
      "description": "Territories api end points"
    }
  ],
  "paths": {
    "/territories/{territory_id}/secondary_vehicles": {
      "post": {
        "tags": [
          "Territories"
        ],
        "operationId": "post_territory_vsecondary_ehicles_resource",
        "parameters": [
          {
            "name": "territory_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "X-Fields",
            "in": "header",
            "description": "An optional fields mask.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TerritoryAssignVehicles"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Territory-dump"
                }
              }
            }
          },
          "400": {
            "description": "Different Loadclasses.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "payload"
      }
    }
  },
  "components": {
    "schemas": {
      "Territory-dump": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "custom_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "load_class_name": {
            "type": "string"
          },
          "softening_radius": {
            "type": "integer"
          },
          "postal_codes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostalCode-dump"
            }
          },
          "vehicles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TerritoryVehicle-dump"
            }
          },
          "secondary_vehicles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TerritoryVehicle-dump"
            }
          },
          "bounds": {
            "$ref": "#/components/schemas/MultipolygonBounds"
          }
        }
      },
      "MultipolygonBounds": {
        "type": "object",
        "nullable": true,
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "MultiPolygon"
            ]
          },
          "coordinates": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "array",
                "items": {
                  "type": "array",
                  "items": {
                    "type": "number",
                    "format": "double"
                  }
                }
              }
            }
          }
        }
      },
      "PostalCode-dump": {
        "required": [
          "id",
          "code"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "code": {
            "type": "string"
          },
          "country": {
            "type": "string",
            "description": "ISO-3166-Alpha-2 Country Code (two-letter code).",
            "default": "DE"
          },
          "bounds": {
            "$ref": "#/components/schemas/MultipolygonBounds"
          }
        }
      },
      "TerritoryVehicle-dump": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "custom_id": {
            "type": "string"
          }
        }
      },
      "TerritoryAssignVehicles": {
        "required": [
          "vehicle_custom_ids"
        ],
        "type": "object",
        "properties": {
          "vehicle_custom_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "err_id": {
            "type": "string",
            "description": "Identifier of the occurring error which can be used to report and debug the cause of the error."
          },
          "status": {
            "type": "integer",
            "description": "HTTP status code of the error.",
            "format": "int32"
          },
          "message": {
            "type": "string",
            "description": "Descriptive error message."
          },
          "notes": {
            "type": "array",
            "description": "Additional notes for certain data sets causing the error.",
            "items": {
              "type": "string"
            }
          },
          "success": {
            "type": "boolean",
            "description": "Indicates if the request might have succeeded despite the error."
          },
          "argo_failure": {
            "type": "string",
            "description": "Indicates if Argo is the cause of the error."
          }
        }
      }
    },
    "securitySchemes": {
      "jwt": {
        "type": "apiKey",
        "name": "jwt",
        "in": "header"
      }
    }
  },
  "x-explorer-enabled": false,
  "x-samples-languages": [
    "curl",
    "python",
    "java",
    "node",
    "javascript"
  ],
  "x-readme": {
    "proxy-enabled": true
  }
}
```