-
Notifications
You must be signed in to change notification settings - Fork 2
API
- OpenAPI Version: 3.0.0
- Title: WeGotThis API
- API Version: 0.1
-
Servers:
http://localhost:8000/api
Summary: Create a new offer
Security: Locale (header), ApiToken (header)
Request Body (application/json):
{
"title": "Dog Walking Service",
"description": "I can walk your dog for 30 minutes.",
"location": "New York, NY",
"priceModeId": 1,
"price": 20,
"availability": true,
"typeId": 1,
"categoryIds": [1],
"startTime": 1743210637,
"endTime": 1743214237
}Responses:
-
200– Offer created successfully
Summary: Edit an existing offer
Security: Locale, ApiToken
Path Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| offerId | path | string | yes | ID of the offer to edit |
Request Body (application/json):
{ /* same structure as CreateOfferRequest */ }Responses:
-
200– Offer updated successfully
Summary: Get details of a single offer
Security: Locale, ApiToken
Path Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| offerId | path | string | yes | ID of the offer to retrieve |
Responses:
-
200– Offer retrieved successfully
Summary: Get a list of all offers
Security: Locale, ApiToken
Responses:
-
200– List of offers retrieved successfully
Summary: Get all offers for a specific user
Security: Locale, ApiToken
Path Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| userId | path | string | yes | ID of the user |
Responses:
-
200– List of offers retrieved successfully
Summary: Delete an offer
Security: Locale, ApiToken
Path Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| offerId | path | string | yes | ID of the offer to delete |
Responses:
-
200– Offer deleted successfully
Summary: Get an offer template list
Security: Locale, ApiToken
Responses:
-
200– List of offers retrieved successfully
Summary: Upload images for an offer
Security: Locale, ApiToken
Path Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| offerId | path | string | yes | ID of the offer to upload |
Request Body (multipart/form-data):
| Field | Type | Format | Description |
|---|---|---|---|
| image | string | binary | Image file to upload |
Responses:
-
200– Images uploaded successfully
Summary: Get a list of offers created by the current user
Security: Locale, ApiToken
Responses:
-
200– List of offers retrieved successfully
Summary: Add a request to an offer
Security: Locale, ApiToken
Path Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| offerId | path | string | yes | ID of the offer to add to |
Responses:
-
200– Request added successfully
Summary: Get requests made by the current user to offers
Security: Locale, ApiToken
Responses:
-
200– Requests retrieved successfully
Summary: Get requests on the current user’s offers
Security: Locale, ApiToken
Responses:
-
200– Requests retrieved successfully
Summary: Get all requests across all offers
Security: Locale, ApiToken
Responses:
-
200– Requests retrieved successfully
Summary: Complete an offer request
Security: Locale, ApiToken
Path Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| offerId | path | string | yes | ID of the offer |
| requestId | path | string | yes | ID of the request |
Responses:
-
200– Request completed successfully
Summary: Accept an offer request
Security: Locale, ApiToken
Path Parameters: same as above
Responses:
-
200– Request accepted successfully
Summary: Reject an offer request
Security: Locale, ApiToken
Path Parameters: same as above
Responses:
-
200– Request rejected successfully
Summary: Withdraw a previously made request
Security: Locale, ApiToken
Path Parameters: same as above
Responses:
-
200– Request withdrawn successfully
Summary: Give a review on an offer request
Security: Locale, ApiToken
Path Parameters: same as above
Request Body (application/json):
{
"text": "Good Service",
"rating": 5
} Responses:
-
200– Review submitted successfully
| Name | Type | In | Header Name |
|---|---|---|---|
| ApiToken | apiKey | header | x-auth-token |
| Locale | apiKey | header | x-locale |
| Property | Type | Example |
|---|---|---|
| string | sheetab@technohaven.com | |
| password | string | 123456 |
| expire | boolean | true |
| Property | Type | Example |
|---|---|---|
| string | sheetab@technohaven.com | |
| password | string | 123456 |
| firstName | string | Hafiz |
| lastName | string | Sheetab |
| expire | boolean | true |
| Property | Type | Example |
|---|---|---|
| string | sheetab@technohaven.com |
| Property | Type | Example |
|---|---|---|
| password | string | 123456 |
| Property | Type | Description | Example |
|---|---|---|---|
| title | string | — | Dog Walking Service |
| description | string | — | I can walk your dog for 30 minutes. |
| location | string | — | New York, NY |
| priceModeId | number | — | 1 |
| price | number | — | 20 |
| availability | boolean | defaults to true
|
true |
| typeId | number | — | 1 |
| categoryIds | array | of number
|
[1] |
| startTime | number | Estimated start timestamp | 1743210637 |
| endTime | number | Estimated end timestamp | 1743214237 |
Same structure as CreateOfferRequest.
| Property | Type | Example |
|---|---|---|
| text | string | Good Service |
| rating | number | 5 |
| Property | Type | Example |
|---|---|---|
| firstName | string | Hafiz |
| lastName | string | Sheetab |
| expire | boolean | true |
| password | string | asdfghjk |
| phoneNumber | string | 41772654787 |
| location | string | Zurich |
| categoryIds | array | of number
|
| (e.g. [1]) |