POST /v1/customers/:id/contacts

Associates a collection of contacts with any given customer.

curl -XPOST \
  --header "Content-Type: application/json" \
  --header "Authorization: Bearer 795d966936e24e19d4f9455be5ce44a4fd1d489623b966d20acf53ac0994cdfa" \
  https://api.invisiblecollector.com/v1/customers/2314234/contacts
  --data '...'
# example available soon
// example available soon
// example available soon

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 debtor. Mainly used to facilitate integration with external systems.</td>
</tr>

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

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

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

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

<tr>
  <td>country</td>
  <td>string</td>
  <td>The debtor’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 debtor’s email address. Will be used as the destination for email notifications.</td>
</tr>

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

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

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

<tr>
  <td>locale</td>
  <td>string</td>
  <td>The debtor’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 debtor.</td>
</tr>

<tr>
  <td>contacts</td>
  <td>array</td>
  <td>A list of registered secondary contacts linked to this debtor.</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.