Personality
A model that appends attribute values to the twin that can be used to visualize defined characteristics / unique preferences of the user.
List Details of Your Personality
Add or Update an attribute to the Personality
To Delete or Remove an attribute
§Available Tags
There are two core attributes to each personality: 1) Services 2) characteristics
Each attribute contains a category, and a corresponding tag value.
Services
Services is reserved for twins offering a service. It allows twins to search for a particular service provider and they are matched on one of the available tags. The initial tags available are:
- Food
- Drinks
- Coffee
- Alcohol
- Live-music
- Parking
Characteristics
The characteristics attributes allows 3 current categories:
- Dietary
- Monetary
- Lifestyle
This allows matchmaking based on the tags in each of these categories. The available tags are as follows:
Dietary
- Vegan
- Gluten-free
- Vegetarian
- Omnivore
- Health-conscious
- Carnivore
- Alcohol-free
Lifestyles
- Adventurer
- Explorer
- Foodie
- Dog-friendly
- Family-orientated
- Traveller
Monetary
- $
- $$
- $$$
- $$$$
§List all public personalities
To list all the publicly viewable personalities of any twin’s that have set their personality to public,, you can do a GET request to the following endpoint.
curl --location --request GET '<API_URL>/personalities/' \
--header 'Content-Type: application/vnd.api+json' \
--header 'X-Organization: <ORG_ID>' \
--header 'X-Twin: <TWIN_ID>' \
--header 'Authorization: Token <ACCESS_TOKEN>'
An example response will look like the following:
{
'id': '<PERSONALITY_ID>',
'created': '2022-06-29T17:04:09.053064Z',
'modified': '2022-06-29T17:04:09.082665Z',
'attributes': {
characteristics: '';
}
}
§List details of your personality
To list all the personality values of your twin, a list of tags assigned to your twin, you can do a GET request to the following endpoint.
curl --location --request GET '<API_URL>/my/personalities/' \
--header 'Content-Type: application/vnd.api+json' \
--header 'X-Organization: <ORG_ID>' \
--header 'X-Twin: <TWIN_ID>' \
--header 'Authorization: Token <ACCESS_TOKEN>' \
Add or Update a Characteristics attribute tag to the personality
To add or update an attribute or value on the personality, you can send a POST request with the requested tags included in the URL.
curl --location --request POST '<API_URL>/my/personalities/add_characteristic/?tags=vegan,vegetarian' \
--header 'Content-Type: application/vnd.api+json' \
--header 'X-Organization: <ORG_ID>' \
--header 'X-Twin: <TWIN_ID>' \
--header 'Authorization: Token <ACCESS_TOKEN>'
In the above example, we've added the tags vegan and vegetarian to the twin's personality. This example would return the following response:
{
"data": {
"type": "personalities",
"id": "<PERSONALITY_ID>",
"attributes": {
"created": "2022-07-26T16:41:29.047589Z",
"modified": "2022-07-27T16:58:48.811241Z",
"public": false,
"private": true,
"attributes": {},
"characteristics": [
{
"tag": "Vegan",
"category": "Dietary",
"value": {}
},
{
"tag": "Vegetarian",
"category": "Dietary",
"value": {}
},
],
"services": []
},
"relationships": {
"twin": {
"data": {
"type": "twins",
"id": "<TWIN_ID>"
}
}
}
}
}
Add or Update a Service attribute tag to the personality
Similar to adding a characteristics attribute, to add or update a service attribute tag or value on the personality, you can send a POST request with the requested tags included in the URL.
curl --location --request POST '<API_URL>/my/personalities/add_service/?tags=food,drinks' \
--header 'Content-Type: application/vnd.api+json' \
--header 'X-Organization: <ORG_ID>' \
--header 'X-Twin: <TWIN_ID>' \
--header 'Authorization: Token <ACCESS_TOKEN>'
To Delete or Remove a characteristics attribute tag
To delete an attribute or value on the personality, you can make POST request to the following endpoint with the required tags included as parameters in the URL.
curl --location --request POST '<API_URL>/my/personalities/remove_characteristic/?tags=vegan' \
--header 'Content-Type: application/vnd.api+json' \
--header 'X-Organization: <ORG_ID>' \
--header 'X-Twin: <TWIN_ID>' \
--header 'Authorization: Token <ACCESS_TOKEN>'
In this example, we've removed the tag vegan from the twin's personality. This example would return the following response:
{
"data": {
"type": "personalities",
"id": "<personality_ID>",
"attributes": {
"created": "2022-07-26T16:41:29.047589Z",
"modified": "2022-07-27T16:58:48.811241Z",
"public": false,
"private": true,
"attributes": {},
"characteristics": [
{
"tag": "Vegetarian",
"category": "Dietary",
"value": {}
},
],
"services": []
},
"relationships": {
"twin": {
"data": {
"type": "twins",
"id": "<TWIN_ID>"
}
}
}
}
}
To Delete or Remove a Service attribute tag
To delete a service attribute or value on the personality, you can make POST request to the following endpoint with the required tags included as parameters in the URL.
curl --location --request POST '<API_URL>/my/personalities/remove_service/?tags=food' \
--header 'Content-Type: application/vnd.api+json' \
--header 'X-Organization: <ORG_ID>' \
--header 'X-Twin: <TWIN_ID>' \
--header 'Authorization: Token <ACCESS_TOKEN>'