yAppointment Developers

Make Your First Request

This guide walks you through a simple API call to fetch your company information. It takes 5 minutes.

Prerequisites

The Request

Call the /api/v1/me endpoint to fetch your company profile.

curl -H "Authorization: Bearer yapp_sk_live_YOUR_KEY" \
https://api.yappointment.com/api/v1/me

The Response

All yAppointment API responses use a consistent envelope format:

{
  "status": true,
  "data": {
    "_id": "507f1f77bcf86cd799439011",
    "name": "Acme Salon",
    "email": "contact@acmesalon.com",
    "phone": "+1234567890",
    "address": "123 Main St, New York, NY 10001",
    "timezone": "America/New_York",
    "currency": "USD",
    "createdAt": "2024-01-15T10:30:00Z"
  },
  "meta": {
    "timestamp": 1702650000000,
    "version": "v1"
  }
}

Response Fields

Error Handling

If a request fails, the response includes an error code:

{
  "status": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid API key"
  },
  "meta": {
    "timestamp": 1702650000000
  }
}

Common Status Codes

| Code | Meaning | |------|---------| | 200 | Success | | 400 | Bad Request (missing or invalid parameters) | | 401 | Unauthorized (missing or invalid token) | | 403 | Forbidden (token lacks required scope) | | 404 | Not Found (resource doesn't exist) | | 429 | Too Many Requests (rate limited) | | 500 | Server Error (try again later) |

Next Steps

Now that you've made your first request, explore:

  1. Sandbox Mode — Test against isolated data
  2. API Reference — Browse all available endpoints
  3. Webhooks — Receive real-time booking events

Troubleshooting

Invalid API key error?

CORS error (browser request)?

Rate limit exceeded?