Skip to main content
PUT
Update Facility
← Facilities API Update an existing facility in your organization. Only include the fields you want to change — all other fields remain unchanged.
Archiving Side Effects: Setting status to archived will also archive any linked logistic hub and deactivate associated supply contracts.

Request

Path Parameters

uuid
required
The UUID of the facility to updateExample: 550e8400-e29b-41d4-a716-446655440000

Headers

string
required
Your API key for authenticationExample: sk_live_1234567890abcdef
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa

Body Parameters

All fields are optional — only include what you want to change.
string
Facility name
string
Physical address
string
ISO country code
string
Ownership of the site: owned or rented
array[string]
Consumption categories
array[string]
CUPS codes
string
Status: active or archived
number
Logistic factor (0 to 1)
string | null
UUID of an uploaded file of your files to attach to the facility as its supporting document, e.g. the lease, a floor plan or the energy performance certificate; null removes the attachment and omitting it keeps it. A facility calculates nothing, so nothing is recalculated. When the facility moves to another organization without one, the attachment moves with it, unless its file is private to the organization it leaves. A file you cannot attach answers 404 NOT_FOUND naming File, and nothing changes.
uuid
Move the facility, with all its data, to this organization. Must be the header organization or one of its accepted, enabled descendant organizations.The move keeps the facility’s id and its invoices, wastes and waste water treatments, with their custom-column values. Their emissions are re-attributed to the target organization without being recalculated: the calculation configuration of every record (including the emission factors picked for it) is kept as it is, so every figure, market-based Scope 2 included, reads the same in the target. Measure periods, logistic hub, GdO redemptions, supply contracts used only by this facility, the uploaded files its records came from and the uploads still waiting for review from its page move with it; a moved file in a folder of the current organization lands at the target’s root, renamed name (1) when a file there already has its name. The offset of a GdO redemption shared across the group’s CUPS is split again by organization, with the same total, so the facility’s share follows it. Sending the facility’s current organization changes nothing.Moving requires a user session (an API key without a user is refused) with a non-Viewer membership in the header organization. A move is refused, and nothing is changed, when something of the current organization still points at the facility, when one of its supply contracts also serves another facility or is held by the current organization, when an uploaded file also produced another facility’s records or is still being read, when a GdO redemption shared across the group’s CUPS would stop or start offsetting it, when a custom emission factor its records use is not available to the target, or when one of its custom-column values cannot be carried into the target (see the errors below).Example: "a8315ef3-dd50-43f8-b7ce-d839e68d51fb"

Response

Returns the updated facility object.
string
Facility UUID
string
Facility name
string | null
Physical address
string
ISO country code
string
Ownership of the site: owned or rented
array[string] | null
Enabled consumption categories
array[string] | null
List of CUPS codes
string
Facility status: active or archived
number | null
Total CO2e emissions (tCO2e)
number | null
CO2e emissions from biomass sources
number | null
Logistic factor for scope 2 (0 to 1)
string | null
Purpose type of the facility
boolean | null
Whether the facility’s logistics hub is an active supercharger (an electric-vehicle charging station): its electricity invoices take the toc of the vehicles it charges. null when the facility is not a logistics hub
object | null
The document attached to the facility (attachment_file_id), or null. Not the file the facility was imported from (source_file_id). A file deleted or moved to the trash is no longer attached.
datetime
Creation timestamp (ISO 8601)
string | null
Last update timestamp (ISO 8601)
integer
Number of invoices in review status
integer
Number of configured categories with no invoices
string | null
Water type of the waste water treatment line (only for waste_water_facilities)
boolean | null
Whether methane is burned (only for waste_water_facilities)
object | null
Waste water treatment line config (only for waste_water_facilities)
object | null
Sludge treatment line config (only for waste_water_facilities)
object | null
Water discharge line config (only for waste_water_facilities)

Example

Successful Response

Common Errors

401 Unauthorized

Cause: Missing or invalid API key

403 Forbidden

Cause: The authenticated user is not a member of the organization

403 Forbidden (moving a facility)

Cause: organization_id is not the header organization or one of its accepted, enabled descendants (a parent, a sibling or another company), or the caller may not write into another organization: an API key without a user (CROSS_ORG_WRITE_REQUIRES_USER), a Viewer (VIEWER_CANNOT_WRITE) or a user without membership in the header organization (LOGGED_USER_NOT_MEMBER). FACILITY_LIMIT_REACHED when the target is on the free plan and has no facility allowance left.
Solution: Send the request from the parent organization (x-organization-id) with a user session, and pick the target among its subsidiaries.

409 Conflict (moving a facility)

404 Not Found

Cause: The facility does not exist or belongs to another organization

422 Unprocessable Entity

Cause: Invalid field values (e.g. invalid country code or status)
When moving a facility (organization_id), a 422 also reports a custom emission factor its records use that the target cannot use: CUSTOM_EMISSION_FACTOR_NOT_FOUND_OR_DISABLED (a custom emission group) or FACILITY_MOVE_CUSTOM_EF_RECORD_NOT_AVAILABLE (a factor of a custom database that is not shared with the target). Share it with the target or pick another factor first.

Get Facility

Retrieve facility details

Delete Facility

Remove a facility