API reference › Rates and billing › Provider rates
Update provider rate
PATCH /v1/settings/provider-rates/{provider_rate}
- Scope
settings_rates_billing:edit finance:edit- Roles
- admin, scheduler
Updates an existing provider rate with the specified details.
Parameters
Path parameters
| Name | Type | Description |
|---|---|---|
provider_rate required | string | Unique identifier of the provider rate to update Example |
Every call also sends Authorization and X-Tenant-ID; see Getting started.
Request body required
| Field | Type | Description |
|---|---|---|
unit | string | Example |
rate | number | Example |
minimumDuration | integer or null | Example |
Example
{
"unit": "hr",
"rate": 67,
"minimumDuration": 89
}Example request
curl -X PATCH "https://api.fetchfido.ai/v1/settings/provider-rates/{provider_rate}" \
-H "Authorization: Bearer $FIDO_API_KEY" \
-H "X-Tenant-ID: $FIDO_TENANT_ID" \
-H "Content-Type: application/json" \
-d '{"unit":"hr","rate":67,"minimumDuration":89}'Try it
Responses
200 Provider rate updated successfully
Provider rate updated successfully.
{
"success": true,
"message": "Provider rate has been saved successfully.",
"data": null
}Response fields (3)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
data | string or null |
401 Not signed in
Unauthorized - Authentication required
{
"success": false,
"message": "Invalid API key. Org and user tier keys must send an X-Tenant-ID header naming the organization the key was issued for.",
"errors": null,
"code": "API_KEY_MISSING"
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Machine-readable reason, for branching on in client code. One of: |
403 Not allowed
Forbidden. These mappings are Finances data, so a role without Finance Read is refused whatever it holds on Rates & Billing; with it, the Rates & Billing level the change needs decides.
{
"success": false,
"message": "You don't have permission to access this endpoint. This API key is missing the 'settings_rates_billing:edit' scope.",
"errors": null,
"code": ""
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Always empty on this status. Example |
422 Validation failed
Validation error. A unit other than Per Hour or Per Minute (for example weekly) is refused and nothing is saved. The message is under errors.unit.
{
"success": false,
"message": "Unable to save. Please check the highlighted fields.",
"errors": {
"unit": [
"The unit must be Per Hour or Per Minute (hr or min)."
]
}
}Response fields (3)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | array of object |
429 Too many requests
Rate limit exceeded. See Retry-After.
{
"success": false,
"message": "You've exceeded this API key's rate limit of 120 requests per minute. Try again in 37 seconds.",
"errors": null,
"code": "RATE_LIMITED"
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Machine-readable reason, for branching on in client code. One of: |
500 Server error
Internal server error
{
"success": false,
"message": "An unexpected error occurred. Please try again later."
}Response fields (2)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |