{
	"name": "database/connection/rest-ksef.json",
	"connect_timeout": 3,
	"datetime_format": "%Y-%m-%dT%H:%M:%S",
	"dbtype": "rest_call",
	"driver": "rest_call",
	"connection": [
		{
			"name": "KSeF Poland production",
			"auth_preference": "database/connection/auth-ksef.json",
			"call_method": "GET",
			"call_path": "/api/v2/",
			"debug": false,
			"error_tag": "status",
			"error_tag2": "detail",
			"error_tag_ok_value": [200, 201, 202, 204],
			"host": "https://api.ksef.mf.gov.pl",
			"page_count_header_name": "",
			"bearer_authorization": true,
			"query_parameter": {
				"token": ""
			},
			"auth": {
				"auth_tag": "token",
				"call_array": [
					{
						"auth_tag": "token",
						"call_url": "auth/challenge",
						"response": {
							"challenge": "challenge",
							"timestamp": "timestamp",
							"timestamp_ms": "timestampMs",
							"client_ip": "clientIp"
						}
					},
					{
						"content_type": "xml",
						"sha_256_sign": {
							"template": "{{nip}}|{{timestamp}}"
						},
						"auth_tag": "token",
						"call_url": "auth/xades-signature",
						"call_method": "POST",
						"call_body": {
							"nip": "{{nip}}",
							"timestamp": "{{timestamp}}",
							"xades_signature": "{{signature}}"
						}
					}
				]
			}
		}
	]
}
