{
	"info": {
		"_postman_id": "a76884d2-469b-491c-aa89-010aceaca434",
		"name": "Stop Payments API",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "Get Token",
			"item": [
				{
					"name": "Get token",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"let jsonData = pm.response.json();\r",
									"pm.collectionVariables.set(\"BearerToken\", jsonData.access_token);"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"auth": {
							"type": "noauth"
						},
						"method": "GET",
						"header": [
							{
								"key": "appClientId",
								"value": "{{ClientId}}",
								"type": "text"
							},
							{
								"key": "appClientSecret",
								"value": "{{ClientSecret}}",
								"type": "text"
							},
							{
								"key": "X-Correlation-ID",
								"value": "{{$guid}}",
								"type": "text"
							},
							{
								"key": "X-Source-System",
								"value": "",
								"type": "text",
								"disabled": true
							}
						],
						"url": {
							"raw": "https://{{PUBLIC_HOST}}{{BASE_PATH_TOKEN_SERVICE}}/token?Scope=Informational",
							"protocol": "https",
							"host": [
								"{{PUBLIC_HOST}}{{BASE_PATH_TOKEN_SERVICE}}"
							],
							"path": [
								"token"
							],
							"query": [
								{
									"key": "Scope",
									"value": "Informational"
								}
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Health Check",
			"item": [
				{
					"name": "Healthcheck",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [
							{
								"key": "X-Correlation-ID",
								"value": "{{$guid}}",
								"type": "text"
							},
							{
								"key": "X-Dependent-Ping",
								"value": "false",
								"type": "text"
							},
							{
								"key": "X-Source-System",
								"value": "",
								"type": "default",
								"disabled": true
							}
						],
						"url": {
							"raw": "https://{{PUBLIC_HOST}}{{BASE_PATH_STOPPAYMENT_SERVICE}}/healthcheck",
							"protocol": "https",
							"host": [
								"{{PUBLIC_HOST}}{{BASE_PATH_STOPPAYMENT_SERVICE}}"
							],
							"path": [
								"healthcheck"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Stop Payments",
			"item": [
				{
					"name": "Create Stop Payment Order",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [
							{
								"key": "X-Correlation-ID",
								"type": "text",
								"value": "{{$guid}}"
							},
							{
								"key": "X-Source-System",
								"value": "",
								"type": "default",
								"disabled": true
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"StopPaymentData\": {\r\n        \"CheckIssueDate\": \"2019-04-24\",\r\n        \"StopPaymentType\": \"SingleCheck\",\r\n        \"SerialNumber\": 1234567,\r\n        \"StopPaymentPayee\": \"ABC Company\"\r\n    }\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "https://{{PUBLIC_HOST}}{{BASE_PATH_STOPPAYMENT_SERVICE}}/dp/accounts/{{AccountNumber}}/stopPayments",
							"protocol": "https",
							"host": [
								"{{PUBLIC_HOST}}{{BASE_PATH_STOPPAYMENT_SERVICE}}"
							],
							"path": [
								"dp",
								"accounts",
								"{{AccountNumber}}",
								"stopPayments"
							]
						}
					},
					"response": []
				},
				{
					"name": "Lookup Stop Payments made on an account",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [
							{
								"key": "X-Correlation-ID",
								"type": "text",
								"value": "{{$guid}}"
							},
							{
								"key": "X-Source-System",
								"value": "",
								"type": "default",
								"disabled": true
							}
						],
						"url": {
							"raw": "https://{{PUBLIC_HOST}}{{BASE_PATH_STOPPAYMENT_SERVICE}}/dp/accounts/stopPayments?AccountNumber={{AccountNumber}}",
							"protocol": "https",
							"host": [
								"{{PUBLIC_HOST}}{{BASE_PATH_STOPPAYMENT_SERVICE}}"
							],
							"path": [
								"dp",
								"accounts",
								"stopPayments"
							],
							"query": [
								{
									"key": "AccountNumber",
									"value": "{{AccountNumber}}"
								},
								{
									"key": "StartingSerialNumber",
									"value": null,
									"disabled": true
								},
								{
									"key": "EndingSerialNumber",
									"value": null,
									"disabled": true
								},
								{
									"key": "SearchAmount",
									"value": null,
									"disabled": true
								}
							]
						}
					},
					"response": []
				}
			]
		}
	],
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		}
	],
	"variable": [
		{
			"key": "BearerToken",
			"value": "",
			"type": "default"
		},
		{
			"key": "PUBLIC_HOST",
			"value": "api-connect.westernalliancebank.com",
			"type": "default"
		},
		{
			"key": "ClientId",
			"value": "",
			"type": "default"
		},
		{
			"key": "ClientSecret",
			"value": "",
			"type": "default"
		},
		{
			"key": "AccountNumber",
			"value": "",
			"type": "default"
		},
		{
			"key": "BASE_PATH_TOKEN_SERVICE",
			"value": "/entitlements-get-token-eapi/api/v1",
			"type": "default"
		},
		{
			"key": "BASE_PATH_STOPPAYMENT_SERVICE",
			"value": "/info-stop-payments-eapi/api/v1",
			"type": "default"
		}
	]
}