Contacts
List all contacts
Returns a paginated list of contacts in the administration.
Searching for contacts can be done by providing the query
parameter with search terms. The API searches for matches in the following contact fields:
company_name
attention
firstname
lastname
address1
address2
zipcode
city
country
email
phone
customer_id
tax_number
chamber_of_commerce
bank_account
Parameters
Parameter | Type | Description |
---|---|---|
page |
Integer |
|
per_page |
Integer |
|
query |
String |
|
include_archived |
Boolean |
|
todo |
String |
Example: return a list of contacts
Request
Response
Example: allows filtering by name
Request
Response
Example: allows filtering by name in combination with pagination
Request
Response
Example: returns empty list when no matches with filter
Request
Response
Example: returns paginated contacts on page 1
Request
Response
Example: returns paginated contacts on page 2
Request
Response
Example: returns an error when too many contacts are requested
Request
Response
Filter contacts
Returns a paginated list of all contacts in the administration.
The filter
argument allows you to filter the list of contacts. Filters are a combination of keys and values,
separated by a comma: first_name:henk,last_name:jansen
. The available options for filtering are:
Filter | Type | Default | Description |
created_after | String |
 | Select contacts created after the given time (exclusive). ISO 8601 formatted string. The time to compare with is in UTC timezone |
updated_after | String |
 | Select contacts updated after the given time (exclusive). ISO 8601 formatted string. The time to compare with is in UTC timezone |
first_name | String |
 | Select contacts with the given first name. Case-insensitive |
last_name | String |
 | Select contacts with the given last name. Case-insensitive |
