Hapee API

Connect your ERP, your store or your internal system to a Hapee subaccount. REST API, JSON, signed webhooks.

What you can do

The API covers the same objects your sales team works with inside Hapee:

ResourceWhat it lets you do
contactsPeople: create, update, search, tag, notes and tasks
companiesCompanies, with validated RUT
dealsDeals: create, move between stages, mark as won or lost
products, pricesCatalog and price lists
quotesQuotes, with their line items and totals
calendars, appointmentsAvailability, scheduling, rescheduling and canceling
custom_objectsYour own objects: invoices, orders, payments
workflowsEnroll a contact in an automation
webhooks, eventsFind out what happens, without polling

The essentials, in five lines

Your first request

curl https://beta.hapee.ai/api/v1/me \
  -H "Authorization: Bearer hp_test_YOUR_CREDENTIAL"

It tells you who you are, which subaccount you operate on, in which mode and with which limits. If this works, everything else works.

{
  "key": { "id": 44, "name": "Mi ERP", "mode": "test", "read_only": false },
  "subaccount": { "id": 91, "name": "Cliente — Sandbox",
                  "timezone": "America/Santiago", "default_currency": "CLP",
                  "sandbox": true, "language": "es" },
  "limits": { "requests_per_minute": 100, "batch_max_items": 100,
              "events_retention_days": 30, "idempotency_window_hours": 24 },
  "api_version": "v1"
}

Finding out what happens

There are two paths and they serve the same events, with the same body:

You can use both, or just one. There is nothing different to configure: you choose based on what your infrastructure allows, not on what you want to receive.

Errors

They all have the same shape, and the code is stable:

{
  "error": {
    "code": "validation_error",
    "message": "El RUT no es válido.",
    "details": [{ "field": "rut", "issue": "invalid_check_digit" }],
    "request_id": "7e3a6a14dfe84d359fc3108b5974f880"
  }
}

Always save the X-Request-Id from the response. It lets us find your exact call in our logs when you contact support.

Versioning

v1 is stable. Adding a field to a response is not a breaking change, so your integration must ignore fields it doesn't recognize. A breaking change ships as v2, and v1 stays alive for at least 12 months after the announcement.

How to get a credential

They are issued by the agency that manages your Hapee account. Ask for an hp_test_ credential first: it points to a test subaccount with fictitious data, so you can develop without touching anything real.

Going to production means changing the credential and the webhook URL. Nothing else: the sandbox and production speak the same API.

Questions, or something that isn't documented? Write to us at info@hapee.ai.