Chilkat Online Tools

SQL Server / KSeF / Sprawdzenie statusu zapytania o faktury

Back to Collection Items

-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls.
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
    DECLARE @hr int
    -- Important: Do not use nvarchar(max).  See the warning about using nvarchar(max).
    DECLARE @sTmp0 nvarchar(4000)
    -- This example assumes the Chilkat API to have been previously unlocked.
    -- See Global Unlock Sample for sample code.

    DECLARE @http int
    -- Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.Http', @http OUT
    IF @hr <> 0
    BEGIN
        PRINT 'Failed to create ActiveX component'
        RETURN
    END

    DECLARE @success int

    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Accept', 'application/json'
    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'SessionToken', '{{apiKey}}'

    DECLARE @sbResponseBody int
    -- Use "Chilkat_9_5_0.StringBuilder" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.StringBuilder', @sbResponseBody OUT

    EXEC sp_OAMethod @http, 'QuickGetSb', @success OUT, 'https://ksef.mf.gov.pl/api/online/Query/Invoice/Async/Status/:QueryElementReferenceNumber', @sbResponseBody
    IF @success = 0
      BEGIN
        EXEC sp_OAGetProperty @http, 'LastErrorText', @sTmp0 OUT
        PRINT @sTmp0
        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @sbResponseBody
        RETURN
      END

    DECLARE @jResp int
    -- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @jResp OUT

    EXEC sp_OAMethod @jResp, 'LoadSb', @success OUT, @sbResponseBody
    EXEC sp_OASetProperty @jResp, 'EmitCompact', 0


    PRINT 'Response Body:'
    EXEC sp_OAMethod @jResp, 'Emit', @sTmp0 OUT
    PRINT @sTmp0

    DECLARE @respStatusCode int
    EXEC sp_OAGetProperty @http, 'LastStatus', @respStatusCode OUT

    PRINT 'Response Status Code = ' + @respStatusCode
    IF @respStatusCode >= 400
      BEGIN

        PRINT 'Response Header:'
        EXEC sp_OAGetProperty @http, 'LastHeader', @sTmp0 OUT
        PRINT @sTmp0

        PRINT 'Failed.'
        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @sbResponseBody
        EXEC @hr = sp_OADestroy @jResp
        RETURN
      END

    -- Sample JSON response:
    -- (Sample code for parsing the JSON response is shown below)

    -- {
    --   "elementReferenceNumber": "54380805-GU-27AD227AD6-603F8C255B-F3",
    --   "processingCode": "<integer>",
    --   "processingDescription": "<string>",
    --   "referenceNumber": "26461031-YY-95FFB18F5B-64C7E69ABC-7F",
    --   "timestamp": "<dateTime>",
    --   "numberOfElements": "<long>",
    --   "numberOfParts": "<integer>",
    --   "partList": [
    --     {
    --       "partExpiration": "<dateTime>",
    --       "partName": "<string>",
    --       "partNumber": "<integer>",
    --       "partRangeFrom": "<dateTime>",
    --       "partRangeTo": "<dateTime>",
    --       "partReferenceNumber": "20950824-VI-44C6091F4C-F94CD09C6F-99",
    --       "plainPartHash": {
    --         "fileSize": "<integer>",
    --         "hashSHA": {
    --           "algorithm": "SHA-256",
    --           "encoding": "Base64",
    --           "value": "<string>"
    --         }
    --       }
    --     },
    --     {
    --       "partExpiration": "<dateTime>",
    --       "partName": "<string>",
    --       "partNumber": "<integer>",
    --       "partRangeFrom": "<dateTime>",
    --       "partRangeTo": "<dateTime>",
    --       "partReferenceNumber": "85391122-WC-908C180D92-DF73AD0806-37",
    --       "plainPartHash": {
    --         "fileSize": "<integer>",
    --         "hashSHA": {
    --           "algorithm": "SHA-256",
    --           "encoding": "Base64",
    --           "value": "<string>"
    --         }
    --       }
    --     },
    --     {
    --       "partExpiration": "<dateTime>",
    --       "partName": "<string>",
    --       "partNumber": "<integer>",
    --       "partRangeFrom": "<dateTime>",
    --       "partRangeTo": "<dateTime>",
    --       "partReferenceNumber": "29900409-8H-4539C476E8-A3E78F8869-C8",
    --       "plainPartHash": {
    --         "fileSize": "<integer>",
    --         "hashSHA": {
    --           "algorithm": "SHA-256",
    --           "encoding": "Base64",
    --           "value": "<string>"
    --         }
    --       }
    --     },
    --     {
    --       "partExpiration": "<dateTime>",
    --       "partName": "<string>",
    --       "partNumber": "<integer>",
    --       "partRangeFrom": "<dateTime>",
    --       "partRangeTo": "<dateTime>",
    --       "partReferenceNumber": "24450626-5B-727E05580F-BA6421EB50-96",
    --       "plainPartHash": {
    --         "fileSize": "<integer>",
    --         "hashSHA": {
    --           "algorithm": "SHA-256",
    --           "encoding": "Base64",
    --           "value": "<string>"
    --         }
    --       }
    --     },
    --     {
    --       "partExpiration": "<dateTime>",
    --       "partName": "<string>",
    --       "partNumber": "<integer>",
    --       "partRangeFrom": "<dateTime>",
    --       "partRangeTo": "<dateTime>",
    --       "partReferenceNumber": "87451209-PP-AF7060ED0B-3DF683A292-16",
    --       "plainPartHash": {
    --         "fileSize": "<integer>",
    --         "hashSHA": {
    --           "algorithm": "SHA-256",
    --           "encoding": "Base64",
    --           "value": "<string>"
    --         }
    --       }
    --     },
    --     {
    --       "partExpiration": "<dateTime>",
    --       "partName": "<string>",
    --       "partNumber": "<integer>",
    --       "partRangeFrom": "<dateTime>",
    --       "partRangeTo": "<dateTime>",
    --       "partReferenceNumber": "29621131-HV-B126F08E67-02DD38F61E-2D",
    --       "plainPartHash": {
    --         "fileSize": "<integer>",
    --         "hashSHA": {
    --           "algorithm": "SHA-256",
    --           "encoding": "Base64",
    --           "value": "<string>"
    --         }
    --       }
    --     },
    --     {
    --       "partExpiration": "<dateTime>",
    --       "partName": "<string>",
    --       "partNumber": "<integer>",
    --       "partRangeFrom": "<dateTime>",
    --       "partRangeTo": "<dateTime>",
    --       "partReferenceNumber": "25670921-YO-B4BF955C79-F795D6B137-2F",
    --       "plainPartHash": {
    --         "fileSize": "<integer>",
    --         "hashSHA": {
    --           "algorithm": "SHA-256",
    --           "encoding": "Base64",
    --           "value": "<string>"
    --         }
    --       }
    --     },
    --     {
    --       "partExpiration": "<dateTime>",
    --       "partName": "<string>",
    --       "partNumber": "<integer>",
    --       "partRangeFrom": "<dateTime>",
    --       "partRangeTo": "<dateTime>",
    --       "partReferenceNumber": "80870307-AJ-56C08E579A-0547F13D6F-3B",
    --       "plainPartHash": {
    --         "fileSize": "<integer>",
    --         "hashSHA": {
    --           "algorithm": "SHA-256",
    --           "encoding": "Base64",
    --           "value": "<string>"
    --         }
    --       }
    --     },
    --     {
    --       "partExpiration": "<dateTime>",
    --       "partName": "<string>",
    --       "partNumber": "<integer>",
    --       "partRangeFrom": "<dateTime>",
    --       "partRangeTo": "<dateTime>",
    --       "partReferenceNumber": "28231230-BC-92C037821D-1324125605-7D",
    --       "plainPartHash": {
    --         "fileSize": "<integer>",
    --         "hashSHA": {
    --           "algorithm": "SHA-256",
    --           "encoding": "Base64",
    --           "value": "<string>"
    --         }
    --       }
    --     },
    --     {
    --       "partExpiration": "<dateTime>",
    --       "partName": "<string>",
    --       "partNumber": "<integer>",
    --       "partRangeFrom": "<dateTime>",
    --       "partRangeTo": "<dateTime>",
    --       "partReferenceNumber": "77320309-PS-70EEE3141F-245605F5DF-9E",
    --       "plainPartHash": {
    --         "fileSize": "<integer>",
    --         "hashSHA": {
    --           "algorithm": "SHA-256",
    --           "encoding": "Base64",
    --           "value": "<string>"
    --         }
    --       }
    --     },
    --     {
    --       "partExpiration": "<dateTime>",
    --       "partName": "<string>",
    --       "partNumber": "<integer>",
    --       "partRangeFrom": "<dateTime>",
    --       "partRangeTo": "<dateTime>",
    --       "partReferenceNumber": "20410515-WO-134374ABBD-EB31B4F770-9B",
    --       "plainPartHash": {
    --         "fileSize": "<integer>",
    --         "hashSHA": {
    --           "algorithm": "SHA-256",
    --           "encoding": "Base64",
    --           "value": "<string>"
    --         }
    --       }
    --     },
    --     {
    --       "partExpiration": "<dateTime>",
    --       "partName": "<string>",
    --       "partNumber": "<integer>",
    --       "partRangeFrom": "<dateTime>",
    --       "partRangeTo": "<dateTime>",
    --       "partReferenceNumber": "42881202-ZD-5EC44585D4-D66E636462-7D",
    --       "plainPartHash": {
    --         "fileSize": "<integer>",
    --         "hashSHA": {
    --           "algorithm": "SHA-256",
    --           "encoding": "Base64",
    --           "value": "<string>"
    --         }
    --       }
    --     },
    --     {
    --       "partExpiration": "<dateTime>",
    --       "partName": "<string>",
    --       "partNumber": "<integer>",
    --       "partRangeFrom": "<dateTime>",
    --       "partRangeTo": "<dateTime>",
    --       "partReferenceNumber": "20310730-V4-3660B42E6C-31D7F751DB-74",
    --       "plainPartHash": {
    --         "fileSize": "<integer>",
    --         "hashSHA": {
    --           "algorithm": "SHA-256",
    --           "encoding": "Base64",
    --           "value": "<string>"
    --         }
    --       }
    --     },
    --     {
    --       "partExpiration": "<dateTime>",
    --       "partName": "<string>",
    --       "partNumber": "<integer>",
    --       "partRangeFrom": "<dateTime>",
    --       "partRangeTo": "<dateTime>",
    --       "partReferenceNumber": "85240730-G9-66F3F73488-3E06D5DDF0-CC",
    --       "plainPartHash": {
    --         "fileSize": "<integer>",
    --         "hashSHA": {
    --           "algorithm": "SHA-256",
    --           "encoding": "Base64",
    --           "value": "<string>"
    --         }
    --       }
    --     },
    --     {
    --       "partExpiration": "<dateTime>",
    --       "partName": "<string>",
    --       "partNumber": "<integer>",
    --       "partRangeFrom": "<dateTime>",
    --       "partRangeTo": "<dateTime>",
    --       "partReferenceNumber": "32331209-XT-658AA64F43-9250F92825-30",
    --       "plainPartHash": {
    --         "fileSize": "<integer>",
    --         "hashSHA": {
    --           "algorithm": "SHA-256",
    --           "encoding": "Base64",
    --           "value": "<string>"
    --         }
    --       }
    --     },
    --     {
    --       "partExpiration": "<dateTime>",
    --       "partName": "<string>",
    --       "partNumber": "<integer>",
    --       "partRangeFrom": "<dateTime>",
    --       "partRangeTo": "<dateTime>",
    --       "partReferenceNumber": "66480103-6A-CE82A8334D-9C746FE37A-8F",
    --       "plainPartHash": {
    --         "fileSize": "<integer>",
    --         "hashSHA": {
    --           "algorithm": "SHA-256",
    --           "encoding": "Base64",
    --           "value": "<string>"
    --         }
    --       }
    --     },
    --     {
    --       "partExpiration": "<dateTime>",
    --       "partName": "<string>",
    --       "partNumber": "<integer>",
    --       "partRangeFrom": "<dateTime>",
    --       "partRangeTo": "<dateTime>",
    --       "partReferenceNumber": "22230509-21-6E82DA0D3B-70601C059D-2E",
    --       "plainPartHash": {
    --         "fileSize": "<integer>",
    --         "hashSHA": {
    --           "algorithm": "SHA-256",
    --           "encoding": "Base64",
    --           "value": "<string>"
    --         }
    --       }
    --     },
    --     {
    --       "partExpiration": "<dateTime>",
    --       "partName": "<string>",
    --       "partNumber": "<integer>",
    --       "partRangeFrom": "<dateTime>",
    --       "partRangeTo": "<dateTime>",
    --       "partReferenceNumber": "96870702-GM-1EAF0DA2DF-C2129ED69A-68",
    --       "plainPartHash": {
    --         "fileSize": "<integer>",
    --         "hashSHA": {
    --           "algorithm": "SHA-256",
    --           "encoding": "Base64",
    --           "value": "<string>"
    --         }
    --       }
    --     },
    --     {
    --       "partExpiration": "<dateTime>",
    --       "partName": "<string>",
    --       "partNumber": "<integer>",
    --       "partRangeFrom": "<dateTime>",
    --       "partRangeTo": "<dateTime>",
    --       "partReferenceNumber": "20690822-N8-2DC602C97D-C6063A1C18-B6",
    --       "plainPartHash": {
    --         "fileSize": "<integer>",
    --         "hashSHA": {
    --           "algorithm": "SHA-256",
    --           "encoding": "Base64",
    --           "value": "<string>"
    --         }
    --       }
    --     },
    --     {
    --       "partExpiration": "<dateTime>",
    --       "partName": "<string>",
    --       "partNumber": "<integer>",
    --       "partRangeFrom": "<dateTime>",
    --       "partRangeTo": "<dateTime>",
    --       "partReferenceNumber": "27480904-BB-C494675F0B-ABC33B7C82-39",
    --       "plainPartHash": {
    --         "fileSize": "<integer>",
    --         "hashSHA": {
    --           "algorithm": "SHA-256",
    --           "encoding": "Base64",
    --           "value": "<string>"
    --         }
    --       }
    --     }
    --   ]
    -- }

    -- Sample code for parsing the JSON response...
    -- Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code

    DECLARE @partExpiration nvarchar(4000)

    DECLARE @partName nvarchar(4000)

    DECLARE @partNumber nvarchar(4000)

    DECLARE @partRangeFrom nvarchar(4000)

    DECLARE @partRangeTo nvarchar(4000)

    DECLARE @partReferenceNumber nvarchar(4000)

    DECLARE @FileSize nvarchar(4000)

    DECLARE @Algorithm nvarchar(4000)

    DECLARE @Encoding nvarchar(4000)

    DECLARE @Value nvarchar(4000)

    DECLARE @elementReferenceNumber nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @elementReferenceNumber OUT, 'elementReferenceNumber'
    DECLARE @processingCode nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @processingCode OUT, 'processingCode'
    DECLARE @processingDescription nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @processingDescription OUT, 'processingDescription'
    DECLARE @referenceNumber nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @referenceNumber OUT, 'referenceNumber'
    DECLARE @timestamp nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @timestamp OUT, 'timestamp'
    DECLARE @numberOfElements nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @numberOfElements OUT, 'numberOfElements'
    DECLARE @numberOfParts nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @numberOfParts OUT, 'numberOfParts'
    DECLARE @i int
    SELECT @i = 0
    DECLARE @count_i int
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'partList'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'StringOf', @partExpiration OUT, 'partList[i].partExpiration'
        EXEC sp_OAMethod @jResp, 'StringOf', @partName OUT, 'partList[i].partName'
        EXEC sp_OAMethod @jResp, 'StringOf', @partNumber OUT, 'partList[i].partNumber'
        EXEC sp_OAMethod @jResp, 'StringOf', @partRangeFrom OUT, 'partList[i].partRangeFrom'
        EXEC sp_OAMethod @jResp, 'StringOf', @partRangeTo OUT, 'partList[i].partRangeTo'
        EXEC sp_OAMethod @jResp, 'StringOf', @partReferenceNumber OUT, 'partList[i].partReferenceNumber'
        EXEC sp_OAMethod @jResp, 'StringOf', @FileSize OUT, 'partList[i].plainPartHash.fileSize'
        EXEC sp_OAMethod @jResp, 'StringOf', @Algorithm OUT, 'partList[i].plainPartHash.hashSHA.algorithm'
        EXEC sp_OAMethod @jResp, 'StringOf', @Encoding OUT, 'partList[i].plainPartHash.hashSHA.encoding'
        EXEC sp_OAMethod @jResp, 'StringOf', @Value OUT, 'partList[i].plainPartHash.hashSHA.value'
        SELECT @i = @i + 1
      END

    EXEC @hr = sp_OADestroy @http
    EXEC @hr = sp_OADestroy @sbResponseBody
    EXEC @hr = sp_OADestroy @jResp


