Skip to content

Make your first request

Call GET /v1/me with your key, read the answer, then list your first products.

Version v1.1, updated

On this page

GET /v1/me tells you which company and which key a request uses. It needs no scope, so it is the right first call for a new key.

Call GET /v1/me

Put the key in the BIRP_API_KEY environment variable, then run one of these.

GET /v1/me
curl "https://api.birp.io/v1/me" \
  -H "Authorization: Bearer $BIRP_API_KEY"
200 OKJSON
{
  "data": {
    "company": {
      "base_currency": "MDL",
      "country_code": "MD",
      "id": "00000000-0000-4000-8000-000000000001",
      "name": "Brutaria Exemplu SRL"
    },
    "key": {
      "expires_at": "2027-10-05T00:00:00.000Z",
      "name": "WooCommerce sync",
      "prefix": "EXAMPLE-PREFIX",
      "scopes": [
        "products:read",
        "stock:read",
        "orders:read"
      ]
    },
    "rate_limits": {
      "per_company_per_minute": 1200,
      "per_key_per_minute": 600,
      "window_seconds": 60
    }
  }
}

Read the answer

Field

What it tells you

data.company.id, data.company.name

The company the key belongs to, here Brutaria Exemplu SRL.

data.company.base_currency

The currency a write uses when it names none.

data.company.country_code

The country of the company. Its tax codes follow the rules of that country.

data.key.name, data.key.prefix

The key as the key list shows it, here "WooCommerce sync".

data.key.scopes

What the key may read and write. See Scopes.

data.key.expires_at

When the key stops working, or null when it never expires.

data.rate_limits

Requests allowed per minute, for this key and for all keys of the company. See Rate limits.

List your first products

With a key that has products:read, ask for the first five products.

GET /v1/products
curl "https://api.birp.io/v1/products?limit=5" \
  -H "Authorization: Bearer $BIRP_API_KEY"

Lists come in data, with meta for the next page. Pagination and filtering explains how to read every page.

What can go wrong

Answer

Cause

Fix

401 api_key_missing

No Authorization header.

Send Authorization: Bearer and the key.

401 api_key_invalid

The key is incomplete or mistyped.

Copy it again from where you stored it.

403 api_access_disabled

API access is not enabled for the company.

Ask BIRP support to enable it.

403 insufficient_scope

The key lacks the scope of the operation.

Create a key with that scope.

  • me-and-tax-codes
  • pagination-and-filtering
  • errors-overview