This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
api-contacts [2017/03/07 13:00] ben [Response] |
api-contacts [2018/05/23 11:29] (current) benc |
||
---|---|---|---|
Line 52: | Line 52: | ||
===== Add a Contact ===== | ===== Add a Contact ===== | ||
- | This endpoint is used to add a new [[/contacts|Contact]] to the Sentori Account. If no [[/contact-fields|Contact Fields]] need to be set then the [[/contacts|Contact]] can be added using a GET request, when including [[/contact-fields|Contact Fields]] in a request then they must be in a POST request body. | + | This endpoint is used to add a new [[/contacts|Contact]] to the Sentori Account. |
Note: The EmailAddress [[/contact-fields|Contact Field]] should not appear in the Add request body, and will fail if it doesn't match the request URI. | Note: The EmailAddress [[/contact-fields|Contact Field]] should not appear in the Add request body, and will fail if it doesn't match the request URI. | ||
Line 59: | Line 59: | ||
|URI| <nowiki>https://api.sentoriapp.com/v2.0/contact/add/joe%40example.sentoriapp.com/</nowiki>| | |URI| <nowiki>https://api.sentoriapp.com/v2.0/contact/add/joe%40example.sentoriapp.com/</nowiki>| | ||
- | |Method| GET, or POST if sending additional fields| | + | |Method| POST| |
==== Request Body ==== | ==== Request Body ==== | ||
- | Request body is only required if including [[/contact-fields|Contact Fields]]. The example below would add a new [[/contacts|Contact]] with the FirstName and LastName [[/contact-fields|Contact Fields]] being set. | + | Request body is only needed if including [[/contact-fields|Contact Fields]]. The example below would add a new [[/contacts|Contact]] with the FirstName and LastName [[/contact-fields|Contact Fields]] being set. |
|Example|<code javascript>{ | |Example|<code javascript>{ | ||
Line 70: | Line 70: | ||
}</code>| | }</code>| | ||
+ | ==== Response ==== | ||
+ | |||
+ | The complete Contact as it then exists in Sentori is returned. | ||
+ | See the [[#get-a-contact|Get a Contact]] endpoint's Example Response for details. | ||
===== Update a Contact ===== | ===== Update a Contact ===== | ||
Line 91: | Line 95: | ||
}</code>| | }</code>| | ||
+ | ==== Response ==== | ||
+ | |||
+ | The complete Contact as it then exists in Sentori is returned. | ||
+ | See the [[#get-a-contact|Get a Contact]] endpoint's Example Response for details. | ||
===== Add or Update a Contact ===== | ===== Add or Update a Contact ===== | ||
Line 133: | Line 141: | ||
For other responses, see the [[api-errors|Error List]]. | For other responses, see the [[api-errors|Error List]]. | ||
+ | |||
+ | For a successful result, the complete Contact as it then exists in Sentori is returned. | ||
+ | |||
+ | See the [[#get-a-contact|Get a Contact]] endpoint's Example Response for details. | ||
+ | |||
+ | In the described situation of the original Request's URI //and// body containing an Email Address and a Contact eixsting for both of them, the Contact with the body's Email Address is returned. | ||
+ | |||
+ | |||
+ | ===== Delete a Contact ===== | ||
+ | |||
+ | This endpoint is used to delete an existing [[/contacts|Contact]] from the Sentori Account. | ||
+ | |||
+ | ==== Endpoint ==== | ||
+ | |||
+ | |URI| <nowiki>https://api.sentoriapp.com/v2.0/contact/delete/joe%40example.sentoriapp.com/</nowiki>| | ||
+ | |Method| POST| | ||
+ | |||
+ | ==== Request Body ==== | ||
+ | |||
+ | Leave blank. | ||
+ | |||
Line 204: | Line 233: | ||
|URI| <nowiki>https://api.sentoriapp.com/v2.0/contact/subscribe/joe%40example.sentoriapp.com/MailingListExternalID/</nowiki>| | |URI| <nowiki>https://api.sentoriapp.com/v2.0/contact/subscribe/joe%40example.sentoriapp.com/MailingListExternalID/</nowiki>| | ||
- | |Method| GET | | + | |Method| POST | |
===== Unsubscribe Contact from Mailing List ===== | ===== Unsubscribe Contact from Mailing List ===== | ||
Line 214: | Line 243: | ||
|URI| <nowiki>https://api.sentoriapp.com/v2.0/contact/unsubscribe/joe%40example.sentoriapp.com/MailingListExternalID/</nowiki>| | |URI| <nowiki>https://api.sentoriapp.com/v2.0/contact/unsubscribe/joe%40example.sentoriapp.com/MailingListExternalID/</nowiki>| | ||
- | |Method| GET | | + | |Method| POST | |
===== Unsubscribe Contact ===== | ===== Unsubscribe Contact ===== | ||
Line 224: | Line 253: | ||
|URI| <nowiki>https://api.sentoriapp.com/v2.0/contact/unsubscribe/joe%40example.sentoriapp.com/</nowiki>| | |URI| <nowiki>https://api.sentoriapp.com/v2.0/contact/unsubscribe/joe%40example.sentoriapp.com/</nowiki>| | ||
- | |Method| GET | | + | |Method| POST | |
===== Import Contacts ===== | ===== Import Contacts ===== | ||
Line 264: | Line 293: | ||
|ExcludedInvalidEmail|int| Number of [[/contacts|Contacts]] who couldn't be Imported as the email addresses weren't valid.| | |ExcludedInvalidEmail|int| Number of [[/contacts|Contacts]] who couldn't be Imported as the email addresses weren't valid.| | ||
|ExcludedRoleBased|int| Number of [[/contacts|Contacts]] who weren't Imported as they have role-based email addresses.| | |ExcludedRoleBased|int| Number of [[/contacts|Contacts]] who weren't Imported as they have role-based email addresses.| | ||
- | |UploadGroupExternalID|string| ExternalID of the [[/upload-groups|Upload Group]] created by this Import.| | + | |UploadGroupExternalID|string| ExternalID of the [[/upload-groups|Upload Group]] created by this Import or null if no Contacts were actually imported.| |
Line 271: | Line 300: | ||
{ | { | ||
"TotalRows": 4, | "TotalRows": 4, | ||
- | "EmailableRowsCreated": 4, | + | "EmailableRowsCreated": 1, |
"EmailableRowsUpdated": 2, | "EmailableRowsUpdated": 2, | ||
- | "SuppressedUpdated": 0, | + | "SuppressedUpdated": 1, |
"BadEmailUpdated": 0, | "BadEmailUpdated": 0, | ||
"ExcludedDuplicates": 0, | "ExcludedDuplicates": 0, | ||
- | "ExcludedInvalidEmail": 1, | + | "ExcludedInvalidEmail": 0, |
- | "ExcludedRoleBased": 1, | + | "ExcludedRoleBased": 0, |
"UploadGroupExternalID": "1234ABCD" | "UploadGroupExternalID": "1234ABCD" | ||
} | } | ||
Line 289: | Line 318: | ||
|URI| <nowiki>https://api.sentoriapp.com/v2.0/contact/import/{{UploadGroupExternalID}}/attach/{{DocumentExternalID}}</nowiki>| | |URI| <nowiki>https://api.sentoriapp.com/v2.0/contact/import/{{UploadGroupExternalID}}/attach/{{DocumentExternalID}}</nowiki>| | ||
- | |Method| GET | | + | |Method| POST | |