From d0961117872ef3e516fd06d538b24f9e46224bba Mon Sep 17 00:00:00 2001 From: Norman Pracht - Webmecanik Date: Wed, 1 Nov 2023 08:09:19 +0100 Subject: [PATCH] add json example to create and create batch contact routes --- source/includes/_api_endpoint_contacts.md | 37 +++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/source/includes/_api_endpoint_contacts.md b/source/includes/_api_endpoint_contacts.md index 1920f0952b7..3975a5fb916 100644 --- a/source/includes/_api_endpoint_contacts.md +++ b/source/includes/_api_endpoint_contacts.md @@ -330,6 +330,21 @@ $data = array( $contact = $contactApi->create($data); ``` + +``` +{ + "firstname": "Jim", + "lastname": "Contact", + "email": "jim@his-site.com", + "doNotContact": [ + { + "reason": 3, + "comments": "DNC from API" + } + ] +} +``` + Create a new contact. #### HTTP Request @@ -374,6 +389,28 @@ $data = array( ); $contact = $contactApi->createBatch($data); ``` + +``` +[ + { + "firstname": "Jim", + "lastname": "Contact", + "email": "jim@his-site.com", + "doNotContact": [ + { + "reason": 3, + "comments": "DNC from API" + } + ] + }, + { + "firstname": "John", + "lastname": "Doe", + "email": "john@the-site.com" + } +] +``` + Create a batch of new contacts. #### HTTP Request