Bambu API

Create Account

Overview

Welcome to the Bambu API's developer hub. Here you will find comprehensive guides and documentation to help you start working with our APIs, as well as meaningful insights & support.

We've created a set of simple to employ RESTFUL APIs, ensuring you can easily integrate into any application irrespective if its a web or mobile, existing or new.

What are you still waiting for? Start using our APIs today!
Please refer to Terms of Use before using our API.

Authorization

Relevant credentials are needed to access all the Bambu APIs.
You'll need to create a new account with us in order to test our APIs.

Create an Account and generate an API key

  1. Create a new user account with POST /api/user
// Request Body
{
  "username": "testuser",
  "email": "[email protected]",
  "password": "XXXXXXX"
}

// Response Body
{
    "id": "308efe70-2d2c-11ea-ba7c-d58de15e5bca",
    "username": "testuser",
    "email": "[email protected]"
}
  1. You'll receive an email with a link. Simply click on that link to verify your email address.

  2. Generate a Bearer Token with your username and password. POST /client-login

// Request Body
{  
   "username":"testuser",
   "password":"XXXXXXX"
}

// Response Body
{
    "access_token": "P62VLToAfNgXBGmdQ4DFe4d7EqlCo4ms",
    "expires_in": 1209600,
    "scope": "basic",
    "refresh_token": "t9RoypeNQxUw1FPFbWuGzFPicxL6472E",
    "token_type": "Bearer"
}
  1. Generate a API key with your Bearer Token. POST /api/apiKey/generateApiKey

Key

Value

Authorization

Bearer P62VLToAfNgXBGmdQ4DFe4d7EqlCo4ms

// Response Body
{
    "key": "fa966c9db6d84a97ad147e29"
}

Starting using our APIs

Once you've created an API key, you can begin using our APIs.
Here's an example of how to pass in the API key to the rest of the APIs

GET /api/country/v1/getCountryByCountryCode/US

Key

Value

Authorization

Bearer fa966c9db6d84a97ad147e29

// Response Body

{
    "country": [
        {
            "code": "US",
            "international_dialing_code": "1",
            "currency_code": "USD",
            "flag": "https://restcountries.eu/data/usa.svg",
            "cioc": "USA",
            "name": "United States of America",
            "demonym": "American",
            "cca2": "US",
            "cca3": "USA",
            "ccn3": "840",
            "id": "USA"
        }
    ],
    "success": true
}

Testing

You may use your access token to test the API for your application through the API Console. Here are the steps to use the API console:

  • Click on GET/POST to expand the call method details, then fill in the keyword parameter(s).
  • Click on the "Try it" button to see the response, request URL and cURL of the API call.
    To integrate the API into your application, simply add the provided Key in the HTTP header (e.g. Authorization: Bearer eyXXXXXXXXXXXXXXXXX)

Responses

The response object provides an HTTP status code, which indicates whether a call has succeeded or failed. Status codes:

  • HTTP Status Code: 200
    Indication: Successful

  • HTTP Status Code: 4xx/5xx
    Indication: Failed. The response body will provide more details of the error

Updated about a month ago


Create Account


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.