No access

Step 5. Calling the Brincr API

  1. We created an example script in PHP to make a curl request to the Brincr API. This is just an example of doing a GET request to the categories endpoint. You can find a full list of all our endpoints in the Swagger documentation.

    
    function callCategoriesEndpoint() {
        $url = 'https://sandbox-api.brincr.com/api/v1/categories'; // Sandbox
        $url = 'https://api.brincr.com/api/v1/categories'; // Production
        $curl = curl_init();
        $headers = [
            'Accept: application/json',
            'Authorization: Bearer YOUR_ACCESS_TOKEN',
        ];
    
        curl_setopt($curl, CURLOPT_URL, $url);
        curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
        curl_setopt($curl, CURLOPT_HTTPGET, 1);
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
    
        $response = curl_exec($curl);
        $httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
    
        curl_close($curl);
    }
    

    URL

    The Sandbox API base URL is https://sandbox-api.brincr.com/api/v1/.
    The Production API base URL is https://api.brincr.com/api/v1/.
    After that we add categories to access the categories endpoint. For a full list of endpoints (and their corresponding URLs) go to the Swagger documentation. Here you can also find more examples on how to make different kinds of requests to the Brincr API.

    Headers

    The Accept and Authorization headers are required for every call to the Brincr API. The Accept header is set to application/json because all of the API's responses are in json format. For the Authorization header you are required to pass a valid access token (with the correct scopes) otherwise the Brincr API will return a 401 Unauthorized or 403 Forbidden response.

  2. Responses

    Below, all the possible responses the Brincr API can give are listed.

    200

    Successful operation

    201

    Successfully created

    204

    Successful operation

    401

    Unauthorized / Action not allowed
    This can happen when no or an invalid access token is provided, the user is inactive or the access token contains invalid data such as an invalid tenant

    403

    Forbidden / Invalid authentication supplied
    This usually happens when the required scopes are missing from the access token

    404

    Entity not found

    405

    Method Not Allowed

    422

    Unprocessable Entity / Validation exception

    429

    Too many requests are sent

    500

    Internal Server Error

  3. The Brincr API has a rate limit of 60 requests per minute. We also have an overall fair use policy of 6500 daily requests. We kindly ask you to respect these limits and the fair use policy. In case you exceed these limits, you will receive a 429 Too Many Requests response. After which you will have to wait 60 seconds before sending a new request.
    Keep in mind, in case you systemically exceed the rate limit we will be forced to disable your integration.

    Note: Your rate limit can be increased for an increased monthly fee. If you expect to require an increased rate limit per minute, please contact our Sales team by email or +31 (0)85 – 273 35 36.