Untitled
unknown
plain_text
2 years ago
2.1 kB
6
Indexable
def execute_request(inputData):
import requests
import json
apiKey = 'LBBXstYd6H7fCmMI0v1EFeKALeY+GRU5Gn7opYaG7GY='
url = 'https://fahr-zeit.europersonal.com/api/public/v1/Bewerbung/Create'
output = {'test': 'test'}
data = {
"bewerbung": {
"BeworbenAls": inputData['beworbenAls'],
"Mandant": {
"ObjectUuid": inputData['mandantUuid'],
"Bezeichnung": inputData['mandantName']
},
"Quelle": {
"ObjectUuid": inputData['quelleUuid'],
"Bezeichnung": inputData['quelleName']
},
"QuelleFreitext": inputData['quelleName'],
"Stelle": {
"ObjectUuid": inputData['stelleUuid'],
"Bezeichnung": inputData['beworbenAls'],
"MandantUuid": inputData['mandantUuid']
}
},
"mitarbeiter": {
"Adressen": [
{
"Plz": inputData['plz']
}
],
"Anrede": {
"ObjectUuid": inputData['anredeUuid'],
"Bezeichnung": inputData['anredeBezeichnung']
},
"BenutzerdefinierteEigenschaften": [
{
"Name": "WeitereInformationen",
"Wert": inputData['weitereInformation']
}
],
"Email": inputData['email'],
"Nachname": inputData['nachname'],
"Telefon": inputData['telefon'],
"Vorname": inputData['vorname']
},
"skills": [],
"werdegaenge": []
}
headers = {
"X-ApiKey": apiKey
}
requests.post('http://example.com/example/asdfas', files={'bewerbung': (None, data)}, headers=headers)
if response.ok:
responseData = response.json()
return {'success': True, 'data': responseData}
else:
errorData = response.json()
return {'success': False, 'error': errorData}
return {'success': false}Editor is loading...
Leave a Comment