Description (Create Device)
Create a device for push notifications. (POST)
End Point
https://api.yedpay.com/v1/devices
Request Header
# | Key | Value | Description |
---|---|---|---|
1 | Authorization | Bearer {{access_token}} | Login Token |
2 | Content-Type | application/x-www-form-urlencoded | x-www-form-urlencoded |
Body
# | Name | Type | Description |
---|---|---|---|
1 | platform | String | platform to send notification (android, ios) |
2 | provider | String | Provider of device's notification ('jpush' or 'fcm', default: 'jpush') |
3 | token | String | token generated by device |
4 | name | String | Name of the device |
Response
# | Key | Value | Description |
---|---|---|---|
1 | id | String | Id of the Device |
2 | platform | String | Platform of the Device |
3 | provider | String | Push method of device's notification |
4 | name | String | Name of the Device |
5 | token | String | Token of the Device |
6 | enabled | Boolean | Device Enabled or Not |
7 | created_at | String | Created Date |
8 | updated_at | String | Updated Date |
Example Success Response
{ "success": true, "data": { "id": "JwoMPpKy", "platform": "ios", "provider": "jpush", "name": "xxx", "token": "190e35f7e073ba880ea", "enabled": true, "created_at": "2017-09-01 17:10:51", "updated_at": "2017-09-01 17:10:51" } }
Example Error Response
{ "success": false, "message": "Unauthenticated.", "status": 401 }
v1.61.15-20230523 © The Payment Cards Group Limited. All rights reserved.