shop.pushnotification.enable

Enables push notifications on a user's device.

Parameters

  • client_id POST

    Client ID value.

  • shop_url POST Optional

    Store URL via which a user might have already subscribed for push notifications. This value is necessary only if 'force' parameter is used.

  • force GET Optional

    Boolean flag requiring to enable push notifications regardless of whether such notifications are already enabled for specified client_id. If 0 is specified, then such check is performed. If specified 'client_id' is already subscribed for push notifications, then an exception is thrown returning the URL via which that clien had subscribed. Otherwise no check is performed, and a user is force subscribed to push notifications via framework's root URL.

  • access_token GET

    API auth token obtained during the API authorization.

  • format GET Optional

    Sets response format. Available options: json (default), xml.

Error codes

  • invalid_request

    Invalid formed request. Additional information about the error is available in error_description parameter.

  • access_denied

    Access to the specified API method for the current token is denied.

  • invalid_method

    Unknown API method.