Allowed Scopes: experimental:contract:read
Returns the procurement contracts of the given company, and those shared by every company of the organisation, as the user the token acts for sees them in Spendesk: amount, currency, fxRate and files are hidden from users who may not see them.
Sorting. Sorted by sortBy (updatedAt or createdAt, default updatedAt) then id, both in sortOrder (asc or desc, default desc): by default the most recently updated contracts come first.
Pagination. Cursor pagination with 50 items per page by default. The cursor in meta.nextCursor is opaque and bound to the sort it was read with: pass it unchanged as cursor, with the same sortBy, sortOrder and filters, to get the next page. A page may contain fewer than limit items, even none; stop only when nextCursor is null. A cursor that cannot be read, or that was read with another sort, returns a 400 on cursor: restart from the first page.
No snapshot. Pages are read one by one, not from a snapshot: with sortBy=updatedAt, a contract updated while you page can appear twice or be missed in that pass. This is a list, not a change feed: updatedAfter gives no completeness guarantee for a sync, an update committed late can be missed, and deleted contracts are never returned, so deletions are not reported.
Read-time values. status and renewalStatus are computed at read time: they change with time (a contract expires on its end date) and with renewal progress without updatedAt changing. vendor.name and supplierIds are also read at that time: renaming a vendor or changing its supplier links does not change updatedAt either. amount, currency, fxRate and files are hidden by the role of the user at read time.
Contracts are read-only through the API: responses may be cached for up to 1 minute, so a change made in Spendesk can take that long to appear.
A 404 means the company is unknown to procurement.
A 403 means one of:
- the token's organisation does not own
companyId, or the company token is for another company; - procurement is not enabled for the company;
- the user the token acts for is not provisioned in procurement;
- procurement is restricted to procurement managers and that user is not one.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||