/api/stamps
application/json
Location | Field Name | Data Type | Required | Description |
---|---|---|---|---|
query | user | int | - | unique id of user which is the stamp-book owner |
query | facility | int | - | unique id of facility to which the stamp-book belongs |
200
Key | Description |
---|---|
status | success |
data | array of stampbook rows |
user_id, facility_id
/api/stamps/create
application/json
Location | Field Name | Data Type | Required | Description |
---|---|---|---|---|
body | userId | int | O | unique id of user which is the stamp-book owner |
body | facilityId | int | O | unique id of facility to which the stamp-book belongs |
201
Key | Description |
---|---|
status | success |
data | the created stampbook object |
transaction
rowstampbook
row corresponding to (buyerId, facilityId)
, specifically cnt
/api/stamps/transaction
application/json
Location | Field Name | Data Type | Required | Description |
---|---|---|---|---|
body | buyerId | int | O | unique id of user which is the stamp-book owner / stamp recipient |
body | facilityId | int | O | unique id of facility |
body | sellerId | int | O | unique id of user which is the stamp giver / facility manager for facilityId |
body | type | int | O | transaction type, which is one of - 0: redeem(-amount), 1: give(+amount) |
body | amount | int | O | amount of stamps traded |
201
Key | Description |
---|---|
status | success |
data | the updated stampbook object |