Chilkat Online Tools

unicodeCpp / Zoho CRM REST APIs / Sales Orders

Back to Collection Items

#include <CkHttpW.h>
#include <CkStringBuilderW.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;

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

    CkStringBuilderW sbResponseBody;
    success = http.QuickGetSb(L"https://domain.com/crm/v2.1/Accounts/{{record_id}}/SalesOrders",sbResponseBody);
    if (success == false) {
        wprintf(L"%s\n",http.lastErrorText());
        return;
    }

    wprintf(L"Response status code = %d\n",http.get_LastStatus());
    wprintf(L"%s\n",sbResponseBody.getAsString());
    }

Curl Command

curl -X GET
	-H "Authorization: Bearer <access_token>"
https://domain.com/crm/v2.1/Accounts/{{record_id}}/SalesOrders

Postman Collection Item JSON

{
  "name": "Sales Orders",
  "protocolProfileBehavior": {
    "disableBodyPruning": true
  },
  "request": {
    "auth": {
      "type": "bearer",
      "bearer": [
        {
          "key": "token",
          "value": "{{access-token}}",
          "type": "string"
        }
      ]
    },
    "method": "GET",
    "header": [
    ],
    "body": {
      "mode": "raw",
      "raw": "",
      "options": {
        "raw": {
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{api-domain}}/crm/v2.1/Accounts/{{record_id}}/SalesOrders",
      "host": [
        "{{api-domain}}"
      ],
      "path": [
        "crm",
        "v2.1",
        "Accounts",
        "{{record_id}}",
        "SalesOrders"
      ]
    },
    "description": "To get the Sales Orders associated with an Account."
  },
  "response": [
  ]
}