Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

add json example to create and create batch contact routes #216

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions source/includes/_api_endpoint_contacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,21 @@ $data = array(

$contact = $contactApi->create($data);
```

```
{
"firstname": "Jim",
"lastname": "Contact",
"email": "[email protected]",
"doNotContact": [
{
"reason": 3,
"comments": "DNC from API"
}
]
}
```

Create a new contact.

#### HTTP Request
Expand Down Expand Up @@ -374,6 +389,28 @@ $data = array(
);
$contact = $contactApi->createBatch($data);
```

```
[
{
"firstname": "Jim",
"lastname": "Contact",
"email": "[email protected]",
"doNotContact": [
{
"reason": 3,
"comments": "DNC from API"
}
]
},
{
"firstname": "John",
"lastname": "Doe",
"email": "[email protected]"
}
]
```

Create a batch of new contacts.

#### HTTP Request
Expand Down