Skip to content

Contacts

Manage your contacts in Moneybird.

Working with Contacts

This section covers how to interact with Moneybird’s Contacts API. You can create, retrieve, update, and delete contacts, as well as manage contact people, notes, usage charges, and payment mandates.

Basic Operations

Get a Contact

Retrieve a contact by its ID.

$contact = $client->contacts()->get('contact-id-123');

Get a Contact by Customer ID

Retrieve a contact using its customer ID.

$contact = $client->contacts()->getByCustomerId('customer-123');

Filter Contacts

Filter contacts based on specific criteria.

$filters = [
'query' => 'Company Name',
'customer_id' => '12345',
];
$contacts = $client->contacts()->filter($filters);

Create a Contact

Create a new contact.

$contactData = [
'company_name' => 'ACME Corporation',
'firstname' => 'John',
'lastname' => 'Doe',
'address1' => '123 Main Street',
'city' => 'Amsterdam',
'country' => 'NL',
'email' => 'john@example.com',
];
$contact = $client->contacts()->create($contactData);

Update a Contact

Update an existing contact.

$updateData = [
'email' => 'updated@example.com',
'phone' => '+31612345678',
];
$contact = $client->contacts()->update('contact-id-123', $updateData);

Delete a Contact

Delete a contact.

$client->contacts()->delete('contact-id-123');

Paginate Contacts

Get a paginated list of contacts.

$contacts = $client->contacts()->paginate();
// Iterate through the pages
foreach ($contacts as $contact) {
echo $contact->company_name;
}

Synchronization

Get Synchronization

Get synchronization information for contacts.

$synchronization = $client->contacts()->getSynchronization();

Synchronize Contacts

Synchronize contacts with the provided IDs.

$ids = ['contact-id-1', 'contact-id-2'];
$result = $client->contacts()->synchronize($ids);

Contact People

Get a Contact Person

Retrieve a specific contact person.

$contactPerson = $client->contacts()->getContactPerson('contact-id-123', 'person-id-456');

Create a Contact Person

Create a new contact person for a contact.

$personData = [
'firstname' => 'Jane',
'lastname' => 'Smith',
'email' => 'jane@example.com',
'phone' => '+31612345678',
'department' => 'Sales',
];
$contactPerson = $client->contacts()->createContactPerson('contact-id-123', $personData);

Update a Contact Person

Update an existing contact person.

$updateData = [
'email' => 'updated@example.com',
];
$contactPerson = $client->contacts()->updateContactPerson('contact-id-123', 'person-id-456', $updateData);

Delete a Contact Person

Delete a contact person.

$client->contacts()->deleteContactPerson('contact-id-123', 'person-id-456');

Notes

Create a Note

Add a note to a contact.

$noteData = [
'note' => 'Called about invoice #123',
'todo' => true,
];
$note = $client->contacts()->createNote('contact-id-123', $noteData);

Delete a Note

Delete a note from a contact.

$client->contacts()->deleteNote('contact-id-123', 'note-id-789');

Usage Charges

Create a Usage Charge

Create a usage charge for a contact.

$chargeData = [
'description' => 'Additional services',
'price' => 100.00,
'period' => '2023-01',
];
$usageCharge = $client->contacts()->createUsageCharge('contact-id-123', $chargeData);

Get Usage Charges

Get all usage charges for a contact.

$usageCharges = $client->contacts()->getUsageCharges('contact-id-123');

Moneybird Payments Mandate

Get Payments Mandate

Get the Moneybird payments mandate for a contact.

$mandate = $client->contacts()->getMbPaymentsMandate('contact-id-123');

Create Payments Mandate

Create a Moneybird payments mandate for a contact.

$mandate = $client->contacts()->createMbPaymentsMandate('contact-id-123');

Create Payments Mandate URL

Create a URL for setting up a Moneybird payments mandate.

$mandateUrl = $client->contacts()->createMbPaymentsMandateUrl('contact-id-123');

Delete Payments Mandate

Delete a Moneybird payments mandate.

$client->contacts()->deleteMbPaymentsMandate('contact-id-123');

Contact Properties

When working with contacts, you’ll have access to the following properties:

PropertyTypeDescription
idstringUnique identifier
administration_idstringAdministration ID
company_namestringCompany name
firstnamestringFirst name
lastnamestringLast name
address1stringAddress line 1
address2stringAddress line 2
zipcodestringPostal code
citystringCity
countrystringCountry code
phonestringPhone number
delivery_methodstringDelivery method
customer_idstringCustomer ID
tax_numberstringTax number
chamber_of_commercestringChamber of commerce number
bank_accountstringBank account
attentionstringAttention
emailstringEmail address
email_ublbooleanSend UBL with email
sepa_activebooleanSEPA active
sepa_ibanstringSEPA IBAN
sepa_iban_account_namestringSEPA IBAN account name
sepa_bicstringSEPA BIC
sepa_mandate_idstringSEPA mandate ID
sepa_mandate_datestringSEPA mandate date
moneybird_payments_mandatebooleanMoneybird payments mandate active
created_atstringCreation timestamp
updated_atstringLast update timestamp
versionintegerVersion number
notesarrayContact notes
custom_fieldsarrayCustom fields
contact_peoplearrayContact people
archivedbooleanWhether the contact is archived

Note: See the official API reference for the complete list of available properties.

Further reading