Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- url = "https://premierbeautybrands.api-us1.com/api/3/deals"
- payload = {"deal": {
- "status": 0,
- "fields": [
- {
- "customFieldId": 1,
- "fieldValue": "First field value"
- },
- {
- "customFieldId": 2,
- "fieldValue": "2008-01-20"
- },
- {
- "customFieldId": 3,
- "fieldValue": 5500,
- "fieldCurrency": "EUR"
- }
- ],
- "contact": "51",
- "account": "45",
- "description": "This deal is an important deal",
- "currency": "usd",
- "group": "1",
- "owner": "1",
- "percent": None,
- "stage": "1",
- "title": "AC Deal",
- "value": 45600
- }}
- headers = {
- "accept": "application/json",
- "content-type": "application/json",
- "Api-Token": "32dcfd9bb3606f82beecf3f0e61c4f283642a296857b039adb3d2ac563a9fb150cfcee50"
- }
- response = requests.post(url, json=payload, headers=headers)
- print(response.text)
Advertisement
Add Comment
Please, Sign In to add comment