Advertisement
Guest User

Untitled

a guest
May 26th, 2017
559
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.80 KB | None | 0 0
  1. Root
  2. curl https://blmc71vus7.execute-api.us-east-1.amazonaws.com/v1/
  3. Output:
  4. {"status": {"get": true}, "pickup/slots": {"get": true}, "type": {"get": true}, "price": {"get": true}, "/": {"get": true}}
  5.  
  6. Should we change price to false?
  7.  
  8. Type
  9. curl https://blmc71vus7.execute-api.us-east-1.amazonaws.com/v1/
  10.  
  11. Output:
  12. {"linehaul": false, "dropoff": false, "pickup": true, "postal": false, "type": "pickup"}
  13.  
  14. Status
  15. curl https://blmc71vus7.execute-api.us-east-1.amazonaws.com/v1/status
  16.  
  17. Output:
  18. {"available": true, "limit": 30000, "timeout": false, "response_time": 4.08266806602478}
  19.  
  20.  
  21.  
  22. Pickup
  23.  
  24. curl -H "Content-Type: application/json" -X POST -d '{
  25. "requestor": {
  26. "name": "Djibril",
  27. "phone": "+855886697345",
  28. "company": "Nagadev"
  29. },
  30. "place": {
  31. "line1": "166 Street 118",
  32. "line2": "Sangkat Phsar Chaas",
  33. "package_location": "Phsaar",
  34. "city": "Paris",
  35. "post_code": "95380",
  36. "country_code": "FR"
  37. },
  38. "pickup": {
  39. "pickup_date": "2017-05-29",
  40. "slot_id": "11111",
  41. "ready_by_time": "01:00",
  42. "close_time": "23:00",
  43. "number_of_pieces": 1,
  44. "special_instructions": "Be careful its my computer"
  45. },
  46. "shipment_details": {
  47. "number_of_pieces": 1,
  48. "weight": 1
  49. }
  50. }' https://blmc71vus7.execute-api.us-east-1.amazonaws.com/v1/pickup
  51.  
  52. Beware of pickup_date, ready_by_time and close_time. Those value should be realistic or an error will be returned.
  53.  
  54. Output:
  55. [{"requestor": {"phone": "+855886697345", "company": "Nagadev", "name": "Djibril"}, "pickup": {"ready_by_time": "01:00", "close_time": "23:00", "special_instructions": "Be careful its my computer", "slot_id": "11111", "pickup_date": "2017-05-29", "number_of_pieces": 1}, "place": {"city": "Paris", "post_code": "95380", "line2": "Sangkat Phsar Chaas", "line1": "166 Street 118", "country_code": "FR", "package_location": "Phsaar"}, "pickup_id": "245", "shipment_details": {"number_of_pieces": 1, "weight": 1}}]
  56.  
  57. Label
  58.  
  59. curl -H "Content-Type: application/json" -X POST -d '{
  60. "origin": {
  61. "name": "Djibou",
  62. "first_name": "Djibril",
  63. "last_name": "Cisse",
  64. "company": "Nagadev",
  65. "line1": "12 rue de Puiseux",
  66. "line2": "Corner Pinsons",
  67. "state": "IDF",
  68. "zipcode": "95380",
  69. "country": "France",
  70. "country_code": "FR",
  71. "phone": "+33632129547",
  72. "email": "djisse@gmail.com"
  73. },
  74. "destination": {
  75. "name": "TiTin",
  76. "first_name": "Hamly",
  77. "last_name": "Tin",
  78. "company": "Nagadev",
  79. "line1": "118 Street 118",
  80. "line2": "Phsaar Kandal",
  81. "state": "PP",
  82. "zipcode": "0000",
  83. "country": "Cambodia",
  84. "country_code": "KH",
  85. "phone": "+855886697345",
  86. "email": "hamly@gmail.com"
  87. },
  88. "parcel": {
  89. "length_in_cm": 100,
  90. "width_in_cm": 100,
  91. "height_in_cm": 100,
  92. "weight_in_grams": 1000
  93. },
  94. "dropoff_informations": {
  95. "dropoff_point_id": "none"
  96. },
  97. "metadata": {
  98. "RMA": "Here is metadata"
  99. }
  100. }' https://blmc71vus7.execute-api.us-east-1.amazonaws.com/v1/label
  101.  
  102. Output:
  103. {"origin": {"first_name": "Djibril", "last_name": "Cisse", "name": "Djibou", "country": "France", "company": "Nagadev", "line2": "Corner Pinsons", "line1": "12 rue de Puiseux", "zipcode": "95380", "phone": "+33632129547", "state": "IDF", "country_code": "FR", "email": "djisse@gmail.com"}, "label_url": "https://s3-us-west-2.amazonaws.com/srbstickers/1495774749.97.pdf", "destination": {"first_name": "Hamly", "last_name": "Tin", "name": "TiTin", "country": "Cambodia", "company": "Nagadev", "line2": "Phsaar Kandal", "line1": "118 Street 118", "zipcode": "0000", "phone": "+855886697345", "state": "PP", "country_code": "KH", "email": "hamly@gmail.com"}, "parcel": {"weight_in_grams": 1000, "width_in_cm": 100, "height_in_cm": 100, "length_in_cm": 100}, "shipment_id": "1045549750"}
  104.  
  105. Pickup/Slots
  106. curl https://blmc71vus7.execute-api.us-east-1.amazonaws.com/v1/pickup/slots
  107.  
  108. Output
  109. [{"date": "2017-05-27 05:13:30.756935", "slots": [{"duration": 646, "start_time": "2017-05-27 16:00:00:000Z", "availability": 0}, {"duration": 766, "start_time": "2017-05-27 18:00:00:000Z", "availability": 0}]}, {"date": "2017-05-28 05:13:30.756935", "slots": [{"duration": 646, "start_time": "2017-05-28 16:00:00:000Z", "availability": 0}, {"duration": 766, "start_time": "2017-05-28 18:00:00:000Z", "availability": 0}]}, {"date": "2017-05-29 05:13:30.756935", "slots": [{"duration": 646, "start_time": "2017-05-29 16:00:00:000Z", "availability": 0}, {"duration": 766, "start_time": "2017-05-29 18:00:00:000Z", "availability": 0}]}, {"date": "2017-05-30 05:13:30.756935", "slots": [{"duration": 646, "start_time": "2017-05-30 16:00:00:000Z", "availability": 0}, {"duration": 766, "start_time": "2017-05-30 18:00:00:000Z", "availability": 0}]}, {"date": "2017-05-31 05:13:30.756935", "slots": [{"duration": 646, "start_time": "2017-05-31 16:00:00:000Z", "availability": 0}, {"duration": 766, "start_time": "2017-05-31 18:00:00:000Z", "availability": 0}]}, {"date": "2017-06-01 05:13:30.756935", "slots": [{"duration": 646, "start_time": "2017-06-01 16:00:00:000Z", "availability": 0}, {"duration": 766, "start_time": "2017-06-01 18:00:00:000Z", "availability": 0}]}, {"date": "2017-06-02 05:13:30.756935", "slots": [{"duration": 646, "start_time": "2017-06-02 16:00:00:000Z", "availability": 0}, {"duration": 766, "start_time": "2017-06-02 18:00:00:000Z", "availability": 0}]}]
  110. A little bit slow because of th 7 queries... we are looking for a way to fix this issue. But it's working already.
  111.  
  112. Question: For "duration": It's the timelapse in minute between now and the pickup slot right? Could you confirm it plz, because for the last slot, 7 days after the timelapse in minute will be very high. Actually it's the timelapse betweend the current time and the pickup.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement