Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Basic Details
API endpoint and parameters used in all user activity tracking requests (exclude custom events) are described hereBasic Details
API endpoint and parameters used in all user activity tracking requests (exclude custom events) are described here.
Request
Endpoint | Request Type | Content-Type |
---|---|---|
https://api.personaclick.com/push | POST | application/json |
Parameters
Name | Type | Requirement | Description |
---|---|---|---|
shop_id | string | required | Unique Store Key in PersonaClick. Located there: Account > Settings > Store Settings |
did | string | required | Unique Device ID. See "Initialization (REST API)" for information about getting and using Device ID. |
seance | string | required | Unique ID of the current user session. See "Initialization (REST API)" for information about getting and using User Session ID. |
stream | string | required | Data stream code. Alphanumeric string (letters, numbers only). Max length: 16. The empty default value will mean "web". Can be "ios", "android" or any other string. Used to distinguish between mobile apps, websites, and other events sources. |
segment | string | optionally | Can take one of the values: "A" or "B" according to the segment to which the user is assigned. You can use your algorithm to divide users evenly between the segments. |
referer | string | optionally | Request source URL |
source | JSON string | required in some cases | See the description below. |
Source Param
This parameter is a JSON string of the object with the following properties. The value for each property should be fetched from a specific source, depending on the campaign type.
Warning |
---|
Each time the source parameters come from any channel, they should be saved on the site or app side and used in all user activity tracking requests for 48 hours. If the source parameters are updated within 48 hours (the user has interacted with a new campaign), the new source parameter values should be saved on your side and their life should be set to 48 hours again. After the lifetime of these parameters has expired, they should no longer be used in requests. |
Name | Type | Requirement | Channel | Campaign Type | Description |
---|---|---|---|---|---|
from | string | required | Any type | The value should be fetched from the "recommended_by" parameter of any link in an email/webpush at the moment when the user visits the site by clicking on the link. | |
Web Push | |||||
App Push | The value shoud be fetched from push's JSON payload. For Android it's located in "type" property. In iOS SDK it's "src.type". | ||||
code | string | required | Bulk | The value should be fetched from the "bulk_code" parameter of any link in an email at the moment when the user visits the site by clicking on the link. | |
Chain | The value should be fetched from the "personaclick_mail_code" parameter of any link in an email at the moment when the user visits the site by clicking on the link. | ||||
Transactional | |||||
Web Push | Bulk | The value should be fetched from the "bulk_code" parameter of a link in a web-push at the moment when the user visits the site by clicking on the link. | |||
Chain | The value should be fetched from the "personaclick_mail_code" parameter of a link in a web-push at the moment when the user visits the site by clicking on the link. | ||||
Transactional | |||||
App Push | Any type | The value should be fetched from push's JSON payload. For Android it's located in "id" property. In iOS SDK it's "src.id" |
Code Block | ||||
---|---|---|---|---|
| ||||
{"from":"chain","code":"abcdef-0123-4567-9810-012345abcdef"} |
Product View
Method Objective
Status | ||||||
---|---|---|---|---|---|---|
|
Parameters
Note |
---|
Only parameters related to the product view event are listed here. See "Basic Details" above for more information on required parameters and the API endpoint. |
Name | Type | Requirement | Description |
---|---|---|---|
event | string | required | The value must be "view". |
items | Object array | required | For the "view" event, the array should contain only one object with a product ID. See the example below. |
recommended_by | string | required in some cases |
|
recommended_code | string | required in some cases | This parameter can contain one of the values:
|
API Response Code
HTTP status code | Description |
---|---|
200 OK | The request was successful. |
400 Bad Request | The reasons that can cause the error:
|
403 Forbidden | The request was unsuccessful. |
API Response Data
The response is JSON type with the following properties:
Name | Type | Description |
---|---|---|
status | string | Current status. Can have one of two values:
|
message | string | The text of the error if it occurred |
payload | Object | Reserved for the JS SDK internal use |
Request Example
Code Block | ||||
---|---|---|---|---|
| ||||
curl 'https://api.personaclick.com/push' \ -X 'POST' \ -H 'content-type: application/json' \ -d '{"event":"view","shop_id":"0d42fd8b713d0752776ca589cc0056","did":"7rjVGhMykT","seance":"R5eQXkrKCf","stream":"ios","segment":"A","referer":"https://mystore.com/product/100500","items":[{"id":"100500"}],"recommended_by":"dynamic","recommended_code":"3d045e1b39c321ff695604587597231c"}' # with the "source" param curl 'https://api.personaclick.com/push' \ -X 'POST' \ -H 'content-type: application/json' \ -d '{"event":"view","shop_id":"0d42fd8b713d0752776ca589cc0056","did":"7rjVGhMykT","seance":"R5eQXkrKCf","stream":"android","segment":"A","referer":"https://mystore.com/product/100500","items":[{"id":"100500"}],"recommended_by":"dynamic","recommended_code":"3d045e1b39c321ff695604587597231c","source":"{\"from\":\"chain\",\"code\":\"abcdef-0123-4567-9810-012345abcdef\"}"}' |
Category View
Method Objective
Status | ||||||
---|---|---|---|---|---|---|
|
Warning |
---|
The API will respond with an error for categories unknown to the system. The system only knows the categories from the product feed (XML) or the HTTP import of the category list. |
Parameters
Note |
---|
Only parameters related to the category view event are listed here. See "Basic Details" above for more information on required parameters and the API endpoint. |
Name | Type | Requirement | Description |
---|---|---|---|
event | string | required | The value must be "category". |
category_id | number/string | required | The ID of the current category. |
API Response Code
HTTP status code | Description |
---|---|
200 OK | The request was successful. |
400 Bad Request | The reasons that can cause the error:
|
403 Forbidden | The request was unsuccessful. |
API Response Data
The response is JSON type with the following properties:
Name | Type | Description |
---|---|---|
status | string | Current status. Can have one of two values:
|
message | string | The text of the error if it occurred |
payload | Object | Reserved for the JS SDK internal use |
Request Example
Code Block | ||||
---|---|---|---|---|
| ||||
curl 'https://api.personaclick.com/push' \ -X 'POST' \ -H 'content-type: application/json' \ -d '{"event":"category","shop_id":"0d42fd8b713d0752776ca589cc0056","did":"7rjVGhMykT","seance":"R5eQXkrKCf","stream":"web","segment":"A","referer":"https://mystore.com/category/146","category_id":146}' # with the "source" param curl 'https://api.personaclick.com/push' \ -X 'POST' \ -H 'content-type: application/json' \ -d '{"event":"category","shop_id":"0d42fd8b713d0752776ca589cc0056","did":"7rjVGhMykT","seance":"R5eQXkrKCf","stream":"android","segment":"A","referer":"https://mystore.com/category/146","category_id":146,"source":"{\"from\":\"chain\",\"code\":\"abcdef-0123-4567-9810-012345abcdef\"}"}' |
Adding a product to the cart
Method Objective
Status | ||||||
---|---|---|---|---|---|---|
|
Parameters
Note |
---|
Only parameters related to the adding product to the cart event are listed here. See "Basic Details" above for more information on required parameters and the API endpoint. |
Name | Type | Requirement | Description | |||||
---|---|---|---|---|---|---|---|---|
event | string | required | The value must be "cart". | |||||
items | Object array | required | required in someFor the "cart" event, the array should contain only one object with a product ID, and an amount. See the example below. | recommended_by | string |
| ||
recommended_by | string | required in some cases |
| |||||
recommended_code | string | required in some cases | This parameter can contain one of the values:
|
API Response Code
HTTP status code | Description |
---|---|
200 OK | The request was successful. |
400 Bad Request | The reasons that can cause the error:
|
403 Forbidden | The request was unsuccessful. |
API Response Data
The response is JSON type with the following properties:
Name | Type | Description |
---|---|---|
status | string | Current status. Can have one of two values:
|
message | string | The text of the error if it occurred |
payload | Object | Reserved for the JS SDK internal use |
Request Example
Code Block | ||||
---|---|---|---|---|
| ||||
curl 'https://api.personaclick.com/push' \ -X 'POST' \ -H 'content-type: application/json' \ -d '{"event":"cart","shop_id":"0d42fd8b713d0752776ca589cc0056","did":"7rjVGhMykT","seance":"R5eQXkrKCf","stream":"ios","segment":"A","referer":"https://mystore.com/product/100500","items":[{"id":"100500","amount":2}],"recommended_by":"dynamic","recommended_code":"3d045e1b39c321ff695604587597231c"}' # with the "source" param curl 'https://api.personaclick.com/push' \ -X 'POST' \ -H 'content-type: application/json' \ -d '{"event":"cart","shop_id":"0d42fd8b713d0752776ca589cc0056","did":"7rjVGhMykT","seance":"R5eQXkrKCf","stream":"web","segment":"A","referer":"https://mystore.com/product/100500","items":[{"id":"100500","amount":3}],"recommended_by":"dynamic","recommended_code":"3d045e1b39c321ff695604587597231c","source":"{\"from\":\"chain\",\"code\":\"abcdef-0123-4567-9810-012345abcdef\"}"}' |
Removing a product from the cart
Method Objective
Status | ||||||
---|---|---|---|---|---|---|
|
Parameters
Note |
---|
Only parameters related to the removing product from the cart event are listed here. See "Basic Details" above for more information on required parameters and the API endpoint. |
Name | Type | Requirement | Description |
---|---|---|---|
event | string | required | The value must be "remove_from_cart". |
items | Object array | required | For the "remove_from_cart" event, the array should contain only one object with a product ID. See the example below. |
API Response Code
HTTP status code | Description |
---|---|
200 OK | The request was successful. |
400 Bad Request | The reasons that can cause the error:
|
403 Forbidden | The request was unsuccessful. |
API Response Data
The response is JSON type with the following properties:
Name | Type | Description |
---|---|---|
status | string | Current status. Can have one of two values:
|
message | string | The text of the error if it occurred |
payload | Object | Reserved for the JS SDK internal use |
Request Example
Code Block | ||||
---|---|---|---|---|
| ||||
curl 'https://api.personaclick.com/push' \ -X 'POST' \ -H 'content-type: application/json' \ -d '{"event":"remove_from_cart","shop_id":"0d42fd8b713d0752776ca589cc0056","did":"7rjVGhMykT","seance":"R5eQXkrKCf","stream":"android","segment":"A","referer":"https://mystore.com/product/100500","items":[{"id":"100500"}]}' |
Update the current cart
Method Objective
Status | ||||||
---|---|---|---|---|---|---|
|
Note |
---|
This method is required for use on the cart page when the user does certain actions there: when the user visits the page, changes the quantity of a product in the cart, removes a product from the cart, or clears the cart completely. |
Tip |
---|
This method can be used on the product page as an alternative to the "Add to cart" and "Remove from cart" methods if you have access to the entire cart on the product page. |
Parameters
Note |
---|
Only parameters related to the event of updating the cart are listed here. See "Basic Details" above for more information on required parameters and the API endpoint. |
Name | Type | Requirement | Description | ||
---|---|---|---|---|---|
event | string | required | The value must be "cart". | ||
items | Object array | required | Object array with the properties of the products in the cart. Available properties for each object:
See the example below. | ||
full_cart | boolean | required | Status of the cart synchronization. Should always be "true" in this case. See the example below. |
API Response Code
HTTP status code | Description |
---|---|
200 OK | The request was successful. |
400 Bad Request | The reasons that can cause the error:
|
403 Forbidden | The request was unsuccessful. |
API Response Data
The response is JSON type with the following properties:
Name | Type | Description |
---|---|---|
status | string | Current status. Can have one of two values:
|
message | string | The text of the error if it occurred |
payload | Object | Reserved for the JS SDK internal use |
Request Examples
Example of synchronization of products in the cart.
Code Block | ||||
---|---|---|---|---|
| ||||
curl 'https://api.personaclick.com/push' \ -X 'POST' \ -H 'content-type: application/json' \ -d '{"event":"cart","shop_id":"0d42fd8b713d0752776ca589cc0056","did":"7rjVGhMykT","seance":"R5eQXkrKCf","stream":"ios","segment":"A","referer":"https://mystore.com/cart","items":[{"id":"100500","quantity":3},{"id":"100123","quantity":1}],"full_cart":true}' # with the "source" param curl 'https://api.personaclick.com/push' \ -X 'POST' \ -H 'content-type: application/json' \ -d '{"event":"cart","shop_id":"0d42fd8b713d0752776ca589cc0056","did":"7rjVGhMykT","seance":"R5eQXkrKCf","stream":"android","segment":"A","referer":"https://mystore.com/cart","items":[{"id":"100500","quantity":3},{"id":"100123","quantity":1}],"full_cart":true,"source":"{\"from\":\"chain\",\"code\":\"abcdef-0123-4567-9810-012345abcdef\"}"}' |
Example of the cart cleaning.
Code Block | ||||
---|---|---|---|---|
| ||||
curl 'https://api.personaclick.com/push' \ -X 'POST' \ -H 'content-type: application/json' \ -d '{"event":"cart","shop_id":"0d42fd8b713d0752776ca589cc0056","did":"7rjVGhMykT","seance":"R5eQXkrKCf","stream":"web","segment":"A","referer":"https://mystore.com/cart","full_cart":true}' # with "source" param curl 'https://api.personaclick.com/push' \ -X 'POST' \ -H 'content-type: application/json' \ -d '{"event":"cart","shop_id":"0d42fd8b713d0752776ca589cc0056","did":"7rjVGhMykT","seance":"R5eQXkrKCf","stream":"android","segment":"A","referer":"https://mystore.com/cart","full_cart":true,"source":"{\"from\":\"chain\",\"code\":\"abcdef-0123-4567-9810-012345abcdef\"}"}' |
Successful checkout
Method Objective
Status | ||||||
---|---|---|---|---|---|---|
|
Parameters
Note |
---|
Only parameters related to the purchase event are listed here. See "Basic Details" above for more information on required parameters and the API endpoint. |
Name | Type | Requirement | Description | ||
---|---|---|---|---|---|
event | string | required | The value must be "purchase". | ||
items | Object array | required | Object array with the properties of the products in the cart. Available properties for each object:
See the example below. | ||
custom | Object | optionally | Custom properties of the order. The properties should be pre-created: Account > Settings > Order properties The following data types are supported: - string - integer - date (YYYY-MM-DD) See example below. | ||
order_id | number/string | optionally | Internal store Order ID. If not specified, the system will create its internal ID. Synchronization of order statuses, in this case, won't be available.
| ||
order_price | number | optionally | The final order value, including all discounts. If not specified, the system will calculate the order value based on prices from the product feed. | ||
order_cash | number | optionally | The amount of money the user spent to pay for the order. | ||
order_bonuses | number | optionally | The number of bonuses the user spent to pay for the order. | ||
order_delivery | number | optionally | Shipping cost. | ||
order_discount | number | optionally | Discount amount (in money). | ||
promocode | string | optionally | Promo code that was used.
| ||
delivery_address | string | optionally | Delivery address. Any text. | ||
delivery_type | string | optionally | Shipping method. Available values: Delivery Type, e.g. "courier", "self_pickup | ||
payment_type | string | optionally | Payment method. Any string value. For example: "cash", "card", "wire". | ||
tax_free | boolean | optionally | It sets whether the order was placed with Tax-Free or not. |
API Response Code
HTTP status code | Description |
---|---|
200 OK | The request was successful. |
400 Bad Request | The reasons that can cause the error:
|
403 Forbidden | The request was unsuccessful. |
API Response Data
The response is JSON type with the following properties:
Name | Type | Description |
---|---|---|
status | string | Current status. Can have one of two values:
|
message | string | The text of the error if it occurred |
payload | Object | Reserved for the JS SDK internal use |
Request Example
Code Block | ||||
---|---|---|---|---|
| ||||
curl 'https://api.personaclick.com/push' \ -X 'POST' \ -H 'content-type: application/json' \ -d '{"event":"purchase","shop_id":"0d42fd8b713d0752776ca589cc0056","did":"7rjVGhMykT","seance":"R5eQXkrKCf","stream":"ios","segment":"A","referer":"https://mystore.com/order/success","order_id":"N100500","order_price":750,"order_cash":650,"order_bonuses":100,"order_discount":50,"promocode":"BIRTHDAY","delivery_type":"delivery","payment_type":"cart","items":[{"id":"100500","amount":3,"price":100},{"id":100123,"amount":1,"price":500}]},"custom":{"order_comment":"Delivery after 15:00, 2nd floor, apt. 222","boxes":2,"refund_date":"2021-09-21"}' # with the "source" param curl 'https://api.personaclick.com/push' \ -X 'POST' \ -H 'content-type: application/json' \ -d '{"event":"purchase","shop_id":"0d42fd8b713d0752776ca589cc0056","did":"7rjVGhMykT","seance":"R5eQXkrKCf","stream":"android","segment":"A","referer":"https://mystore.com/order/success","order_id":"N100500","order_price":750,"order_cash":650,"order_bonuses":100,"order_discount":50,"promocode":"BIRTHDAY","delivery_type":"delivery","payment_type":"cart","items":[{"id":"100500","amount":3,"price":100},{"id":100123,"amount":1,"price":500}],"sourcecustom":"{\""order_comment":"Delivery after 15:00, 2nd floor, apt. 222","boxes":2,"refund_date":"2021-09-21"},"source":"{\"from\":\"chain\",\"code\":\"abcdef-0123-4567-9810-012345abcdef\"}"}' |
Search Request
Method Objective
The method gives the system an understanding of the user's search queries.
Parameters
Note |
---|
Only parameters related to the search event are listed here. See "Basic Details" above for more information on required parameters and the API endpoint. |
Name | Type | Requirement | Description |
---|---|---|---|
event | string | required | The value must be "search". |
search_query | string | required | Search Query. |
recommended_code | string | required in some cases | This parameter should have a search query in the value if the search results were taken from the PersonaClick API (the Full Search tool was used). See the example below. |
API Response Code
HTTP status code | Description |
---|---|
200 OK | The request was successful. |
400 Bad Request | The reasons that can cause the error:
|
403 Forbidden | The request was unsuccessful. |
API Response Data
The response is JSON type with the following properties:
Name | Type | Description |
---|---|---|
status | string | Current status. Can have one of two values:
|
message | string | The text of the error if it occurred |
payload | Object | Reserved for the JS SDK internal use |
Request Example
Code Block | ||||
---|---|---|---|---|
| ||||
curl 'https://api.personaclick.com/push' \ -X 'POST' \ -H 'content-type: application/json' \ -d '{"event":"search","shop_id":"0d42fd8b713d0752776ca589cc0056","did":"7rjVGhMykT","seance":"R5eQXkrKCf","stream":"web","segment":"A","referer":"https://mystore.com/search","search_query":"apple","recommended_code":"apple"}' # with the "source" param curl 'https://api.personaclick.com/push' \ -X 'POST' \ -H 'content-type: application/json' \ -d '{"event":"search","shop_id":"0d42fd8b713d0752776ca589cc0056","did":"7rjVGhMykT","seance":"R5eQXkrKCf","stream":"android","segment":"A","referer":"https://mystore.com/search","search_query":"apple","recommended_code":"apple","source":"{\"from\":\"chain\",\"code\":\"abcdef-0123-4567-9810-012345abcdef\"}"}' |
Adding a product to the wishlist
Method Objective
The method gives the system an understanding the user has added a product to the wishlist.
Parameters
Note |
---|
Only parameters related to the event of adding a product to the wishlist are listed here. See "Basic Details" above for more information on required parameters and the API endpoint. |
Name | Type | Requirement | Description |
---|---|---|---|
event | string | required | The value must be "wish". |
items | Object array | required | For the "wish" event, the array should contain only one object with a product ID. See the example below. |
API Response Code
HTTP status code | Description |
---|---|
200 OK | The request was successful. |
400 Bad Request | The reasons that can cause the error:
|
403 Forbidden | The request was unsuccessful. |
API Response Data
The response is JSON type with the following properties:
Name | Type | Description |
---|---|---|
status | string | Current status. Can have one of two values:
|
message | string | The text of the error if it occurred |
payload | Object | Reserved for the JS SDK internal use |
Request Example
Code Block | ||||
---|---|---|---|---|
| ||||
curl 'https://api.personaclick.com/push' \ -X 'POST' \ -H 'content-type: application/json' \ -d '{"event":"wish","shop_id":"0d42fd8b713d0752776ca589cc0056","did":"7rjVGhMykT","seance":"R5eQXkrKCf","stream":"web","segment":"A","referer":"https://mystore.com/product/100500","items":[{"id":"100500"}]}' # with the "source" param curl 'https://api.personaclick.com/push' \ -X 'POST' \ -H 'content-type: application/json' \ -d '{"event":"wish","shop_id":"0d42fd8b713d0752776ca589cc0056","did":"7rjVGhMykT","seance":"R5eQXkrKCf","stream":"ios","segment":"A","referer":"https://mystore.com/product/100500","items":[{"id":"100500"}],"source":"{\"from\":\"chain\",\"code\":\"abcdef-0123-4567-9810-012345abcdef\"}"}' |
Removing a product from the wishlist
Method Objective
The method gives the system an understanding the user has removed a product from the wishlist.
Parameters
Note |
---|
Only parameters related to the event of removing a product from the wishlist are listed here. See "Basic Details" above for more information on required parameters and the API endpoint. |
Name | Type | Requirement | Description |
---|---|---|---|
event | string | required | The value must be "remove_wish". |
items | Object array | required | For the "remove_wish" event, the array should contain only one object with a product ID. See the example below. |
API Response Code
HTTP status code | Description |
---|---|
200 OK | The request was successful. |
400 Bad Request | The reasons that can cause the error:
|
403 Forbidden | The request was unsuccessful. |
API Response Data
The response is JSON type with the following properties:
Name | Type | Description |
---|---|---|
status | string | Current status. Can have one of two values:
|
message | string | The text of the error if it occurred |
payload | Object | Reserved for the JS SDK internal use |
Request Example
Code Block | ||||
---|---|---|---|---|
| ||||
curl 'https://api.personaclick.com/push' \ -X 'POST' \ -H 'content-type: application/json' \ -d '{"event":"remove_wish","shop_id":"0d42fd8b713d0752776ca589cc0056","did":"7rjVGhMykT","seance":"R5eQXkrKCf","stream":"android","segment":"A","referer":"https://mystore.com/product/100500","items":[{"id":"100500"}]}' # with the "source" param curl 'https://api.personaclick.com/push' \ -X 'POST' \ -H 'content-type: application/json' \ -d '{"event":"remove_wish","shop_id":"0d42fd8b713d0752776ca589cc0056","did":"7rjVGhMykT","seance":"R5eQXkrKCf","stream":"ios","segment":"A","referer":"https://mystore.com/product/100500","items":[{"id":"100500"}],"source":"{\"from\":\"chain\",\"code\":\"abcdef-0123-4567-9810-012345abcdef\"}"}' |
Update the current wishlist
Method Objective
The method gives updates the whole wishlist on the system an understanding that some user event has happenedside.
RequestParameters
Parameters
Note |
---|
Note |
Only parameters related to the event of updating the wishlist are listed here. See See "Basic Details" above for more information on required parameters and the API endpoint. |
Name | Type | Requirement | Description |
---|---|---|---|
event | string | required |
A category is a name that you supply as a way to group some event's properties.
With labels, you can provide additional information for events that you need.
API Response Code
HTTP status code
The request was successful.
The reasons that can cause the error:
- there is no "event" property in the request
- there is no "did" property in the request
API Response Data
The API doesn't return any response for this method.
Request Example
language | js |
---|---|
theme | FadeToGrey |
The value must be "wish". | |||||
items | Object array | required | Object array with the properties of the products in the wishlist. Available properties for each object:
See the example below. | ||
full_wish | boolean | required | Status of the wishlist synchronization. Should always be "true" in this case. See the example below. |
API Response Code
HTTP status code | Description |
---|---|
200 OK | The request was successful. |
400 Bad Request | The reasons that can cause the error:
|
403 Forbidden | The request was unsuccessful. |
API Response Data
The response is JSON type with the following properties:
Name | Type | Description |
---|---|---|
status | string | Current status. Can have one of two values:
|
message | string | The text of the error if it occurred |
Request Examples
Example of synchronization of products in the wishlist.
Code Block | ||||
---|---|---|---|---|
| ||||
curl 'https://api.personaclick.com/push' \
-X 'POST' \
-H 'content-type: application/json' \
-d '{"event":"wish","shop_id":"0d42fd8b713d0752776ca589cc0056","did":"7rjVGhMykT","seance":"R5eQXkrKCf","stream":"ios","segment":"A","referer":"https://mystore.com/wish","items":[{"id":"100500"},{"id":"100123"}],"full_wish":true}' |
Example of the wishlist cleaning.
Code Block | ||||
---|---|---|---|---|
| ||||
curl 'https://api.personaclick.com/push' \
-X 'POST' \
-H 'content-type: application/json' \
-d '{"event":"wish","shop_id":"0d42fd8b713d0752776ca589cc0056","did":"7rjVGhMykT","seance":"R5eQXkrKCf","stream":"web","segment":"A","referer":"https://mystore.com/wish","full_wish":true}' |
Custom Event
Method Objective
The method gives the system an understanding that some user event has happened.
Request
Endpoint | Request Type | Content-Type |
---|---|---|
https://api.personaclick.com/push/custom | POST | application/json |
Parameters
Note |
---|
Only parameters related to the custom event are listed here. See "Basic Details" above for more information on required parameters and the API endpoint. |
Name | Type | Requirement | Description |
---|---|---|---|
event | string | required | Unique custom event key. Must be pre-created in the PersonaClick account: Settings > Custom events. |
category | string | optionally | A category is a name that you supply as a way to group some event's properties. |
label | string | optionally | With labels, you can provide additional information for events that you need. |
value | number | required in some cases | The value property can be any integer and can be used to send a specific value in an event. |
API Response Code
HTTP status code | Description |
---|---|
204 No content | The request was successful. |
400 Bad Request | The reasons that can cause the error:
|
403 Forbidden | The request was unsuccessful. |
API Response Data
The API doesn't return any response for this method.
Request Example
Code Block | ||||
---|---|---|---|---|
| ||||
curl 'https://api.personaclick.com/push/custom' \
-X 'POST' \
-H 'content-type: application/json' \
-d '{"event":"my_event","shop_id":"0d42fd8b713d0752776ca589cc0056","did":"7rjVGhMykT","seance":"R5eQXkrKCf","stream":"web","segment":"A","referer":"https://mystore.com/product/100500","category":"my_category","label":"my_label","value":100500}'
# with the "source" param
curl 'https://api.personaclick.com/push/custom' \
-X 'POST' \
-H 'content-type: application/json \
-d '{"event":"my_event","shop_id":"0d42fd8b713d0752776ca589cc0056","did":"7rjVGhMykT","seance":"R5eQXkrKCf","stream":"web","segment":"A","referer":"https://mystore.com/product/100500","category":"my_category","label":"my_label","value":100500,"source":"{\"from\":\"chain\",\"code\":\"abcdef-0123-4567-9810-012345abcdef\"}"}' |
Receiving App Push
Method Objective
The method makes the system aware of App Push receiving from a specific campaign.
Request
Endpoint | Request Type | Content-Type |
---|---|---|
https://api.personaclick.com/track/received | POST | application/json |
Parameters
Name | Type | Requirement | Description |
---|---|---|---|
shop_id | string | required | Unique Store Key in PersonaClick. Located there: Account > Settings > Store Settings |
code | string | required | Message identifier.
|
type | string | required | Message type.
|
stream | string | required | Data stream code. Alphanumeric string (letters, numbers only). Max length: 16. The empty default value will mean "web". Can be "ios", "android" or any other string. Used to distinguish between mobile apps, websites, and other events sources. |
API Response Code
HTTP status code | Description |
---|---|
200 OK | The request was successful. |
403 Forbidden | The request was unsuccessful. |
API Response Data
The API doesn't return any response for this method.
Request Example
Code Block | ||||
---|---|---|---|---|
| ||||
curl 'https://api.personaclick.com/track/received' \
-X 'POST' \
-H 'Content-Type: application/json' \
-d '{"shop_id":"0d42fd8b713d0752776ca589cc0056","code":"731d5e0c-e3b1-11eb-ba80-0242ac130004","type":"chain","stream":"android"}' |
Clicking on App Push / SMS
Method Objective
The method makes the system aware of App Push or SMS clicking from a specific campaign.
Request
Endpoint | Request Type | Content-Type |
---|---|---|
https://api.personaclick.com/track/clicked | POST | application/json |
Parameters
Name | Type | Requirement | Description | ||
---|---|---|---|---|---|
shop_id | string | required | Unique Store Key in PersonaClick. Located there: Account > Settings > Store Settings | ||
code | string | required | Message identifier.
| ||
type | string | required | Message type.
| ||
stream | string | required | Data stream code. Alphanumeric string (letters, numbers only). Max length: 16. The empty default value will mean "web". Can be "ios", "android", "sms" or any other string. Used to distinguish between mobile apps, websites, and other events sources. |
API Response Code
HTTP status code | Description |
---|---|
200 OK | The request was successful. |
403 Forbidden | The request was unsuccessful. |
API Response Data
The API doesn't return any response for this method.
Request Example
Code Block | ||||
---|---|---|---|---|
| ||||
curl 'https://api.personaclick.com/pushtrack/customclicked' \ -X 'POST' \ -H 'content-type: application/json \ -d '{"event":"my_event","shop_id":"0d42fd8b713d0752776ca589cc0056","did":"7rjVGhMykT","seance":"R5eQXkrKCf","stream":"web","segment":"A","referer":"https://mystore.com/product/100500","category":"my_category","label":"my_label","value":100500,"source":"{\"from\":\"chain\",\"code\":\"abcdef-0123-4567-9810-012345abcdef\"}"}' |
Content-Type: application/json' \
-d '{"shop_id":"0d42fd8b713d0752776ca589cc0056","code":"731d5e0c-e3b1-11eb-ba80-0242ac130004","type":"chain","stream":"android"}' |
Closing App Push
Method Objective
The method makes the system aware of App Push clicking closing from a specific campaign.
Request
Endpoint | Request Type | Content-Type |
---|---|---|
https://api.personaclick.com/web_push_subscriptions/clickedtrack/closed | POST | application/json |
Parameters
Name | Type | Requirement | Description |
---|---|---|---|
shop_id | string | required | Unique Store Key in PersonaClick. Located there: Account > Settings > Store Settings |
code | string | required | Message identifier.
|
type | string | required | Message type.
|
stream | string | required | Data stream code. Alphanumeric string (letters, numbers only). Max length: 16. The empty default value will mean "web". Can be "ios", "android" or any other string. Used to distinguish between mobile apps, websites, and other events sources. |
API Response Code
HTTP status code | Description |
---|---|
200 OK | The request was successful. |
403 Forbidden | The request was unsuccessful. |
API Response Data
The API doesn't return any response for this method.
Request Example
Code Block | ||||
---|---|---|---|---|
| ||||
curl 'https://api.personaclick.com/web_push_subscriptions/clickedtrack/closed' \ -X 'POST' \ -H 'Content-Type: application/json' \ -d '{"shop_id":"0d42fd8b713d0752776ca589cc0056","code":"731d5e0c-e3b1-11eb-ba80-0242ac130004","type":"chain","stream":"android"}' |
Column | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Page Navigation
Related Pages
|