This documentation is DEPRECATED and provided for legacy purposes only. Please use the updated documentation at www.amee.com/developer .

AMEE API / Profile API / Profile Item

Overview

A Profile Item represents an item belonging to a Profile. Profile Items can be viewed as "instances" of a particular Data Item, which represents a class of similar items which contribute to CO2 emissions.

An example Profile Item would be an average sized European petrol car which is driven 5000 kilometres per year. This Profile Item would be attached to a Data Item representing average sized European petrol cars. The Data Item contains values required to calculate the CO2 emissions for that type of car.

Each Profile Item contains several Profile Item Values. These represent the actual values stored (the distance in the example above would be a Profile Item Value).

A set of Profile Items can act as a sequence of values over time. You can create multiple instances of the same Data Item, as long as the dates or names of the Profile Items are different. For instance, you might create a sequence of values at different times for a particular car. To create another car of the same type, you would need to give it a different name in order to be able to store data concurrent with the data for the first car. See Profile History for more detail.

The URL for each Profile Item is the parent Profile Category URL followed by the Profile Item UID. For example: /profiles/C6DCC747B415/transport/car/specific/74C0D5645301

See also: AMEE Concepts, AMEE Profile API, Profile History

Properties

API VersionPropertyDefinition
>= 2.0amountsA set of emission results for the item. This may include emissions separated by gas. See Results for details.
>= 2.0startDateThe time that this Profile Item is valid from.
>= 2.0endDateThe time that this Profile Item is valid until.
< 2.0amountPerMonthThe kgCO2 amount produced per month.
< 2.0validFromThe date that this Profile Item is valid from.
< 2.0endWhether this Profile Item marks the end of a historical sequence.

See also: Common Properties

Results

Profile Items can contain multiple return values, not just a single value. This is often used to split up emissions for different gases, for instance carbon dioxide and methane.

In the responses, these results are included in an 'amounts' object. See the examples below for the exact XML and JSON representations. Each 'amount' contained within has the following properties

typeA description of the type of output. For instance, 'CO2'.
valueThe value of the output.
unitThe units that the value field is measured in.
defaultOptionally, this field is 'true' for the default result, often an aggregated total across different gases. This default is also included in the single 'amount' field in the response for backwards compatibility.

The 'amounts' section of the response can also contain 'note' objects. These provide other textual information relevant to the result, for instance warning of errors, or clarifying emission factors that were used.

API Operations

Get an existing Profile Item

Multiple Profile Items can be fetched in a single query using either Profile Categories or Batch Get.

Example: AMEE 2 JSON

Request:

GET /profiles/YLLIKH73BDYS/transport/defra/fuel/F0638HOIFC1H HTTP/1.1
Accept: application/json
Authtoken: {your_authtoken_goes_here}

Response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
  "profile": {
    "uid": "YLLIKH73BDYS"
  },
  "path": "/transport/defra/fuel/F0638HOIFC1H",
  "profileItem": {
    "name": null,
    "modified": "2011-03-08T13:56:01Z",
    "dataCategory": {
      "name": "Fuel",
      "uid": "138B5405E0CE",
      "path": "fuel",
      "deprecated": false
    },
    "profile": {
      "uid": "YLLIKH73BDYS"
    },
    "itemValues": [
      {
        "name": "Mass of fuel consumed",
        "itemValueDefinition": {
          "fromData": false,
          "name": "Mass of fuel consumed",
          "drillDown": false,
          "fromProfile": true,
          "uid": "50151C2D0B90",
          "valueDefinition": {
            "modified": "2007-07-27 07:30:44.0",
            "name": "amount",
            "valueType": "DECIMAL",
            "uid": "45433E48B39F",
            "description": "",
            "environment": {
              "uid": "5F5887BCF726"
            },
            "created": "2007-07-27 07:30:44.0"
          },
          "unit": "kg",
          "path": "mass"
        },
        "displayName": "Mass of fuel consumed",
        "perUnit": "",
        "startDate": "2011-03-08T13:56:00Z",
        "uid": "42ROH1HOI2BE",
        "value": "",
        "unit": "kg",
        "path": "mass",
        "displayPath": "mass"
      },
      {
        "name": "Volume of fuel consumed",
        "itemValueDefinition": {
          "fromData": false,
          "name": "Volume of fuel consumed",
          "drillDown": false,
          "fromProfile": true,
          "uid": "93899EF4E3AF",
          "valueDefinition": {
            "modified": "2007-07-27 07:30:44.0",
            "name": "amount",
            "valueType": "DECIMAL",
            "uid": "45433E48B39F",
            "description": "",
            "environment": {
              "uid": "5F5887BCF726"
            },
            "created": "2007-07-27 07:30:44.0"
          },
          "unit": "L",
          "path": "volume"
        },
        "displayName": "Volume of fuel consumed",
        "perUnit": "",
        "startDate": "2011-03-08T13:56:00Z",
        "uid": "U9J6XCMJT07I",
        "value": "500",
        "unit": "L",
        "path": "volume",
        "displayPath": "volume"
      }
    ],
    "amount": {
      "value": 1161,
      "unit": "kg/year"
    },
    "startDate": "2011-03-08T13:56:00Z",
    "uid": "F0638HOIFC1H",
    "amounts": {
      "amount": [
        {
          "default": "true",
          "type": "totalDirectCO2e",
          "value": 1161,
          "unit": "kg"
        },
        {
          "type": "lifeCycleCO2e",
          "value": 1366.45,
          "unit": "kg"
        },
        {
          "type": "CO2",
          "value": 1150.9,
          "unit": "kg"
        },
        {
          "type": "nitrousOxideCO2e",
          "value": 7.8,
          "unit": "kg"
        },
        {
          "type": "methaneCO2e",
          "value": 2.3,
          "unit": "kg"
        },
        {
          "type": "indirectCO2e",
          "value": 205.45,
          "unit": "kg"
        }
      ],
      "note": [
        {
          "type": "comment",
          "value": "This methodology provides emissions directly in terms of CO2e. No global warming potentials are applied in this calculation"
        }
      ]
    },
    "dataItem": {
      "Label": "petrol",
      "uid": "19B311DDF0B1"
    },
    "environment": {
      "name": "AMEE",
      "itemsPerPage": 10,
      "uid": "5F5887BCF726",
      "path": "",
      "description": "",
      "itemsPerFeed": 10,
      "owner": ""
    },
    "itemDefinition": {
      "name": "DEFRA transport fuels",
      "drillDown": "fuel",
      "uid": "80DB1AB8141F"
    },
    "endDate": "",
    "created": "2011-03-08T13:56:01Z"
  },
  "apiVersion": "2.0"
}

Example: AMEE 2 XML

Request:

GET /profiles/YLLIKH73BDYS/transport/defra/fuel/F0638HOIFC1H HTTP/1.1
Accept: application/xml
Authtoken: {your_authtoken_goes_here}

Response:

HTTP/1.1 200 OK
Content-Type: application/xml; charset=UTF-8
<?xml version="1.0" encoding="ISO-8859-1"?>

