Show a Case

Retrieve a specific case.

GET /api/kase/:id

Response

HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<kase>
  <id>43</id>
  <status>OPEN</status>
  <name>Consulting</name>
  <description>Scope and design web site shopping cart</description>
  <partyId>2</partyId>
  <owner>a.user</owner>
  <createdOn>2011-04-16T13:59:58Z</createdOn>
  <updatedOn>2011-05-11T16:54:23Z</updatedOn>
</kase>{
  "kase": {
    "id": "43",
    "status": "OPEN",
    "name": "Consulting",
    "description": "Scope and design web site shopping cart",
    "partyId": "2",
    "owner": "a.user",
    "createdOn": "2011-04-16T13:59:58Z",
    "updatedOn": "2011-05-11T16:54:23Z"
  }
}

Show as JSONShow as XML

List Cases

Collection of cases on the Capsule account

GET /api/kase

The collection of cases can be filtered using one of the following filters on the URL.

  • ?tag= filter by last modified date
  • ?lastmodified= filter by last modified date

The results can also be paginated using the following options

  • &start= first record to be returned. The results start with an index of 0.
  • &limit= the maximum number of matching records to be returned

Response

HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<kases>
  <kase>...</kase>
  <kase>...</kase>
</kases>{
  "kases": {
    "kase": [
      "...",
      "..."
    ]
  }
}

Show as JSONShow as XML

List Cases for Party

Collection of cases for a specified person or organisation.

GET /api/party/:party-id/kase

Response

HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<kases>
  <kase>...</kase>
  <kase>...</kase>
</kases>{
  "kases": {
    "kase": [
      "...",
      "..."
    ]
  }
}

Show as JSONShow as XML

Add a Case

Create a new case attached to a specified person or organisation.

POST /api/party/:party-id/kase

Request

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<kase>
  <status>OPEN</status>
  <name>Website design</name>
  <description>Design and create website</description>
  <owner>a.user</owner>
</kase>{
  "kase": {
    "status": "OPEN",
    "name": "Website design",
    "description": "Design and create website",
    "owner": "a.user"
  }
}

Show as JSONShow as XML

  • name required, name for the case
  • description optional description
  • owner optional, if not supplied the authenticated user is used; see users for available options
  • status optional, if not supplied it defaults to OPEN, available options are OPEN, CLOSED
  • closeDate optional, ignored unless status is CLOSED

Response

HTTP/1.1 201 Created
Location: https://sample.capsulecrm.com/api/kase/59

Update a Case

Update a specified cases, only the fields that are to be updated need to be supplied in the XML or JSON.

PUT /api/kase/:kase-id

Request

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<kase>
  <status>CLOSED</status>
</kase>{
  "kase": {
    "status": "CLOSED"
  }
}

Show as JSONShow as XML

Response

HTTP/1.1 200 OK

Delete a Case

Delete a specific Case

DELETE /api/kase/:kase-id

Response

HTTP/1.1 200 OK

Deleted Cases

A collection of case id’s that have been deleted since the specified date

GET /api/kase/deleted
  • ?since= required, date to start check for delete cases

Response

HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<deletedKases>
  <deletedKase>
    <id>1</id>
    <deletedDate>2011-11-16T16:35:31Z</deletedDate>
  </deletedKase>
  <deletedKase>
    <id>6</id>
    <deletedDate>2011-12-31T11:16:19Z</deletedDate>
  </deletedKase>
</deletedKases>{
  "deletedKases": {
    "deletedKase": [
      {
        "id": "1",
        "deletedDate": "2011-11-16T16:35:31Z"
      },
      {
        "id": "6",
        "deletedDate": "2011-12-31T11:16:19Z"
      }
    ]
  }
}

Show as JSONShow as XML

List Additional Contacts

The collection of additional contacts related to the case.

GET /api/kase/:case-id/party

Response

HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<parties>
  <person>
    <id>100</id>
    <firstName>Eric</firstName>
    <lastName>Schmidt</lastName>
    <createdOn>2011-09-14T15:22:01Z</createdOn>
    <updatedOn>2011-12-14T10:45:46Z</updatedOn>
  </person>
  <person>
    <id>101</id>
    <firstName>Larry </firstName>
    <lastName>Page</lastName>
    <createdOn>2011-09-14T15:22:01Z</createdOn>
    <updatedOn>2011-11-15T10:50:48Z</updatedOn>
  </person>
  <organisation>
    <id>50</id>
    <name>Google Inc</name>
    <createdOn>2011-09-14T15:22:01Z</createdOn>
    <updatedOn>2011-12-14T10:45:46Z</updatedOn>
  </organisation>
</parties>{
  "parties": {
    "person": [
      {
        "id": "100",
        "firstName": "Eric",
        "lastName": "Schmidt",
        "createdOn": "2011-09-14T15:22:01Z",
        "updatedOn": "2011-12-14T10:45:46Z"
      },
      {
        "id": "101",
        "firstName": "Larry ",
        "lastName": "Page",
        "createdOn": "2011-09-14T15:22:01Z",
        "updatedOn": "2011-11-15T10:50:48Z"
      }
    ],
    "organisation": {
      "id": "50",
      "name": "Google Inc",
      "createdOn": "2011-09-14T15:22:01Z",
      "updatedOn": "2011-12-14T10:45:46Z"
    }
  }
}

Show as JSONShow as XML

Add Additional Contact

Add an person or organisation as an additional contact to the case.

POST /api/kase/:case-id/party/:party-id

Response

HTTP/1.1 200 OK

Remove Additional Contact

Remove that person or organisation as an additional contact of the case.

DELETE /api/kase/:case-id/party/:party-id

Reponse

HTTP/1.1 200 OK