Skip to main content

Documentation Index

Fetch the complete documentation index at: https://hc.pillargtm.com/llms.txt

Use this file to discover all available pages before exploring further.

Procurement API

The Procurement API manages procurement calendar computation and retrieval. GET fetches existing calendars with filters and KPIs; POST computes procurement windows for all active accounts based on their fiscal year data.

GET /api/procurement/calendar

Returns procurement calendars with account details, filterable by territory, segment, or upcoming budget windows. Auth: Requires authenticated session. Scoped to organization.

Query Parameters

ParameterTypeDefaultDescription
territorystringFilter by territory name
segmentstringFilter by account segment
upcomingstringSet to true to show only accounts with budget approval windows in the next 90 days
limitnumber200Max rows returned (capped at 500)

Response

The response includes:
  • calendars — Array of procurement calendar records joined with account data
  • kpis — Summary metrics for the filtered result set
  • total — Total number of calendars returned

Response Fields: kpis

FieldTypeDescription
accounts_in_budget_windownumberAccounts currently in their budget approval window
aligned_renewals_pctnumberPercentage of renewals aligned with budget cycles
upcoming_rfp_windowsnumberAccounts with RFP windows in the next 90 days
avg_procurement_lead_timenumberAverage procurement lead time in days

Response Fields: calendars[]

Each calendar record includes:
FieldTypeDescription
idstringCalendar record ID
account_idstringAccount ID
fiscal_year_startstringFiscal year start date
fiscal_year_endstringFiscal year end date
budget_approval_window_startstringBudget approval opens
budget_approval_window_endstringBudget approval closes
rfp_typical_monthnumberTypical RFP month (1-12)
procurement_lead_time_daysnumberEstimated lead time
renewal_alignmentstringaligned, partial, misaligned, or null
budget_cycle_typestringBudget cycle type
accountsobjectJoined account data (name, segment, tier, territory, ARR, health_score, etc.)

POST /api/procurement/calendar

Computes and upserts procurement calendars for all active accounts in the organization. Auth: Requires authenticated session. Scoped to organization.

Request Body

No body required.

Response

FieldTypeDescription
successbooleanOperation result
messagestringSummary message
creatednumberNew calendars created
updatednumberExisting calendars updated

Computation Flow

  1. Fetch all active accounts with fiscal year data
  2. Fetch existing calendars for upsert logic
  3. Fetch open renewal opportunities for alignment assessment
  4. For each account:
    • Compute procurement window from fiscal year end
    • Assess renewal alignment if a renewal date exists
    • Upsert calendar record

Side Effects

  • Creates or updates procurement calendar records for every active account
  • Alignment is assessed against open renewal-type opportunities
See the Procurement Intelligence data model page for full details on procurement windows, alignment logic, and risk identification.