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

Example: return a list of contacts

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XGET \
  https://moneybird.com/api/v2/123/contacts.json?
    

Response

        
          
          Status: 200 OK
        
      
      [
  {
    "id": "204882775163012562",
    "administration_id": 123,
    "company_name": "Foobar Holding B.V.",
    "firstname": "",
    "lastname": "",
    "address1": "Hoofdstraat 12",
    "address2": "",
    "zipcode": "1234AB",
    "city": "Amsterdam",
    "country": "NL",
    "phone": "",
    "delivery_method": "Email",
    "customer_id": "3",
    "tax_number": "",
    "chamber_of_commerce": "",
    "bank_account": "",
    "attention": "",
    "email": "info@example.com",
    "email_ubl": true,
    "send_invoices_to_attention": "",
    "send_invoices_to_email": "info@example.com",
    "send_estimates_to_attention": "",
    "send_estimates_to_email": "info@example.com",
    "sepa_active": false,
    "sepa_iban": "",
    "sepa_iban_account_name": "",
    "sepa_bic": "",
    "sepa_mandate_id": "",
    "sepa_mandate_date": null,
    "sepa_sequence_type": "FRST",
    "credit_card_number": "",
    "credit_card_reference": "",
    "credit_card_type": null,
    "tax_number_validated_at": null,
    "tax_number_valid": null,
    "invoice_workflow_id": null,
    "estimate_workflow_id": null,
    "created_at": "2017-11-02T08:31:02.266Z",
    "updated_at": "2017-11-02T08:31:02.266Z",
    "version": 1509611462,
    "sales_invoices_url": "http://moneybird.dev/123/sales_invoices/d80605077d3825113e6c449df3c611beee50cd65278cd77eb632cb41f137b700/all",
    "notes": [

    ],
    "custom_fields": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 1509611426969,
        "action": "contact_created",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": null,
        "created_at": "2017-11-02T08:31:02.281Z",
        "updated_at": "2017-11-02T08:31:02.281Z"
      }
    ]
  },
  {
    "id": "204882775042426316",
    "administration_id": 123,
    "company_name": "Foobar Holding B.V.",
    "firstname": "John",
    "lastname": "Appleseed",
    "address1": "Hoofdstraat 12",
    "address2": "",
    "zipcode": "1234 AB",
    "city": "Amsterdam",
    "country": "NL",
    "phone": "",
    "delivery_method": "Email",
    "customer_id": "1",
    "tax_number": "",
    "chamber_of_commerce": "",
    "bank_account": "",
    "attention": "",
    "email": "info@example.com",
    "email_ubl": true,
    "send_invoices_to_attention": "",
    "send_invoices_to_email": "info@example.com",
    "send_estimates_to_attention": "",
    "send_estimates_to_email": "info@example.com",
    "sepa_active": false,
    "sepa_iban": "",
    "sepa_iban_account_name": "",
    "sepa_bic": "",
    "sepa_mandate_id": "",
    "sepa_mandate_date": null,
    "sepa_sequence_type": "FRST",
    "credit_card_number": "",
    "credit_card_reference": "",
    "credit_card_type": null,
    "tax_number_validated_at": null,
    "tax_number_valid": null,
    "invoice_workflow_id": null,
    "estimate_workflow_id": null,
    "created_at": "2017-11-02T08:31:02.150Z",
    "updated_at": "2017-11-02T08:31:02.150Z",
    "version": 1509611462,
    "sales_invoices_url": "http://moneybird.dev/123/sales_invoices/8b17dafa61084bd98def8617c62df56bdd633b7beb9174b66d53e3fc6cb77747/all",
    "notes": [

    ],
    "custom_fields": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 1509611426969,
        "action": "contact_created",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": null,
        "created_at": "2017-11-02T08:31:02.167Z",
        "updated_at": "2017-11-02T08:31:02.167Z"
      }
    ]
  },
  {
    "id": "204882775109535183",
    "administration_id": 123,
    "company_name": "Foobar Holding B.V.",
    "firstname": "John",
    "lastname": "Doe",
    "address1": "1 Infinite Loop",
    "address2": "",
    "zipcode": "123456",
    "city": "Redmond",
    "country": "NL",
    "phone": "",
    "delivery_method": "Email",
    "customer_id": "2",
    "tax_number": "",
    "chamber_of_commerce": "",
    "bank_account": "NL51RABO0330707736",
    "attention": "",
    "email": "info@example.com",
    "email_ubl": true,
    "send_invoices_to_attention": "",
    "send_invoices_to_email": "info@example.com",
    "send_estimates_to_attention": "",
    "send_estimates_to_email": "info@example.com",
    "sepa_active": true,
    "sepa_iban": "NL51RABO0330707736",
    "sepa_iban_account_name": "Foobar Holding B.V.",
    "sepa_bic": "RABONL2U",
    "sepa_mandate_id": "MAN12313",
    "sepa_mandate_date": "2014-01-01",
    "sepa_sequence_type": "FRST",
    "credit_card_number": "",
    "credit_card_reference": "",
    "credit_card_type": null,
    "tax_number_validated_at": null,
    "tax_number_valid": null,
    "invoice_workflow_id": null,
    "estimate_workflow_id": null,
    "created_at": "2017-11-02T08:31:02.214Z",
    "updated_at": "2017-11-02T08:31:02.214Z",
    "version": 1509611462,
    "sales_invoices_url": "http://moneybird.dev/123/sales_invoices/7c581254757fe4d8eafce3c677345dfb4df892eb5fbf519e3cc9a3c6ab05cba9/all",
    "notes": [

    ],
    "custom_fields": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 1509611426969,
        "action": "contact_created",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": null,
        "created_at": "2017-11-02T08:31:02.227Z",
        "updated_at": "2017-11-02T08:31:02.227Z"
      }
    ]
  }
]
      

