Browse Documentation
GET Get contact

List All Contacts

Get a list of all contacts

GET /contacts

Request

    
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer token" \
-XGET \
https://dev.accounteer.com/api/v0.1/contacts/
   

Response

[{
    "id": "865d8838db6079caa0d3a30ad8edfb812a87f39e",
    "organization_id": "daa71f0644647c0d82dd2d03d0b29779644b1a48",
    "name": "Company",
    "address": "Oude Baan 2",
    "city": "Boutersem",
    "zip_code": "3370",
    "country_code": "BE",
    "email": null,
    "fax": null,
    "phone": null,
    "tax_number": "BE263784494",
    "is_client": false,
    "is_supplier": true,
    "contact_persons": []
}, {
    "id": "1615c6926a25a72b31ee320d0889e82f6395511c",
    "organization_id": "daa71f0644647c0d82dd2d03d0b29779644b1a48",
    "name": "customer 01",
    "address": null,
    "city": null,
    "zip_code": null,
    "country_code": "NG",
    "email": "[email protected]",
    "fax": null,
    "phone": "+36440374722",
    "tax_number": null,
    "is_client": true,
    "is_supplier": false,
    "contact_persons": [{
        "id": "feee2d1b24b4d5216f7ddb903ba5b6e3b4ae3c1a",
        "first_name": "first name",
        "last_name": "last name",
        "email": "[email protected]",
        "phone": "+338944404"
    }, {
        "id": "db98d1f7c68bef9d271826baca30b95cb42e9c70",
        "first_name": "contact name",
        "last_name": null,
        "email": "[email protected]",
        "phone": "+83939394"
    }]
}]


Get Contact

GET /contacts/:id

Request

   
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer token" \
-XGET \
https://dev.accounteer.com/api/v0.1/contacts/1615c6926a25a72b31ee320d0889e82f6395511c
 

Response

{
    "id": "1615c6926a25a72b31ee320d0889e82f6395511c",
    "organization_id": "daa71f0644647c0d82dd2d03d0b29779644b1a48",
    "name": "customer 01",
    "address": null,
    "city": null,
    "zip_code": null,
    "country_code": "NG",
    "email": "[email protected]",
    "fax": null,
    "phone": "+36440374722",
    "tax_number": null,
    "is_client": true,
    "is_supplier": false,
    "contact_persons": [{
        "id": "feee2d1b24b4d5216f7ddb903ba5b6e3b4ae3c1a",
        "first_name": "first name",
        "last_name": "last name",
        "email": "[email protected]",
        "phone": "+338944404"
    }, {
        "id": "db98d1f7c68bef9d271826baca30b95cb42e9c70",
        "first_name": "contact name",
        "last_name": null,
        "email": "[email protected]",
        "phone": "+83939394"
    }]
}

If the contact id passed as a parameter is invalid the user get the below response

{  
   "status":404,
   "error":"Contact not found"
}