-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapiary.apib
3367 lines (2399 loc) · 96.4 KB
/
apiary.apib
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
FORMAT: 1A
HOST: https://errnd.herokuapp.com/api/v1
# Errnd
Errnd is a platform where your errands are completed by your communities
#### Features
* Users can create an account and log in
* Users can create a profile and view their profile or others profile
* Users can switch thier role from runner to customer and vice versa
* Users can create and update services
* Users can view services created
* Users can search for services
* Users can create, retrieve, search and delete services bookmarked
* Users can send and receive messages
* Users can receive notifications
* Customers can create, retrieve, update the status of orders and delete orders
* Runners can retrieve tasks assigned to them and update the status of tasks
## Welcome Page [/]
### Welcome a user [GET]
* Helps to welcome a user to the API
+ Request (application/json)
+ Response 200 (application/json)
+ Headers
Location: /
+ Body
{
"status": 200,
"data": {
"message": "Welcome to Errnd API, A platform where your errands are completed by your communities"
}
}
## Sign up [/auth/signup]
### Sign up a user [POST]
* Helps a user to sign up on the API
+ Request (application/json)
{
"role": "runner",
"email": "[email protected]",
"password": "password",
"username": "newuser"
}
+ Response 201 (application/json)
+ Headers
Location: /auth/signup
+ Body
{
"status": 201,
"data": {
"message": "User created successfully",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImN1c3RvbWVyNDAwMEBjdXN0b21lci5jb20iLCJ1c2VySWQiOjUsInJvbGUiOiJjdXN0b21lciIsImlhdCI6MTU1OTE0ODI3NSwiZXhwIjoxNTU5MjM0Njc1fQ.E0sQef1pYjYI0B0v6IDokrwiW-2XF1ADJE4ddy2bqJ0"
}
}
+ Response 409 (application/json)
+ Headers
Location: /auth/signup
+ Body
{
"status": 409,
"data": {
"error": "User already exists, please sign up a new user"
}
}
+ Response 400 (application/json)
+ Headers
Location: /auth/signup
+ Body
{
"status": 400,
"data": {
"error": {
"email": "Invalid email"
}
}
}
{
"status": 400,
"data": {
"error": "role must be runner or customer"
}
}
## Signin [/auth/login]
### Login a user [POST]
* Helps a user to use all features of the API
+ Request (application/json)
{
"email": "[email protected]",
"password": "password"
}
+ Response 200 (application/json)
+ Headers
Location: /auth/login
+ Body
{
"status": 200,
"data": {
"message": "Welcome newuser",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImN1c3RvbWVyNDAwMEBjdXN0b21lci5jb20iLCJ1c2VySWQiOjUsInJvbGUiOiJjdXN0b21lciIsImlhdCI6MTU1OTE0ODM4MywiZXhwIjoxNTU5MjM0NzgzfQ.Y6Uao5otns3NJSWwGo-XgOwW8PTckVlu1QPgJ11UN04"
}
}
+ Response 401 (application/json)
+ Headers
Location: /auth/login
+ Body
{
status: 401,
data: {
message: 'Invalid email/username or password',
}
}
+ Response 404 (application/json)
+ Headers
Location: /auth/login
+ Body
{
status: 404,
data: {
error: 'User not found, please register user onto the platform',
}
}
+ Response 400 (application/json)
+ Headers
Location: /auth/login
+ Body
{
"status": 400,
"data": {
"error": {
emailOrUsername: 'email or username must be filled',
password: 'password must be filled',
}
}
}
{
"status": 400,
"data": {
"error": {
email: 'Invalid email'
}
}
## Profile [/profile/{username}]
+ Parameters
+ username (text) - johndolly
### Create user's profile [POST]
* Helps a user to populate his profile after signing up onto the platform
+ Request
+ Body
{
"firstName": "John",
"lastName": "Dolly",
"image": "https://images.unsplash.com/photo-1497551060073-4c5ab6435f12?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=967&q=80",
"location": "Lagos",
"bio": "I am a sofware engineer",
"phone": "09099933373"
}
+ Headers
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InJ1bm5lckBydW5uZXIuY29tIiwidXNlcklkIjoxLCJyb2xlIjoiY3VzdG9tZXIiLCJ1c2VybmFtZSI6ImludmFsaWR1c2VyIiwiaWF0IjoxNTU5Mzk2Nzg2LCJleHAiOjE1NTk0ODMxODZ9.0PItRXbVtKezfd6FTLTgEcKYOGd1EY3UVYOLWGcgACo
+ Response 200 (application/json)
+ Headers
Location: /profile/johndolly
+ Body
{
"status": 200,
"data": {
"message": "Users profile created successfully",
"profile": {
"id": 1,
"firstName": "John",
"lastName": "Dolly",
"phone": "09099933373",
"image": "https://images.unsplash.com/photo-1497551060073-4c5ab6435f12?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=967&q=80",
"bio": "I am a sofware engineer",
"location": "Lagos",
"createdAt": "2019-05-30T21:05:53.725Z",
"updatedAt": "2019-06-01T13:42:53.520Z",
"userId": 10
}
}
}
+ Response 401 (application/json)
+ Headers
Location: /auth/johndolly
+ Body
{
status: 401,
data: {
error: 'Unauthorized, you cannot edit another person's profile',
}
}
{
status: 401,
data: {
error: 'Unauthorized, user not authenticated',
}
}
### View a user's profile [GET]
* Helps a user to get his or other people profile
+ Request (application/json)
+ Response 200 (application/json)
+ Headers
Location: /profile/billzuckerberg
+ Body
{
"status": 200,
"data": {
"message": "Users profile returned succesfully",
"user": {
"id": 4,
"firstName": "Bill",
"lastName": "Zuckerberg",
"phone": "09099933323",
"image": "https://images.unsplash.com/photo-1497551060073-4c5ab6435f12?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=967&q=80",
"bio": "I am a sofware engineer and ceo",
"location": "Lagos",
"createdAt": "2019-06-01T13:47:31.063Z",
"updatedAt": "2019-06-01T13:47:31.063Z",
"role": "customer",
"email": "[email protected]",
"username": "runner"
}
}
}
+ Response 404 (application/json)
+ Headers
Location: /profile/unregistereduser
+ Body
{
"status": 404,
"data": {
"message": "User's profile not found",
"profile": {}
}
}
## Role [/role/{username}]
+ Parameters
+ username (text) - johndolly
### Switch user's role [PUT]
* Helps a user to switch his role from runner to customer and vice versa
+ Request
+ Body
{
"role": "customer"
}
+ Headers
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InJ1bm5lckBydW5uZXIuY29tIiwidXNlcklkIjoxLCJyb2xlIjoiY3VzdG9tZXIiLCJ1c2VybmFtZSI6ImludmFsaWR1c2VyIiwiaWF0IjoxNTU5Mzk2Nzg2LCJleHAiOjE1NTk0ODMxODZ9.0PItRXbVtKezfd6FTLTgEcKYOGd1EY3UVYOLWGcgACo
+ Response 200 (application/json)
+ Headers
Location: /role/johndolly
+ Body
{
"status": 200,
"data": {
"message": "Users role switched succesfully"
}
}
+ Response 404 (application/json)
+ Headers
Location: /role/johndolly
+ Body
{
"status": 404,
"data": {
"message": "User's profile not found",
"profile": {}
}
}
+ Response 401 (application/json)
+ Headers
Location: /role/johndolly
+ Body
{
status: 401,
data: {
error: 'Unauthorized, you cannot switch another person's role'
}
}
+ Response 400 (application/json)
+ Headers
Location: /role/johndolly
+ Body
{
"status": 400,
"data": {
"error": "role must be runner or customer"
}
}
## Services [/services/{username}]
+ Parameters
+ username (text) - johndolly
### A runner can create a service [POST]
* Helps a runner to create a service
+ Request
+ Body
{
"category": "Computer Science",
"subcategory": "Web Development",
"title": "Develop your web app",
"description": "I can develop your web app using express,react and react native following TDD and Agile",
"price": 3500,
"days": 3,
"media": "https://images.unsplash.com/photo-1517694712202-14dd9538aa97?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1650&q=80",
"location": "Lagos",
"packageoptions": [{
"serviceA": "add map to the web app",
"quantity": 1,
"type": "basic",
"price": 2500
},
{
"serviceB": "add timer to the web app",
"quantity": 1,
"type": "basic",
"price": 1000
}]
}
+ Headers
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InJ1bm5lckBydW5uZXIuY29tIiwidXNlcklkIjoxLCJyb2xlIjoiY3VzdG9tZXIiLCJ1c2VybmFtZSI6ImludmFsaWR1c2VyIiwiaWF0IjoxNTU5Mzk2Nzg2LCJleHAiOjE1NTk0ODMxODZ9.0PItRXbVtKezfd6FTLTgEcKYOGd1EY3UVYOLWGcgACo
+ Response 200 (application/json)
+ Headers
Location: /services/johndolly
+ Body
{
"status": 201,
"data": {
"message": "Service created successfully",
"service": {
"id": 1,
"category": "Computer Science",
"subcategory": "Web Development",
"title": "Develop your web app",
"description": "I can develop your web app using express,react and react native following TDD and Agile",
"price": 3500,
"days": 3,
"media": "https://images.unsplash.com/photo-1517694712202-14dd9538aa97?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1650&q=80",
"location": "Lagos",
"packageoptions": [
{
"serviceA": "add map to the web app",
"quantity": 1,
"type": "basic",
"price": 2500
},
{
"serviceB": "add timer to the web app",
"quantity": 1,
"type": "basic",
"price": 1000
}
],
"userId": 1,
"updatedAt": "2019-06-06T12:49:06.704Z",
"createdAt": "2019-06-06T12:49:06.704Z"
}
}
}
+ Response 401 (application/json)
+ Headers
Location: /services/johndolly
+ Body
{
status: 401,
data: {
error: 'Unauthorized, you cannot create a service on behalf of another user',
}
}
{
status: 401,
data: {
error: 'Unauthorized, user not authenticated',
}
}
+ Response 400 (application/json)
+ Headers
Location: /services/johndolly
+ Body
{
"status": 400,
"data": {
"error": {
"price": "price must be a number",
"days": ""
}
}
}
{
"status": 400,
"data": {
"error": {
"category": "category must be filled",
"subcategory": "",
"title": "",
"price": "",
"days": "",
"location": "",
}
}
}
### Retrieve all created services by a runner [GET]
* Helps to retrieve all created services by a runner
+ Request (application/json)
+ Response 200 (application/json)
+ Headers
Location: /services/johndolly
+ Body
{
"status": 200,
"data": {
"message": "All runner services returned successfully",
"services": [
{
"id": 2,
"category": "Phones",
"subcategory": "Android phone repair",
"title": "Repair your Android phone",
"description": "I can repair any type of android device from Samsung to Techno, itel, infinix etc",
"price": 1200,
"days": 1,
"media": "https://images.unsplash.com/photo-1517694712202-14dd9538aa97?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1650&q=80",
"location": "Lagos",
"packageoptions": [
{
"serviceA": "add music to your androis phone",
"quantity": 3,
"type": "basic",
"price": 450
}
],
"createdAt": "2019-06-06T17:09:27.138Z",
"updatedAt": "2019-06-06T17:09:27.138Z",
"user": {
"email": "[email protected]",
"username": "testrunner2"
}
}
]
}
}
+ Response 404 (application/json)
+ Headers
Location: /services/johndolly/1
+ Body
{
"status": 404,
"data": {
"message": "Runner not found"
}
}
## Update a Service [/services/{username}/update/{serviceId}]
+ Parameters
+ username (text) - johndolly
+ serviceId (number) - 1
### A runner can update a service [POST]
* Helps a runner to update a service he created
+ Request
+ Body
{
"category": "Computer Science",
"subcategory": "Web Development",
"title": "Develop your mobile app",
"description": "I can develop your mobile app using Java/android following TDD and Agile",
"price": 3500,
"days": 1,
"media": "https://images.unsplash.com/photo-1517694712202-14dd9538aa97?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1650&q=80",
"location": "Abuja",
"packageoptions": [{
"serviceA": "add map to the mobile app",
"quantity": 1,
"type": "basic",
"price": 2500
},
{
"serviceB": "add timer to the mobile app",
"quantity": 1,
"type": "basic",
"price": 1000
}]
}
+ Headers
Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InJ1bm5lckBydW5uZXIuY29tIiwidXNlcklkIjoxLCJyb2xlIjoiY3VzdG9tZXIiLCJ1c2VybmFtZSI6ImludmFsaWR1c2VyIiwiaWF0IjoxNTU5Mzk2Nzg2LCJleHAiOjE1NTk0ODMxODZ9.0PItRXbVtKezfd6FTLTgEcKYOGd1EY3UVYOLWGcgACo
+ Response 200 (application/json)
+ Headers
Location: /services/johndolly/update/1
+ Body
{
"status": 200,
"data": {
"message": "Service updated successfully",
"service": {
"id": 1,
"category": "Computer Science",
"subcategory": "Web Development",
"title": "Develop your mobile app",
"description": "I can develop your mobile app using Java/android following TDD and Agile",
"price": 3500,
"days": 1,
"media": "https://images.unsplash.com/photo-1517694712202-14dd9538aa97?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1650&q=80",
"location": "Abuja",
"packageoptions": [{
"serviceA": "add map to the mobile app",
"quantity": 1,
"type": "basic",
"price": 2500
},
{
"serviceB": "add timer to the mobile app",
"quantity": 1,
"type": "basic",
"price": 1000
}]
"createdAt": "2019-06-05T12:46:55.003Z",
"updatedAt": "2019-06-05T14:30:06.576Z",
"userId": 1
}
}
}
+ Response 401 (application/json)
+ Headers
Location: /services/johndolly/update/1
+ Body
{
status: 401,
data: {
error: 'Unauthorized, you cannot update a service on behalf of another user',
}
}
{
status: 401,
data: {
error: 'Unauthorized, user not authenticated',
}
}
+ Response 404 (application/json)
+ Headers
Location: /services/johndolly/update/1
+ Body
{
"status": 404,
"data": {
"message": "Service not found",
"service": {}
}
}
## View all services [/services]
### Retrieve all created services [GET]
* Helps to retrieve all created services
+ Request (application/json)
+ Response 200 (application/json)
+ Headers
Location: /services
+ Body
{
"status": 200,
"data": {
"message": "All runners services returned successfully",
"services": [
{
"id": 2,
"category": "Phones",
"subcategory": "Android phone repair",
"title": "Repair your Android phone",
"description": "I can repair any type of android device from Samsung to Techno, itel, infinix etc",
"price": 1200,
"days": 1,
"media": "https://images.unsplash.com/photo-1517694712202-14dd9538aa97?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1650&q=80",
"location": "Lagos",
"packageoptions": [
{
"serviceA": "add music to your androis phone",
"quantity": 3,
"type": "basic",
"price": 450
}
],
"createdAt": "2019-06-06T17:09:27.138Z",
"updatedAt": "2019-06-06T17:09:27.138Z",
"user": {
"email": "[email protected]",
"username": "testrunner2"
}
},
{
"id": 1,
"category": "Computer Science",
"subcategory": "Web Development",
"title": "Develop your web app",
"description": "I can develop your web app using express,react and react native following TDD and Agile",
"price": 3500,
"days": 3,
"media": "https://images.unsplash.com/photo-1517694712202-14dd9538aa97?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1650&q=80",
"location": "Port Harcourt",
"packageoptions": [
{
"serviceA": "add map to the web app",
"quantity": 1,
"type": "basic",
"price": 2500
},
{
"serviceB": "add timer to the web app",
"quantity": 1,
"type": "basic",
"price": 1000
}
],
"createdAt": "2019-06-06T12:49:06.704Z",
"updatedAt": "2019-06-06T12:49:06.704Z",
"user": {
"email": "[email protected]",
"username": "testrunner1"
}
}
]
}
}
## View a specific services [/services/{username}/{serviceId}]
+ Parameters
+ username (text) - johndolly
+ serviceId (number) - 1
### Retrieve a specific services by a runner [GET]
* Helps to retrieve a specific services by a runner
+ Request (application/json)
+ Response 200 (application/json)
+ Headers
Location: /services/johndolly/1
+ Body
{
"status": 200,
"data": {
"message": "Specific runner services returned successfully",
"services": [
{
"id": 1,
"category": "Computer Science",
"subcategory": "Web Development",
"title": "Develop your web app",
"description": "I can develop your web app using express,react and react native following TDD and Agile",
"price": 3500,
"days": 3,
"media": "https://images.unsplash.com/photo-1517694712202-14dd9538aa97?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1650&q=80",
"location": "Port Harcourt",
"packageoptions": [
{
"serviceA": "add map to the web app",
"quantity": 1,
"type": "basic",
"price": 2500
},
{
"serviceB": "add timer to the web app",
"quantity": 1,
"type": "basic",
"price": 1000
}
],
"createdAt": "2019-06-06T12:49:06.704Z",
"updatedAt": "2019-06-06T12:49:06.704Z",
"user": {
"email": "[email protected]",
"username": "testrunner1"
}
}
]
}
}
+ Response 404 (application/json)
+ Headers
Location: /services/johndolly/1
+ Body
{
"status": 404,
"data": {
"message": "Runner not found"
}
}
## Search for services [/services/search?query=Develop your web app]
### Retrieve services by searching for them [GET]
* Helps to retrieve services that match certain search parameters
+ Request (application/json)
+ Response 200 (application/json)
+ Headers
Location: /services/search?query=Develop your web app
+ Body
{
"status": 200,
"data": {
"message": "Searched services returned successfully",
"services": [
{
"id": 1,
"category": "Computer Science",
"subcategory": "Web Development",
"title": "Develop your web app",
"description": "I can develop your web app using express,react and react native following TDD and Agile",
"price": 3500,
"days": 3,
"media": "https://images.unsplash.com/photo-1517694712202-14dd9538aa97?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1650&q=80",
"location": "Port Harcourt",
"packageoptions": [
{
"serviceA": "add map to the web app",
"quantity": 1,
"type": "basic",
"price": 2500
},
{
"serviceB": "add timer to the web app",
"quantity": 1,
"type": "basic",
"price": 1000
}
],
"createdAt": "2019-06-06T12:49:06.704Z",
"updatedAt": "2019-06-06T12:49:06.704Z",
"user": {
"email": "[email protected]",
"username": "testrunner1"
}
}
]
}
}
+ Response 404 (application/json)
+ Headers
Location: /services/search?query=vvbvvnvnvnvnvnn
+ Body
{
"status": 404,
"data": {
"message": "No services matching the searched parameter",
"services": {}
}
}
+ Response 400 (application/json)
+ Headers
Location: /services/search?querrrrrrry=Develop your web app
+ Body
{
"status": 400,
"data": {
"message": "Invalid url, url should be like /search?query="
}
}
## Bookmark services [/bookmarks/create]
### Create a bookmark [POST]