GET /api/v1/lists
Get all lists

Returns the lists in your address book.

Supported Formats

json

Success Response:

200 Good Request
                  
[
  {
    id: "5342a521434236f5e7000007",
    name: "Work"
  },
  {
    id: "5342a521434236f5e7023007",
    name: "Home"
  }
]
              

Errors

400 Bad Request
401 Unauthorized
414 You don't have an address book

Examples

curl -i https://api.passdock.com/api/v1/lists?api_token=75778a65dfdae310a107d2ef0bbd3780

Params

Param name Description
api_token
required

Your Passdock API key


Value: Must be String

GET /api/v1/lists/:id
Show a list

Returns a List from your address book

Supported Formats

json

Success Response:

200 Good Request
                  
{
  id: "5342a521434236f5e7000007",
  name: "Work",
  person_ids: [
    "5342a53e86d256f5e7000006",
    "5342a53e86d256f5e7000016"
  ]
}
              

Errors

401 Unauthorized
404 Not Found

Examples

curl -i https://api.passdock.com/api/v1/lists/511e5ce039078c08d8000033?api_token=75778a65dfdae310a107d2ef0bbd3780

Params

Param name Description
id
required

List ID


Value: Must be Fixnum
api_token
required

Your Passdock API key


Value: Must be String

POST /api/v1/lists
Create a List

Create a new list in your address book.

Supported Formats

json

Success Response:

201 Created
                  
{
  id: "5342a521434236f5e7000007",
  name: "Work",
  person_ids: [
    "5342a53e86d256f5e7000006",
    "5342a53e86d256f5e7000016"
  ]
}
              

Errors

400 Bad Request
401 Unauthorized

Examples

curl -i -H "Content-Type: application/json" -d '{"list":{"name":"Work", "person_ids":["12ab8e008f0d0c8a090f9c0b"]}}' https://api.passdock.com/api/v1/lists?api_token=75778a65dfdae310a107d2ef0bbd3780

Params

Param name Description
api_token
required

Your Passdock API key


Value: Must be String
list
required

Object that contains List's informations


Value: Must be a Hash
list[name]
required

List's name


Value: Must be String
list[list_ids]
optional

IDs of people that belongs to list


Value: Must be Array

PUT /api/v1/lists/:id
Update List

Update a List.

Supported Formats

json

Success Response:

200 Good Request
                  
              

Errors

400 Bad Request
401 Unauthorized

Examples

curl -i -X PUT -H "Content-Type: application/json" -d '{"list":{"name":"Work", "person_ids":["12ab8e008f0d0c8a090f9c0b"]}}' https://api.passdock.com/api/v1/lists/511e5ce039078c08d8000035?api_token=75778a65dfdae310a107d2ef0bbd3780

Params

Param name Description
api_token
required

Your Passdock API key


Value: Must be String
id
required

List ID


Value: Must be Fixnum
list
required

Object that contains List's informations


Value: Must be a Hash
list[name]
optional

List's name


Value: Must be String
list[list_ids]
optional

IDs of people that belongs to list


Value: Must be Array

DELETE /api/v1/lists/:id
Delete List

Destroy a List.

Supported Formats

json

Success Response:

200 Deleted

Errors

400 Bad Request
401 Unauthorized
404 List Not Found

Examples

curl -i -X DELETE  https://api.passdock.com/api/v1/lists/106?api_token=75778a65dfdae310a107d2ef0bbd3780

Params

Param name Description
id
required

List ID


Value: Must be Fixnum
api_token
required

Your Passdock API key


Value: Must be String