Contact
Developers
Get Started
Logging
Properties

AccountID: Auto-generated unique ID for the account.

AccountKey: An optional unique ID used to reference the account.

AccountName: An optional field to store the name of the account.

AccountCurrency: An optional field to store the default currency for 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://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#',
  }
 }
);