API Reference
Report a won or lost quote
POST
/
v1
/
outcomes
Report a won or lost quote
curl --request POST \
--url https://api.elastly.ai/v1/outcomes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"quoteRef": "Q-1042",
"occurredAt": "2026-11-02T09:30:00Z",
"lines": [
{
"lineRef": "L1",
"outcome": "won",
"quantity": "400"
},
{
"lineRef": "L2",
"outcome": "lost",
"reasonCode": "went_to_competitor",
"competitor": "Northline Supply",
"competitorPrice": "11.80",
"currency": "USD"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
quoteRef: 'Q-1042',
occurredAt: '2026-11-02T09:30:00Z',
lines: [
{lineRef: 'L1', outcome: 'won', quantity: '400'},
{
lineRef: 'L2',
outcome: 'lost',
reasonCode: 'went_to_competitor',
competitor: 'Northline Supply',
competitorPrice: '11.80',
currency: 'USD'
}
]
})
};
fetch('https://api.elastly.ai/v1/outcomes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.elastly.ai/v1/outcomes"
payload = {
"quoteRef": "Q-1042",
"occurredAt": "2026-11-02T09:30:00Z",
"lines": [
{
"lineRef": "L1",
"outcome": "won",
"quantity": "400"
},
{
"lineRef": "L2",
"outcome": "lost",
"reasonCode": "went_to_competitor",
"competitor": "Northline Supply",
"competitorPrice": "11.80",
"currency": "USD"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.elastly.ai/v1/outcomes",
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([
'quoteRef' => 'Q-1042',
'occurredAt' => '2026-11-02T09:30:00Z',
'lines' => [
[
'lineRef' => 'L1',
'outcome' => 'won',
'quantity' => '400'
],
[
'lineRef' => 'L2',
'outcome' => 'lost',
'reasonCode' => 'went_to_competitor',
'competitor' => 'Northline Supply',
'competitorPrice' => '11.80',
'currency' => 'USD'
]
]
]),
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;
}HttpResponse<String> response = Unirest.post("https://api.elastly.ai/v1/outcomes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"quoteRef\": \"Q-1042\",\n \"occurredAt\": \"2026-11-02T09:30:00Z\",\n \"lines\": [\n {\n \"lineRef\": \"L1\",\n \"outcome\": \"won\",\n \"quantity\": \"400\"\n },\n {\n \"lineRef\": \"L2\",\n \"outcome\": \"lost\",\n \"reasonCode\": \"went_to_competitor\",\n \"competitor\": \"Northline Supply\",\n \"competitorPrice\": \"11.80\",\n \"currency\": \"USD\"\n }\n ]\n}")
.asString();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.elastly.ai/v1/outcomes"
payload := strings.NewReader("{\n \"quoteRef\": \"Q-1042\",\n \"occurredAt\": \"2026-11-02T09:30:00Z\",\n \"lines\": [\n {\n \"lineRef\": \"L1\",\n \"outcome\": \"won\",\n \"quantity\": \"400\"\n },\n {\n \"lineRef\": \"L2\",\n \"outcome\": \"lost\",\n \"reasonCode\": \"went_to_competitor\",\n \"competitor\": \"Northline Supply\",\n \"competitorPrice\": \"11.80\",\n \"currency\": \"USD\"\n }\n ]\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))
}{
"quoteRef": "<string>",
"lines": [
{
"lineRef": "<string>",
"state": "recorded"
}
]
}{
"error": "invalid_request",
"requestId": "<string>"
}{
"error": "invalid_request",
"requestId": "<string>"
}{
"error": "invalid_request",
"requestId": "<string>"
}{
"error": "invalid_request",
"requestId": "<string>"
}{
"error": "invalid_request",
"requestId": "<string>"
}{
"error": "invalid_request",
"requestId": "<string>"
}{
"error": "invalid_request",
"requestId": "<string>"
}{
"error": "invalid_request",
"requestId": "<string>"
}Authorizations
Headers
Body
application/json
⌘I
Report a won or lost quote
curl --request POST \
--url https://api.elastly.ai/v1/outcomes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"quoteRef": "Q-1042",
"occurredAt": "2026-11-02T09:30:00Z",
"lines": [
{
"lineRef": "L1",
"outcome": "won",
"quantity": "400"
},
{
"lineRef": "L2",
"outcome": "lost",
"reasonCode": "went_to_competitor",
"competitor": "Northline Supply",
"competitorPrice": "11.80",
"currency": "USD"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
quoteRef: 'Q-1042',
occurredAt: '2026-11-02T09:30:00Z',
lines: [
{lineRef: 'L1', outcome: 'won', quantity: '400'},
{
lineRef: 'L2',
outcome: 'lost',
reasonCode: 'went_to_competitor',
competitor: 'Northline Supply',
competitorPrice: '11.80',
currency: 'USD'
}
]
})
};
fetch('https://api.elastly.ai/v1/outcomes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.elastly.ai/v1/outcomes"
payload = {
"quoteRef": "Q-1042",
"occurredAt": "2026-11-02T09:30:00Z",
"lines": [
{
"lineRef": "L1",
"outcome": "won",
"quantity": "400"
},
{
"lineRef": "L2",
"outcome": "lost",
"reasonCode": "went_to_competitor",
"competitor": "Northline Supply",
"competitorPrice": "11.80",
"currency": "USD"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.elastly.ai/v1/outcomes",
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([
'quoteRef' => 'Q-1042',
'occurredAt' => '2026-11-02T09:30:00Z',
'lines' => [
[
'lineRef' => 'L1',
'outcome' => 'won',
'quantity' => '400'
],
[
'lineRef' => 'L2',
'outcome' => 'lost',
'reasonCode' => 'went_to_competitor',
'competitor' => 'Northline Supply',
'competitorPrice' => '11.80',
'currency' => 'USD'
]
]
]),
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;
}HttpResponse<String> response = Unirest.post("https://api.elastly.ai/v1/outcomes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"quoteRef\": \"Q-1042\",\n \"occurredAt\": \"2026-11-02T09:30:00Z\",\n \"lines\": [\n {\n \"lineRef\": \"L1\",\n \"outcome\": \"won\",\n \"quantity\": \"400\"\n },\n {\n \"lineRef\": \"L2\",\n \"outcome\": \"lost\",\n \"reasonCode\": \"went_to_competitor\",\n \"competitor\": \"Northline Supply\",\n \"competitorPrice\": \"11.80\",\n \"currency\": \"USD\"\n }\n ]\n}")
.asString();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.elastly.ai/v1/outcomes"
payload := strings.NewReader("{\n \"quoteRef\": \"Q-1042\",\n \"occurredAt\": \"2026-11-02T09:30:00Z\",\n \"lines\": [\n {\n \"lineRef\": \"L1\",\n \"outcome\": \"won\",\n \"quantity\": \"400\"\n },\n {\n \"lineRef\": \"L2\",\n \"outcome\": \"lost\",\n \"reasonCode\": \"went_to_competitor\",\n \"competitor\": \"Northline Supply\",\n \"competitorPrice\": \"11.80\",\n \"currency\": \"USD\"\n }\n ]\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))
}{
"quoteRef": "<string>",
"lines": [
{
"lineRef": "<string>",
"state": "recorded"
}
]
}{
"error": "invalid_request",
"requestId": "<string>"
}{
"error": "invalid_request",
"requestId": "<string>"
}{
"error": "invalid_request",
"requestId": "<string>"
}{
"error": "invalid_request",
"requestId": "<string>"
}{
"error": "invalid_request",
"requestId": "<string>"
}{
"error": "invalid_request",
"requestId": "<string>"
}{
"error": "invalid_request",
"requestId": "<string>"
}{
"error": "invalid_request",
"requestId": "<string>"
}