Nexora

API Documentation

Read-only REST API to integrate Nexora with your business tools. Reserved for Enterprise subscribers.

Read-onlyJSON / RESTEnterprise

Introduction

The Nexora API lets you programmatically access your company data. It follows REST conventions — resources are accessible via clean URLs, responses are in JSON.

Base URL: https://www.nexoramg.com/api/v1

Authentication

Every request must include your API key in the following HTTP header:

X-API-Key: nxr_votre_cle_api
Security: Never share your key. It gives read access to all your company data. If compromised, revoke it immediately from settings.

Get a key

  1. Subscribe to the Enterprise plan
  2. Go to Settings → API Keys
  3. Click "New key" and copy it immediately

Pagination

All list endpoints accept the following parameters:

ParameterTypeDescription
pageintegerPage number (default: 1)
limitintegerResults per page, max 100 (default: 50)

Response format:

{
  "object": "list",
  "data":   [...],
  "total":  142,
  "page":   1,
  "limit":  50
}

Error codes

Code HTTPMeaning
401Missing or invalid API key
403Enterprise plan required or key revoked
404Resource not found
429Too many requests (rate limiting)
500Internal server error

Error body:

{ "error": "Invalid or missing API key" }
GET/api/v1/me

Returns information about the API key used and its associated company.

Example :

curl -H "X-API-Key: nxr_votre_cle" \
  https://www.nexoramg.com/api/v1/me

Response :

{
  "object":  "api_key",
  "keyName": "Intégration Shopify",
  "prefix":  "nxr_a1b2c3d4…",
  "plan":    "ENTERPRISE",
  "company": {
    "id":       "cuid...",
    "name":     "Acme Corp",
    "currency": "EUR",
    "country":  "FR",
    "email":    "contact@acme.com"
  }
}
GET/api/v1/clients

Lists your company's active clients.

Parameters :

pageintegerPage (default: 1)
limitintegerResults per page, max 100 (default: 50)

Example :

curl -H "X-API-Key: nxr_votre_cle" \
  "https://www.nexoramg.com/api/v1/clients?page=1&limit=20"

Response :

{
  "object": "list",
  "data": [
    {
      "id":        "cuid...",
      "firstName": "Jean",
      "lastName":  "Dupont",
      "email":     "jean.dupont@email.com",
      "phone":     "+33612345678",
      "company":   "Dupont SARL",
      "city":      "Paris",
      "country":   "FR",
      "createdAt": "2024-01-15T10:30:00.000Z"
    }
  ],
  "total": 85,
  "page":  1,
  "limit": 20
}
GET/api/v1/invoices

Lists your company's invoices, with optional status filter.

Parameters :

pageintegerPage (default: 1)
limitintegerResults per page, max 100
statusstringDRAFT | SENT | PAID | OVERDUE | CANCELLED

Example :

curl -H "X-API-Key: nxr_votre_cle" \
  "https://www.nexoramg.com/api/v1/invoices?status=SENT&limit=100"

Response :

{
  "object": "list",
  "data": [
    {
      "id":            "cuid...",
      "invoiceNumber": "INV-2024-0042",
      "status":        "SENT",
      "issueDate":     "2024-03-01T00:00:00.000Z",
      "dueDate":       "2024-03-31T00:00:00.000Z",
      "subtotal":      1200.00,
      "taxAmount":     240.00,
      "total":         1440.00,
      "paidAmount":    0.00,
      "paidAt":        null,
      "currency":      "EUR",
      "client": {
        "id":        "cuid...",
        "firstName": "Jean",
        "lastName":  "Dupont",
        "email":     "jean.dupont@email.com"
      }
    }
  ],
  "total": 12,
  "page":  1,
  "limit": 50
}
GET/api/v1/products

Lists the active products and services in your catalog.

Parameters :

pageintegerPage (default: 1)
limitintegerResults per page, max 100

Example :

curl -H "X-API-Key: nxr_votre_cle" \
  "https://www.nexoramg.com/api/v1/products"

Response :

