Get ownership and borrowing history for a tag (UUID: 1-14 characters). Returns user_id and username for current owner and borrower.
Borrow Tag
POST
https://abook.squadmedia.se/API/tags/borrow
Borrow a book tag from another user. Requires valid borrowPIN. Checks if already borrowed. Returns borrower_user_id, borrower_username, owner_user_id, owner_username. Error if already borrowed includes borrowed_by_user_id, borrowed_by_username, and due_date. Error 22 if borrowPIN is incorrect.
Return a borrowed tag. Only the owner (authenticated user) can return. Generates new borrowPIN. Error 24 if not owner, Error 19 if not borrowed.
Transfer Tag Ownership
POST
https://abook.squadmedia.se/API/tags/transfer
Transfer/Buy tag ownership. Authenticated user is the buyer/receiver. Requires seller's ownerPIN. Generates new ownerPIN after successful transfer. Returns from_user_id (seller), to_user_id (buyer), new_ownerPIN. Error 23 if ownerPIN is incorrect.
Associate Tag with Book
POST
https://abook.squadmedia.se/API/tags/associate
Link a tag UUID to a book_id. Requires valid owner_pin for verification. Error 15 if owner_pin is incorrect.