FAQ & Troubleshooting
Frequently asked questions
Why do I get an empty response when I call the ERP directly?
Most likely you sent Content-Type: application/json. NextUp requires Content-Type: text/plain on the POST endpoint. Change the header and the call will work. Detail: see About the NextUp API § the Content-Type note.
Can I call the ERP directly from the browser with fetch / jQuery?
No — NextUp does not send CORS headers, so the browser will block it. You always need a server-side proxy. Our Swagger UI is exactly that proxy.
The token expires — how do I handle that in an SDK?
See the recommended pattern in Authentication § Algorithm. In short: cache the token, retry at most once on ... expirat ..., and avoid re-auth loops.
Why do I get Stoc insuficient even though I have stock?
Three possible causes:
ReservedQuantityis subtracted from the available stock. CheckQuantity - ReservedQuantityinGetAllStocksForArticles.- Wrong
WarehouseId— the stock exists in another warehouse. Check withGetStocksForArticleByCode. - Wrong
ArticleCode— a different article.
Can I create a partner with an already-existing fiscal code?
Yes, NextUp does not enforce uniqueness on the fiscal code, only on Code. If you want uniqueness on the fiscal code, validate client-side with GetAllPartners and a .find() before AddPartner.
How does multi-company work?
A token is bound to one company (Database). To work with several companies in parallel, keep a (Database) → Token cache. See Authentication § Multi-company.
Can I call operations without a token (quick test)?
Only GetAuthenticationToken and (in the mock) the operational endpoints (/health, /info, etc.). All the rest require a token. In the mock you can set ENFORCE_TOKEN=false in .env to accept any token.
How do I send an image to UpdateArticlePicture?
Encode it as base64 and include it in Params.Picture. Mind the proxy's 5MB limit (configurable in server/index.js).
PIC=$(base64 -i photo.jpg | tr -d '\n')
curl -X POST http://localhost:4000/NextUpServices/Services/POST/ \
-H "Content-Type: text/plain" \
-d "{\"AuthenticationToken\":\"$NX_TOKEN\",\"Method\":\"UpdateArticlePicture\",\"Params\":{\"Code\":\"0000001\",\"Picture\":\"$PIC\"}}"
How do I generate SDKs from the OpenAPI spec?
# Java
openapi-generator-cli generate -i openapi.yaml -g java -o ./sdk-java
# Python
openapi-generator-cli generate -i openapi.yaml -g python -o ./sdk-python
# TypeScript Axios
openapi-generator-cli generate -i openapi.yaml -g typescript-axios -o ./sdk-ts
The openapi.yaml spec is available:
- Locally:
sandbox/swagger-ui/spec/openapi.yaml - Served:
http://localhost:3000/openapi.yaml(and JSON at/openapi.json) - In production:
https://sandbox.nextup.ro/openapi.yaml
Can I run Swagger UI and the Mock on other ports?
Yes, change PORT in each .env. Then update CORS_ORIGINS in the mock and NEXTUP_MOCK_BASE_URL in swagger-ui so they can find each other.
Is there rate-limiting?
No, neither on the Mock nor on the real ERP (NextUp). Our recommendation: limit yourself to max 10 req/sec so as not to congest the ERP in production.
Can I call GET instead of POST?
Yes, but only for quick debugging from the browser. The URL limit is 2048 characters (IE) / 8KB (Chrome). For order payloads with many lines, use POST. See About the API § consumption modes.
Troubleshooting
"ENETUNREACH 1.2.3.4:8888"
The proxy cannot see the ERP. Check:
# 1. Does the machine respond?
ping 1.2.3.4
# 2. Does the port respond?
curl -v telnet://1.2.3.4:8888 2>&1 | head -5
# 3. Is NextUp started?
# On the ERP machine: Utilitare -> Servicii WEB -> Panou de control -> must show "Pornit"
To keep working without the ERP: switch to mock in Swagger UI.
"Workspace still starting" in the terminal
This only appears in our development sandbox, not on your machine — ignore it.
Docker Compose: open //./pipe/dockerDesktopLinuxEngine: The system cannot find the file specified
Docker Desktop is not running. Open Docker Desktop from the Start Menu, wait for "Docker is running", then retry. Alternative: run mock + swagger-ui via npm start in two terminals.
"the attribute version is obsolete"
A benign warning from modern docker-compose.yml. We removed it in the current version. If you still see it, do a git pull or delete the version: "3.9" line at the top of docker-compose.yml.
The token comes back null
The GetAuthenticationToken call failed. Check:
Content-Type: text/plain(notapplication/jsondirectly to the ERP)- Correct credentials (User/Pass/Database)
- The ERP is started
- The trailing slash after
POSTin the URL:/NextUpServices/Services/POST/(with the slash, not without)
Result === false but Error is null
A rare case. It means the ERP evaluated the operation as a failure but did not generate a message. Check the NextUp log (Utilitare → Servicii WEB → Log). In your SDK, treat this case as an unknown error.
"Headers already sent" in the proxy
The connection with the upstream closed before completion. Check UPSTREAM_TIMEOUT_MS in .env (default 30000 ms). For heavy operations (for example ExportSaleInvoices with a large range), increase it to 120000.
CORS denied by the mock
Your tab's origin is not in the whitelist. Add it to CORS_ORIGINS (CSV) in mock-server/.env:
CORS_ORIGINS=http://localhost:3000,http://localhost:5173,https://app.example.com
Business-specific problems
"Wrong fiscal address" on AddPartner with TaxAttribute: RO
TaxAttribute: 'RO' means VAT payer. Make sure you also filled TaxCode (the fiscal code) with a valid code, otherwise the ERP will reject it.
The document does not appear in the nomenclature after Add*
In the mock this is normal — data is in-memory and lost on restart. In the real ERP, check:
- The transaction did not internally roll back (NextUp log).
- The user has permissions on the document series.
- The NextUp client application is not open on the same entity (lock).
Wrong partner balance after PayDocumentsWithReceipt
Make sure ReceiptId and DocumentIds belong to the same partner. NextUp allows it and does not report the mistake if the partners differ, but the balances will be computed incorrectly.
Support contact
For problems not listed here, contact the NextUp team.
More at nextup.ro/contact. For NextUp ERP problems in production, contact the NextUp internal team.