Richfella

AC Deals JSON

Mar 1st, 2023
760
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.07 KB | None | 0 0
  1. import requests
  2.  
  3. url = "https://premierbeautybrands.api-us1.com/api/3/deals"
  4.  
  5. payload = {"deal": {
  6.         "status": 0,
  7.         "fields": [
  8.             {
  9.                 "customFieldId": 1,
  10.                 "fieldValue": "First field value"
  11.             },
  12.             {
  13.                 "customFieldId": 2,
  14.                 "fieldValue": "2008-01-20"
  15.             },
  16.             {
  17.                 "customFieldId": 3,
  18.                 "fieldValue": 5500,
  19.                 "fieldCurrency": "EUR"
  20.             }
  21.         ],
  22.         "contact": "51",
  23.         "account": "45",
  24.         "description": "This deal is an important deal",
  25.         "currency": "usd",
  26.         "group": "1",
  27.         "owner": "1",
  28.         "percent": None,
  29.         "stage": "1",
  30.         "title": "AC Deal",
  31.         "value": 45600
  32.     }}
  33. headers = {
  34.     "accept": "application/json",
  35.     "content-type": "application/json",
  36.     "Api-Token": "32dcfd9bb3606f82beecf3f0e61c4f283642a296857b039adb3d2ac563a9fb150cfcee50"
  37. }
  38.  
  39. response = requests.post(url, json=payload, headers=headers)
  40.  
  41. print(response.text)
Advertisement
Add Comment
Please, Sign In to add comment