Skip to main content
DELETE
/
match-groups
/
{id}
/
allocations
/
{allocationId}
Remove allocation
const options = {method: 'DELETE'};

fetch('https://api.dolfinai.co/match-groups/{id}/allocations/{allocationId}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "billId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "tolerance": 123,
  "isClean": true,
  "lines": [
    {
      "billLineId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "description": "<string>",
      "billedQuantity": 123,
      "billedUnitPrice": 123,
      "billedNet": 123,
      "allocatedQuantity": 123,
      "allocatedNet": 123,
      "unallocatedNet": 123,
      "fullyAllocated": true,
      "hasPriceVariance": true,
      "hasQuantityVariance": true,
      "hasOverBillingVariance": true,
      "allocations": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "matchedQuantity": 123,
          "matchedAmount": 123,
          "poLineId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "poId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "poNumber": "<string>",
          "poLineDescription": "<string>",
          "poSku": "<string>",
          "orderedUnitPrice": 123,
          "dnLineId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "dnId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "dnNumber": "<string>",
          "dnLineDescription": "<string>",
          "quantityReceived": 123,
          "matchConfidence": 123
        }
      ],
      "priceVariancePerUnit": 123,
      "priceVarianceTotal": 123,
      "receivedQuantity": 123,
      "quantityVariance": 123,
      "orderedQuantity": 123,
      "quantityOverOrdered": 123,
      "resolution": {
        "resolvedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "resolvedAt": "2023-11-07T05:31:56Z",
        "notes": "<string>"
      }
    }
  ],
  "suggestions": [
    {
      "billLineId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "poLineId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "poId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "poNumber": "<string>",
      "poLineDescription": "<string>",
      "quantityOrdered": 123,
      "orderedUnitPrice": 123,
      "confidence": 123,
      "poSku": "<string>"
    }
  ],
  "dnSuggestions": [
    {
      "billLineId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "dnLineId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "dnId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "dnNumber": "<string>",
      "dnLineDescription": "<string>",
      "quantityReceived": 123,
      "confidence": 123,
      "dnSku": "<string>"
    }
  ]
}

Path Parameters

id
string<uuid>
required
allocationId
string<uuid>
required

Response

OK

A bill's three-way match: each bill line with its allocations and derived price/quantity variances (computed at read time, never stored), plus fuzzy purchase-order and delivery-note suggestions for lines that still need matching.

id
string<uuid>
required

Unique identifier of this match group.

billId
string<uuid>
required

The bill under review.

status
enum<string>
required

Lifecycle status of the match: Open (nothing to settle), Variance (a flagged difference awaits a human decision), Resolved (settled), or Synced (exported — not reachable yet).

Available options:
Open,
Variance,
Resolved,
Synced
tolerance
required

Per-line rounding tolerance, in the bill's currency, that every variance was judged against. Configured per organisation; a difference within tolerance is treated as clean.

isClean
boolean
required

True when every line is fully allocated with no outstanding variance.

lines
object[]
required

One entry per bill line, carrying its allocations and derived variances.

suggestions
object[]
required

Fuzzy purchase-order-line suggestions for bill lines with no exact (SKU) match. Derived, never stored; confirm one (POST an allocation) to create a real match.

dnSuggestions
object[]
required

Fuzzy delivery-note-line suggestions — the receipt-quantity counterpart of Suggestions. Lets the UI ask 'which delivery does this line belong to?' without the caller knowing line ids.