{
	"info": {
		"_postman_id": "6397be06-1681-4eb9-a3a9-ad29013ac685",
		"name": "Partner API",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "39093723"
	},
	"item": [
		{
			"name": "Metadata",
			"item": [
				{
					"name": "Get Scopes",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-ClientId",
								"value": "{client_id}"
							},
							{
								"key": "Accept-Version",
								"value": "v4.0"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {access_token}"
							}
						],
						"url": {
							"raw": "https://api.thanxsandbox.com/partner/scopes",
							"protocol": "https",
							"host": [
								"api",
								"thanxsandbox",
								"com"
							],
							"path": [
								"partner",
								"scopes"
							]
						}
					},
					"response": []
				},
				{
					"name": "Get Merchants",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-ClientId",
								"value": "{client_id}"
							},
							{
								"key": "Accept-Version",
								"value": "v4.0"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {access_token}"
							}
						],
						"url": {
							"raw": "https://api.thanxsandbox.com/partner/merchants",
							"protocol": "https",
							"host": [
								"api",
								"thanxsandbox",
								"com"
							],
							"path": [
								"partner",
								"merchants"
							]
						}
					},
					"response": []
				},
				{
					"name": "Get Locations",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-ClientId",
								"value": "{client_id}"
							},
							{
								"key": "Accept-Version",
								"value": "v4.0"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {access_token}"
							}
						],
						"url": {
							"raw": "https://api.thanxsandbox.com/partner/locations",
							"protocol": "https",
							"host": [
								"api",
								"thanxsandbox",
								"com"
							],
							"path": [
								"partner",
								"locations"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Subscriber",
			"item": [
				{
					"name": "Create Subscriber",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-ClientId",
								"value": "{client_id}"
							},
							{
								"key": "Accept-Version",
								"value": "v4.0"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {access_token}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"merchant_id\": \"owierywtwt\",\n    \"subscriber\": {\n      \"email\": \"jane.smith@example.com\",\n      \"first_name\": \"Jane\",\n      \"last_name\":  \"Smith\",\n      \"birth_date\": {\n        \"month\": 8,\n        \"day\": 14\n      },\n      \"zip_code\": \"12345\"\n    }\n  }",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "https://api.thanxsandbox.com/partner/subscribers/",
							"protocol": "https",
							"host": [
								"api",
								"thanxsandbox",
								"com"
							],
							"path": [
								"partner",
								"subscribers",
								""
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Users",
			"item": [
				{
					"name": "Get Users",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-ClientId",
								"value": "{client_id}"
							},
							{
								"key": "Accept-Version",
								"value": "v4.0"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {access_token}"
							}
						],
						"url": {
							"raw": "https://api.thanxsandbox.com/partner/users",
							"protocol": "https",
							"host": [
								"api",
								"thanxsandbox",
								"com"
							],
							"path": [
								"partner",
								"users"
							]
						}
					},
					"response": []
				},
				{
					"name": "Get User",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-ClientId",
								"value": "{client_id}"
							},
							{
								"key": "Accept-Version",
								"value": "v4.0"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {access_token}"
							}
						],
						"url": {
							"raw": "https://api.thanxsandbox.com/partner/users/:id",
							"protocol": "https",
							"host": [
								"api",
								"thanxsandbox",
								"com"
							],
							"path": [
								"partner",
								"users",
								":id"
							],
							"variable": [
								{
									"key": "id",
									"value": ""
								}
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Auth",
			"item": [
				{
					"name": "Create Access Token",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-ClientId",
								"value": "${client_id}"
							},
							{
								"key": "Accept-Version",
								"value": "v4.0"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer ${access_token}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"merchant_id\": \"k2lye10h32l5wzo\",\n    \"email\": \"example@example.com\",\n    \"expires_in\": 3600\n  }",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "https://api.thanxsandbox.com/partner/oauth/token",
							"protocol": "https",
							"host": [
								"api",
								"thanxsandbox",
								"com"
							],
							"path": [
								"partner",
								"oauth",
								"token"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Purchases",
			"item": [
				{
					"name": "Create Purchase",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-ClientId",
								"value": "{client_id}"
							},
							{
								"key": "Accept-Version",
								"value": "v4.0"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {access_token}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"purchase\": {\n      \"merchant_id\":  \"weoru\",\n      \"location_id\":  \"hljkfd2345\",\n      \"user_id\":      \"wgljsdwer23\",\n      \"card_id\":      null\n      \"amount\":       13.45,\n      \"purchased_at\": \"2020-09-15T00:52:10.655+00:00\",\n      \"products\":     [\"coffee\", \"pizza\"]\n    }\n  }",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "https://api.thanxsandbox.com/purchases",
							"protocol": "https",
							"host": [
								"api",
								"thanxsandbox",
								"com"
							],
							"path": [
								"purchases"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Tags",
			"item": [
				{
					"name": "Get Tags",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-ClientId",
								"value": "{client_id}"
							},
							{
								"key": "Accept-Version",
								"value": "v4.0"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {access_token}"
							}
						],
						"url": {
							"raw": "https://api.thanxsandbox.com/partner/tags",
							"protocol": "https",
							"host": [
								"api",
								"thanxsandbox",
								"com"
							],
							"path": [
								"partner",
								"tags"
							]
						}
					},
					"response": []
				},
				{
					"name": "Upsert Tags",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "X-ClientId",
								"value": "{client_id}"
							},
							{
								"key": "Accept-Version",
								"value": "v4.0"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {access_token}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"merchant_id\": \"weroifs\",\n    \"user_ids\": [\n      \"wroeiu2304hfwf\",\n      \"73bf1f46769dwr\"\n    ],\n    \"key\": \"allergens\",\n    \"values\": [\n      \"gluten\",\n      \"soy\",\n      \"dairy\",\n      \"honey\"\n    ]\n  }",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "https://api.thanxsandbox.com/partner/tags",
							"protocol": "https",
							"host": [
								"api",
								"thanxsandbox",
								"com"
							],
							"path": [
								"partner",
								"tags"
							]
						}
					},
					"response": []
				},
				{
					"name": "Delete Tag",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "X-ClientId",
								"value": "{client_id}"
							},
							{
								"key": "Accept-Version",
								"value": "v4.0"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {access_token}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"merchant_id\": \"weroifs\",\n    \"user_ids\": [\n      \"wroeiu2304hfwf\",\n      \"73bf1f46769dwr\"\n    ],\n    \"key\": \"allergens\"\n  }",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "https://api.thanxsandbox.com/partner/tags",
							"protocol": "https",
							"host": [
								"api",
								"thanxsandbox",
								"com"
							],
							"path": [
								"partner",
								"tags"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Feedbacks",
			"item": [
				{
					"name": "Get Feedback Records",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-ClientId",
								"value": "{client_id}"
							},
							{
								"key": "Accept-Version",
								"value": "v4.0"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {access_token}"
							}
						],
						"url": {
							"raw": "https://api.thanxsandbox.com/partner/feedbacks",
							"protocol": "https",
							"host": [
								"api",
								"thanxsandbox",
								"com"
							],
							"path": [
								"partner",
								"feedbacks"
							]
						}
					},
					"response": []
				},
				{
					"name": "Respond To Feedback",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-ClientId",
								"value": "{client_id}"
							},
							{
								"key": "Accept-Version",
								"value": "v4.0"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {access_token}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"feedback\": {\n      \"response\": \"Merchants",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "https://api.thanxsandbox.com/feedbacks/590485d6f0/response",
							"protocol": "https",
							"host": [
								"api",
								"thanxsandbox",
								"com"
							],
							"path": [
								"feedbacks",
								"590485d6f0",
								"response"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Comunication Settings",
			"item": [
				{
					"name": "Get User Comunication Settings",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-ClientId",
								"value": "{client_id}"
							},
							{
								"key": "Accept-Version",
								"value": "v4.0"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {access_token}"
							}
						],
						"url": {
							"raw": "https://api.thanxsandbox.com/partner/users/:id/communication_settings",
							"protocol": "https",
							"host": [
								"api",
								"thanxsandbox",
								"com"
							],
							"path": [
								"partner",
								"users",
								":id",
								"communication_settings"
							],
							"variable": [
								{
									"key": "id",
									"value": ""
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Update User Comunication Settings",
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "X-ClientId",
								"value": "{client_id}"
							},
							{
								"key": "Accept-Version",
								"value": "v4.0"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {access_token}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"communication_setting\": {\n      \"reward_progress\": {\n        \"email\": false\n      },\n      \"reward_offer\": {\n        \"notification\": false,\n        \"email\": false\n      },\n      \"marketing_general\": {\n        \"email\": false\n      }\n    }\n  }",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "https://api.thanxsandbox.com/partner/users/:id/communication_settings?merchant_id=owierywtwt",
							"protocol": "https",
							"host": [
								"api",
								"thanxsandbox",
								"com"
							],
							"path": [
								"partner",
								"users",
								":id",
								"communication_settings"
							],
							"query": [
								{
									"key": "merchant_id",
									"value": "owierywtwt"
								}
							],
							"variable": [
								{
									"key": "id",
									"value": ""
								}
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Reward Templates",
			"item": [
				{
					"name": "List Reward Templates",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-ClientId",
								"value": "{client_id}"
							},
							{
								"key": "Accept-Version",
								"value": "v4.0"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {access_token}"
							}
						],
						"url": {
							"raw": "https://api.thanxsandbox.com/partner/reward_templates?merchant_id={merchant_id}",
							"protocol": "https",
							"host": [
								"api",
								"thanxsandbox",
								"com"
							],
							"path": [
								"partner",
								"reward_templates"
							],
							"query": [
								{
									"key": "merchant_id",
									"value": "{merchant_id}"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Get Reward Template",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-ClientId",
								"value": "{client_id}"
							},
							{
								"key": "Accept-Version",
								"value": "v4.0"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {access_token}"
							}
						],
						"url": {
							"raw": "https://api.thanxsandbox.com/partner/reward_templates/:id?merchant_id={merchant_id}",
							"protocol": "https",
							"host": [
								"api",
								"thanxsandbox",
								"com"
							],
							"path": [
								"partner",
								"reward_templates",
								":id"
							],
							"query": [
								{
									"key": "merchant_id",
									"value": "{merchant_id}"
								}
							],
							"variable": [
								{
									"key": "id",
									"value": ""
								}
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Campaigns",
			"item": [
				{
					"name": "List Campaigns",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-ClientId",
								"value": "{client_id}"
							},
							{
								"key": "Accept-Version",
								"value": "v4.0"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {access_token}"
							}
						],
						"url": {
							"raw": "https://api.thanxsandbox.com/partner/campaigns?merchant_id={merchant_id}",
							"protocol": "https",
							"host": [
								"api",
								"thanxsandbox",
								"com"
							],
							"path": [
								"partner",
								"campaigns"
							],
							"query": [
								{
									"key": "merchant_id",
									"value": "{merchant_id}"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Get Campaign",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-ClientId",
								"value": "{client_id}"
							},
							{
								"key": "Accept-Version",
								"value": "v4.0"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {access_token}"
							}
						],
						"url": {
							"raw": "https://api.thanxsandbox.com/partner/campaigns/:id",
							"protocol": "https",
							"host": [
								"api",
								"thanxsandbox",
								"com"
							],
							"path": [
								"partner",
								"campaigns",
								":id"
							],
							"variable": [
								{
									"key": "id",
									"value": ""
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Create Campaign",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-ClientId",
								"value": "{client_id}"
							},
							{
								"key": "Accept-Version",
								"value": "v4.0"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {access_token}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"campaign\": {\n      \"merchant_id\": \"k2lye10h32l5wzo\",\n      \"name\": \"Summer Free Coffee\",\n      \"objective\": \"Re-engage lapsed customers\",\n      \"fine_print\": \"Limit one per customer\",\n      \"start_at\": \"2025-06-01T00:00:00Z\",\n      \"end_at\": \"2025-08-31T23:59:59Z\",\n      \"redeemable_from\": \"2025-06-01T00:00:00Z\",\n      \"redeemable_to\": \"2025-09-30T23:59:59Z\",\n      \"variants\": [\n        {\n          \"name\": \"Treatment\",\n          \"reward_template_id\": \"abc123def456\"\n        },\n        {\n          \"name\": \"Control\"\n        }\n      ]\n    }\n  }",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "https://api.thanxsandbox.com/partner/campaigns",
							"protocol": "https",
							"host": [
								"api",
								"thanxsandbox",
								"com"
							],
							"path": [
								"partner",
								"campaigns"
							]
						}
					},
					"response": []
				},
				{
					"name": "Issue Rewards",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-ClientId",
								"value": "{client_id}"
							},
							{
								"key": "Accept-Version",
								"value": "v4.0"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {access_token}"
							},
							{
								"key": "X-Idempotency-Key",
								"value": "",
								"description": "Optional idempotency key to prevent duplicate issuance jobs"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"campaign_id\": \"camp_abc123\",\n    \"merchant_id\": \"k2lye10h32l5wzo\",\n    \"variant_id\": \"var_treat1\",\n    \"identifiers\": [\n      {\n        \"type\": \"email\",\n        \"value\": \"jane.smith@example.com\"\n      },\n      {\n        \"type\": \"phone\",\n        \"value\": \"+14155551234\"\n      }\n    ]\n  }",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "https://api.thanxsandbox.com/partner/campaigns/issue",
							"protocol": "https",
							"host": [
								"api",
								"thanxsandbox",
								"com"
							],
							"path": [
								"partner",
								"campaigns",
								"issue"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Issuance Jobs",
			"item": [
				{
					"name": "Get Issuance Job",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-ClientId",
								"value": "{client_id}"
							},
							{
								"key": "Accept-Version",
								"value": "v4.0"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {access_token}"
							}
						],
						"url": {
							"raw": "https://api.thanxsandbox.com/partner/issuance_jobs/:id?merchant_id={merchant_id}",
							"protocol": "https",
							"host": [
								"api",
								"thanxsandbox",
								"com"
							],
							"path": [
								"partner",
								"issuance_jobs",
								":id"
							],
							"query": [
								{
									"key": "merchant_id",
									"value": "{merchant_id}"
								}
							],
							"variable": [
								{
									"key": "id",
									"value": ""
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Revoke Issuance Job",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-ClientId",
								"value": "{client_id}"
							},
							{
								"key": "Accept-Version",
								"value": "v4.0"
							},
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {access_token}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"merchant_id\": \"k2lye10h32l5wzo\"\n  }",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "https://api.thanxsandbox.com/partner/issuance_jobs/:id/revoke",
							"protocol": "https",
							"host": [
								"api",
								"thanxsandbox",
								"com"
							],
							"path": [
								"partner",
								"issuance_jobs",
								":id",
								"revoke"
							],
							"variable": [
								{
									"key": "id",
									"value": ""
								}
							]
						}
					},
					"response": []
				}
			]
		}
	]
}
