Skip to content

HugeProfit API v2

The v2 API is a clean, integrator-friendly REST interface to HugeProfit: orders, sales, products, stock, clients, shipments, expenses, production and native webhooks. It runs in parallel with the older v1 API — v1 keeps working, v2 is a fresh surface with consistent naming and predictable behaviour.

  • Base URL: https://crm.h-profit.com/bapi-v2
  • Format: JSON in, JSON out — always wrapped in a standard envelope.
  • Auth: a single API key in the Authorization header — see Authentication.

New here? Three steps

  1. Create an API key in the interface — Integration setup.
  2. Call GET /bapi-v2/me to confirm the key works.
  3. Read Conventions, then jump to Resources.

Why v2 (vs v1)

v1 (/bapi) v2 (/bapi-v2)
Field names mixed, internal (mid, prapaid, fnsku) clean & stable (warehouse_id, prepaid, sku)
Response shape varies per endpoint one envelope everywhere
Nested data header/items split one object with a nested items array
Multiple resources many round-trips one composite /query
Webhooks configured, never delivered durable queue, signed, retried

v2 is a bridge: it hides the internal system's quirks behind a stable schema. You should never need to know how the data is stored internally.

Quickstart

# 1. Who am I? (verify the key + see its scopes)
curl https://crm.h-profit.com/bapi-v2/me \
  -H "Authorization: hp_live_your_key_here"

# 2. List recent sales (each sale is one object with a nested `items` array)
curl "https://crm.h-profit.com/bapi-v2/sales?limit=5" \
  -H "Authorization: hp_live_your_key_here"

Every successful response looks like this:

{
  "success": true,
  "data": [ /* ... */ ],
  "meta": { "limit": 5, "offset": 0 }
}

Map of the API

  • Authentication — keys, scopes, the Authorization header.
  • Conventions — envelope, pagination, money/time formats, CORS.
  • Resources — every endpoint: products, sales, orders, clients, …
  • Composite query — fetch many resources (and embed relations) in one call.
  • Webhooks — subscribe to events, verify signatures, retries.
  • Errors — the error envelope and stable error codes.
  • Integration setup — create a key and configure webhooks in the UI.