Contact
Developers
Get Started
Notifications
Definition

PersonID: Auto generated Unique ID for the person.

PersonKey: An optional unique ID used to reference the person.

PersonGivenName: An optional field to store the first or given name of the person.

PersonFamilyName: An optional field to store the last or family name of the person.

PersonEmail: An optional field to store the email address of the person.

PersonPhone: An optional field to store the phone number of the person.

PersonStreet1: An optional field to store the street address 1 of the person.

PersonStreet2: An optional field to store the street address 2 of the person.

PersonCity: An optional field to store the address city of the person.

PersonState: An optional field to store the address state of the person.

PersonCountry: An optional field to store the address country of the person. This can help with intrusion detection by identifying logins outside of the persons country of residence.

PersonPostCode: An optional field to store the address post code of the person.

PersonMarketing: A required field to store the marketing state for the person. Options are requested | subscribed | unsubscribed.
Get

Here we have an example where we get a person object. The system will use the PersonID or PersonKey to identify the object.

await fetch('https://app.sitemesh.com/api/person/getone,
 {
  body: JSON.stringify({
   PersonKey: 'A123'
  }),
  method: 'POST',
  headers: {
   'Content-Type': 'application/json',
   'api-key': '#API-KEY#',
  }
 }
);
Upsert

Here we have an example where we upsert a person. The system will use the PersonID, PersonKey, or Email to identify the object, if one doesn't exist it will be created.

On update, only the submitted fields will update so if you need to null out a property, you need to include it with a null value in the request body.

await fetch('https://app.sitemesh.com/api/person/upsert',
 {
  body: JSON.stringify({
   PersonKey: 'A123',
   PersonGivenName: 'James'
  }),
  method: 'POST',
  headers: {
   'Content-Type': 'application/json',
   'api-key': '#API-KEY#',
  }
 }
);