-
Notifications
You must be signed in to change notification settings - Fork 0
/
clent.http
115 lines (97 loc) · 2.62 KB
/
clent.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
@baseUrl = http://localhost:8000/
@PropertyBaseUrl = http://localhost:8000/api/property-listings
@PropertyId = 3
@ImageId = 3
@AuthUrl = http://localhost:8000/api/auth/
@GlobeUrl = http://localhost:8000/api/globe/
@UserToken = eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjIsImV4cCI6MTYzNDU3OTk2OH0.VFpKA4L88I_IrYq6KyKLhh2btLTuAbsKRYjHjW3QTlc
### GET Globe Items
GET {{GlobeUrl}}TH/
Authorization: Bearer {{UserToken}}
### REGISTER NEW USER
POST {{AuthUrl}}register/
Content-Type: application/json
{
"email": "[email protected]",
"password": "test",
"password_confirmation": "test",
"first_name": "testfn3",
"last_name": "testln3",
"username": "testusername3"
}
### LOGIN USER
POST {{AuthUrl}}login/
Content-Type: application/json
{
"email": "[email protected]",
"password": "test"
}
### GET USER PROFILE
GET {{AuthUrl}}profile/4/
### GET ALL
GET {{PropertyBaseUrl}}/
### GET SINGLE
GET {{PropertyBaseUrl}}/{{PropertyId}}/
### CREATE NEW
POST {{PropertyBaseUrl}}/
Content-Type: application/json
{
"title": "TEST Great new home",
"status": "draft",
"listing_status": "for_sale",
"listing_type": "residential",
"property_type": "house",
"bed_num": 5,
"bath_num": 3,
"floors_num": 2,
"floor_location": 5,
"sq_meters": 500,
"year_built": 2020,
"land_size": 500,
"furnishings": "unfurnished",
"parking_spaces": 0,
"reference": "My ref",
"short_description": "This is a great new home",
"full_description": "A great new home offered for sale in a great place",
"address": 1
}
### DELETE SINGLE
DELETE {{PropertyBaseUrl}}/8/
### UPDATE SINGLE
PUT {{PropertyBaseUrl}}/1/
Content-Type: application/json
{
"id": 1,
"title": "Property description title",
"status": "active",
"listingStatus": "for_sale",
"listingType": "residential",
"propertyType": "house",
"bedNum": 1,
"bathNum": 1,
"floorsNum": 1,
"floorLocation": 1,
"sqMeters": 1,
"yearBuilt": 2000,
"landSize": 4,
"furnishings": "unfurnished",
"parkingSpaces": 3,
"reference": "thisIsMyReferencer",
"shortDescription": "This is my short description",
"fullDescription": "This is my longer description"
}
### CREATE IMAGE
POST {{PropertyBaseUrl}}/{{PropertyId}}/images/
Content-Type: application/json
{
"imgUrl": "https://env-0561487.jcloud-ver-jpe.ik-server.com/chiangmaiestateagents/wp-content/uploads/sites/6/2016/08/image2-3.jpg"
}
### DELETE IMAGE
DELETE {{PropertyBaseUrl}}/{{PropertyId}}/images/{{ImageId}}/
### COUNTRIES ###
### GET COUNTRIES
GET {{baseUrl}}cities/api/countries/?q=tha
### GET REGIONS
GET {{baseUrl}}cities/api/regions/?q=chiang
### GET CITIES
GET {{baseUrl}}cities/api/cities/?q=sanphakw