{
	"info": {
		"_postman_id": "692c4bbf-e32b-47e9-ad43-055488950efa",
		"name": "Pottencial Policies Management Documentation",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "11814266"
	},
	"item": [
		{
			"name": "Autenticação",
			"item": [
				{
					"name": "Gerar Access Token",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var data = JSON.parse(responseBody);\r",
									"pm.collectionVariables.set(\"access_token\", data.access_token);"
								],
								"type": "text/javascript"
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"auth": {
							"type": "basic",
							"basic": [
								{
									"key": "password",
									"value": "{{client_secret}}",
									"type": "string"
								},
								{
									"key": "username",
									"value": "{{client_id}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [
							{
								"key": "client_id",
								"value": "{{client_id}}",
								"type": "text",
								"disabled": true
							},
							{
								"key": "access_token",
								"value": "{{access_token}}",
								"type": "text",
								"disabled": true
							}
						],
						"url": {
							"raw": "{{pottencial_api_url}}/oauth/v3/access-token",
							"host": [
								"{{pottencial_api_url}}"
							],
							"path": [
								"oauth",
								"v3",
								"access-token"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Policies Management",
			"item": [
				{
					"name": "Consultar Apolices e Endossos",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "client_id",
								"value": "a1adab82-3972-3d83-9cf0-fb4bb6816edf",
								"type": "text"
							},
							{
								"key": "access_token",
								"value": "ddb27b7a-6291-4d14-920c-155211c0062a",
								"type": "text"
							},
							{
								"key": "",
								"value": "",
								"description": "ID do produto para o qual foi criada a cotação.",
								"type": "text",
								"disabled": true
							}
						],
						"url": {
							"raw": "{{pottencial_api_url}}/policiesmanagement/v1/policies?Take=100&IssuancePeriodStart=2023-01-01&IssuancePeriodEnd=2023-03-30&Skip=0&PolicyId=22111185-2211-1163-9cae-01b402f41d11&PolicyNumber=0306920239900000000600000&ProposalNumber=1134043&PolicyHolder=11111111111111&PolicyIds=22111185-2211-1163-9cae-01b402f41d11&PolicyIds=22111185-2211-1163-9cae-01b402f41d12&Includes&ProductKey=maquinas-equipamentos&EndOfValidityStart=2025-06-01&EndOfValidityEnd=2025-06-30",
							"host": [
								"{{pottencial_api_url}}"
							],
							"path": [
								"policiesmanagement",
								"v1",
								"policies"
							],
							"query": [
								{
									"key": "Take",
									"value": "100"
								},
								{
									"key": "IssuancePeriodStart",
									"value": "2023-01-01"
								},
								{
									"key": "IssuancePeriodEnd",
									"value": "2023-03-30"
								},
								{
									"key": "Skip",
									"value": "0"
								},
								{
									"key": "PolicyId",
									"value": "22111185-2211-1163-9cae-01b402f41d11"
								},
								{
									"key": "PolicyNumber",
									"value": "0306920239900000000600000"
								},
								{
									"key": "ProposalNumber",
									"value": "1134043"
								},
								{
									"key": "PolicyHolder",
									"value": "11111111111111",
									"description": "Filtro utilizado para obter apolice que foram Nomeadas"
								},
								{
									"key": "PolicyIds",
									"value": "22111185-2211-1163-9cae-01b402f41d11",
									"description": "Identificador de Apólicies ou Endossos emitidos"
								},
								{
									"key": "PolicyIds",
									"value": "22111185-2211-1163-9cae-01b402f41d12",
									"description": "Identificador de Apólicies ou Endossos emitidos"
								},
								{
									"key": "Includes",
									"value": null,
									"description": "Adiciona ou remove informações conforme necessário"
								},
								{
									"key": "ProductKey",
									"value": "maquinas-equipamentos"
								},
								{
									"key": "EndOfValidityStart",
									"value": "2025-06-01"
								},
								{
									"key": "EndOfValidityEnd",
									"value": "2025-06-30"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Consultar Documento Apolices",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "client_id",
								"value": "{{client_id}}",
								"type": "text"
							},
							{
								"key": "access_token",
								"value": "{{access_token}}",
								"type": "text"
							},
							{
								"key": "",
								"value": "",
								"description": "ID do produto para o qual foi criada a cotação.",
								"type": "text",
								"disabled": true
							}
						],
						"url": {
							"raw": "{{pottencial_api_url}}/policiesmanagement/v1/policies/document?policyNumber=0306920221201140006827001&policyId=bc196c0b-dbf5-43be-91bb-59e87510c08b",
							"host": [
								"{{pottencial_api_url}}"
							],
							"path": [
								"policiesmanagement",
								"v1",
								"policies",
								"document"
							],
							"query": [
								{
									"key": "policyNumber",
									"value": "0306920221201140006827001",
									"description": "opcional policyId ou policyNumber"
								},
								{
									"key": "policyId",
									"value": "bc196c0b-dbf5-43be-91bb-59e87510c08b",
									"description": "opcional policyId ou policyNumber"
								}
							]
						}
					},
					"response": []
				}
			]
		}
	],
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		}
	],
	"variable": [
		{
			"key": "pottencial_api_url",
			"value": "https://api-sandbox.pottencial.com.br",
			"type": "string"
		},
		{
			"key": "client_id",
			"value": "a1adab82-3972-3d83-9cf0-fb4bb6816edf",
			"type": "string"
		},
		{
			"key": "access_token",
			"value": "",
			"type": "string"
		},
		{
			"key": "client_secret",
			"value": "36d5d884-af97-3c8e-9a35-fbcfb1e368af",
			"type": "string"
		}
	]
}