[API] Update Contract
The Update Contract API lowers the retention amount of an active contract.
¶ Use case
Reduce how much Uber retains from the borrower in each period, for example after you agree a lower repayment rate with the borrower.
¶ Supported supplier types
Financiers
¶ Scopes
vehicle_suppliers.financing.contracts
¶ Required permissions
The user that the access token represents needs supplier.contracts.write on the contract’s lender organization. See Access.
¶ Resource
/v1/vehicle-supplier/financing/contracts/update
¶ HTTP method
PATCH
¶ Authorization
¶ Example request
curl -X PATCH "https://api.uber.com/v1/vehicle-supplier/financing/contracts/update" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <TOKEN>" \
-d '{
"contractId": {
"value": "<contract_id>"
},
"retentionAmount": {
"percentRate": 8
}
}'
This example lowers the retention rate from 10% to 8% and leaves maxCadenceCap as it is.
¶ Request body parameters
| Name | Type | Required | Description |
|---|---|---|---|
contractId |
object | Yes | UUID object. The contract to update. |
retentionAmount |
object | Yes | Retention amount object. The new values. Set percentRate, maxCadenceCap, or both. |
Update rules:
- The contract must be in
CONTRACT_STATE_ACTIVE. - Each value you send must be lower than the current value. You can’t raise a value.
- You can only change values the contract already has. For example, you can’t add
maxCadenceCapto a contract created with onlypercentRate. maxCadenceCapmust stay in the same currency.- Values you leave out don’t change.
¶ Example response
200 OK
{
"contractId": {
"value": "<contract_id>"
}
}
¶ Response body parameters
| Name | Type | Description |
|---|---|---|
contractId |
object | UUID object. The updated contract’s ID. |
¶ Rate limit
1 request per hour for each developer application.
¶ Endpoint-specific errors
| HTTP status | Code | Cause |
|---|---|---|
400 |
invalid-argument |
retentionAmount is missing or sets neither value, a value is out of range, the contract isn’t active, a value isn’t lower than the current one, the contract doesn’t have the value you sent, or maxCadenceCap is in a different currency. |
400 |
not-found |
No contract has this ID. |
401 |
permission-denied |
See Access. |
500 |
internal-server-error |
Retry with exponential backoff. |
¶ Notes
Uber applies the new amount after responding. Once it takes effect, Get Contract returns the new values in retentionConfig.retentionAmount and a higher version.