Three lines

Uber

Developers

[API] Upload Document

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.

This API allows Rental Suppliers to upload the necessary documents for each vehicle to meet compliance standards. Documents are classified using a document type identifier (from the response of “GET Vehicle API”). Once submitted, documents undergo a manual review to ensure they adhere to regulatory requirements.

Use case

Upon receiving a new vehicle at the facility, the rental manager collects essential documents such as vehicle insurance, inspection, and registration. These documents are then organized and submitted through the Upload Document API. Following confirmation, the vehicle is listed as compliant in the system and ready for operation.

Support for Hierarchical Data

The Upload Document 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

Resource

/v1/solutions/vehicles/:vehicle_id/documents

HTTP Method

POST

Authorization

Client Credentials

Example Request
curl -i -X POST "https://api.uber.com/v1/solutions/vehicles/:vehicle_id/documents" \
-H "Authorization: Bearer <TOKEN>" -H "Content-Type: application/json" \
-d '{
    "document_expiry_date":"2018-01-15",
    "document_type":"VehicleInsurance",
    "content":"content",
    "content_type":"content_type",
    "type_id": "<type_id>"
}'
Example Response
Status-code: 204 No Content
{
}
Request Path Parameters
Name Type Description
vehicle_id string Vehicle ID, which was returned in the create vehicle response.
Request Body Fields
Name Type Description
document_type string Global type of the document.
Possible values- [VehicleInsurance, VehicleInspection, VehicleRegistration, TEST_REQUIRED_DOCUMENT(for testing in Sandbox environment)]
document_expiry_date (optional) string Formatted date (YYYY-MM-DD) when the document will expire
content Byte Array Base64 Encoded file content
content_type string Content type of the file. Possible values [‘bmp’, ‘jpg’, ‘jpeg’, ‘png’, ‘pdf’, ‘doc’, ‘docx’]
type_id (optional) string Global type id of the document.
Identify the document to upload when multiple documents share the same document_type
Response Body parameters
  • None: No data is returned in the body of the response.
Rate limit
  • The rate limit for this endpoint is 2000 requests per hour (RPH). This limit is per developer account id.
Endpoint Specific Errors
Http Status Code Code
400 bad_request
401 unauthorized
403 forbidden (client does not have permission to upload a document for the given vehicle)
404 resource_not_found (vehicle not found)
429 rate_limited
500 internal_server_error
503 service_unavailable
Notes
  • It is crucial to note that documents are classified using a document type identifier, which is obtained from the response of the GET Vehicle API. This identifier is essential for ensuring that each document uploaded is correctly associated with the specific vehicle it pertains to. Proper classification using the document type identifier helps maintain the integrity and organization of the document management system, ensuring that all documents are correctly categorized and easily retrievable.
FAQ
  • Does this API work for fleets?
    • This API only works for rental suppliers
  • Is there any limit on the document size?
    • There is a strict 5MB file size limit. Exceeding this limit will cause the API to fail.

Uber

Developers
© 2023 Uber Technologies Inc.