Example: allows filtering by name

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XGET \
  https://moneybird.com/api/v2/123/contacts.json?query=appleseed
    

Response

        
          
          Status: 200 OK
        
      
      [
  {
    "id": "204882775356999126",
    "administration_id": 123,
    "company_name": "Foobar Holding B.V.",
    "firstname": "John",
    "lastname": "Appleseed",
    "address1": "Hoofdstraat 12",
    "address2": "",
    "zipcode": "1234 AB",
    "city": "Amsterdam",
    "country": "NL",
    "phone": "",
    "delivery_method": "Email",
    "customer_id": "1",
    "tax_number": "",
    "chamber_of_commerce": "",
    "bank_account": "",
    "attention": "",
    "email": "info@example.com",
    "email_ubl": true,
    "send_invoices_to_attention": "",
    "send_invoices_to_email": "info@example.com",
    "send_estimates_to_attention": "",
    "send_estimates_to_email": "info@example.com",
    "sepa_active": false,
    "sepa_iban": "",
    "sepa_iban_account_name": "",
    "sepa_bic": "",
    "sepa_mandate_id": "",
    "sepa_mandate_date": null,
    "sepa_sequence_type": "FRST",
    "credit_card_number": "",
    "credit_card_reference": "",
    "credit_card_type": null,
    "tax_number_validated_at": null,
    "tax_number_valid": null,
    "invoice_workflow_id": null,
    "estimate_workflow_id": null,
    "created_at": "2017-11-02T08:31:02.452Z",
    "updated_at": "2017-11-02T08:31:02.452Z",
    "version": 1509611462,
    "sales_invoices_url": "http://moneybird.dev/123/sales_invoices/7fda7b5732e19aebebbb7e1ad144646b4ec647b032249b62b595abb092ade95b/all",
    "notes": [

    ],
    "custom_fields": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 1509611426969,
        "action": "contact_created",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": null,
        "created_at": "2017-11-02T08:31:02.602Z",
        "updated_at": "2017-11-02T08:31:02.602Z"
      }
    ]
  }
]
      

Example: returns paginated contacts on page 1

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XGET \
  https://moneybird.com/api/v2/123/contacts.json?per_page=1
    

Response

        
          
          Status: 200 OK
        
      
      [
  {
    "id": "204882776300717542",
    "administration_id": 123,
    "company_name": "Foobar Holding B.V.",
    "firstname": "",
    "lastname": "",
    "address1": "Hoofdstraat 12",
    "address2": "",
    "zipcode": "1234AB",
    "city": "Amsterdam",
    "country": "NL",
    "phone": "",
    "delivery_method": "Email",
    "customer_id": "3",
    "tax_number": "",
    "chamber_of_commerce": "",
    "bank_account": "",
    "attention": "",
    "email": "info@example.com",
    "email_ubl": true,
    "send_invoices_to_attention": "",
    "send_invoices_to_email": "info@example.com",
    "send_estimates_to_attention": "",
    "send_estimates_to_email": "info@example.com",
    "sepa_active": false,
    "sepa_iban": "",
    "sepa_iban_account_name": "",
    "sepa_bic": "",
    "sepa_mandate_id": "",
    "sepa_mandate_date": null,
    "sepa_sequence_type": "FRST",
    "credit_card_number": "",
    "credit_card_reference": "",
    "credit_card_type": null,
    "tax_number_validated_at": null,
    "tax_number_valid": null,
    "invoice_workflow_id": null,
    "estimate_workflow_id": null,
    "created_at": "2017-11-02T08:31:03.351Z",
    "updated_at": "2017-11-02T08:31:03.351Z",
    "version": 1509611463,
    "sales_invoices_url": "http://moneybird.dev/123/sales_invoices/fabb4972d5cabf5095c8d8ee04976ceec8de96c8c70b71b409533e76ec63764b/all",
    "notes": [

    ],
    "custom_fields": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 1509611426969,
        "action": "contact_created",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": null,
        "created_at": "2017-11-02T08:31:03.363Z",
        "updated_at": "2017-11-02T08:31:03.363Z"
      }
    ]
  }
]
      

Example: returns paginated contacts on page 2

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XGET \
  https://moneybird.com/api/v2/123/contacts.json?page=2&per_page=1
    

Response

        
          
          Status: 200 OK
        
      
      [
  {
    "id": "204882776439129578",
    "administration_id": 123,
    "company_name": "Foobar Holding B.V.",
    "firstname": "John",
    "lastname": "Appleseed",
    "address1": "Hoofdstraat 12",
    "address2": "",
    "zipcode": "1234 AB",
    "city": "Amsterdam",
    "country": "NL",
    "phone": "",
    "delivery_method": "Email",
    "customer_id": "1",
    "tax_number": "",
    "chamber_of_commerce": "",
    "bank_account": "",
    "attention": "",
    "email": "info@example.com",
    "email_ubl": true,
    "send_invoices_to_attention": "",
    "send_invoices_to_email": "info@example.com",
    "send_estimates_to_attention": "",
    "send_estimates_to_email": "info@example.com",
    "sepa_active": false,
    "sepa_iban": "",
    "sepa_iban_account_name": "",
    "sepa_bic": "",
    "sepa_mandate_id": "",
    "sepa_mandate_date": null,
    "sepa_sequence_type": "FRST",
    "credit_card_number": "",
    "credit_card_reference": "",
    "credit_card_type": null,
    "tax_number_validated_at": null,
    "tax_number_valid": null,
    "invoice_workflow_id": null,
    "estimate_workflow_id": null,
    "created_at": "2017-11-02T08:31:03.483Z",
    "updated_at": "2017-11-02T08:31:03.483Z",
    "version": 1509611463,
    "sales_invoices_url": "http://moneybird.dev/123/sales_invoices/6566b3d45124065a414338c665fe38b7dd50b6296216ccf8bee94c2f4026b293/all",
    "notes": [

    ],
    "custom_fields": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 1509611426969,
        "action": "contact_created",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": null,
        "created_at": "2017-11-02T08:31:03.497Z",
        "updated_at": "2017-11-02T08:31:03.497Z"
      }
    ]
  }
]
      

