Back to top

Webcamconsult API

A simple API to access users, clients and appointments for webcamconsult.

Authentication is done by a authorization token in the headers. Each organisation (instance) has it’s own token.

Alternatively the token can be provided as by the authentication_token parameter.

Resource Group

User Collection

List All Users
GET/users.json

Example URI

GET http://eapi.webcamconsult.com//users.json
Request
HideShow
Headers
Authorization: Token token=38826f79010b41b5aaeb4710debb09db
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
    {
        "id": "1234567890abcdef12345678",
        "titles": "Dokter",
        "initials": "J",
        "last_name": "Akkermans",
        "full_name": "Dokter J Akkermans",
        "emails": "jakkermans@example.com"
        "address": "Vlietlaan 1",
        "postal_code": "3011AA",
        "city": "Ergens",
        "roles": [
            "consultant"
        ]
    },
]

Create a New User
POST/users.json

You may create a user using this action. It takes a JSON object containing a user

Example URI

POST http://eapi.webcamconsult.com//users.json
Request
HideShow
Headers
Authorization: Token token=eb4710debb09db38826f79010b41b5aa
Request
HideShow
Headers
Content-Type: application/json
Body
{
    "user": {
        "titles": "Dokter",
        "initials": "J",
        "last_name": "Akkermans",
        "email": "jakkermans@example.com",
        "address": "Vlietlaan 1",
        "postal_code": "3011AA",
        "city": "Ergens",
    }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "user": {
    "id": "1234567890abcdef12345678",
    "titles": "Dokter",
    "initials": "J",
    "last_name": "Akkermans",
    "full_name": "Dokter J Akkermans",
    "email": "jakkermans@example.com",
    "address": "Vlietlaan 1",
    "postal_code": "3011AA",
    "city": "Ergens",
    "roles": [
      "consultant"
    ]
  }
}
Response  422
HideShow
Body
{
  "errors": {
    "email": [
      "is al in gebruik"
    ]
  }
}

User

A user object has the following (editable) attributes

  • titles

  • initials

  • last_name

  • email

  • address

  • postal_code

  • city

These attributes are generated:

  • id

  • full_name

  • roles

View a User detail
GET/users/{user_id}.json

Example URI

GET http://eapi.webcamconsult.com//users/user_id.json
URI Parameters
HideShow
user_id
string (required) 

id of the user

Request
HideShow
Headers
Authorization: Token token=eb4710debb09db38826f79010b41b5aa
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "user": {
    "id": "1234567890abcdef12345678",
    "titles": "Dokter",
    "initials": "J",
    "last_name": "Akkermans",
    "full_name": "Dokter J Akkermans",
    "email": "jakkermans@example.com",
    "address": "Vlietlaan 1",
    "postal_code": "3011AA",
    "city": "Ergens",
    "roles": [
      "consultant"
    ]
  }
}

Update a User
PUT/users/{user_id}.json

You may update a user using this action. It takes a JSON object containing a user

Example URI

PUT http://eapi.webcamconsult.com//users/user_id.json
URI Parameters
HideShow
user_id
string (required) 

id of the user

Request
HideShow
Headers
Authorization: Token token=eb4710debb09db38826f79010b41b5aa
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "user": {
    "titles": "Dokter",
    "initials": "J",
    "last_name": "Akkermans",
    "full_name": "Dokter J Akkermans",
    "email": "jakkermans@example.com",
    "address": "Vlietlaan 1",
    "postal_code": "3011AA",
    "city": "Ergens"
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "user": {
    "id": "1234567890abcdef12345678",
    "titles": "Dokter",
    "initials": "J",
    "last_name": "Akkermans",
    "full_name": "Dokter J Akkermans",
    "email": "jakkermans@example.com",
    "address": "Vlietlaan 1",
    "postal_code": "3011AA",
    "city": "Ergens",
    "roles": [
      "consultant"
    ]
  }
}

Delete a User
DELETE/users/{user_id}.json

You may delete a user using this action

Example URI

DELETE http://eapi.webcamconsult.com//users/user_id.json
URI Parameters
HideShow
user_id
string (required) 

id of the user

Request
HideShow
Headers
Authorization: Token token=eb4710debb09db38826f79010b41b5aa
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "user": {
    "id": "1234567890abcdef12345678"
  }
}
Response  200
HideShow
Headers
Content-Type: Application/json
Body
{
  "status": "ok"
}

Client Collection

List All Clients
GET/clients.json

Example URI

GET http://eapi.webcamconsult.com//clients.json
Request
HideShow
Headers
Authorization: Token token=38826f79010b41b5aaeb4710debb09db
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
    {
        "id":"5492ba6da19ea682ea000001",
        "email":"urias@sensestudios.com",
        "titles":"Dr.",
        "initials":"T",
        "surname_prefix":"de",
        "last_name":"Ester",
        "client_full_name":"Dhr. Dr. T de Ester",
        "external":null,
        "gender":"male",
        "date_of_birth":"2014-12-18T00:00:00.000+01:00",
        "reference_code":"12345",
        "division_ids":[ "5492ba6da19ea682ea000001", "5492ba6da19ea682ea000001" ],
        "authentication_token":"M94sNGjyKEH2U3yTxRAx",
    },
]

