Staff orders
Staff create orders that are not paid online: a gift card sold at the counter, a free gift card for a competition, an order paid by invoice, or an order that the buyer pays through an e-mailed payment link. In the Lifepeaks shop this is staff mode, at /<shop>/staff. The rules are the same as on the Lifepeaks order form.
Signing in
- Staff open
/<shop>/staffand choose Sign in with Lifepeaks. - They sign in on the Lifepeaks admin with their own account and approve the shop.
- The sign-in lasts 8 hours and is not renewed. Sign out ends it at once.
Users with the super admin, root admin, system admin or employee role can sign in. Every request is checked again: the user's role, the company and the user's own rights.
The sign-in holds only the scopes the staff pages use: orders:staff, orders:create, quotes:create and products:read. It cannot read or list orders, and it places staff orders only: an order without a staff block is refused.
What staff can do
GET /v2/staff returns what the signed-in user may do for the company. The shop shows only these choices.
| Choice | What happens |
|---|---|
| Regular payment without payment link | The shop took the money at the counter. The order is paid at once. |
| On the house | A free order. A comment is required. The internal value is 0 unless one is given. |
| Payment by invoice | The buyer is invoiced separately. A comment is required. |
| Regular payment including online payment link | A normal paid order. The buyer receives an e-mail with a link that opens the payment page. A different paid value per card is possible; commission is booked on it. The buyer is reminded after 24 hours. Payment closes after 48 hours; unpaid orders are then deleted once any hosted checkout and its one-hour confirmation grace have ended. |
Except for the payment link, a staff order has no fee and books the company's staff commission. The cards are issued at once.
Staff can also:
- set an internal value for the order, and an internal value and finance account number for each line when the company allows it,
- order private products and inactive events and special offers, marked in the shop,
- sell saved special vouchers and create a new special voucher with its own name, text, value, PDF template, code prefix and validity (months, a last day, or fixed dates and times),
- use the company's staff-only campaigns (a campaign line is recorded as paid 0, as on the order form) and a wider amount range,
- write a custom e-mail subject and text; the text must keep the link to the items, for example
{giftcardLink}, - leave the sender and recipient e-mail empty,
- order on behalf of another user (root admins, from their own list),
- create the order in the preparation stage (Lifepeaks system admins),
- fill in the finance account number (the Stays group and its hotels, for Stays operators and Lifepeaks system admins).
Each user's own rights still apply. A user who may not use a payment choice or sell a product kind is refused on the server, not only hidden in the shop.
Placing a staff order
POST /v2/orders with a staff block places a staff order. POST /v2/quotes with the same block prices it first. See the StaffOrderRequest schema in the OpenAPI specification.
{
"items": [{ "product_id": "gift_card_value", "amount": 50000, "quantity": 2 }],
"recipient": { "name": "Mette Jensen" },
"return_url": "https://shop.lifepeaks.dk/cafe-norden/return?ref=…",
"staff": { "payment": "counter", "comment": "Paid at the desk" }
}
Send an Idempotency-Key, as on every order. A retry with the same key and body returns the same order, also after the staff user signs in again.
Records
The payment of a staff order records who placed it: the user it was created as, the staff user who placed it when that was someone else, and the sign-in it came from.