<Resources xmlns="http://schemas.amee.cc/2.0">
 <ProfileItemResource>
  <ProfileItem created="2011-03-08T13:56:01Z" modified="2011-03-08T13:56:01Z" uid="F0638HOIFC1H">
   <Name/>
   <ItemValues>
    <ItemValue uid="42ROH1HOI2BE">
     <Path>mass</Path>
     <Name>Mass of fuel consumed</Name>
     <Value/>
     <Unit>kg</Unit>
     <PerUnit/>
     <StartDate>2011-03-08T13:56:00Z</StartDate>
     <ItemValueDefinition uid="50151C2D0B90">
      <Path>mass</Path>
      <Name>Mass of fuel consumed</Name>
      <ValueDefinition created="2007-07-27 07:30:44.0" modified="2007-07-27 07:30:44.0" uid="45433E48B39F">
       <Name>amount</Name>
       <ValueType>DECIMAL</ValueType>
       <Description/>
       <Environment uid="5F5887BCF726"/>
      </ValueDefinition>
      <Unit>kg</Unit>
      <FromProfile>true</FromProfile>
      <FromData>false</FromData>
      <DrillDown>false</DrillDown>
     </ItemValueDefinition>
    </ItemValue>
    <ItemValue uid="U9J6XCMJT07I">
     <Path>volume</Path>
     <Name>Volume of fuel consumed</Name>
     <Value>500</Value>
     <Unit>L</Unit>
     <PerUnit/>
     <StartDate>2011-03-08T13:56:00Z</StartDate>
     <ItemValueDefinition uid="93899EF4E3AF">
      <Path>volume</Path>
      <Name>Volume of fuel consumed</Name>
      <ValueDefinition created="2007-07-27 07:30:44.0" modified="2007-07-27 07:30:44.0" uid="45433E48B39F">
       <Name>amount</Name>
       <ValueType>DECIMAL</ValueType>
       <Description/>
       <Environment uid="5F5887BCF726"/>
      </ValueDefinition>
      <Unit>L</Unit>
      <FromProfile>true</FromProfile>
      <FromData>false</FromData>
      <DrillDown>false</DrillDown>
     </ItemValueDefinition>
    </ItemValue>
   </ItemValues>
   <Environment uid="5F5887BCF726"/>
   <ItemDefinition uid="80DB1AB8141F"/>
   <DataCategory uid="138B5405E0CE">
    <Name>Fuel</Name>
    <Path>fuel</Path>
    <Deprecated>false</Deprecated>
   </DataCategory>
   <Amount unit="kg/year">1161.0</Amount>
   <Amounts>
    <Amount default="true" perUnit="" type="totalDirectCO2e" unit="kg">1161.0</Amount>
    <Amount perUnit="" type="lifeCycleCO2e" unit="kg">1366.45</Amount>
    <Amount perUnit="" type="CO2" unit="kg">1150.9</Amount>
    <Amount perUnit="" type="nitrousOxideCO2e" unit="kg">7.8</Amount>
    <Amount perUnit="" type="methaneCO2e" unit="kg">2.3</Amount>
    <Amount perUnit="" type="indirectCO2e" unit="kg">205.45</Amount>
    <Note type="comment">This methodology provides emissions directly in terms of CO2e. No global warming potentials are applied in this calculation</Note>
   </Amounts>
   <StartDate>2011-03-08T13:56:00Z</StartDate>
   <EndDate/>
   <DataItem uid="19B311DDF0B1">
    <Label>petrol</Label>
   </DataItem>
   <Profile uid="YLLIKH73BDYS"/>
  </ProfileItem>
  <Path>/transport/defra/fuel/F0638HOIFC1H</Path>
  <Profile uid="YLLIKH73BDYS"/>
 </ProfileItemResource>
</Resources>

Example: AMEE 1 JSON

Request:

GET /profiles/BB1BDB4FDD77/home/energy/quantity/920B54ED665B HTTP/1.1
Accept: application/json
Authtoken: {your_authtoken_goes_here}

Response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
  "profileItem":{
    "uid":"920B54ED665B",
    "itemValues":[
    {
      "itemValueDefinition":{
        "uid":"51D072825D41",
        "name":"kg Per Month",
        "path":"kgPerMonth",
        "valueDefinition":{
          "uid":"36A771FC1D1A",
          "name":"kg",
          "valueType":"DECIMAL"
        }
      },
      "uid":"869D6084EB9C",
      "name":"kg Per Month",
      "value":"0",
      "path":"kgPerMonth"
    },
    {
      "itemValueDefinition":{
        "uid":"4DF458FD0E4D",
        "name":"kWh Per Month",
        "path":"kWhPerMonth",
        "valueDefinition":{
          "uid":"26A5C97D3728",
          "name":"kWh",
          "valueType":"DECIMAL"
        }
      },
      "uid":"CFA69C6E4D3F",
      "name":"kWh Per Month",
      "value":"10",
      "path":"kWhPerMonth"
    },
    {
      "itemValueDefinition":{
        "uid":"C9B7E19269A5",
        "name":"Litres Per Month",
        "path":"litresPerMonth",
        "valueDefinition":{
          "uid":"06B8CFC5A521",
          "name":"litre",
          "valueType":"DECIMAL"
        }
      },
      "uid":"A5E88E093F9F",
      "name":"Litres Per Month",
      "value":"0",
      "path":"litresPerMonth"
    },
    {
      "itemValueDefinition":{
        "uid":"8A468E75C8E8",
        "name":"kWh reading current",
        "path":"kWhReadingCurrent",
        "valueDefinition":{
          "uid":"45433E48B39F",
          "name":"amount",
          "valueType":"DECIMAL"
        }
      },
      "uid":"335A93429B77",
      "name":"kWh reading current",
      "value":"0",
      "path":"kWhReadingCurrent"
    },
    {
      "itemValueDefinition":{
        "uid":"2328DC7F23AE",
        "name":"kWh reading last",
        "path":"kWhReadingLast",
        "valueDefinition":{
          "uid":"45433E48B39F",
          "name":"amount",
          "valueType":"DECIMAL"
        }
      },
      "uid":"38FAFEE33F01",
      "name":"kWh reading last",
      "value":"0",
      "path":"kWhReadingLast"
    },
    {
      "itemValueDefinition":{
        "uid":"E0EFED6FD7E6",
        "name":"Payment frequency",
        "path":"paymentFrequency",
        "valueDefinition":{
          "uid":"CCEB59CACE1B",
          "name":"text",
          "valueType":"TEXT"
        }
      },
      "uid":"EBC261EDC5D2",
      "name":"Payment frequency",
      "value":"",
      "path":"paymentFrequency"
    },
    {
      "itemValueDefinition":{
        "uid":"63005554AE8A",
        "name":"Green tariff",
        "path":"greenTariff",
        "valueDefinition":{
          "uid":"CCEB59CACE1B",
          "name":"text",
          "valueType":"TEXT"
        }
      },
      "uid":"3D90D411DC4B",
      "name":"Green tariff",
      "value":"",
      "path":"greenTariff"
    },
    {
      "itemValueDefinition":{
        "uid":"527AADFB3B65",
        "name":"Season",
        "path":"season",
        "valueDefinition":{
          "uid":"CCEB59CACE1B",
          "name":"text",
          "valueType":"TEXT"
        }
      },
      "uid":"67D489724500",
      "name":"Season",
      "value":"",
      "path":"season"
    },
    {
      "itemValueDefinition":{
        "uid":"1740E500BDAB",
        "name":"Includes Heating",
        "path":"includesHeating",
        "valueDefinition":{
          "uid":"CCEB59CACE1B",
          "name":"text",
          "valueType":"TEXT"
        }
      },
      "uid":"A0C15D226883",
      "name":"Includes Heating",
      "value":"false",
      "path":"includesHeating"
    },
    {
      "itemValueDefinition":{
        "uid":"AA1D1C349119",
        "name":"Number of deliveries",
        "path":"numberOfDeliveries",
        "valueDefinition":{
          "uid":"45433E48B39F",
          "name":"amount",
          "valueType":"DECIMAL"
        }
      },
      "uid":"FCABCD89A8D8",
      "name":"Number of deliveries",
      "value":"",
      "path":"numberOfDeliveries"
    }
    ],
    "dataCategory":{
      "uid":"A92693A99BAD",
      "name":"Quantity",
      "path":"quantity"
    },
    "itemDefinition":{
      "uid":"212C818D8F16"
    },
    "dataItem":{
      "uid":"66056991EE23"
    },
    "modified":"2009-03-19 15:25:40.0",
    "environment":{
      "uid":"5F5887BCF726"
    },
    "created":"2009-03-19 15:25:40.0",
    "name":"920B54ED665B",
    "validFrom":"20090301",
    "end":"false",
    "amountPerMonth":2.055,
    "profile":{
      "uid":"BB1BDB4FDD77"
    }
  },
  "path":"/home/energy/quantity/920B54ED665B",
  "actions":{
    "allowCreate":true,
    "allowView":true,
    "allowList":true,
    "allowModify":true,
    "allowDelete":true
  },
  "profile":{
    "uid":"BB1BDB4FDD77"
  }
}

Example: AMEE 1 XML

Request:

GET /profiles/228A21573085/home/energy/quantity/B56410A978B6 HTTP/1.1
Accept: application/xml
Authtoken: {your_authtoken_goes_here}

Response:

