API Docs
/api/items/new
POST
none
{
name: [string],
category: [string],
description: [string],
price: [string],
salestatus: [string],
picid[]: [string]
}
Code: 201 CREATED Data: none
Code: 400 BAD REQUEST
Code: 401 Unauthorized
/api/items
GET
none
none
Code: 200 OK
{
item: {
id: [string],
name: [string],
category: [string],
description: [string],
price: [float64],
userid: [string],
date: [time.Time],
salestatus: [string],
picid[]: [string]
},
}
Code: 204 NO CONTENT
Code: 400 Bad Request
Code: 401 UNAUTHORIZED
/api/items/:id
GET
:id
none
Code: 200 OK
{
id: [string],
name: [string],
category: [string],
description: [string],
price: [float64],
userid: [string],
date: [time.Time],
salestatus: [string],
picid[]: [string]
}
Code: 204 NO CONTENT
Code: 401 UNAUTHORIZED
Code: 400 Bad Request
/api/category/:key
GET
:key
None
Code: 200 OK
{
id: [string],
name: [string],
category: [string],
description: [string],
price: [float64],
userid: [string],
date: [time.Time],
salestatus: [string],
picid[]: [string]
}
Code: 204 NO CONTENT
Code: 400 Bad Request
Code: 401 UNAUTHORIZED
/api/items/delete/:id
DELETE
:id
None
Code: 200 Success
Code: 400 Bad Request
Code: 401 UNAUTHORIZED
Code: 403 FORBIDDEN
/api/items/edit/:id
PUT
:id
{
name: [string],
category: [string],
description: [string],
price: [string],
salestatus: [string],
picid[]: [string]
}
Code: 201 Created
401 UNAUTHORIZED
400 BAD REQUEST
403 FORBIDDEN
/api/users/register
POST
none
{
email: [string],
password:[string],
confirm:[string],
siteId:[string] (8-4-4-4-12)
}
201: CREATED
400 BAD REQUEST
401 UNAUTHORIZED
/api/users/auth
POST
none
{
email: [string],
password: [string],
siteId: [string] (8-4-4-4-12)
}
Code: 200 Success Data:
{
token: [jwt Raw Token]
}
Code: 401 Unauthorized Code: 400 Bad Request Not in JSON Format!
/api/users/
GET
none
none
Code: 200 OK Data:
{
{
id: [string],
email:[string],
firstname:[string],
lastname:[string],
phone:[string],
zipcode: [string],
picid: [string],
url: [string]
}, {...}, {...}
}
Code: 400 Bad Request Code: 401 UNAUTHORIZED
Code: 500 INTERNAL SERVER ERROR
/api/users/:id
GET
:id
none
Code: 200 OK Data:
{
id: [string],
email:[string],
firstname:[string],
lastname:[string],
phone:[string],
zipcode: [string],
picid: [string],
url: [string],
items:[[]Item]
}
Code: 400 BAD REQUEST
Code: 401 UNAUTHORIZED
/api/users/edit/:id
PUT
:id
{
firstname:[string],
lastname:[string],
email:[string],
phone:[string],
picid: [string],
zipcode:[string]
}
Code: 200 OK
Code: 401 UNAUTHORIZED Code: 403 FORBIDDEN
/api/users/delete/:id
DELETE
:id
none
Code: 200 OK
Code: 401 UNAUTHORIZED Code: 403 FORBIDDEN
/api/search/:key
GET
:key
none
Code: 200 OK
{
id: [string],
email:[string],
firstname:[string],
lastname:[string],
phone:[string],
zipcode: [string],
picid: [string],
url: [string],
items:[[]Item]
}
Code: 401 UNAUTHORIZED Code: 400 Bad Request
/api/images/new
POST
None
{
extension: [string]
}
Code: 200 Success Data:
{
picid: string,
url: string
}
Extension is the file extension of the file you wish to upload ("jpg", "png", etc) Once you have obtained the presigned URL for the image you wish to upload, make a put request to the URL with the file in the request Body. A url to reference/get the image will be provided when you get a user or item object