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

188 lines
5.4 KiB
JSON

{
"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"
}
}
},
{
"inboundMissedCall": {
"engagement": {
"active": true,
"type": "CALL"
},
"associations": {
"contactIds": [
{
"_prop": "crmContactId",
"_type": "number"
}
]
},
"metadata": {
"toNumber": {
"_prop": "crmAgent",
"_type": "string"
},
"fromNumber": {
"_prop": "crmPhone",
"_type": "string"
},
"status": "COMPLETED",
"body": "Ligação perdida - inbound call",
"disposition": "f240bbac-87c9-4f6e-bf70-924b57d47db7"
}
}
},
{
"outboundAnsweredCall": {
"engagement": {
"active": true,
"type": "CALL"
},
"associations": {
"contactIds": [
{
"_prop": "crmContactId",
"_type": "number"
}
]
},
"metadata": {
"fromNumber": {
"_prop": "crmPhone",
"_type": "string"
},
"toNumber": {
"_prop": "crmAgent",
"_type": "string"
},
"status": "COMPLETED",
"durationMilliseconds": {
"_prop": "crmCallDuration",
"_type": "number",
"_format": "milliseconds"
},
"body": "Ligação atendida - outbound call",
"disposition": "f240bbac-87c9-4f6e-bf70-924b57d47db7"
}
}
},
{
"outboundUnansweredCall": {
"engagement": {
"active": true,
"type": "CALL"
},
"associations": {
"contactIds": [
{
"_prop": "crmContactId",
"_type": "number"
}
]
},
"metadata": {
"fromNumber": {
"_prop": "crmAgent",
"_type": "string"
},
"toNumber": {
"_prop": "crmPhone",
"_type": "string"
},
"status": "COMPLETED",
"body": "Ligação perdida - oubound call",
"disposition": "f240bbac-87c9-4f6e-bf70-924b57d47db7"
}
}
}
],
"response":{
}
}
}
]
}