Skip to main content
GET
← Purchases API List the suppliers your organization buys from. Each one is a supplier of the x-organization-id organization: the ones you created, sending supplier_name and supplier_country in Create Purchases (v2) or from the Dcycle app, and those of your file imports. Use their id as supplier_id when you create purchases: a purchase can only name a supplier of its own organization. Each supplier carries the activity code (SIC or CNAE) its spend-based emission factor comes from, how many purchases it has and their emissions.

Request

Headers

string
required
Your API key (see Authentication).
string
required
The organization whose suppliers are listed.

Query Parameters

integer
default:"1"
Page number, from 1.
integer
default:"50"
Suppliers per page, 1 to 100.
string
Filter expression. Each clause is field: plus a two-letter operator and the value, with no space (country:eqES); clauses are separated by $.Operators: eq (equals), ne (not equals), lk (contains, case-sensitive), nl (does not contain), gt, ge, lt, le (numbers), in / ni (in / not in a JSON list, e.g. status:in["in_review","in_progress"]).Fields: business_name, country, status, purchases_count, co2e.Examples: business_name:eqTELEFONICA DE ESPANA SAU$country:eqES finds the supplier a supplier_name + supplier_country resolve to; status:eqin_review the ones that could not be classified. A clause on any other field is ignored. URL-encode the value.
string
How filter_by clauses on different fields combine: all (AND, the default) or any (OR).
string
Comma-separated fields whose own clauses combine with OR instead of AND, e.g. status.
string
field:asc or field:desc (e.g. purchases_count:desc), several separated by $. Without it, the suppliers with the most emissions come first.

Response

array[object]
integer
The page returned.
integer
The page size.
integer
The suppliers matching the filters.

Errors

401 for a missing or invalid API key, 403 when the key’s user is not a member of the organization, 422 for a malformed query parameter, and 429 beyond the rate limits.

Create Purchases (v2)

Takes supplier_id, or creates the supplier from its name

List Purchases

Filter purchases by supplier_id[]