Clients, Leads and Contacts / Lead Status / Get Lead's Statuses types
Purpose Retrieve the list of lead statuses available for the client, with sorting options. Method and URL - Method: GET - URL: https://api.nizu.io/v2/ Headers and Authentication - Authorizat
Body parameters
module
|
string |
Example: lead_status
|
data
|
object |
Example:
|
Purpose
Retrieve the list of lead statuses available for the client, with sorting options.
Method and URL
- Method: GET
- URL: https://api.nizu.io/v2/
Headers and Authentication
- Authorization: Bearer GET ONE IN YOUR DEVELOPER DASHBOARD (recommended)
- Content-Type: application/json (if a body is sent by the backend for this endpoint)
Notes:
- This endpoint is configured in Postman to inherit environment variables. Ensure {{client_token}} is a valid access token in the active environment.
Request Body
Although the method is GET, this request in Postman is configured with a raw JSON body to pass sorting preferences used by the backend. Confirm your API supports bodies in GET requests before using this pattern.
Schema (JSON):
{
"module": string, // The target module; for this endpoint use "lead_status".
"data": {
"sort": string // Sort expression, e.g., "id ASC" or "id DESC".
}
}
Current Example Body
{
"module": "lead_status",
"data": { "sort": "id ASC" }
}
Example Request
GET {{base_url2}}
Authorization: Bearer {{client_token}}
Content-Type: application/json
Body (raw JSON):
{
"module": "lead_status",
"data": { "sort": "id ASC" }
}
Successful Response Example (200)
Based on the last received response:
``` json
{
"success": true,
"data": {
"content": [
{"id":"1","title":"Customer","color":"#7cb342","sort":"14","deleted":"0"},
{"id":"2","title":"Pilot, nothing verified","color":"#757575","sort":"1","deleted":"0"},
{"id":"11","title":"Facebook verified","color":"#4267b2","sort":"7","deleted":"0"},
{"id":"14","title":"Printed","color":"#fbdd11","sort":"11","deleted":"0"},
{"id":"15","title":"Onboarded","color":"#fbdd11","sort":"8","deleted":"0"},
{"id":"16","title":"Business info filled in","color":"#757575","sort":"3","deleted":"0"},
{"id":"21","title":"Live in Pilot","color":"#757575","sort":"12","deleted":"0"},
{"id":"22","title":"Demo done","color":"#ffbc00","sort":"13","deleted":"0"},
{"id":"23","title":"Contacted","color":"#28B8DA","sort":"9","deleted":"0"}
],
"total": 9
}
}
```
Potential Error Cases
- 400 Bad Request: Invalid module value or malformed JSON body.
- 401 Unauthorized: Missing or invalid {{client_token}}.
- 403 Forbidden: Token lacks permission to access lead statuses.
- 404 Not Found: {{base_url2}} is incorrect or resource is unavailable.
- 429 Too Many Requests: Rate-limited; retry after the time indicated in headers.
- 5xx Server Errors: Temporary server issue; try again later.
Variable Notes
- https://api.nizu.io/v2/ Base URL for this endpoint. Set in the active environment (Development Client SaaS v2). Example: [https://api.example.com/lead-status](https://api.example.com/lead-status).
- {{client_token}}: Bearer token used for Authorization header. Ensure it is current and not expired.
Additional Notes
- Responses return string values for numeric-like fields (e.g., id, sort, deleted). Cast to numbers in your client if needed.
- If your API strictly follows HTTP semantics, consider using POST for filtered/sorted queries instead of sending a body with GET.