API:Contact:CustomFields:Update

From docs
Revision as of 15:46, 7 November 2014 by Greg Donald (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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'
       },
   ],