Skip to main content

Code samples

Ready-to-use snippets for the most important operations, in 4 languages (cURL, Node.js, PHP, Python). All examples start from the local Sandbox — adjust the URL once you connect to the real ERP.

TopicPage
Authentication (Logon + Logout)Authentication
Partners (full CRUD)Partners
Articles (CRUD + stock)Articles
Sales documents (order → invoice → receipt)Sales
Delivery notesDelivery

Conventions used in these pages

  • Default URL: http://localhost:4000/NextUpServices/Services/POST/ (Mock Server). For the real ERP change it to http://1.2.3.4:8888/NextUpServices/Services/POST/.
  • Content-Type: text/plain (a NextUp requirement).
  • The token is referred to as the variable $NX_TOKEN (Bash) / process.env.NX_TOKEN (Node) / getenv('NX_TOKEN') (PHP) / os.environ['NX_TOKEN'] (Python).
  • Errors are checked with Result !== false && Error === null — see Error catalog.