Back to Collection Items
void ChilkatSample(void)
{
json.UpdateString(L"email",L"nobody@example.com"); json.UpdateString(L"first_name",L"test"); json.UpdateString(L"last_name",L"test"); json.UpdateString(L"company",L"test"); json.UpdateString(L"job_title",L"test"); json.UpdateString(L"phone",L"test"); json.UpdateString(L"country",L"test"); json.UpdateString(L"state",L"test"); json.UpdateString(L"street_address",L"test"); json.UpdateString(L"city",L"test"); json.UpdateString(L"postal_code",L"test"); http.put_AuthToken(L"{{access_token}}");
}
Curl Command
curl -X POST
-H "Authorization: API-Key {{api_key}}"
-H "Authorization: Bearer {{access_token}}"
-d '{
"email": "nobody@example.com",
"first_name": "test",
"last_name": "test",
"company": "test",
"job_title": "test",
"phone": "test",
"country":"test",
"state":"test",
"street_address":"test",
"city":"test",
"postal_code":"test"
}'
https://api.pandadoc.com/public/v1/contacts/
Postman Collection Item JSON
{
"name": "Create Contact",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = JSON.parse(responseBody);",
"if (jsonData.id !== undefined) {",
" postman.setEnvironmentVariable(\"contact_id\", jsonData.id);",
"}"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "Authorization",
"value": "API-Key {{api_key}}",
"type": "text"
},
{
"key": "Authorization",
"value": "Bearer {{access_token}}",
"type": "text",
"disabled": true
}
],
"body": {
"mode": "raw",
"raw": "{\n \"email\": \"nobody@example.com\",\n \"first_name\": \"test\",\n \"last_name\": \"test\",\n \"company\": \"test\",\n \"job_title\": \"test\",\n \"phone\": \"test\",\n \"country\":\"test\",\n \"state\":\"test\",\n \"street_address\":\"test\",\n \"city\":\"test\",\n \"postal_code\":\"test\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://api.pandadoc.com/public/v1/contacts/",
"protocol": "https",
"host": [
"api",
"pandadoc",
"com"
],
"path": [
"public",
"v1",
"contacts",
""
]
}
},
"response": [
]
}