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

96 lines
2.9 KiB
JSON
Raw Permalink Normal View History

{
"authentication":{
"type": "bearer",
"token": "pat-na1-7aca13dd-9ba5-48db-bf35-570844d31abb",
"crmPhoneTest": "5511988334455"
},
"crmRest":[
{
"createContactRecord":{
"request":{
"requestContentType":"application/json",
"requestEncoding":"Json",
"requestType":"Post",
"responseType":"Json",
"url":"https://api.hubapi.com/contacts/v1/contact"
},
"body":{
"properties":[
{
"property":"phone",
"value":"crmPhone"
}
]
},
"response":{
"id":"vid"
}
}
},
{
"lookupContactByPhone":{
"request":{
"requestContentType":"application/json",
"requestEncoding":"Json",
"requestType":"Get",
"responseType":"Json",
"url":"https://api.hubapi.com/contacts/v1/search/query?q=crmPhone"
},
"response":{
"phone":"contacts.properties.phone.value",
"id":"contacts.vid"
}
}
},
{
"callJournaling":{
"request":{
"requestContentType":"application/json",
"requestEncoding":"Json",
"requestType":"Post",
"responseType":"Json",
"url":"https://api.hubapi.com/engagements/v1/engagements"
},
"calls":[
{
"inboundAnsweredCall":{
"engagement":{
"active":true,
"type":"CALL"
},
"associations":{
"contactIds":[
{
"_prop":"crmContactId",
"_type":"number"
}
]
},
"metadata":{
"toNumber":{
"_prop":"crmAgent",
"_type":"string"
},
"fromNumber":{
"_prop":"crmPhone",
"_type":"string"
},
"status":"COMPLETED",
"durationMilliseconds":{
"_prop": "crmCallDuration",
"_type": "number",
"_format": "milliseconds"
},
"body":"Ligação recebida - inbound call",
"disposition":"f240bbac-87c9-4f6e-bf70-924b57d47db7"
}
}
}
],
"response":{
}
}
}
]
}