Create a new user
| Body | Type | Required |
|---|---|---|
email |
string | Yes |
password |
string | Yes |
username |
string | Yes |
phone |
string | No |
Log a user
| Body | Type | Required |
|---|---|---|
email |
string | Yes |
password |
string | Yes |
Receive a list of offers. Possibility to filter the results.
| Query | Required | Description |
|---|---|---|
title |
No | get a list of offers that contain title |
priceMin |
No | get offers above priceMin |
priceMax |
No | get offers below priceMax |
sort |
No | date-asc : get a list of offers sort by ascending dates date-desc: get a list of offers sort by descending dates price-asc: get a list of offers sort by ascending prices price-desc: get a list of offers sort by descending prices |
page |
No | set the results page |
limit |
No | set the limit of results |
Get an offer
| Param | Required | Description |
|---|---|---|
id |
Yes | offer id |
Create a new offer
| formData | Required | Description |
|---|---|---|
title |
Yes | offer title |
description |
Yes | product description |
price |
Yes | product price |
brand |
Yes | product brand |
size |
Yes | product size |
condition |
Yes | product condition |
color |
Yes | offer color |
city |
Yes | the city in which the offer is located |
picture |
Yes | product picture |
| Headers | Required | Description |
|---|---|---|
Bearer token |
Yes | user token |
Update an offer
| Param | Required | Description |
|---|---|---|
id |
Yes | offer id |
| Headers | Required | Description |
|---|---|---|
Bearer token |
Yes | user token |
| formData | Required | Description |
|---|---|---|
title |
No | offer title |
description |
No | product description |
price |
No | product price |
brand |
No | product brand |
size |
No | product size |
condition |
No | product condition |
color |
No | offer color |
location |
No | offer location |
picture |
No | product picture |
Delete a picture of an offer
| Param | Required | Description |
|---|---|---|
id |
Yes | offer id |
| Headers | Required | Description |
|---|---|---|
Bearer token |
Yes | user token |
Delete an offer
| Param | Required | Description |
|---|---|---|
id |
Yes | offer id |
| Headers | Required | Description |
|---|---|---|
Bearer token |
Yes | user token |
Route to pay an offer
| formData | Required | Description |
|---|---|---|
amount |
Yes | amount of payment |
stripeToken |
Yes | Stripe token |
