Cases

Home/API/Cases
Cases 2017-05-22T15:35:19+00:00

Use the cases method to add, find and update cases.

Request URL: https://YOURAPPNAME.fusedesk.com/api/v1/cases/

Supported Methods: POST, GET

Authorization: See Authorization

Return Codes: See Return Codes

Create a New Case

Request URL: https://YOURAPPNAME.fusedesk.com/api/v1/cases/

Request Method: POST

Paramater Required Type Default Defined
date_opened no datetime now When the case was opened. By default we’ll assume it’s being opened right now. You can also set this to any other valid date, helpful if you’re importing cases.
date_assigned no datetime When the case was assigned, i.e. given to a support rep to handle.
date_updated no datetime  date_opened When a case was last opened. By default, we’ll assume it was last updated when it was opened. You can also set this to any other valid date, helpful if you’re importing cases.
status no string  new Case status. Defaults to new. Can be new, open, or closed.
depid yes int Department ID of the where this case should be assigned.
repid no int random rep in department Infusionsoft User ID of the support rep who the case is assigned to. If no rep is specified, a random rep in the department will be selected.
summary yes text A short description of the case. This is typically the subject line of the email that opened the case or what a rep would enter when logging a a phone call as the title.
details yes text Info on the case. This is typically the body of the original email that opened the case or the details of what the case is all about.
openedby yes text Text version of who opened the case. This can be a name, email address, phone number, or whatever would make sense to describe who opened the case.
contactid no int The Infusionsoft Contact ID of the contact (i.e. customer) who opened the case.
companyid no int The Infusionsoft Company ID of the company who opened the case.
type no string note call or note to indicate if the note on the case should be logged as a call or a note. If you specify import, no note will be added to the case history.
history no string A JSON encoded string of any case history to add, i.e. emails, notes, and calls.
casetags no string A CSV list of FuseDesk case tag IDs that you want to apply to the new case

 

Search for a Case

Request URL: https://YOURAPPNAME.fusedesk.com/api/v1/cases

Request Method: GET

Paramater Required Type Default Defined
email no text Search Infusionsoft for the supplied email address, and then return all cases linked to the returned contact IDs.
Caution: this takes an extra step and requires us connecting to Infusionsoft’s API servers, so this can take a moment longer than other searches.
contactid no int Search for cases assigned to a certain Infusionsoft Contact ID
companyid no int Search for cases assigned to a certain Infusionsoft Company ID
repid no int Search for cases assigned to a FuseDesk Rep. Use the Rep’s Infusionsoft UserID
depid no int Search for cases assigned to a certain FuseDesk Department. Use the FuseDesk DepartmentID
status no alpha  all Search for cases with a certain status. Status can be all, active, new, open, or closed. All is all. Active is new and open cases. New cases are waiting on the support team. Open cases are waiting on the customer. Closed cases are resolved.
casetag no int Search for cases with the specific FuseDesk Case Tag ID.
date_opened no date* Search for cases opened on, before, after, or between a specified date or dates
date_assigned no date* Search for cases assigned on, before, after, or between a specified date or dates
date_firstresponse no date* Search for cases first responded to on, before, after, or between a specified date or dates
date_updated no date* Search for cases updated on, before, after, or between a specified date or dates
date_closed no date* Search for cases closed on, before, after, or between a specified date or dates
limit no int 150 How many case to return
orderby no alpha date_updated How to sort the results. By default, we return the cases sorted by the date they were last updated. You can also sort by caseid, contactid, date_opened, date_assigned, date_updated, date_resolved

*Searching with Date Fields

When searching for cases using date fields, you can filter in four different ways. All dates need to be valid parseable dates, for example in YYYY-MM-DD format, like 2015-12-04

  • On a date: 2015-04-01
  • Before a date: {"before":"2014-02-14"}
  • After a date: {"after:"2014-05-02"}
  • Between two dates: {"after":"2014-04-14",before:"2015-05-15"}

Get info on a case:

Request URL: https://YOURAPPNAME.fusedesk.com/api/v1/cases/CASEID

Request Method: GET

 

Add a note to an existing case:

Request URL: https://YOURAPPNAME.fusedesk.com/api/v1/cases/CASEID/addnote

Request Method: POST

Parameters:

Paramater Required Type Default Defined
title yes string The short summary title of the note
type yes string The type of note either “call” or “note”
note yes string The body/content of the note
date_added no string now The date the note was added. Typically, you’d leave this blank, unless you were importing historical data

 

Apply a Case Tag to an existing case:

Request URL: https://YOURAPPNAME.fusedesk.com/api/v1/cases/CASEID/tag/TAGID

Request Method: POST

Parameters: none

Remove a Case Tag from an existing case:

Request URL: https://YOURAPPNAME.fusedesk.com/api/v1/cases/CASEID/untag/TAGID

Request Method: POST

Parameters: none

Import Case history to an existing case:

Request URL: https://YOURAPPNAME.fusedesk.com/api/v1/cases/CASEID/history

Request Method: POST

Parameters:

Paramater Required Type Default Defined
history yes string A JSON encoded string of all history to import


The history JSON should be an encoded array with each element being either a note (call or note) or an email. This type should be specified for each item with a type parameter of call, note, or email.

History Notes should be objects as outlined under addnote above.

History Emails should be objects as follows:

Paramater Required Type Default Defined
to yes string The email address that the email was sent to
from yes string The email address that the email came from
cc no string The email addresses that the email was CCed to
bcc no string The email addresses that the email was CCed to
subject yes string The subject line of the email
body yes string The plain text version of the email
date_sent no datetime  now The date and time that the email was sent
date_recvd no datetime  now The date and time that the email was received
repid no int The ID of the rep that sent the email