Get started
Your first call in 10 minutes
This guide takes you from nothing to a first successful answer from the sandbox. All you need is a sandbox key and a terminal.
Before you start#
Let's Pizza (OPT) issues the keys for each partner system. Ask your technical contact for:
- A sandbox key starting with
lpk_test_. It is shown once, when it is issued. - The base URL of the sandbox.
- The branches your system will work with while testing.
Step 1: set the variables#
Every sample on this site reads the address and the key from two variables:
export LP_BASE_URL="https://<sandbox address from onboarding>"
export LP_API_KEY="lpk_test_…"Step 2: call GET /partner/v1/me#
The first call for any new key. Any valid key may make it; it tells you who you are and what you may do.
curl -sS "$LP_BASE_URL/partner/v1/me" \
-H "Authorization: Bearer $LP_API_KEY"Step 3: read the answer#
{
"partner": {
"id": "ptn_01JD5ZB2",
"name": "Business Central (EDM)",
"kind": "erp"
},
"key": {
"id": "key_01JD5ZC9",
"env": "sandbox",
"label": "EDM sandbox",
"prefix": "lpk_test_Ab3d",
"scopes": [
"branches:read",
"catalog:read",
"catalog:write",
"availability:write",
"orders:read",
"orders:ack",
"orders:status",
"orders:cancel",
"orders:events",
"payments:read",
"reports:read",
"webhooks:manage",
"mappings:write"
],
"branches": null,
"ratePerMinute": 600,
"expiresAt": null
},
"environment": "sandbox",
"settings": {
"orders": {
"delivery": "pull",
"acceptance": "partner",
"ackMinutes": 3,
"statuses": [
"accepted",
"rejected",
"preparing",
"ready",
"picked_up",
"cancelled"
],
"connector": null
},
"catalog": {
"source": false,
"fields": [
"names",
"prices",
"sizes",
"groups",
"options",
"categories",
"availability"
],
"publish": "manual",
"maxPriceChangePct": 20,
"maxRemovals": 5
},
"availability": true,
"invoices": {
"issuer": "lp"
},
"customerData": "full",
"liveBranches": [
"28"
]
},
"apiVersion": "v1",
"serverTime": "2026-11-19T19:30:12.000+03:00"
}environment- The environment of the host: sandbox while testing. Always the same as the key’s.
key.scopes- What this key may do. A call outside them is refused with SCOPE_REQUIRED.
settings.orders- How orders reach you, who accepts them, and which statuses you may report.
settings.liveBranches- The branches switched on for you. Empty until we switch them on with you.
Every answer carries X-Request-Id. Keep it in your logs: it is the first thing support asks for.
Step 4: list your branches#
With the branches:read scope you get the branches your key works on, each with your own code once mapped.
curl -sS "$LP_BASE_URL/partner/v1/branches" \
-H "Authorization: Bearer $LP_API_KEY"Step 5: place a test order#
On the sandbox only, you can create a real order priced exactly like a customer’s, so it reaches your feed, your webhooks and your connector. Without lines it is one Margherita. On production it is refused with 403 SANDBOX_ONLY. It needs the scopes orders:read and orders:status.
curl -sS -X POST "$LP_BASE_URL/partner/v1/sandbox/orders" \
-H "Authorization: Bearer $LP_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"branchId": "28",
"fulfilment": "pickup",
"paymentMethod": "pay_at_branch"
}'Then move it with your status calls, or let the sandbox branch staff do it. You can do all of this from the browser in the Partner workspace.
If the call fails#
| Code | Usual cause |
|---|---|
UNAUTHENTICATED | The Authorization header is missing, the key was copied wrong, or it was revoked. |
KEY_ENVIRONMENT_MISMATCH | A sandbox key on the production address, or the other way round. |
IP_NOT_ALLOWED | The key has an address allowlist and your call came from outside it. |
The full list is in Errors.