HTTP/1.1 200 OK
Content-Type: application/xml; charset=UTF-8
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Resources>
  <ProfileItemResource>
    <ProfileItem created="2009-03-19 15:24:49.0" modified="2009-03-19 15:24:49.0" uid="B56410A978B6">
      <Name>B56410A978B6</Name>
      <ItemValues>
        <ItemValue uid="107FF5532DE5">
          <Path>kgPerMonth</Path>
          <Name>kg Per Month</Name>
          <Value>0</Value>
          <ItemValueDefinition uid="51D072825D41">
            <Path>kgPerMonth</Path>
            <Name>kg Per Month</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="36A771FC1D1A">
              <Name>kg</Name>
              <ValueType>DECIMAL</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
        <ItemValue uid="B42D22D0ECD4">
          <Path>kWhPerMonth</Path>
          <Name>kWh Per Month</Name>
          <Value>10</Value>
          <ItemValueDefinition uid="4DF458FD0E4D">
            <Path>kWhPerMonth</Path>
            <Name>kWh Per Month</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="26A5C97D3728">
              <Name>kWh</Name>
              <ValueType>DECIMAL</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
        <ItemValue uid="8BF405B8291F">
          <Path>litresPerMonth</Path>
          <Name>Litres Per Month</Name>
          <Value>0</Value>
          <ItemValueDefinition uid="C9B7E19269A5">
            <Path>litresPerMonth</Path>
            <Name>Litres Per Month</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="06B8CFC5A521">
              <Name>litre</Name>
              <ValueType>DECIMAL</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
        <ItemValue uid="8297791D7658">
          <Path>kWhReadingCurrent</Path>
          <Name>kWh reading current</Name>
          <Value>0</Value>
          <ItemValueDefinition uid="8A468E75C8E8">
            <Path>kWhReadingCurrent</Path>
            <Name>kWh reading current</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="45433E48B39F">
              <Name>amount</Name>
              <ValueType>DECIMAL</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
        <ItemValue uid="92287A1CA208">
          <Path>kWhReadingLast</Path>
          <Name>kWh reading last</Name>
          <Value>0</Value>
          <ItemValueDefinition uid="2328DC7F23AE">
            <Path>kWhReadingLast</Path>
            <Name>kWh reading last</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="45433E48B39F">
              <Name>amount</Name>
              <ValueType>DECIMAL</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
        <ItemValue uid="95DBE63127D0">
          <Path>paymentFrequency</Path>
          <Name>Payment frequency</Name>
          <Value/>
          <ItemValueDefinition uid="E0EFED6FD7E6">
            <Path>paymentFrequency</Path>
            <Name>Payment frequency</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="CCEB59CACE1B">
              <Name>text</Name>
              <ValueType>TEXT</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
        <ItemValue uid="0766BF423B92">
          <Path>greenTariff</Path>
          <Name>Green tariff</Name>
          <Value/>
          <ItemValueDefinition uid="63005554AE8A">
            <Path>greenTariff</Path>
            <Name>Green tariff</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="CCEB59CACE1B">
              <Name>text</Name>
              <ValueType>TEXT</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
        <ItemValue uid="F74ED5732DA2">
          <Path>season</Path>
          <Name>Season</Name>
          <Value/>
          <ItemValueDefinition uid="527AADFB3B65">
            <Path>season</Path>
            <Name>Season</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="CCEB59CACE1B">
              <Name>text</Name>
              <ValueType>TEXT</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
        <ItemValue uid="1887C378A7E3">
          <Path>includesHeating</Path>
          <Name>Includes Heating</Name>
          <Value>false</Value>
          <ItemValueDefinition uid="1740E500BDAB">
            <Path>includesHeating</Path>
            <Name>Includes Heating</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="CCEB59CACE1B">
              <Name>text</Name>
              <ValueType>TEXT</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
        <ItemValue uid="2FE6E3AA1BCA">
          <Path>numberOfDeliveries</Path>
          <Name>Number of deliveries</Name>
          <Value/>
          <ItemValueDefinition uid="AA1D1C349119">
            <Path>numberOfDeliveries</Path>
            <Name>Number of deliveries</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="45433E48B39F">
              <Name>amount</Name>
              <ValueType>DECIMAL</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
      </ItemValues>
      <Environment uid="5F5887BCF726"/>
      <ItemDefinition uid="212C818D8F16"/>
      <DataCategory uid="A92693A99BAD">
        <Name>Quantity</Name>
        <Path>quantity</Path>
      </DataCategory>
      <AmountPerMonth>2.055000</AmountPerMonth>
      <ValidFrom>20090301</ValidFrom>
      <End>false</End>
      <DataItem uid="66056991EE23"/>
      <Profile uid="228A21573085"/>
    </ProfileItem>
    <Path>/home/energy/quantity/B56410A978B6</Path>
    <Profile uid="228A21573085"/>
  </ProfileItemResource>
</Resources>

Create a new Profile Item

  • URL:  http://{server}/profiles/{profile_uid}/{category_path}
  • Method: POST
  • Request format: application/x-www-form-urlencoded
  • Response format: application/xml, application/json, application/atom+xml (AMEE 2 only)
  • Response code: AMEE 2: 201 Created + 'Location' header specifying location of created item. AMEE 1: 200 OK
  • Response body: AMEE 2: None unless "representation=full" is specified. AMEE 1: Representation of created item.

Multiple Profile Items can be created at the same time using Batch Requests.

Parameters:

API VersionParameterDefinitionRequired
alldataItemUidThe UID of the Data Item which a new Profile Item should be based upon. This should be obtained from a DrillDown request.Yes
all{valueName}Set a Profile Item Value by specifying the name and value. For example, the value name could be 'distance' supplied with a value of '300'. Multiple name & value pairs can be submitted so long as the Item Values exist for the Profile Item. Names and values are case sensitive.No
allnameSet the name of the item. You cannot create two items with the same dataItemUid and overlapping dates unless you give them a unique name.No
>= 2.0startDateThe time which the new Profile Item should be valid from. Format should be as specified in Dates and Times. Defaults to the current time.No, unless you specify endDate or duration
>= 2.0endDateThe time which the new Profile Item should be valid to. Format should be as specified in Dates and Times. Defaults to infinitely far in the future.No
>= 2.0durationAs an alternative to specifying an end time, you can specify the duration that the item should be valid for. Format should be as specified in Dates and Times.No
>= 2.0representationWhat representation of the new object should be returned in the response to this request? Set to 'full' to get a representation back, otherwise nothing will be returned in the response body.No
< 2.0validFromThe date from which the new Profile Item will be valid. Format should be 'yyyyMMdd' such as '20070101'. Defaults to the current date.No
< 2.0endSpecify if the new Profile Item is an end marker. Values are 'true' or 'false'. Defaults to 'false'.No

Example: AMEE 2

Request:

POST /profiles/YLLIKH73BDYS/transport/defra/fuel HTTP/1.1
Accept: application/xml
Content-Type: application/x-www-form-urlencoded
Authtoken: {your_authtoken_goes_here}
dataItemUid=19B311DDF0B1&volume=500&startDate=2011-01-05T00%3A00%3A00%2B00%3A00

Response:

HTTP/1.1 201 CREATED
Location: https://{server}.amee.com/profiles/4737069901D3/home/energy/quantity/F0638HOIFC1H
Content-Type: text/plain

Example: AMEE 2 JSON (with representation)

Request:

POST /profiles/YLLIKH73BDYS/transport/defra/fuel HTTP/1.1
Accept: application/json
Content-Type: application/x-www-form-urlencoded
Authtoken: {your_authtoken_goes_here}
dataItemUid=19B311DDF0B1&volume=500&startDate=2011-01-05T00%3A00%3A00%2B00%3A00
&representation=full

