Lista obustronnej relacji Klient <-> Ekspert

Endpointy obsługujące żądanie:

  • https://api.5ways.com - Ekspert
  • https://api.client.5ways.com - Klient

API klienta

Uprawnienia:

  • Klient - GET

Lista ekspertów, z którymi klient się kontaktował

GET /rest/customer_user_link

Zwraca listę ekspertów wraz z nazwą firmy

Zwracane dane
// HTTP/1.1 200 OK
{
    "results": [
        {
            "CustomerUserLink": {
                "id": "9",
                "customer_id": "137"
            },
            "CustomerCompany": {
                "name": "gggg"
            }
        },
        // ...
    ]
}

API eksperta

Uprawnienia:

  • Administrator - GET

Lista klientów, z którzy kontaktowali się z ekspertem

GET /rest/customer_user_link/client

Zasób client jest dołączany do customer_user_link i zwraca listę klientów wraz ze szczegółami. Użycie samego customer_user_link nie jest możliwe.

Zwracane dane
// HTTP/1.1 200 OK
{
    "results": [
        {
            "CustomerUserLink": {
                "id": "9",
                "customer_id": "137",
                "user_client_id": "1920",
                "created": "2024-02-14 12:40:11",
                "modified": "2024-02-14 12:40:11"
            },
            "Client": {
                "id": "1920",
                "email": "andrzej.trochym+l2142c1@wfirma.pl",
                "firstname": "Irena",
                "lastname": "Dud",
                "phone": "111 222 333"
            }
        },
        // ...
    ]
}