List Contracts

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.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Company ID.

Query Params
string
length between 1 and 2048
^[A-Za-z0-9_-]+$

Opaque cursor: pass meta.nextCursor from the previous page unchanged. Omit it to start from the first page. Keep the same sortBy, sortOrder and filters for every page of one traversal: a cursor read with another sort is refused.

integer
1 to 100
Defaults to 50

Maximum number of items in the page, from 1 to 100. A page can hold fewer items even when more follow.

string
enum
Defaults to updatedAt

The field the list is sorted on, then id in the same order.

Allowed:
string
enum
Defaults to desc

The sort direction, for sortBy and for the id tiebreak.

Allowed:
date-time

Only contracts whose updatedAt is strictly after this ISO 8601 datetime with a timezone, e.g. 2026-01-31T23:59:59Z.

string
length between 1 and 512

Only contracts whose supplierIds contain this Spendesk supplier ID.

status
array of strings
length ≤ 5

Only contracts in one of these statuses, computed at read time. Repeat the parameter for several values, e.g. status=active&status=notStarted.

status
Allowed:
renewalStatus
array of strings
length ≤ 4

Only contracts in one of these renewal statuses, computed at read time. Repeat the parameter for several values.

renewalStatus
Allowed:
date

Only contracts whose endDate is on or after this day (YYYY-MM-DD).

date

Only contracts whose endDate is on or before this day (YYYY-MM-DD).

Responses

Language
Credentials
OAuth2
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json