Response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
  "profileItems": [
    {
      "modified": "2011-03-08T13:59:03Z",
      "name": "json_example",
      "itemValues": [
        {
          "name": "Mass of fuel consumed",
          "itemValueDefinition": {
            "fromData": false,
            "name": "Mass of fuel consumed",
            "drillDown": false,
            "fromProfile": true,
            "uid": "50151C2D0B90",
            "valueDefinition": {
              "modified": "2007-07-27 07:30:44.0",
              "name": "amount",
              "valueType": "DECIMAL",
              "uid": "45433E48B39F",
              "description": "",
              "environment": {
                "uid": "5F5887BCF726"
              },
              "created": "2007-07-27 07:30:44.0"
            },
            "unit": "kg",
            "path": "mass"
          },
          "displayName": "Mass of fuel consumed",
          "perUnit": "",
          "startDate": "2011-01-05T00:00:00Z",
          "uid": "TV1542A62T96",
          "value": "",
          "unit": "kg",
          "path": "mass",
          "displayPath": "mass"
        },
        {
          "name": "Volume of fuel consumed",
          "itemValueDefinition": {
            "fromData": false,
            "name": "Volume of fuel consumed",
            "drillDown": false,
            "fromProfile": true,
            "uid": "93899EF4E3AF",
            "valueDefinition": {
              "modified": "2007-07-27 07:30:44.0",
              "name": "amount",
              "valueType": "DECIMAL",
              "uid": "45433E48B39F",
              "description": "",
              "environment": {
                "uid": "5F5887BCF726"
              },
              "created": "2007-07-27 07:30:44.0"
            },
            "unit": "L",
            "path": "volume"
          },
          "displayName": "Volume of fuel consumed",
          "perUnit": "",
          "startDate": "2011-01-05T00:00:00Z",
          "uid": "9F90AKHD7CMG",
          "value": "500",
          "unit": "L",
          "path": "volume",
          "displayPath": "volume"
        }
      ],
      "amount": {
        "value": 1161,
        "unit": "kg/year"
      },
      "startDate": "2011-01-05T00:00:00Z",
      "uid": "9UY7CR57O59V",
      "dataItem": {
        "Label": "petrol",
        "uid": "19B311DDF0B1"
      },
      "amounts": {
        "amount": [
          {
            "default": "true",
            "type": "totalDirectCO2e",
            "value": 1161,
            "unit": "kg"
          },
          {
            "type": "lifeCycleCO2e",
            "value": 1366.45,
            "unit": "kg"
          },
          {
            "type": "CO2",
            "value": 1150.9,
            "unit": "kg"
          },
          {
            "type": "nitrousOxideCO2e",
            "value": 7.8,
            "unit": "kg"
          },
          {
            "type": "methaneCO2e",
            "value": 2.3,
            "unit": "kg"
          },
          {
            "type": "indirectCO2e",
            "value": 205.45,
            "unit": "kg"
          }
        ],
        "note": [
          {
            "type": "comment",
            "value": "This methodology provides emissions directly in terms of CO2e. No global warming potentials are applied in this calculation"
          }
        ]
      },
      "endDate": "",
      "created": "2011-03-08T13:59:03Z"
    }
  ],
  "dataCategory": {
    "modified": "2011-02-10 20:35:47.0",
    "name": "Fuel",
    "dataCategory": {
      "name": "Defra",
      "uid": "4888AD538569",
      "path": "defra",
      "deprecated": false
    },
    "uid": "138B5405E0CE",
    "path": "fuel",
    "itemDefinition": {
      "modified": "2010-11-09 19:32:16.0",
      "name": "DEFRA transport fuels",
      "drillDown": "fuel",
      "uid": "80DB1AB8141F",
      "environment": {
        "uid": "5F5887BCF726"
      },
      "created": "2010-11-09 19:29:48.0"
    },
    "environment": {
      "name": "AMEE",
      "itemsPerPage": 10,
      "uid": "5F5887BCF726",
      "path": "",
      "description": "",
      "itemsPerFeed": 10,
      "owner": ""
    },
    "deprecated": false,
    "created": "2010-11-09 19:30:24.0"
  },
  "profile": {
    "uid": "YLLIKH73BDYS"
  },
  "pager": {
    "items": 0,
    "currentPage": 1,
    "itemsPerPage": 10,
    "from": 0,
    "nextPage": -1,
    "to": 0,
    "itemsFound": 0,
    "start": 0,
    "requestedPage": 1,
    "lastPage": 1,
    "previousPage": -1
  },
  "totalAmount": {
    "value": "1161.0",
    "unit": "kg/year"
  },
  "path": "/transport/defra/fuel",
  "profileCategories": [

  ],
  "environment": {
    "modified": "Fri Jul 27 08:30:44 UTC 2007",
    "name": "AMEE",
    "itemsPerPage": 10,
    "uid": "5F5887BCF726",
    "path": "",
    "description": "",
    "itemsPerFeed": 10,
    "owner": "",
    "created": "Fri Jul 27 08:30:44 UTC 2007"
  },
  "apiVersion": "2.0"
}

Example: AMEE 2 XML (with representation)

Request:

POST /profiles/YLLIKH73BDYS/transport/defra/fuel HTTP/1.1
Accept: application/xml
Content-Type: application/x-www-form-urlencoded
Authtoken: {your_authtoken_goes_here}
dataItemUid=19B311DDF0B1&volume=500&startDate=2011-01-05T00%3A00%3A00%2B00%3A00
&representation=full

Response:

HTTP/1.1 200 OK
Content-Type: application/xml; charset=UTF-8
<?xml version="1.0" encoding="ISO-8859-1"?>

<Resources xmlns="http://schemas.amee.cc/2.0">
 <ProfileCategoryResource>
  <Path>/transport/defra/fuel</Path>
  <Profile uid="YLLIKH73BDYS"/>
  <Environment created="Fri Jul 27 08:30:44 UTC 2007" modified="Fri Jul 27 08:30:44 UTC 2007" uid="5F5887BCF726">
   <Name>AMEE</Name>
   <Path/>
   <Description/>
   <Owner/>
   <ItemsPerPage>10</ItemsPerPage>
   <ItemsPerFeed>10</ItemsPerFeed>
  </Environment>
  <DataCategory uid="138B5405E0CE">
   <Name>Fuel</Name>
   <Path>fuel</Path>
   <Deprecated>false</Deprecated>
  </DataCategory>
  <ProfileCategories/>
  <ProfileItems>
   <ProfileItem created="2011-03-08T13:59:05Z" modified="2011-03-08T13:59:05Z" uid="669ZF2KG9YWC">
    <Name>xml_example</Name>
    <ItemValues>
     <ItemValue uid="YNHN5QCD23Y0">
      <Path>mass</Path>
      <Name>Mass of fuel consumed</Name>
      <Value/>
      <Unit>kg</Unit>
      <PerUnit/>
      <StartDate>2011-01-05T00:00:00Z</StartDate>
      <ItemValueDefinition uid="50151C2D0B90">
       <Path>mass</Path>
       <Name>Mass of fuel consumed</Name>
       <ValueDefinition created="2007-07-27 07:30:44.0" modified="2007-07-27 07:30:44.0" uid="45433E48B39F">
        <Name>amount</Name>
        <ValueType>DECIMAL</ValueType>
        <Description/>
        <Environment uid="5F5887BCF726"/>
       </ValueDefinition>
       <Unit>kg</Unit>
       <FromProfile>true</FromProfile>
       <FromData>false</FromData>
       <DrillDown>false</DrillDown>
      </ItemValueDefinition>
     </ItemValue>
     <ItemValue uid="W8X4ZWO4Q1B4">
      <Path>volume</Path>
      <Name>Volume of fuel consumed</Name>
      <Value>500</Value>
      <Unit>L</Unit>
      <PerUnit/>
      <StartDate>2011-01-05T00:00:00Z</StartDate>
      <ItemValueDefinition uid="93899EF4E3AF">
       <Path>volume</Path>
       <Name>Volume of fuel consumed</Name>
       <ValueDefinition created="2007-07-27 07:30:44.0" modified="2007-07-27 07:30:44.0" uid="45433E48B39F">
        <Name>amount</Name>
        <ValueType>DECIMAL</ValueType>
        <Description/>
        <Environment uid="5F5887BCF726"/>
       </ValueDefinition>
       <Unit>L</Unit>
       <FromProfile>true</FromProfile>
       <FromData>false</FromData>
       <DrillDown>false</DrillDown>
      </ItemValueDefinition>
     </ItemValue>
    </ItemValues>
    <Amount unit="kg/year">1161.0</Amount>
    <Amounts>
     <Amount default="true" perUnit="" type="totalDirectCO2e" unit="kg">1161.0</Amount>
     <Amount perUnit="" type="lifeCycleCO2e" unit="kg">1366.45</Amount>
     <Amount perUnit="" type="CO2" unit="kg">1150.9</Amount>
     <Amount perUnit="" type="nitrousOxideCO2e" unit="kg">7.8</Amount>
     <Amount perUnit="" type="methaneCO2e" unit="kg">2.3</Amount>
     <Amount perUnit="" type="indirectCO2e" unit="kg">205.45</Amount>
     <Note type="comment">This methodology provides emissions directly in terms of CO2e. No global warming potentials are applied in this calculation</Note>
    </Amounts>
    <StartDate>2011-01-05T00:00:00Z</StartDate>
    <EndDate/>
    <DataItem uid="19B311DDF0B1">
     <Label>petrol</Label>
    </DataItem>
   </ProfileItem>
  </ProfileItems>
  <Pager>
   <Start>0</Start>
   <From>0</From>
   <To>0</To>
   <Items>0</Items>
   <CurrentPage>1</CurrentPage>
   <RequestedPage>1</RequestedPage>
   <NextPage>-1</NextPage>
   <PreviousPage>-1</PreviousPage>
   <LastPage>1</LastPage>
   <ItemsPerPage>10</ItemsPerPage>
   <ItemsFound>0</ItemsFound>
  </Pager>
  <TotalAmount unit="kg/year">1161.0</TotalAmount>
 </ProfileCategoryResource>
