Use the POST method to send event data through an authenticated server-to-server connection. Use a server-to-server connection when your server already collects engagement data that you want to forward to Data 360 or when you require an authenticated connection.
-
URI
- :
/server/events/{appSourceId}.
- :
Retrieve the {appSourceId} after you create a server-to-server connection in Data 360.
-
Available since release
- : Salesforce v63.0
-
Formats
- : REST
-
HTTP methods
- : POST
-
Authentication
- : Authenticated connections require a connected app. For instructions, see Create an Authenticated Server-to-Server Connection.
-
Request body
-
:
url --location --request POST 'https://{Data_Cloud_instance_url}/server/events/{appSourceId}\ --header 'Authorization: Bearer {access_token}' \ --header 'Content-Type: application/json' \ --data `{ "events": [ { "eventId": "Event ID", "dateTime": "Time stamp", "sessionId": "Session ID", "deviceId": "Device ID", "eventType": "Event type", "category": "Category" } ] }`
-
note: You can include multiple event types in a request. For more information, see the recommended schema.
-
Request parameters
-
:
Parameter Description eventIdA unique ID for each event dateTimeTimestamp must be in ISO8601 format YYYY-MM-DD'T'HH:mm:ss.SSS'Z'sessionIdSame as the deviceIddeviceIdA unique ID, stored in a cookie, for the device from which the request is made eventTypeContains the developerNamevalue used in the definition of an event schemacategoryMust be either profileorengagement
-
-
Response body
-
:
Code Description 204No Content (payload posted) 400Bad Request 401Unauthorized 500Server Error
-