Download OpenAPI specification:
Tekton is a lumber store in Perm. This is an early version of the store API, it may be changed in the future.
Even if you are not logged in, we ask you to obtain a session key and pass it on with every request. The server can store data that is tied to a session (for example: a list of items in a shopping cart). If the session is authorized, this data will be linked not to the session, but to the account.
Tekton supports 2 ways to send session information:
sessionid
cookieAuthorization
headerTo protect against CSRF attacks, the API server requires sending the same token
in the csrftoken
cookie and in the X-CSRFToken
header for POST
, PUT
, PATCH
, and DELETE
requests.
You can generate a random token, but its length must be exactly 32 characters. The token value itself does not matter.
You can use this method without providing an existing session. The server always returns a valid session. If the current session has expired, it will be replaced. Try to use the received session key in all subsequent requests, even if you do not have an account or authorization is not required for the endpoint.
{- "sessionKey": "long-random-string",
- "isAuthenticated": true,
- "expiresAt": "2019-08-24T14:15:22Z"
}
string <email> | |
password | string <password> |
{- "email": "user@example.com",
- "password": "pa$$word"
}
{- "token": "string",
- "expiry": "2019-08-24T14:15:22Z"
}
string <email> | |
password | string <password> |
{- "email": "user@example.com",
- "password": "pa$$word"
}
{- "token": "string",
- "expiry": "2019-08-24T14:15:22Z"
}
limit | integer <int64> Limit on the number of results |
offset | integer <int64> The number of elements skipped from the start |
{- "count": 1,
- "results": [
- {
- "id": 0,
- "title": "string",
- "price": "123.45",
- "img": null
}
]
}
productId required | integer <int64> Product ID |
{- "id": 0,
- "title": "Product 1",
- "price": "123.45",
- "description": "<p>Lorem ipsum</p>",
- "properties": [
- {
- "schema": {
- "id": 0,
- "name": "Width, m"
}, - "value": "2"
}
]
}
productId | integer <int64> |
quantity | integer <int64> Change in quantity of product in the cart. Can be negative. The value is added to the current quantity of the product. If the new value is less than or equal to 0, the item record is removed from the cart. |
{- "productId": 0,
- "quantity": 1
}
{- "productId": 0,
- "quantity": 1
}
The method allows you to find out the quantity of product in the cart. Works for any products, even for those that were not added to the cart.
productId required | integer <int64> Product ID |
{- "productId": 0,
- "quantity": 0
}
Places an order with all current items in the cart.
firstName | string |
lastName | string |
phoneNumber | string |
deliveryAddress | string |
{- "firstName": "Ivan",
- "lastName": "Petrov",
- "phoneNumber": "88005553535",
- "deliveryAddress": "string"
}
{- "order": {
- "id": "order-id",
- "items": [
- {
- "title": "Product 1",
- "price": "123.45",
- "quantity": 1
}
], - "firstName": "Ivan",
- "lastName": "Petrov",
- "phoneNumber": "88005553535",
- "deliveryAddress": "string",
- "createdAt": "2019-08-24T14:15:22Z"
}
}