stl_test/README.md
2026-05-18 09:35:37 +07:00

49 lines
1.3 KiB
Markdown

# Start
```bash
git clone https://git.rinsvent.ru/rinsvent/stl_test
docker compose up -d
```
# Доступность
```bash
curl -s "http://localhost:8080/api/slots/availability"
```
# Создать hold
```bash
curl -s -X POST "http://localhost:8080/api/slots/1/hold" \
-H "X-Idempotency-Key: 3f36b498-4144-43d3-9853-b22379b520ff"
```
# Подтвердить
```bash
curl -s -X POST "http://localhost:8080/api/holds/1/confirm"
```
# Отменить
```bash
curl -s -X DELETE "http://localhost:8080/api/holds/1"
```
# Oversell
```bash
curl -s -X POST "http://localhost:8080/api/slots/2/hold" \
-H "X-Idempotency-Key: 20ff64a3-43d6-4ddb-874e-441d0a87570e"
curl -s -X POST "http://localhost:8080/api/slots/2/hold" \
-H "X-Idempotency-Key: d7db5b73-1ea5-4156-99b6-dbace1b483a9"
curl -s -X POST "http://localhost:8080/api/slots/2/hold" \
-H "X-Idempotency-Key: ddd6174c-0fda-4765-8413-12dd3cda9692"
curl -s -X POST "http://localhost:8080/api/slots/2/hold" \
-H "X-Idempotency-Key: 7af943b4-dfcf-4d5e-99c0-fa06fc9b2a6a"
curl -s -X POST "http://localhost:8080/api/slots/2/hold" \
-H "X-Idempotency-Key: fcb4b745-e928-4af3-bb35-c307cc5a574e"
curl -s -X POST "http://localhost:8080/api/slots/2/hold" \
-H "X-Idempotency-Key: 38ae0adb-7f23-40c0-9ac1-069a15d89a98"
```