Create a New Client
POST/clients.json

You may create a client using this action. It takes a JSON object containing a client

Example URI

POST http://eapi.webcamconsult.com//clients.json
Request
HideShow
Headers
Authorization: Token token=eb4710debb09db38826f79010b41b5aa
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "client": {
    "email": "urias@sensestudios.com",
    "titles": "Dr.",
    "initials": "T",
    "surname_prefix": "de",
    "last_name": "Ester",
    "gender": "male",
    "date_of_birth": "2014-12-18T00:00:00.000+01:00",
    "reference_code": "12345",
    "division_ids": [
      "5492ba6da19ea682ea000001",
      "5492ba6da19ea682ea000001"
    ]
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "client": {
        "id":"5492ba6da19ea682ea000001",
        "email":"urias@sensestudios.com",
        "titles":"Dr.",
        "initials":"T",
        "surname_prefix":"de",
        "last_name":"Ester",
        "client_full_name":"Dhr. Dr. T de Ester",
        "external":null,
        "gender":"male",
        "date_of_birth":"2014-12-18T00:00:00.000+01:00",
        "reference_code":"12345",
        "division_ids":[ "5492ba6da19ea682ea000001", "5492ba6da19ea682ea000001" ],
    }
}
Response  422
HideShow
Body
{
  "errors": {}
  }
}

Client

A client object has the following (editable) attributes

  • email

  • titles

  • initials

  • surname_prefix

  • last_name

  • external

  • gender

  • date_of_birth

  • reference_code

  • division_ids

These attributes are generated:

  • id

  • client_full_name

View a Client detail
GET/client/{client_id}.json

Example URI

GET http://eapi.webcamconsult.com//client/client_id.json
URI Parameters
HideShow
client_id
string (required) 

id of the client

Request
HideShow
Headers
Authorization: Token token=eb4710debb09db38826f79010b41b5aa
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "client": {
        "id":"5492ba6da19ea682ea000001",
        "email":"urias@sensestudios.com",
        "titles":"Dr.",
        "initials":"T",
        "surname_prefix":"de",
        "last_name":"Ester",
        "client_full_name":"Dhr. Dr. T de Ester",
        "external":null,
        "gender":"male",
        "date_of_birth":"2014-12-18T00:00:00.000+01:00",
        "reference_code":"12345",
        "division_ids":[ "5492ba6da19ea682ea000001", "5492ba6da19ea682ea000001" ],
    }
}

Update a Client
PUT/client/{client_id}.json

You may update a user using this action. It takes a JSON object containing a user

Example URI

PUT http://eapi.webcamconsult.com//client/client_id.json
URI Parameters
HideShow
client_id
string (required) 

id of the client

Request
HideShow
Headers
Authorization: Token token=eb4710debb09db38826f79010b41b5aa
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "client": {
    "email": "urias@sensestudios.com",
    "titles": "Dr.",
    "initials": "T",
    "surname_prefix": "de",
    "last_name": "Ester",
    "gender": "male",
    "date_of_birth": "2014-12-18T00:00:00.000+01:00",
    "reference_code": "12345",
    "division_ids": [
      "5492ba6da19ea682ea000001",
      "5492ba6da19ea682ea000001"
    ]
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "client": {
    "id": "5492ba6da19ea682ea000001",
    "email": "urias@sensestudios.com",
    "titles": "Dr.",
    "initials": "T",
    "surname_prefix": "de",
    "last_name": "Ester",
    "client_full_name": "Dhr. Dr. T de Ester",
    "external": null,
    "gender": "male",
    "date_of_birth": "2014-12-18T00:00:00.000+01:00",
    "reference_code": "12345",
    "division_ids": [
      "5492ba6da19ea682ea000001",
      "5492ba6da19ea682ea000001"
    ]
  }
}

Delete a Client
DELETE/client/{client_id}.json

You may delete a client using this action

Example URI

DELETE http://eapi.webcamconsult.com//client/client_id.json
URI Parameters
HideShow
client_id
string (required) 

id of the client

Request
HideShow
Headers
Authorization: Token token=eb4710debb09db38826f79010b41b5aa
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "client": {
    "id": "1234567890abcdef12345678"
  }
}
Response  200
HideShow
Headers
Content-Type: Application/json
Body
{
  "status": "ok"
}

Appointment Collection

List All Appointments
GET/appointments.json

Example URI

GET http://eapi.webcamconsult.com//appointments.json
Request
HideShow
Headers
Authorization: Token token=38826f79010b41b5aaeb4710debb09db
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
    {
        "id": "1234567890abcdef12345678",
        "user_id": "1234567890abcdef12345678",
        "client_id": "1234567890abcdef12345678",
        "created_by_user_id": "1234567890abcdef12345678",
        "date":"2015-07-01T15:41:24.306+02:00",
        "state": "idle",
        "division_id": "1234567890abcdef12345678",
        "duration": 100,
        "external_participant_ids":["1234567890abcdef12345678","1234567890abcdef12345678"],
        "inloop_json": {"email":"someemail@somedomain.com"}
    },
]

