{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/person/:site_id/:id_type/:id","auth":"required","method":"put","params":[{"name":"site_id","type":"string","default":"","desc":"URL path parameter. The unique identifier for your Boomtrain site.","required":true,"in":"path","ref":"","_id":"57081bad1750330e00184c1d"},{"name":"id_type","type":"string","default":"","desc":"URL path parameter. Indicates the type of identifier used to identify the person. This should accept the values `bsin`, `email`, or `user_id`. A user's `bsin` can be obtained through the route documented at [Get a Boomtrain Identifier for a Person](https://boomtrain.readme.io/docs/get-a-boomtrain-identifier-for-a-person)","required":true,"in":"path","ref":"","_id":"570d6c3137110c0e00db0c84"},{"name":"id","type":"string","default":"","desc":"URL path parameter. Indicates the identifier for the user receiving recommendations.","required":true,"in":"path","ref":"","_id":"570d6c3137110c0e00db0c83"},{"name":"attributes","type":"object","default":"","desc":"An array of attributes to upsert into the person record. Any attributes specified will be upserted into the record; any unspecified attributes will remain unchanged. You can clear an attribute by specifying its value as the empty string `\"\"`. See User Attributes below for more information.","required":false,"in":"body","ref":"","_id":"576075692c721a0e00931152"}],"results":{"codes":[{"status":200,"name":"","code":"{\n  \"data\": {\n    \"attributes\": [\n      {\n        \"created_at\": \"2016-07-01T22:32:24+00:00\",\n        \"name\": \"firstName\",\n        \"updated_at\": \"2016-07-01T22:32:24+00:00\",\n        \"value\": \"Suki\"\n      }\n    ],\n    \"bsin\": \"GwEMOjhVZ+iRCmmqTmUJ0vcaTyCxIFrXGBWU4oKxyu2VOb/f++WvknZGv9fr3J5zGuulZaFGYpg8uyyZpuKpBA==\",\n    \"email\": \"suki:::at:::boomtrain.com\",\n    \"site_id\": \"324fa582528ea3dbc96bd7e94a2d5b61\"\n  }\n}","language":"json"}]},"settings":"56ca06cc5a10e20d005b8af0","examples":{"codes":[{"language":"curl","code":"curl -X PUT -H 'Authorization: Bearer <token>' -H 'Content-Type:application/json' -d '{\"attributes\":{\"firstName\":\"Suki\"}}' 'https://people.api.boomtrain.com/v1/person/your-site/email/[email protected]'"}]}},"next":{"description":"","pages":[]},"title":"Create or Update a Person","type":"endpoint","slug":"create-or-update-a-person","excerpt":"Updates a person record for the specified person. If no record of the specified person exists, this route creates a person record.","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"User Attributes\"\n}\n[/block]\nAttributes are represented in Boomtrain's systems as a set of key:value pairs. Any string can be used as an attribute value.\n\nNote that all user attribute keys will be normalized in the following way:\n1. Leading and trailing whitespace characters will be removed.\n2. Any instances of multiple consecutive whitespace characters will be replaced with a single whitespace character.\n3. Uppercase letters are downcased \n4. Whitespaces are replaced with underscore characters. \n\nThis normalization will occur for all keys inside a nested value within that attribute as well.\n\nAs an example, the attribute expressed as `\"My  Attribute\"` will be transformed to `my_attribute`.\n\nThere are a few attribute names that are recognized as standard values:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attribute Name\",\n    \"h-1\": \"Purpose\",\n    \"0-0\": \"first_name OR firstname\",\n    \"1-0\": \"last_name OR lastname\",\n    \"2-0\": \"name\",\n    \"2-1\": \"The full name of the user.\",\n    \"1-1\": \"The last name of the user.\",\n    \"0-1\": \"The first name of the user.\",\n    \"3-0\": \"signed_up_at\",\n    \"3-1\": \"The date that a user signed up for your site. Note that this attribute should be specified as an ISO-8601 Timestamp String.\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]","updates":[],"order":5,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"576073e730e27d0e00002aa0","githubsync":"","createdAt":"2016-06-14T21:15:19.266Z","project":"56aff08c3a5b810d00745d99","__v":4,"category":{"sync":{"isSync":false,"url":""},"pages":["56d4ec8573dcd20b00fb876a"],"title":"Server-Side Integration REST API","slug":"authorization","order":3,"from_sync":false,"reference":true,"_id":"56d4ec4773dcd20b00fb8769","__v":1,"version":"56aff08c3a5b810d00745d9c","createdAt":"2016-03-01T01:11:35.547Z","project":"56aff08c3a5b810d00745d99"},"user":"566887ff8639090d00759415","version":{"version":"1","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["56aff08d3a5b810d00745d9d","56aff24f3a5b810d00745da0","56aff25dbc304a0d00ace207","56aff287e0b1e40d00c53798","56aff2b260a37a0d00ed8883","56aff2b8e0b1e40d00c53799","56aff2bd5b1f01170014dc7b","56aff2c9d21e9c0d00b62993","56aff493aef9a21700da0e67","56aff4ce1486990d009c0f64","56aff4da5b1f01170014dc7d","56aff4dfe0b1e40d00c537a2","56aff4e59d32e30d0006d3e9","56aff4e91486990d009c0f65","56aff4f93a5b810d00745da2","56aff4fe9d32e30d0006d3ea","56b91c7ab1e03e0d001057c5","56c4f51aba4a540d0091b9a2","56cd09488c4a331d002c1e44","56d4ec4773dcd20b00fb8769","56e79bc515f96b2200878e54","56ec25c538ff1d2200d56cc2","56ec3a6f36bc8e0e00f190c8","56ec3e308ea7ce0e00a3d8b0","5724d8fe4255580e005938b2","5724dc842ad0bc1700122803","5776ef2a04f7500e0095dc37","57ab9f70b5e8742000e17eb9","57d7117646dcc30e007dd21f","58e6abd5b1eece19008b7d31","59288c65e2653627003e1221","5a8f4797a44f8600128e75ee","5bbf8833eb416300039a2c14","5ea811617bf4b5007328a0af"],"_id":"56aff08c3a5b810d00745d9c","project":"56aff08c3a5b810d00745d99","releaseDate":"2016-02-01T23:55:56.544Z","__v":34,"createdAt":"2016-02-01T23:55:56.544Z"},"editedParams":true,"editedParams2":true,"parentDoc":null}

putCreate or Update a Person

Updates a person record for the specified person. If no record of the specified person exists, this route creates a person record.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

site_id:
required
string
URL path parameter. The unique identifier for your Boomtrain site.
id_type:
required
string
URL path parameter. Indicates the type of identifier used to identify the person. This should accept the values `bsin`, `email`, or `user_id`. A user's `bsin` can be obtained through the route documented at [Get a Boomtrain Identifier for a Person](https://boomtrain.readme.io/docs/get-a-boomtrain-identifier-for-a-person)
id:
required
string
URL path parameter. Indicates the identifier for the user receiving recommendations.

Body Params

attributes:
object
An array of attributes to upsert into the person record. Any attributes specified will be upserted into the record; any unspecified attributes will remain unchanged. You can clear an attribute by specifying its value as the empty string `""`. See User Attributes below for more information.

Examples


Result Format


Documentation

[block:api-header] { "type": "basic", "title": "User Attributes" } [/block] Attributes are represented in Boomtrain's systems as a set of key:value pairs. Any string can be used as an attribute value. Note that all user attribute keys will be normalized in the following way: 1. Leading and trailing whitespace characters will be removed. 2. Any instances of multiple consecutive whitespace characters will be replaced with a single whitespace character. 3. Uppercase letters are downcased 4. Whitespaces are replaced with underscore characters. This normalization will occur for all keys inside a nested value within that attribute as well. As an example, the attribute expressed as `"My Attribute"` will be transformed to `my_attribute`. There are a few attribute names that are recognized as standard values: [block:parameters] { "data": { "h-0": "Attribute Name", "h-1": "Purpose", "0-0": "first_name OR firstname", "1-0": "last_name OR lastname", "2-0": "name", "2-1": "The full name of the user.", "1-1": "The last name of the user.", "0-1": "The first name of the user.", "3-0": "signed_up_at", "3-1": "The date that a user signed up for your site. Note that this attribute should be specified as an ISO-8601 Timestamp String." }, "cols": 2, "rows": 4 } [/block]

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}