# Perform a Calculation The calculations endpoint can calculate carbon emissions for one or multiple activities. The carbon footprint or your journey consisting of, for example, a return flight, two cab rides, and a hotel stay can be computed all at once, passing all five activities in the items array. Include the string literal "items" in the "expand" array to retrieve values for each item separately in addition to the total carbon quantity. This is a low-latency endpoint. SQUAKE does not provide you with a unique identifier for any calculation results. You must quote a price on the pricing endpoint to purchase compensation for your carbon emissions. Some data sets are extensive and thus documented separately here. Endpoint: POST /v2/calculations Security: Bearer-Auth ## Request fields (application/json): - `expand` (array) If you choose to expand on e.g. "items", SQUAKE returns emissions per each item separately (in addition to a total value). - `carbon_unit` (string) SQUAKE uses The International System of Units (SI), commonly referred to as "metric system". Enum: "tonne", "kilogram", "gram" - `distance_unit` (string) SQUAKE uses common distance units Enum: "meter", "kilometer", "feet", "mile", "nautical_mile" - `audit_for` (object) If you make a calculation on behalf of a specific legal entity, you can specify their details here. - `audit_for.legal_name` (string, required) Legal name of the entity you're performing calculation for. - `audit_for.external_id` (string) External id of the entity you're performing audit for. - `items` (array, required) ## Response 200 fields (application/json): - `carbon_quantity` (number, required) - `carbon_unit` (string, required) SQUAKE uses The International System of Units (SI), commonly referred to as "metric system". Enum: "tonne", "kilogram", "gram" - `items` (array) Expand items to receive emissions per item. By default, this is not included. - `items.audit_id` (string) If the item was audited, this is the ID of the audit. This is only present if the item was audited. - `items.external_reference` (string) - `items.type` (string, required) Enum: "accommodation", "air_freight", "bus", "camping_site", "car", "co2_amount", "coffee_production", "cruise", "expenditure", "ferry", "flight", "general", "hotel", "logistics", "logistics_site", "money_amount", "private_jet", "sea_freight", "inland_waterways", "train", "rail_freight", "road_freight", "van" - `items.methodology` (string, required) Enum: "ACRISS", "ADEME", "BASIC", "CLEAN-CARGO", "CO2-EMISSIEFACTOREN-NL", "DIN-EN-16258", "DEFRA", "EU-EEA", "EU-EMSA", "US-EPA", "HCMI", "OFNK", "ECTA", "GLEC", "ICAO", "TIM", "SQUAKE" ## Response 400 fields (application/json): - `errors` (array) - `errors.code` (string, required) An application-specific error code, expressed as a string value. Enum: "field_validation_error", "server_error", "not_authorized", "not_found", "invalid_methodology", "invalid_type" - `errors.detail` (string) A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized. - `errors.source` (object) An object containing references to the primary source of the error - `errors.source.id` (string) - `errors.source.attribute` (string, required) - `errors.source.model` (string) ## Response 401 fields (application/json): - `errors` (array) - `errors.code` (string, required) An application-specific error code, expressed as a string value. Enum: "field_validation_error", "server_error", "not_authorized", "not_found", "invalid_methodology", "invalid_type" - `errors.detail` (string) A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized. - `errors.source` (object) An object containing references to the primary source of the error - `errors.source.id` (string) - `errors.source.attribute` (string, required) - `errors.source.model` (string)