8000 add README file · gistol/symfony_api@8954fda · GitHub
[go: up one dir, main page]

Skip to content

Commit 8954fda

Browse files
add README file
1 parent bfe444c commit 8954fda

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Symfony 5 CRUD API service
2+
3+
Please watch the whole video tutorial [here](https://www.youtube.com/watch?v=tbXpX4dAqjg)
4+
5+
Create a customer:
6+
7+
```sh
8+
curl --location --request POST 'http://localhost:8080/api/v1/customers' \
9+
--header 'Content-Type: application/json' \
10+
--data-raw '{
11+
"email": "test.email@gmail.com",
12+
"phoneNumber": "+49116012345678"
13+
}'
14+
```
15+
16+
Create a product:
17+
18+
```sh
19+
curl --location --request POST 'http://localhost:8080/api/v1/products' \
20+
--header 'Content-Type: application/json' \
21+
--data-raw '{
22+
"code": "test_code",
23+
"title": "Test title",
24+
"price": 1234
25+
}'
26+
```
27+
28+
Create a cart:
29+
30+
```sh
31+
curl --location --request POST 'http://localhost:8080/api/v1/customers/cart' \
32+
--header 'Content-Type: application/json' \
33+
--data-raw '{
34+
"customer": 1,
35+
"products": [
36+
1
37+
],
38+
"dateTime": "2020-08-05 12:15:00"
39+
}'
40+
```

0 commit comments

Comments
 (0)
0