Retrieve Client Matches

Retrieve a list of matches associated with a specific client, optionally filtered by group and paginated.

This endpoint retrieves a list of matches associated with a specific client. You can filter the matches by group or paginate through the results using the count and offset parameters.

Example Requests:

Retrieve all matches for a client:

curl "https://<your-agency>.smartmatchapp.com/api3/clients/<client_id>/matches/" \
    -u <token>: \
    -X GET

Retrieve matches within a specific group:

curl "https://<your-agency>.smartmatchapp.com/api3/clients/<client_id>/matches/?group_id=1" \
    -u <token>: \
    -X GET

Retrieve matches with pagination (e.g., 50 matches, starting from the 10th):

curl "https://<your-agency>.smartmatchapp.com/api3/clients/<client_id>/matches/?count=50&offset=10" \
    -u <token>: \
    -X GET
Request Parameters:

group_id: (Optional) The ID of the group to filter matches by. If not provided, all matches will be returned.

count: (Optional) The number of results to display in the response. The default is 20.

offset: (Optional) The offset from the beginning of the list. This allows you to paginate through the results.

Example Success Response:
{
    "objects": [
        {
            "id": 101,
            "created_date": "2024-01-01T12:00:00Z",
            "user": {
                "id": 1,
                "first_name": "John"
            },
            "client_priority": null,
            "match_priority": null,
            "client_due_date": "2024-02-01",
            "match_due_date": null,
            "group": {
                "id": 5,
                "name": "Group 2"
            },
            "status": {
                "id": 1,
                "name": "In Progress"
            },
            "client_status": {},
            "match_status": {},
            "client": {
                "id": 1
            },
            "match": {
                "id": 301
            }
        },
        {
            "id": 102,
            "created_date": "2024-01-02T12:00:00Z",
            "user": {
                "id": 2,
                "first_name": "Jane"
            },
            "client_priority": null,
            "match_priority": null,
            "client_due_date": null,
            "match_due_date": "2024-02-02",
            "group": {
                "id": 1,
                "name": "Group 1"
            },
            "status": {
                "id": 2,
                "name": "Completed"
            },
            "client_status": {},
            "match_status": {},
            "client": {
                "id": 202
            },
            "match": {
                "id": 1
            }
        }
    ],
    "count": 20,
    "offset": 0,
    "total_count": 34
}
Base Request:

Method: GET

Authentication: Basic Authentication. Requires a valid <token> passed.

Rate Limits:

5 requests within 10 seconds

Error Responses:
401 Unauthorized

This error occurs when the <token> is missing, invalid, or the API access is disabled.

Possible errors: "not authenticated" or "token is disabled" or "Agency API is disabled"

404 Not Found

This error occurs if the client or the specified match with the ID does not exist.
Possible errors: "object does not exist"

405 Method Not Allowed

This error occurs if an HTTP method other than GET is used (e.g., POST or PUT).
Possible errors: "wrong method"

429 Too Many Requests

This error occurs when the client has sent too many requests in a given amount of time, leading to rate limiting by the server.

Possible errors: "too many requests"

500 Server Error

Possible errors: "Internal server error"