title | language_tabs | language_clients | toc_footers | includes | search | highlight_theme | headingLevel | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
EmporioLambda Backend v0.1.0 |
|
|
true |
darkula |
2 |
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
REST interfaces for EmporioLambda Backend
Base URLs:
-
oAuth2 authentication. This API uses OAuth2.0 with implicit flow.
- Flow: implicit
- Authorization URL = https://emporiolambda.auth.eu-west-1.amazoncognito.com/oauth2/authorize
Scope | Scope Description |
---|---|
read | read for customers and admins |
readAdmin | read only for admins |
writeUser | edit data only for users |
writeAdmin | edit data only for admins |
The carts service
Code samples
# You can also use wget
curl -X POST https://app.swaggerhub.com/apis/NotOnlyStudents/Backend/0.0.1/cart \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
POST /cart
Add a new product to the buyer's cart
Body parameter
{
"token": {
"data": {
"id": "string",
"name": "string",
"description": "string",
"images": [
"string"
],
"quantity": 0,
"price": 0,
"available": true,
"evidence": true,
"category": [
"string"
]
},
"timeout": "2019-08-24T14:15:22Z"
},
"hmac": "stringstringstringstringstringstringstringst"
}
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | none |
» token | body | object | true | none |
»» data | body | #/paths/ |
false | none |
»»» id | body | string | true | none |
»»» name | body | string | true | none |
»»» description | body | string | false | none |
»»» images | body | [string] | false | none |
»»» quantity | body | integer(int32) | true | none |
»»» price | body | integer(int64) | true | none |
»»» available | body | boolean | false | none |
»»» evidence | body | boolean | false | none |
»»» category | body | [string] | true | none |
»» timeout | body | string(date-time) | false | none |
» hmac | body | string(byte) | true | none |
Example responses
400 Response
{
"message": "string"
}
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Successfull modification of the cart | None |
400 | Bad Request | Invalid request | Inline |
401 | Unauthorized | No authentication information was given, denied | Inline |
403 | Forbidden | Wrong permissions, denied | Inline |
5XX | Unknown | Unexpected server error | Inline |
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | true | none | none |
Status Code 401
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | true | none | none |
Status Code 403
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | true | none | none |
Status Code 5XX
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | true | none | none |
Code samples
# You can also use wget
curl -X GET https://app.swaggerhub.com/apis/NotOnlyStudents/Backend/0.0.1/cart \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
GET /cart
Obtain information about a user personal cart
Example responses
200 Response
{
"token": {
"data": {
"products": [
{
"id": "string",
"name": "string",
"description": "string",
"images": [
"string"
],
"quantity": 0,
"price": 0,
"available": true,
"evidence": true,
"category": [
"string"
]
}
]
},
"timeout": "2019-08-24T14:15:22Z"
},
"hmac": "stringstringstringstringstringstringstringst"
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successfully returned a cart | Inline |
401 | Unauthorized | No authentication information was given, denied | Inline |
5XX | Unknown | Unexpected server error | Inline |
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» token | object | true | none | none |
»» data | object | false | none | none |
»»» products | [#/paths/ |
true | none | none |
»»»» id | string | true | none | none |
»»»» name | string | true | none | none |
»»»» description | string | false | none | none |
»»»» images | [string] | false | none | none |
»»»» quantity | integer(int32) | true | none | none |
»»»» price | integer(int64) | true | none | none |
»»»» available | boolean | false | none | none |
»»»» evidence | boolean | false | none | none |
»»»» category | [string] | true | none | none |
»» timeout | string(date-time) | false | none | none |
» hmac | string(byte) | true | none | none |
Status Code 401
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | true | none | none |
Status Code 5XX
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | true | none | none |
Code samples
# You can also use wget
curl -X PATCH https://app.swaggerhub.com/apis/NotOnlyStudents/Backend/0.0.1/cart/{productId} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
PATCH /cart/{productId}
Edit a product quantity in the buyer's cart
Body parameter
{
"quantity": 0
}
Name | In | Type | Required | Description |
---|---|---|---|---|
productId | path | string | true | The id of the desired product |
body | body | object | true | none |
» quantity | body | integer(int32) | false | none |
Example responses
400 Response
{
"message": "string"
}
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Successfull modification of the product quantity in the cart | None |
400 | Bad Request | Invalid request | Inline |
401 | Unauthorized | No authentication information was given, denied | Inline |
403 | Forbidden | Wrong permissions, denied | Inline |
5XX | Unknown | Unexpected server error | Inline |
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | true | none | none |
Status Code 401
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | true | none | none |
Status Code 403
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | true | none | none |
Status Code 5XX
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | true | none | none |