KapworkKapwork Partner API
How It Works

Receivable Contents

History, metadata, and portal status fields

Single Receivable Response

When you fetch a single receivable, the response includes change history and portal metadata:

GET /v1/receivables/:id
{
  "id": "rec_abc123",
  "vendor": { "id": "...", "name": "Acme Corp" },
  "debtor": { "id": "...", "name": "BigBuyer Inc" },
  "amount_cents": 150000,
  "status": "APPROVED",
  "portal_status": "APPROVED FOR PAYMENT - BATCH Q4",
  
  "history": [
    {
      "changed_at": "2026-01-07T10:30:00Z",
      "changes": {
        "status": { "from": "PENDING", "to": "APPROVED" },
        "portal_status": { "from": "SUBMITTED", "to": "APPROVED FOR PAYMENT" }
      }
    },
    {
      "changed_at": "2026-01-05T08:00:00Z",
      "changes": {
        "amount_cents": { "from": 100000, "to": 150000 }
      }
    }
  ],
  
  "metadata": {
    "payment_terms": "NET30",
    "supplier_code": "SUP-001234",
    "buyer_contact": "john@bigbuyer.com"
  }
}

Change History

The history array contains the last 10 changes by default.

Tracked Fields

  • Status changes (PENDING → APPROVED → PAID)
  • Amount changes
  • Due date changes
  • Portal status changes
  • All other field modifications

Example

"history": [
  {
    "changed_at": "2026-01-07T10:30:00Z",
    "changes": {
      "status": { "from": "PENDING", "to": "APPROVED" }
    }
  }
]

Extended History

To retrieve more than 10 history entries:

GET /v1/receivables/:id?history_limit=50

List Endpoints

History is not included by default on list endpoints. Use expand[] to include it:

GET /v1/receivables?expand[]=history

Portal Metadata

The metadata object contains raw data from the debtor portal that we do not normalize into standard fields.

Common Fields

  • Payment terms (NET30, NET60, etc.)
  • Supplier codes
  • Buyer contact information
  • Custom portal fields
  • Original file references

Example

"metadata": {
  "payment_terms": "NET30",
  "supplier_code": "SUP-001234",
  "buyer_contact": "john@bigbuyer.com",
  "original_filename": "invoices_jan_2026.csv"
}

List Endpoints

Metadata is not included by default on list endpoints. Use expand[] to include it:

GET /v1/receivables?expand[]=metadata

Portal Status

The portal_status field contains the original status exactly as it appears in the debtor's system.

Normalized vs. Original Status

FieldPurposeExample
statusNormalized value for filtering and business logic"APPROVED"
portal_statusOriginal portal value for display and audit"APPROVED FOR PAYMENT - BATCH Q4"

Examples

Portalportal_statusNormalized status
Coupa"APPROVED FOR PAYMENT"APPROVED
Tradeshift"MARKED PAID"PAID
Ariba"RECONCILED"PAID
Generic"OVERDUE"PENDING

portal_status is included in all responses, including list endpoints.


Summary

FieldSingle ReceivableList Endpoint
portal_statusIncludedIncluded
history (10 entries)IncludedRequires ?expand[]=history
metadataIncludedRequires ?expand[]=metadata

The expand[] Parameter

For list endpoints:

# Include history
GET /v1/receivables?expand[]=history

# Include metadata
GET /v1/receivables?expand[]=metadata

# Include both
GET /v1/receivables?expand[]=history&expand[]=metadata

Next

On this page