</Resources>

Example: AMEE 1 JSON

Request:

POST /profiles/BB1BDB4FDD77/home/energy/quantity HTTP/1.1
Accept: application/json
Content-Type: application/x-www-form-urlencoded
Authtoken: {your_authtoken_goes_here}
kWhPerMonth=10&dataItemUid=66056991EE23

Response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
  "dataCategory":{
    "uid":"A92693A99BAD",
    "name":"Quantity",
    "path":"quantity"
  },
  "profileItem":{
    "uid":"920B54ED665B",
    "itemValues":[
    {
      "itemValueDefinition":{
        "uid":"51D072825D41",
        "name":"kg Per Month",
        "path":"kgPerMonth",
        "valueDefinition":{
          "uid":"36A771FC1D1A",
          "name":"kg",
          "valueType":"DECIMAL"
        }
      },
      "uid":"869D6084EB9C",
      "name":"kg Per Month",
      "value":"0",
      "path":"kgPerMonth"
    },
    {
      "itemValueDefinition":{
        "uid":"4DF458FD0E4D",
        "name":"kWh Per Month",
        "path":"kWhPerMonth",
        "valueDefinition":{
          "uid":"26A5C97D3728",
          "name":"kWh",
          "valueType":"DECIMAL"
        }
      },
      "uid":"CFA69C6E4D3F",
      "name":"kWh Per Month",
      "value":"10",
      "path":"kWhPerMonth"
    },
    {
      "itemValueDefinition":{
        "uid":"C9B7E19269A5",
        "name":"Litres Per Month",
        "path":"litresPerMonth",
        "valueDefinition":{
          "uid":"06B8CFC5A521",
          "name":"litre",
          "valueType":"DECIMAL"
        }
      },
      "uid":"A5E88E093F9F",
      "name":"Litres Per Month",
      "value":"0",
      "path":"litresPerMonth"
    },
    {
      "itemValueDefinition":{
        "uid":"8A468E75C8E8",
        "name":"kWh reading current",
        "path":"kWhReadingCurrent",
        "valueDefinition":{
          "uid":"45433E48B39F",
          "name":"amount",
          "valueType":"DECIMAL"
        }
      },
      "uid":"335A93429B77",
      "name":"kWh reading current",
      "value":"0",
      "path":"kWhReadingCurrent"
    },
    {
      "itemValueDefinition":{
        "uid":"2328DC7F23AE",
        "name":"kWh reading last",
        "path":"kWhReadingLast",
        "valueDefinition":{
          "uid":"45433E48B39F",
          "name":"amount",
          "valueType":"DECIMAL"
        }
      },
      "uid":"38FAFEE33F01",
      "name":"kWh reading last",
      "value":"0",
      "path":"kWhReadingLast"
    },
    {
      "itemValueDefinition":{
        "uid":"E0EFED6FD7E6",
        "name":"Payment frequency",
        "path":"paymentFrequency",
        "valueDefinition":{
          "uid":"CCEB59CACE1B",
          "name":"text",
          "valueType":"TEXT"
        }
      },
      "uid":"EBC261EDC5D2",
      "name":"Payment frequency",
      "value":"",
      "path":"paymentFrequency"
    },
    {
      "itemValueDefinition":{
        "uid":"63005554AE8A",
        "name":"Green tariff",
        "path":"greenTariff",
        "valueDefinition":{
          "uid":"CCEB59CACE1B",
          "name":"text",
          "valueType":"TEXT"
        }
      },
      "uid":"3D90D411DC4B",
      "name":"Green tariff",
      "value":"",
      "path":"greenTariff"
    },
    {
      "itemValueDefinition":{
        "uid":"527AADFB3B65",
        "name":"Season",
        "path":"season",
        "valueDefinition":{
          "uid":"CCEB59CACE1B",
          "name":"text",
          "valueType":"TEXT"
        }
      },
      "uid":"67D489724500",
      "name":"Season",
      "value":"",
      "path":"season"
    },
    {
      "itemValueDefinition":{
        "uid":"1740E500BDAB",
        "name":"Includes Heating",
        "path":"includesHeating",
        "valueDefinition":{
          "uid":"CCEB59CACE1B",
          "name":"text",
          "valueType":"TEXT"
        }
      },
      "uid":"A0C15D226883",
      "name":"Includes Heating",
      "value":"false",
      "path":"includesHeating"
    },
    {
      "itemValueDefinition":{
        "uid":"AA1D1C349119",
        "name":"Number of deliveries",
        "path":"numberOfDeliveries",
        "valueDefinition":{
          "uid":"45433E48B39F",
          "name":"amount",
          "valueType":"DECIMAL"
        }
      },
      "uid":"FCABCD89A8D8",
      "name":"Number of deliveries",
      "value":"",
      "path":"numberOfDeliveries"
    }
    ],
    "dataCategory":{
      "uid":"A92693A99BAD",
      "name":"Quantity",
      "path":"quantity"
    },
    "itemDefinition":{
      "uid":"212C818D8F16"
    },
    "dataItem":{
      "uid":"66056991EE23"
    },
    "modified":"Thu Mar 19 15:25:40 GMT 2009",
    "environment":{
      "uid":"5F5887BCF726"
    },
    "created":"Thu Mar 19 15:25:40 GMT 2009",
    "name":"920B54ED665B",
    "validFrom":"20090301",
    "end":"false",
    "amountPerMonth":2.055,
    "profile":{
      "uid":"BB1BDB4FDD77"
    }
  },
  "path":"/home/energy/quantity",
  "profileItemActions":{
    "allowCreate":true,
    "allowView":true,
    "allowList":true,
    "allowModify":true,
    "allowDelete":true
  },
  "profileDate":"200903",
  "actions":{
    "allowCreate":true,
    "allowView":true,
    "allowList":true,
    "allowModify":true,
    "allowDelete":true
  },
  "profile":{
    "uid":"BB1BDB4FDD77"
  }
}

Example: AMEE 1 XML

Request:

POST /profiles/228A21573085/home/energy/quantity HTTP/1.1
Accept: application/xml
Content-Type: application/x-www-form-urlencoded
Authtoken: {your_authtoken_goes_here}
kWhPerMonth=10&dataItemUid=66056991EE23

Response:

