Skip to main content
POST
/
v1
/
disputes
Open a delivery dispute
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));
{
  "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>"
}

Authorizations

Authorization
string
header
required

API key sent as Authorization: Bearer <api-key>.

Body

application/json
disputedPeriod
object
required
affectedSurface
object
required
claimedShortfall
object
required
openedBy
string

Actor attribution. Defaults to the key's developerId.

openedByRole
enum<string>

Who is opening. Anything other than "operator" defaults to "advertiser".

Available options:
advertiser,
operator
evidenceBundle
object

Frozen at open time. At least one of the three id arrays must be non-empty.

Response

The opened dispute.

ok
boolean
required
data
object
required

Route-specific payload. Operation responses refine this.

contractVersion
string
required
Allowed value: "v1.0"