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.

  • format GET Optional

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

Return value

string 'ok'.