POST api/Contacts

Creates one or more new contacts, with the option to merge unambiguous duplicate contacts.

Request

Parameters

Name Description Default
validateOnly If true, the contacts will be validated but not committed to the database. False
protect If true, the contacts will be protected against accidental deletion. True

Body

Content Type: application/xml
Schema: http://download.overtech.com.au/schemas/XmlContact.xsd
XML document describing the contact(s) to create.

Response

Body

Content Type: application/xml or application/json
Details of the new contact(s) or an error message.

XML JSON
<Response>                                       
  <Result>                                       <!--Array of 'Item'--> 
    <Item>                                       
      <Index>int</Index>                         <!--0-based index of the contact--> 
      <Status>string</Status>                    <!--'Success', 'Merged', 'AlreadyExists' or 'Valid'--> 
      <ID>long</ID>                              <!--Unique identifier for the contact--> 
      <FileAs>string</FileAs>                    <!--File-as name for the contact--> 
      <DuplicateTaskID>long</DuplicateTaskID>    <!--ID of a duplicate resolution task pertaining to the new contact--> 
    </Item>                                      
  </Result>                                      
  <Message>string</Message>                      <!--Error message--> 
</Response>                                      
{                                 
   "Result": [{                   
      "Index": "int",             // 0-based index of the contact
      "Status": "string",         // 'Success', 'Merged', 'AlreadyExists' or 'Valid'
      "ID": "long",               // Unique identifier for the contact
      "FileAs": "string",         // File-as name for the contact
      "DuplicateTaskID": "long"   // ID of a duplicate resolution task pertaining to the new contact
   }],                            
   "Message": "string"            // Error message
}                                 
                                  

Status Codes

Code Condition
200 OKOne or more contact(s) were merged with existing contacts, or skipped because a more complete contact record already exists.
201 CreatedThe contact(s) were created successfully.
400 Bad RequestThe XML document was invalid or resulted in invalid contact record(s).
401 Unauthorized Access token is invalid, expired or not specified.
406 Not Acceptable Content type specified in the Accept header isn't supported.
500 Internal Server Error An internal error occurred.
501 Not ImplementedServer does not have the required plug-in.

Remarks

When using the validateOnly option, contacts which would ordinarily be committed will show the status 'Valid'.