Example: returns an error when too many contacts are requested

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XGET \
  https://moneybird.com/api/v2/123/contacts.json?per_page=101
    

Response

        
          
          Status: 400 Bad Request
        
      
      {
  "error": "Per Page is too big",
  "symbolic": {
    "per_page": "max"
  }
}
      

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.

Example: return a list of id's and version id's

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XGET \
  https://moneybird.com/api/v2/123/contacts/synchronization.json?
    

Response

        
          
          Status: 200 OK
        
      
      [
  {
    "id": "204882777998362146",
    "version": 1509611464
  },
  {
    "id": "204882778056033829",
    "version": 1509611465
  }
]
      

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

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XPOST \
  -d '{"ids":[204882778302449199,204882778371655221]}' \
  https://moneybird.com/api/v2/123/contacts/synchronization.json
    

Response

        
          
          Status: 200 OK
        
      
      [
  {
    "id": "204882778302449199",
    "administration_id": 123,
    "company_name": "Bar Foo",
    "firstname": "John",
    "lastname": "Appleseed",
    "address1": "Hoofdstraat 12",
    "address2": "",
    "zipcode": "1234AB",
    "city": "Amsterdam",
    "country": "NL",
    "phone": "",
    "delivery_method": "Email",
    "customer_id": "3",
    "tax_number": "",
    "chamber_of_commerce": "",
    "bank_account": "",
    "attention": "",
    "email": "info@example.com",
    "email_ubl": true,
    "send_invoices_to_attention": "",
    "send_invoices_to_email": "info@example.com",
    "send_estimates_to_attention": "",
    "send_estimates_to_email": "info@example.com",
    "sepa_active": false,
    "sepa_iban": "",
    "sepa_iban_account_name": "",
    "sepa_bic": "",
    "sepa_mandate_id": "",
    "sepa_mandate_date": null,
    "sepa_sequence_type": "FRST",
    "credit_card_number": "",
    "credit_card_reference": "",
    "credit_card_type": null,
    "tax_number_validated_at": null,
    "tax_number_valid": null,
    "invoice_workflow_id": null,
    "estimate_workflow_id": null,
    "created_at": "2017-11-02T08:31:05.260Z",
    "updated_at": "2017-11-02T08:31:05.260Z",
    "version": 1509611465,
    "sales_invoices_url": "http://moneybird.dev/123/sales_invoices/7ecdb76a9db1700ab0725488fce7c0458efd1b2668aeaa0cb87800afeb38a1fe/all",
    "notes": [

    ],
    "custom_fields": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 1509611426969,
        "action": "contact_created",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": null,
        "created_at": "2017-11-02T08:31:05.272Z",
        "updated_at": "2017-11-02T08:31:05.272Z"
      }
    ]
  },
  {
    "id": "204882778371655221",
    "administration_id": 123,
    "company_name": "Foo Bar",
    "firstname": "Mark",
    "lastname": "van Vliet",
    "address1": "Hoofdstraat 12",
    "address2": "",
    "zipcode": "1234AB",
    "city": "Amsterdam",
    "country": "NL",
    "phone": "",
    "delivery_method": "Email",
    "customer_id": "5",
    "tax_number": "",
    "chamber_of_commerce": "",
    "bank_account": "",
    "attention": "",
    "email": "info@example.com",
    "email_ubl": true,
    "send_invoices_to_attention": "",
    "send_invoices_to_email": "info@example.com",
    "send_estimates_to_attention": "",
    "send_estimates_to_email": "info@example.com",
    "sepa_active": false,
    "sepa_iban": "",
    "sepa_iban_account_name": "",
    "sepa_bic": "",
    "sepa_mandate_id": "",
    "sepa_mandate_date": null,
    "sepa_sequence_type": "FRST",
    "credit_card_number": "",
    "credit_card_reference": "",
    "credit_card_type": null,
    "tax_number_validated_at": null,
    "tax_number_valid": null,
    "invoice_workflow_id": null,
    "estimate_workflow_id": null,
    "created_at": "2017-11-02T08:31:05.326Z",
    "updated_at": "2017-11-02T08:31:05.326Z",
    "version": 1509611465,
    "sales_invoices_url": "http://moneybird.dev/123/sales_invoices/366304831a8e54ac120f645ab9af2062f7d60138c18ea9acc9c4cec553a39768/all",
    "notes": [

    ],
    "custom_fields": [

    ],
    "events": [
      {
        "administration_id": 123,
        "user_id": 1509611426969,
        "action": "contact_created",
        "link_entity_id": null,
        "link_entity_type": null,
        "data": null,
        "created_at": "2017-11-02T08:31:05.339Z",
        "updated_at": "2017-11-02T08:31:05.339Z"
      }
    ]
  }
]
      

Get contact

Returns all information about a contact.

Example: return a contact

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XGET \
  https://moneybird.com/api/v2/123/contacts/204882776941397502.json?
    

