Chilkat Online Tools

Foxpro / APPIA API / GET ALL TRANSACTIONS

Back to Collection Items

LOCAL loHttp
LOCAL lnSuccess
LOCAL loSbResponseBody

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

loHttp = CreateObject('Chilkat_9_5_0.Http')

* Adds the "Authorization: Bearer {{auth}}" header.
loHttp.AuthToken = "{{auth}}"

loSbResponseBody = CreateObject('Chilkat_9_5_0.StringBuilder')
lnSuccess = loHttp.QuickGetSb("https://domain.com/payment/transactions/",loSbResponseBody)
IF (lnSuccess = 0) THEN
    ? loHttp.LastErrorText
    RELEASE loHttp
    RELEASE loSbResponseBody
    CANCEL
ENDIF

? "Response status code = " + STR(loHttp.LastStatus)
? loSbResponseBody.GetAsString()

RELEASE loHttp
RELEASE loSbResponseBody

Curl Command

curl -X GET
	-H "Authorization: Bearer <access_token>"
	-H "Authorization: Bearer {{auth}}"
https://domain.com/payment/transactions/

Postman Collection Item JSON

{
  "name": "GET ALL TRANSACTIONS",
  "request": {
    "auth": {
      "type": "bearer",
      "bearer": [
        {
          "key": "token",
          "value": "{{auth}}",
          "type": "string"
        }
      ]
    },
    "method": "GET",
    "header": [
      {
        "key": "Authorization",
        "value": "Bearer {{auth}}"
      }
    ],
    "url": {
      "raw": "{{url}}/payment/transactions/",
      "host": [
        "{{url}}"
      ],
      "path": [
        "payment",
        "transactions",
        ""
      ]
    }
  },
  "response": [
  ]
}