{
  "object": "list",
  "data": [
    {
      "id":          "cuid...",
      "name":        "Consultation stratégique",
      "sku":         "CONS-001",
      "category":    "Services",
      "description": "Session de conseil 1h",
      "unitPrice":   150.00,
      "stock":       null,
      "minStock":    null,
      "isService":   true,
      "currency":    "EUR",
      "createdAt":   "2024-01-10T08:00:00.000Z"
    }
  ],
  "total": 34,
  "page":  1,
  "limit": 50
}
GET/api/v1/orders

Lists your company's orders, with optional status filter.

Parameters :

pageintegerPage (default: 1)
limitintegerResults per page, max 100
statusstringPENDING | CONFIRMED | SHIPPED | DELIVERED | CANCELLED

Example :

curl -H "X-API-Key: nxr_votre_cle" \
  "https://www.nexoramg.com/api/v1/orders?status=CONFIRMED"

Response :

{
  "object": "list",
  "data": [
    {
      "id":          "cuid...",
      "orderNumber": "ORD-2024-0018",
      "status":      "CONFIRMED",
      "createdAt":   "2024-03-05T14:22:00.000Z",
      "subtotal":    800.00,
      "taxAmount":   160.00,
      "total":       960.00,
      "currency":    "EUR",
      "notes":       null,
      "client": {
        "id":        "cuid...",
        "firstName": "Jean",
        "lastName":  "Dupont",
        "email":     "jean.dupont@email.com"
      },
      "items": [
        { "name": "Laptop Pro", "quantity": 2, "unitPrice": 400.00, "total": 800.00 }
      ]
    }
  ],
  "total": 7,
  "page":  1,
  "limit": 50
}
GET/api/v1/finance

Lists financial entries (income and expenses), with filters by type and date range.

Parameters :

pageintegerPage (default: 1)
limitintegerResults per page, max 100
typestringINCOME | EXPENSE
fromstringStart date ISO 8601 (e.g. 2024-01-01)
tostringEnd date ISO 8601 (e.g. 2024-12-31)

Example :

curl -H "X-API-Key: nxr_votre_cle" \
  "https://www.nexoramg.com/api/v1/finance?type=INCOME&from=2024-01-01&to=2024-12-31"

Response :

{
  "object": "list",
  "data": [
    {
      "id":          "cuid...",
      "type":        "INCOME",
      "amount":      2500.00,
      "description": "Prestation client Acme Corp",
      "category":    "Ventes",
      "date":        "2024-03-10T00:00:00.000Z",
      "reference":   "FAC-2024-0042",
      "currency":    "EUR"
    }
  ],
  "total": 48,
  "page":  1,
  "limit": 50
}

Integration examples

JavaScript (fetch)

const API_KEY = 'nxr_votre_cle'
const BASE    = 'https://www.nexoramg.com/api/v1'

async function getInvoices(status = 'SENT') {
  const res  = await fetch(`${BASE}/invoices?status=${status}`, {
    headers: { 'X-API-Key': API_KEY },
  })
  if (!res.ok) throw new Error(`HTTP ${res.status}`)
  return res.json()
}

const { data, total } = await getInvoices('PAID')
console.log(`${total} factures payées`, data)

Python (requests)

import requests

API_KEY = "nxr_votre_cle"
BASE    = "https://www.nexoramg.com/api/v1"
HEADERS = {"X-API-Key": API_KEY}

def get_invoices(status=None, limit=100):
    params = {"limit": limit}
    if status:
        params["status"] = status
    r = requests.get(f"{BASE}/invoices", headers=HEADERS, params=params)
    r.raise_for_status()
    return r.json()

result = get_invoices(status="PAID")
print(f"{result['total']} factures payées")

PHP (cURL)

<?php
$api_key = 'nxr_votre_cle';
$base    = 'https://www.nexoramg.com/api/v1';

function nexora_get($path, $params = []) {
    global $api_key, $base;
    $url = $base . $path . '?' . http_build_query($params);
    $ch  = curl_init($url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, ["X-API-Key: $api_key"]);
    $res = curl_exec($ch);
    curl_close($ch);
    return json_decode($res, true);
}

$invoices = nexora_get('/invoices', ['status' => 'PAID', 'limit' => 50]);
echo $invoices['total'] . ' factures payées';
Nexora Management API v1 — Auto-generated documentation