Este endpoint obtiene el listado de contactos de su empresa en CMMShere
HTTP Request
GET https://admin.cmmshere.com/api/v1/contacts
Parámetros de consulta
Estos parametros son opcionales y utilizados para filtrar e interactuar con la información obtenida. Los parámetros de filtrado (si se utilizan) se usan para buscar resultados que contengan dicho texto.
Parámetro | Tipo | Default | Descripción |
---|---|---|---|
nombre | String | No definido | Si se utiliza, el resultado solo incluirá contactos que contengan ese nombre |
cargo | String | No definido | Si se utiliza, el resultado solo incluirá contactos que contengan ese cargo |
String | No definido | Si se utiliza, el resultado solo incluirá contactos que contengan ese email | |
cliente_id | Int | No definido | Si se utiliza, el resultado solo incluirá contactos de ese cliente especifico (basado en su ID) API relacionada |
offset | Int | No definido | Offset para paginación |
limit | Int | No definido | Limite para paginación |
orderBy | Array | ["created_at", "desc"] | Ordenamiento. El primer valor es el campo y el segundo la direccion ASC o DESC |
Ejemplo de petición
curl --location --request GET 'https://admin.cmmshere.com/api/v1/contacts' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 804|fCkDcz43egLAubMzPinRCIVUIjPUsGkvbVJ864IP' \
--header 'Cookie: XSRF-TOKEN=eyJpdiI6ImwzTUd1dTJiNlROM1VlL1Y0akYyWVE9PSIsInZhbHVlIjoiNFNUdFBvTWtyNXlDTXZZUmJtM0hBTkplNnlWcmM5MTI5VVA5SnVVQ09kTUJIQkRtMll3eHZ0WXNrUFp6NllsSXdMQjd5Tk8veUI0MlVaa0c3eEFVa0RHMTNkenkxdWhOOTRKRVoraE9oQnZiTVY2VUpkNmd1RzZtTFpWbmM5V28iLCJtYWMiOiJjYjVhOGM4YTg0OWVmOWI2ZmVjNTdkZDE1ZjgyMTc0NTE4ZTM0ZGU5YjhiNGY1ZGRlZTJkYTg1MmRjNGVlZDY2In0%3D; laravel_session=eyJpdiI6IklKRHVhUHo4SXNUV2JlMEN2SzJ0THc9PSIsInZhbHVlIjoiK2M4RWMrMWZwVWxuWXBBay9tWkhlS2pLUTRrWXFKUS80eXYwWlBpUWlVVUdZenloQnF1b210dk1xd3lwcjNLbDNWc0xJdkNHVGRKbmtLdmFLbGN6Snh6UkpTRjhjSXN5SEtqOGwwTGlZdXNwWnRZcmVvU1pjTmVMM291RXo1R3IiLCJtYWMiOiIxMTEzZmYxMTQzNjllNDNiMmRjOWRkOWE3ZGFlOWVlMGVmYTE2ODZhY2JiNWMxY2NkYmI2MTUxYmJhNDUxN2ZlIn0%3D' \
--data '{
"offset" : 0,
"limit" : 10,
"orderBy" : ["id", "desc"]
}'
La petición de arriba devuelve un JSON estructurado de la siguiente manera
{
"success": true,
"code": 200,
"results": [
{
"id": 1021,
"name": "Francis Wisozk",
"position": "Operador de planta",
"division": null,
"phone": "847.950.1219",
"cell_phone": "1-586-393-1298",
"email": "[email protected]",
"obs": null,
"creator_id": 30,
"city": "Oruro",
"status": "1",
"client_id": 2383,
"created_at": "2023-04-03T14:24:10.000000Z"
},
{
"id": 1019,
"name": "Evelyn Bayer",
"position": "Jefe de Mantenimiento",
"division": null,
"phone": "+13809866062",
"cell_phone": "1-908-388-6387",
"email": "[email protected]",
"obs": null,
"creator_id": 61,
"city": "La Paz",
"status": "1",
"client_id": 2381,
"created_at": "2023-03-31T16:58:20.000000Z"
},
{
"id": 984,
"name": "Annamae Schmidt",
"position": "Personal de Contacto",
"division": null,
"phone": "+1 (920) 410-1856",
"cell_phone": "1-501-809-8316",
"email": "[email protected]",
"obs": null,
"creator_id": 30,
"city": "La Paz",
"status": "1",
"client_id": 2341,
"created_at": "2023-02-22T17:22:37.000000Z"
},
{
"id": 970,
"name": "Zita Lehner",
"position": "Administración",
"division": null,
"phone": "641.946.9087",
"cell_phone": "838.657.3612",
"email": "[email protected]",
"obs": null,
"creator_id": 61,
"city": "La Paz",
"status": "1",
"client_id": 2327,
"created_at": "2023-02-10T20:38:27.000000Z"
},
{
"id": 966,
"name": "Maribel Dibbert",
"position": "Gerente Propietario",
"division": "Sucre",
"phone": "+1.501.587.9015",
"cell_phone": "410-645-1493",
"email": "[email protected]",
"obs": null,
"creator_id": 58,
"city": "sucre",
"status": "1",
"client_id": 2323,
"created_at": "2023-02-04T16:16:30.000000Z"
},
{
"id": 962,
"name": "Bradly Grimes",
"position": "Gerente General",
"division": "Sucre",
"phone": "(734) 964-2889",
"cell_phone": "(512) 538-1324",
"email": "[email protected]",
"obs": null,
"creator_id": 58,
"city": "Sucre",
"status": "1",
"client_id": 2319,
"created_at": "2023-02-01T17:12:41.000000Z"
},
{
"id": 945,
"name": "Corrine Hintz",
"position": "Encargado de TI",
"division": null,
"phone": "+16503166250",
"cell_phone": "+1.253.507.7613",
"email": "[email protected]",
"obs": null,
"creator_id": 64,
"city": "Santa Cruz",
"status": "1",
"client_id": 2302,
"created_at": "2023-01-20T20:28:43.000000Z"
},
{
"id": 943,
"name": "Arnold Crist",
"position": "Coordinador",
"division": null,
"phone": "1-820-810-9944",
"cell_phone": "930.325.8225",
"email": "[email protected]",
"obs": null,
"creator_id": 30,
"city": "La Paz",
"status": "1",
"client_id": 2300,
"created_at": "2023-01-20T19:45:19.000000Z"
},
{
"id": 931,
"name": "Alexie Veum",
"position": "ADMINISTRADOR",
"division": null,
"phone": "228.868.0885",
"cell_phone": "+1 (351) 876-4299",
"email": "[email protected]",
"obs": null,
"creator_id": 42,
"city": "SANTA CRUZ",
"status": "1",
"client_id": 2288,
"created_at": "2023-01-11T20:23:16.000000Z"
},
{
"id": 923,
"name": "Marc Schinner",
"position": "Gerente General",
"division": "La Paz",
"phone": "+14756421248",
"cell_phone": "+1-660-576-2753",
"email": "[email protected]",
"obs": null,
"creator_id": 58,
"city": "La Paz",
"status": "1",
"client_id": 2280,
"created_at": "2022-12-30T14:15:44.000000Z"
}
]
}