{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/apps/:app_id/events/batch","auth":"required","method":"post","examples":{"codes":[{"name":"","language":"shell","code":"curl -X POST \"https://control.pulsatehq.com/api/v1/apps/$APP_ID/events/batch\" \\\n-H \"Authorization: Token token=$MY_ADMIN_API_TOKEN\" \\\n-d '{\n  \"alias\": \"sample_alias\",\n\t\"guid\": sample_guid\",\n\t\"in_app_events\": [\n\t\t{\n\t\t\t\"name\": \"top_up\",\n\t\t\t\"occurred_at\": \"2019-10-15T10:28:53.917Z\",\n\t\t\t\"type\": \"Revenue\",\n\t\t\t\"params\": {\n\t\t\t\t\"currency\": \"GBP\",\n\t\t\t\t\"amount\": 20.50\n\t\t\t}\n\t\t}\n\t]\n}'"}]},"settings":"564bbbf80cbcc91700b8171c","results":{"codes":[{"name":"","status":200,"language":"json","code":""},{"language":"json","code":"{\n    \"errors\": {\n        \"params\": [\n            \"amount is required for the Revenue Event\"\n        ]\n    }\n}","name":"","status":400}]},"params":[{"name":"alias","type":"string","default":"","desc":"User unique alias within the App. Should only contain the following characters 1-9, A-Z and !:::at:::$^&*()_+=-{}[]:\"'<>,|","required":true,"in":"body","ref":"","_id":"564c387b9baa330d00faa623"},{"name":"app_id","type":"string","default":"","desc":"App ID. It can be fetched by using \"Apps: Get All (Index)\" or \"Apps: Get One (Show)\" endpoints.","required":true,"in":"path","ref":"","_id":"57ff824e8e087d0e000303f7"},{"name":"guid","type":"string","default":"","desc":"Guid of the user device","required":true,"in":"body","ref":"","_id":"5b5b16b1faf2c40003dbcad0"},{"name":"in_app_events","type":"array_object","default":"","desc":"Array of In App Events to create","required":true,"in":"body","ref":"","_id":"5b5b16b1faf2c40003dbcacf"},{"name":"in_app_events.occurred_at","type":"string","default":"","desc":"Time when the event occurred. Accepted formats: ISO 8601 [YYYY-MM-DD'T'hh:mm:ss'Z] and integer (UNIX timestamp)","required":true,"in":"body","ref":"","_id":"5b5b16b1faf2c40003dbcace"},{"name":"in_app_events.name","type":"string","default":"","desc":"Name of In App Event","required":true,"in":"body","ref":"","_id":"5b5b16b1faf2c40003dbcacd"},{"name":"in_app_events.type","type":"string","default":"Simple","desc":"In App Event type, it can be: \"Simple\" or \"Revenue\"","required":false,"in":"body","ref":"","_id":"5b5b16b1faf2c40003dbcacc"},{"name":"in_app_events.params","type":"array_object","default":"","desc":"Array of event parameters","required":false,"in":"body","ref":"","_id":"5b5b16b1faf2c40003dbcacb"},{"name":"in_app_events.params.amount","type":"float","default":"","desc":"Revenue Amount, e.g. 12.50. Required for \"Revenue\" type","required":false,"in":"body","ref":"","_id":"5dc04fb7be7fdb002baa9e1a"},{"name":"in_app_events.params.currency","type":"string","default":"","desc":"Revenue Currency Code (ISO 4217) e.g. \"USD\". Required for \"Revenue\" type","required":false,"in":"body","ref":"","_id":"5dc04fb7be7fdb002baa9e19"}]},"next":{"description":"","pages":[]},"title":"Events: Create Batch","type":"endpoint","slug":"events-create-batch","excerpt":"","body":"Documentation\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Please note that if you set the customer's alias, this API endpoint requires either the Puslate device GUID or the user's alias, not both. For more information on deduping and setting an alias for a user, please see our guides on [Android](https://pulsate.readme.io/docs/android-deduping-setting-the-customers-alias) and [iOS](https://pulsate.readme.io/docs/deduping-setting-the-customers-alias).\",\n  \"title\": \"Alias or Device GUID\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"ACCESS TOKEN\",\n  \"body\": \"Please note that the Access Token required for this endpoint is the SDK Access Token and not the Admin Access Token that is used for the CMS API endpoints. To access the SDK Access Token, click on Settings in the Pulsate Dashboard and then App Settings. Scroll to the bottom of this page to a block called SDK Access that contains the SDK Access Token. Make sure you include \\\"Token token=$MY_SDK_ACCESS_TOKEN\\\".\"\n}\n[/block]","updates":[],"order":36,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5e4fced159815700262d292e","project":"54aa7f773b56130b0056c86e","version":{"version":"2.2","version_clean":"2.2.0","codename":"CMS API","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5e4fced159815700262d2899","55781fe35129590d003ff4f9","55781fe35129590d003ff4fa","5e4fced159815700262d289a","5e4fced159815700262d289b","5e4fced159815700262d289c","5e4fced159815700262d289d","5e4fced159815700262d289e","565b66c446118c0d00dcb0bb","56898269f8dc340d00308c13","5e4fced159815700262d289f","5e4fced159815700262d28a0","5c73dd27e8fdc000572a206a","5e4fced159815700262d28a1","5e53c04c1d11110018b56e12"],"_id":"5e4fced159815700262d2930","project":"54aa7f773b56130b0056c86e","forked_from":"55781fe25129590d003ff4f7","__v":1,"createdAt":"2015-06-10T11:30:42.700Z","releaseDate":"2015-06-10T11:30:42.700Z"},"category":{"sync":{"isSync":false,"url":""},"pages":["5e4fced159815700262d28c6","5e4fced159815700262d28c7","5e4fced159815700262d28c8","5e4fced159815700262d28c9","5e4fced159815700262d28ca","5e4fced159815700262d28cb","5e4fced159815700262d28cc","5e4fced159815700262d28cd","5e4fced159815700262d28ce","564c68a93eb8f81700838a25"],"title":"Pulsate CMS API","slug":"pulsate-cms-api","order":1,"from_sync":false,"reference":true,"_id":"5e4fced159815700262d289e","__v":10,"createdAt":"2015-11-17T23:47:10.058Z","project":"54aa7f773b56130b0056c86e","version":"5e4fced159815700262d2930"},"user":"5dc049ca9d92fb00443a3f94","createdAt":"2019-11-04T16:09:01.850Z","__v":9,"parentDoc":null}

