crm-api-template-generator/backend/Templates-test/pipedrive_bearer_auth_editi...

104 lines
2.7 KiB
JSON

{
"authentication": {
"type": "api_token",
"token": "1c97c52596abc18d3f727df3a620b5ef3f4f7d29",
"crmPhoneTest": "5511988334455"
},
"crmRest": [
{
"createContactRecord": {
"request": {
"requestContentType": "application/json",
"requestEncoding": "Json",
"requestType": "Post",
"responseType": "Json",
"url": "https://api.pipedrive.com/v1/persons"
},
"body": {
"name": "crmFirstName",
"phone": [
{
"value": "crmPhone",
"primary": true,
"label": "mobile"
}
]
},
"response": {
"id": "data.id"
}
}
},
{
"lookupContactByPhone": {
"request": {
"requestContentType": "application/json",
"requestEncoding": "Json",
"requestType": "Get",
"responseType": "Json",
"url": "https://api.pipedrive.com/v1/persons/search?term=crmPhone"
},
"response": {
"phone": "data.items.item.phones[0]",
"id": "data.item.id"
}
}
},
{
"callJournaling": {
"request": {
"requestContentType": "application/json",
"requestEncoding": "Json",
"requestType": "Post",
"responseType": "Json",
"url": "https://api.hubapi.com/engagements/v1/engagements"
},
"calls": [
{
"inboundAnsweredCall": {
"subject": "Ligação recebida",
"type": "Call",
"person_id": "crmContactId",
"done": "1",
"deal_id": "2",
"note": "Ligação recebida +crmPhone"
}
},
{
"inboundMissedCall": {
"subject": "Ligação perdida",
"type": "Call",
"person_id": "crmContactId",
"done": "0",
"deal_id": "2",
"note": "Ligação perdida +crmPhone"
}
},
{
"outboundAnsweredCall": {
"subject": "Ligação realizada",
"type": "Call",
"person_id": "crmContactId",
"done": "1",
"deal_id": "2",
"note": "Ligação realizada para +crmPhone"
}
},
{
"outboundUnansweredCall": {
"subject": "Ligação realizada perdida",
"type": "Call",
"person_id": "crmContactId",
"done": "0",
"deal_id": "2",
"note": "Ligação realizada para +crmPhone"
}
}
],
"response": {}
}
}
]
}