Skip to content

Instantly share code, notes, and snippets.

@laser
Last active August 29, 2015 14:00
Show Gist options
  • Save laser/246567443915761456c2 to your computer and use it in GitHub Desktop.
Save laser/246567443915761456c2 to your computer and use it in GitHub Desktop.
Contact Service API Documentation
# Contact Service API Reference
/api/v1/contacts.json
## Reading
GET /contacts.json HTTP/1.1
Host: example.com
### Fields
| Property Name | Description | Type |
| ---------------- | -------------------- | ---------------------- |
| id | The contact ID. | integer |
| age | The contact's age | integer |
| importance_level | The importance level | integer: 100, 200, 300 |
| alias | The contact's alias | string |
| full_name | Contact's full name | string |
| url | Link to details | string |
## Publishing
POST /contacts.json HTTP/1.1
Host: example.com
{
"first_name":"Erin",
"last_name":"S-H",
"age":32,
"importance_level":100,
"alias":"lzr"
}
### Fields
| Property Name | Description | Type |
| ---------------- | ----------------------- | ---------------------- |
| age | The contact's age | integer |
| importance_level | The importance level | integer: 100, 200, 300 |
| alias | Alias in user's rolodex | string |
| first_name | Contact's full name | string |
| last_name | Contact's last name | string |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment