{
	"info": {
		"_postman_id": "d5c8d750-d850-46b9-9c48-fa74935fda7b",
		"name": "API Integração V2 Manual",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "27395103"
	},
	"item": [
		{
			"name": "NFe",
			"item": [
				{
					"name": "Emissao",
					"item": [
						{
							"name": "ConsultarEventosRelacionadosNFe",
							"protocolProfileBehavior": {
								"disableBodyPruning": true
							},
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "InscricaoMunicipal",
										"value": "123",
										"type": "text",
										"disabled": true
									},
									{
										"key": "Protocolo",
										"value": "3665E26C-F0B5-4F7B-B252-536120D4E8BC",
										"type": "text",
										"disabled": true
									},
									{
										"key": "CNPJ",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "CodigoVerificacao",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "NumeroDocInicial",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "NumeroDocFinal",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "NumeroRPSInicial",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "NumeroRPSFinal",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "Serie",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "DataEmissaoInicial",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "DataEmissaoFinal",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "Pagina",
										"value": "",
										"type": "text",
										"disabled": true
									}
								],
								"body": {
									"mode": "urlencoded",
									"urlencoded": [
										{
											"key": "InscricaoMunicipal ",
											"value": "",
											"type": "text",
											"disabled": true
										}
									]
								},
								"url": {
									"raw": "https://spaceapiv2hml.e-datacenter.nddigital.com.br/integracaov2-nfe/api/NFeEmissao/ConsultarEventosRelacionadosNFe?ChaveDocumento=COLOQUE AQUI A CHAVE",
									"protocol": "https",
									"host": [
										"spaceapiv2hml",
										"e-datacenter",
										"nddigital",
										"com",
										"br"
									],
									"path": [
										"integracaov2-nfe",
										"api",
										"NFeEmissao",
										"ConsultarEventosRelacionadosNFe"
									],
									"query": [
										{
											"key": "ChaveDocumento",
											"value": "COLOQUE AQUI A CHAVE"
										}
									]
								}
							},
							"response": []
						}
					]
				},
				{
					"name": "Recepcao",
					"item": [
						{
							"name": "ConsultarRecepcaoNFe",
							"protocolProfileBehavior": {
								"disableBodyPruning": true
							},
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "InscricaoMunicipal",
										"value": "123",
										"type": "text",
										"disabled": true
									},
									{
										"key": "Protocolo",
										"value": "3665E26C-F0B5-4F7B-B252-536120D4E8BC",
										"type": "text",
										"disabled": true
									},
									{
										"key": "CNPJ",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "CodigoVerificacao",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "NumeroDocInicial",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "NumeroDocFinal",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "NumeroRPSInicial",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "NumeroRPSFinal",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "Serie",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "DataEmissaoInicial",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "DataEmissaoFinal",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "Pagina",
										"value": "",
										"type": "text",
										"disabled": true
									}
								],
								"body": {
									"mode": "urlencoded",
									"urlencoded": [
										{
											"key": "InscricaoMunicipal ",
											"value": "",
											"type": "text",
											"disabled": true
										}
									]
								},
								"url": {
									"raw": "https://spaceapiv2hml.e-datacenter.nddigital.com.br/integracaov2-nfe/api/NFeRecepcao/ConsultarRecepcaoNFe?TipoDocumento=1&ChaveDocumento=CHAVE&CNPJ=CNPJ",
									"protocol": "https",
									"host": [
										"spaceapiv2hml",
										"e-datacenter",
										"nddigital",
										"com",
										"br"
									],
									"path": [
										"integracaov2-nfe",
										"api",
										"NFeRecepcao",
										"ConsultarRecepcaoNFe"
									],
									"query": [
										{
											"key": "TipoDocumento",
											"value": "1"
										},
										{
											"key": "Protocolo",
											"value": "PROTOCOLO",
											"disabled": true
										},
										{
											"key": "ChaveDocumento",
											"value": "CHAVE"
										},
										{
											"key": "CNPJ",
											"value": "CNPJ"
										},
										{
											"key": "NumeroDocInicial",
											"value": "1",
											"disabled": true
										},
										{
											"key": "NumeroDocFinal",
											"value": "1000000",
											"disabled": true
										},
										{
											"key": "Serie",
											"value": "1",
											"disabled": true
										},
										{
											"key": "DataHoraEmissaoInicial",
											"value": "2022-08-02 21:02:34.000",
											"disabled": true
										},
										{
											"key": "DataHoraEmissaoFinal",
											"value": "2022-11-02 21:02:34.000",
											"disabled": true
										},
										{
											"key": "StatusManifesto",
											"value": "2",
											"disabled": true
										},
										{
											"key": "Pagina",
											"value": "1",
											"disabled": true
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "ConsultarEventosRelacionadosNFe",
							"protocolProfileBehavior": {
								"disableBodyPruning": true
							},
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "InscricaoMunicipal",
										"value": "123",
										"type": "text",
										"disabled": true
									},
									{
										"key": "Protocolo",
										"value": "3665E26C-F0B5-4F7B-B252-536120D4E8BC",
										"type": "text",
										"disabled": true
									},
									{
										"key": "CNPJ",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "CodigoVerificacao",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "NumeroDocInicial",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "NumeroDocFinal",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "NumeroRPSInicial",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "NumeroRPSFinal",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "Serie",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "DataEmissaoInicial",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "DataEmissaoFinal",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "Pagina",
										"value": "",
										"type": "text",
										"disabled": true
									}
								],
								"body": {
									"mode": "urlencoded",
									"urlencoded": [
										{
											"key": "InscricaoMunicipal ",
											"value": "",
											"type": "text",
											"disabled": true
										}
									]
								},
								"url": {
									"raw": "https://spaceapiv2hml.e-datacenter.nddigital.com.br/integracaov2-nfe/api/NFeRecepcao/ConsultarEventosRelacionadosNFe?ChaveDocumento=COLOQUE AQUI A CHAVE",
									"protocol": "https",
									"host": [
										"spaceapiv2hml",
										"e-datacenter",
										"nddigital",
										"com",
										"br"
									],
									"path": [
										"integracaov2-nfe",
										"api",
										"NFeRecepcao",
										"ConsultarEventosRelacionadosNFe"
									],
									"query": [
										{
											"key": "ChaveDocumento",
											"value": "COLOQUE AQUI A CHAVE"
										}
									]
								}
							},
							"response": []
						}
					]
				}
			]
		},
		{
			"name": "CTe",
			"item": [
				{
					"name": "Recepcao",
					"item": [
						{
							"name": "ConsultarRecepcaoCTe",
							"protocolProfileBehavior": {
								"disableBodyPruning": true
							},
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "InscricaoMunicipal",
										"value": "123",
										"type": "text",
										"disabled": true
									},
									{
										"key": "Protocolo",
										"value": "3665E26C-F0B5-4F7B-B252-536120D4E8BC",
										"type": "text",
										"disabled": true
									},
									{
										"key": "CNPJ",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "CodigoVerificacao",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "NumeroDocInicial",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "NumeroDocFinal",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "NumeroRPSInicial",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "NumeroRPSFinal",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "Serie",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "DataEmissaoInicial",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "DataEmissaoFinal",
										"value": "",
										"type": "text",
										"disabled": true
									},
									{
										"key": "Pagina",
										"value": "",
										"type": "text",
										"disabled": true
									}
								],
								"body": {
									"mode": "urlencoded",
									"urlencoded": [
										{
											"key": "InscricaoMunicipal ",
											"value": "",
											"type": "text",
											"disabled": true
										}
									]
								},
								"url": {
									"raw": "https://spaceapiv2hml.e-datacenter.nddigital.com.br/integracaov2-cte/api/CTeRecepcao/ConsultarRecepcaoCte?ChaveDocumento=CHAVE",
									"protocol": "https",
									"host": [
										"spaceapiv2hml",
										"e-datacenter",
										"nddigital",
										"com",
										"br"
									],
									"path": [
										"integracaov2-cte",
										"api",
										"CTeRecepcao",
										"ConsultarRecepcaoCte"
									],
									"query": [
										{
											"key": "Protocolo",
											"value": "PROTOCOLO",
											"disabled": true
										},
										{
											"key": "ChaveDocumento",
											"value": "CHAVE"
										},
										{
											"key": "NumeroDocInicial",
											"value": "962585",
											"disabled": true
										},
										{
											"key": "NumeroDocFinal",
											"value": "962590",
											"disabled": true
										},
										{
											"key": "Serie",
											"value": "1",
											"disabled": true
										},
										{
											"key": "DataHoraEmissaoInicial",
											"value": "2023-12-15 11:50:00.000",
											"disabled": true
										},
										{
											"key": "DataHoraEmissaoFinal",
											"value": "2023-12-15 11:55:59.000",
											"disabled": true
										},
										{
											"key": "Pagina",
											"value": "70",
											"disabled": true
										},
										{
											"key": "CNPJ",
											"value": "CNPJ",
											"disabled": true
										},
										{
											"key": "TipoDocumento",
											"value": "1",
											"disabled": true
										}
									]
								}
							},
							"response": []
						}
					]
				}
			]
		}
	],
	"auth": {
		"type": "bearer",
		"bearer": [
			{
				"key": "token",
				"value": "{{access_token}}",
				"type": "string"
			}
		]
	},
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"exec": [
					"const tokenUrl = 'https://spacenddidentityhml.e-datacenter.nddigital.com.br/connect/token';",
					"",
					"const getTokenRequest = {",
					"  method: 'POST',",
					"  url: tokenUrl,",
					"  body: {",
					"      mode: 'formdata',",
					"      formdata: [",
					"          { key: 'grant_type', value: 'client_credentials'},",
					"          { key: 'client_id', value: 'COLOQUE AQUI O CLIENT ID'},",
					"          { key: 'scope', value: 'integracao-api' },",
					"          { key: 'client_secret', value: 'COLOQUE AQUI O CLIENT SECRET'}",
					"      ]",
					"  }",
					"};",
					"",
					"pm.sendRequest(getTokenRequest, (err, response) => {",
					"  const jsonResponse = response.json();",
					"  const newAccessToken = jsonResponse.access_token;",
					"",
					"  pm.variables.set('access_token', newAccessToken);",
					"});"
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		}
	]
}