Nama ERP REST API
Nama ERP has a REST API for creating, reading, updating and deleting records of any entity, and publishes an OpenAPI (Swagger 2.0) description of each entity for third-party systems to build against.
For a fast introduction, watch this video: Nama ERP Rest API Introduction
Looking for the high-level integration picture?
Before diving into the API details, you may want to read Integration Scenarios Between Nama and Other Systems. It frames the four possible integration directions (read/write × Nama/other system), explains which scenarios are free out-of-the-box vs. which require custom development, and lists the questions you should ask the customer before quoting an integration.
API Browser Overview
The API browser is a page on your own server that lists every entity the REST API can read and write, and opens a full reference for any of them: its operations, the fields it accepts, ready-to-copy code samples, and a button that sends a test call to your server. It is usually the first thing to show a developer who is about to integrate with Nama.
Accessing the API Browser
Administrators find it on the Utilities page as Open API Browser. You can also go straight to its address:
http[s]://<server-ip-or-domain>/erp/browseapi/That first page links to two lists:
- Entities API (
/erp/browseapi/browseentitiesapi.html): every entity on the server. This is the page described below. - Special Purpose APIs (
/erp/browseapi/browsespecialpurposesapi.html): APIs built for one integration, such as attendance machine synchronization.

Finding an Entity
The search box at the top is laid out like a request: GET https://<your-server>/erp/rest/v1/ followed by what you type. Type an English name, an Arabic name or the entity ID: SalesInvoice, Customer and فاتورة مبيعات all work, and Arabic spelling variants match each other, so فاتوره finds فاتورة. The line under the box counts the matches and names the best one; press Enter to open it. Press / anywhere on the page to jump back to the search box.
Under the search box, entities are grouped exactly as the main menu groups them (Accounting / Master Files, Basic / Documents and so on), because the list is built from the default menu itself. An entity the menu shows in two places appears in both. The list on the left narrows the page to one top-level menu group and shows how many entities in each group match your search. Entities that have an API but no menu entry are collected at the end under Not in the menu.
Only entities available on this server are listed: modules, features and entities that the license leaves out do not appear.
Each row shows the English name, the Arabic name and the entity ID; click the ID to copy it. Open opens the entity's reference in a new tab.
Using a Real Record as the Example
A reference is much easier to follow when the example body is a real document rather than empty fields. With a record opens a small panel under the row: type the code or ID of a saved record and choose Open with this record, and the reference shows that record's data as the example. Leave the box empty to use the first saved record that is not a draft. Data model next to it opens the entity's page on the data model site.

Choosing Scalar or Swagger UI
Two viewers can show an entity's reference, and Open references in at the top of the page chooses between them:
- Scalar (the default) shows the operations on the left, their descriptions in the middle, and code samples on the right in curl, Python, Node.js, PHP, Ruby and more. Test Request sends the call to your server from the page.
- Swagger UI is the classic interactive page; Try it out on each operation sends the call.
Both read the same description and call the same server, so pick whichever you prefer. Your browser remembers the choice, so the page opens with the same viewer next time, and the Special Purpose APIs list follows it too.

