Here's an explanation of each property you might find in the body of any request Upsales posts to your app.
General app information
These properties are available on all requests.
appId (number)
The id of your app in the Upsales App Directory.
date (string)
The UTC date the request was sent
authenticationKey (string)
To verify the request is from Upsales
Customer object
An object with information about the Upsales account the app runs for. This object is available on all requests and has the folllowing properties.
customer.id (number)
The Upsales customer id the app runs for
customer.name (string)
The name of the customer
Customer config properties
All of these properties are available on most requests. Only the config object is available on test or fieldValues requests.
config (object)
The configuration this customer has set up for your app (or is trying to set up if the request is a test request). See app json for more information.
version (string)
The version of your app this customer has configured. (could differ from the current version of your app).
appData (object)
Any appData your app has saved previously for this customer. See app callback for more information.
apiKey (string)
An API key for this customer to the Upsales API. Only available if your app is set to use API key.
User object
Information about the user that initiated the request, or the request was initiated for.
Some requests, such as non-user configurable apps that are initiated as a scheduled job or manually, don't have a user scope and will not have this object.
user.id (number)
The Upsales id of this user. Please note, this is not a global id for all Upsales users - but an id for this Upsales account. For example, two different Upsales account can have a user with id 1.
user.name (string)
The full name of the user
user.email (string)
You guessed it - the users email address.
language (string)
The language preference for this user.
User config properties
If your app is user configurable, the following properties will be sent in most requests. Only the userConfig object is available on test or fieldValues requests.
userConfig (object)
The configuration this user has set up for your app (or is trying to set up if the request is a test request). See app json for more information.
userVersion (string)
The version of your app this user has configured. (could differ from the current version of your app as well as the version property).
userAppData (object)
Any userAppData your app has saved previously for this user. See app callback for more information.
Other properties
callbackUrl (string)
A URL to post app callback to. See app callback for more information.
data
Any data related to the request. The type will differ depending on the request.