Difference between revisions of "API:Contact:CustomFields:Update"
Greg Donald (talk | contribs) (Created page with " == API » Update Contact Custom Fields == '''URL:''' <nowiki>https://app.callproof.com/api/contact/custom_fields/update/</nowiki> '''Method:''' POST '''Required Fi...") |
Greg Donald (talk | contribs) |
||
Line 22: | Line 22: | ||
* '''''errors''''' - Array of errors produced by the request | * '''''errors''''' - Array of errors produced by the request | ||
* '''''code''''' - HTTP request status | * '''''code''''' - HTTP request status | ||
+ | |||
+ | |||
+ | |||
+ | == Special Field Formats == | ||
+ | |||
+ | === Datetime Fields === | ||
+ | |||
+ | The datetime field requires sending each part of the datetime field individually using [ hour, minute, ampm ] suffixes onto the field id value. | ||
+ | |||
+ | An example: | ||
+ | |||
+ | 'custom_fields': [ | ||
+ | { | ||
+ | 'id': 7480, | ||
+ | 'value': '11/15/2004' | ||
+ | }, | ||
+ | { | ||
+ | 'id': '7480_hour', | ||
+ | 'value': '05' | ||
+ | }, | ||
+ | { | ||
+ | 'id': '7480_minute', | ||
+ | 'value': '15' | ||
+ | }, | ||
+ | { | ||
+ | 'id': '7480_ampm', | ||
+ | 'value': 'PM' | ||
+ | }, | ||
+ | ], |
Latest revision as of 15:46, 7 November 2014
API » Update Contact Custom Fields
URL: https://app.callproof.com/api/contact/custom_fields/update/
Method: POST
Required Fields:
- api_key[key] - API Key
- api_key[secret] - API Key Secret
- contact[id] - Contact ID
Optional Fields:
- custom_fields[] - Array of custom fields and values. An entry should contain 'id' and 'value' values.
- files[] - Array of custom field files. An entry should contain 'id', 'value', 'name', and 'content_type' values. The 'value' should contain a base64 encoded representation of the file's raw data. The 'content_type' should be a proper mime type (e.g. 'image/png').
Data Returned:
- results - Contact as provided
- errors - Array of errors produced by the request
- code - HTTP request status
Special Field Formats
Datetime Fields
The datetime field requires sending each part of the datetime field individually using [ hour, minute, ampm ] suffixes onto the field id value.
An example:
'custom_fields': [ { 'id': 7480, 'value': '11/15/2004' }, { 'id': '7480_hour', 'value': '05' }, { 'id': '7480_minute', 'value': '15' }, { 'id': '7480_ampm', 'value': 'PM' }, ],