Response

        
          
          Status: 200 OK
        
      
      {
  "id": "204882776941397502",
  "administration_id": 123,
  "company_name": "Foobar Holding B.V.",
  "firstname": "John",
  "lastname": "Appleseed",
  "address1": "Hoofdstraat 12",
  "address2": "",
  "zipcode": "1234 AB",
  "city": "Amsterdam",
  "country": "NL",
  "phone": "",
  "delivery_method": "Email",
  "customer_id": "1",
  "tax_number": "",
  "chamber_of_commerce": "",
  "bank_account": "",
  "attention": "",
  "email": "info@example.com",
  "email_ubl": true,
  "send_invoices_to_attention": "",
  "send_invoices_to_email": "info@example.com",
  "send_estimates_to_attention": "",
  "send_estimates_to_email": "info@example.com",
  "sepa_active": false,
  "sepa_iban": "",
  "sepa_iban_account_name": "",
  "sepa_bic": "",
  "sepa_mandate_id": "",
  "sepa_mandate_date": null,
  "sepa_sequence_type": "FRST",
  "credit_card_number": "",
  "credit_card_reference": "",
  "credit_card_type": null,
  "tax_number_validated_at": null,
  "tax_number_valid": null,
  "invoice_workflow_id": null,
  "estimate_workflow_id": null,
  "created_at": "2017-11-02T08:31:03.960Z",
  "updated_at": "2017-11-02T08:31:03.960Z",
  "version": 1509611463,
  "sales_invoices_url": "http://moneybird.dev/123/sales_invoices/819833f3783de9908e938532d56d21d6b4b70f48fef8b86dbc39fcca7a4d6c56/all",
  "notes": [

  ],
  "custom_fields": [

  ],
  "events": [
    {
      "administration_id": 123,
      "user_id": 1509611426969,
      "action": "contact_created",
      "link_entity_id": null,
      "link_entity_type": null,
      "data": null,
      "created_at": "2017-11-02T08:31:03.979Z",
      "updated_at": "2017-11-02T08:31:03.979Z"
    }
  ]
}
      

Example: returns sepa_iban as bank_account

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XGET \
  https://moneybird.com/api/v2/123/contacts/204882777192007173.json?
    

Response

        
          
          Status: 200 OK
        
      
      {
  "id": "204882777192007173",
  "administration_id": 123,
  "company_name": "Foobar Holding B.V.",
  "firstname": "John",
  "lastname": "Appleseed",
  "address1": "Hoofdstraat 12",
  "address2": "",
  "zipcode": "1234 AB",
  "city": "Amsterdam",
  "country": "NL",
  "phone": "",
  "delivery_method": "Email",
  "customer_id": "1",
  "tax_number": "",
  "chamber_of_commerce": "",
  "bank_account": "NL50TEST0166567191",
  "attention": "",
  "email": "info@example.com",
  "email_ubl": true,
  "send_invoices_to_attention": "",
  "send_invoices_to_email": "info@example.com",
  "send_estimates_to_attention": "",
  "send_estimates_to_email": "info@example.com",
  "sepa_active": false,
  "sepa_iban": "NL50TEST0166567191",
  "sepa_iban_account_name": "",
  "sepa_bic": "",
  "sepa_mandate_id": "",
  "sepa_mandate_date": null,
  "sepa_sequence_type": "FRST",
  "credit_card_number": "",
  "credit_card_reference": "",
  "credit_card_type": null,
  "tax_number_validated_at": null,
  "tax_number_valid": null,
  "invoice_workflow_id": null,
  "estimate_workflow_id": null,
  "created_at": "2017-11-02T08:31:04.200Z",
  "updated_at": "2017-11-02T08:31:04.288Z",
  "version": 1509611464,
  "sales_invoices_url": "http://moneybird.dev/123/sales_invoices/d81b01252a1b54dded90a672d2135c7319af723ac4cf31e012d9b12304ef08eb/all",
  "notes": [

  ],
  "custom_fields": [

  ],
  "events": [
    {
      "administration_id": 123,
      "user_id": 1509611426969,
      "action": "contact_created",
      "link_entity_id": null,
      "link_entity_type": null,
      "data": null,
      "created_at": "2017-11-02T08:31:04.214Z",
      "updated_at": "2017-11-02T08:31:04.214Z"
    }
  ]
}
      

Example: returns 404 when contact does not exist

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XGET \
  https://moneybird.com/api/v2/123/contacts/34123123.json?
    

Response

        
          
          Status: 404 Not Found
        
      
      {
  "error": "record not found",
  "symbolic": {
    "id": "not_found"
  }
}
      

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

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XGET \
  https://moneybird.com/api/v2/123/contacts/customer_id/1.json?
    

