Update Client Preferences
Update the preferences details associated with a specific client.
This endpoint modifies a specified client's detailed preferences, allowing you to either replace existing preferences or add new values based on the field types.
Example Request:
curl "https://<your-agency>.smartmatchapp.com/api3/clients/<client_id>/preferences/" \
-u <token>: \
-X PUT \
-F pref_1_start=10 \
-F pref_1_end=20 \
-F pref_1_deal_breaker=true \
-F pref_1_field_weight=3 \
-F pref_2='Short text' \
-F pref_2_field_weight=2 \
-F pref_3_country='UA' \
Form Fields:
pref_X_start: (Optional) The start value for connected fields such as Integer Number, Fractional Number, Date, Time, Birthday (Age), Height (cm), Height (ft & in), and Weight (International). The field name schema follows pref_X_start where X is the preference identifier.
pref_X_end: (Optional) The end value for connected fields. The field name schema follows pref_X_end.
pref_X: (Optional) The value for plain fields.
pref_X_country, pref_X_city, pref_X_state, pref_X_zip_code, etc.: (Optional) Fields for updating Location type preferences. The field name schema follows pref_X_fieldname where fieldname corresponds to the specific location detail.
pref_X_deal_breaker: (Optional) Boolean value (true or false) to mark this preference as a deal breaker. When set to true, this preference becomes a critical matching criterion.
pref_X_field_weight: (Optional) Integer value to set the importance weight of this preference field. Accepted values: 1 (Low), 2 (Medium), 3 (High). Default is 2 (Medium).
Example Success Response:
HTTP 204 No Content
Usage Examples:
Replace Existing Preferences:
curl "https://<your-agency>.smartmatchapp.com/api3/clients/<client_id>/preferences/" \
-u <token>: \
-X PUT \
-F pref_1_start=10 \
-F pref_1_end=20 \
-F pref_1_deal_breaker=true \
-F pref_1_field_weight=3 \
-F pref_2='New short text' \
-F pref_2_field_weight=1 \
This updates the values of pref_1 and pref_2 with the newly provided data, and sets pref_1 as a deal breaker with high importance weight, while pref_2 gets low importance weight.
Field Type Handling:
Connected Fields: For fields like Integer Number, Fractional Number, Date, Time, Birthday (Age), Height, and Weight, you must provide start and/or end values using the pref_X_start and pref_X_end schema.
Location Fields: Provide specific location details using keys like pref_X_country, pref_X_city, etc.
Plain Fields: Directly provide values for fields.
Deal Breaker: Set pref_X_deal_breaker=true to mark a preference as a critical matching requirement. When a deal breaker preference doesn't match, the match score will be significantly affected.
Field Weight: Use pref_X_field_weight to set the importance level: 1 for Low priority, 2 for Medium priority (default), or 3 for High priority. Higher weight fields have more impact on match percentage calculations.
Base Request:
Method: PUT
Authentication: Basic Authentication. Requires a valid <token> passed.
Rate Limits:
10 requests within 10 seconds
Error Responses:
| 400 | Bad Request |
This error occurs if the provided data is invalid or required fields are
missing. |
| 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 with the specified ID does not exist. |
| 405 | Method Not Allowed |
This error occurs if an HTTP method other than PUT is used (e.g.,
POST or GET). |
| 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" |
Available Fields:
The field ids, labels, types, and available values below are generic samples. Every agency defines its own custom fields, so your agency's own live list appears in its private copy of these API docs.
| Title | Name | Type | |
|---|---|---|---|
| Age | pref_1 | Range | |
| Country | pref_2 | Select |
Show Values
|