Create a restaurant
Partner key alone. With a test key, creates a sandbox: it is never live, has no ordering page on {slug}.lettbestilt.no, and a partner can have up to 20. Live partner keys are not available yet.
The response contains a new restaurant key with full access, in plain text once, in restaurantKey.key. Store it right away: every call about this restaurant needs it, and it is never shown again.
Idempotency-Key is required and is scoped per partner for 30 days:
- Same key, same body:
200with the same restaurant,restaurantKey: null,replayed: true, amessage, and the headerIdempotent-Replayed: true. The restaurant key is not shown again. If you lost it (for example because the first response never arrived), create a new key for the restaurant in the partner portal. - Same key, different body or environment, or a restaurant that has since been deleted or moved:
409 IDEMPOTENCY_CONFLICT.
A slug that is already taken gives 409 SLUG_TAKEN and does not count towards the limit. At most 10 creations per hour per partner key, and 20 per partner. Replays do not count.
Authentication
The partner key, sent as Authorization: Bearer lbp_test_…. Created in the partner portal under Partner key. It belongs to the partner, not to a restaurant, and only works against /api/v1/partner. Server to server only: a request with an Origin header is rejected with 403 FORBIDDEN. A test key sees and creates only sandboxes; live partner keys are not available yet. A revoked key, a restaurant key (lbs_…) here, or a suspended or archived partner returns 401 UNAUTHORIZED; an expired key returns 401 KEY_EXPIRED.
Headers
Required. 16–128 URL-safe characters (a-z, A-Z, 0-9, _, -). Use one new key, for example a UUID, per restaurant you want to create.
Request
The restaurant’s name, 2–80 characters.
Lowercase letters, digits and hyphens, 2–32 characters. Becomes {slug}.lettbestilt.no and the restaurant’s key in /api/v1. Stored in lowercase.
Offer pickup. Defaults to true.
Offer delivery. Defaults to false.
Response headers
Response
Replay of the same Idempotency-Key: the same restaurant, restaurantKey: null, replayed: true and a message.
The new restaurant key with full access, in plain text once (201). null on a replay (200): the key is never shown again. If you lost it, create a new key for the restaurant in the partner portal.
true when the response is a replay of the same Idempotency-Key.

