[API] Terminate Terms
The Terminate Terms API is specifically designed for vehicle suppliers providing rental and financing services. It will allow them to terminate any terms within their organization.
¶ Use case
By using the Terminate Terms API, suppliers can easily terminate any active/pending terms on an ad-hoc basis. This capability is essential for suppliers to manage terms lifecycle as well as take care of cases such as incorrect rental fee, incorrect vehicle involved etc.
¶ 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/:terms_id/terminate
¶ HTTP Method
PATCH
¶ Authorization
¶ Example Request
curl -X PATCH "https://api.uber.com/v1/vehicle-supplier/terms/:terms_id/terminate" \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json"
¶ Request Path Parameters
Name | Type | Description |
---|---|---|
terms_id |
string | Terms ID returned from Create Terms response |
¶ 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_TERMINATED",
"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 |
¶ Terms
Name | Type | Description |
---|---|---|
termsUuid |
object | UUID object |
organization |
object | Organization object |
driver |
object | Driver object |
vehicle |
object | Vehicle object |
state |
enum | State object |
duration |
object | Duration object |
chargeDetails |
object | Charge Details object |
externalMetadata |
object | External metadata object |
metadata |
object | Metadata object |
¶ ORGANIZATION
NAME | TYPE | DESCRIPTION |
---|---|---|
orgUuid |
object | UUID object |
¶ VEHICLE
NAME | TYPE | DESCRIPTION |
---|---|---|
vehicleUuid |
object | UUID object |
¶ DRIVER
NAME | TYPE | DESCRIPTION |
---|---|---|
userUuid |
object | UUID Object |
contactType |
enum | Contact Type enum |
¶ CONTACT TYPE
NAME | DEFINITION |
---|---|
CONTACT_TYPE_PHONE |
Driver was contacted via phone number |
CONTACT_TYPE_EMAIL |
Driver was contacted via email |
¶ UUID
NAME | TYPE | DESCRIPTION |
---|---|---|
value |
string | Encrypted for vehicle, organization and driver. Unencrypted for terms ID. |
¶ STATE
NAME | DEFINITION |
---|---|
STATE_PENDING_ACCEPTANCE |
Terms is current waiting for driver’s acceptance |
STATE_ACCEPTED |
Terms is accepted by driver. Will become active once its duration starts. |
STATE_TERMINATED |
Terms is terminated and would not renew. Terms can still be credited/debited. |
STATE_ARCHIVED |
Terms is archived and can not be charged further. Terms can still be credited. |
¶ DURATION
NAME | TYPE | DESCRIPTION |
---|---|---|
startsAt |
object | Timestamp object. Start time of the terms. |
endsAt |
object | Timestamp object. End time of the terms. |
¶ CHARGE DETAILS
NAME | TYPE | DESCRIPTION |
---|---|---|
rentalFee |
object | Amount details object. Rental fee information for the terms. |
maxDebit |
object | Amount details object. Amount that can be charged extra apart from rental fee within a period. |
¶ AMOUNT DETAILS
NAME | TYPE | DESCRIPTION |
---|---|---|
frequency |
enum | Frequency enum |
fixed |
object | Amount object. Fixed implies that a static amount at a regular cadence based on frequency. |
¶ FREQUENCY
NAME | DEFINITION |
---|---|
FREQUENCY_WEEKLY |
Term renewal frequency / Max Debit lookup period |
¶ AMOUNT
NAME | TYPE | DESCRIPTION |
---|---|---|
amountE5 |
int | Amount in e5 format i.e. 1000000 represents 10 in the desired currency |
currencyCode |
string | 3 - letter Currency code e.g. USD, INR, CAD etc. |
¶ EXTERNAL METADATA
NAME | TYPE | DESCRIPTION |
---|---|---|
value |
string | Any string provided by supplier for their internal usage. Avoid longer lengths. |
¶ METADATA
NAME | TYPE | DESCRIPTION |
---|---|---|
createdAt |
object | Timestamp object. Time of terms creation. |
lastUpdatedAt |
object | Timestamp object. Time at which terms was last updated. |
terminatedAt |
object | Timestamp object. Time of terms termination. |
¶ TIMESTAMP
NAME | TYPE | DESCRIPTION |
---|---|---|
value |
int | Epoch timestamp in milliseconds |
¶ 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, rate limited, code cancelled etc. |
401 |
unauthorized/permission denied | |
500 |
internal_server_error | Internal server error |
Note
- Before using this endpoint, ensure correct terms is being terminated since it can not be reversed. And only solution would be to create a new terms.
- After termination, terms stay in STATE_TERMINATED for a grace period of 2 weeks for any settlements to be performed, post which the system automatically moves the terms to STATE_ARCHIVED.
Use case
Support for Hierarchical Data
Supported supplier types
Scopes
Resource
HTTP Method
Authorization
Example Request
Request Path Parameters
Example Response
Response Body Parameters
Terms
ORGANIZATION
VEHICLE
DRIVER
CONTACT TYPE
UUID
STATE
DURATION
CHARGE DETAILS
AMOUNT DETAILS
FREQUENCY
AMOUNT
EXTERNAL METADATA
METADATA
TIMESTAMP
Rate limit
Endpoint Specific Errors