HTTP/1.1 200 OK
Content-Type: application/xml; charset=UTF-8
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Resources>
  <ProfileCategoryResource>
    <Path>/home/energy/quantity</Path>
    <ProfileDate>200903</ProfileDate>
    <Profile uid="228A21573085"/>
    <DataCategory uid="A92693A99BAD">
      <Name>Quantity</Name>
      <Path>quantity</Path>
    </DataCategory>
    <ProfileItem uid="B56410A978B6">
      <Name>B56410A978B6</Name>
      <ItemValues>
        <ItemValue uid="107FF5532DE5">
          <Path>kgPerMonth</Path>
          <Name>kg Per Month</Name>
          <Value>0</Value>
          <ItemValueDefinition uid="51D072825D41">
            <Path>kgPerMonth</Path>
            <Name>kg Per Month</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="36A771FC1D1A">
              <Name>kg</Name>
              <ValueType>DECIMAL</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
        <ItemValue uid="B42D22D0ECD4">
          <Path>kWhPerMonth</Path>
          <Name>kWh Per Month</Name>
          <Value>10</Value>
          <ItemValueDefinition uid="4DF458FD0E4D">
            <Path>kWhPerMonth</Path>
            <Name>kWh Per Month</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="26A5C97D3728">
              <Name>kWh</Name>
              <ValueType>DECIMAL</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
        <ItemValue uid="8BF405B8291F">
          <Path>litresPerMonth</Path>
          <Name>Litres Per Month</Name>
          <Value>0</Value>
          <ItemValueDefinition uid="C9B7E19269A5">
            <Path>litresPerMonth</Path>
            <Name>Litres Per Month</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="06B8CFC5A521">
              <Name>litre</Name>
              <ValueType>DECIMAL</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
        <ItemValue uid="8297791D7658">
          <Path>kWhReadingCurrent</Path>
          <Name>kWh reading current</Name>
          <Value>0</Value>
          <ItemValueDefinition uid="8A468E75C8E8">
            <Path>kWhReadingCurrent</Path>
            <Name>kWh reading current</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="45433E48B39F">
              <Name>amount</Name>
              <ValueType>DECIMAL</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
        <ItemValue uid="92287A1CA208">
          <Path>kWhReadingLast</Path>
          <Name>kWh reading last</Name>
          <Value>0</Value>
          <ItemValueDefinition uid="2328DC7F23AE">
            <Path>kWhReadingLast</Path>
            <Name>kWh reading last</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="45433E48B39F">
              <Name>amount</Name>
              <ValueType>DECIMAL</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
        <ItemValue uid="95DBE63127D0">
          <Path>paymentFrequency</Path>
          <Name>Payment frequency</Name>
          <Value/>
          <ItemValueDefinition uid="E0EFED6FD7E6">
            <Path>paymentFrequency</Path>
            <Name>Payment frequency</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="CCEB59CACE1B">
              <Name>text</Name>
              <ValueType>TEXT</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
        <ItemValue uid="0766BF423B92">
          <Path>greenTariff</Path>
          <Name>Green tariff</Name>
          <Value/>
          <ItemValueDefinition uid="63005554AE8A">
            <Path>greenTariff</Path>
            <Name>Green tariff</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="CCEB59CACE1B">
              <Name>text</Name>
              <ValueType>TEXT</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
        <ItemValue uid="F74ED5732DA2">
          <Path>season</Path>
          <Name>Season</Name>
          <Value/>
          <ItemValueDefinition uid="527AADFB3B65">
            <Path>season</Path>
            <Name>Season</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="CCEB59CACE1B">
              <Name>text</Name>
              <ValueType>TEXT</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
        <ItemValue uid="1887C378A7E3">
          <Path>includesHeating</Path>
          <Name>Includes Heating</Name>
          <Value>false</Value>
          <ItemValueDefinition uid="1740E500BDAB">
            <Path>includesHeating</Path>
            <Name>Includes Heating</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="CCEB59CACE1B">
              <Name>text</Name>
              <ValueType>TEXT</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
        <ItemValue uid="2FE6E3AA1BCA">
          <Path>numberOfDeliveries</Path>
          <Name>Number of deliveries</Name>
          <Value/>
          <ItemValueDefinition uid="AA1D1C349119">
            <Path>numberOfDeliveries</Path>
            <Name>Number of deliveries</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="45433E48B39F">
              <Name>amount</Name>
              <ValueType>DECIMAL</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
      </ItemValues>
      <AmountPerMonth>2.055000</AmountPerMonth>
      <ValidFrom>20090301</ValidFrom>
      <End>false</End>
      <DataItem uid="66056991EE23"/>
    </ProfileItem>
  </ProfileCategoryResource>
</Resources>

Update a Profile Item

Multiple Profile Items can be updated at the same time using Batch Updates.

Parameters:

API VersionParameterDefinitionRequired
all{valueName}Set a Profile Item Value by specifying the name and value. For example, the value name could be 'distance' supplied with a value of '300'. Multiple name & value pairs can be submitted so long as the Item Values exist for the Profile Item. Names and values are case sensitive.No
allnameSet the name of the item.No
>= 2.0startDateThe time which the new Profile Item should be valid from. Format should be as specified in Dates and Times. Defaults to the current time.No, unless you specify endDate or duration
>= 2.0endDateThe time which the new Profile Item should be valid to. Format should be as specified in Dates and Times. Defaults to infinitely far in the future.No
>= 2.0durationAs an alternative to specifying an end time, you can specify the duration that the item should be valid for. Format should be as specified in Dates and Times.No
>= 2.0representationWhat representation of the object should be returned in the response to this request? Set to 'full' to get a representation back, otherwise nothing will be returned in the response body.No
< 2.0validFromThe date from which the new Profile Item will be valid. Format should be 'yyyyMMdd' such as '20070101'. Defaults to the current date.No
< 2.0endSpecify if the new Profile Item is an end marker. Values are 'true' or 'false'. Defaults to 'false'.No

Example: AMEE 2

Request:

PUT /profiles/YLLIKH73BDYS/transport/defra/fuel/F0638HOIFC1H HTTP/1.1
Accept: application/xml
Content-Type: application/x-www-form-urlencoded
Authtoken: {your_authtoken_goes_here}
volume=1000

Response:

HTTP/1.1 200 OK
Content-Type: text/plain

Example: AMEE 2 JSON (with representation)

Request:

PUT /profiles/YLLIKH73BDYS/transport/defra/fuel/9UY7CR57O59V HTTP/1.1
Accept: application/json
Content-Type: application/x-www-form-urlencoded
Authtoken: {your_authtoken_goes_here}
volume=1000&representation=full

Response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
  "profile": {
    "uid": "YLLIKH73BDYS"
  },
  "path": "/transport/defra/fuel/9UY7CR57O59V",
  "profileItem": {
    "name": "json_example",
    "modified": "2011-03-08T13:59:03Z",
    "dataCategory": {
      "name": "Fuel",
      "uid": "138B5405E0CE",
      "path": "fuel",
      "deprecated": false
    },
    "profile": {
      "uid": "YLLIKH73BDYS"
    },
    "itemValues": [
      {
        "name": "Mass of fuel consumed",
        "itemValueDefinition": {
          "fromData": false,
          "name": "Mass of fuel consumed",
          "drillDown": false,
          "fromProfile": true,
          "uid": "50151C2D0B90",
          "valueDefinition": {
            "modified": "2007-07-27 07:30:44.0",
            "name": "amount",
            "valueType": "DECIMAL",
            "uid": "45433E48B39F",
            "description": "",
            "environment": {
              "uid": "5F5887BCF726"
            },
            "created": "2007-07-27 07:30:44.0"
          },
          "unit": "kg",
          "path": "mass"
        },
        "displayName": "Mass of fuel consumed",
        "perUnit": "",
        "startDate": "2011-01-05T00:00:00Z",
        "uid": "TV1542A62T96",
        "value": "",
        "unit": "kg",
        "path": "mass",
        "displayPath": "mass"
      },
      {
        "name": "Volume of fuel consumed",
        "itemValueDefinition": {
          "fromData": false,
          "name": "Volume of fuel consumed",
          "drillDown": false,
          "fromProfile": true,
          "uid": "93899EF4E3AF",
          "valueDefinition": {
            "modified": "2007-07-27 07:30:44.0",
            "name": "amount",
            "valueType": "DECIMAL",
            "uid": "45433E48B39F",
            "description": "",
            "environment": {
              "uid": "5F5887BCF726"
            },
            "created": "2007-07-27 07:30:44.0"
          },
          "unit": "L",
          "path": "volume"
        },
        "displayName": "Volume of fuel consumed",
        "perUnit": "",
        "startDate": "2011-01-05T00:00:00Z",
        "uid": "9F90AKHD7CMG",
        "value": "1000",
        "unit": "L",
        "path": "volume",
        "displayPath": "volume"
      }
    ],
    "amount": {
      "value": 2322,
      "unit": "kg/year"
    },
    "startDate": "2011-01-05T00:00:00Z",
    "uid": "9UY7CR57O59V",
    "amounts": {
      "amount": [
        {
          "default": "true",
          "type": "totalDirectCO2e",
          "value": 2322,
          "unit": "kg"
        },
        {
          "type": "lifeCycleCO2e",
          "value": 2732.9,
          "unit": "kg"
        },
        {
          "type": "CO2",
          "value": 2301.8,
          "unit": "kg"
        },
        {
          "type": "nitrousOxideCO2e",
          "value": 15.6,
          "unit": "kg"
        },
        {
          "type": "methaneCO2e",
          "value": 4.6,
          "unit": "kg"
        },
        {
          "type": "indirectCO2e",
          "value": 410.9,
          "unit": "kg"
        }
      ],
      "note": [
        {
          "type": "comment",
          "value": "This methodology provides emissions directly in terms of CO2e. No global warming potentials are applied in this calculation"
        }
      ]
    },
    "dataItem": {
      "Label": "petrol",
      "uid": "19B311DDF0B1"
    },
    "environment": {
      "name": "AMEE",
      "itemsPerPage": 10,
      "uid": "5F5887BCF726",
      "path": "",
      "description": "",
      "itemsPerFeed": 10,
      "owner": ""
    },
    "itemDefinition": {
      "name": "DEFRA transport fuels",
      "drillDown": "fuel",
      "uid": "80DB1AB8141F"
    },
    "endDate": "",
    "created": "2011-03-08T13:59:03Z"
  },
  "apiVersion": "2.0"
}

