Contacts

Contacts are people, businesses, or agencies your company does business with - you either buy things from them, or sell things to them. The following contact methods are available:

Contacts List

GET https://secure.ledgerble.com/api/1.0/contacts

Returns a list of contacts in the following format:

{
  "contacts":
    [
      {
        "id": 23,
        "url": "https://secure.ledgerble.com/api/1.0/contacts/23",
        "name": "Don Draper",
        "balance": "500.00"
      }
    ]
}

Get Contact

GET https://secure.ledgerble.com/api/1.0/contacts/{CONTACT_ID}

Returns a single contact in the following format:

{
  "contact": {
    "id": 23,
    "name": "Don Draper",
    "balance": "500.00",
    "address": "123 Fake St., NY",
    "email": "don@sterlingcooper.com",
    "phone": "555-555-5555 x123"
  }
}

New Contact

POST https://secure.ledgerble.com/api/1.0/contacts

Creates a new contact. The following options are available:

Variable Required? Description
name Yes Name of the person, company, or agency.
address No The contact's address.
email No The contact's email address.
phone No The contact's phone number.

Edit Contact

POST https://secure.ledgerble.com/api/1.0/contacts/{CONTACT_ID}/edit

Updates the existing contact with the {CONTACT_ID} provided. The options available are the same as those for creating.

Delete Contact

POST https://secure.ledgerble.com/api/1.0/contacts/{CONTACT_ID}/delete

Deletes the contact with the {CONTACT_ID} provided.