Skip to content
PharmaFlow Knowledgebase
Esc
↑↓navigate↵open⌘Jpreview

Park a cart

Any signed in user. Stores the caller’s cart against their till so it can be recalled later. An empty or missing cart is refused, and the parked row is scoped to the caller and branch.

POST/api/v1/parked
Authorization
AuthorizationBearer token (JWT) · headerrequired

JWT from POST /api/v1/auth/login sent as Authorization Bearer.

Request body
requiredapplication/json
cartobject[]required
Show properties
Array of object
unit_pricenumber | string
quantitynumber | string
session_idstring
Responses
201

Cart parked

idstringrequired
parked_atstringrequired
statusstringrequired
400

Cart is empty

detailstringrequired
401

Not authenticated

detailstringrequired
Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST 'http://localhost:8000/api/v1/parked' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "cart": [
    {
      "unit_price": 0,
      "quantity": 0,
      "property1": null,
      "property2": null
    }
  ],
  "session_id": "string"
}'
Response
{
  "id": "string",
  "parked_at": "string",
  "status": "string"
}