Syncs an archetype to the Affinitomics server. If the archetype does not yet exist, the server will create an archetype with the given id. If the domain does not yet exist for the given user_key, it will also be created. Note that although the arguments descriptors, draws, and distances are all optional, at least one of the arguments must be given in order for the archetype to be able to be matched against other archetypes.

Arguments

domain – the domain id to which this archetype does/will belong. If the domain does not yet exist, it will be created. Domains can be any unique string and are not just limited to URLs

archetype_id – id of the archetype to use to sync data. If the id does not yet exist, it will be created

sets (optional) – list of set ids that the given archetype_id is a member of

descriptors (optional) – array of descriptors for the archetype. A cars archetype might include the descriptors “cars, automobiles”

draws (optional) – an array of dictionaries that each contain a draw term and magnitude for the archetype.

term, a draw to be added to the archetype. A cars archetype might include the draw “horsepower”

magnitude, a number from 1-5 that is the magnitude of the draw, with 1 being a low draw and 5 being the highest. The higher the draw, the more likely that this archetype will match archetypes that have this draw term in their descriptors

distances (optional) – an array of dictionaries that each contain a distance term and magnitude for the archetype.

term, a distance to be added to the archetype. A cars archetype might include the distance “boat”

magnitude, a number from 1-5 that is the magnitude of the distance, with 1 being a low distance and 5 being the highest. The higher the distance, the more likely that this archetype will not match archetypes that have this distance term in their descriptors.

title (optional) – a title to be given to the archetype, if desired

Response variables (dictionary)

archetype_id – archetype id that was synced/created

domain – the domain used/created in the request

 

Example Request

{
  "domain":"subuPref.com", 
  "archetype_id":"bike", 
  "status":"success", 
  "errors":[]
}