const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
disputedPeriod: {start: '2023-11-07T05:31:56Z', end: '2023-11-07T05:31:56Z'},
affectedSurface: {campaignId: '<string>', screenIds: ['<string>'], substrateId: '<string>'},
claimedShortfall: {unit: '<string>', amount: '<string>'},
openedBy: '<string>',
evidenceBundle: {
proofPackIds: ['<string>'],
meteringSnapshotIds: ['<string>'],
settlementApplicationIds: ['<string>'],
attachmentRefs: ['<string>'],
auditorReportRef: '<string>'
}
})
};
fetch('https://sandbox.api.enfinitos.com/v1/disputes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox.api.enfinitos.com/v1/disputes"
payload = {
"disputedPeriod": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"affectedSurface": {
"campaignId": "<string>",
"screenIds": ["<string>"],
"substrateId": "<string>"
},
"claimedShortfall": {
"unit": "<string>",
"amount": "<string>"
},
"openedBy": "<string>",
"evidenceBundle": {
"proofPackIds": ["<string>"],
"meteringSnapshotIds": ["<string>"],
"settlementApplicationIds": ["<string>"],
"attachmentRefs": ["<string>"],
"auditorReportRef": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.api.enfinitos.com/v1/disputes"
payload := strings.NewReader("{\n \"disputedPeriod\": {\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\"\n },\n \"affectedSurface\": {\n \"campaignId\": \"<string>\",\n \"screenIds\": [\n \"<string>\"\n ],\n \"substrateId\": \"<string>\"\n },\n \"claimedShortfall\": {\n \"unit\": \"<string>\",\n \"amount\": \"<string>\"\n },\n \"openedBy\": \"<string>\",\n \"evidenceBundle\": {\n \"proofPackIds\": [\n \"<string>\"\n ],\n \"meteringSnapshotIds\": [\n \"<string>\"\n ],\n \"settlementApplicationIds\": [\n \"<string>\"\n ],\n \"attachmentRefs\": [\n \"<string>\"\n ],\n \"auditorReportRef\": \"<string>\"\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))
}HttpResponse<String> response = Unirest.post("https://sandbox.api.enfinitos.com/v1/disputes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"disputedPeriod\": {\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\"\n },\n \"affectedSurface\": {\n \"campaignId\": \"<string>\",\n \"screenIds\": [\n \"<string>\"\n ],\n \"substrateId\": \"<string>\"\n },\n \"claimedShortfall\": {\n \"unit\": \"<string>\",\n \"amount\": \"<string>\"\n },\n \"openedBy\": \"<string>\",\n \"evidenceBundle\": {\n \"proofPackIds\": [\n \"<string>\"\n ],\n \"meteringSnapshotIds\": [\n \"<string>\"\n ],\n \"settlementApplicationIds\": [\n \"<string>\"\n ],\n \"attachmentRefs\": [\n \"<string>\"\n ],\n \"auditorReportRef\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.enfinitos.com/v1/disputes")
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 \"disputedPeriod\": {\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\"\n },\n \"affectedSurface\": {\n \"campaignId\": \"<string>\",\n \"screenIds\": [\n \"<string>\"\n ],\n \"substrateId\": \"<string>\"\n },\n \"claimedShortfall\": {\n \"unit\": \"<string>\",\n \"amount\": \"<string>\"\n },\n \"openedBy\": \"<string>\",\n \"evidenceBundle\": {\n \"proofPackIds\": [\n \"<string>\"\n ],\n \"meteringSnapshotIds\": [\n \"<string>\"\n ],\n \"settlementApplicationIds\": [\n \"<string>\"\n ],\n \"attachmentRefs\": [\n \"<string>\"\n ],\n \"auditorReportRef\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_bodyfalsecurl --request POST \
--url https://sandbox.api.enfinitos.com/v1/disputes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"disputedPeriod": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"affectedSurface": {
"campaignId": "<string>",
"screenIds": [
"<string>"
],
"substrateId": "<string>"
},
"claimedShortfall": {
"unit": "<string>",
"amount": "<string>"
},
"openedBy": "<string>",
"evidenceBundle": {
"proofPackIds": [
"<string>"
],
"meteringSnapshotIds": [
"<string>"
],
"settlementApplicationIds": [
"<string>"
],
"attachmentRefs": [
"<string>"
],
"auditorReportRef": "<string>"
}
}
'{
"ok": true,
"data": {
"dispute": {
"id": "<string>",
"orgId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"openedBy": "<string>",
"openedAt": "2023-11-07T05:31:56Z",
"disputedPeriod": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"affectedSurface": {
"campaignId": "<string>",
"screenIds": [
"<string>"
],
"substrateId": "<string>"
},
"claimedShortfall": {
"unit": "<string>",
"amount": "<string>"
},
"evidenceBundle": {
"proofPackIds": [
"<string>"
],
"meteringSnapshotIds": [
"<string>"
],
"settlementApplicationIds": [
"<string>"
],
"attachmentRefs": [
"<string>"
],
"auditorReportRef": "<string>"
},
"operatorResponse": {
"at": "2023-11-07T05:31:56Z",
"by": "<string>",
"notes": "<string>",
"proposedRemedy": {
"amount": "<string>",
"makegoodWindow": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
}
}
},
"advertiserResponse": {
"at": "2023-11-07T05:31:56Z",
"by": "<string>",
"notes": "<string>"
},
"resolution": {
"creditNoteId": "<string>",
"makegoodCampaignId": "<string>",
"settlementAdjustmentId": "<string>",
"resolvedAt": "2023-11-07T05:31:56Z",
"resolvedBy": "<string>",
"notes": "<string>"
},
"timeline": [
{
"at": "2023-11-07T05:31:56Z",
"actor": "<string>",
"notes": "<string>"
}
]
}
},
"contractVersion": "<string>"
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}Open a delivery dispute
Open a delivery dispute — an advertiser/operator claim that delivery fell short of contract (“you billed 1M impressions, we saw 800k”). The evidence bundle is frozen at open time; at least one of proofPackIds / meteringSnapshotIds / settlementApplicationIds must be populated, and affectedSurface.screenIds must list at least one screen. The dispute enters OPENED state and emits a DISPUTE_OPENED event. Mutations carry settlement:write — a dispute’s endgame adjusts money.
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
disputedPeriod: {start: '2023-11-07T05:31:56Z', end: '2023-11-07T05:31:56Z'},
affectedSurface: {campaignId: '<string>', screenIds: ['<string>'], substrateId: '<string>'},
claimedShortfall: {unit: '<string>', amount: '<string>'},
openedBy: '<string>',
evidenceBundle: {
proofPackIds: ['<string>'],
meteringSnapshotIds: ['<string>'],
settlementApplicationIds: ['<string>'],
attachmentRefs: ['<string>'],
auditorReportRef: '<string>'
}
})
};
fetch('https://sandbox.api.enfinitos.com/v1/disputes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox.api.enfinitos.com/v1/disputes"
payload = {
"disputedPeriod": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"affectedSurface": {
"campaignId": "<string>",
"screenIds": ["<string>"],
"substrateId": "<string>"
},
"claimedShortfall": {
"unit": "<string>",
"amount": "<string>"
},
"openedBy": "<string>",
"evidenceBundle": {
"proofPackIds": ["<string>"],
"meteringSnapshotIds": ["<string>"],
"settlementApplicationIds": ["<string>"],
"attachmentRefs": ["<string>"],
"auditorReportRef": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.api.enfinitos.com/v1/disputes"
payload := strings.NewReader("{\n \"disputedPeriod\": {\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\"\n },\n \"affectedSurface\": {\n \"campaignId\": \"<string>\",\n \"screenIds\": [\n \"<string>\"\n ],\n \"substrateId\": \"<string>\"\n },\n \"claimedShortfall\": {\n \"unit\": \"<string>\",\n \"amount\": \"<string>\"\n },\n \"openedBy\": \"<string>\",\n \"evidenceBundle\": {\n \"proofPackIds\": [\n \"<string>\"\n ],\n \"meteringSnapshotIds\": [\n \"<string>\"\n ],\n \"settlementApplicationIds\": [\n \"<string>\"\n ],\n \"attachmentRefs\": [\n \"<string>\"\n ],\n \"auditorReportRef\": \"<string>\"\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))
}HttpResponse<String> response = Unirest.post("https://sandbox.api.enfinitos.com/v1/disputes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"disputedPeriod\": {\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\"\n },\n \"affectedSurface\": {\n \"campaignId\": \"<string>\",\n \"screenIds\": [\n \"<string>\"\n ],\n \"substrateId\": \"<string>\"\n },\n \"claimedShortfall\": {\n \"unit\": \"<string>\",\n \"amount\": \"<string>\"\n },\n \"openedBy\": \"<string>\",\n \"evidenceBundle\": {\n \"proofPackIds\": [\n \"<string>\"\n ],\n \"meteringSnapshotIds\": [\n \"<string>\"\n ],\n \"settlementApplicationIds\": [\n \"<string>\"\n ],\n \"attachmentRefs\": [\n \"<string>\"\n ],\n \"auditorReportRef\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.enfinitos.com/v1/disputes")
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 \"disputedPeriod\": {\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\"\n },\n \"affectedSurface\": {\n \"campaignId\": \"<string>\",\n \"screenIds\": [\n \"<string>\"\n ],\n \"substrateId\": \"<string>\"\n },\n \"claimedShortfall\": {\n \"unit\": \"<string>\",\n \"amount\": \"<string>\"\n },\n \"openedBy\": \"<string>\",\n \"evidenceBundle\": {\n \"proofPackIds\": [\n \"<string>\"\n ],\n \"meteringSnapshotIds\": [\n \"<string>\"\n ],\n \"settlementApplicationIds\": [\n \"<string>\"\n ],\n \"attachmentRefs\": [\n \"<string>\"\n ],\n \"auditorReportRef\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_bodyfalsecurl --request POST \
--url https://sandbox.api.enfinitos.com/v1/disputes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"disputedPeriod": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"affectedSurface": {
"campaignId": "<string>",
"screenIds": [
"<string>"
],
"substrateId": "<string>"
},
"claimedShortfall": {
"unit": "<string>",
"amount": "<string>"
},
"openedBy": "<string>",
"evidenceBundle": {
"proofPackIds": [
"<string>"
],
"meteringSnapshotIds": [
"<string>"
],
"settlementApplicationIds": [
"<string>"
],
"attachmentRefs": [
"<string>"
],
"auditorReportRef": "<string>"
}
}
'{
"ok": true,
"data": {
"dispute": {
"id": "<string>",
"orgId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"openedBy": "<string>",
"openedAt": "2023-11-07T05:31:56Z",
"disputedPeriod": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"affectedSurface": {
"campaignId": "<string>",
"screenIds": [
"<string>"
],
"substrateId": "<string>"
},
"claimedShortfall": {
"unit": "<string>",
"amount": "<string>"
},
"evidenceBundle": {
"proofPackIds": [
"<string>"
],
"meteringSnapshotIds": [
"<string>"
],
"settlementApplicationIds": [
"<string>"
],
"attachmentRefs": [
"<string>"
],
"auditorReportRef": "<string>"
},
"operatorResponse": {
"at": "2023-11-07T05:31:56Z",
"by": "<string>",
"notes": "<string>",
"proposedRemedy": {
"amount": "<string>",
"makegoodWindow": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
}
}
},
"advertiserResponse": {
"at": "2023-11-07T05:31:56Z",
"by": "<string>",
"notes": "<string>"
},
"resolution": {
"creditNoteId": "<string>",
"makegoodCampaignId": "<string>",
"settlementAdjustmentId": "<string>",
"resolvedAt": "2023-11-07T05:31:56Z",
"resolvedBy": "<string>",
"notes": "<string>"
},
"timeline": [
{
"at": "2023-11-07T05:31:56Z",
"actor": "<string>",
"notes": "<string>"
}
]
}
},
"contractVersion": "<string>"
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}Authorizations
API key sent as Authorization: Bearer <api-key>.
Body
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Actor attribution. Defaults to the key's developerId.
Who is opening. Anything other than "operator" defaults to "advertiser".
advertiser, operator Frozen at open time. At least one of the three id arrays must be non-empty.
Show child attributes
Show child attributes