Connecting leads to the system using Rest API

With Rest API interface, you can access your Fireberry data from different applications. Follow these steps to help you integrate other applications to Fireberry.

How to create new record using Rest API

The Rest API interface makes it easy to connect leads to the system.

Click here to find out how to use the HTTP REST API.

Creating a new record is done with a Create action.

Action: Create

Method: POST
URL: https://api.fireberry.com/api/record/{record}

We'll replace the {record} with the object's system name or the object number of the new record we wish to create. Write the record's values and fields in the query's body, in JSON format.

To find the system fields’ names, enter the record editing mode via the three dot-menu next to each form, then click Edit Layout. Click the gray pencil next to the field, and the system name will appear in the opened window.

For example, in the Accounts object, Account Name is called accountname.

Query's body structure

The query's body structure:

{

"accountname":"Jonathan Smith",

"telephone1":"41500000000",

"emailaddress1":"support@fireberry.com",

"originatingleadcode":"3"

}

 

Open curly brackets { } in which you will enter the field's system name and the value you wish to create in every line. If you wish to add more than one field, separate the fields and values with a comma.

In the case of a Picklist type field, enter the number representing the field you desire after entering the system name. For example, originatingleadcod is the system name of the Lead Source field. The number 3 represents the value Email Marketing.

If the case in a query is an account record, a potential customer, or service call, follow these steps to determine which number represents each value in a Picklist  type field from within the system. Click the gear icon on the top right corner (Settings)  > Integrations > Web Forms > RestAPI > API Explorer. The system names for every field in the account card, and the number representing every value in the Picklist type fields are all dysplayed in the html box.

 

Another way to track fields, names and numerical values for Picklist  type fields in all objects is by using a GET command. Read more about it in the following article.

 Important note: If one of the record's fields has a value containing quotation marks ("), add '_' (an apostrophe) before and after the value instead of "_". For example – entering the accountname field with the value: Jonathan "John" Smith: { accountname: 'Jonathan "John" Smith' }

A success message will appear after running the query. The message will be in JSON format, and will  include details about the record. Here is an example of the server's response after success:

Notice the highlighted values (appear in large font). These are the values that we entered in the query's body.

The fields that were not included in the query received the default system values or were left empty (null).

The server’s response example

{

 "success": true,

  "data": {

   "Record": {

     telephone1: "41500000000",

     createdby: "5e7066e9-7051-46a9-8408-2486e03321b5",

     revenue: null,

     accountnumber: "1675",

     statecode: 1,

     billingcountry: null,

     modifiedon: "2016-09-18T11:49:05",

     isvalidforemailcode: 1,

     ownerid: "5e7066e9-7051-46a9-8408-2486e03321b5",

     primarycontactid: null,

     modifiedby: "5e7066e9-7051-46a9-8408-2486e03321b5",

     numberofemployees: null,

     emailaddress1: "support@fireberry.com",

     emailaddress3: null,

     telephone3: null,

     telephone2: null,

     parentaccountid: null,

     accountname: "Jonathan Smith",

     billingcity: null,

     shippingmethodcode: null,

     websiteurl: null,

     originatingleadcode: 3,

     billingstate: null,

     description: null,

     createdon: "2016-09-18T11:49:05",

     businesstypecode: null,

     billingzipcode: null,

     billingstreet: null,

     emailaddress2: null,

     accounttypecode: 0,

     statuscode: 9,

     accountratingcode: 0,

   }

 },

 "message": ""

}

Other helpful resources

Looking for something else?

Try adjusting your keywords in order to recieve better search results.

Still need help?

Go to our YouTube channel to watch tutorials and learn more about the system.