Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Set App Push Token

Method Objective

The method allows assigning a new App Push token to the user.

Request

EndpointRequest TypeContent-Type
https://api.personaclick.com/mobile_push_tokensPOSTapplication/x-www-form-urlencoded

Parameters

NameTypeRequirementDescription
shop_idstringrequiredUnique Store Key in PersonaClick. Located there: Account > Settings > Store Settings
didstringrequiredUnique Device ID. See "Initialization (REST API)" for information about getting and using Device ID.
tokenstringrequiredThe token is to be assigned to the user.
platformstringrequired

Token platform. Available values:

  • android
  • ios

API Response Code

HTTP status code

Description
200 OK

The request was successful.

400 Bad RequestSee the "message" property of the API response for details.
403 ForbiddenUnsuccessful authorization.

API Response Data

The response is JSON type with the following properties:

NameTypeDescription
statusstring

Current status. Can have one of two values:

  • success - the request was successful
  • error - the request was unsuccessful
messagestring

The text of the error if it occurred

Request Example

Code Block
languagejs
themeFadeToGrey
curl 'https://api.personaclick.com/mobile_push_tokens' \
  -X 'POST' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d 'shop_id=0d42fd8b713d0752776ca589cc0056&did=7rjVGhMykT&platform=android&token=cCM2SRUF8pO9UaJOqX00wz:APuCScUxcUno1p1Gz6kcV4xux2dnVO1MfEkOen-6fdAlA9JqiTCClKM4Gc6KnUon1bGIbq7o2c03OH-b88vnZmBev7Ho7wAYs3_XOw93YUn5sxNOZ8sq75kjB9UHgoZbbVXrBrWwYhr5'


Table of Contents
maxLevel31
classpersonaclick-fixed-position