API Reference

This document concerns the Upnance API product, where we focus on the technical specifications, including endpoints, attributes, requests and responses, error codes, validation, etc. This document is designed to give you complete information about the API endpoints.

Environments

Upnance offers two environments for integration:

  • Production (Live): real environment, used for providing our services.
  • Staging (Test): test environment, mirroring the logic and functionality of production. Some minor configuration differences might be present in the production environment.

📘

Credentials for access and permission are distributed per environment.

EnvironmentEndpoint
Productionhttps://api.upnance.com/
Staginghttps://api.staging.upnance.com/

Authentication

All the API endpoints use either API-Key or Bearer Authorization header to authenticate the requests and identify your user. The API-Key can be obtained by using the Create Api Key endpoint and the Bearer token can be obtained by using the Login endpoint.

Example of providing your API-Key or Bearer token in the Authorization header.

curl --request GET 'https://api.upnance.com/api' \ --header 'Authorization: API-Key YOUR_API_KEY'
curl --request GET 'https://demo.upnance.com/api/v1' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN'

Pagination

Some of the GET endpoints return paginated results, we offer pagination through URL query parameters.
Pagination allows you to break down results into pages when fetching them via GET request, which speeds up loading time and enables batch processing.

The query parameters to control pagination are:

  • page
  • perPage - defaults to 50, minimum is 1 and the maximum is 50.

📘

The page and perPage query parameters only accept positive integers.

curl --request GET 'https://api.upnance.com/api/foo_bar?page=1&perPage=10'

Example of a paginated response:

{ meta: { total: number count: number perPage number pages: number page: number } data: [...] }