Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Get All Appointments

GET /ssp/api/1/person/{id}/appointment

Security

PERSON_APPOINTMENT_READ

Parameters

status : ALL, ACTIVE, INACTIVE
start : First result (0-based index) to return
limit : Maximum number of results to return
sort : Property name
sortDirection : Ascending/descending keyword (ASC/DESC or ASCENDING/DESCENDING)

Returns

{"success" : "true",
 "results" : "100",
 "rows" : 
    [{"id" : "6c892a1c-ca07-11e1-8c61-0026b9e7ff4c",
      "createdBy" : 
         {"id" : "91f46e39-cea8-422b-b215-00f6bcf5d280",
          "firstName" : "John",
          "lastName" : "Doe"},
      "createdDate" : 1332216000000,
      "modifiedBy" : 
         {"id" : "91f46e39-cea8-422b-b215-00f6bcf5d280",
          "firstName" : "John",
          "lastName" : "Doe"},
      "modifiedDate" : 1332216000000,
      "objectStatus" : "ACTIVE",
      "startTime" : 1332216000000,
      "endTime" : 1332219600000,
      "attended" : true},
     {"id" : "46711355-5a40-4115-b5b9-0bd06986c9e1",
      "createdBy" : 
         {"id" : "91f46e39-cea8-422b-b215-00f6bcf5d280",
          "firstName" : "John",
          "lastName" : "Doe"},
      "createdDate" : 1332216000000,
      "modifiedBy" : 
         {"id" : "91f46e39-cea8-422b-b215-00f6bcf5d280",
          "firstName" : "John",
          "lastName" : "Doe"},
      "modifiedDate" : 1332216000000,
      "objectStatus" : "ACTIVE",
      "startTime" : 1332326000000,
      "endTime" : 1332339600000,
      "attended" : false},
     ...
    ]
}


Get an Appointment

GET /ssp/api/1/person/{id}/appointment/{id}

Security

PERSON_APPOINTMENT_READ

Returns

Appointment

{"id" : "46711355-5a40-4115-b5b9-0bd06986c9e1",
 "createdBy" : 
   {"id" : "91f46e39-cea8-422b-b215-00f6bcf5d280",
    "firstName" : "John",
    "lastName" : "Doe"},
 "createdDate" : 1332216000000,
 "modifiedBy" : 
   {"id" : "91f46e39-cea8-422b-b215-00f6bcf5d280",
    "firstName" : "John",
    "lastName" : "Doe"},
 "modifiedDate" : 1332216000000,
 "objectStatus" : "ACTIVE",
 "startTime" : 1332326000000,
 "endTime" : 1332339600000,
 "attended" : false}


Get Current Appointment

This method will return the appointment with the most recent modifiedDate.

GET /ssp/api/1/person/{id}/appointment/current

Security

PERSON_APPOINTMENT_READ

Returns

Appointment

{"id" : "46711355-5a40-4115-b5b9-0bd06986c9e1",
 "createdBy" : 
   {"id" : "91f46e39-cea8-422b-b215-00f6bcf5d280",
    "firstName" : "John",
    "lastName" : "Doe"},
 "createdDate" : 1332216000000,
 "modifiedBy" : 
   {"id" : "91f46e39-cea8-422b-b215-00f6bcf5d280",
    "firstName" : "John",
    "lastName" : "Doe"},
 "modifiedDate" : 1332216000000,
 "objectStatus" : "ACTIVE",
 "startTime" : 1332326000000,
 "endTime" : 1332339600000,
 "attended" : false}


Create an Appointment

Appointments in the past are not allowed and will throw an exception.

POST /ssp/api/1/person/{id}/appointment

Security

PERSON_APPOINTMENT_WRITE

Sample Post

{"startTime" : 1332326000000,
 "endTime" : 1332339600000,
 "attended" : false}

Returns

Appointment

{"id" : "46711355-5a40-4115-b5b9-0bd06986c9e1",
 "createdBy" : 
   {"id" : "91f46e39-cea8-422b-b215-00f6bcf5d280",
    "firstName" : "John",
    "lastName" : "Doe"},
 "createdDate" : 1332216000000,
 "modifiedBy" : 
   {"id" : "91f46e39-cea8-422b-b215-00f6bcf5d280",
    "firstName" : "John",
    "lastName" : "Doe"},
 "modifiedDate" : 1332216000000,
 "objectStatus" : "ACTIVE",
 "startTime" : 1332326000000,
 "endTime" : 1332339600000,
 "attended" : false}


Save an Appointment

PUT /ssp/api/1/person/{id}/appointment/{id}

Security

PERSON_APPOINTMENT_WRITE

Sample Post

{"id" : "46711355-5a40-4115-b5b9-0bd06986c9e1",
 "createdBy" : 
   {"id" : "91f46e39-cea8-422b-b215-00f6bcf5d280",
    "firstName" : "John",
    "lastName" : "Doe"},
 "createdDate" : 1332216000000,
 "modifiedBy" : 
   {"id" : "91f46e39-cea8-422b-b215-00f6bcf5d280",
    "firstName" : "John",
    "lastName" : "Doe"},
 "modifiedDate" : 1332216000000,
 "objectStatus" : "ACTIVE",
 "startTime" : 1332326000000,
 "endTime" : 1332339600000,
 "attended" : false}

Returns

Appointment

{"id" : "46711355-5a40-4115-b5b9-0bd06986c9e1",
 "createdBy" : 
   {"id" : "91f46e39-cea8-422b-b215-00f6bcf5d280",
    "firstName" : "John",
    "lastName" : "Doe"},
 "createdDate" : 1332216000000,
 "modifiedBy" : 
   {"id" : "91f46e39-cea8-422b-b215-00f6bcf5d280",
    "firstName" : "John",
    "lastName" : "Doe"},
 "modifiedDate" : 1332216000000,
 "objectStatus" : "ACTIVE",
 "startTime" : 1332326000000,
 "endTime" : 1332339600000,
 "attended" : false}

 

Delete an Appointment

DELETE /ssp/api/1/person/{id}/appointment/{id}

Security

PERSON_APPOINTMENT_DELETE

Returns

{"success" : "true"}

or

{"success" : "false", 
 "message" : "Message when success is false."}
  • No labels