Back to Collection Items
integer li_rc
oleobject loo_Http
integer li_Success
oleobject loo_QueryParams
oleobject loo_Resp
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
loo_Http = create oleobject
// Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
li_rc = loo_Http.ConnectToNewObject("Chilkat.Http")
if li_rc < 0 then
destroy loo_Http
MessageBox("Error","Connecting to COM object failed")
return
end if
loo_QueryParams = create oleobject
// Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
li_rc = loo_QueryParams.ConnectToNewObject("Chilkat.JsonObject")
loo_QueryParams.UpdateString("Uuid","ut dolore")
loo_QueryParams.UpdateString("SubmissionUuid","ut dolore")
loo_QueryParams.UpdateString("ReceiptNumber","ut dolore")
loo_QueryParams.UpdateString("DocumentTypeCode","ut dolore")
loo_QueryParams.UpdateString("DocumentTypeVersion","ut dolore")
loo_QueryParams.UpdateString("ReceiverName","ut dolore")
loo_QueryParams.UpdateString("ReceiverRegisterationNumber","ut dolore")
loo_QueryParams.UpdateString("PosSerialNumber","ut dolore")
loo_QueryParams.UpdateString("PaymentMethod","ut dolore")
loo_QueryParams.UpdateString("SubmissionChannel","POS")
loo_QueryParams.UpdateString("Status","Valid")
loo_QueryParams.UpdateString("Direction","Submitted")
loo_QueryParams.UpdateString("SortBy","None")
loo_QueryParams.UpdateString("SortDir","None")
loo_QueryParams.UpdateInt("PageNo",63021623)
loo_QueryParams.UpdateInt("PageSize",63021623)
// Adds the "Authorization: Bearer <access_token>" header.
loo_Http.AuthToken = "<access_token>"
loo_Resp = loo_Http.QuickRequestParams("GET","https://domain.com/api/v1/receipts/recent",loo_QueryParams)
if loo_Http.LastMethodSuccess = 0 then
Write-Debug loo_Http.LastErrorText
destroy loo_Http
destroy loo_QueryParams
return
end if
Write-Debug string(loo_Resp.StatusCode)
Write-Debug loo_Resp.BodyStr
destroy loo_Resp
destroy loo_Http
destroy loo_QueryParams
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": [
]
}