Skip to main content
POST
/
v1
/
exceptions
/
{exceptionId}
/
callback
Process exception callback
curl --request POST \
  --url https://matcher.sandbox.lerian.net/v1/exceptions/{exceptionId}/callback \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "externalSystem": "JIRA",
  "externalIssueId": "RECON-1234",
  "status": "RESOLVED",
  "callbackType": "status_update",
  "resolutionNotes": "<string>",
  "assignee": "<string>",
  "dueAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "payload": {}
}
'
import requests

url = "https://matcher.sandbox.lerian.net/v1/exceptions/{exceptionId}/callback"

payload = {
"externalSystem": "JIRA",
"externalIssueId": "RECON-1234",
"status": "RESOLVED",
"callbackType": "status_update",
"resolutionNotes": "<string>",
"assignee": "<string>",
"dueAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"payload": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
externalSystem: 'JIRA',
externalIssueId: 'RECON-1234',
status: 'RESOLVED',
callbackType: 'status_update',
resolutionNotes: '<string>',
assignee: '<string>',
dueAt: '2023-11-07T05:31:56Z',
updatedAt: '2023-11-07T05:31:56Z',
payload: {}
})
};

fetch('https://matcher.sandbox.lerian.net/v1/exceptions/{exceptionId}/callback', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://matcher.sandbox.lerian.net/v1/exceptions/{exceptionId}/callback",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'externalSystem' => 'JIRA',
'externalIssueId' => 'RECON-1234',
'status' => 'RESOLVED',
'callbackType' => 'status_update',
'resolutionNotes' => '<string>',
'assignee' => '<string>',
'dueAt' => '2023-11-07T05:31:56Z',
'updatedAt' => '2023-11-07T05:31:56Z',
'payload' => [

]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://matcher.sandbox.lerian.net/v1/exceptions/{exceptionId}/callback"

payload := strings.NewReader("{\n \"externalSystem\": \"JIRA\",\n \"externalIssueId\": \"RECON-1234\",\n \"status\": \"RESOLVED\",\n \"callbackType\": \"status_update\",\n \"resolutionNotes\": \"<string>\",\n \"assignee\": \"<string>\",\n \"dueAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"payload\": {}\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
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))

}
HttpResponse<String> response = Unirest.post("https://matcher.sandbox.lerian.net/v1/exceptions/{exceptionId}/callback")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"externalSystem\": \"JIRA\",\n \"externalIssueId\": \"RECON-1234\",\n \"status\": \"RESOLVED\",\n \"callbackType\": \"status_update\",\n \"resolutionNotes\": \"<string>\",\n \"assignee\": \"<string>\",\n \"dueAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"payload\": {}\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://matcher.sandbox.lerian.net/v1/exceptions/{exceptionId}/callback")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"externalSystem\": \"JIRA\",\n \"externalIssueId\": \"RECON-1234\",\n \"status\": \"RESOLVED\",\n \"callbackType\": \"status_update\",\n \"resolutionNotes\": \"<string>\",\n \"assignee\": \"<string>\",\n \"dueAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"payload\": {}\n}"

response = http.request(request)
puts response.read_body
{
  "status": "accepted"
}
{
"code": "MTCH-0001",
"title": "Bad Request",
"message": "context not found",
"error": "<string>",
"details": {}
}
{
"code": "MTCH-0001",
"title": "Bad Request",
"message": "context not found",
"error": "<string>",
"details": {}
}
{
"code": "MTCH-0001",
"title": "Bad Request",
"message": "context not found",
"error": "<string>",
"details": {}
}
{
"code": "MTCH-0001",
"title": "Bad Request",
"message": "context not found",
"error": "<string>",
"details": {}
}
{
"code": "MTCH-0103",
"title": "Conflict",
"message": "Cannot process the callback because the exception is not in a state that accepts callbacks. It may have already been resolved or cancelled."
}
{
"code": "MTCH-0009",
"title": "Too Many Requests",
"message": "Rate limit exceeded."
}
{
"code": "MTCH-0002",
"title": "Internal Server Error",
"message": "internal server error"
}

Authorizations

Authorization
string
header
required

Bearer token authentication (format: "Bearer {token}")

Headers

X-Request-Id
string

A unique identifier for tracing the request across services.

X-Idempotency-Key
string

Optional idempotency key for safe retries. Also accepts Idempotency-Key as an alternative header name. If the same key is sent again and the original request was already processed, the cached response is returned with X-Idempotency-Replayed: true.

See Retries and idempotency for details.

Path Parameters

exceptionId
string
required

The unique identifier of the exception.

Body

application/json

Callback payload from external system

Callback payload from an external system

externalSystem
string
required

Name of the external system sending the callback

Example:

"JIRA"

externalIssueId
string
required

Issue identifier in the external system

Example:

"RECON-1234"

status
string
required

Current status in the external system

Example:

"RESOLVED"

callbackType
string

Type of callback event

Example:

"status_update"

resolutionNotes
string

Notes from the external system resolution

assignee
string

Current assignee in the external system

dueAt
string<date-time>

Due date from the external system

updatedAt
string<date-time>

Last update timestamp from the external system

payload
object

Additional callback data from the external system

Response

Callback processed successfully.

The response includes the X-Idempotency-Replayed header.

If the value is false, the request was just processed. If the value is true, the response is a replay of a previously processed request.

See Retries and idempotency for more details.

Acknowledgement of a processed callback

status
string

Callback processing status

Example:

"accepted"