Before you start...
Before you get started, we recommend review the Associate Person to Device customer API in the Vibes Push SDK section to understand how and when this API call should be used.
POST method assigns a given device to a person record.
- If a
person_keyis supplied, and a person with that
person_keydoes not exist, that will result in an error.
- If an
external_person_idis supplied and a person with that
external_person_iddoes not exist, then the
external_person_idwill be assigned to the Person currently associated with the device.
- If the indicated person exists and the device is not already associated with them, it will be moved to be associated with them.
- If the indicated person is already associated with the device, then nothing will be done and a success response will be returned.
If the call is successful, the response will include the newly associated person entity. Now that the
external_device_id are associated, you can use person data to target push messaging to the user’s push device.
In the case of an error, a standard public API error response will be returned instead. Below is a list of some common responses you may see.
|Status Code||Meaning||Response Type|
|200 - OK||The device was successfully assigned to the given person.||Success|
|404 - Not Found||The ||Failure|
|422 - Unprocessible Entity||The requested assignment could not be completed. Reason will be stated in the response body.||Failure|