Chilkat Online Tools

unicodeCpp / Coupa Postman Collection - OAuth - Master / Retrieve Requisitions Pending with Current (Remote) Approver

Back to Collection Items

#include <CkHttpW.h>
#include <CkJsonObjectW.h>
#include <CkHttpResponseW.h>

void ChilkatSample(void)
    {
    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    CkHttpW http;
    bool success;

    CkJsonObjectW queryParams;
    queryParams.UpdateString(L"current_approver_association[login]",L"CoupaSam");

    // Adds the "Authorization: Bearer <access_token>" header.
    http.put_AuthToken(L"<access_token>");

    CkHttpResponseW *resp = http.QuickRequestParams(L"GET",L"https://domain.com/requisitions",queryParams);
    if (http.get_LastMethodSuccess() == false) {
        wprintf(L"%s\n",http.lastErrorText());
        return;
    }

    wprintf(L"%d\n",resp->get_StatusCode());
    wprintf(L"%s\n",resp->bodyStr());
    delete resp;
    }

Curl Command

curl -G -d "current_approver_association[login]=CoupaSam"
	-H "Authorization: Bearer <access_token>"
https://domain.com/requisitions

Postman Collection Item JSON

{
  "name": "Retrieve Requisitions Pending with Current (Remote) Approver",
  "request": {
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{URL}}/requisitions?current_approver_association[login]=CoupaSam",
      "host": [
        "{{URL}}"
      ],
      "path": [
        "requisitions"
      ],
      "query": [
        {
          "key": "current_approver_association[login]",
          "value": "CoupaSam"
        }
      ]
    }
  },
  "response": [
  ]
}