# is the server reachable?
curl https://odoo.example.com/api/jobsite/v1/ping
# {"ok": true, "api_version": 1, "server_time": "2026-10-27T05:00:00Z"}
# sign in (returns a token, the roles and the sites of the user)
curl -X POST https://odoo.example.com/api/jobsite/v1/auth/login -H 'Content-Type: application/json' \
-d '{"login": "faisal@example.com", "password": "...", "device": {"id": "phone-1", "platform": "ios"}}'
# drop a punch-list pin (idempotent: the same operation uuid is applied once; x and y are 0..1 of the page)
curl -X POST https://odoo.example.com/api/jobsite/v1/op/pin_create -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
-d '{"uuid": "4c1f...", "pin": {"uuid": "a9d2...", "project_id": 2, "plan_id": 3, "page": 1, "x": 0.31, "y": 0.62,
"title": "Exposed rebar in the slab edge", "severity": "critical", "trade_id": 4}}'
# receive a delivery against a purchase order (short quantities create a backorder in Inventory)
curl -X POST https://odoo.example.com/api/jobsite/v1/op/delivery_receive -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
-d '{"uuid": "77aa...", "delivery": {"uuid": "b1c3...", "project_id": 2, "purchase_id": 7, "ticket_no": "DN-88213", "plate": "DXB L 45219",
"lines": [{"po_line_id": 21, "received": 20}]}, "photos": [{"kind": "ticket", "image_b64": "..."}, {"kind": "plate", "image_b64": "..."}]}'