Retrieve Client Preferences

Retrieve the preferences details associated with a specific client.

This endpoint retrieves the detailed preferences of a specified client. The preferences are organized into labeled groups, with each group containing various fields. The value of each field depends on its type, and some fields may be connected to profile fields, affecting the structure of the data returned.

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

<client_id>: The ID of the client whose preferences you wish to retrieve. This field is required and must correspond to an existing client.

Example Success Response:
[
    {
        "group_name": "General Preferences",
        "group_id": 1,
        "fields": {
            "pref_106": {
                "label": "Project Description",
                "type": "Long Text",
                "deal_breaker": false,
                "weight": "Low",
                "value": "Detailed project description goes here."
            },
            "pref_237": {
                "label": "Available Time",
                "type": "Time",
                "deal_breaker": false,
                "weight": "Medium",
                "value": {
                    "start": "09:00:00",
                    "end": "17:00:00"
                }
            },
            "pref_235": {
                "label": "Event Dates",
                "type": "Date",
                "deal_breaker": false,
                "weight": "High",
                "value": {
                    "start": "2023-05-01",
                    "end": "2023-05-10"
                }
            },
            "pref_241": {
                "label": "Meeting Time",
                "type": "Time",
                "deal_breaker": true,
                "weight": "High",
                "value": {
                    "start": "10:00:00",
                    "end": "11:00:00"
                }
            },
            "pref_255": {
                "label": "Smoker?",
                "type": "Yes/No",
                "deal_breaker": false,
                "weight": "Low",
                "value": false
            },
            "pref_489": {
                "label": "Height Range",
                "type": "Height (cm)",
                "deal_breaker": false,
                "weight": "Medium",
                "value": {
                    "start": 160,
                    "end": 190
                }
            },
            "pref_267": {
                "label": "Preferred Condition",
                "type": "Select",
                "deal_breaker": true,
                "weight": "High",
                "value": {
                    "choice": 1,
                    "label": "New"
                }
            },
            "pref_800": {
                "label": "Doctor Ratings",
                "type": "Integer Number",
                "deal_breaker": false,
                "weight": "Low",
                "value": {
                    "start": 3,
                    "end": 5
                }
            },
            "pref_121": {
                "label": "Expected Revenue",
                "type": "Fractional Number",
                "deal_breaker": false,
                "weight": "Low",
                "value": {
                    "start": 50000.0,
                    "end": 200000.0
                }
            },
            "pref_900": {
                "label": "Profile Picture",
                "type": "Image",
                "deal_breaker": false,
                "weight": "Medium",
                "value": {
                    "name": "profile.jpg",
                    "url": "https://example.com/images/profile.jpg"
                }
            },
            "pref_901": {
                "label": "Preferred Contact",
                "type": "PhoneNumber",
                "deal_breaker": false,
                "weight": "Medium",
                "value": "+1-800-555-0123"
            },
            "pref_902": {
                "label": "Favorite Website",
                "type": "Web Link",
                "deal_breaker": false,
                "weight": "Medium",
                "value": "https://example.com"
            },
            "pref_903": {
                "label": "Resume",
                "type": "File",
                "deal_breaker": false,
                "weight": "Medium",
                "value": {
                    "name": "resume.pdf",
                    "url": "https://example.com/files/resume.pdf"
                }
            }
        }
    }
]
Field Type to Value Mapping:

The value returned for each field is dependent on its type:

Long Text, Short Text: A string containing the text value.

Integer Number, Fractional Number, Date, Time, Birthday (Age), Height (cm - ft & in), Height (ft & in), Weight (International):

- Plain fields: A single value (e.g., an integer, float, date string).

- Connected fields: A dictionary with start and end keys.

- For Birthday (Age), plain fields return a date, while connected fields return age range as integers.

- Choices for types Height (cm - ft & in), Height (ft & in), Weight (International) are same as for "Client Profile" endpoints.

Yes/No: A boolean value (true or false).

MultiSelect: A list of dictionaries, each containing a choice ID and a label.

Select: A dictionary with choice and label keys.

Location: A dictionary containing location details, such as country, city, state, zip_code, etc. Country choices are same as for "Client Profile" endpoints.

Web Link: A URL string.

File, Image: A dictionary with name and url keys.

PhoneNumber: A string representing a phone number.

Base Request:

Method: GET

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

Rate Limits:

30 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 with the specified ID does not exist.
Possible errors: "client not found"

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 Deal Breaker Field Weight
Example Group (ID: 1)
Age pref_1 Range True Normal
Country pref_2 Select False Normal
Show Values
  • 1: Example value A
  • 2: Example value B