Example: AMEE 2 XML (with representation)

Request:

PUT /profiles/YLLIKH73BDYS/transport/defra/fuel/669ZF2KG9YWC HTTP/1.1
Accept: application/xml
Content-Type: application/x-www-form-urlencoded
Authtoken: {your_authtoken_goes_here}
volume=1000&representation=full

Response:

HTTP/1.1 200 OK
Content-Type: application/xml; charset=UTF-8
<?xml version="1.0" encoding="ISO-8859-1"?>

<Resources xmlns="http://schemas.amee.cc/2.0">
 <ProfileItemResource>
  <ProfileItem created="2011-03-08T13:59:05Z" modified="2011-03-08T13:59:05Z" uid="669ZF2KG9YWC">
   <Name>xml_example</Name>
   <ItemValues>
    <ItemValue uid="YNHN5QCD23Y0">
     <Path>mass</Path>
     <Name>Mass of fuel consumed</Name>
     <Value/>
     <Unit>kg</Unit>
     <PerUnit/>
     <StartDate>2011-01-05T00:00:00Z</StartDate>
     <ItemValueDefinition uid="50151C2D0B90">
      <Path>mass</Path>
      <Name>Mass of fuel consumed</Name>
      <ValueDefinition created="2007-07-27 07:30:44.0" modified="2007-07-27 07:30:44.0" uid="45433E48B39F">
       <Name>amount</Name>
       <ValueType>DECIMAL</ValueType>
       <Description/>
       <Environment uid="5F5887BCF726"/>
      </ValueDefinition>
      <Unit>kg</Unit>
      <FromProfile>true</FromProfile>
      <FromData>false</FromData>
      <DrillDown>false</DrillDown>
     </ItemValueDefinition>
    </ItemValue>
    <ItemValue uid="W8X4ZWO4Q1B4">
     <Path>volume</Path>
     <Name>Volume of fuel consumed</Name>
     <Value>1000</Value>
     <Unit>L</Unit>
     <PerUnit/>
     <StartDate>2011-01-05T00:00:00Z</StartDate>
     <ItemValueDefinition uid="93899EF4E3AF">
      <Path>volume</Path>
      <Name>Volume of fuel consumed</Name>
      <ValueDefinition created="2007-07-27 07:30:44.0" modified="2007-07-27 07:30:44.0" uid="45433E48B39F">
       <Name>amount</Name>
       <ValueType>DECIMAL</ValueType>
       <Description/>
       <Environment uid="5F5887BCF726"/>
      </ValueDefinition>
      <Unit>L</Unit>
      <FromProfile>true</FromProfile>
      <FromData>false</FromData>
      <DrillDown>false</DrillDown>
     </ItemValueDefinition>
    </ItemValue>
   </ItemValues>
   <Environment uid="5F5887BCF726"/>
   <ItemDefinition uid="80DB1AB8141F"/>
   <DataCategory uid="138B5405E0CE">
    <Name>Fuel</Name>
    <Path>fuel</Path>
    <Deprecated>false</Deprecated>
   </DataCategory>
   <Amount unit="kg/year">2322.0</Amount>
   <Amounts>
    <Amount default="true" perUnit="" type="totalDirectCO2e" unit="kg">2322.0</Amount>
    <Amount perUnit="" type="lifeCycleCO2e" unit="kg">2732.9</Amount>
    <Amount perUnit="" type="CO2" unit="kg">2301.8</Amount>
    <Amount perUnit="" type="nitrousOxideCO2e" unit="kg">15.6</Amount>
    <Amount perUnit="" type="methaneCO2e" unit="kg">4.6</Amount>
    <Amount perUnit="" type="indirectCO2e" unit="kg">410.9</Amount>
    <Note type="comment">This methodology provides emissions directly in terms of CO2e. No global warming potentials are applied in this calculation</Note>
   </Amounts>
   <StartDate>2011-01-05T00:00:00Z</StartDate>
   <EndDate/>
   <DataItem uid="19B311DDF0B1">
    <Label>petrol</Label>
   </DataItem>
   <Profile uid="YLLIKH73BDYS"/>
  </ProfileItem>
  <Path>/transport/defra/fuel/669ZF2KG9YWC</Path>
  <Profile uid="YLLIKH73BDYS"/>
 </ProfileItemResource>
</Resources>

Example: AMEE 1 JSON

Request:

PUT /profiles/0540A66CB457/transport/car/generic/AD7AC1FFDEBF HTTP/1.1
Accept: application/json
Content-Type: application/x-www-form-urlencoded
Authtoken: {your_authtoken_goes_here}
distanceKmPerMonth=200