Create a New Appointment
POST/appointments.json

You may create an appointment using this action. It takes a JSON

object containing a client

Example URI

POST http://eapi.webcamconsult.com//appointments.json
Request
HideShow
Headers
Authorization: Token token=eb4710debb09db38826f79010b41b5aa
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "appointment": {
    "id": "1234567890abcdef12345678",
    "user_id": "1234567890abcdef12345678",
    "client_id": "1234567890abcdef12345678",
    "created_by_user_id": "1234567890abcdef12345678",
    "date": "2015-07-01T15:41:24.306+02:00",
    "orig_date": "2015-07-01T15:41:24.306+02:00",
    "started_at": "2015-07-01T15:41:24.306+02:00",
    "created_at": "2015-07-01T15:41:24.306+02:00",
    "division_id": "1234567890abcdef12345678",
    "duration": 100,
    "external_participant_ids": [
      "1234567890abcdef12345678",
      "1234567890abcdef12345678"
    ],
    "inloop_json": {
      "email": "someemail@somedomain.com"
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "appointment": {
    "id": "1234567890abcdef12345678",
    "user_id": "1234567890abcdef12345678",
    "client_id": "1234567890abcdef12345678",
    "created_by_user_id": "1234567890abcdef12345678",
    "date": "2015-07-01T15:41:24.306+02:00",
    "state": "idle",
    "division_id": "1234567890abcdef12345678",
    "duration": 100,
    "external_participant_ids": [
      "1234567890abcdef12345678",
      "1234567890abcdef12345678"
    ],
    "inloop_json": {
      "email": "someemail@somedomain.com"
    }
  }
}
Response  422
HideShow
Body
{
  "errors": {}
}

Appointment

A user object has the following (editable) attributes

  • user_id

  • client_id

  • created_by_user_id

  • date

  • division_id

  • duration

  • external_participant_ids

These attributes are generated:

  • id

  • state

  • orig_date

  • started_at

  • created_at

View an Appointment detail
GET/appointment/{appointment_id}.json

Example URI

GET http://eapi.webcamconsult.com//appointment/appointment_id.json
URI Parameters
HideShow
appointment_id
string (required) 

id of the appointment

Request
HideShow
Headers
Authorization: Token token=eb4710debb09db38826f79010b41b5aa
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "appointment": {
    "id": "1234567890abcdef12345678",
    "user_id": "1234567890abcdef12345678",
    "client_id": "1234567890abcdef12345678",
    "created_by_user_id": "1234567890abcdef12345678",
    "date": "2015-07-01T15:41:24.306+02:00",
    "state": "idle",
    "division_id": "1234567890abcdef12345678",
    "duration": 100,
    "external_participant_ids": [
      "1234567890abcdef12345678",
      "1234567890abcdef12345678"
    ],
    "inloop_json": {
      "email": "someemail@somedomain.com"
    }
  }
}

Update an Appointment
PUT/appointment/{appointment_id}.json

You may update an appointment using this action. It takes a JSON object containing a user

Example URI

PUT http://eapi.webcamconsult.com//appointment/appointment_id.json
URI Parameters
HideShow
appointment_id
string (required) 

id of the appointment

Request
HideShow
Headers
Authorization: Token token=eb4710debb09db38826f79010b41b5aa
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "appointment": {
    "id": "1234567890abcdef12345678",
    "user_id": "1234567890abcdef12345678",
    "client_id": "1234567890abcdef12345678",
    "created_by_user_id": "1234567890abcdef12345678",
    "date": "2015-07-01T15:41:24.306+02:00",
    "state": "idle",
    "division_id": "1234567890abcdef12345678",
    "duration": 100,
    "external_participant_ids": [
      "1234567890abcdef12345678",
      "1234567890abcdef12345678"
    ],
    "inloop_json": {
      "email": "someemail@somedomain.com"
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "appointment": {
    "id": "1234567890abcdef12345678",
    "user_id": "1234567890abcdef12345678",
    "client_id": "1234567890abcdef12345678",
    "created_by_user_id": "1234567890abcdef12345678",
    "date": "2015-07-01T15:41:24.306+02:00",
    "state": "idle",
    "division_id": "1234567890abcdef12345678",
    "duration": 100,
    "external_participant_ids": [
      "1234567890abcdef12345678",
      "1234567890abcdef12345678"
    ],
    "inloop_json": {
      "email": "someemail@somedomain.com"
    }
  }
}

Delete an Appointment
DELETE/appointment/{appointment_id}.json

You may delete a appointment using this action

Example URI

DELETE http://eapi.webcamconsult.com//appointment/appointment_id.json
URI Parameters
HideShow
appointment_id
string (required) 

id of the appointment

Request
HideShow
Headers
Authorization: Token token=eb4710debb09db38826f79010b41b5aa
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "appointment": {
    "id": "1234567890abcdef12345678"
  }
}
Response  200
HideShow
Headers
Content-Type: Application/json
Body
{
  "status": "ok"
}

Generated by aglio on 03 Feb 2017