Contact
Developers
Get Started
Accounts
Definition
Endpoint: https://core.sitemesh.com/v1/account/
AccountID: Specified or auto generated unique id for the account.
AccountName: An optional field to store the name of the 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://core.sitemesh.com/v1/account/save', { body: JSON.stringify({ AccountID: 'A123', AccountName: 'Northwind Traders' }), method: 'POST', headers: { 'Content-Type': 'application/json', 'api-key': '#API-KEY#', } } );