Oracle CrowdTwist Loyalty and Engagement API

The core CrowdTwist REST/JSON API for loyalty program members and their points economy — create, read, update and delete members; award points for activities; read the activity, reward and badge catalogues; redeem rewards; read redemption history, usable coupons, points expiration and the leaderboard. Authentication is a per-client API key sent either as an api_key query parameter or an X-CT-Authorization header, with optional HMAC-SHA-256 request signing. Versioning is per resource: /v2, /v2.1 and /v2.2 are all current at once, and superseded revisions stay online labelled "(legacy)". The host is templated per customer — {client_id} is a CrowdTwist-issued number and the environment prefix selects production, sandbox or a regional instance.

Postman Collection

crowdtwist-starter-kit.postman_collection.json Raw ↑
{
	"info": {
		"_postman_id": "f270fa07-9e57-4266-b8eb-e43b5c6f60d3",
		"name": "CrowdTwist Starter Kit",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "User Management",
			"item": [
				{
					"name": "User Profile",
					"event": [
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "test",
							"script": {
								"exec": [
									"//Test for active account, and verified and opted in email\r",
									"// Documentation for tests: https://learning.postman.com/docs/writing-scripts/script-references/test-examples/\r",
									"\r",
									"pm.test(\"ID exists in CrowdTwist\", () => {\r",
									"//parse the response json and test if ID exists.\r",
									"const responseJson = pm.response.json();\r",
									"  pm.expect(responseJson.id).to.be.a(\"number\");\r",
									"})\r",
									"\r",
									"pm.test(\"Account Is Active\", () => {\r",
									"    //parse the response json and test three properties\r",
									"    const responseJson = pm.response.json();\r",
									"    pm.expect(responseJson.is_active).to.eql(true);\r",
									"})\r",
									"\r",
									"pm.test(\"Email Is Verified\", () => {\r",
									"    //parse the response json and test three properties\r",
									"    const responseJson = pm.response.json();\r",
									"    pm.expect(responseJson.email_is_verified).to.eql(true);\r",
									"})\r",
									"\r",
									"pm.test(\"Email Is Opted In\", () => {\r",
									"    //parse the response json and test three properties\r",
									"    const responseJson = pm.response.json();\r",
									"    pm.expect(responseJson.receive_email_updates).to.eql(true);\r",
									"})"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "*/*"
							}
						],
						"url": {
							"raw": "https://{{environment}}api{{client_id}}.crowdtwist.com/v2/users/{{user_id}}/?id_type={{id_type}}",
							"protocol": "https",
							"host": [
								"{{environment}}api{{client_id}}",
								"crowdtwist",
								"com"
							],
							"path": [
								"v2",
								"users",
								"{{user_id}}",
								""
							],
							"query": [
								{
									"key": "id_type",
									"value": "{{id_type}}"
								}
							]
						},
						"description": "## User Profile\n[UserProfile.html](https://docs.oracle.com/en/cloud/saas/marketing/crowdtwist-develop/Developers/UserProfile.html)\n\n| Item| Value|\n| ----------- | ----------- |\n| Description| Returns user profile for a given member.|\n| Method | GET|\n|Endpoint|https://[environment]api[client_id].crowdtwist.com/v2/users/[user_id]/?api_key=[api_key]&id_type=[id_type]|\n\n### Log\n- Thu July 1, 2021 working as expected. Added in the test to check if account is active, email is verified, and email is opted in."
					},
					"response": [
						{
							"name": "User Profile",
							"originalRequest": {
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "*/*"
									}
								],
								"url": {
									"raw": "https://{{environment}}api{{client_id}}.crowdtwist.com/v2/users/{{user_id}}/?id_type={{id_type}}",
									"protocol": "https",
									"host": [
										"{{environment}}api{{client_id}}",
										"crowdtwist",
										"com"
									],
									"path": [
										"v2",
										"users",
										"{{user_id}}",
										""
									],
									"query": [
										{
											"key": "id_type",
											"value": "{{id_type}}"
										}
									]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "json",
							"header": [
								{
									"key": "Date",
									"value": "Tue, 03 Aug 2021 15:34:52 GMT"
								},
								{
									"key": "Content-Type",
									"value": "application/json"
								},
								{
									"key": "Content-Length",
									"value": "876"
								},
								{
									"key": "Connection",
									"value": "keep-alive"
								},
								{
									"key": "Server",
									"value": "Apache"
								},
								{
									"key": "Vary",
									"value": "Accept-Encoding,User-Agent"
								},
								{
									"key": "Content-Encoding",
									"value": "gzip"
								},
								{
									"key": "p3p",
									"value": "policyref=\"http://www.crowdtwist.com/w3c/p3p.xml\",CP=\"CT \""
								},
								{
									"key": "Expires",
									"value": "Thu, 08 Jul 1976 20:00:00 GMT"
								},
								{
									"key": "Cache-Control",
									"value": "no-cache, must-revalidate"
								},
								{
									"key": "Pragma",
									"value": "no-cache"
								}
							],
							"cookie": [],
							"body": "{\n    \"id\": 261947736,\n    \"first_name\": \"Jacob\",\n    \"middle_name\": null,\n    \"last_name\": \"OracleCrowdTwist\",\n    \"date_of_birth\": null,\n    \"email_address\": \"oraclecrowdtwist@gmail.com\",\n    \"email_is_verified\": true,\n    \"username\": \"oraclecrowdtwist\",\n    \"mobile_phone_number\": \"2098090783\",\n    \"third_party_id\": null,\n    \"is_active\": true,\n    \"gender_id\": null,\n    \"gender\": null,\n    \"extra_data\": null,\n    \"continent\": \"North America\",\n    \"country\": \"United States\",\n    \"us_region\": \"West\",\n    \"ca_province\": null,\n    \"state\": \"CA\",\n    \"city\": \"San Francisco\",\n    \"street_address_1\": null,\n    \"street_address_2\": null,\n    \"postal_code\": \"94111\",\n    \"receive_email_updates\": false,\n    \"date_receive_email_opt_in\": null,\n    \"date_receive_email_opt_out\": null,\n    \"total_points\": 310,\n    \"redeemable_points\": 310,\n    \"num_points_purchased\": 0,\n    \"facebook_access_token\": null,\n    \"facebook_user_id\": null,\n    \"date_fb_token_expires\": null,\n    \"twitter_oauth_token\": null,\n    \"twitter_oauth_token_secret\": null,\n    \"pinterest_access_token\": null,\n    \"pinterest_user_id\": null,\n    \"inst_access_token\": null,\n    \"inst_username\": null,\n    \"inst_user_id\": null,\n    \"activity_stream_opt_in\": true,\n    \"store_id\": null,\n    \"date_last_login\": 1623193474,\n    \"date_last_updated\": 1627934651,\n    \"date_created\": 1623193418,\n    \"rank\": null,\n    \"weekly_rank\": null,\n    \"monthly_rank\": null,\n    \"password\": null,\n    \"salt\": null,\n    \"hash_algorithm_id\": \"5\",\n    \"password_generated\": \"0\",\n    \"lang_pref\": null,\n    \"sign_up_channel_id\": \"2\",\n    \"referral_url\": \"https://www.bowlero.com/mvbrewards-login?_cts_=iuCxccxH\",\n    \"fan_level\": \"Member\",\n    \"tier_info\": {\n        \"timeframe_score\": null,\n        \"tier_score\": null,\n        \"current_level\": {\n            \"title\": \"Member\",\n            \"min_value\": 0,\n            \"max_value\": 100000000,\n            \"image_url\": null\n        },\n        \"next_level\": null,\n        \"levels_above\": [],\n        \"levels_below\": [],\n        \"date_assigned\": null,\n        \"expiration_date\": null,\n        \"reset_date\": null,\n        \"score_needed_to_reach\": null,\n        \"score_needed_to_maintain\": null,\n        \"days_until_expiration_date\": null,\n        \"days_until_reset_date\": null,\n        \"is_maintenance_mode\": null,\n        \"date_reached\": null,\n        \"assigned_by_event\": null\n    },\n    \"segments\": [],\n    \"household_id\": null,\n    \"custom_data\": {\n        \"opt_in_email\": \"true\",\n        \"store_loc\": \"575\"\n    }\n}"
						}
					]
				},
				{
					"name": "User Create",
					"event": [
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Accept",
								"value": "*/*"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"email_address\": \"{{$randomExampleEmail}}\",\r\n    \"last_name\": \"{{$randomLastName}}\",\r\n    \"first_name\": \"{{$randomFirstName}}\",\r\n    \"mobile_phone_number\": \"{{$randomPhoneNumber}}‬‬\",\r\n    \"postal_code\": \"94111\",\r\n    \"date_of_birth\": 344754000,\r\n    \"email_is_verified\": 1,\r\n    \"send_verify_email\": 1,\r\n    \"sign_up_channel_id\": 2\r\n}"
						},
						"url": {
							"raw": "https://{{environment}}api{{client_id}}.crowdtwist.com/v2/users?",
							"protocol": "https",
							"host": [
								"{{environment}}api{{client_id}}",
								"crowdtwist",
								"com"
							],
							"path": [
								"v2",
								"users"
							],
							"query": [
								{
									"key": "",
									"value": null
								}
							]
						},
						"description": "## User Create\n[UserCreate.html](https://docs.oracle.com/en/cloud/saas/marketing/crowdtwist-develop/Developers/UserCreate.html)\n\n| Item| Value|\n| ----------- | ----------- |\n| Description|To create a user via the CrowdTwist API, you must perform an HTTP POST request with a JSON object.|\n| Method |POST|\n|Endpoint|https://[environment]api[client_id].crowdtwist.com/v2/users?api_key=[api_key]|\n\n#### Instructions For Use\n\nRequired fields and regularly used fields are included."
					},
					"response": [
						{
							"name": "User Create response example",
							"originalRequest": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "Accept",
										"value": "*/*"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\r\n  \"email_address\": \"{{$randomExampleEmail}}\",\r\n  \"last_name\": \"{{$randomLastName}}\",\r\n  \"first_name\": \"{{$randomFirstName}}\",\r\n  \"mobile_phone_number\": \"{{$randomPhoneNumber}}‬‬\",\r\n  \"postal_code\": \"94111\",\r\n  \"date_of_birth\": 344754000,\r\n  \"username\": \"{{$randomUserName}}\",\r\n  \"password\": \"{{$randomPassword}}\",\r\n  \"email_is_verified\": 1,\r\n  \"send_verify_email\": 1,\r\n  \"sign_up_channel_id\": 2\r\n}"
								},
								"url": {
									"raw": "https://{{environment}}api{{client_id}}.crowdtwist.com/v2/users?",
									"protocol": "https",
									"host": [
										"{{environment}}api{{client_id}}",
										"crowdtwist",
										"com"
									],
									"path": [
										"v2",
										"users"
									],
									"query": [
										{
											"key": "",
											"value": null
										}
									]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "json",
							"header": [
								{
									"key": "Date",
									"value": "Wed, 01 Sep 2021 23:11:32 GMT"
								},
								{
									"key": "Content-Type",
									"value": "application/json"
								},
								{
									"key": "Content-Length",
									"value": "1088"
								},
								{
									"key": "Connection",
									"value": "keep-alive"
								},
								{
									"key": "Server",
									"value": "Apache"
								},
								{
									"key": "Set-Cookie",
									"value": "prod_prod_ss_ctjr_2_68=52a19118440b770e13f7a73bfae227e4114436e755d08760886417132cd3cbc9-63a5d45fe0501e6d37145516bd0f1d6d1b91de87; expires=Thu, 01-Sep-2022 23:11:32 GMT; Max-Age=31536000; path=/; domain=.crowdtwist.com; secure; SameSite=None"
								},
								{
									"key": "Set-Cookie",
									"value": "prod_prod_ctjr_2_68=52a19118440b770e13f7a73bfae227e4114436e755d08760886417132cd3cbc9-63a5d45fe0501e6d37145516bd0f1d6d1b91de87; expires=Thu, 01-Sep-2022 23:11:32 GMT; Max-Age=31536000; path=/; domain=.crowdtwist.com; secure"
								},
								{
									"key": "Set-Cookie",
									"value": "prod_prod_ss_cti=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/; domain=.crowdtwist.com; secure; SameSite=None"
								},
								{
									"key": "Set-Cookie",
									"value": "prod_prod_cti=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/; domain=.crowdtwist.com; secure"
								},
								{
									"key": "Vary",
									"value": "Accept-Encoding,User-Agent"
								},
								{
									"key": "Content-Encoding",
									"value": "gzip"
								},
								{
									"key": "p3p",
									"value": "policyref=\"http://www.crowdtwist.com/w3c/p3p.xml\",CP=\"CT \""
								},
								{
									"key": "Expires",
									"value": "Thu, 08 Jul 1976 20:00:00 GMT"
								},
								{
									"key": "Cache-Control",
									"value": "no-cache, must-revalidate"
								},
								{
									"key": "Pragma",
									"value": "no-cache"
								}
							],
							"cookie": [],
							"body": "{\n    \"id\": 269654579,\n    \"first_name\": \"Morris\",\n    \"middle_name\": null,\n    \"last_name\": \"DuBuque\",\n    \"date_of_birth\": 344754000,\n    \"email_address\": \"osvaldo.sauer75@example.net\",\n    \"email_is_verified\": true,\n    \"username\": \"Broderick_Weimann52\",\n    \"mobile_phone_number\": \"7842479094\",\n    \"third_party_id\": null,\n    \"is_active\": true,\n    \"gender_id\": null,\n    \"gender\": null,\n    \"extra_data\": null,\n    \"continent\": \"North America\",\n    \"country\": \"United States\",\n    \"us_region\": \"West\",\n    \"ca_province\": null,\n    \"state\": \"CA\",\n    \"city\": \"San Francisco\",\n    \"street_address_1\": null,\n    \"street_address_2\": null,\n    \"postal_code\": \"94111\",\n    \"receive_email_updates\": true,\n    \"date_receive_email_opt_in\": null,\n    \"date_receive_email_opt_out\": null,\n    \"total_points\": 170,\n    \"redeemable_points\": 170,\n    \"num_points_purchased\": 0,\n    \"facebook_access_token\": null,\n    \"facebook_user_id\": null,\n    \"date_fb_token_expires\": null,\n    \"twitter_oauth_token\": null,\n    \"twitter_oauth_token_secret\": null,\n    \"pinterest_access_token\": null,\n    \"pinterest_user_id\": null,\n    \"inst_access_token\": null,\n    \"inst_username\": null,\n    \"inst_user_id\": null,\n    \"activity_stream_opt_in\": true,\n    \"store_id\": null,\n    \"date_last_login\": null,\n    \"date_last_updated\": 1630537892,\n    \"date_created\": 1630537892,\n    \"rank\": null,\n    \"weekly_rank\": null,\n    \"monthly_rank\": null,\n    \"password\": null,\n    \"salt\": null,\n    \"hash_algorithm_id\": \"4\",\n    \"password_generated\": \"0\",\n    \"lang_pref\": null,\n    \"sign_up_channel_id\": \"2\",\n    \"referral_url\": \"http://demo.crowdtwist.com?_cts_=LjS2tZpG\",\n    \"fan_level\": \"Bronze\",\n    \"tier_info\": {\n        \"timeframe_score\": 0,\n        \"tier_score\": 0,\n        \"current_level\": {\n            \"title\": \"Bronze\",\n            \"min_value\": null,\n            \"max_value\": 999,\n            \"image_url\": \"https://cdn.crowdtwist.com/img/v2/a26914951d3f54ddb46d3ecba156b9c64475bd0e/w/h/0/image.png\"\n        },\n        \"next_level\": {\n            \"title\": \"Silver\",\n            \"min_value\": 1000,\n            \"max_value\": 4999,\n            \"image_url\": \"https://cdn.crowdtwist.com/img/v2/835250e5407a61426551319dda3ecf048789c4e8/w/h/0/image.png\"\n        },\n        \"levels_above\": [\n            {\n                \"title\": \"Silver\",\n                \"min_value\": 1000,\n                \"max_value\": 4999,\n                \"image_url\": \"https://cdn.crowdtwist.com/img/v2/835250e5407a61426551319dda3ecf048789c4e8/w/h/0/image.png\"\n            },\n            {\n                \"title\": \"Gold\",\n                \"min_value\": 5000,\n                \"max_value\": 9999,\n                \"image_url\": \"https://cdn.crowdtwist.com/img/v2/1f2d09d30cb041cac90675f1ab8a6e0d218dcd1d/w/h/0/image.png\"\n            },\n            {\n                \"title\": \"Platinum\",\n                \"min_value\": 10000,\n                \"max_value\": null,\n                \"image_url\": \"https://cdn.crowdtwist.com/img/v2/5efea8381db2431f576a7fb12b3b9d6f18afe405/w/h/0/image.png\"\n            }\n        ],\n        \"levels_below\": [],\n        \"date_assigned\": \"2021-09-01T23:11:32Z\",\n        \"expiration_date\": null,\n        \"reset_date\": null,\n        \"score_needed_to_reach\": 1000,\n        \"score_needed_to_maintain\": null,\n        \"days_until_expiration_date\": null,\n        \"days_until_reset_date\": null,\n        \"is_maintenance_mode\": true,\n        \"date_reached\": \"2021-09-01T23:11:32Z\",\n        \"assigned_by_event\": \"start\"\n    },\n    \"segments\": [],\n    \"household_id\": null\n}"
						}
					]
				},
				{
					"name": "User Update",
					"event": [
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Accept",
								"value": "*/*"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"receive_email_updates\": 1\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "https://{{environment}}api{{client_id}}.crowdtwist.com/v2/users/{{user_id}}?id_type={{id_type}}",
							"protocol": "https",
							"host": [
								"{{environment}}api{{client_id}}",
								"crowdtwist",
								"com"
							],
							"path": [
								"v2",
								"users",
								"{{user_id}}"
							],
							"query": [
								{
									"key": "id_type",
									"value": "{{id_type}}"
								}
							]
						},
						"description": "## User Update\n[UserUpdate.html](https://docs.oracle.com/en/cloud/saas/marketing/crowdtwist-develop/Developers/UserUpdate.html)\n\n| Item| Value|\n| ----------- | ----------- |\n| Description| Update an existing CrowdTwist user, you must perform an HTTP PUT request with a JSON object.|\n| Method |PUT|\n|Endpoint|https://[environment]api[client_id].crowdtwist.com/v2/users/[user_id]?api_key=[api_key]&id_type=[id_type]|\n\n#### Instructions For Use\n\nInclude fields you wish to update."
					},
					"response": [
						{
							"name": "User Update response example",
							"originalRequest": {
								"method": "PUT",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "Accept",
										"value": "*/*"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\r\n    \"receive_email_updates\": 1\r\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "https://{{environment}}api{{client_id}}.crowdtwist.com/v2/users/{{user_id}}?id_type={{id_type}}",
									"protocol": "https",
									"host": [
										"{{environment}}api{{client_id}}",
										"crowdtwist",
										"com"
									],
									"path": [
										"v2",
										"users",
										"{{user_id}}"
									],
									"query": [
										{
											"key": "id_type",
											"value": "{{id_type}}"
										}
									]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "json",
							"header": [
								{
									"key": "Date",
									"value": "Wed, 01 Sep 2021 23:12:26 GMT"
								},
								{
									"key": "Content-Type",
									"value": "application/json"
								},
								{
									"key": "Content-Length",
									"value": "1074"
								},
								{
									"key": "Connection",
									"value": "keep-alive"
								},
								{
									"key": "Server",
									"value": "Apache"
								},
								{
									"key": "Vary",
									"value": "Accept-Encoding,User-Agent"
								},
								{
									"key": "Content-Encoding",
									"value": "gzip"
								},
								{
									"key": "p3p",
									"value": "policyref=\"http://www.crowdtwist.com/w3c/p3p.xml\",CP=\"CT \""
								},
								{
									"key": "Expires",
									"value": "Thu, 08 Jul 1976 20:00:00 GMT"
								},
								{
									"key": "Cache-Control",
									"value": "no-cache, must-revalidate"
								},
								{
									"key": "Pragma",
									"value": "no-cache"
								}
							],
							"cookie": [],
							"body": "{\n    \"id\": 253780818,\n    \"first_name\": \"Jacob\",\n    \"middle_name\": null,\n    \"last_name\": \"Hasltead\",\n    \"date_of_birth\": null,\n    \"email_address\": \"jacob.halstead@oracle.com\",\n    \"email_is_verified\": true,\n    \"username\": \"jacob.halstead\",\n    \"mobile_phone_number\": null,\n    \"third_party_id\": null,\n    \"is_active\": true,\n    \"gender_id\": \"2\",\n    \"gender\": \"Male\",\n    \"extra_data\": null,\n    \"continent\": \"North America\",\n    \"country\": \"United States\",\n    \"us_region\": \"West\",\n    \"ca_province\": null,\n    \"state\": \"CA\",\n    \"city\": \"San Francisco\",\n    \"street_address_1\": null,\n    \"street_address_2\": null,\n    \"postal_code\": \"94111\",\n    \"receive_email_updates\": true,\n    \"date_receive_email_opt_in\": null,\n    \"date_receive_email_opt_out\": null,\n    \"total_points\": 222624,\n    \"redeemable_points\": 2599,\n    \"num_points_purchased\": 0,\n    \"facebook_access_token\": null,\n    \"facebook_user_id\": null,\n    \"date_fb_token_expires\": null,\n    \"twitter_oauth_token\": null,\n    \"twitter_oauth_token_secret\": null,\n    \"pinterest_access_token\": null,\n    \"pinterest_user_id\": null,\n    \"inst_access_token\": null,\n    \"inst_username\": null,\n    \"inst_user_id\": null,\n    \"activity_stream_opt_in\": true,\n    \"store_id\": null,\n    \"date_last_login\": 1630535953,\n    \"date_last_updated\": 1630537945,\n    \"date_created\": 1616008413,\n    \"rank\": null,\n    \"weekly_rank\": null,\n    \"monthly_rank\": null,\n    \"password\": null,\n    \"salt\": null,\n    \"hash_algorithm_id\": \"4\",\n    \"password_generated\": \"1\",\n    \"lang_pref\": null,\n    \"sign_up_channel_id\": null,\n    \"referral_url\": \"http://demo.crowdtwist.com?_cts_=BfSZ2ZXO\",\n    \"fan_level\": \"Platinum\",\n    \"tier_info\": {\n        \"timeframe_score\": 222624,\n        \"tier_score\": 212624,\n        \"current_level\": {\n            \"title\": \"Platinum\",\n            \"min_value\": 10000,\n            \"max_value\": null,\n            \"image_url\": \"https://cdn.crowdtwist.com/img/v2/5efea8381db2431f576a7fb12b3b9d6f18afe405/w/h/0/image.png\"\n        },\n        \"next_level\": null,\n        \"levels_above\": [],\n        \"levels_below\": [\n            {\n                \"title\": \"Bronze\",\n                \"min_value\": null,\n                \"max_value\": 999,\n                \"image_url\": \"https://cdn.crowdtwist.com/img/v2/a26914951d3f54ddb46d3ecba156b9c64475bd0e/w/h/0/image.png\"\n            },\n            {\n                \"title\": \"Silver\",\n                \"min_value\": 1000,\n                \"max_value\": 4999,\n                \"image_url\": \"https://cdn.crowdtwist.com/img/v2/835250e5407a61426551319dda3ecf048789c4e8/w/h/0/image.png\"\n            },\n            {\n                \"title\": \"Gold\",\n                \"min_value\": 5000,\n                \"max_value\": 9999,\n                \"image_url\": \"https://cdn.crowdtwist.com/img/v2/1f2d09d30cb041cac90675f1ab8a6e0d218dcd1d/w/h/0/image.png\"\n            }\n        ],\n        \"date_assigned\": \"2021-03-30T23:37:27Z\",\n        \"expiration_date\": null,\n        \"reset_date\": null,\n        \"score_needed_to_reach\": null,\n        \"score_needed_to_maintain\": null,\n        \"days_until_expiration_date\": null,\n        \"days_until_reset_date\": null,\n        \"is_maintenance_mode\": true,\n        \"date_reached\": \"2021-03-30T23:37:27Z\",\n        \"assigned_by_event\": \"jump\"\n    },\n    \"segments\": [],\n    \"household_id\": null\n}"
						}
					]
				},
				{
					"name": "User Authentication Sign In",
					"event": [
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"\r",
									"// Access collection variables and create a concanenated string\r",
									"var str_1 =\r",
									"    \"id_type=\" + pm.environment.get(\"id_type\") + \"&redirect=\" + pm.environment.get(\"redirect\") + \"&user_id=\" + pm.environment.get(\"user_id\") + \"&verified=\" + pm.environment.get(\"verified\") + pm.environment.get(\"client_api_key\");\r",
									"\r",
									"// Use the CryptoJS\r",
									"var hash = CryptoJS.MD5(str_1).toString();\r",
									"\r",
									"// Set the new collection variable\r",
									"pm.variables.set(\"api_sig\", hash);"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"auth": {
							"type": "noauth"
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "urlencoded",
							"urlencoded": [
								{
									"key": "redirect",
									"value": "{{redirect}}",
									"type": "text"
								},
								{
									"key": "id_type",
									"value": "{{id_type}}",
									"type": "text"
								},
								{
									"key": "user_id",
									"value": "{{user_id}}",
									"type": "text"
								},
								{
									"key": "verified",
									"value": "{{verified}}",
									"type": "text"
								}
							]
						},
						"url": {
							"raw": "https://{{url_of_program}}/http/v2/auth-sign-in?api_sig={{api_sig}}",
							"protocol": "https",
							"host": [
								"{{url_of_program}}"
							],
							"path": [
								"http",
								"v2",
								"auth-sign-in"
							],
							"query": [
								{
									"key": "api_sig",
									"value": "{{api_sig}}"
								}
							]
						},
						"description": "## User Authentication Sign In\n[UserAuthenticationSignIn.html](https://docs.oracle.com/en/cloud/saas/marketing/crowdtwist-develop/Developers/UserAuthenticationSignIn.html)\n\n| Item| Value|\n| ----------- | ----------- |\n| Description|In order to login a user to your loyalty program, the “auth-sign-in” endpoint can be used.<br>This endpoint will return:<br>1. A URL to redirect the end user to<br>2. Cookies will be set in the urlofprogram.com domain and the user will be redirected to a second URL<br>3. Cookies will be set in the crowdtwist.com domain and the user will be redirected to the final URL|\n| Method |POST|\n|Endpoint|https://[url_of_program]/http/v2/auth-sign-in?api_sig=[api signature]|\n|Content Type|application/x-www-form-urlencoded|\n\n#### Instructions For Use\n\nThis call will add cookies to a browser that will log in an account to a CrowdTwist environment.  Using a CrowdTwist test document that widgets set to the sign out state, invoking this API call will return a re-direct link in Response payload. Open this re-direct link the browser where the test document is open, and refresh the browser. The account will be logged into the CrowdTwist environment, and widgets will pull in relevant loyalty information."
					},
					"response": [
						{
							"name": "User Authentication Sign In response example",
							"originalRequest": {
								"method": "POST",
								"header": [],
								"body": {
									"mode": "urlencoded",
									"urlencoded": [
										{
											"key": "redirect",
											"value": "{{redirect}}",
											"type": "text"
										},
										{
											"key": "id_type",
											"value": "{{id_type}}",
											"type": "text"
										},
										{
											"key": "user_id",
											"value": "{{user_id}}",
											"type": "text"
										},
										{
											"key": "verified",
											"value": "{{verified}}",
											"type": "text"
										}
									]
								},
								"url": {
									"raw": "https://{{url_of_program}}/http/v2/auth-sign-in?api_sig={{api_sig}}",
									"protocol": "https",
									"host": [
										"{{url_of_program}}"
									],
									"path": [
										"http",
										"v2",
										"auth-sign-in"
									],
									"query": [
										{
											"key": "api_sig",
											"value": "{{api_sig}}"
										}
									]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "json",
							"header": [
								{
									"key": "Date",
									"value": "Wed, 01 Sep 2021 23:13:30 GMT"
								},
								{
									"key": "Content-Type",
									"value": "application/json"
								},
								{
									"key": "Content-Length",
									"value": "282"
								},
								{
									"key": "Connection",
									"value": "keep-alive"
								},
								{
									"key": "Server",
									"value": "Apache"
								},
								{
									"key": "Vary",
									"value": "Accept-Encoding,User-Agent"
								},
								{
									"key": "Content-Encoding",
									"value": "gzip"
								},
								{
									"key": "p3p",
									"value": "policyref=\"http://www.crowdtwist.com/w3c/p3p.xml\",CP=\"CT \""
								},
								{
									"key": "Expires",
									"value": "Thu, 08 Jul 1976 20:00:00 GMT"
								},
								{
									"key": "Cache-Control",
									"value": "no-cache, must-revalidate"
								},
								{
									"key": "Pragma",
									"value": "no-cache"
								},
								{
									"key": "Content-Security-Policy",
									"value": "frame-ancestors 'self'"
								},
								{
									"key": "X-Frame-Options",
									"value": "SAMEORIGIN"
								}
							],
							"cookie": [],
							"body": "{\n    \"redirect_url\": \"https://demo.crowdtwist.com/auth-login/54ae3e23d89e64cdc8c8022f502dfe28a3067548ef9dd9d9-39bc3ada9aaec9567ee240be6af0277132c3629f?r=http%3A%2F%2Fwww.crowdtwist.com%2F%3Femail_address%3D%26timestamp%3D1630538010%26user_id%3D253780818%26username%3Djacob.halstead%26verified%3D1%26sig%3D6243b863a8fd31cc4d27d6249e491df8\",\n    \"verified\": \"verified\",\n    \"user_id\": \"253780818\"\n}"
						}
					]
				},
				{
					"name": "User Authentication Sign Out",
					"event": [
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"// Access collection variables and create a concanenated string\r",
									"var str_1 =\r",
									"    \"redirect=\" + pm.environment.get(\"redirect\") + pm.environment.get(\"client_api_key\");\r",
									"\r",
									"// Use the CryptoJS\r",
									"var hash = CryptoJS.MD5(str_1).toString();\r",
									"\r",
									"// Set the new collection variable\r",
									"pm.variables.set(\"api_sig\", hash);"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 302\", function () {\r",
									"    pm.response.to.have.status(302);\r",
									"});\r",
									"pm.test(\"Status code name has string Found\", function () {\r",
									"    pm.response.to.have.status(\"Found\");\r",
									"});\r",
									"pm.test(\"Response time is less than 700ms\", function () {\r",
									"    pm.expect(pm.response.responseTime).to.be.below(700);\r",
									"});\r",
									"pm.test(\"Header 'Location' is present\", function () {\r",
									"    pm.response.to.have.header(\"Location\");\r",
									"});\r",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"protocolProfileBehavior": {
						"disableBodyPruning": true,
						"maxRedirects": 1,
						"followRedirects": false
					},
					"request": {
						"auth": {
							"type": "noauth"
						},
						"method": "GET",
						"header": [
							{
								"key": "content-type",
								"value": "message/http",
								"type": "text"
							}
						],
						"body": {
							"mode": "urlencoded",
							"urlencoded": []
						},
						"url": {
							"raw": "https://{{url_of_program}}/http/v2/auth-sign-out?redirect={{redirect}}&api_sig={{api_sig}}",
							"protocol": "https",
							"host": [
								"{{url_of_program}}"
							],
							"path": [
								"http",
								"v2",
								"auth-sign-out"
							],
							"query": [
								{
									"key": "redirect",
									"value": "{{redirect}}"
								},
								{
									"key": "api_sig",
									"value": "{{api_sig}}"
								}
							]
						},
						"description": "## User Authentication Sign Out\n[UserAuthenticationSignOut.html](https://docs.oracle.com/en/cloud/saa

# --- truncated at 32 KB (60 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/crowdtwist/refs/heads/main/postman/crowdtwist-starter-kit.postman_collection.json