Response

        
          
          Status: 200 OK
        
      
      {
  "id": "204882777581028884",
  "administration_id": 123,
  "company_name": "Foobar Holding B.V.",
  "firstname": "John",
  "lastname": "Appleseed",
  "address1": "Hoofdstraat 12",
  "address2": "",
  "zipcode": "1234 AB",
  "city": "Amsterdam",
  "country": "NL",
  "phone": "",
  "delivery_method": "Email",
  "customer_id": "1",
  "tax_number": "",
  "chamber_of_commerce": "",
  "bank_account": "",
  "attention": "",
  "email": "info@example.com",
  "email_ubl": true,
  "send_invoices_to_attention": "",
  "send_invoices_to_email": "info@example.com",
  "send_estimates_to_attention": "",
  "send_estimates_to_email": "info@example.com",
  "sepa_active": false,
  "sepa_iban": "",
  "sepa_iban_account_name": "",
  "sepa_bic": "",
  "sepa_mandate_id": "",
  "sepa_mandate_date": null,
  "sepa_sequence_type": "FRST",
  "credit_card_number": "",
  "credit_card_reference": "",
  "credit_card_type": null,
  "tax_number_validated_at": null,
  "tax_number_valid": null,
  "invoice_workflow_id": null,
  "estimate_workflow_id": null,
  "created_at": "2017-11-02T08:31:04.572Z",
  "updated_at": "2017-11-02T08:31:04.572Z",
  "version": 1509611464,
  "sales_invoices_url": "http://moneybird.dev/123/sales_invoices/11442bb07b8a0ede668217ed4e776878da65322ae24a6f7e2cc875c0504a5c3e/all",
  "notes": [

  ],
  "custom_fields": [

  ],
  "events": [
    {
      "administration_id": 123,
      "user_id": 1509611426969,
      "action": "contact_created",
      "link_entity_id": null,
      "link_entity_type": null,
      "data": null,
      "created_at": "2017-11-02T08:31:04.591Z",
      "updated_at": "2017-11-02T08:31:04.591Z"
    }
  ]
}
      

Example: returns 404 when contact does not exist

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XGET \
  https://moneybird.com/api/v2/123/contacts/customer_id/34123123.json?
    

Response

        
          
          Status: 404 Not Found
        
      
      {
  "error": "record not found",
  "symbolic": {
    "customer_id": "not_found"
  }
}
      

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 company_name, firstname or lastname.

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 Email, Simplerinvoicing, Post or Manual.

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 company_name, firstname or lastname.

contact[lastname] String

A contact requires a non-blank company_name, firstname or lastname.

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, seperated by a comma.

contact[send_estimates_to_attention] String
contact[send_estimates_to_email] String

Should be one or more valid email addresses, seperated by a comma.

contact[sepa_active] Boolean

When true, all other SEPA fields are required.

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 RCUR, FRST, OOFF or FNAL.

contact[credit_card_number] String
contact[credit_card_reference] String
contact[credit_card_type] String

Can be mastercard or visa.

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[custom_fields_attributes][*][id] Integer

Should be a valid custom field id.

contact[custom_fields_attributes][*][value] String

Example: create a new contact

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XPOST \
  -d '{"contact":{"company_name":"Test B.V."}}' \
  https://moneybird.com/api/v2/123/contacts.json
    

Response

        
          
          Status: 201 Created
        
      
      {
  "id": "204882778640090687",
  "administration_id": 123,
  "company_name": "Test B.V.",
  "firstname": "",
  "lastname": "",
  "address1": "",
  "address2": "",
  "zipcode": "",
  "city": "",
  "country": "NL",
  "phone": "",
  "delivery_method": "Email",
  "customer_id": "3",
  "tax_number": "",
  "chamber_of_commerce": "",
  "bank_account": "",
  "attention": "",
  "email": "",
  "email_ubl": true,
  "send_invoices_to_attention": "",
  "send_invoices_to_email": "",
  "send_estimates_to_attention": "",
  "send_estimates_to_email": "",
  "sepa_active": false,
  "sepa_iban": "",
  "sepa_iban_account_name": "",
  "sepa_bic": "",
  "sepa_mandate_id": "",
  "sepa_mandate_date": null,
  "sepa_sequence_type": "FRST",
  "credit_card_number": "",
  "credit_card_reference": "",
  "credit_card_type": null,
  "tax_number_validated_at": null,
  "tax_number_valid": null,
  "invoice_workflow_id": null,
  "estimate_workflow_id": null,
  "created_at": "2017-11-02T08:31:05.582Z",
  "updated_at": "2017-11-02T08:31:05.582Z",
  "version": 1509611465,
  "sales_invoices_url": "http://moneybird.dev/123/sales_invoices/ed8a4b10ff1a5c00776f5aa1c7d1abf23a6ad2ec1f1bdc78a9a7d4ea65ef2600/all",
  "notes": [

  ],
  "custom_fields": [

  ],
  "events": [
    {
      "administration_id": 123,
      "user_id": 1509611426969,
      "action": "contact_created",
      "link_entity_id": null,
      "link_entity_type": null,
      "data": null,
      "created_at": "2017-11-02T08:31:05.594Z",
      "updated_at": "2017-11-02T08:31:05.594Z"
    }
  ]
}
      

Example: adding values for custom fields

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XPOST \
  -d '{"contact":{"company_name":"Test B.V.","custom_fields_attributes":{"0":{"id":204882778885457482,"value":"Field value"}}}}' \
  https://moneybird.com/api/v2/123/contacts.json
    

Response

        
          
          Status: 201 Created
        
      
      {
  "id": "204882778951517772",
  "administration_id": 123,
  "company_name": "Test B.V.",
  "firstname": "",
  "lastname": "",
  "address1": "",
  "address2": "",
  "zipcode": "",
  "city": "",
  "country": "NL",
  "phone": "",
  "delivery_method": "Email",
  "customer_id": "3",
  "tax_number": "",
  "chamber_of_commerce": "",
  "bank_account": "",
  "attention": "",
  "email": "",
  "email_ubl": true,
  "send_invoices_to_attention": "",
  "send_invoices_to_email": "",
  "send_estimates_to_attention": "",
  "send_estimates_to_email": "",
  "sepa_active": false,
  "sepa_iban": "",
  "sepa_iban_account_name": "",
  "sepa_bic": "",
  "sepa_mandate_id": "",
  "sepa_mandate_date": null,
  "sepa_sequence_type": "FRST",
  "credit_card_number": "",
  "credit_card_reference": "",
  "credit_card_type": null,
  "tax_number_validated_at": null,
  "tax_number_valid": null,
  "invoice_workflow_id": null,
  "estimate_workflow_id": null,
  "created_at": "2017-11-02T08:31:05.878Z",
  "updated_at": "2017-11-02T08:31:05.878Z",
  "version": 1509611465,
  "sales_invoices_url": "http://moneybird.dev/123/sales_invoices/02400024ce8e0e8b6e585f3924ecd0b11f8cdec422d23dd72bbc0235886808ef/all",
  "notes": [

  ],
  "custom_fields": [
    {
      "id": "204882778885457482",
      "name": "Number",
      "value": "Field value"
    }
  ],
  "events": [
    {
      "administration_id": 123,
      "user_id": 1509611426969,
      "action": "contact_created",
      "link_entity_id": null,
      "link_entity_type": null,
      "data": null,
      "created_at": "2017-11-02T08:31:05.891Z",
      "updated_at": "2017-11-02T08:31:05.891Z"
    }
  ]
}
      