Response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
  "profileItem":{
    "uid":"AD7AC1FFDEBF",
    "itemValues":[
    {
      "itemValueDefinition":{
        "uid":"642D122C75CF",
        "name":"Distance Km Per Month",
        "path":"distanceKmPerMonth",
        "valueDefinition":{
          "uid":"B691497F1CF2",
          "name":"kM",
          "valueType":"DECIMAL"
        }
      },
      "uid":"8A9B006334CC",
      "name":"Distance Km Per Month",
      "value":"200",
      "path":"distanceKmPerMonth"
    },
    {
      "itemValueDefinition":{
        "uid":"E71C70232690",
        "name":"km per litre",
        "path":"kmPerLitre",
        "valueDefinition":{
          "uid":"45433E48B39F",
          "name":"amount",
          "valueType":"DECIMAL"
        }
      },
      "uid":"B81CFD333946",
      "name":"km per litre",
      "value":"0",
      "path":"kmPerLitre"
    },
    {
      "itemValueDefinition":{
        "uid":"12EF40AE3350",
        "name":"km per litre own",
        "path":"kmPerLitreOwn",
        "valueDefinition":{
          "uid":"45433E48B39F",
          "name":"amount",
          "valueType":"DECIMAL"
        }
      },
      "uid":"F26C5DD0B93E",
      "name":"km per litre own",
      "value":"0",
      "path":"kmPerLitreOwn"
    },
    {
      "itemValueDefinition":{
        "uid":"7CD6E15D8A50",
        "name":"Occupants",
        "path":"occupants",
        "valueDefinition":{
          "uid":"45433E48B39F",
          "name":"amount",
          "valueType":"DECIMAL"
        }
      },
      "uid":"01DA52A4C167",
      "name":"Occupants",
      "value":"-1",
      "path":"occupants"
    },
    {
      "itemValueDefinition":{
        "uid":"EB39CC97A53D",
        "name":"Country",
        "path":"country",
        "valueDefinition":{
          "uid":"CCEB59CACE1B",
          "name":"text",
          "valueType":"TEXT"
        }
      },
      "uid":"394D09932323",
      "name":"Country",
      "value":"",
      "path":"country"
    },
    {
      "itemValueDefinition":{
        "uid":"96935A6CDA50",
        "name":"Tyres underinflated",
        "path":"tyresUnderinflated",
        "valueDefinition":{
          "uid":"4594CFEC6A20",
          "name":"boolean",
          "valueType":"BOOLEAN"
        }
      },
      "uid":"D3A0876AE97D",
      "name":"Tyres underinflated",
      "value":"false",
      "path":"tyresUnderinflated"
    },
    {
      "itemValueDefinition":{
        "uid":"10D599D12948",
        "name":"Aircon typical",
        "path":"airconTypical",
        "valueDefinition":{
          "uid":"4594CFEC6A20",
          "name":"boolean",
          "valueType":"BOOLEAN"
        }
      },
      "uid":"1FC985127DDA",
      "name":"Aircon typical",
      "value":"true",
      "path":"airconTypical"
    },
    {
      "itemValueDefinition":{
        "uid":"2FAF1983E021",
        "name":"Eco driving",
        "path":"ecoDriving",
        "valueDefinition":{
          "uid":"4594CFEC6A20",
          "name":"boolean",
          "valueType":"BOOLEAN"
        }
      },
      "uid":"4FDF119422D2",
      "name":"Eco driving",
      "value":"false",
      "path":"ecoDriving"
    },
    {
      "itemValueDefinition":{
        "uid":"C99D27503DB5",
        "name":"Aircon full",
        "path":"airconFull",
        "valueDefinition":{
          "uid":"4594CFEC6A20",
          "name":"boolean",
          "valueType":"BOOLEAN"
        }
      },
      "uid":"E2F2E3912356",
      "name":"Aircon full",
      "value":"false",
      "path":"airconFull"
    },
    {
      "itemValueDefinition":{
        "uid":"8B04D017B840",
        "name":"Regularly serviced",
        "path":"regularlyServiced",
        "valueDefinition":{
          "uid":"4594CFEC6A20",
          "name":"boolean",
          "valueType":"BOOLEAN"
        }
      },
      "uid":"AED0903F29DE",
      "name":"Regularly serviced",
      "value":"true",
      "path":"regularlyServiced"
    }
    ],
    "dataCategory":{
      "uid":"87E55DA88017",
      "name":"Generic",
      "path":"generic"
    },
    "itemDefinition":{
      "uid":"123C4A18B5D6"
    },
    "dataItem":{
      "uid":"7E2B2426C927"
    },
    "modified":"2009-03-19 17:36:20.0",
    "environment":{
      "uid":"5F5887BCF726"
    },
    "created":"2009-03-19 17:36:20.0",
    "name":"test1",
    "validFrom":"20090301",
    "end":"false",
    "amountPerMonth":37.62,
    "profile":{
      "uid":"0540A66CB457"
    }
  },
  "path":"/transport/car/generic/AD7AC1FFDEBF",
  "actions":{
    "allowCreate":true,
    "allowView":true,
    "allowList":true,
    "allowModify":true,
    "allowDelete":true
  },
  "profile":{
    "uid":"0540A66CB457"
  }
}

Example: AMEE 1 XML

Request:

PUT /profiles/5476C448DEC2/transport/car/generic/28C034328A50 HTTP/1.1
Accept: application/xml
Content-Type: application/x-www-form-urlencoded
Authtoken: {your_authtoken_goes_here}
distanceKmPerMonth=200

Response:

HTTP/1.1 200 OK
Content-Type: application/xml; charset=UTF-8
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Resources>
  <ProfileItemResource>
    <ProfileItem created="2009-03-19 17:36:17.0" modified="Thu Mar 19 17:36:18 GMT 2009" uid="28C034328A50">
      <Name>test1</Name>
      <ItemValues>
        <ItemValue uid="D4E0F8968A73">
          <Path>distanceKmPerMonth</Path>
          <Name>Distance Km Per Month</Name>
          <Value>200</Value>
          <ItemValueDefinition uid="642D122C75CF">
            <Path>distanceKmPerMonth</Path>
            <Name>Distance Km Per Month</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="B691497F1CF2">
              <Name>kM</Name>
              <ValueType>DECIMAL</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
        <ItemValue uid="BE62E353D7A1">
          <Path>kmPerLitre</Path>
          <Name>km per litre</Name>
          <Value>0</Value>
          <ItemValueDefinition uid="E71C70232690">
            <Path>kmPerLitre</Path>
            <Name>km per litre</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="45433E48B39F">
              <Name>amount</Name>
              <ValueType>DECIMAL</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
        <ItemValue uid="8EA2480CE5CE">
          <Path>kmPerLitreOwn</Path>
          <Name>km per litre own</Name>
          <Value>0</Value>
          <ItemValueDefinition uid="12EF40AE3350">
            <Path>kmPerLitreOwn</Path>
            <Name>km per litre own</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="45433E48B39F">
              <Name>amount</Name>
              <ValueType>DECIMAL</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
        <ItemValue uid="9A913B63F39D">
          <Path>occupants</Path>
          <Name>Occupants</Name>
          <Value>-1</Value>
          <ItemValueDefinition uid="7CD6E15D8A50">
            <Path>occupants</Path>
            <Name>Occupants</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="45433E48B39F">
              <Name>amount</Name>
              <ValueType>DECIMAL</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
        <ItemValue uid="78D58E79376C">
          <Path>country</Path>
          <Name>Country</Name>
          <Value/>
          <ItemValueDefinition uid="EB39CC97A53D">
            <Path>country</Path>
            <Name>Country</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="CCEB59CACE1B">
              <Name>text</Name>
              <ValueType>TEXT</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
        <ItemValue uid="9F07792D50F0">
          <Path>tyresUnderinflated</Path>
          <Name>Tyres underinflated</Name>
          <Value>false</Value>
          <ItemValueDefinition uid="96935A6CDA50">
            <Path>tyresUnderinflated</Path>
            <Name>Tyres underinflated</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="4594CFEC6A20">
              <Name>boolean</Name>
              <ValueType>BOOLEAN</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
        <ItemValue uid="E35702240296">
          <Path>airconTypical</Path>
          <Name>Aircon typical</Name>
          <Value>true</Value>
          <ItemValueDefinition uid="10D599D12948">
            <Path>airconTypical</Path>
            <Name>Aircon typical</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="4594CFEC6A20">
              <Name>boolean</Name>
              <ValueType>BOOLEAN</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
        <ItemValue uid="0C475D5718C0">
          <Path>ecoDriving</Path>
          <Name>Eco driving</Name>
          <Value>false</Value>
          <ItemValueDefinition uid="2FAF1983E021">
            <Path>ecoDriving</Path>
            <Name>Eco driving</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="4594CFEC6A20">
              <Name>boolean</Name>
              <ValueType>BOOLEAN</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
        <ItemValue uid="3B43BA1AC0F4">
          <Path>airconFull</Path>
          <Name>Aircon full</Name>
          <Value>false</Value>
          <ItemValueDefinition uid="C99D27503DB5">
            <Path>airconFull</Path>
            <Name>Aircon full</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="4594CFEC6A20">
              <Name>boolean</Name>
              <ValueType>BOOLEAN</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
        <ItemValue uid="DB0E1252622E">
          <Path>regularlyServiced</Path>
          <Name>Regularly serviced</Name>
          <Value>true</Value>
          <ItemValueDefinition uid="8B04D017B840">
            <Path>regularlyServiced</Path>
            <Name>Regularly serviced</Name>
            <FromProfile>true</FromProfile>
            <FromData>false</FromData>
            <ValueDefinition uid="4594CFEC6A20">
              <Name>boolean</Name>
              <ValueType>BOOLEAN</ValueType>
            </ValueDefinition>
          </ItemValueDefinition>
        </ItemValue>
      </ItemValues>
      <Environment uid="5F5887BCF726"/>
      <ItemDefinition uid="123C4A18B5D6"/>
      <DataCategory uid="87E55DA88017">
        <Name>Generic</Name>
        <Path>generic</Path>
      </DataCategory>
      <AmountPerMonth>37.620000</AmountPerMonth>
      <ValidFrom>20090301</ValidFrom>
      <End>false</End>
      <DataItem uid="7E2B2426C927"/>
      <Profile uid="5476C448DEC2"/>
    </ProfileItem>
    <Path>/transport/car/generic/28C034328A50</Path>
    <Profile uid="5476C448DEC2"/>
  </ProfileItemResource>
</Resources>

Delete a Profile Item

Example

Request:

DELETE /profiles/YLLIKH73BDYS/transport/defra/fuel/F0638HOIFC1H HTTP/1.1
Accept: application/xml
Authtoken: {your_authtoken_goes_here}

Response:

HTTP/1.1 200 OK
Content-Type: text/plain

Related Resources