GET /api/v1/people
Get People list

Returns the list of People in your address book.

Supported Formats

json

Success Response:

200 Good Request
                  
[
  {
    id: "5342a521434236f5e7000007",
    name: "Mark",
    surname: "Twain",
    email: "mark.twain@example.com",
    telephone: "555-123-4567",
    birthday: "1835/11/30 00:00:00",
    custom_field: "Custom Value",
    image: "http://url/of/avatar",
    list_ids: [
      "5342a53e86d256f5e7000006",
      "5342a53e86d256f5e7000016"
    ]
  },
  {
    id: "5342a521434236f5e7023007",
    name: "Henry",
    surname: "Longfellow",
    email: "henry.longfellow@example.com",
    telephone: "555-123-4567",
    birthday: "1807/02/27 00:00:00",
    custom_field: "Custom Value",
    image: "http://url/of/avatar",
    list_ids: [
      "5342a53e86d256f5e7000006"
    ]
  }
]
              

Errors

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

Examples

curl -i https://api.passdock.com/api/v1/people?api_token=75778a65dfdae310a107d2ef0bbd3780&page=1

Params

Param name Description
api_token
required

Your Passdock API key


Value: Must be String
page
optional

Page of results. Each page contains 50 people ordered by date (more recents first)


Value: Must be Fixnum

GET /api/v1/people/:id
Show a Person

Returns a Person from your address book

Supported Formats

json

Success Response:

200 Good Request
                  
{
  id: "5342a521434236f5e7000007",
  name: "Mark",
  surname: "Twain",
  email: "mark.twain@example.com",
  telephone: "555-123-4567",
  birthday: "1835/11/30 00:00:00",
  custom_field: "Custom Value",
  image: "http://url/of/avatar",
  list_ids: [
    "5342a53e86d256f5e7000006",
    "5342a53e86d256f5e7000016"
  ]
}
              

Errors

401 Unauthorized
404 Not Found

Examples

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

Params

Param name Description
id
required

Person ID


Value: Must be Fixnum
api_token
required

Your Passdock API key


Value: Must be String

POST /api/v1/people
Create a Person

Create a new person in your address book.

Supported Formats

json

Success Response:

201 Created
                  
{
  id: "5342a521434236f5e7000007",
  name: "Mark",
  surname: "Twain",
  email: "mark.twain@example.com",
  telephone: "555-123-4567",
  birthday: "1835/11/30 00:00:00",
  custom_field: "Custom Value",
  image: "http://url/of/avatar",
  list_ids: [
    "5342a53e86d256f5e7000006",
    "5342a53e86d256f5e7000016"
  ]
}

              

Errors

400 Bad Request
401 Unauthorized

Examples

curl -i -H "Content-Type: application/json" -d '{"person":{"name":"Jeff","surname":"Star", "list_ids":["12ab8e008f0d0c8a090f9c0b"]}}' https://api.passdock.com/api/v1/people?api_token=75778a65dfdae310a107d2ef0bbd3780

Params

Param name Description
api_token
required

Your Passdock API key


Value: Must be String
person
required

Object that contains Person's informations


Value: Must be a Hash
person[name]
optional

Person's name


Value: Must be String
person[surname]
optional

Person's surname


Value: Must be String
person[remote_thumbnail_url]
optional

Remote image address for a person


Value: Must be String
person[list_ids]
optional

Lists the person belongs to


Value: Must be Array
person[FIELD]
optional

Other fields specified for the person


Value: Must be String

PUT /api/v1/people/:id
Update Person

Update a desired Person.

Supported Formats

json

Success Response:

200 Good Request
                  
              
OR 200 Updated with Debug Enabled
                  
              

Errors

400 Bad Request
401 Unauthorized

Examples

curl -i -X PUT -H "Content-Type: application/json" -d '{"person":{"name":"Jeff","surname":"Star"}}' https://api.passdock.com/api/v1/people/511e5ce039078c08d8000035?api_token=75778a65dfdae310a107d2ef0bbd3780

Params

Param name Description
api_token
required

Your Passdock API key


Value: Must be String
id
required

Person ID


Value: Must be Fixnum
person
required

Object that contains Person's informations


Value: Must be a Hash
person[name]
optional

Person's name


Value: Must be String
person[surname]
optional

Person's surname


Value: Must be String
person[remote_thumbnail_url]
optional

Remote image address for a person


Value: Must be String
person[list_ids]
optional

Lists the person belongs to


Value: Must be Array
person[FIELD]
optional

Other fields specified for the person


Value: Must be String

DELETE /api/v1/people/:id
Delete Person

Destroy a Person.

Supported Formats

json

Success Response:

200 Deleted

Errors

400 Bad Request
401 Unauthorized
404 Person Not Found

Examples

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

Params

Param name Description
id
required

Person ID


Value: Must be Fixnum
api_token
required

Your Passdock API key


Value: Must be String

GET /api/v1/people/fields
Get available fields

Returns the list of fields you can assign when creating/updating a person.

Supported Formats

json

Success Response:

200 Good Request
                  
[
  "name",
  "surname",
  "email",
  "telephone",
  "birthday",
  "custom_field",
  "list_ids"
]
              

Errors

400 Bad Request
401 Unauthorized

Examples

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

Params

Param name Description
api_token
required

Your Passdock API key


Value: Must be String