The read function retrieves the information for an emission record in Greenlit that has been created by your App.
See record fields for more information on the fields returned.
Example JSON request for this function:
{ "action": "read", // string "user": "api@greenlit.org.nz", // email string "production": "YmU9U5evebUbUjagydejU3Ehuna2a2", // string "key": "50d95141da41a5e502ada5c7da7de33d" // string "records": { // array of integers "0": 571 // record iid that you want to retrieve }, "data": {} }
Example JSON response for this function:
{ "status": "success", // or partial, or error "error": "", // string message "data": [ // array of records that are retrieved { "iid": "571", "production_id": "182", "created_on": "1692757802", "created_by": "1", "emission_factor": "73", "map_used": "2", "map_record": "60", "record_dom": "1", "record_date": "1692757802", "record_milestone": "3", "record_value": "5", "record_value_multiplier": "20", "record_actual": "0", "record_aggregate": "1", "record_identifier": "A unique ID", "record_offset": "1", "record_offset_cost": "5", "tool_locked": "0", "tool_record": "0", "tool_updated": "0", "api_app": "1", "api_updated": "1692757802", "dropped": "0", "department": "10", "tracking": "107", "country": "169" } ], "actions": [ // specific success or error details about each record. { "iid": "571", "action": "read", "status": "success", "error": "" // string } ], "lookups": { "tracking": { "107": "Crew", // ... trackers associated with production }, "department": { "1": "Production", // ... all departments }, "map_record": { "60": { "iid": "60", "category": "10", "level_2": "Working From Home", "level_3": "", "level_4": "", "factor": "401", "co2e": "0.224697", "co2": "0.220883", "ch4": "0.000295203", "n2o": "0.00351882", "unit": "km", "unit_multiplier": null, "scope": "3" }, // ... map records associated with records }, "category": { "10": "Electricity and Office", // ... categories associated with records } } }