Example: returns an error when custom field cannot be found

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XPOST \
  -d '{"contact":{"custom_fields_attributes":{"0":{"id":1234,"value":"Field value"}}}}' \
  https://moneybird.com/api/v2/123/contacts.json
    

Response

        
          
          Status: 404 Not Found
        
      
      {
  "error": "Custom field with id 1234 not found for administration",
  "symbolic": {
    "custom_fields_attributes": "not_found"
  }
}
      

Example: returns an error when fields are not provided

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XPOST \
  -d '{}' \
  https://moneybird.com/api/v2/123/contacts.json
    

Response

        
          
          Status: 400 Bad Request
        
      
      {
  "error": "Contact is required",
  "symbolic": {
    "contact": "required"
  }
}
      

Example: returns an error when record is invalid

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XPOST \
  -d '{"contact":{"company_name":"","firstname":"","lastname":""}}' \
  https://moneybird.com/api/v2/123/contacts.json
    

Response

        
          
          Status: 422 Unprocessable Entity
        
      
      {
  "error": {
    "company_name": [
      ", first name and last name cannot be empty"
    ]
  }
}
      

Example: create a new contact with mandate_date in timezone gap

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XPOST \
  -d '{"contact":{"company_name":"Test B.V.","sepa_active":true,"sepa_iban":"NL84ABNA0453993192","sepa_iban_account_name":"Foo Bar","sepa_mandate_date":"2017-6-30","sepa_mandate_id":"NL123214"}}' \
  https://moneybird.com/api/v2/123/contacts.json
    

Response

        
          
          Status: 201 Created
        
      
      {
  "id": "204882779937179243",
  "administration_id": 123,
  "company_name": "Test B.V.",
  "firstname": "",
  "lastname": "",
  "address1": "",
  "address2": "",
  "zipcode": "",
  "city": "",
  "country": "NL",
  "phone": "",
  "delivery_method": "Email",
  "customer_id": "3",
  "tax_number": "",
  "chamber_of_commerce": "",
  "bank_account": "NL84ABNA0453993192",
  "attention": "",
  "email": "",
  "email_ubl": true,
  "send_invoices_to_attention": "",
  "send_invoices_to_email": "",
  "send_estimates_to_attention": "",
  "send_estimates_to_email": "",
  "sepa_active": true,
  "sepa_iban": "NL84ABNA0453993192",
  "sepa_iban_account_name": "Foo Bar",
  "sepa_bic": "ABNANL2A",
  "sepa_mandate_id": "NL123214",
  "sepa_mandate_date": "2017-06-30",
  "sepa_sequence_type": "FRST",
  "credit_card_number": "",
  "credit_card_reference": "",
  "credit_card_type": null,
  "tax_number_validated_at": null,
  "tax_number_valid": null,
  "invoice_workflow_id": null,
  "estimate_workflow_id": null,
  "created_at": "2017-06-30T23:30:00.062Z",
  "updated_at": "2017-06-30T23:30:00.062Z",
  "version": 1498865400,
  "sales_invoices_url": "http://moneybird.dev/123/sales_invoices/4573aac7e02a5363f6205f59e3950d4bfd2eb79b5e9a2b3b75f26ee6db349f22/all",
  "notes": [

  ],
  "custom_fields": [

  ],
  "events": [
    {
      "administration_id": 123,
      "user_id": 1509611426969,
      "action": "contact_created",
      "link_entity_id": null,
      "link_entity_type": null,
      "data": null,
      "created_at": "2017-06-30T23:30:00.074Z",
      "updated_at": "2017-06-30T23:30:00.074Z"
    }
  ]
}
      

Example: create a new contact with mandate_date without timezone gap

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XPOST \
  -d '{"contact":{"company_name":"Test B.V.","sepa_active":true,"sepa_iban":"NL84ABNA0453993192","sepa_iban_account_name":"Foo Bar","sepa_mandate_date":"2017-6-30","sepa_mandate_id":"NL123214"}}' \
  https://moneybird.com/api/v2/123/contacts.json
    

Response

        
          
          Status: 422 Unprocessable Entity
        
      
      {
  "error": {
    "sepa_mandate_date": [
      "cannot be in the future"
    ]
  }
}
      

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.

Parameters

Parameter Type Description
contact[company_name] String

A contact requires a non-blank company_name, firstname or lastname.

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 Email, Simplerinvoicing, Post or Manual.

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 company_name, firstname or lastname.

contact[lastname] String

A contact requires a non-blank company_name, firstname or lastname.

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, seperated by a comma.

contact[send_estimates_to_attention] String
contact[send_estimates_to_email] String

Should be one or more valid email addresses, seperated by a comma.

contact[sepa_active] Boolean

