API input with strings? integers? inconsistencies?

Hey Community,

Wondering if anybody else has experienced any issues with the Pipedrive API when it comes to creating records. It seems like the API outputs Int. but wants strings when you are setting custom fields?

Can anybody confirm that we need to use strings 100% of the time, even though the API outputs integers?

Example input:
{
“headers”: [
{
“key”: “Content-Type”,
“value”: “application/json”
}
],
“follow_redirect”: false,
“auth”: {},
“parse_response”: “true”,
“tls”: {},
“body”: {
“form_data”: {
“pipeline”: null,
“owner_id”: null,
“44f406fa4f8b49b1a0cf8313cb2d9b4724c5848d”: “Tutones Custom AV”,
“def9384ed00378b16b2f1ce2039fac9848aabd52789”: “New Lead Submitted”,
“534a3f7c8c08dfc642e13d56ab7a2447d0abb2d342”: “https://.zendesk.com/agendct/tickets/653”,
“ca5424c0aa6d38c86d372f2a3a15ae06d09b891355”: “$50-$100K”,
“value”: null,
“14ccc71c15221369a3bcc7ae53564decdc28bb4676”: “2020-07-22T07:00:00.000Z”,
“defb610d4fec5349703ada2c8be5a1dedffb328c30”: “5319”,
“org_id”: 4528,
“title”: “Day0 Submission”,
“stage_id”: “8”,
“b7f2d07ffe111d5cd8abfa461947b4bd5ef8711f”: “Essentials Plus”
}
},
“url”: “https://example-32332.pipedrive.com/v1/deals?api_token=xyz”,
“reject_unauthorized”: true
}

Example output:
{
“response”: {
“status_code”: 201,
“headers”: {
“date”: “Mon, 13 Jul 2020 14:12:42 GMT”,
“content-type”: “application/json”,
“transfer-encoding”: “chunked”,
“connection”: “close”,
“set-cookie”: [
“__cfduid=da774e66015f2da13f39529562321dc2f2d2634c1594649562; expires=Wed, 12-Aug-20 14:12:42 GMT; path=/; domain=.pipedrive.com; HttpOnly; SameSite=Lax”
],
“cf-ray”: “5b2399b37a92e36a-SEA”,
“access-control-allow-origin”: “*”,
“cache-control”: “no-cache”,
“strict-transport-security”: “max-age=31536000; includeSubDomains”,
“vary”: “Accept-Encoding”,
“cf-cache-status”: “DYNAMIC”,
“access-control-expose-headers”: “X-RateLimit-Remaining, X-RateLimit-Limit, X-RateLimit-Reset”,
“badi”: “Routing: us-east-1=>us-east-1; Version: 4a59; Host: bari;”,
“cf-request-id”: “03ea1e642c0000e36a5b36fd1a200000001”,
“expect-ct”: “max-age=604800, report-uri=“https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct””,
“pdtrusted-wgw-real-user-ip”: “52.27.194.59”,
“x-content-type-options”: “nosniff, nosniff”,
“x-correlation-id”: “37cadcbb-b7d5-4433-be64-2f33b7d72357”,
“x-daily-requests-left”: “9975”,
“x-frame-options”: “SAMEORIGIN”,
“x-ratelimit-limit”: “80”,
“x-ratelimit-remaining”: “79”,
“x-ratelimit-reset”: “2”,
“x-xss-protection”: “1; mode=block”,
“server”: “cloudflare”,
“alt-svc”: “h3-27=”:443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400"
},
“body”: {
“success”: true,
“data”: {
“id”: 4876,
“creator_user_id”: {
“id”: 6384799,
“name”: “Admin”,
“email”: “admin@domain.com”,
“has_pic”: 0,
“pic_hash”: null,
“active_flag”: true,
“value”: 6384799
},
“user_id”: {
“id”: 6384799,
“name”: “Admin”,
“email”: “admin@domain.com”,
“has_pic”: 0,
“pic_hash”: null,
“active_flag”: true,
“value”: 6384799
},
“person_id”: null,
“org_id”: null,
“stage_id”: 8,
“title”: “Day0 Submission”,
“value”: 0,
“currency”: “USD”,
“add_time”: “2020-07-13 14:12:42”,
“update_time”: “2020-07-13 14:12:42”,
“stage_change_time”: null,
“active”: true,
“deleted”: false,
“status”: “open”,
“probability”: null,
“next_activity_date”: null,
“next_activity_time”: null,
“next_activity_id”: null,
“last_activity_id”: null,
“last_activity_date”: null,
“lost_reason”: null,
“visible_to”: “3”,
“close_time”: null,
“pipeline_id”: 2,
“won_time”: null,
“first_won_time”: null,
“lost_time”: null,
“products_count”: 0,
“files_count”: 0,
“notes_count”: 0,
“followers_count”: 0,
“email_messages_count”: 0,
“activities_count”: 0,
“done_activities_count”: 0,
“undone_activities_count”: 0,
“participants_count”: 0,
“expected_close_date”: null,
“last_incoming_mail_time”: null,
“last_outgoing_mail_time”: null,
“label”: null,
“44f406fa4f8b49b1a0cf8313daccb2d9b4724c5848d”: “127”,
“def9384ed00378b16b2f1cadve20399848aabd52789”: “449”,
“534a3f7c8c08dfc642ed56ab7afa2447d0abb2d342”: “https://.zendesk.com/agent/tickets/653”,
“edef3dc76787284f14dasdc5d627c9bac4d3dee7b221”: null,
“879972eff6047257bfb998eca7af230c2b9560c603”: null,
“b7f2d07ffe111d5cd8abfa461947bcva4bd5ef8711f”: “Essentials Plus”,
“ca5424c0aa6d38c86da372f3a15ae06d3d09b891355”: “1970-01-01”,
“defb610d4fec5349703ada2dac8be5dcedffb328c30”: “316”,
“14ccc71c15221369a3bcc7ae5133564dec28cbb4676”: “2020-07-22T07:00:00.000Z”,
“stage_order_nr”: 1,
“person_name”: null,
“org_name”: null,
“next_activity_subject”: null,
“next_activity_type”: null,
“next_activity_duration”: null,
“next_activity_note”: null,
“formatted_value”: “$0”,
“weighted_value”: 0,
“formatted_weighted_value”: “$0”,
“weighted_value_currency”: “USD”,
“rotten_time”: null,
“owner_name”: “ISD Admin”,
“cc_email”: “exaaample-3234ad+deal4876@pipedrivemail.com”,
“org_hidden”: false,
“person_hidden”: false
},
“related_objects”: {
“user”: {
“6384799”: {
“id”: 6384799,
“name”: “Admin”,
“email”: “user@domain.com”,
“has_pic”: 0,
“pic_hash”: null,
“active_flag”: true
}
}
}
}
}
}

For Fields with a set value (single/multiple option for example), you do need to input an integer (ID), but the output will be a string.