5-Minute First API Call

  • Updated

Use this quick start to make one successful API call to the Juvonno API with `curl`.

 

What You'll Need

  • Your Juvonno subdomain (e.g., `myclinic`)
  • Your API key for header `X-API-Key`.

 

Base URL and Auth

  • Base URL: `https://{subdomain}.juvonno.com`
  • All API endpoints are prefixed with `/api`.
  • Authentication header: `X-API-Key: <your_api_key>`

Example base URL:

`https://myclinic.juvonno.com`

 

First Call (GET branches)

Endpoint: `GET /branches`

This endpoint returns a list of branch (clinic) records.

```bash
SUBDOMAIN="myclinic"
API_KEY="YOUR_API_KEY_HERE"
BASE_URL="https://$SUBDOMAIN.juvonno.com"

curl --request GET "$BASE_URL/api/branches" \
 --header "Accept: application/json" \
 --header "X-API-Key: $API_KEY"
```

 

What Success Looks Like

  • A successful request should return `HTTP 200 OK`.
  • The response body will be JSON.

Example successful response:

```json
[
 {
   "id": 1,
   "code": "MAIN",
   "name": "Main Clinic"
 }
]
```

  • Exact fields may vary by tenant/setup.
  • An empty array (`[]`) can still be a successful response.

 

Common Mistakes

  • Using the wrong subdomain in the URL.
  • Sending the API key in the query string instead of the `X-API-Key` header.
  • Using `http` instead of `https`.
  • Calling endpoints without the `/api` prefix (for example, `/branches` instead of `/api/branches`).

 

Troubleshooting 

If this fails: 

  • Confirm the exact URL format: `$BASE_URL/api/branches` where `BASE_URL=https://{subdomain}.juvonno.com`.
  • Confirm `X-API-Key` is present and has no extra spaces or quotes.
  • Confirm your key is active and allowed to call this API.
  • If you get an error body, the response is typically:
    • `status` (integer)
    • `message` (string)
  • If response is empty (`[]`), your tenant may have no active branches configured.

 

Items to Confirm Before Publication

  • How external developers request or generate API keys
  • Whether an empty array always indicates no active branches configured
  • Whether all API keys are allowed to call this endpoint by default
     

Was this article helpful?

0 out of 0 found this helpful