Chilkat Online Tools

Unicode C++ / Coupa Postman Collection - OAuth - Master / Create Department

Back to Collection Items

void ChilkatSample(void)
    {
    xml.put_Tag(L"department");    http.put_AuthToken(L"<access_token>");    xml.GetXmlSb(sbRequestBody);
    }

Curl Command

curl -X POST
	-H "Authorization: Bearer <access_token>"
	-d '<department>
    <name>Coupa Development</name>
    <active>true</active>
    <custom-fields>
        <test1>TestCustomDevelopment</test1>
    </custom-fields>
</department>'
https://domain.com/departments?fields=["id","name","active",{"custom_fields":{}}]

Postman Collection Item JSON

{
  "name": "Create Department",
  "request": {
    "method": "POST",
    "header": [
    ],
    "body": {
      "mode": "raw",
      "raw": "<department>\n    <name>Coupa Development</name>\n    <active>true</active>\n    <custom-fields>\n        <test1>TestCustomDevelopment</test1>\n    </custom-fields>\n</department>",
      "options": {
        "raw": {
          "language": "xml"
        }
      }
    },
    "url": {
      "raw": "{{URL}}/departments?fields=[\"id\",\"name\",\"active\",{\"custom_fields\":{}}]",
      "host": [
        "{{URL}}"
      ],
      "path": [
        "departments"
      ],
      "query": [
        {
          "key": "fields",
          "value": "[\"id\",\"name\",\"active\",{\"custom_fields\":{}}]"
        }
      ]
    }
  },
  "response": [
  ]
}