{
	"name": "database/connection/rest-ksef-test.json",
	"connect_timeout": 3,
	"datetime_format": "%Y-%m-%dT%H:%M:%S",
	"dbtype": "rest_call",
	"driver": "rest_call",
	"connection": [
		{
			"name": "🇵🇱 KSeF Poland test 🧪",
			"use_pollout": true,
			"auth_preference": "database/connection/auth-ksef-test.json",
			"host": "https://api-test.ksef.mf.gov.pl",
			"call_path": "/v2/",
			"debug": true,
			"page_count_header_name": "",
			"bearer_authorization": true,
			"error_tag": "status.code",
			"error_tag2": "status.detail",
			"error_tag_ok_value": [200, 201, 202, 204],
			"call_method": "POST",
			"query_parameter": {
				"authorization": ""
			},
			"auth": {
				"is_auth_call": true,
				"auth_tag": "authorization",
				"call_array": [
					{
						"call_path": "/api/v2/",
						"call_url": "auth/challenge"
					},
					{
						"in_use": false,
						"content_type": "xml",
						"xades_sign": true,
						"call_path": "/api/v2/",
						"call_url": "auth/xades-signature",
						"previous_call_param": {
							"challenge": "challenge"
						}
					},
					{
						"content_type": "json",
						"ksef_token_encrypt": true,
						"call_path": "/api/v2/",
						"call_url": "auth/ksef-token",
						"previous_call_param": {
							"challenge": "challenge",
							"timestampMs": "timestampMs"
						}
					},
					{
						"call_method": "GET",
						"call_path": "/api/v2/",
						"call_url": "auth/{{referenceNumber}}",
						"auth_tag": "authorization",
						"previous_call_param": {
							"referenceNumber": "referenceNumber",
							"authorization": "authenticationToken.token"
						},
						"poll_until": {
							"field": "status.code",
							"value": 200,
							"max_retry": 120,
							"sleep_seconds": 0.25
						}
					},
					{
						"call_path": "/api/v2/",
						"call_url": "auth/token/redeem",
						"auth_tag": "authorization",
						"auth_from": "accessToken.token"
					}
				]
			}
		}
	]
}