Parameters
Parameter | Type | Description |
---|---|---|
filter |
String |
|
include_archived |
Grape::api::boolean |
Example: returns all contacts created after given datetime
Request
Response
Example: returns only contacts updated after given datetime
Request
Response
Example: allows filtering by firstname
Request
Response
List all ids and versions
Returns all contacts in the administration. The list contains the contact id and the version of the contact.
Check if the version of the contact is newer than the version you have stored locally, use the POST
variant for fetching contacts with the given ids.
Parameters
Parameter | Type | Description |
---|---|---|
filter |
String |
|
include_archived |
Grape::api::boolean |
Example: return a list of id's and version id's
Request
Response
Example: retrieves the id's for synchronization with a filter
Request
Response
Fetch contacts with given ids
Given a list of contact ids, returns the contact information belonging to the contacts. Returns a maximum of 100 contacts, even if more ids are provided.
Parameters
Parameter | Type | Description |
---|---|---|
ids |
Array[integer] |
Required |
Example: return a list of given ids
Request
Response
Get contact
Returns all information about a contact.
Parameters
Parameter | Type | Description |
---|---|---|
include_archived |
Boolean |
Example: return a contact
Request
Response
Example: returns sepa_iban as bank_account
Request
Response
Example: returns 404 when contact does not exist
Request
Response
Get contact by customer id
Returns all information about a contact by the given customer id
Parameters
Parameter | Type | Description |
---|---|---|
customer_id |
String |
Required Should be unique for the administration. |
Example: return a contact
Request
Response
Example: returns 404 when contact does not exist
Request
Response
Create a new contact
Creating a new contact in the administration requires at least a company_name
or a firstname
and lastname
.
When filling a custom field, both id
and value
are required. See the custom field example for more information.
Parameters
Parameter | Type | Description |
---|---|---|
contact[company_name] |
String |
A contact requires a non-blank |
contact[address1] |
String |
|
contact[address2] |
String |
|
contact[zipcode] |
String |
|
contact[city] |
String |
|
contact[country] |
String |
ISO two-character country code, e.g. NL or DE. |
contact[phone] |
String |
|
contact[delivery_method] |
String |
Can be |
contact[customer_id] |
String |
Will be assigned automatically if empty. Should be unique for the administration. |
contact[tax_number] |
String |
|
contact[firstname] |
String |
A contact requires a non-blank |
contact[lastname] |
String |
A contact requires a non-blank |
contact[chamber_of_commerce] |
String |
|
contact[bank_account] |
String |
|
contact[send_invoices_to_attention] |
String |
|
contact[send_invoices_to_email] |
String |
Should be one or more valid email addresses, separated by a comma. |
contact[send_estimates_to_attention] |
String |
|
contact[send_estimates_to_email] |
String |
Should be one or more valid email addresses, separated by a comma. |
contact[sepa_active] |
Boolean |
When |
contact[sepa_iban] |
String |
Should be a valid IBAN. |
contact[sepa_iban_account_name] |
String |
|
contact[sepa_bic] |
String |
Should be a valid BIC. |
contact[sepa_mandate_id] |
String |
|
contact[sepa_mandate_date] |
String |
Should be a date in the past. |
contact[sepa_sequence_type] |
String |
Can be |
contact[si_identifier_type] |
String |
Can be |
contact[si_identifier] |
String |
|
contact[invoice_workflow_id] |
Integer |
Should be a valid invoice workflow id. |
contact[estimate_workflow_id] |
Integer |
Should be a valid estimate workflow id. |
contact[email_ubl] |
Boolean |
|
contact[direct_debit] |
Boolean |
|
contact[custom_fields_attributes][id] |
Integer |
Required |
contact[custom_fields_attributes][value] |
String |
Required |
contact[contact_person][firstname] |
String |
Required |
contact[contact_person][lastname] |
String |
Required |
type |
String |
|
from_checkout |
Boolean |
Example: create a new contact
Request
Response
Example: adding values for custom fields
Request
Response
Example: returns an error when custom field cannot be found
Request
Response
Example: returns an error when fields are not provided
Request
Response
Example: returns an error when record is invalid
Request
Response
Example: create a new contact with mandate_date in timezone gap
Request
Response
Example: create a new contact with mandate_date without timezone gap
Request
Response
Example: create a new contact with given SI identifier
Request
Response
Update a contact
When updating a contact, you only need to provide the information you want to change. Attributes you don’t provide in the request will not be updated. Optional attributes can be removed by setting them to an empty string value.
Parameters
Parameter | Type | Description |
---|---|---|
contact[company_name] |
String |
A contact requires a non-blank |
contact[address1] |
String |
|
contact[address2] |
String |
|
contact[zipcode] |
String |
|
contact[city] |
String |
|
contact[country] |
String |
ISO two-character country code, e.g. NL or DE. |
contact[phone] |
String |
|
contact[delivery_method] |
String |
Can be |
contact[email_ubl] |
Boolean |
|
contact[customer_id] |
String |
Will be assigned automatically if empty. Should be unique for the administration. |
contact[tax_number] |
String |
|
contact[firstname] |
String |
A contact requires a non-blank |
contact[lastname] |
String |
A contact requires a non-blank |
contact[chamber_of_commerce] |
String |
|
contact[bank_account] |
String |
|
contact[send_invoices_to_attention] |
String |
|
contact[send_invoices_to_email] |
String |
Should be one or more valid email addresses, separated by a comma. |
contact[send_estimates_to_attention] |
String |
|
contact[send_estimates_to_email] |
String |
Should be one or more valid email addresses, separated by a comma. |
contact[sepa_active] |
Boolean |
When |
contact[sepa_iban] |
String |
Should be a valid IBAN. |
contact[sepa_iban_account_name] |
String |
|
contact[sepa_bic] |
String |
Should be a valid BIC. |
contact[sepa_mandate_id] |
String |
|
contact[sepa_mandate_date] |
String |
Should be a date in the past. |
contact[sepa_sequence_type] |
String |
Can be |
contact[invoice_workflow_id] |
Integer |
Should be a valid invoice workflow id. |
contact[estimate_workflow_id] |
Integer |
Should be a valid estimate workflow id. |
contact[si_identifier_type] |
String |
Can be |
contact[si_identifier] |
String |
|
contact[direct_debit] |
Boolean |
|
contact[custom_fields_attributes][id] |
Integer |
Required |
contact[custom_fields_attributes][value] |
String |
Required |
Example: update a contact
Request
Response
Example: update a contact that has SEPA activated
Request
Response
Example: update the SEPA sequence type
Request
Response
Example: returns an error when record is invalid
Request
Response
Example: returns a 404 status when the contact is not found
Request
Response
Example: updates a contact with given SI identifier
Request
Response
Example: creates a contact person when company name, firstname and lastname exist together
Request
Response
Example: does not allow making the contact trusted through the API
Request
Response
Delete a contact
Example: delete a contact
Request
Response
Example: archives the contact when deleting was not possible
Request
Response
Example: returns a 404 status when the contact is not found
Request
Response
Example: delete a contact
Request
Response
Example: returns a 404 status when the contact is not found
Request
Response
Create an additional charge to be invoiced at start of next period
At the end of the current period, the additional charges for a contact are merged where possible and an invoice will be created for them. The invoice will be scheduled for sending at the first day of the next month.
Example: creates a usage charge
Request
Response
Get additional charges
Get the additional charges of the given contact.
Parameters
Parameter | Type | Description |
---|---|---|
include_billed |
Boolean |
If true, includes the additional charges that have already been billed. Default is false. |
Example: views additional charges of a contact
Request
Response
Example: does return billed additional charges if include_billed is true
Request
Response
Adds note to entity
Parameters
Parameter | Type | Description |
---|---|---|
note[note] |
String |
Required. Text for the note or to-do. |
note[todo] |
Boolean |
If |
note[assignee_id] |
Integer |
Assign to-do to user. Should be a valid user id. If assignee_id is provided the note will be a to-do. |
Example: create a note
Request
Response
Destroys note from entity
Example: destroy a note
Request
Response
Get contact person
Returns all information about a contact person.
Create a new contact person
Creating a new contact person in the administration requires at least a contact_person
hash including firstname
and lastname
.
Parameters
Parameter | Type | Description |
---|---|---|
contact_person[firstname] |
String |
|
contact_person[lastname] |
String |
|
contact_person[phone] |
String |
|
contact_person[email] |
String |
Should be a valid email addresses. |
contact_person[department] |
String |
Update a contact person
When updating a contact, you only need to provide the information you want to change. Attributes you don’t provide in the request will not be updated.
Parameters
Parameter | Type | Description |
---|---|---|
contact_person[firstname] |
String |
|
contact_person[lastname] |
String |
|
contact_person[phone] |
String |
|
contact_person[email] |
String |
Should be a valid email addresses. |
contact_person[department] |
String |
Delete a contact person
Get Moneybird Payments mandate
Returns information about the stored Moneybird Payments mandate. Only available when Moneybird Payments is enabled for the administration.
Parameters
Parameter | Type | Description |
---|---|---|
contact_id |
Integer |
Required Should be a valid contact ID. |
Example: returns information about the stored Moneybird Payments mandate
Request
Response
Example: returns limited information if mandate exists, but only limited information is available
Request
Response
Example: does return not found when there is no Moneybird Payments mandate found
Request
Response
Example: does not allow access if Moneybird Payments is disabled for the administration
Request
Response
Request a new Moneybird Payments mandate
Sends a request for a Moneybird Payments mandate to a contact via e-mail. Your contact will receive an email containing a link to authorise direct debit payments through Moneybird Payments. Your contact is required to make a 15 cent payment. Only available when Moneybird Payments is enabled for the administration.
Parameters
Parameter | Type | Description |
---|---|---|
mandate_request[email_message] |
String |
|
mandate_request[identity_id] |
Integer |
Should be a valid identity id. |
Example: requests a new Moneybird Payments mandate
Request
Response
Example: allows for a custom message within the request e-mail
Request
Response
Example: does not allow access if Moneybird Payments is disabled for the administration
Request
Response
Request an URL for setting up a Moneybird Payments mandate
Obtains an URL for setting up a Moneybird Payments mandate. You must provide this URL to your contact to set-up the mandate. Your contact is required to make a 15 cent payment. Every generated URL using this endpoint is valid for 14 days after creation. Only available when Moneybird Payments is enabled for the administration.
Parameters
Parameter | Type | Description |
---|---|---|
mandate_request[identity_id] |
Integer |
Should be a valid identity id. |
Example: requests a new Moneybird Payments mandate URL
Request
Response
Example: does not allow access if Moneybird Payments is disabled for the administration
Request
Response
Delete a stored Moneybird Payments mandate
Deletes the stored Moneybird Payments mandate for the contact. Only available when Moneybird Payments is enabled for the administration.
Parameters
Parameter | Type | Description |
---|---|---|
contact_id |
Integer |
Required Should be a valid contact id. |