Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
maxLevel2
exclude.*Table of Contents.*

Get a Callback

...

Code Block
GET /companies/:company_id/config/callbacks/:callback_id

This will retrieve a Callback registration by its callback_id

A 404 - Not Found error will be returned if the Callback registration cannot be located.

Return JSON

A Callback registration entity

List Callback

...

Code Block
GET /companies/:company_id/config/callbacks

This will list active and future the callback registrationscallbacks.

Return JSON

An Array of Callback registration elements will be returned.

Code Block
[{
 "callback_id": "AB3423",
 "event_type": "person_added",
 "destination_url": "http://some.url",
 "destination_method": "POST",
 "content_type": "application/json",
 "start_date": "2010-01-01T00:00Z",
 "end_date": "2020-01-01T00:00Z",
 "url": "/companies/:id/config/callbacks/:callback_id",
 "created_at": "2012-04-05T14:30Z",
 "updated_at": "2012-05-08T19:30Z",
}]

Create a Callback

...

Code Block
POST /companies/:company_id/config/callbacks/

This will create a new Callback registration record.  

The fields callback_id, created_at, updated_at, and url are not allowed in a create. Any values will be ignored.

...

An HTTP 201 - Created response will be returned if the object has been successfully created.

Return JSON

A Callback registration entity

Delete a Callback

...

Code Block
DELETE /companies/:company_id/config/callbacks/:callback_id

...

This will set the end date of the callback registration to now and change it to inactive. If the start date of the callback registration was in the future, it will change that to now as well.

Return JSON

A Callback registration entity reflecting the new date ranges and active state.