Chilkat Online Tools

Foxpro / Coupa Postman Collection - OAuth - Master / Retrieve void receipts against a PO

Back to Collection Items

LOCAL loHttp
LOCAL lnSuccess
LOCAL loQueryParams
LOCAL loResp

* 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')

loQueryParams = CreateObject('Chilkat_9_5_0.JsonObject')
loQueryParams.UpdateInt("order-line[order-header-id]",3230)
loQueryParams.UpdateString("type[contains]","Void")

* Adds the "Authorization: Bearer <access_token>" header.
loHttp.AuthToken = "<access_token>"

loResp = loHttp.QuickRequestParams("GET","https://domain.com/receiving_transactions",loQueryParams)
IF (loHttp.LastMethodSuccess = 0) THEN
    ? loHttp.LastErrorText
    RELEASE loHttp
    RELEASE loQueryParams
    CANCEL
ENDIF

? STR(loResp.StatusCode)
? loResp.BodyStr
RELEASE loResp

RELEASE loHttp
RELEASE loQueryParams

Curl Command

curl -G -d "order-line[order-header-id]=3230"
	-d "type[contains]=Void"
	-H "Authorization: Bearer <access_token>"
https://domain.com/receiving_transactions

Postman Collection Item JSON

{
  "name": "Retrieve void receipts against a PO",
  "protocolProfileBehavior": {
    "disabledSystemHeaders": {}
  },
  "request": {
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{URL}}/receiving_transactions?order-line[order-header-id]=3230&type[contains]=Void",
      "host": [
        "{{URL}}"
      ],
      "path": [
        "receiving_transactions"
      ],
      "query": [
        {
          "key": "order-line[order-header-id]",
          "value": "3230"
        },
        {
          "key": "type[contains]",
          "value": "Void"
        }
      ]
    }
  },
  "response": [
  ]
}