When true, all other SEPA fields are required.

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 RCUR, FRST, OOFF or FNAL.

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[credit_card_number] String
contact[credit_card_reference] String
contact[credit_card_type] String

Can be mastercard or visa.

contact[custom_fields_attributes][*][id] Integer

Should be a valid custom field id.

contact[custom_fields_attributes][*][value] String

Example: update a contact

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XPATCH \
  -d '{"contact":{"company_name":"Test B.V."}}' \
  https://moneybird.com/api/v2/123/contacts/204882780476147318.json
    

Response

        
          
          Status: 200 OK
        
      
      {
  "id": "204882780476147318",
  "administration_id": 123,
  "company_name": "Test B.V.",
  "firstname": "John",
  "lastname": "Appleseed",
  "address1": "Hoofdstraat 12",
  "address2": "",
  "zipcode": "1234 AB",
  "city": "Amsterdam",
  "country": "NL",
  "phone": "",
  "delivery_method": "Email",
  "customer_id": "1",
  "tax_number": "",
  "chamber_of_commerce": "",
  "bank_account": "",
  "attention": "",
  "email": "info@example.com",
  "email_ubl": true,
  "send_invoices_to_attention": "",
  "send_invoices_to_email": "info@example.com",
  "send_estimates_to_attention": "",
  "send_estimates_to_email": "info@example.com",
  "sepa_active": false,
  "sepa_iban": "",
  "sepa_iban_account_name": "",
  "sepa_bic": "",
  "sepa_mandate_id": "",
  "sepa_mandate_date": null,
  "sepa_sequence_type": "FRST",
  "credit_card_number": "",
  "credit_card_reference": "",
  "credit_card_type": null,
  "tax_number_validated_at": null,
  "tax_number_valid": null,
  "invoice_workflow_id": null,
  "estimate_workflow_id": null,
  "created_at": "2017-11-02T08:31:07.329Z",
  "updated_at": "2017-11-02T08:31:07.459Z",
  "version": 1509611467,
  "sales_invoices_url": "http://moneybird.dev/123/sales_invoices/66613191c225bd7eb43e5411dc4b234c9572539e559aa0759ae7cc2a736ada2c/all",
  "notes": [

  ],
  "custom_fields": [

  ],
  "events": [
    {
      "administration_id": 123,
      "user_id": 1509611426969,
      "action": "contact_created",
      "link_entity_id": null,
      "link_entity_type": null,
      "data": null,
      "created_at": "2017-11-02T08:31:07.347Z",
      "updated_at": "2017-11-02T08:31:07.347Z"
    },
    {
      "administration_id": 123,
      "user_id": 1509611426969,
      "action": "contact_changed",
      "link_entity_id": null,
      "link_entity_type": null,
      "data": {
        "changes": {
          "company_name": [
            "Foobar Holding B.V.",
            "Test B.V."
          ]
        }
      },
      "created_at": "2017-11-02T08:31:07.473Z",
      "updated_at": "2017-11-02T08:31:07.473Z"
    }
  ]
}
      

Example: update a contact that has SEPA activated

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XPATCH \
  -d '{"contact":{"company_name":"Test B.V."}}' \
  https://moneybird.com/api/v2/123/contacts/204882780866217602.json
    

Response

        
          
          Status: 200 OK
        
      
      {
  "id": "204882780866217602",
  "administration_id": 123,
  "company_name": "Test B.V.",
  "firstname": "John",
  "lastname": "Doe",
  "address1": "1 Infinite Loop",
  "address2": "",
  "zipcode": "123456",
  "city": "Redmond",
  "country": "NL",
  "phone": "",
  "delivery_method": "Email",
  "customer_id": "2",
  "tax_number": "",
  "chamber_of_commerce": "",
  "bank_account": "NL51RABO0330707736",
  "attention": "",
  "email": "info@example.com",
  "email_ubl": true,
  "send_invoices_to_attention": "",
  "send_invoices_to_email": "info@example.com",
  "send_estimates_to_attention": "",
  "send_estimates_to_email": "info@example.com",
  "sepa_active": true,
  "sepa_iban": "NL51RABO0330707736",
  "sepa_iban_account_name": "Foobar Holding B.V.",
  "sepa_bic": "RABONL2U",
  "sepa_mandate_id": "MAN12313",
  "sepa_mandate_date": "2014-01-01",
  "sepa_sequence_type": "RCUR",
  "credit_card_number": "",
  "credit_card_reference": "",
  "credit_card_type": null,
  "tax_number_validated_at": null,
  "tax_number_valid": null,
  "invoice_workflow_id": null,
  "estimate_workflow_id": null,
  "created_at": "2017-11-02T08:31:07.704Z",
  "updated_at": "2017-11-02T08:31:07.792Z",
  "version": 1509611467,
  "sales_invoices_url": "http://moneybird.dev/123/sales_invoices/d014dbbd50371397db03561c35a6e83afe1af9ac7c7b312186c38feecaf6e843/all",
  "notes": [

  ],
  "custom_fields": [

  ],
  "events": [
    {
      "administration_id": 123,
      "user_id": 1509611426969,
      "action": "contact_created",
      "link_entity_id": null,
      "link_entity_type": null,
      "data": null,
      "created_at": "2017-11-02T08:31:07.729Z",
      "updated_at": "2017-11-02T08:31:07.729Z"
    },
    {
      "administration_id": 123,
      "user_id": 1509611426969,
      "action": "contact_changed",
      "link_entity_id": null,
      "link_entity_type": null,
      "data": {
        "changes": {
          "company_name": [
            "Foobar Holding B.V.",
            "Test B.V."
          ]
        }
      },
      "created_at": "2017-11-02T08:31:07.807Z",
      "updated_at": "2017-11-02T08:31:07.807Z"
    }
  ]
}
      

