PUT mobile-push-notification-subscription
PUT Registers a mobile device to receive push notifications by establishing the link between the device ID and the Drillster user.
Resource URL
https://www.drillster.com/api/2/mobile-push-notification-subscription/{platform}/{address}
The caller must be an authenticated user.
Parameters
Field | Type | Description |
---|---|---|
platform required |
String constant |
Identifies the mobile platform the request is coming from. Supported values are |
address required |
String |
The actual device address, represented as a string. For iOS, this string will typically look like this: For Android, the address has a shape like this: |
Content-Length: 0
). Not
all HTTP clients do this automatically. For more information, please see
RFC 2616.
Response
A NoContent (204) response indicating that the device address was successfully linked to the Drillster user account.
Error responses
The following error situations are possible:
ID | Response code | Description |
---|---|---|
no_platform_specified |
400 (Bad request) | No platform was specified. |
unsupported_platform |
400 (Bad request) | The supplied platform is not supported. |
no_token_specified |
400 (Bad request) | No device token (address) was specified. |