[API] Create Terms
The Create Terms API is specifically designed for vehicle suppliers providing rental and financing services. It will allow them to create a terms with rental fee between their organization, organization owned vehicle (can be absent in case the supplier is a financier) and a driver.
¶ Use case
By using the Create Terms API, suppliers can easily create a terms with rental fee in pending acceptance state. Terms created will require driver’s acceptance to become active.
¶ Support for Hierarchical Data
The API operates within the hierarchical structure of the organization linked to the developer’s account at the time of setup.
¶ Supported supplier types
Financiers/Rentals
¶ Scopes
vehicle_suppliers.terms.management
¶ Resource
/v1/vehicle-supplier/terms
¶ HTTP Method
POST
¶ Authorization
¶ Example Request
curl -X POST "https://api.uber.com/v1/vehicle-supplier/terms" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <TOKEN>" \
-d '{
"organization": {
"orgUuid": {
"value": "<organization_id>"
}
},
"vehicle": {
"vehicleUuid": {
"value": "<vehicle_id>"
}
},
"driver": {
"userUuid": {
"value": "<driver_id>"
},
"contactType": "CONTACT_TYPE_EMAIL"
},
"rentalFee": {
"frequency": "FREQUENCY_WEEKLY",
"fixed": {
"amountE5": 500000000,
"currencyCode": "USD"
}
},
"duration": {
"startsAt": {
"value": 1730205147000
},
"endsAt": {
"value": 1730291547000
}
},
"externalMetadata": {
"value": "some information"
}
}'
¶ Request Body Parameters
Name | Type | Description |
---|---|---|
organization |
object | Organization object |
driver |
object | Driver object |
vehicle |
object | Vehicle object |
rentalFee |
object | Amount details object. Rental fee information for the terms. |
duration |
object | Duration object |
externalMetadata |
object | External metadata object |
¶ Example Response
Status-code: 200
{
"terms": {
"termsUuid": {
"value": "<terms_id>"
},
"organization": {
"orgUuid": {
"value": "<organization_id>"
}
},
"driver": {
"userUuid": {
"value": "<driver_id>"
},
"contactType": "CONTACT_TYPE_EMAIL"
},
"vehicle": {
"vehicleUuid": {
"value": "<vehicle_id>"
}
},
"state": "STATE_PENDING_ACCEPTANCE",
"duration": {
"startsAt": {
"value": "1730205147000"
},
"endsAt": {
"value": "1730291547000"
}
},
"chargeDetails": {
"rentalFee": {
"frequency": "FREQUENCY_WEEKLY",
"fixed": {
"amountE5": "500000000",
"currencyCode": "USD"
}
},
"maxDebit": {
"frequency": "FREQUENCY_WEEKLY",
"fixed": {
"amountE5": "300000000",
"currencyCode": "USD"
}
}
},
"externalMetadata": {
"value": "example metadata"
},
"metadata": {
"createdAt": {
"value": "1730138204298"
},
"lastUpdatedAt": {
"value": "1730138213017"
},
"terminatedAt": {
"value": "1730138213017"
}
}
}
}
¶ Response Body Parameters
Name | Type | Description |
---|---|---|
terms |
object | Terms Object |
Rate limit
- The rate limit for this endpoint is 1 request per second.
¶ Endpoint Specific Errors
Http Status Code | Code | Message |
---|---|---|
400 |
bad_request | The request parameters are invalid, out-of-range, rate limited, code cancelled etc. |
401 |
unauthorized/permission denied | |
500 |
internal_server_error | Internal server error |
Note
- With a driver, a supplier can create only one term in accepted & pending acceptance state
- Terms can not be created in the past
- Terms can not be created more than 3 months in the future
- Terms created, needs to be accepted by the driver within next 24 hours from creation or start time of the terms (whichever is later)