Create a new user
| name | string or null username. this name is not provided, the name will be set as a default value. |
| emailAddress required | string |
{- "name": "string",
- "emailAddress": "string"
}The requesting user is identified by the token of request.
{- "containers": [
- {
- "id": "11111111-ee7b-4558-b8d5-371514e77bed",
- "name": "Shared-house's Fridge",
- "group": {
- "groupId": "a3kdifut-a520-c2cb-1be7-d90710691861",
- "groupName": "Shared-house"
}, - "foods": [
- {
- "id": "11111111-58b7-4c3d-9548-fc0a4d3b3ef4",
- "name": "arugula",
- "quantity": 500,
- "category": "vegetables",
- "unit": "g",
- "expiry": "2023-12-10T00:00:00.000Z",
- "createdAt": "2023-12-01T00:00:00.000Z"
}, - {
- "id": "22222222-58b7-4c3d-9548-fc0a4d3b3ef4",
- "name": "tomato",
- "quantity": 5,
- "category": "vegetables",
- "unit": null,
- "expiry": "2023-12-25T00:00:00.000Z",
- "createdAt": "2023-12-04T00:00:00.000Z"
}
]
}, - {
- "id": "22222222-ee7b-4558-b8d5-371514e77bed",
- "name": "Family's Fridge",
- "group": {
- "groupId": "c3a8df3e-a520-c2cb-1be7-d90710691861",
- "groupName": "Tom's family"
}, - "foods": [
- {
- "id": "33333333-58b7-4c3d-9548-fc0a4d3b3ef4",
- "name": "onion",
- "quantity": 3,
- "category": "vegetables",
- "unit": null,
- "expiry": "2023-12-15T00:00:00.000Z",
- "createdAt": "2023-12-01T00:00:00.000Z"
}, - {
- "id": "44444444-58b7-4c3d-9548-fc0a4d3b3ef4",
- "name": "chicken thigh",
- "quantity": 0.5,
- "category": "meat",
- "unit": "kg",
- "expiry": "2023-12-15T00:00:00.000Z",
- "createdAt": "2023-12-01T00:00:00.000Z"
}
]
}, - {
- "id": "33333333-ee7b-4558-b8d5-371514e77bed",
- "name": "Camping Fridge",
- "group": {
- "groupId": "c3a8df3e-a520-c2cb-1be7-d90710691861",
- "groupName": "Tom's family"
}, - "foods": [
- {
- "id": "55555555-58b7-4c3d-9548-fc0a4d3b3ef4",
- "name": "Beef steak",
- "quantity": 700,
- "category": "meat",
- "unit": "g",
- "expiry": "2023-12-20T00:00:00.000Z",
- "createdAt": "2023-12-03T00:00:00.000Z"
}, - {
- "id": "66666666-58b7-4c3d-9548-fc0a4d3b3ef4",
- "name": "Beer",
- "quantity": 10,
- "category": "beverage",
- "unit": "can",
- "expiry": "2024-03-15T00:00:00.000Z",
- "createdAt": "2023-12-01T00:00:00.000Z"
}, - {
- "id": "77777777-58b7-4c3d-9548-fc0a4d3b3ef4",
- "name": "Red Wine",
- "quantity": 3,
- "category": "beverage",
- "unit": "bottle",
- "expiry": "2024-06-15T00:00:00.000Z",
- "createdAt": "2023-12-03T00:00:00.000Z"
}
]
}
]
}create a new container
| groupId | string |
| name | string |
{- "groupId": "groupId",
- "name": "my-container"
}{- "containerId": "containerId"
}get a container information
| containerId required | string ID of container |
{- "id": "939a4c50-ee7b-4558-b8d5-371514e77bed",
- "name": "Shared-house's Fridge",
- "group": {
- "groupId": "a3kdifut-a520-c2cb-1be7-d90710691861",
- "groupName": "Shared-house"
}, - "foods": [
- {
- "id": "3c740136-58b7-4c3d-9548-fc0a4d3b3ef4",
- "name": "arugula",
- "quantity": 1,
- "category": "Vegetables",
- "unit": "kg",
- "expiry": "2023-12-15T00:00:00.000Z",
- "createdAt": "2023-12-01T00:00:00.000Z"
}
]
}The requesting user is identified by the token of request.
| containerId required | string ID of container |
| containerName | string |
{- "containerName": "new-container"
}add a new food
| containerId required | string |
| name required | string |
| unit required | string or null |
| category required | string |
| quantity required | integer or null <float> |
| expiry required | string or null <date-time> DateTime must follow ISO 8601 format including time zone. |
{- "name": "bouillon",
- "unit": "l",
- "category": "Vegetables",
- "quantity": 1,
- "expiry": "1970-01-01T00:00:00.000Z"
}{- "foodId": "foodId"
}update a food
| containerId required | string ID of container |
| foodId required | string ID of food |
| name required | string |
| unit required | string or null |
| category required | string |
| quantity required | integer or null <float> |
| expiry required | string or null <date-time> DateTime must follow ISO 8601 format including time zone. |
{- "name": "bouillon",
- "unit": "l",
- "category": "Vegetables",
- "quantity": 1,
- "expiry": "1970-01-01T00:00:00.000Z"
}{- "groups": [
- {
- "groupId": "82597aad-0d1b-4672-8b9a-fd3764cb9928",
- "groupName": "Shared-house"
}, - {
- "groupId": "22222222-0d1b-4672-8b9a-fd3764cb9928",
- "groupName": "Tom's Family"
}, - {
- "groupId": "33333333-0d1b-4672-8b9a-fd3764cb9928",
- "groupName": "Nishiki"
}, - {
- "groupId": "44444444-0d1b-4672-8b9a-fd3764cb9928",
- "groupName": "School Class A"
}, - {
- "groupId": "55555555-0d1b-4672-8b9a-fd3764cb9928",
- "groupName": "Running Club"
}, - {
- "groupId": "66666666-0d1b-4672-8b9a-fd3764cb9928",
- "groupName": "Secret Group"
}, - {
- "groupId": "77777777-0d1b-4672-8b9a-fd3764cb9928",
- "groupName": "Tom & Jelly"
}, - {
- "groupId": "88888888-0d1b-4672-8b9a-fd3764cb9928",
- "groupName": "Wright Brothers"
}, - {
- "groupId": "99999999-0d1b-4672-8b9a-fd3764cb9928",
- "groupName": "Gryffindor"
}
]
}Join to a group using the invitation link hash.
| Action required | string a place holder, must be 'joinToGroup' |
| invitationLinkHash | string |
{- "invitationLinkHash": "3b6619cffb5f96e1acfa578badae372f"
}{- "groupId": "d4825cf5-0b1b-dce3-1aa1-ed9adfd6b0bd"
}get a list of the group's container
| groupId required | string ID of group |
{- "containers": [
- {
- "id": "939a4c50-ee7b-4558-b8d5-371514e77bed",
- "name": "Shared-house's Fridge",
- "group": {
- "groupId": "a3kdifut-a520-c2cb-1be7-d90710691861",
- "groupName": "Shared-house"
}, - "foods": [
- {
- "id": "3c740136-58b7-4c3d-9548-fc0a4d3b3ef4",
- "name": "arugula",
- "quantity": 1,
- "category": "Vegetables",
- "unit": "kg",
- "expiry": "2023-12-15T00:00:00.000Z",
- "createdAt": "2023-12-01T00:00:00.000Z"
}
]
}
]
}Get a list of users in the group
| groupId required | string |
{- "users": [
- {
- "id": "11111111-ee7b-4558-b8d5-371514e77bed",
- "name": "James Smith"
}, - {
- "id": "22222222-ee7b-4558-b8d5-371514e77bed",
- "name": "Emma Brown"
}, - {
- "id": "33333333-ee7b-4558-b8d5-371514e77bed",
- "name": "Michael Johnson"
}, - {
- "id": "44444444-ee7b-4558-b8d5-371514e77bed",
- "name": "Sophia Thompson"
}
]
}