Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. POST /orders
  2. {
  3. id: 5,
  4. state: 'payment-expected',
  5. _links: {
  6. self: {
  7. method: 'GET',
  8. href: '/orders/5',
  9. }
  10. payment: {
  11. method: 'PUT',
  12. href: '/orders/5/payments',
  13. },
  14. change: {
  15. method: 'PUT',
  16. href: '/orders/5/changes',
  17. }
  18. cancel: {
  19. method: 'PUT',
  20. href: '/orders/5/cancels',
  21. }
  22. }
  23. }
  24.  
  25. GET /orders/:id // refresh
  26.  
  27.  
  28. PUT /order/:id/changes
  29. {
  30. id: 5,
  31. state: 'unpaid',
  32. _links: {
  33. self: {
  34. method: 'GET',
  35. href: '/orders/5',
  36. }
  37. payment: {
  38. method: 'PUT',
  39. href: '/orders/5/payments',
  40. },
  41. change: {
  42. method: 'PUT',
  43. href: '/orders/5/changes',
  44. }
  45. cancel: {
  46. method: 'PUT',
  47. href: '/orders/5/cancels',
  48. }
  49. }
  50. }
  51.  
  52. PUT /orders/:id/payments
  53. {
  54. id: 5,
  55. state: 'paid',
  56. _links: {
  57. self: {
  58. method: 'GET',
  59. href: '/orders/5',
  60. }
  61. take: {
  62. method: 'PUT',
  63. href: '/orders/5/takes',
  64. }
  65. }
  66. }
  67.  
  68. PUT /orders/:id/cancels
  69. {
  70. id: 5,
  71. state: 'canceled',
  72. _links: {
  73. self: {
  74. method: 'GET',
  75. href: '/orders/5',
  76. }
  77. }
  78. }
  79.  
  80. PUT /orders/:id/takes
  81. {
  82. id: 5,
  83. state: 'completed',
  84. _links: {
  85. self: {
  86. method: 'GET',
  87. href: '/orders/5',
  88. }
  89. }
  90. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement