Skip to main content

Using the Widget API

Instructions for retrieving the same data included in the widget in its raw form

Dave West avatar
Written by Dave West
Updated over 10 months ago

This document outlines how you can retrieve the data displayed in the widget as a JSON payload. You can then create your own way to display the data or use the data in other systems/processes.

Method

GET

Endpoint

Query string parameters

  1. org_id

    1. type: STRING, required

    2. can be found in the script section of the widget settings page

      ​

  2. email

    1. type: STRING, required

    2. this is the email address of an active user on an active project
      ​

Test then endpoint

Once you have your org_id and an email for a user on an active project, you can test by entering the endpoint below in your browser. Replace ORG_ID_HERE and EMAIL_HERE with the values you retrieved:

https://app.onramp.us/api/widget/data?org_id=ORG_ID_HERE&email=EMAIL_HERE

Response

  1. type: JSON

  2. only 2 responses, 200, 400

Example 200 response
{
"status":200,
"success":true",
"message":"widget data",
"data":{
"email":"example@onramp.us",
"org_id":"ef7209a4-600d-46d2-bbd6-c41128513100",
"customer_logo":"http://app.onramp.us/static/img/logos/cb9cca9d.png",
"project_link":"https://app.onramp.us/portal/project/WYxk8mepY2aMy",
"project_name":"example project",
"start_date":"2023-07-12 00:03:00",
"end_date":"2023-08-13 00:03:00",
"percent_complete":"0",
"days_remaining":"-94",
},
}

Example 400 response
{
"status":400,
"success":false,
"message":"There is a problem with the customer",
"data":{},
}
Did this answer your question?