Developers

Build on Halycon with a clean REST API.

Pull customers, leases, invoices, payments and more into your data warehouse, general ledger, BI tools or core banking system. Versioned, read-only, and secured with scoped keys.

# List active leases
curl "https://{your-halycon-domain}/api/public/v1/leases?status=active" \
  -H "Authorization: Bearer $HALYCON_KEY"

// 200 OK
{
  "data": [ { "id": "9c1e…", "status": "active", … } ],
  "pagination": { "page": 1, "per_page": 25, "total": 412 }
}

Overview

The Halycon REST API gives your systems read access to the records your teams create in Halycon. It uses standard HTTPS requests and JSON responses.

Base URLhttps://{your-halycon-domain}/api/public/v1
Formatapplication/json
MethodsGET
AuthBearer hk_…

Your base URL is your Halycon environment's domain. We give it to you during onboarding, when API access is enabled.

Quickstart

  1. Create a key. An administrator creates an API key in Halycon settings and chooses its scopes, such as leases:read. The key is shown once; store it in your secrets manager.
  2. Make a request. Send the key as a bearer token to any resource you have a scope for.
  3. Page through results. Use page and per_page until page reaches total_pages.

Authentication

Every request needs an API key in the Authorization header. Keys start with hk_ followed by 48 hexadecimal characters.

Authorization: Bearer hk_3f9a…
  • Scoped: each key lists the resources it may read, for example invoices:read.
  • Stored as a hash: Halycon never stores the key itself, so it can't be recovered, only replaced.
  • Expiry and revocation: keys can expire on a date and can be revoked instantly.
  • Origin allow-list: if a key is used from a browser, the request's origin must be on the key's allow-list.

API explorer

Build a request and see the code and an example response. Responses use sample data.

Request
GET

Example response 200 OK

Pagination

List requests return up to 25 records by default. Use per_page (1 to 100) and page (from 1). Every list response includes a pagination object.

{ "page": 2, "per_page": 100, "total": 412, "total_pages": 5 }

Filtering and sorting

Any field a resource returns can be used as an exact-match filter, for example /invoices?status=overdue or /payments?lease_id=…. Sort with order (any returned field, default created_at) and direction (asc or desc, default desc). Unknown parameters are ignored.

Errors

Errors return a JSON body with an error code and a matching HTTP status.

StatusCodeMeaning
401missing_authorizationNo bearer key was sent.
401invalid_keyThe key is malformed or doesn't exist.
401revoked_keyThe key was revoked by an administrator.
401expired_keyThe key passed its expiry date.
403insufficient_scopeThe key lacks the resource's read scope. The response names the scope required.
403origin_not_allowedThe request came from a browser origin not on the key's allow-list.
403global_api_access_not_enabledAPI access hasn't been enabled for your environment yet.
403unsupported_entity_scopeThe key is scoped to an entity or branch, which isn't supported yet.
404unknown_resourceThe resource name isn't recognised. The response lists available resources.
404not_foundNo record with that ID.
400invalid_paginationpage or per_page isn't a positive whole number, or per_page is over 100.

Resources

Each resource supports GET /{resource} to list and GET /{resource}/{id} to retrieve one record. Scope: {resource}:read.

/customersLessees and borrowers.
FieldTypeDescription
iduuidCustomer ID
legal_namestringRegistered name
emailstringPrimary email
phonestringPrimary phone
countrystringCountry code
lifecycle_statusstringLifecycle stage
created_attimestampCreated
/applicationsFinancing applications in origination and credit.
FieldTypeDescription
iduuidApplication ID
customer_iduuidApplicant
stagestringPipeline stage
requested_amountnumberAmount requested
currencystringISO currency
tenor_monthsintegerTerm in months
created_attimestampCreated
/quotesPriced offers issued to customers.
FieldTypeDescription
iduuidQuote ID
customer_iduuidCustomer
amountnumberQuoted amount
currencystringISO currency
term_monthsintegerTerm in months
statusstringQuote status
created_attimestampCreated
/leasesActive and closed lease agreements.
FieldTypeDescription
iduuidLease ID
customer_iduuidLessee
principalnumberAmount financed
currencystringISO currency
statusstringLease status
start_datedateStart
end_datedateEnd
tenor_monthsintegerTerm in months
created_attimestampCreated
/invoicesInstalment and fee invoices.
FieldTypeDescription
iduuidInvoice ID
customer_iduuidCustomer
lease_iduuidLease
amountnumberInvoice amount
currencystringISO currency
statusstringdraft, sent, partial, paid, overdue or void
due_datedateDue date
created_attimestampCreated
/paymentsPayments received and their allocation.
FieldTypeDescription
iduuidPayment ID
lease_iduuidLease
amountnumberAmount received
currencystringISO currency
allocation_statusstringAllocation state
reconciliation_statusstringReconciliation state
referencestringProvider or bank reference
received_attimestampWhen received
created_attimestampRecorded
/assetsFinanced assets and the lease they belong to.
FieldTypeDescription
iduuidAsset ID
serial_numberstringSerial or chassis number
categorystringAsset category
statusstringAsset status
current_lease_iduuidLease it is on
created_attimestampCreated
/suppliersAsset suppliers and dealers.
FieldTypeDescription
iduuidSupplier ID
namestringSupplier name
countrystringCountry code
contact_emailstringContact email
created_attimestampCreated

Connectors

Beyond the API, Halycon connects to provider accounts you already hold. Credentials are stored on the server and each connection is tested when saved.

PaymentsM-Pesa Daraja, Stripe, Paystack, Flutterwave
AccountingXero
E-signatureDocusign
EmailSMTP, SendGrid, Postmark, Resend
TelematicsSamsara
CollaborationMicrosoft 365
All integrations

Good practice

  • Give each integration its own key with only the scopes it needs.
  • Keep keys server-side. Only use a key in a browser with an origin allow-list.
  • Set an expiry date and rotate keys on a schedule.
  • Sync incrementally: sort by created_at and stop when you reach records you already have.
  • Back off and retry on network errors; requests are read-only and safe to repeat.

Versioning

The API is versioned in the path (/v1). New fields and resources can be added to v1. Changes that would break an existing integration ship in a new version.

Need a resource or field that isn't here?Tell us what you're building and we'll show you how.
Talk to us
WhatsApp