Saltar al contenido principal

Get Lost Opportunity

Retrieve detailed information about a specific lost opportunity by its ID.

🔹 Endpoint Details​

GET /api/v1/lost-opportunities/{id}

🔒 Authentication​

HeaderRequiredDescription
Content-TypeYesMust be application/json
AuthorizationYesFormat: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature

📝 Path Parameters​

ParameterTypeRequiredDescription
idstring (UUID)YesUnique identifier of the lost opportunity

🧩 Request Example​

curl -X GET "https://openapi.onlive.site/api/v1/lost-opportunities/123e4567-e89b-12d3-a456-426614174000" \
-H "Content-Type: application/json" \
-H "Authorization: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature"

📥 Response Format (HTTP 200)​

See Lost Opportunity Properties for the full entity schema.

FieldTypeDescription
idstring (UUID)Unique identifier
organizationIdstring (UUID)Owning organization
organizationNamestringDenormalized organization name
entityTypeenumiCall | iChat | booking
interactionIdstringSource interaction identifier
statusenumpending | processed | rejected
reasonstringLoss reason
commentstringFree-form comment
originstringOrigin name
userEmailstringContact email
userPhonestringContact phone
extraFieldsobjectCustom metadata
userGroupIdstring (UUID)Assigned user group
userGroupstringDenormalized user group name
involvedAgentstring (UUID)Agent that handled the interaction
visibleAtstring (ISO 8601)Datetime the record becomes visible
externalIdstringExternal identifier
createdAtstring (ISO 8601)Creation timestamp
updatedAtstring (ISO 8601)Last update timestamp

Response Example​

{
"id": "123e4567-e89b-12d3-a456-426614174000",
"organizationId": "123e4567-e89b-12d3-a456-426614174001",
"organizationName": "Acme Inc.",
"entityType": "iCall",
"interactionId": "call_abc123",
"status": "processed",
"reason": "Customer chose a competitor",
"comment": "Customer asked to be contacted again in Q3",
"origin": "Website contact form",
"userEmail": "[email protected]",
"userPhone": "+33612345678",
"extraFields": { "department": "Sales" },
"userGroupId": "550e8400-e29b-41d4-a716-446655440000",
"userGroup": "Sales Team",
"involvedAgent": "123e4567-e89b-12d3-a456-426614174002",
"visibleAt": "2025-05-13T15:00:00Z",
"externalId": "frm_abc123",
"createdAt": "2025-05-13T15:00:00Z",
"updatedAt": "2025-05-13T16:42:11Z"
}

❌ Error Responses​

StatusDescription
404Lost opportunity not found

This endpoint follows the standard error format.

📘 Notes​

  • The lost opportunity must belong to your organization
  • involvedAgent, organizationName, userGroup, and visibleAt are server-managed

✅ Common Use Cases​

  • 🔍 Detail View: Open a single record in an agent dashboard
  • 🔁 Sync: Refresh a local cache after a webhook
  • 🧾 Audit: Fetch a record for compliance review