-
Notifications
You must be signed in to change notification settings - Fork 7
API v0.1
fdistorted edited this page Apr 7, 2020
·
6 revisions
Alpha version, before Swagger
All API has base URL /api
Method | URL | RequestBody | Response | Comment |
---|---|---|---|---|
Auth | ||||
POST | /login | |||
POST | /logout | |||
OrderRequest | ||||
GET | /requests?search='' | - | See Requests search | Search Requests ( by item name, by location, by beneficiary name, by organization name). Alternative GET /search?q='' |
POST | /requests | See create request | ||
PUT | /requests/{id} | Update item | ||
PUT | /requests/{is}/status | Update item status | ||
GET | /items?search= |
TBD
Do we want pagination?
{
items: [{
"id": number,
"name": string,
"quantity": number,
"quantityCovered": number,
"price"?: number,
"state": RequestStateEnum,
"beneficiary"?: {}
"contactPerson": {}
}]
}
{
"beneficiary": {
name: string,
address: string
},
"contactPerson"?: { //optional(if different from current user)
name: string, //Ivan Ivanox - контактна особа з організаціі
email?: email,
phone?: phone,
website?:
},
"items": [{
"name": string,
"quantity": number,
"price"?: number
}],
"deadline": timestamp
}