Contacts
Before creating a contact, you will need to run the create customer
request again (in case you deleted a created customer), to have a valid customerUNID
in the collection variables to tie the contact to.
Create Contact
- Hover over the
Domino-REST-API-NewDB
collection name and click on the ellipsis (three dots). Select Add Request. - Name the request
create contact
and click Save. - Change the method from GET to POST.
- Set the URL as
{{HOST}}/document?dataSource=customers
. - Set the headers for Authorization and Content-Type.
- On the Body tab change the type to
Raw
and also change the type fromText
toJSON
. -
Set the request body content as below:
{ "Form": "Contact", "first_name": "Marvin", "last_name": "Acme", "customerUNID": "{{parentUNID}}", "job_title": "Chairman", "email": "marvin.acme@acme.com", "phone": "" }
NOTE
Notice the
customerUNID
is set to{{parentUNID}}
collection variable set when you created the customer. - Click Send.
Create Another Contact
-
Change the request body content and repeat the step on the Create Contact as below:
{ "Form": "Contact", "first_name": "Wile E.", "last_name": "Coyote", "customerUNID": "{{parentUNID}}", "job_title": "Tester", "email": "wile.coyote@acme.com", "phone": "" }
- Click Send.
- Save and close the request.