Skip to main content
PUT/point-campaign/:id/

Update or create point campaign

You can update a specific point campaign or create if it doesn't exist.

AttributesTypeRequiredDescription
idintegernoA unique identifier for the point campaign which is given by User.com
namestringyesA point campaign name.
start_datedatetimenoA datetime when point campaign starts (in UNIX format).
end_datedatetimenoA datetime when point campaign ends (in UNIX format).
created_atdatetimenoA datetime of point campaign creation.
statusintegernoA point campaign status: Draft = 1, Pending = 2, Active = 3, Finished = 4
assigned_eventsintegernoA counted value based on events assigned to the Point Acquire Rule and Point Exchange Rule.
assigned_product_eventsintegernoA counted value based on product events assigned to the Point Acquire Rule and Point Exchange Rule.
revenue_goalintegernoA sum from all transactions (points) generated by users.
query_mapobjectnoA valid JSON object with a definition of Engagement groups (filters).

Request​

curl --location --request PUT 'https://<your_app_subdomain>.user.com/api/public/point-campaign/1/' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <your_64_char_api_key>' \
--header 'Accept: */*; version=2' \
--data-raw '{ "name": "string", "start_date": "2022-03-09T13:30:58.496Z", "end_date": "2022-03-09T13:30:58.496Z", "assigned_events": [ 0 ], "assigned_product_events": [ 0 ], "revenue_goal": 0, "query_map": {}}'

Response​

{
"id": 1,
"name": "string",
"start_date": "2022-03-09T13:30:58.496000Z",
"end_date": "2022-03-09T13:30:58.496000Z",
"created_at": "2022-03-09T13:56:21.520067Z",
"status": 1,
"assigned_events": [0],
"assigned_product_events": [0],
"revenue_goal": 0,
"query_map": {}
}