Browse Documentation
POST Create contact

Create new Contact

POST /contacts

Parameters

Parameter
Type
Description
 name | required
 String
 The name of the contact
 tax_number
 String
 Tax identification number / Company registration number
 address
 String
 Address of the contact
 zip_code
 String
 Zip code of the contact
 city
 String
 City of the contact
country
 String
 2 letter ISO country code
email
String
Email address of the contact
fax
String
Fax number of the contact
phone
String
Phone number of the contact
is_client
 Bool
Indicates the contact is a customer. If enabled the contact will be listed in the autocomplete when creating a new sales invoice or credit note.
is_supplier
Bool
Indicates the contact is a supplier. If enabled the contact will be listed in the autocomplete when creating a new purchase document or credit note.
contact_persons
Array
Array of contact persons

A contact person features the below properties

Parameter
Type
Description
first_name| required
String
Firt name
last_name
String
Last name
email
String
Email address of the contact person
phone
String
Phone number of the contact person

Request

A POST request is expected to be sent to the above endpoint where the content body must be JSON string containing all parameters that are needed to create a new contact. The below example demonstrates how to create a new Contact.

   
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer token" \
-XPOST \
-d '{
    "contact": {
    "name": "new contact",
    "address": "Oude Baan 2",
    "city": "Boutersem",
    "zip_code": "3370",
    "country": "BE",
    "email": "[email protected]",
    "fax": "+3847550505",
    "phone": "+384940405",
    "tax_number": "BE383949444",
    "is_client": true,
    "is_supplier": false,
    "contact_persons": [{
        "first_name": "first name",
        "last_name": "last name",
        "email": "[email protected]",
        "phone": "+38394944"
    }]
    }
}
' \
https://dev.accounteer.com/api/v0.1/contacts/
    

Response

{
    "id": "336f924bb50681adb905e747966062970d7cece7",
    "organization_id": "daa71f0644647c0d82dd2d03d0b29779644b1a48",
    "name": "new contact",
    "address": "Oude Baan 2",
    "city": "Boutersem",
    "zip_code": "3370",
    "country": "BE",
    "email": "[email protected]",
    "fax": "+3847550505",
    "phone": "+384940405",
    "tax_number": "BE383949444",
    "is_client": true,
    "is_supplier": false,
    "contact_persons": [{
        "id": "5fc9886aa498c6dc64c4b27c88306eab655421a0",
        "first_name": "first name",
        "last_name": "last name",
        "email": "[email protected]",
        "phone": "+38394944"
    }]
}