Advertisement
Anatoliy_Gerasimov

POST : /api/v1/blog/create

Mar 29th, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 0.82 KB | None | 0 0
  1. {
  2.   "code": 422,
  3.   "errors": [
  4.     {
  5.       "field": "title",
  6.       "message": "Title must be provided"
  7.     },
  8.     {
  9.       "field": "category_id",
  10.       "message": "The category id field is required."
  11.     },
  12.     {
  13.       "field": "body",
  14.       "message": "Body must be provided"
  15.     }
  16.   ]
  17. }
  18.  
  19.  
  20.  
  21. {
  22.   "code": 422,
  23.   "errors": [
  24.     {
  25.       "field": "category_id",
  26.       "message": "The selected category id is invalid."
  27.     }
  28.   ]
  29. }
  30.  
  31.  
  32.  
  33.  
  34. {
  35.   "code": 200,
  36.   "message": "Blog post created",
  37.   "result": {
  38.     "data": {
  39.       "id": 64,
  40.       "title": "ff",
  41.       "category": {
  42.         "id": 1,
  43.         "name": "Category 1"
  44.       },
  45.       "body": "FF",
  46.       "created": {
  47.         "date": "2017-03-29 13:52:44.000000",
  48.         "timezone_type": 3,
  49.         "timezone": "UTC"
  50.       }
  51.     }
  52.   }
  53. }
  54. cate
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement