{
	"info": {
		"_postman_id": "b0d25fde-e85e-45a0-a982-c4cc09688774",
		"name": "Pottencial Partners Documentation",
		"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json",
		"_exporter_id": "14802183"
	},
	"item": [
		{
			"name": "Autenticação",
			"item": [
				{
					"name": "Gerar Access Token",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var data = JSON.parse(responseBody);\r",
									"pm.environment.set(\"access_token\", data.access_token);"
								],
								"type": "text/javascript",
								"packages": {}
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript",
								"packages": {}
							}
						}
					],
					"request": {
						"auth": {
							"type": "basic",
							"basic": {
								"password": "{{client_secret}}",
								"username": "{{client_id}}"
							}
						},
						"method": "POST",
						"header": [
							{
								"key": "client_id",
								"value": "{{client_id}}",
								"uuid": "057cd441-ac72-4b11-9d0e-e444deb3a94f",
								"disabled": true
							},
							{
								"key": "access_token",
								"value": "{{access_token}}",
								"uuid": "d41307fe-3930-4bc7-9ed2-584f33430440",
								"disabled": true
							}
						],
						"url": "{{pottencial_api_url}}/oauth/v3/access-token"
					},
					"response": []
				}
			]
		},
		{
			"name": "Partners",
			"item": [
				{
					"name": "Consultar Comissões",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "client_id",
								"value": "{{client_id}}",
								"type": "text",
								"uuid": "a0c2a3e5-6486-47f6-ba9e-fa3e2d6532d2"
							},
							{
								"key": "access_token",
								"value": "{{access_token}}",
								"type": "text",
								"uuid": "0b3bb765-6ef1-4642-9a77-ea43c1656821"
							}
						],
						"url": {
							"raw": "{{pottencial_api_url}}/partners/v1/partners/commission-statement?statementStartDate=2022-01-01&statementEndDate =2022-12-01",
							"host": [
								"{{pottencial_api_url}}"
							],
							"path": [
								"partners",
								"v1",
								"partners",
								"commission-statement"
							],
							"query": [
								{
									"key": "statementStartDate",
									"value": "2022-01-01"
								},
								{
									"key": "statementEndDate ",
									"value": "2022-12-01"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Consulta de Corretoras",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "client_id",
								"value": "5b7b10d4-4948-36f0-a41f-9df929f73305",
								"uuid": "a9c60131-f5b1-4502-920a-387a554838f5"
							},
							{
								"key": "access_token",
								"value": "{{access_token}}",
								"uuid": "e6616613-4a0e-4580-9c9a-cf289200c9d9"
							}
						],
						"url": {
							"raw": "{{pottencial_api_url}}/partners/v1/commission-agents/brokers?DocumentNumbers=12977818000148",
							"host": [
								"{{pottencial_api_url}}"
							],
							"path": [
								"partners",
								"v1",
								"commission-agents",
								"brokers"
							],
							"query": [
								{
									"key": "DocumentNumbers",
									"value": "12977818000148",
									"description": "CPF/CNPJ  do corretor"
								},
								{
									"key": "DocumentNumbers",
									"value": "2222222222",
									"description": "CPF/CNPJ do Corretor",
									"disabled": true
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Consultar Licitações",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "client_id",
								"value": "{{client_id}}",
								"type": "text",
								"uuid": "a743fd50-5943-4df9-92d3-50e2ee00807e"
							},
							{
								"key": "access_token",
								"value": "{{access_token}}",
								"type": "text",
								"uuid": "1a6bd145-78f6-4db1-82fc-afcf5f9a1daf"
							},
							{
								"key": "statementStartDate",
								"value": "'2022-02-01'",
								"description": "filtro por período demonstrativo inicial (emissão) do evento",
								"type": "text",
								"uuid": "a295590f-0149-48fd-b1b5-7e5def8dc46b"
							},
							{
								"key": "statementEndDate",
								"value": "'2022-04-01'",
								"description": "filtro por período demonstrarivo",
								"type": "text",
								"uuid": "98226f51-d104-48c7-94bb-943d1dd67628"
							}
						],
						"url": {
							"raw": "{{pottencial_api_url}}/partners/v1/partners/biddings?MaxInsuranceAmount=10000&MinInsuranceAmount=5000&Skip=0&Take=100",
							"host": [
								"{{pottencial_api_url}}"
							],
							"path": [
								"partners",
								"v1",
								"partners",
								"biddings"
							],
							"query": [
								{
									"key": "MaxInsuranceAmount",
									"value": "10000",
									"description": "opcional"
								},
								{
									"key": "MinInsuranceAmount",
									"value": "5000",
									"description": "opcional"
								},
								{
									"key": "Skip",
									"value": "0",
									"description": "opcional"
								},
								{
									"key": "Take",
									"value": "100",
									"description": "opcional"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Consultar Oportunidades de Licitações",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "client_id",
								"value": "{{client_id}}",
								"type": "text",
								"uuid": "4e509fbe-e3fe-4cf1-b776-773d0d3db699"
							},
							{
								"key": "access_token",
								"value": "{{access_token}}",
								"type": "text",
								"uuid": "fce5a078-d844-4ee9-81e1-05b92e49d47d"
							},
							{
								"key": "statementStartDate",
								"value": "'2022-02-01'",
								"description": "filtro por período demonstrativo inicial (emissão) do evento",
								"type": "text",
								"uuid": "0edfd242-78a4-4f94-8a63-74c0a2a6c7f1"
							},
							{
								"key": "statementEndDate",
								"value": "'2022-04-01'",
								"description": "filtro por período demonstrarivo",
								"type": "text",
								"uuid": "2f054343-5316-44a9-8831-9ec4beb32bf3"
							}
						],
						"url": {
							"raw": "{{pottencial_api_url}}/partners/v1/partners/opportunities?PolicyHolderDocument='111111111111111111111'&CreatedAt=\"2022-01-01\"&Take=100&Skip=0",
							"host": [
								"{{pottencial_api_url}}"
							],
							"path": [
								"partners",
								"v1",
								"partners",
								"opportunities"
							],
							"query": [
								{
									"key": "PolicyHolderDocument",
									"value": "'111111111111111111111'",
									"description": "opcional"
								},
								{
									"key": "CreatedAt",
									"value": "\"2022-01-01\"",
									"description": "opcional"
								},
								{
									"key": "Take",
									"value": "100",
									"description": "opcional"
								},
								{
									"key": "Skip",
									"value": "0",
									"description": "opcional"
								}
							]
						}
					},
					"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"
		}
	]
}