PATCH Tariffs
Use this endpoint to update existing tariffs.
User level: Advanced
Endpoint
PATCH /v1/{scopeId}/tariffs/{id}| Property | Value |
|---|---|
| Method | PATCH |
| Scope ID | Branch UUID |
| Authentication | Authorization: Bearer <access_token> |
| Required scope | routix:tariffs:write |
| Content-Type | application/json |
| Request body | JSON object |
Update rules
- The API validates server-side whether the record belongs to the allowed organization and branch.
- This is a branch-or-null resource, but the PATCH call still uses a branch UUID in
{scopeId}. - Only explicitly allowed fields can be updated.
- Unknown or disallowed fields return
400 invalid_update.
Allowed update fields
| Field |
|---|
type |
item_id |
zone_id |
description |
price |
Example request
curl -X PATCH "https://api.routix.com/v1/550e8400-e29b-41d4-a716-446655440000/tariffs/fe4e56ae-1d6a-46d2-a416-4b5b0fc546b7" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
-H "Content-Type: application/json" \
-d '{
"description": "Flat rate within Zone A",
"price": 125
}'Example response
{
"data": {
"id": "fe4e56ae-1d6a-46d2-a416-4b5b0fc546b7",
"type": "flat_rate",
"item_id": "d021bce1-a12b-462f-9d77-9fe0c2b55959",
"zone_id": "3c312fd9-975e-43d8-a661-75d5649b1d8d",
"description": "Flat rate within Zone A",
"price": 125
},
"version": "v1"
}Error response
{
"error": "invalid_update",
"error_description": "One or more fields are not allowed for updates on tariffs"
}Possible error codes
400 invalid_request400 invalid_update401 unauthorized401 invalid_token403 invalid_token_type403 insufficient_scope404 not_found405 method_not_allowed
Related pages
- Tariffs GET
- API calls & examples
- Setup guide
Last updated on

