Three lines

Uber

Developers

[API] Get Vehicles By Owner

Privileged and Confidential This endpoint design has been confidentially shared with you. It is still under development and is subject to change without notice. Please do not share this document or API endpoint details with anyone who is not authorized to have access. For more information read about scopes.

The Get Vehicles By Owner is designed for vehicle supplier organizations to retrieve a detailed list of vehicles they own.

Use case

Get “Vehicles By Owner” API supports better management by providing comprehensive information about each vehicle, including its compliance status and any assignments to drivers. This functionality is crucial for maintaining an up-to-date inventory of vehicles, ensuring compliance with regulations within the hierarchical structure of the organization.

Support for Hierarchical Data

The Get Vehicles By Owner API automatically operates within the hierarchical structure of the organization linked to the developer’s account at the time of setup.

Supported supplier types

Rentals

Scopes

vehicle_suppliers.vehicles.read

Resource

/v1/vehicle-suppliers/vehicles

HTTP Method

GET

Authorization

Client Credentials

Example Request
curl GET "https://api.uber.com/v1/vehicle-suppliers/vehicles?org_id=<org_id>&page_token=<page_token>&page_size=2&fields=_all_" \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json"

Request Body Parameters
Name Type Description
org_id string ID of the vehicle supplier organization that the vehicles belong to.
page_token (optional) string Pass in the next_page_token returned from previous call to get the next page.
page_size (optional) integer Maximum number of items to retrieve per page. Defaults to 5 if not provided.
fields (optional) string If set to _all_, the response includes the vehicle compliance info and vehicle assignment info.

Example Response
Status-code: 200
{
  "vehicles": [
    {
      "id": "<vehicle_id>",
      "owner_id": "<owner_id>",
      "make": "Honda",
      "model": "Civic",
      "year": 2020,
      "vin": "KMHDU4AD5AU136970",
      "license_plate": "TEST-ABC",
      "color_hex_code": "FFFFFF",
      "color_name": "white",
      "last_updated": 1584678070000,
      "compliance": {
        "status": "INACTIVE",
        "documents": [
          {
            "type_name": "Vehicle Insurance",
            "type_id": "<type_id>",
            "status": "ACTIVE"
          },
          {
            "type_name": "Vehicle Registration",
            "type_id": "<type_id>",
            "status": "PENDING"
          },
          {
            "type_name": "Vehicle Inspection",
            "type_id": "<type_id>",
            "status": "MISSING"
          }
        ]
      },
      "assignments": [
        {
          "driver_id": "<driver_id>"
        }
      ]
    },
    {
      "id": "<vehicle_id>",
      "owner_id": "<owner_id>",
      "make": "Toyota",
      "model": "Sienna",
      "year": 2020,
      "vin": "4S3BJ6321N6900903",
      "license_plate": "TEST-EFG",
      "color_hex_code": "0000FF",
      "color_name": "blue",
      "last_updated": 1584043576000,
      "compliance": {
        "status": "INACTIVE",
        "documents": [
          {
            "type_name": "Vehicle Insurance",
            "type_id": "<type_id>",
            "status": "REJECTED"
          },
          {
            "type_name": "Vehicle Registration",
            "type_id": "<type_id>",
            "status": "MISSING"
          },
          {
            "type_name": "Vehicle Inspection",
            "type_id": "<type_id>",
            "status": "MISSING"
          }
        ]
      },
      "assignments": []
    }
  ],
  "next_page_token": "<next_page_token>"
}
Response Body parameters
Name Type Description
vehicles object array List of Vehicle objects
next_page_token string Next page token

Vehicle

Name Type Description
id string Vehicle ID
owner_id string ID of the vehicle supplier that owns the vehicle
make string Make of the vehicle
model string Model of the vehicle
year int Make year of the vehicle
vin string Vin (chassis number) of the vehicle
license_plate string License plate ID of the vehicle
color_hex_code string Hex code of the vehicle color, e.g. FFFFFF for white color
color_name string Name of the vehicle color, e.g. White
last_updated int Last updated timestamp of the vehicle in milliseconds
compliance object Vehicle compliance info
compliance.status string Status of the vehicle:
ACTIVE: vehicle is active
INACTIVE: vehicle is not active
compliance.documents object array Vehicle documents
compliance.documents[].type_name string Type of document e.g. Vehicle Registration, Vehicle Insurance, Vehicle Inspection
compliance.documents[].type_id string ID of the document type
compliance.documents[].status string Status of the document:
ACTIVE: document is approved and active
MISSING: document is missing (not uploaded yet)
PENDING: document is pending review from the document approver
REJECTED: document was rejected by the document approver
EXPIRED: document is expired
compliance.documents[].status_reason_name string Reason name for why the document is rejected
compliance.documents[].expires_at int Expiration timestamp of the document in milliseconds
assignments object array Vehicle assignments
assignments[].driver_id string ID of the driver that is assigned to the vehicle

Rate limit

  • The rate limit for this endpoint is 7200 requests per hour (RPH).
Endpoint Specific Errors
Http Status Code Code Message
400 bad_request The request parameters are invalid
401 unauthorized Invalid OAuth 2.0 credentials provided
404 organization_not_found Supplier organization was not found or not authorized
429 rate_limited Number of requests exceeds allowed limit
500 internal_server_error Internal server error
503 service_unavailable Service unavailable
Notes
  • Fields like page_token must be URL/URI encoded when included in requests. This ensures that special characters are properly formatted. For example:

​ Original page_token: A/B+C=D

​ URL/URI Encoded page_token: A%2FB%2BC%3DD

Uber

Developers
© 2023 Uber Technologies Inc.