تخطَّ إلى المحتوى

Sandbox access

هذا المحتوى غير متوفر بلغتك بعد.

The sandbox is a company of its own on SLFLO, Nile Fresh (sandbox), holding the Nile Fresh day: a distributor’s day played through the real console and phone, so every document in it was made the way your customers’ documents will be. It runs in ERP mode API (GET /me shows it as data.company.erp_mode). Each developer gets an integration client of their own on it, Sandbox - your name, holding every scope.

Its token is an ordinary token of that company: it starts with sfi_live_, like every token the console issues. “Sandbox” is the company, not the token — nothing in it is a real customer’s.

One day, Africa/Cairo time, for four shops on one van round (Omar’s, REP-03, VAN-03). Two shops are visited; the other two stops are skipped at the end of the day.

Feed Documents
/orders SO-000001 — Nile Market, van sale, 1,368.00, DELIVERED. SO-000002 — Delta Kiosk, pre-sale held over its credit limit, approved by the supervisor and delivered from the warehouse, 456.00, DELIVERED.
/invoices INV-000001 (seq 1) for SO-000001, 1,368.00. INV-000002 (seq 2) for SO-000002, 456.00.
/payments RC-000001 — 700.00 cash from Nile Market. RC-000002 — a post-dated cheque of 300.00 (Banque Misr, no. 100245), handed to the office.
/returns RET-000001 — two Water 6-packs back from Nile Market against INV-000001, 114.00.

All amounts are EGP, with VAT at 14% added to prices. The company sells two products, JUICE-1L at 100.00 and WATER-6PK at 50.00, by the piece (unit PCS) or the carton of 12 (CTN), to four shops: Nile Market, Delta Kiosk, Zamalek Corner and Garden City Grocer. Its company code is t-sandbox (after a reset, t-sandbox-2 and so on); GET /me shows it in data.company.code.

The day was played before the company was switched to ERP mode API, so both orders are already delivered and none waits for an ack: filter[ack]=pending answers no orders, and acking SO-000001 or SO-000002 answers 409 ORDER_NOT_AWAITING_ACK. The two invoices, two payments and the return are there to ack. To try an order ack, ask us for a new order on the sandbox and pull it from your cursor.

Building load and unload journals (stock from your ERP)? Ask for the stock sandbox as well: a second company holding the same day, after which its stock was handed to the ERP (GET /me → data.company.stock_managed_by_erp is true) and two journals went through the API:

Ref Call What it left
TJ-NF-0001 GET /stock/loads/TJ-NF-0001 A load of 2 cartons of JUICE-1L (24 pieces) and 12 WATER-6PK from MAIN to VAN-03, ACCEPTED by Omar (answered_by.code omar)
TJ-NF-0002 GET /stock/unloads/TJ-NF-0002 The evening’s counted unload of VAN-03 back to MAIN: counted what the van held, so no shortage, and the van is empty

On it you can send, re-send and cancel load journals of your own and read them back, and send unloads. Nobody answers your loads there — Omar’s phone is ours — so they wait until you cancel them (DELETE /stock/loads/{ref}), and while one waits a good-stock unload of VAN-03 answers 409 LOAD_STILL_WAITING for everyone. Cancel what you send. Omar’s day has ended, so unloads aren’t held by VAN_DAY_NOT_ENDED. On the plain sandbox every load or unload you send answers 409 ERP_STOCK_NOT_ENABLED.

Email hello@slflo.com with your company, the ERP you’re connecting, and who will build the connector. There’s no form on purpose: a person reads every request and approves it, because the token opens a company that other developers share.

We make a client for you alone, Sandbox - your name, and send its token once, by a separate channel from the email. Treat it like a password: keep it in your ERP’s encrypted settings or a secret store, never in source control. Your own client means your own token, call log, rate limit (120 calls a minute) and expiry; when a teammate joins, ask for a client for them rather than sharing yours, and if one token leaks we revoke only that one.

  • Pull orders, invoices, payments and returns, and ack them.
  • Push customers, branches, units, products, price lists, prices and balances.
  • Run the whole go-live checklist.

You hold an integration token, not a console sign-in. Anything that happens in the console or on a rep’s phone, we do for you on request at hello@slflo.com:

  • a new pre-sale order that waits for your ERP (ERP_PENDING), to try an order ack;
  • Send to ERP again on an order you refused;
  • reversing a payment or bouncing a cheque, to see a document come back as pending.

Your client is yours; the company’s data isn’t. Every developer’s client reads and writes the same company, and an ack is kept per document, not per client: once another developer has acked INV-000001, a different answer from you is 409 ALREADY_ACKNOWLEDGED, and it no longer appears in filter[ack]=pending. The same goes for keys you push — a PUT /customers/CUST-0042 from anyone links that customer for everyone. If you need documents nobody has answered, ask us for fresh ones.

Terminal window
export SLFLO_TOKEN='sfi_live_…' SLFLO_BASE='https://api.slflo.com/api/integration/v1'
curl -s "$SLFLO_BASE/me" -H "Authorization: Bearer $SLFLO_TOKEN"
curl -sg "$SLFLO_BASE/invoices?filter[seq_after]=0" -H "Authorization: Bearer $SLFLO_TOKEN"

The first names your client (Sandbox - your name), the company t-sandbox and its erp_mode, API; the second lists INV-000001 and INV-000002 with seq 1 and 2.

If you run your own copy of SLFLO for development, seeding the demo company (the seed profile) registers a sandbox client and writes its token to build/sandbox-integration-token, readable only by you; it is never printed to the log. That self-run token starts with sfi_test_. Set SFA_SEED_SANDBOX_TOKEN=sfi_test_… to keep the same token across re-seeds; otherwise each seed issues a new one and revokes the previous.