Chilkat Online Tools

VBScript / Egyptian eInvoicing SDK R1.5 / 8. Get Recent Receipts

Back to Collection Items

Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
'Create a Unicode (utf-16) output text file.
Set outFile = fso.CreateTextFile("output.txt", True, True)

' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.

' For versions of Chilkat < 10.0.0, use CreateObject("Chilkat_9_5_0.Http")
set http = CreateObject("Chilkat.Http")

' For versions of Chilkat < 10.0.0, use CreateObject("Chilkat_9_5_0.JsonObject")
set queryParams = CreateObject("Chilkat.JsonObject")
success = queryParams.UpdateString("Uuid","ut dolore")
success = queryParams.UpdateString("SubmissionUuid","ut dolore")
success = queryParams.UpdateString("ReceiptNumber","ut dolore")
success = queryParams.UpdateString("DocumentTypeCode","ut dolore")
success = queryParams.UpdateString("DocumentTypeVersion","ut dolore")
success = queryParams.UpdateString("ReceiverName","ut dolore")
success = queryParams.UpdateString("ReceiverRegisterationNumber","ut dolore")
success = queryParams.UpdateString("PosSerialNumber","ut dolore")
success = queryParams.UpdateString("PaymentMethod","ut dolore")
success = queryParams.UpdateString("SubmissionChannel","POS")
success = queryParams.UpdateString("Status","Valid")
success = queryParams.UpdateString("Direction","Submitted")
success = queryParams.UpdateString("SortBy","None")
success = queryParams.UpdateString("SortDir","None")
success = queryParams.UpdateInt("PageNo",63021623)
success = queryParams.UpdateInt("PageSize",63021623)

' Adds the "Authorization: Bearer <access_token>" header.
http.AuthToken = "<access_token>"

' resp is a Chilkat.HttpResponse
Set resp = http.QuickRequestParams("GET","https://domain.com/api/v1/receipts/recent",queryParams)
If (http.LastMethodSuccess = 0) Then
    outFile.WriteLine(http.LastErrorText)
    WScript.Quit
End If

outFile.WriteLine(resp.StatusCode)
outFile.WriteLine(resp.BodyStr)


outFile.Close

Curl Command

curl -G -d "Uuid=ut%20dolore"
	-d "SubmissionUuid=ut%20dolore"
	-d "ReceiptNumber=ut%20dolore"
	-d "DocumentTypeCode=ut%20dolore"
	-d "DocumentTypeVersion=ut%20dolore"
	-d "ReceiverName=ut%20dolore"
	-d "ReceiverRegisterationNumber=ut%20dolore"
	-d "PosSerialNumber=ut%20dolore"
	-d "PaymentMethod=ut%20dolore"
	-d "SubmissionChannel=POS"
	-d "Status=Valid"
	-d "Direction=Submitted"
	-d "SortBy=None"
	-d "SortDir=None"
	-d "PageNo=63021623"
	-d "PageSize=63021623"
	-H "Authorization: Bearer <access_token>"
https://domain.com/api/v1/receipts/recent

Postman Collection Item JSON

{
  "name": "8. Get Recent Receipts",
  "request": {
    "auth": {
      "type": "bearer",
      "bearer": [
        {
          "key": "token",
          "value": "{{generatedAccessToken}}",
          "type": "string"
        }
      ]
    },
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{apiBaseUrl}}/api/v1/receipts/recent?Uuid=ut dolore&SubmissionUuid=ut dolore&ReceiptNumber=ut dolore&DocumentTypeCode=ut dolore&DocumentTypeVersion=ut dolore&ReceiverName=ut dolore&ReceiverRegisterationNumber=ut dolore&PosSerialNumber=ut dolore&PaymentMethod=ut dolore&SubmissionChannel=POS&Status=Valid&Direction=Submitted&SortBy=None&SortDir=None&PageNo=63021623&PageSize=63021623",
      "host": [
        "{{apiBaseUrl}}"
      ],
      "path": [
        "api",
        "v1",
        "receipts",
        "recent"
      ],
      "query": [
        {
          "key": "Uuid",
          "value": "ut dolore"
        },
        {
          "key": "SubmissionUuid",
          "value": "ut dolore"
        },
        {
          "key": "ReceiptNumber",
          "value": "ut dolore"
        },
        {
          "key": "DocumentTypeCode",
          "value": "ut dolore"
        },
        {
          "key": "DocumentTypeVersion",
          "value": "ut dolore"
        },
        {
          "key": "ReceiverName",
          "value": "ut dolore"
        },
        {
          "key": "ReceiverRegisterationNumber",
          "value": "ut dolore"
        },
        {
          "key": "PosSerialNumber",
          "value": "ut dolore"
        },
        {
          "key": "PaymentMethod",
          "value": "ut dolore"
        },
        {
          "key": "SubmissionChannel",
          "value": "POS"
        },
        {
          "key": "Status",
          "value": "Valid"
        },
        {
          "key": "Direction",
          "value": "Submitted"
        },
        {
          "key": "SortBy",
          "value": "None"
        },
        {
          "key": "SortDir",
          "value": "None"
        },
        {
          "key": "PageNo",
          "value": "63021623"
        },
        {
          "key": "PageSize",
          "value": "63021623"
        }
      ]
    }
  },
  "response": [
  ]
}