Lazarus ticketing API (pre-telefonica)

1. Authentication:

/api/v1/users/get-auth-token
curl --location --request POST 'https://telefonicainsights.lazarustech.dev/api/v1/users/get-auth-token' \
    --header 'Authorization: Basic base64-encoded-username:password'

Response

{
    "code": 200,
    "status": "success",
    "message": "authentication token generated successfully",
    "data": {
        "authToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUz....Rz8hiYeC5hOTUyvIiCprF54Q9FsLNO8JkU4"
    }
}

2. Tickets by policy code:

/api/v1/tickets/get-tickets-by-policy-code/[alphanumeric-policy-code]
curl --location 'https://telefonicainsights.lazarustech.dev/api/v1/tickets/get-tickets-by-policy-code/CP00003616AB' \
    --header 'Authorization: Bearer the-previous-auth-token-as-bearer'

Response

{
    "code": 200,
    "status": "success",
    "message": "tickets by policy code",
    "data": {
        "total": 33,
        "tickets": [
            {
                "id": 418809,
                "policy_code": "PC00003616AB",
                "type": "Siniestro_Ciberseguridad",
                "product_id": 14000009520,
                "product": "This project name in our system",
                "source_id": 1,
                "source": "email",
                "status_id": 5,
                "status": "closed",
                "subject": "Hola Rafael buenos días, Rafael estamos ...",
                "created_at": "2024-11-28T15:25:03Z",
                "updated_at": "2024-12-03T11:11:19Z"
            },
            ..,
            {}
        ]
    }
}

3. Ticket by ticket number:

All attachments are available for download for 5 minutes.

/api/v1/tickets/get-ticket-by-ticket-number/[alphanumeric-ticket-number]
curl --location 'https://telefonicainsights.lazarustech.dev/api/v1/tickets/get-ticket-by-ticket-number/37639400' \
    --header 'Authorization: Bearer the-previous-auth-token-as-bearer'

Response

{
    "code": 200,
    "status": "success",
    "message": "ticket by ticket number",
    "data": {
        "ticket_id": 37639400,
        "policy_code": "CP00003616AB",
        "type": "Siniestro_Ciberseguridad",
        "product_id": 1400000952,
        "product": "This project name in our system",
        "platform_user_id": 135,
        "requester_id": 14066523799,
        "requester": "Peter Lopez ",
        "responder_id": 14049726835,
        "responder": "Rafael R. ",
        "source_id": 1,
        "source": "email",
        "status_id": 5,
        "status": "closed",
        "subject": "Descarga del VHD",
        "description": "Hola Rafael buenos días, Rafael estamos volviendo ...",
        "created_at": "2024-11-28T15:25:03Z",
        "updated_at": "2024-12-03T11:11:19Z",

        "time_entries": [
            {
                "time_entry_id": 14009802540,
                "support_by_id": 14004936463,
                "support_by": "Jeferson Gomes Pereira",
                "reason": "Análisis de amenaza y envio de email",
                "time_in_seconds": 1800,
                "executed_at": "2024-11-15T00:00:00Z"
            },
            ..,
            {}
        ],

        "conversations": [
            {
                "conversation_id": 14257347598,
                "support_by_id": 14067664425,
                "support_by": "Luis Salcedo Delgado",
                "support_email": "direccion.administrativa@aaa.bb.cc, Alan Gomes Perales ",
                "content": "Buen dia Estamos revisando Le agradezco cuando detecten algo inusual, me llamen,\r\n\r\nEnviaron a las 11:30 y hasta este ..",
                "created_at": "2024-11-15T21:44:28Z",
                "updated_at": "2024-11-15T21:44:28Z",
                "attachments": [
                    {
                        "id": 14152310472,
                        "content_type": "application/pdf",
                        "size": 76190,
                        "name": "document-name-een.pdf",
                        "attachment_url": "https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/14152310472/original/document-name-een.1.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AAABBBCCCDDD%2F20250127%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250127T121503Z&X-Amz-Expires=300&X-Amz-SignedHeaders=host&X-Amz-Signature=444555666",
                        "created_at": "2024-12-20T16:45:37Z",
                        "updated_at": "2024-12-20T16:45:40Z"
                    },
                    ..,
                    {
                        "id": 14152918908,
                        "content_type": "application/pdf",
                        "size": 906568,
                        "name": "document-twee.pdf",
                        "attachment_url": "https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/14152918908/original/document-twee.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AAABBBCCCDDD%2F20250127%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250127T121503Z&X-Amz-Expires=300&X-Amz-SignedHeaders=host&X-Amz-Signature=111222333",
                        "created_at": "2025-01-08T11:03:42Z",
                        "updated_at": "2025-01-08T11:07:07Z"
                    }
                ]
            },
            ..,
            {}
        ]
    }
}