Bringg

Search results for "{{ search.query }}"

No results found for "{{search.query}}". 
View All Results

Getting Started with Bringg

This page will help you get started with bringg API. You'll be up and running in no time.

There are two alternatives to connecting to our API. Services - which are unique URLs that are created for one specific environment, and API calls - which are specific URLs that need to be signed and authenticated.

Are services secured?

Yes. By using secured networking (SSL) - your uniquely created URLs are basically a type of user and password!

Feature
Services
APIs
Customer SDK

Ease of use

Best

Medium

Best

Includes all possible features

No

Yes

Yes

Includes real time features

No

No

Yes

Secured

Yes

Yes

Yes

1. Join as a Developer

Before you start, you will have to register as a Developer:

  • Verify your email address via registration email we sent to you. To resend the verification email use Company Settings and click on Resend Confirmation Email button.
  • Go to Company Settings and click on Become a developer button.
  • Fill out the Become a developer form.
  • Go to Developer and copy your access_token and secret_key (you will have one pair for production and one for test).

2. Sign your Request

Example - creating your first customer

In this example, we are making a call to the Create Customer endpoint which will create your first Customer with the following details:

  • Name: Rose M. Scudder
  • Address: 715 Oliverio Drive, Moundridge, KS 67107
  • Phone: 620-680-9382
  • E-mail: RoseMScudder@dayrep.com

Given an access token of "12345" and a secret key of "67890", follow these steps:

  • add access_token (provided during registration) & timestamp (the current time in unix format) to your parameters:
var params = JSON.parse('{"name": "Rose M. Scudder", "address": "715 Oliverio Drive, Moundridge, KS 67107", "phone": "620-680-9382", "email": "RoseMScudder@dayrep.com"}');
params.timestamp = Date.now();
params.access_token = "12345";
params = {"name" => "Rose M. Scudder", "address" => "715 Oliverio Drive, Moundridge, KS 67107", "phone" => "620-680-9382", "email" => "RoseMScudder@dayrep.com"}
params[:timestamp] ||= Time.now.to_i
params[:access_token] ||= "12345"
var query_params = '';
for (var key in params) {
    var value = params[key];
    if (query_params.length > 0) {
      query_params += '&';
    }
    query_params += key + '=' + encodeURIComponent(value);
}
query_params = params.to_query
  • sign the query string using an HmacSHA1 mechanism with your secret key and add the signature to your parameters:
params.signature = CryptoJS.HmacSHA1(query_params, "67890").toString();
params.merge(signature: OpenSSL::HMAC.hexdigest("sha1", "67890", query_params))

Authentication is Done

Make sure you have now 3 new parameters: timestamp, access_token and signature. You may want to verify your signature by using our Signature Tester.

3. Make the API Call

Create HTTP POST request to an endpoint:

request.open('POST', 'http://developer-api.bringg.com/partner_api/customers', true);
request.setRequestHeader('Content-type', 'application/json');
request.send(JSON.stringify(params));
uri = URI("http://api.bringg.com/partner_api/customers")
req = Net::HTTP::Post.new(uri, initheader = {'Content-Type' =>'application/json'})
req.body = params.to_json
res = Net::HTTP.start(uri.hostname, uri.port) do |http|
		http.request(req)
end

Here is an example of the data that would have been returned:

{
    "success": true,
    "customer": {
        "id": 1,
        "name": "Rose M. Scudder",
        "address": "715 Oliverio Drive, Moundridge, KS 67107",
        "phone": "620-680-9382",
        "email": "RoseMScudder@dayrep.com"
    }
}

Congratulations!

You have just made your first Bringg API call.

Getting Started with Bringg