Skip to end of metadata
Go to start of metadata

Overview

It’s now possible to pass enquiry details collected from other systems into Ascora via an API.  The initial steps are to enable the Ascora API and generate an API key for use in the calls made to Ascora.


Generating an API Key

The API can be enabled or disabled under AdministrationAPI Settings.


Click on the Generate New API Key and then Copy to Clipboard. 

Keep this API key in a safe spot as you’ll need it for connecting to the Ascora API later.


(info) Note: Clicking Generate New API Key will create a new API Key for you to use.  It is important to note that this will disconnect any applications using the previous key!


If you want to disable the API Key you can do so by clicking Disable API


Using your API Key

When making Calls to the Ascora API you’ll need to add this value into the Header Name Auth




Connection details:

          Endpoint: https://api.ascora.com.au/Enquiry

          Method: POST

          Body:  Enquiry Details as JSON


Sample Enquiry JSON Data:

{

  "companyName": "Acme",

  "firstName": "Jack",

  "lastName": "Johnson",

  "email": "jack@test.com.au",

  "mobile": "0401 000 000",

  "phone": "",

  "addressLine1": "119 Stirling Highway",

  "addressLine2": "",

  "addressSuburb": "Nedlands",

  "addressState": "WA",

  "addressPostcode": "6009",

  "addressCountry": "",

  "enquiryDescription": "Work Description goes here",

  "customFields": [

    {

      "fieldName": "Connection Type",

      "fieldValue": "ADSL 2"

    },

    {

      "fieldName": "Approved NBN Area",

      "fieldValue": "false"

    }

  ]

}


Any number of Custom Fields these can be added to the CustomFields collection.

      fieldname: Name of the Custom Field as entered in Ascora

      fieldValue: Value to be recorded.


The following is an example of a Wordpress Plugin that runs with Contact Form 7.  You'll need to change your API Key and any fields as needed to match your form.

Click Here to download the file.

Related Article

How Enquiry Works

  • No labels
Write a comment…