Create a New Client Match
Create a new match between the specified client and another client.
This endpoint creates a new match object between two clients, with options to set priorities, due dates, group, and status.
Example Request:
curl "https://<your-agency>.smartmatchapp.com/api3/clients/<client_id>/matches/" \
-u <token>: \
-X POST \
-F match=555 \
-F group=2 \
-F client_priority=7 \
-F match_priority=5 \
-F client_due_date="2024-05-01" \
-F match_due_date="2024-06-01" \
-F status=1 \
-F client_status=2 \
-F match_status=3
Form Fields:
match: The ID of the second client for the match. This field is required. This cannot be the same as the current client (client ID 1 in this example). If a match with this client already exists, an error will occur.
group: The group ID this match is associated with. This field is required.
client_priority: (Optional) Priority level for the client in this match.
match_priority: (Optional) Priority level for the match client.
client_due_date: (Optional) Due date for the client in this match.
match_due_date: (Optional) Due date for the match client.
status: (Optional) The status ID for this match.
client_status: (Optional) The status ID for the client in this match.
match_status: (Optional) The status ID for the match client.
Example Success Response:
{
"id": 477
}
Rate Limits:
5 requests within 10 seconds
Error Responses:
| 400 | Bad Request |
If the match ID is the same as the current client ID, error response will be "You can`t match one client" |
| 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 client with the ID does not exist. |
| 405 | Method Not Allowed |
This error occurs if an HTTP method other than POST is used (e.g., GET or PUT). |
| 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" |