Contact
Developers
Get Started
Authentication
Definition
Endpoint: https://core.sitemesh.com/v1/account/
Get

Here we have an example where we get a account object. The system will use the AccountID or AccountKey to identify the object.

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

Here we have an example where we upsert an account. The system will use the AccountID or AccountKey to identify the account 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/account/upsert',
 {
  body: JSON.stringify({
   AccountKey: 'A123',
   AccountName: 'Northwind Traders'
  }),
  method: 'POST',
  headers: {
   'Content-Type': 'application/json',
   'api-key': '#API-KEY#',
  }
 }
);