{"status_code": 200,"status_message": "OK","response":null}
Can be used later in /createMessage
API call (the users parameter).
This is normal to call this function before you have the push token and before /registerDevice
call.
Example{"request": {"userId": "user_3078a", // type: string. If empty, use hwid"application": "XXXXX-XXXXX", // Pushwoosh application code"hwid": "8f65b16df378e7a6bece9614e1530fb2", // Hardware device ID"tz_offset": -2917, // Timezone offset"device_type": 3 // device platform, possible values: 1 — iOS; 2 — BB; 3 — Android; 5 — Windows Phone; 7 — OS X; 8 — Windows 8; 9 — Amazon; 10 — Safari; 11 — Chrome; 12 — Firefox; 13 - IE11, 17 - Huawei}}
For emails, call /registerEmailUser
.
{"status_code": 200,"status_message": "OK","response": {"code": "61BC9-84DD0"}}
The event's name in the request must match the event name in Pushwoosh Control Panel. Note that "attributes" property may be empty (but not omitted) in case the event has no attributes.
Please be aware that HWID is required for /postEvent requests for Customer Journeys. With no HWID specified, users won't enter the journey even if the userID is included in a request.
Example{"request":{"hwid": "8f65b16df378e7a6bece9614e1530fb2", // Hardware device ID used in a /registerDevice request. Can be used together with an userId to identify a user who has triggered an event."application": "XXXXX-XXXXX", // Pushwoosh application code"event": "activityCompleted", // event name exactly as created in Pushwoosh Control Panel"attributes": {"login": "facebook","success": "yes","internet": "wifi",...},"timestampUTC": 1435228403, // timestamp in UTC"timestampCurrent": 1435253603, // timestamp in local time"userId": "someuser@user.com", // Required. a user id which is used for identification of users on multiple devices. Can be used instead of or together with an HWID."device_type": 1 // device platform, possible values: 1 — iOS; 2 — BB; 3 — Android; 5 — Windows Phone; 7 — OS X; 8 — Windows 8; 9 — Amazon; 10 — Safari; 11 — Chrome; 12 — Firefox; 13 - IE11; 17 - Huawei}}
{"status_code": 200,"status_message": "OK","response": {"request_id": "12348b2aa4162fb478bd1fb5fcbb1254"}}
For Private Offering subscriptions only.
Example{"request": {"auth": "yxoPUlwqm…………pIyEX4H", // API access token from Pushwoosh Control Panel"application": "XXXXX-XXXXX", // Pushwoosh application code"userIds": ["user_id321"]}}
Like every scheduled request, /getUsersDetails
requires an additional /getResults
request.
Response body:
Field | Type | Description |
request_id | string | Scheduled request ID. Please check |
Scheduled (/getResults) response:
Example{"status_code": 200,"status_message": "OK","response": {"devices": [{"applicationCode": "APPLICATION_CODE","hwid": "HWID","pushToken": "PUSH_TOKEN","type": 3,"tzOffset": 0,"tags": "{\"First Install\":\"2017-07-25\"}","badges": 0,"androidPackages": "[]","latitude": null,"longitude": null,"publicKey": "","authToken": "","userId": "myuser_id321"}]}}