POST /v1/customers/:id/contacts

Associates a collection of contacts with any given customer.

Endpoint

POST https://api.invisiblecollector.com/v1/customers/:id/contacts

Request body

The request is simply a list of contacts with following structure:

Attribute Type Mandatory Default Description
name string yes N/A The name of the contact.
email string no N/A The contact’s email address.
phone string no N/A The contact’s phone number.
mobile string no N/A The contact’s phone number.

Response body

Customer

<tr>
  <td>externalId</td>
  <td>string</td>
  <td>An external identification of this customer. Mainly used to facilitate integration with external systems.</td>
</tr>

<tr>
  <td>vatNumber</td>
  <td>string</td>
  <td>The customer’s unique identification number for tax purposes.</td>
</tr>

<tr>
  <td>address</td>
  <td>string</td>
  <td>The customer’s address.</td>
</tr>

<tr>
  <td>zipCode</td>
  <td>string</td>
  <td>The customer’s zip code.</td>
</tr>

<tr>
  <td>city</td>
  <td>string</td>
  <td>The customer’s city.</td>
</tr>

<tr>
  <td>country</td>
  <td>string</td>
  <td>The customer’s <a href="https://en.wikipedia.org/wiki/ISO_3166-1" class="highlight">ISO 3166-1</a> country code.</td>
</tr>

<tr>
  <td>email</td>
  <td>string</td>
  <td>The customer’s email address. Will be used as the destination for email notifications.</td>
</tr>

<tr>
  <td>phone</td>
  <td>string</td>
  <td>The customer’s phone number</td>
</tr>

<tr>
  <td>mobile</td>
  <td>string</td>
  <td>The customer’s mobile number</td>
</tr>

<tr>
  <td>gid</td>
  <td>string</td>
  <td>An unique identifier of this customer which can be used to retrive it.</td>
</tr>

<tr>
  <td>locale</td>
  <td>string</td>
  <td>The customer’s <a href="https://en.wikipedia.org/wiki/Locale_(computer_software)" class="highlight">locale</a>. Will be used to set the language of notifications sent to the customer.</td>
</tr>

<tr>
  <td>contacts</td>
  <td>array</td>
  <td>A list of registered secondary contacts linked to this customer.</td>
</tr>

Contact

<tr>
  <td>email</td>
  <td>string</td>
  <td>The contact's email address.</td>
</tr>

<tr>
  <td>phone</td>
  <td>string</td>
  <td>The contact phone number</td>
</tr>

<tr>
  <td>mobile</td>
  <td>string</td>
  <td>The contact mobile number</td>
</tr>

Errors

This endpoint may return the following errors

HTTP Code Description
401 Unauthorized Invalid credentials were supplied
404 Not found The user doesn’t have any customer registered with that specific id.