package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://matcher.sandbox.lerian.net/v1/exceptions/{exceptionId}/callback"
payload := strings.NewReader("{\n \"assignee\": \"user@example.com\",\n \"callbackType\": \"status_update\",\n \"dueAt\": \"2025-01-20T10:30:00Z\",\n \"externalIssueId\": \"RECON-1234\",\n \"externalSystem\": \"JIRA\",\n \"payload\": {},\n \"resolutionNotes\": \"Resolved by external agent\",\n \"status\": \"RESOLVED\",\n \"updatedAt\": \"2025-01-15T10:30:00Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Callback-Token", "<api-key>")
req.Header.Add("X-Idempotency", "<x-idempotency>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}