postEvents: Create Batch


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

app_id:
required
string
App ID. It can be fetched by using "Apps: Get All (Index)" or "Apps: Get One (Show)" endpoints.

Body Params

alias:
required
string
User unique alias within the App. Should only contain the following characters 1-9, A-Z and [email protected]$^&*()_+=-{}[]:"'<>,|
guid:
required
string
Guid of the user device
in_app_events:
required
array of objects
Array of In App Events to create
in_app_events.occurred_at:
required
string
Time when the event occurred. Accepted formats: ISO 8601 [YYYY-MM-DD'T'hh:mm:ss'Z] and integer (UNIX timestamp)
in_app_events.name:
required
string
Name of In App Event
in_app_events.type:
stringSimple
In App Event type, it can be: "Simple" or "Revenue"
in_app_events.params:
array of objects
Array of event parameters
in_app_events.params.amount:
float
Revenue Amount, e.g. 12.50. Required for "Revenue" type
in_app_events.params.currency:
string
Revenue Currency Code (ISO 4217) e.g. "USD". Required for "Revenue" type

Examples


Documentation

Documentation [block:callout] { "type": "info", "body": "Please note that if you set the customer's alias, this API endpoint requires either the Puslate device GUID or the user's alias, not both. For more information on deduping and setting an alias for a user, please see our guides on [Android](https://pulsate.readme.io/docs/android-deduping-setting-the-customers-alias) and [iOS](https://pulsate.readme.io/docs/deduping-setting-the-customers-alias).", "title": "Alias or Device GUID" } [/block] [block:callout] { "type": "warning", "title": "ACCESS TOKEN", "body": "Please note that the Access Token required for this endpoint is the SDK Access Token and not the Admin Access Token that is used for the CMS API endpoints. To access the SDK Access Token, click on Settings in the Pulsate Dashboard and then App Settings. Scroll to the bottom of this page to a block called SDK Access that contains the SDK Access Token. Make sure you include \"Token token=$MY_SDK_ACCESS_TOKEN\"." } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}