Example: update the SEPA sequence type

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XPATCH \
  -d '{"contact":{"sepa_sequence_type":"FNAL"}}' \
  https://moneybird.com/api/v2/123/contacts/204882781321299596.json
    

Response

        
          
          Status: 200 OK
        
      
      {
  "id": "204882781321299596",
  "administration_id": 123,
  "company_name": "Foobar Holding B.V.",
  "firstname": "John",
  "lastname": "Doe",
  "address1": "1 Infinite Loop",
  "address2": "",
  "zipcode": "123456",
  "city": "Redmond",
  "country": "NL",
  "phone": "",
  "delivery_method": "Email",
  "customer_id": "2",
  "tax_number": "",
  "chamber_of_commerce": "",
  "bank_account": "NL51RABO0330707736",
  "attention": "",
  "email": "info@example.com",
  "email_ubl": true,
  "send_invoices_to_attention": "",
  "send_invoices_to_email": "info@example.com",
  "send_estimates_to_attention": "",
  "send_estimates_to_email": "info@example.com",
  "sepa_active": true,
  "sepa_iban": "NL51RABO0330707736",
  "sepa_iban_account_name": "Foobar Holding B.V.",
  "sepa_bic": "RABONL2U",
  "sepa_mandate_id": "MAN12313",
  "sepa_mandate_date": "2014-01-01",
  "sepa_sequence_type": "FNAL",
  "credit_card_number": "",
  "credit_card_reference": "",
  "credit_card_type": null,
  "tax_number_validated_at": null,
  "tax_number_valid": null,
  "invoice_workflow_id": null,
  "estimate_workflow_id": null,
  "created_at": "2017-11-02T08:31:08.138Z",
  "updated_at": "2017-11-02T08:31:08.194Z",
  "version": 1509611468,
  "sales_invoices_url": "http://moneybird.dev/123/sales_invoices/3a68f0825fee3d7885f968d26cc6f53adaf2a8352e202c47c542c754bf242b1a/all",
  "notes": [

  ],
  "custom_fields": [

  ],
  "events": [
    {
      "administration_id": 123,
      "user_id": 1509611426969,
      "action": "contact_created",
      "link_entity_id": null,
      "link_entity_type": null,
      "data": null,
      "created_at": "2017-11-02T08:31:08.153Z",
      "updated_at": "2017-11-02T08:31:08.153Z"
    },
    {
      "administration_id": 123,
      "user_id": 1509611426969,
      "action": "contact_changed",
      "link_entity_id": null,
      "link_entity_type": null,
      "data": {
        "changes": {
          "sepa_sequence_type": [
            "FRST",
            "FNAL"
          ]
        }
      },
      "created_at": "2017-11-02T08:31:08.203Z",
      "updated_at": "2017-11-02T08:31:08.203Z"
    }
  ]
}
      

Example: returns an error when record is invalid

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XPATCH \
  -d '{"contact":{"company_name":"","firstname":"","lastname":""}}' \
  https://moneybird.com/api/v2/123/contacts/204882781565617810.json
    

Response

        
          
          Status: 422 Unprocessable Entity
        
      
      {
  "error": {
    "company_name": [
      ", first name and last name cannot be empty"
    ]
  }
}
      

Example: returns a 404 status when the contact is not found

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XPATCH \
  -d '{"contact":{"company_name":"Test B.V."}}' \
  https://moneybird.com/api/v2/123/contacts/1564321.json
    

Response

        
          
          Status: 404 Not Found
        
      
      {
  "error": "record not found",
  "symbolic": {
    "id": "not_found"
  }
}
      

Delete a contact

Example: delete a contact

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XDELETE \
  -d '{}' \
  https://moneybird.com/api/v2/123/contacts/204882782145480352.json
    

Response

Example: returns a decent message when deleting was not possible

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XDELETE \
  -d '{}' \
  https://moneybird.com/api/v2/123/contacts/204882782503044776.json
    

Response

        
          
          Status: 422 Unprocessable Entity
        
      
      {
  "error": "Contact cannot be deleted"
}
      

Example: returns a 404 status when the contact is not found

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XDELETE \
  -d '{}' \
  https://moneybird.com/api/v2/123/contacts/1564321.json
    

Response

        
          
          Status: 404 Not Found
        
      
      {
  "error": "record not found",
  "symbolic": {
    "id": "not_found"
  }
}
      

Adds note to entity

Parameters

Parameter Type Description
note[note] String

Required. Text for the note or to-do.

note[todo] Boolean

If true the note is a to-do.

note[assignee_id] Integer

Assign to-do to user. Should be a valid user id.

Example: create a note

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XPOST \
  -d '{"note":{"note":"Text of the note","assignee_id":1509611426969,"todo":true}}' \
  https://moneybird.com/api/v2/123/contacts/204882783349245626/notes.json
    

Response

        
          
          Status: 201 Created
        
      
      {
  "id": "204882783502337727",
  "administration_id": 123,
  "entity_id": "204882783349245626",
  "entity_type": "Contact",
  "user_id": 1509611426969,
  "assignee_id": 1509611426969,
  "todo": true,
  "note": "Text of the note",
  "completed_at": null,
  "completed_by_id": null,
  "todo_type": null,
  "data": null,
  "created_at": "2017-11-02T08:31:10.219Z",
  "updated_at": "2017-11-02T08:31:10.219Z"
}
      

Destroys note from entity

Example: destroy a note

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XDELETE \
  -d '{}' \
  https://moneybird.com/api/v2/123/contacts/204882783641798340/notes/204882783743510217.json
    

Response