END
GO

Curl Command

curl -X GET
	-H "SessionToken: {{apiKey}}"
	-H "Accept: application/json"
https://ksef.mf.gov.pl/api/online/Query/Invoice/Async/Status/:QueryElementReferenceNumber

Postman Collection Item JSON

{
  "name": "Sprawdzenie statusu zapytania o faktury",
  "request": {
    "auth": {
      "type": "apikey",
      "apikey": [
        {
          "key": "key",
          "value": "SessionToken",
          "type": "string"
        },
        {
          "key": "value",
          "value": "{{apiKey}}",
          "type": "string"
        },
        {
          "key": "in",
          "value": "header",
          "type": "string"
        }
      ]
    },
    "method": "GET",
    "header": [
      {
        "key": "Accept",
        "value": "application/json"
      }
    ],
    "url": {
      "raw": "{{baseUrl}}/online/Query/Invoice/Async/Status/:QueryElementReferenceNumber",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "online",
        "Query",
        "Invoice",
        "Async",
        "Status",
        ":QueryElementReferenceNumber"
      ],
      "variable": [
        {
          "key": "QueryElementReferenceNumber",
          "value": "56810128-EL-96284D87EE-8DDB16145F-B3"
        }
      ]
    },
    "description": "Sprawdzenie statusu zapytania o faktury"
  },
  "response": [
    {
      "name": "OK",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "SessionToken",
            "value": "<API Key>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/online/Query/Invoice/Async/Status/:QueryElementReferenceNumber",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "online",
            "Query",
            "Invoice",
            "Async",
            "Status",
            ":QueryElementReferenceNumber"
          ],
          "variable": [
            {
              "key": "QueryElementReferenceNumber"
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"elementReferenceNumber\": \"54380805-GU-27AD227AD6-603F8C255B-F3\",\n  \"processingCode\": \"<integer>\",\n  \"processingDescription\": \"<string>\",\n  \"referenceNumber\": \"26461031-YY-95FFB18F5B-64C7E69ABC-7F\",\n  \"timestamp\": \"<dateTime>\",\n  \"numberOfElements\": \"<long>\",\n  \"numberOfParts\": \"<integer>\",\n  \"partList\": [\n    {\n      \"partExpiration\": \"<dateTime>\",\n      \"partName\": \"<string>\",\n      \"partNumber\": \"<integer>\",\n      \"partRangeFrom\": \"<dateTime>\",\n      \"partRangeTo\": \"<dateTime>\",\n      \"partReferenceNumber\": \"20950824-VI-44C6091F4C-F94CD09C6F-99\",\n      \"plainPartHash\": {\n        \"fileSize\": \"<integer>\",\n        \"hashSHA\": {\n          \"algorithm\": \"SHA-256\",\n          \"encoding\": \"Base64\",\n          \"value\": \"<string>\"\n        }\n      }\n    },\n    {\n      \"partExpiration\": \"<dateTime>\",\n      \"partName\": \"<string>\",\n      \"partNumber\": \"<integer>\",\n      \"partRangeFrom\": \"<dateTime>\",\n      \"partRangeTo\": \"<dateTime>\",\n      \"partReferenceNumber\": \"85391122-WC-908C180D92-DF73AD0806-37\",\n      \"plainPartHash\": {\n        \"fileSize\": \"<integer>\",\n        \"hashSHA\": {\n          \"algorithm\": \"SHA-256\",\n          \"encoding\": \"Base64\",\n          \"value\": \"<string>\"\n        }\n      }\n    },\n    {\n      \"partExpiration\": \"<dateTime>\",\n      \"partName\": \"<string>\",\n      \"partNumber\": \"<integer>\",\n      \"partRangeFrom\": \"<dateTime>\",\n      \"partRangeTo\": \"<dateTime>\",\n      \"partReferenceNumber\": \"29900409-8H-4539C476E8-A3E78F8869-C8\",\n      \"plainPartHash\": {\n        \"fileSize\": \"<integer>\",\n        \"hashSHA\": {\n          \"algorithm\": \"SHA-256\",\n          \"encoding\": \"Base64\",\n          \"value\": \"<string>\"\n        }\n      }\n    },\n    {\n      \"partExpiration\": \"<dateTime>\",\n      \"partName\": \"<string>\",\n      \"partNumber\": \"<integer>\",\n      \"partRangeFrom\": \"<dateTime>\",\n      \"partRangeTo\": \"<dateTime>\",\n      \"partReferenceNumber\": \"24450626-5B-727E05580F-BA6421EB50-96\",\n      \"plainPartHash\": {\n        \"fileSize\": \"<integer>\",\n        \"hashSHA\": {\n          \"algorithm\": \"SHA-256\",\n          \"encoding\": \"Base64\",\n          \"value\": \"<string>\"\n        }\n      }\n    },\n    {\n      \"partExpiration\": \"<dateTime>\",\n      \"partName\": \"<string>\",\n      \"partNumber\": \"<integer>\",\n      \"partRangeFrom\": \"<dateTime>\",\n      \"partRangeTo\": \"<dateTime>\",\n      \"partReferenceNumber\": \"87451209-PP-AF7060ED0B-3DF683A292-16\",\n      \"plainPartHash\": {\n        \"fileSize\": \"<integer>\",\n        \"hashSHA\": {\n          \"algorithm\": \"SHA-256\",\n          \"encoding\": \"Base64\",\n          \"value\": \"<string>\"\n        }\n      }\n    },\n    {\n      \"partExpiration\": \"<dateTime>\",\n      \"partName\": \"<string>\",\n      \"partNumber\": \"<integer>\",\n      \"partRangeFrom\": \"<dateTime>\",\n      \"partRangeTo\": \"<dateTime>\",\n      \"partReferenceNumber\": \"29621131-HV-B126F08E67-02DD38F61E-2D\",\n      \"plainPartHash\": {\n        \"fileSize\": \"<integer>\",\n        \"hashSHA\": {\n          \"algorithm\": \"SHA-256\",\n          \"encoding\": \"Base64\",\n          \"value\": \"<string>\"\n        }\n      }\n    },\n    {\n      \"partExpiration\": \"<dateTime>\",\n      \"partName\": \"<string>\",\n      \"partNumber\": \"<integer>\",\n      \"partRangeFrom\": \"<dateTime>\",\n      \"partRangeTo\": \"<dateTime>\",\n      \"partReferenceNumber\": \"25670921-YO-B4BF955C79-F795D6B137-2F\",\n      \"plainPartHash\": {\n        \"fileSize\": \"<integer>\",\n        \"hashSHA\": {\n          \"algorithm\": \"SHA-256\",\n          \"encoding\": \"Base64\",\n          \"value\": \"<string>\"\n        }\n      }\n    },\n    {\n      \"partExpiration\": \"<dateTime>\",\n      \"partName\": \"<string>\",\n      \"partNumber\": \"<integer>\",\n      \"partRangeFrom\": \"<dateTime>\",\n      \"partRangeTo\": \"<dateTime>\",\n      \"partReferenceNumber\": \"80870307-AJ-56C08E579A-0547F13D6F-3B\",\n      \"plainPartHash\": {\n        \"fileSize\": \"<integer>\",\n        \"hashSHA\": {\n          \"algorithm\": \"SHA-256\",\n          \"encoding\": \"Base64\",\n          \"value\": \"<string>\"\n        }\n      }\n    },\n    {\n      \"partExpiration\": \"<dateTime>\",\n      \"partName\": \"<string>\",\n      \"partNumber\": \"<integer>\",\n      \"partRangeFrom\": \"<dateTime>\",\n      \"partRangeTo\": \"<dateTime>\",\n      \"partReferenceNumber\": \"28231230-BC-92C037821D-1324125605-7D\",\n      \"plainPartHash\": {\n        \"fileSize\": \"<integer>\",\n        \"hashSHA\": {\n          \"algorithm\": \"SHA-256\",\n          \"encoding\": \"Base64\",\n          \"value\": \"<string>\"\n        }\n      }\n    },\n    {\n      \"partExpiration\": \"<dateTime>\",\n      \"partName\": \"<string>\",\n      \"partNumber\": \"<integer>\",\n      \"partRangeFrom\": \"<dateTime>\",\n      \"partRangeTo\": \"<dateTime>\",\n      \"partReferenceNumber\": \"77320309-PS-70EEE3141F-245605F5DF-9E\",\n      \"plainPartHash\": {\n        \"fileSize\": \"<integer>\",\n        \"hashSHA\": {\n          \"algorithm\": \"SHA-256\",\n          \"encoding\": \"Base64\",\n          \"value\": \"<string>\"\n        }\n      }\n    },\n    {\n      \"partExpiration\": \"<dateTime>\",\n      \"partName\": \"<string>\",\n      \"partNumber\": \"<integer>\",\n      \"partRangeFrom\": \"<dateTime>\",\n      \"partRangeTo\": \"<dateTime>\",\n      \"partReferenceNumber\": \"20410515-WO-134374ABBD-EB31B4F770-9B\",\n      \"plainPartHash\": {\n        \"fileSize\": \"<integer>\",\n        \"hashSHA\": {\n          \"algorithm\": \"SHA-256\",\n          \"encoding\": \"Base64\",\n          \"value\": \"<string>\"\n        }\n      }\n    },\n    {\n      \"partExpiration\": \"<dateTime>\",\n      \"partName\": \"<string>\",\n      \"partNumber\": \"<integer>\",\n      \"partRangeFrom\": \"<dateTime>\",\n      \"partRangeTo\": \"<dateTime>\",\n      \"partReferenceNumber\": \"42881202-ZD-5EC44585D4-D66E636462-7D\",\n      \"plainPartHash\": {\n        \"fileSize\": \"<integer>\",\n        \"hashSHA\": {\n          \"algorithm\": \"SHA-256\",\n          \"encoding\": \"Base64\",\n          \"value\": \"<string>\"\n        }\n      }\n    },\n    {\n      \"partExpiration\": \"<dateTime>\",\n      \"partName\": \"<string>\",\n      \"partNumber\": \"<integer>\",\n      \"partRangeFrom\": \"<dateTime>\",\n      \"partRangeTo\": \"<dateTime>\",\n      \"partReferenceNumber\": \"20310730-V4-3660B42E6C-31D7F751DB-74\",\n      \"plainPartHash\": {\n        \"fileSize\": \"<integer>\",\n        \"hashSHA\": {\n          \"algorithm\": \"SHA-256\",\n          \"encoding\": \"Base64\",\n          \"value\": \"<string>\"\n        }\n      }\n    },\n    {\n      \"partExpiration\": \"<dateTime>\",\n      \"partName\": \"<string>\",\n      \"partNumber\": \"<integer>\",\n      \"partRangeFrom\": \"<dateTime>\",\n      \"partRangeTo\": \"<dateTime>\",\n      \"partReferenceNumber\": \"85240730-G9-66F3F73488-3E06D5DDF0-CC\",\n      \"plainPartHash\": {\n        \"fileSize\": \"<integer>\",\n        \"hashSHA\": {\n          \"algorithm\": \"SHA-256\",\n          \"encoding\": \"Base64\",\n          \"value\": \"<string>\"\n        }\n      }\n    },\n    {\n      \"partExpiration\": \"<dateTime>\",\n      \"partName\": \"<string>\",\n      \"partNumber\": \"<integer>\",\n      \"partRangeFrom\": \"<dateTime>\",\n      \"partRangeTo\": \"<dateTime>\",\n      \"partReferenceNumber\": \"32331209-XT-658AA64F43-9250F92825-30\",\n      \"plainPartHash\": {\n        \"fileSize\": \"<integer>\",\n        \"hashSHA\": {\n          \"algorithm\": \"SHA-256\",\n          \"encoding\": \"Base64\",\n          \"value\": \"<string>\"\n        }\n      }\n    },\n    {\n      \"partExpiration\": \"<dateTime>\",\n      \"partName\": \"<string>\",\n      \"partNumber\": \"<integer>\",\n      \"partRangeFrom\": \"<dateTime>\",\n      \"partRangeTo\": \"<dateTime>\",\n      \"partReferenceNumber\": \"66480103-6A-CE82A8334D-9C746FE37A-8F\",\n      \"plainPartHash\": {\n        \"fileSize\": \"<integer>\",\n        \"hashSHA\": {\n          \"algorithm\": \"SHA-256\",\n          \"encoding\": \"Base64\",\n          \"value\": \"<string>\"\n        }\n      }\n    },\n    {\n      \"partExpiration\": \"<dateTime>\",\n      \"partName\": \"<string>\",\n      \"partNumber\": \"<integer>\",\n      \"partRangeFrom\": \"<dateTime>\",\n      \"partRangeTo\": \"<dateTime>\",\n      \"partReferenceNumber\": \"22230509-21-6E82DA0D3B-70601C059D-2E\",\n      \"plainPartHash\": {\n        \"fileSize\": \"<integer>\",\n        \"hashSHA\": {\n          \"algorithm\": \"SHA-256\",\n          \"encoding\": \"Base64\",\n          \"value\": \"<string>\"\n        }\n      }\n    },\n    {\n      \"partExpiration\": \"<dateTime>\",\n      \"partName\": \"<string>\",\n      \"partNumber\": \"<integer>\",\n      \"partRangeFrom\": \"<dateTime>\",\n      \"partRangeTo\": \"<dateTime>\",\n      \"partReferenceNumber\": \"96870702-GM-1EAF0DA2DF-C2129ED69A-68\",\n      \"plainPartHash\": {\n        \"fileSize\": \"<integer>\",\n        \"hashSHA\": {\n          \"algorithm\": \"SHA-256\",\n          \"encoding\": \"Base64\",\n          \"value\": \"<string>\"\n        }\n      }\n    },\n    {\n      \"partExpiration\": \"<dateTime>\",\n      \"partName\": \"<string>\",\n      \"partNumber\": \"<integer>\",\n      \"partRangeFrom\": \"<dateTime>\",\n      \"partRangeTo\": \"<dateTime>\",\n      \"partReferenceNumber\": \"20690822-N8-2DC602C97D-C6063A1C18-B6\",\n      \"plainPartHash\": {\n        \"fileSize\": \"<integer>\",\n        \"hashSHA\": {\n          \"algorithm\": \"SHA-256\",\n          \"encoding\": \"Base64\",\n          \"value\": \"<string>\"\n        }\n      }\n    },\n    {\n      \"partExpiration\": \"<dateTime>\",\n      \"partName\": \"<string>\",\n      \"partNumber\": \"<integer>\",\n      \"partRangeFrom\": \"<dateTime>\",\n      \"partRangeTo\": \"<dateTime>\",\n      \"partReferenceNumber\": \"27480904-BB-C494675F0B-ABC33B7C82-39\",\n      \"plainPartHash\": {\n        \"fileSize\": \"<integer>\",\n        \"hashSHA\": {\n          \"algorithm\": \"SHA-256\",\n          \"encoding\": \"Base64\",\n          \"value\": \"<string>\"\n        }\n      }\n    }\n  ]\n}"
    },
    {
      "name": "Nieprawidłowe wywołanie",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "SessionToken",
            "value": "<API Key>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/online/Query/Invoice/Async/Status/:QueryElementReferenceNumber",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "online",
            "Query",
            "Invoice",
            "Async",
            "Status",
            ":QueryElementReferenceNumber"
          ],
          "variable": [
            {
              "key": "QueryElementReferenceNumber"
            }
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"exception\": {\n    \"exceptionDetailList\": [\n      {\n        \"exceptionCode\": \"<integer>\",\n        \"exceptionDescription\": \"<string>\"\n      }\n    ],\n    \"serviceCode\": \"<string>\",\n    \"serviceCtx\": \"<string>\",\n    \"serviceName\": \"<string>\",\n    \"timestamp\": \"<dateTime>\",\n    \"referenceNumber\": \"20560508-TX-BC1107E227-31DE9417C0-CE\"\n  }\n}"
    },
    {
      "name": "Nieautoryzowany dostęp",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "SessionToken",
            "value": "<API Key>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/online/Query/Invoice/Async/Status/:QueryElementReferenceNumber",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "online",
            "Query",
            "Invoice",
            "Async",
            "Status",
            ":QueryElementReferenceNumber"
          ],
          "variable": [
            {
              "key": "QueryElementReferenceNumber"
            }
          ]
        }
      },
      "status": "Unauthorized",
      "code": 401,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"exception\": {\n    \"exceptionDetailList\": [\n      {\n        \"exceptionCode\": \"<integer>\",\n        \"exceptionDescription\": \"<string>\"\n      }\n    ],\n    \"serviceCode\": \"<string>\",\n    \"serviceCtx\": \"<string>\",\n    \"serviceName\": \"<string>\",\n    \"timestamp\": \"<dateTime>\",\n    \"referenceNumber\": \"20560508-TX-BC1107E227-31DE9417C0-CE\"\n  }\n}"
    },
    {
      "name": "Nie znaleziono wyszukiwanej treści",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "SessionToken",
            "value": "<API Key>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/online/Query/Invoice/Async/Status/:QueryElementReferenceNumber",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "online",
            "Query",
            "Invoice",
            "Async",
            "Status",
            ":QueryElementReferenceNumber"
          ],
          "variable": [
            {
              "key": "QueryElementReferenceNumber"
            }
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}