Update Provider
PATCH
/api/v1/lead_providers/{id}/Update an existing provider's details, or disable it temporarily
(status: "inactive" — a soft-disable).
Auth: Admin JWT + IsAdminOnlyPosition.
:::tip PATCH — partial update
The frontend uses PATCH (partial update) — send only the fields you want to change.
All fields are optional. (The source HTML says PUT / PATCH, but PATCH is
recommended for partial updates.)
:::
Path parameter
| Parameter | Type | Description |
|---|---|---|
id | Integer | Provider ID |
Body fields
Same as Create Provider, but all optional:
| Field | Type | Description |
|---|---|---|
name | String | Provider name |
email | String (email) | Contact email |
status | String enum | active / inactive |
is_exclusive | Boolean | Exclusivity |
assigned_user | Integer (ID) | Responsible staff ID (integer on write) |
price_per_lead | String (decimal) | Price per lead (">= 0") |
Request sample
Change only the status (soft-disable):
{
"status": "inactive"
}
Code samples
- curl
- JavaScript
- Python
curl -X PATCH https://api.navigo.example/api/v1/lead_providers/1/ \
-H "Authorization: Bearer $NAVIGO_ADMIN_JWT" \
-H "Content-Type: application/json" \
-d '{"status": "inactive"}'
const res = await fetch("https://api.navigo.example/api/v1/lead_providers/1/", {
method: "PATCH",
headers: {
"Authorization": `Bearer ${process.env.NAVIGO_ADMIN_JWT}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ status: "inactive" }),
});
const updated = await res.json();
import os, requests
resp = requests.patch(
"https://api.navigo.example/api/v1/lead_providers/1/",
headers={"Authorization": f"Bearer {os.environ['NAVIGO_ADMIN_JWT']}"},
json={"status": "inactive"},
timeout=15,
)
resp.raise_for_status()
updated = resp.json()
Possible errors
| Status | Reason |
|---|---|
400 | Validation error |
404 | No provider with this id |
401 | JWT is invalid |
403 | No admin position |
Full format: Errors.