FlyWithMe

Untitled

Mar 31st, 2021
541
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.78 KB | None | 0 0
  1. data = {
  2.     "firstName":"TestAPI",
  3.     "lastName": "TEST",
  4.     "email": "[email protected]",
  5.     "phone":"+79993332211",
  6.     "date":"September 15, 2021",
  7.     "time":"09:30",
  8.     "endTime":"11:30",
  9.     "datetime":"2021-09-15T09:30:00+0300",
  10.     "price":"95.00",
  11.     "type":"Standard",
  12.     "appointmentTypeID":20215494,
  13.     "duration": "120",
  14.     "calendar": "Refyne ",
  15.     "calendarID": 4887339,
  16.     "location": "TEST",
  17.     "notes": "TESTTESTTEST",
  18.     "forms":[{"id": 1655981,
  19.                 "name": "Appointment Form",
  20.                 "values":
  21.                   [
  22.                       {"id": 1673900822,
  23.                        "fieldID": 9149417,
  24.                        "value": "Address 1231 street 12",
  25.                        "name": "Address"
  26.                         },
  27.                         {
  28.                             "id":1673900823,
  29.                             "fieldID":9149418,
  30.                             "value":"TEST",
  31.                             "name":"Do you have any allergies?"
  32.                         },
  33.                         {
  34.                             "id":1673900824,
  35.                             "fieldID":9149419,
  36.                             "value":"TEST",
  37.                             "name":"Special Requests"
  38.                         },
  39.                         {
  40.                             "id":1673900825,
  41.                             "fieldID":9149420,
  42.                             "value":"TEST",
  43.                             "name":"How did you find out about us?"
  44.                         },
  45.                     ]
  46.             }
  47.         ]
  48.  
  49. }
  50.  
  51. headers = {'Content-type': 'application/json'}
  52. url = "https://acuityscheduling.com/api/v1/appointments"
  53. res = requests.post(url, json=data, auth=(UserID, APIKey), headers=headers)
  54. print(res.text)
Advertisement
Add Comment
Please, Sign In to add comment