Nothing leaves your server
Both viewers are installed with Nama ERP. They load nothing from the internet and send your API key only to your own server, so they work on servers without internet access.
To call an operation from either viewer, give it your API key first: Authorize in Swagger UI, or the authentication box at the top of the Scalar page. See How to Generate an API Key.
OpenAPI JSON Specifications
Basic OpenAPI Endpoint
http[s]://<server-ip-or-domain>/erp/browseapi/openapi/{EntityName}.jsonOpenAPI with Example Data
http[s]://<server-ip-or-domain>/erp/browseapi/openapi/{EntityName}.json?exampleCode={code}Parameters:
{EntityName}: The entity type (e.g., SalesInvoice, Customer, Item){code}: Optional - specific record code or UUID to use as example
Special Example Codes:
Find@First: Uses the first record that is not a draft as example- Any valid business code or UUID from your system
Example URLs
# Get SalesInvoice OpenAPI spec with first available record
http://localhost:8080/erp/browseapi/openapi/SalesInvoice.json?exampleCode=Find@First
# Get Customer OpenAPI spec with specific customer
http://localhost:8080/erp/browseapi/openapi/Customer.json?exampleCode=CUST001
# Get Item OpenAPI spec without examples
http://localhost:8080/erp/browseapi/openapi/Item.jsonAPI Response Structure
The OpenAPI specification includes detailed schema definitions for each entity:
Field Types Mapping
- String Fields: Text, BigText, Date, DateTime, Time, Email, Color, LatLng, Enum
- Number Fields: Decimal, Integer
- Boolean Fields: Boolean type fields
- Reference Fields: Returns the referenced entity's code
- Generic References: Object with
entityTypeandcodeproperties - Attachment Fields: Objects — read as
{"id", "fileName", "size"}, written on save as{"uploadId": ...}or{"url": ...}, or removed with the string"remove-attachment"— see Uploading and Attaching Files - Collections/Details: Arrays of objects (e.g., invoice lines, payment details)
Excluded Fields
The API automatically excludes:
- System fields, calculated fields and internal user tracking fields, unless
responseFieldsnames them - Fields whose value is empty or zero
- The contents of binary fields (images, documents) from read responses — an attachment field comes back as its id, file name and size instead, and can be written on save; see Uploading and Attaching Files
- Fields the key's user cannot see — see Field Settings and Approval Locks in the API
Working with Entity Collections
Many entities include detail collections (one-to-many relationships). A sales invoice's lines, for example, are its details collection; each line nests the item, the quantity and the price as objects:
{
"details": {
"type": "array",
"items": {
"properties": {
"item": {
"properties": {
"item": { "type": "string" }
}
},
"quantity": {
"properties": {
"quantity": {
"properties": {
"primeQty": {
"properties": {
"value": { "type": "number" },
"uom": { "type": "string" }
}
}
}
}
}
},
"price": {
"properties": {
"unitPrice": { "type": "number" }
}
}
}
}
}
}Collections represent detail records like:
- Invoice lines
- Payment lines
- Order items
- Journal entry lines
API Authentication & Access
Authentication Methods
Nama ERP REST API supports two authentication methods:
1. API Key Authentication (Recommended)
API Keys are the primary authentication method for production integrations.
Header-based Authentication:
X-API-Key: {your-api-key}The standard bearer form works just as well, and is what most API tooling and AI clients send by default — put the same key (the credential's Client Secret) in the token:
Authorization: Bearer {your-api-key}Bearer tokens need release 20260922 or later
Authorization: Bearer is read only by servers from release 20260922 onwards. An older server ignores the header and rejects the call as unauthenticated — send X-API-Key instead.
Credentials configured with a separate client ID and secret send both headers — the client ID in X-API-Key and the secret in X-API-Secret:
X-API-Key: {your-client-id}
X-API-Secret: {your-client-secret}Header name compatibility
X-API-Key / X-API-Secret are the recommended header names, but the legacy names remain supported: apiKey (or clientId) for the key and clientSecret for the secret. Every name is accepted as either an HTTP header or a query parameter. The key is read from X-API-Key (and its legacy names) first; Authorization: Bearer is consulted only when none of them came with the request.
Query Parameter Authentication (Testing Only):
http://localhost:8080/erp/browseapi/openapi/SalesInvoice.json?X-API-Key={your-api-key}WARNING
Query parameter authentication should only be used for testing in the API Browser. Production integrations must use header-based authentication for security.
2. Session-based Authentication
For browser-based testing, you can use session cookies from a logged-in user session.
How to Generate an API Key
The system administrator can generate API keys using the API Credentials master screen:
- Open the API Credentials screen (Basic → Documents → API Credentials)
- Create a new record with:
- Code: Unique identifier for this API credential
- Name: Descriptive name for the integration
- Select the User whose permissions will apply to this key
- Save the record
- Important: The API Key displays once after saving—copy it immediately
- Provide the key securely to the development/integration team
Permission Inheritance
The API Key inherits all access permissions from the selected user:
- Entity access rights
- Module permissions
- Data visibility rules
- Company/branch restrictions
Each record belongs to its user
An API Credentials record belongs to the user in its User field. An administrator sees and manages everyone's records; any other user sees only their own, and an empty User is filled with whoever saves the record. Saving a record that names somebody else, as a non-administrator, is refused with You can only create or edit records that belong to you (English only — it has no Arabic translation).
Viewing API Keys After Creation
To view an API Key again after initial creation:
- Open the API Credentials record
- Check "View API Key" option
- Click Save
- The API Key will display on screen
Audit Trail
Re-exposing an API key is logged in the audit trail for security tracking.
API Key Best Practices
- Create separate keys for different integrations
- Use descriptive names to identify each integration
- Assign minimal permissions needed for each integration
- Rotate keys periodically for security
- Monitor API usage through audit logs
- Revoke unused keys to minimize security risks
CORS Configuration
The REST API and the API browser answer every request with CORS headers that allow any origin, any method and any header (Access-Control-Allow-Origin: *), and they answer preflight OPTIONS requests. A page served from another domain can therefore call the API from the browser, as long as it sends a valid key.
Nama has no setting that narrows these headers to particular domains.
REST API Endpoints
Base URL Structure
http[s]://<server>/erp/rest/v1/{entity}/{operation}/{idOrCode}Path Parameters:
{entity}: Entity type name (e.g., Customer, SalesInvoice, Item){operation}: Operation to perform (findByIdOrCode, list, save, delete){idOrCode}: Optional - Entity UUID or business code
HTTP Methods Support
The API supports multiple HTTP methods for flexibility:
| HTTP Method | Supported Operations | Usage |
|---|---|---|
| GET | findByIdOrCode | Retrieve single entity by ID/code |
| POST | All operations | Universal method for all operations |
| PUT | save | Update existing entities |
| DELETE | delete | Remove entities |
RESTful Flexibility
While the API supports RESTful conventions, all operations can be performed using POST method for compatibility with various client implementations.
Supported Operations
1. Retrieve Entity (GET)
GET /erp/rest/v1/{entity}/findByIdOrCode/{idOrCode}
X-API-Key: {api-key}
responseFields: code,name1,contactInfo.email # Optional header/parameterBatch Retrieval:
POST /erp/rest/v1/{entity}/findByIdOrCode
X-API-Key: {api-key}
Content-Type: application/json
["CUST001", "CUST002", "550e8400-e29b-41d4-a716-446655440000"]2. List Entities with Pagination (POST)
POST /erp/rest/v1/{entity}/list
X-API-Key: {api-key}
Content-Type: application/json
{
"startPage": 1, # 1-based page number
"pageSize": 25, # Max 1000 records per page
"textCriteria": "status,Equal,Active,AND;city,Equal,Riyadh,AND;",
"orderBy": "creationDate:desc,code"
}Response includes:
totalRecordsCount: Total matching recordsrecords: An object keyed by entity type, whose value is the array of this page's records —"records": {"Customer": [ ... ]}records_count: Number of records in response
startPage counts from 1 and defaults to 1. pageSize defaults to 25, and a value above 1000 is cut to 1000. The request must carry a JSON body with Content-Type: application/json, even when it is only {}.
3. Create/Update Entity (POST/PUT)
POST /erp/rest/v1/{entity}/save
X-API-Key: {api-key}
Content-Type: application/json
{
"Customer": [
{
"code": "CUST001",
"name1": "Customer Name",
"contactInfo": {
"email": "customer@example.com",
"mobile": "+966501234567"
}
}
]
}The body is always an object whose key is the entity type and whose value is an array of records, even for a single record. A bare record object, or a bare array of records, is not accepted. One request can carry several records:
{
"Customer": [
{ "code": "CUST001", "name1": "Customer 1" },
{ "code": "CUST002", "name1": "Customer 2" }
]
}A record whose code or id already exists is updated; otherwise a new record is created. Send updateRecord: false for a request that may only create, or addRecord: false for one that may only update. These and the other save options go in request headers or query parameters, and are listed with their defaults under Import Options.
A document's lines are sent inside the record, in its collection — for a sales invoice:
{
"SalesInvoice": [
{
"details": [
{
"item": { "item": "ITEM001" },
"quantity": { "quantity": { "primeQty": { "value": 5 } } },
"price": { "unitPrice": 100 }
}
]
}
]
}Response:
{
"saved_records_count": 1,
"saved_records": {
"Customer": [
{
"code": "CUST001",
"id": "550e8400-e29b-41d4-a716-446655440000"
}
]
}
}4. Delete Entity (DELETE)
DELETE /erp/rest/v1/{entity}/delete/{idOrCode}
X-API-Key: {api-key}Batch Deletion:
POST /erp/rest/v1/{entity}/delete
X-API-Key: {api-key}
Content-Type: application/json
["CUST001", "CUST002", "550e8400-e29b-41d4-a716-446655440000"]Response:
{
"deleted_records_count": 2,
"deleted_records": ["CUST001", "CUST002"],
"failed_records_count": 1,
"failed_records": [
{
"entityType": "Customer",
"code": "550e8400-e29b-41d4-a716-446655440000",
"indexInRequest": 2,
"errors": [
{
"message": {
"arabicText": "...",
"englishText": "..."
}
}
]
}
]
}Each entry of errors carries its text in a message object with arabicText and englishText. indexInRequest is the record's position in the request: it counts from 0 in findByIdOrCode and delete responses, and from 1 in save responses.
Field Settings and Approval Locks in the API
A key works with the permissions of its user, and that includes the user's Field Settings: the rows on their security profile and user record that make a field Disabled or InVisible, or prevent adding or deleting grid lines. The rows are matched against each record: a record the request is about to create counts as New, a draft as Draft, and a committed record as Edit.
Reading. findByIdOrCode, list and the records returned after a save leave out every field that is InVisible for the record. It is left out entirely, not sent as null. When responseFields names a hidden field one by one on findByIdOrCode or list, the request fails instead:
You are not allowed to view the field {0} — «غير مسموح لك بعرض الحقل {0}»
id and code never fail the request; they are simply left out when hidden. The responseFields of a save never fail it either, because the record is already saved by then: a hidden field named there is left out of the response.
Filtering and sorting. list fails with the same message when textCriteria or orderBy uses a field the user cannot see — a filter on a hidden field would reveal its values. A list mixes drafts and committed records, so a field hidden for either of them counts as hidden here.
Saving. save treats the body exactly as Import Records treats a sheet. A field the user may not change — one their Field Settings make Disabled or InVisible for the record, or one the record's current approval step locks — is skipped by default. Its value in the body is ignored, the field keeps its current value (or its default, on a new record), and the rest of the record is saved. That happens whether or not the value differs. The record counts as saved and appears under saved_records, and the response adds a fields_left_unchanged array with one entry per record that lost fields:
{
"saved_records_count": 1,
"saved_records": {
"Customer": [
{
"code": "CUST001",
"id": "550e8400-e29b-41d4-a716-446655440000"
}
]
},
"fields_left_unchanged": [
{
"entityType": "Customer",
"code": "CUST001",
"indexInRequest": 1,
"fields": ["paymentPeriod"],
"message": "The following fields were left unchanged because you are not allowed to change them: paymentPeriod"
}
]
}fields lists the field ids that were ignored, and indexInRequest is the record's position in the request, counting from 1. The message is always in English.
When the Global Config option Reject Imports Containing Fields The User Cannot Change (Security and Login) is on, such a record fails instead and is listed under failed_records with the reason, whatever the value of the field. Lines added to or removed from a grid where that is prevented, by Field Settings or by the approval step, always fail the record, whatever the option. A value written as evalsql(...) works only for a user with Full Authority. The messages are listed in Messages you may see on the import page.
So build integrations to send only the fields they are meant to change, and have them read fields_left_unchanged. A client that reads a record, edits one field and sends the whole record back still gets its edit saved, but a field it changed and was not allowed to change is quietly kept as it was unless the client checks that array. On a server where the option is on, the same client fails as soon as the record holds a field its user cannot change.
Uploading and Attaching Files
A save request is JSON, and JSON carries text — so a PDF of a signed contract or a scanned commercial registration cannot simply be put in it. Instead, an attachment field takes a small JSON object that tells the server where to get the file. There are two forms:
| Value | Meaning |
|---|---|
{"uploadId":"<fileId>"} | A file you sent beforehand to the upload endpoint, which answered with that fileId |
{"url":"<http or https address>"} | The server downloads the file itself from that address |
Either form may also carry "fileName", the name to store the file under. It wins over the name the file was uploaded with or the name taken from the address.
A few values deserve a word:
- Both
uploadIdandurlin one object fails that record — give one or the other. - An object with neither is ignored, and the record keeps the attachment it already has. That is deliberate: a read returns an attachment as
{"id":...,"fileName":...,"size":...}(see Reading attachment fields), so a record you read, change elsewhere and send back as it came leaves its attachments alone. - The string
"remove-attachment"removes the attachment the record has, just as removing it on the screen does: the stored file is deleted too. On a record with no attachment it changes nothing. See Removing an attachment. - An empty value —
""ornull— is ignored like a field left out, and the attachment stays. Only"remove-attachment"removes one, so a record sent with the field blank never loses its file by accident. - Any other plain string — a file path on your machine or on the server, such as
C:\docs\contract.pdf, or anything else — is not accepted. It fails that record with a message, in English whatever the caller's language, that beginsAn attachment is given as an objectand spells out the two object forms.
Release 20261007 or later
Writing attachment fields through the save endpoint, and the upload endpoint below, exist only on servers from release 20261007 onwards.
Finding the attachment field's id
Attachment fields are listed in the entity's OpenAPI/Swagger schema like any other field. Their type is object, with the properties uploadId, url and fileName — that is how you tell them apart from ordinary fields. The customer master file, for example, has an attachment field with the id attachment.
Option 1: upload the file, then save
Uploading is a two-step job: send the file, then save the record that points at it.
Step 1 — upload. Send the file to the upload endpoint, authenticated with the same API key as every other call, as multipart/form-data with one file part:
POST http[s]://<server>/erp/rest/v1/upload
X-API-Key: {api-key}
Content-Type: multipart/form-dataWith curl:
curl -X POST "https://<server>/erp/rest/v1/upload" -H "X-API-Key: <api-key>" -F "file=@invoice-1001.pdf"The server answers with the id it gave the file:
{"fileId":"..."}Step 2 — save. Put that id in the attachment field as uploadId:
POST /erp/rest/v1/Customer/save
X-API-Key: {api-key}
Content-Type: application/json
{"Customer":[{"code":"CUST001","attachment":{"uploadId":"<fileId>"}}]}Upload shortly before you save
An uploaded file is held in the server's temporary storage until a save picks it up. It does not survive a server restart, so upload right before the save that uses it rather than uploading a batch of files in advance.
Option 2: let the server fetch the file
When the file already sits at a web address the server can reach, skip the upload and give the address — here with a fileName as well, so the attachment is stored under a clearer name than the one in the address:
{"Customer":[{"code":"CUST001","attachment":{"url":"https://files.example.com/contracts/cust001.pdf","fileName":"cust001-contract.pdf"}}]}The server downloads the file during the save, under these rules:
- Only
httpandhttpsaddresses. - No addresses inside the server's own network. The server refuses an address that points at the server itself or at a link-local address, and — unless
import-url-allow-private-network=trueis set innama.properties— an address on a private network. This stops a save request from being used to pull files off internal machines the caller could not otherwise reach. - Size limit of 50 MB by default; change it with the
import-url-max-file-size-mbproperty innama.properties. - Up to 5 redirects are followed.
- The file name, when
fileNameis not given, is taken from the response'sContent-Dispositionheader, or failing that from the last part of the address path.
A refused or failed download fails that record, with a message (in English only) naming the address and the reason.
Removing an attachment
Give the attachment field the string "remove-attachment" instead of an object:
{"Customer":[{"code":"CUST001","attachment":"remove-attachment"}]}The record keeps everything else and loses its attachment; the stored file is deleted, as when a user removes it on the screen. Capital letters and surrounding spaces do not matter. An empty string or null does not remove anything — it leaves the attachment as it is.
Release 20261110 or later
Removing an attachment this way works only on servers from release 20261110 onwards. An older server treats "remove-attachment" as any other plain string and fails the record.
Reading attachment fields
Read responses — a single record, or a list — show an attachment field as a short description of the file, never its contents:
"attachment": {"id": "...", "fileName": "cust001-contract.pdf", "size": 48213}size is in bytes. An empty attachment field has no description. Because an object without uploadId or url is ignored on save, this description can travel back in a save request unchanged without touching the stored file.
Trying it from the API Browser
Each entity's reference, in Scalar or Swagger UI, carries an Attachments section with the upload operation, which you can try directly from the page: pick a file, send the request, and copy the fileId from the answer into {"uploadId":"..."} in the body of the save operation. The save operation's own description repeats the two object forms.
Testing APIs
Using the API Browser for Testing
The API Browser provides multiple ways to test APIs:
1. Direct OpenAPI JSON Access
# Get the OpenAPI spec with examples
curl -H "X-API-Key: {api-key}" \
"http://localhost:8080/erp/browseapi/openapi/Customer.json?exampleCode=Find@First"2. Import to Postman
- Copy the OpenAPI JSON URL
- In Postman: Import → Link → Paste URL
- Add API Key to collection authentication
- Test all CRUD operations
3. Interactive Reference
Open the entity from the API browser and send requests from its reference page: Test Request in Scalar, Try it out in Swagger UI.
Error Handling
Common Response Codes
- 200 OK: The request was handled. On
saveit means at least one record was saved; the records that failed are listed underfailed_recordsin the same response. - 400 Bad Request: On
save, no record was saved. OnfindByIdOrCode,listanddelete, nothing was found or deleted, or one of the requested records was refused. - 401 Unauthorized: The API key is missing, invalid, not yet valid, expired or prevented from login, or its user is not authorized for the operation.
- 500 Internal Server Error: An unexpected server-side error.
The API never answers 201, 403 or 404. A code or id that does not exist is reported inside the body, under failed_records.
Error Response Format
A record that fails inside a save, findByIdOrCode or delete request is listed under failed_records with its errors. When the whole request fails, with an invalid key for example, the body is a single failure object:
{
"failureOccurred": true,
"errors": [
{
"message": {
"arabicText": "...",
"englishText": "Invalid API key"
}
}
]
}The object can also carry errorType, log and warning.
Messages you may see
These are the refusals of the key itself. All of them answer 401, and none has an Arabic translation, so they show in English whatever the language.
| Message | Why | What to do |
|---|---|---|
| Invalid API key | The key sent matches neither the Client Id (Can Be Ignored) nor the API Key (Client Secret) of any saved API Credentials record. | Copy the key again from the API Credentials record (tick View API Key and save to show it). |
| Invalid API secret | X-API-Key holds the record's Client Id, and X-API-Secret is not the secret of that record. | Send the record's own secret, or send the secret alone in X-API-Key. |
| Your API key can be used only after {0} | Valid from on the record is a later date than today. | Change Valid from, or wait for that date. |
| Your API key expired on {0} | Valid to on the record is before today. | Extend Valid to. |
| The provided API key is prevented from login | Prevent Login (Includes POS, Apps, and All Other System Components) is ticked on the record. | Untick it. |
Special Purpose APIs
Beyond the entity operations, the Special Purpose APIs list of the API browser holds one API:
Attendance Machine Integration
- Name in the list: Attendance Machine Cron. Its description is served at
/erp/browseapi/openapi/attcron-open-api-template.json - Purpose: the two calls the attcron agent makes, one to fetch its Attendance Machine Config and one to deliver the punches it collected
Performance Considerations
Field Selection
Control which fields are returned to optimize payload size:
GET /erp/rest/v1/{entity}/findByIdOrCode/{code}
responseFields: code,name1,status,balanceUsing responseFields parameter:
- Pass as HTTP header:
responseFields: field1,field2,field3 - Or as query parameter:
?responseFields=field1,field2,field3 - Supports nested fields:
contactInfo.email,address.city - When it is not specified,
findByIdOrCodeandlistreturn every field of the record that has a value and that the key's user may see, except system, calculated and user tracking fields;savereturnscode,id
Query Criteria & Sorting
Use Nama ERP's structured text criteria format for filtering and sorting:
{
"textCriteria": "code,StartsWith,INV,AND;status,Equal,Active,AND;balance,GreaterThan,1000,AND;",
"orderBy": "status,creationDate:desc,code:asc"
}Text Criteria Format: Each condition follows the pattern: fieldID,operator,value,logic;
Example Criteria:
code,StartsWith,01,AND;
name1,Contains,abc,AND;
date1,Equal,06-07-2025,AND;
creationDate,GreaterThanOrEqual,2025-07-06T13:05:00.000,AND;
amount,GreaterThan,1000,AND;
status,Equal,Active,OR;
type,In,Type1|Type2|Type3,AND;Supported Operators:
- Equality:
Equal,NotEqual - Comparison:
GreaterThan,GreaterThanOrEqual,LessThan,LessThanOrEqual - Text Matching:
StartsWith,NotStartsWith,EndsWith,NotEndWith,Contains,NotContain - List Operations:
In,NotIn - Grouping:
OpenBracket,CloseBracket
Logical Relationships:
AND- All conditions must matchOR- At least one condition must match
Field Value Formats:
- Date Fields:
dd-MM-yyyy(e.g.,06-07-2025) - DateTime Fields:
yyyy-MM-ddTHH:mm:ss.SSS(e.g.,2025-07-06T13:05:00.000) - Reference Fields:
id:entityType:codeor use.id/.codesuffix- Example:
customer.id,Equal,ffff0001-79e2-11f2-8800-0000ff79c2dd,AND; - Example:
customer.code,Equal,CUST001,AND;
- Example:
Building Criteria
Use the Criteria Definition screen in Nama ERP to visually build filter conditions, then click Convert To Text to get the text representation for API use.
Order By Format
Specify sort order for one or multiple fields using comma-separated values:
Format: fieldName:direction,fieldName2:direction,fieldName3
Examples:
- Multiple fields:
"orderBy": "code:desc,name1,creationDate:asc" - Single field:
"orderBy": "code:asc" - Default direction (ascending):
"orderBy": "name1,code" - Mixed directions:
"orderBy": "status,creationDate:desc,code:asc"
Direction Values:
:asc- Ascending order (A-Z, 0-9, oldest to newest) - default if omitted:desc- Descending order (Z-A, 9-0, newest to oldest)
Notes:
- Direction is optional; when omitted, defaults to ascending (
:asc) - Multiple fields are separated by commas
- Each field can have its own sort direction
- Duplicate fields are automatically filtered out
Import Options
Fine-tune import behavior with request headers:
| Parameter | Default | Description |
|---|---|---|
saveAsDraft | false | Save without validation rules |
addRecord | true | Allow creating new records |
updateRecord | true | Allow updating existing records |
addToCurrentLines | false | Append to existing detail lines instead of replacing |
trimExtraSpaces | false | Remove leading/trailing whitespace |
continueOnErrors | true | Continue processing remaining records on error |
useUserDimension | true | Apply user's dimension filters |
ignoredUnFoundRefs | false | Skip validation of reference fields |
responseFields | code,id | Fields returned for each saved record |
Troubleshooting
Common Issues and Solutions
API Key Not Working
- Verify key is active in API Credentials screen
- Check user permissions for the entity
- Ensure the
X-API-Keyheader (andX-API-Secretwhen using a client ID/secret pair) is set correctly — or, if the client sendsAuthorization: Bearer, that the server is on release 20260922 or later
Empty Example Data
- Verify records exist for the entity
- Check user data visibility permissions
- Use
Find@Firstto get the first record that is not a draft
Missing Fields in Response
- System and calculated fields are left out unless
responseFieldsnames them - Fields that are empty or zero are left out
- File contents are not included in API responses — an attachment field returns only its id, file name and size (and can be written — see Uploading and Attaching Files)