Plots

List all plots.

Lists all plots of your business.

GEThttps://api.tradeaware.live-eo.com/plots
Query parameters
Response

A list of all plots

Body
itemsone of
Request
const response = await fetch('https://api.tradeaware.live-eo.com/plots', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
[
  {
    "id": "02c36247-1aad-41ba-aa49-f114ca4c263f",
    "createdAt": "2023‐07‐26T15:03:48Z",
    "updatedAt": "2023‐07‐28T09:13:37Z",
    "suppliers": [
      {
        "id": "02c36247-1aad-41ba-aa49-f114ca4c263f",
        "email": "user@example.com",
        "name": "Example Inc.",
        "username": "John Doe",
        "addressStreet": "Salawati 143",
        "addressZip": "98451",
        "addressPostcode": "12345",
        "addressArea": "Brandenburg",
        "addressCity": "West Papua",
        "addressCountryCode": "ID",
        "addressCountry": "Indonesia",
        "addressLine1": "Salawati 123",
        "addressLine2": "3rd floor",
        "createdAt": "2023-07-26T15:03:48Z",
        "updatedAt": "2023-07-28T09:13:37Z",
        "initialLocale": "id-ID",
        "units": "metric",
        "plots": [
          {
            "id": "02c36247-1aad-41ba-aa49-f114ca4c263f",
            "createdAt": "2023‐07‐26T15:03:48Z",
            "updatedAt": "2023‐07‐28T09:13:37Z",
            "suppliers": [],
            "geometry": {
              "type": "Polygon",
              "coordinates": [
                [
                  [
                    100,
                    0
                  ],
                  [
                    101,
                    0
                  ],
                  [
                    101,
                    1
                  ],
                  [
                    100,
                    1
                  ],
                  [
                    100,
                    0
                  ]
                ]
              ]
            },
            "commodities": [
              "oil palm",
              "rubber"
            ],
            "name": "text",
            "surfaceArea": 0,
            "countryCode": "text",
            "mostRecentAnalysis": {
              "id": "02c36247-1aad-41ba-aa49-f114ca4c263f",
              "createdAt": "2023-07-26T15:03:48Z",
              "updatedAt": "2023-07-28T09:13:37Z",
              "status": "started",
              "plotId": "02c36247-1aad-41ba-aa49-f114ca4c263f",
              "analysedAt": "2023-07-28T09:13:37Z",
              "version": "open-source-1.0.0",
              "deforestedArea": 123.45,
              "deforestedGeometry": {
                "type": "Polygon",
                "coordinates": [
                  [
                    [
                      13,
                      52.5
                    ],
                    [
                      13.5,
                      52.5
                    ],
                    [
                      13.5,
                      52
                    ],
                    [
                      13,
                      52
                    ],
                    [
                      13,
                      52.5
                    ]
                  ]
                ]
              },
              "riskOfDeforestation": 0.3,
              "metadata": {
                "some": "metadata"
              },
              "name": "text",
              "type": "EUFOROBS"
            },
            "ownerId": "text"
          }
        ],
        "newlyCreated": "true",
        "members": [
          {
            "auth0UserId": "auth0|41ba-aa49-f114ca4c263f",
            "business": {},
            "businessId": "02c36247-1aad-41ba-aa49-f114ca4c263f",
            "firstName": "Paul",
            "lastName": "Smith",
            "locale": "id-ID",
            "createdAt": "2023-07-26T15:03:48Z",
            "updatedAt": "2023-07-28T09:13:37Z",
            "completed": "false",
            "businessInvitations": [
              {
                "id": "123e4567-e89b-12d3-a456-426614174000",
                "sentByUser": {},
                "business": {},
                "email": "user@example.com",
                "status": "PENDING",
                "createdAt": "2020-01-01T00:00:00.000Z",
                "updatedAt": "2020-01-01T00:00:00.000Z",
                "sourceIsInvitee": "true"
              }
            ],
            "userInvitations": [
              {
                "id": "text",
                "email": "some@email.com",
                "sentByUser": {},
                "status": "ACCEPTED",
                "createdAt": "2020-01-01T00:00:00.000Z",
                "updatedAt": "2020-01-01T00:00:00.000Z"
              }
            ],
            "email": "user@example.com",
            "consentedAt": "2023-07-28T09:13:37Z"
          }
        ],
        "connectionsAsSource": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "sourceBusiness": {},
            "targetBusiness": {},
            "createdAt": "2021-01-01T00:00:00.000Z",
            "updatedAt": "2021-01-01T00:00:00.000Z",
            "metadata": {
              "foo": "bar"
            },
            "plotsCount": 1
          }
        ],
        "connectionsAsTarget": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "sourceBusiness": {},
            "targetBusiness": {},
            "createdAt": "2021-01-01T00:00:00.000Z",
            "updatedAt": "2021-01-01T00:00:00.000Z",
            "metadata": {
              "foo": "bar"
            },
            "plotsCount": 1
          }
        ],
        "businessInvitations": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "sentByUser": {
              "auth0UserId": "auth0|41ba-aa49-f114ca4c263f",
              "business": {},
              "businessId": "02c36247-1aad-41ba-aa49-f114ca4c263f",
              "firstName": "Paul",
              "lastName": "Smith",
              "locale": "id-ID",
              "createdAt": "2023-07-26T15:03:48Z",
              "updatedAt": "2023-07-28T09:13:37Z",
              "completed": "false",
              "businessInvitations": [],
              "userInvitations": [
                {
                  "id": "text",
                  "email": "some@email.com",
                  "sentByUser": {},
                  "status": "ACCEPTED",
                  "createdAt": "2020-01-01T00:00:00.000Z",
                  "updatedAt": "2020-01-01T00:00:00.000Z"
                }
              ],
              "email": "user@example.com",
              "consentedAt": "2023-07-28T09:13:37Z"
            },
            "business": {},
            "email": "user@example.com",
            "status": "PENDING",
            "createdAt": "2020-01-01T00:00:00.000Z",
            "updatedAt": "2020-01-01T00:00:00.000Z",
            "sourceIsInvitee": "true"
          }
        ],
        "contactPerson": {
          "auth0UserId": "auth0|41ba-aa49-f114ca4c263f",
          "business": {},
          "businessId": "02c36247-1aad-41ba-aa49-f114ca4c263f",
          "firstName": "Paul",
          "lastName": "Smith",
          "locale": "id-ID",
          "createdAt": "2023-07-26T15:03:48Z",
          "updatedAt": "2023-07-28T09:13:37Z",
          "completed": "false",
          "businessInvitations": [
            {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "sentByUser": {},
              "business": {},
              "email": "user@example.com",
              "status": "PENDING",
              "createdAt": "2020-01-01T00:00:00.000Z",
              "updatedAt": "2020-01-01T00:00:00.000Z",
              "sourceIsInvitee": "true"
            }
          ],
          "userInvitations": [
            {
              "id": "text",
              "email": "some@email.com",
              "sentByUser": {},
              "status": "ACCEPTED",
              "createdAt": "2020-01-01T00:00:00.000Z",
              "updatedAt": "2020-01-01T00:00:00.000Z"
            }
          ],
          "email": "user@example.com",
          "consentedAt": "2023-07-28T09:13:37Z"
        },
        "machineToMachineClientId": "I am a secret client"
      }
    ],
    "geometry": {
      "type": "Polygon",
      "coordinates": [
        [
          [
            100,
            0
          ],
          [
            101,
            0
          ],
          [
            101,
            1
          ],
          [
            100,
            1
          ],
          [
            100,
            0
          ]
        ]
      ]
    },
    "commodities": [
      "oil palm",
      "rubber"
    ],
    "name": "text",
    "surfaceArea": 0,
    "countryCode": "text",
    "mostRecentAnalysis": {
      "id": "02c36247-1aad-41ba-aa49-f114ca4c263f",
      "createdAt": "2023-07-26T15:03:48Z",
      "updatedAt": "2023-07-28T09:13:37Z",
      "status": "started",
      "plotId": "02c36247-1aad-41ba-aa49-f114ca4c263f",
      "analysedAt": "2023-07-28T09:13:37Z",
      "version": "open-source-1.0.0",
      "deforestedArea": 123.45,
      "deforestedGeometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              13,
              52.5
            ],
            [
              13.5,
              52.5
            ],
            [
              13.5,
              52
            ],
            [
              13,
              52
            ],
            [
              13,
              52.5
            ]
          ]
        ]
      },
      "riskOfDeforestation": 0.3,
      "metadata": {
        "some": "metadata"
      },
      "name": "text",
      "type": "EUFOROBS"
    }
  }
]

Create a plot.

Create a plot owned by your business.

POSThttps://api.tradeaware.live-eo.com/plots
Body
commodities*array of Commodity (enum)

What crops (among the relevant commodities) are grown on this field (currently).

name*string

Free text name of the plot. Useful for easily finding and identifying the plot as an enduser.

description*object

Short description to find and identify plots as owners.

geometry*all of

The geometry of the plot with the polygon. Currently supported: Polygon geometry as defined in https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6

countryCode*string

The country code (ISO 31661Alpha2 expected)

isActive*boolean

Is this plot active in the system

filenamestring

Filename of the file where the plot is defined

Response
Body
id*string

id of this entity

Example: "02c36247-1aad-41ba-aa49-f114ca4c263f"
createdAt*string

ISO 8601

Example: "2023‐07‐26T15:03:48Z"
updatedAt*string

ISO 8601

Example: "2023‐07‐28T09:13:37Z"
suppliersarray of GetBusinessDto (object)

The suppliers of the plot with respect to the current business. May be multiple if the plot is reachable in the supply chain via multiple different direct suppliers of the current business.

geometry*one of

The geometry of the plot.

commodities*array of Commodity (enum)

What crops (among the relevant commodities) are grown on this field (currently).

name*string

Free text name of the plot. Useful for easily finding and identifying the plot as an enduser.

surfaceAreanumber

Surface area in square meters

countryCode*string

ISO 3166-1 alpha-2 country code of where the plot is located

mostRecentAnalysisall of

The latest analysis of this plot by createdAt. IMPORTANT: only set when 'mostRecentAnalysis' is provided in 'includes'. If no analysis on this plot is available yet, this property may be missing even when provided in 'includes'.

filenamenullable object

Filename of the plot. Useful to know where is the Plot coming from on batch create.

descriptionnullable object

Free text descrption of the plot. Useful for to keep human friendly Plot names.

ownerIdstring

The id of the owning business. May be undefined for supplier masking.

Request
const response = await fetch('https://api.tradeaware.live-eo.com/plots', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "commodities": [
        "oil palm",
        "rubber"
      ],
      "name": "text",
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              100,
              0
            ],
            [
              101,
              0
            ],
            [
              101,
              1
            ],
            [
              100,
              1
            ],
            [
              100,
              0
            ]
          ]
        ]
      },
      "countryCode": "text",
      "isActive": true
    }),
});
const data = await response.json();
Response
{
  "id": "02c36247-1aad-41ba-aa49-f114ca4c263f",
  "createdAt": "2023‐07‐26T15:03:48Z",
  "updatedAt": "2023‐07‐28T09:13:37Z",
  "suppliers": [
    {
      "id": "02c36247-1aad-41ba-aa49-f114ca4c263f",
      "email": "user@example.com",
      "name": "Example Inc.",
      "username": "John Doe",
      "addressStreet": "Salawati 143",
      "addressZip": "98451",
      "addressPostcode": "12345",
      "addressArea": "Brandenburg",
      "addressCity": "West Papua",
      "addressCountryCode": "ID",
      "addressCountry": "Indonesia",
      "addressLine1": "Salawati 123",
      "addressLine2": "3rd floor",
      "createdAt": "2023-07-26T15:03:48Z",
      "updatedAt": "2023-07-28T09:13:37Z",
      "initialLocale": "id-ID",
      "units": "metric",
      "plots": [],
      "newlyCreated": "true",
      "members": [
        {
          "auth0UserId": "auth0|41ba-aa49-f114ca4c263f",
          "business": {},
          "businessId": "02c36247-1aad-41ba-aa49-f114ca4c263f",
          "firstName": "Paul",
          "lastName": "Smith",
          "locale": "id-ID",
          "createdAt": "2023-07-26T15:03:48Z",
          "updatedAt": "2023-07-28T09:13:37Z",
          "completed": "false",
          "businessInvitations": [
            {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "sentByUser": {},
              "business": {},
              "email": "user@example.com",
              "status": "PENDING",
              "createdAt": "2020-01-01T00:00:00.000Z",
              "updatedAt": "2020-01-01T00:00:00.000Z",
              "sourceIsInvitee": "true"
            }
          ],
          "userInvitations": [
            {
              "id": "text",
              "email": "some@email.com",
              "sentByUser": {},
              "status": "ACCEPTED",
              "createdAt": "2020-01-01T00:00:00.000Z",
              "updatedAt": "2020-01-01T00:00:00.000Z"
            }
          ],
          "email": "user@example.com",
          "consentedAt": "2023-07-28T09:13:37Z"
        }
      ],
      "connectionsAsSource": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "sourceBusiness": {},
          "targetBusiness": {},
          "createdAt": "2021-01-01T00:00:00.000Z",
          "updatedAt": "2021-01-01T00:00:00.000Z",
          "metadata": {
            "foo": "bar"
          },
          "plotsCount": 1
        }
      ],
      "connectionsAsTarget": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "sourceBusiness": {},
          "targetBusiness": {},
          "createdAt": "2021-01-01T00:00:00.000Z",
          "updatedAt": "2021-01-01T00:00:00.000Z",
          "metadata": {
            "foo": "bar"
          },
          "plotsCount": 1
        }
      ],
      "businessInvitations": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "sentByUser": {
            "auth0UserId": "auth0|41ba-aa49-f114ca4c263f",
            "business": {},
            "businessId": "02c36247-1aad-41ba-aa49-f114ca4c263f",
            "firstName": "Paul",
            "lastName": "Smith",
            "locale": "id-ID",
            "createdAt": "2023-07-26T15:03:48Z",
            "updatedAt": "2023-07-28T09:13:37Z",
            "completed": "false",
            "businessInvitations": [],
            "userInvitations": [
              {
                "id": "text",
                "email": "some@email.com",
                "sentByUser": {},
                "status": "ACCEPTED",
                "createdAt": "2020-01-01T00:00:00.000Z",
                "updatedAt": "2020-01-01T00:00:00.000Z"
              }
            ],
            "email": "user@example.com",
            "consentedAt": "2023-07-28T09:13:37Z"
          },
          "business": {},
          "email": "user@example.com",
          "status": "PENDING",
          "createdAt": "2020-01-01T00:00:00.000Z",
          "updatedAt": "2020-01-01T00:00:00.000Z",
          "sourceIsInvitee": "true"
        }
      ],
      "contactPerson": {
        "auth0UserId": "auth0|41ba-aa49-f114ca4c263f",
        "business": {},
        "businessId": "02c36247-1aad-41ba-aa49-f114ca4c263f",
        "firstName": "Paul",
        "lastName": "Smith",
        "locale": "id-ID",
        "createdAt": "2023-07-26T15:03:48Z",
        "updatedAt": "2023-07-28T09:13:37Z",
        "completed": "false",
        "businessInvitations": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "sentByUser": {},
            "business": {},
            "email": "user@example.com",
            "status": "PENDING",
            "createdAt": "2020-01-01T00:00:00.000Z",
            "updatedAt": "2020-01-01T00:00:00.000Z",
            "sourceIsInvitee": "true"
          }
        ],
        "userInvitations": [
          {
            "id": "text",
            "email": "some@email.com",
            "sentByUser": {},
            "status": "ACCEPTED",
            "createdAt": "2020-01-01T00:00:00.000Z",
            "updatedAt": "2020-01-01T00:00:00.000Z"
          }
        ],
        "email": "user@example.com",
        "consentedAt": "2023-07-28T09:13:37Z"
      },
      "machineToMachineClientId": "I am a secret client"
    }
  ],
  "geometry": {
    "type": "Polygon",
    "coordinates": [
      [
        [
          100,
          0
        ],
        [
          101,
          0
        ],
        [
          101,
          1
        ],
        [
          100,
          1
        ],
        [
          100,
          0
        ]
      ]
    ]
  },
  "commodities": [
    "oil palm",
    "rubber"
  ],
  "name": "text",
  "surfaceArea": 0,
  "countryCode": "text",
  "mostRecentAnalysis": {
    "id": "02c36247-1aad-41ba-aa49-f114ca4c263f",
    "createdAt": "2023-07-26T15:03:48Z",
    "updatedAt": "2023-07-28T09:13:37Z",
    "status": "started",
    "plotId": "02c36247-1aad-41ba-aa49-f114ca4c263f",
    "analysedAt": "2023-07-28T09:13:37Z",
    "version": "open-source-1.0.0",
    "deforestedArea": 123.45,
    "deforestedGeometry": {
      "type": "Polygon",
      "coordinates": [
        [
          [
            13,
            52.5
          ],
          [
            13.5,
            52.5
          ],
          [
            13.5,
            52
          ],
          [
            13,
            52
          ],
          [
            13,
            52.5
          ]
        ]
      ]
    },
    "riskOfDeforestation": 0.3,
    "metadata": {
      "some": "metadata"
    },
    "name": "text",
    "type": "EUFOROBS"
  },
  "ownerId": "text"
}

Retrieve a plot.

Retrieve the specified plot.

GEThttps://api.tradeaware.live-eo.com/plots/{id}
Path parameters
id*string
Query parameters
Response
Body
one of
Request
const response = await fetch('https://api.tradeaware.live-eo.com/plots/{id}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "id": "02c36247-1aad-41ba-aa49-f114ca4c263f",
  "createdAt": "2023‐07‐26T15:03:48Z",
  "updatedAt": "2023‐07‐28T09:13:37Z",
  "suppliers": [
    {
      "id": "02c36247-1aad-41ba-aa49-f114ca4c263f",
      "email": "user@example.com",
      "name": "Example Inc.",
      "username": "John Doe",
      "addressStreet": "Salawati 143",
      "addressZip": "98451",
      "addressPostcode": "12345",
      "addressArea": "Brandenburg",
      "addressCity": "West Papua",
      "addressCountryCode": "ID",
      "addressCountry": "Indonesia",
      "addressLine1": "Salawati 123",
      "addressLine2": "3rd floor",
      "createdAt": "2023-07-26T15:03:48Z",
      "updatedAt": "2023-07-28T09:13:37Z",
      "initialLocale": "id-ID",
      "units": "metric",
      "plots": [
        {
          "id": "02c36247-1aad-41ba-aa49-f114ca4c263f",
          "createdAt": "2023‐07‐26T15:03:48Z",
          "updatedAt": "2023‐07‐28T09:13:37Z",
          "suppliers": [],
          "geometry": {
            "type": "Polygon",
            "coordinates": [
              [
                [
                  100,
                  0
                ],
                [
                  101,
                  0
                ],
                [
                  101,
                  1
                ],
                [
                  100,
                  1
                ],
                [
                  100,
                  0
                ]
              ]
            ]
          },
          "commodities": [
            "oil palm",
            "rubber"
          ],
          "name": "text",
          "surfaceArea": 0,
          "countryCode": "text",
          "mostRecentAnalysis": {
            "id": "02c36247-1aad-41ba-aa49-f114ca4c263f",
            "createdAt": "2023-07-26T15:03:48Z",
            "updatedAt": "2023-07-28T09:13:37Z",
            "status": "started",
            "plotId": "02c36247-1aad-41ba-aa49-f114ca4c263f",
            "analysedAt": "2023-07-28T09:13:37Z",
            "version": "open-source-1.0.0",
            "deforestedArea": 123.45,
            "deforestedGeometry": {
              "type": "Polygon",
              "coordinates": [
                [
                  [
                    13,
                    52.5
                  ],
                  [
                    13.5,
                    52.5
                  ],
                  [
                    13.5,
                    52
                  ],
                  [
                    13,
                    52
                  ],
                  [
                    13,
                    52.5
                  ]
                ]
              ]
            },
            "riskOfDeforestation": 0.3,
            "metadata": {
              "some": "metadata"
            },
            "name": "text",
            "type": "EUFOROBS"
          },
          "ownerId": "text"
        }
      ],
      "newlyCreated": "true",
      "members": [
        {
          "auth0UserId": "auth0|41ba-aa49-f114ca4c263f",
          "business": {},
          "businessId": "02c36247-1aad-41ba-aa49-f114ca4c263f",
          "firstName": "Paul",
          "lastName": "Smith",
          "locale": "id-ID",
          "createdAt": "2023-07-26T15:03:48Z",
          "updatedAt": "2023-07-28T09:13:37Z",
          "completed": "false",
          "businessInvitations": [
            {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "sentByUser": {},
              "business": {},
              "email": "user@example.com",
              "status": "PENDING",
              "createdAt": "2020-01-01T00:00:00.000Z",
              "updatedAt": "2020-01-01T00:00:00.000Z",
              "sourceIsInvitee": "true"
            }
          ],
          "userInvitations": [
            {
              "id": "text",
              "email": "some@email.com",
              "sentByUser": {},
              "status": "ACCEPTED",
              "createdAt": "2020-01-01T00:00:00.000Z",
              "updatedAt": "2020-01-01T00:00:00.000Z"
            }
          ],
          "email": "user@example.com",
          "consentedAt": "2023-07-28T09:13:37Z"
        }
      ],
      "connectionsAsSource": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "sourceBusiness": {},
          "targetBusiness": {},
          "createdAt": "2021-01-01T00:00:00.000Z",
          "updatedAt": "2021-01-01T00:00:00.000Z",
          "metadata": {
            "foo": "bar"
          },
          "plotsCount": 1
        }
      ],
      "connectionsAsTarget": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "sourceBusiness": {},
          "targetBusiness": {},
          "createdAt": "2021-01-01T00:00:00.000Z",
          "updatedAt": "2021-01-01T00:00:00.000Z",
          "metadata": {
            "foo": "bar"
          },
          "plotsCount": 1
        }
      ],
      "businessInvitations": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "sentByUser": {
            "auth0UserId": "auth0|41ba-aa49-f114ca4c263f",
            "business": {},
            "businessId": "02c36247-1aad-41ba-aa49-f114ca4c263f",
            "firstName": "Paul",
            "lastName": "Smith",
            "locale": "id-ID",
            "createdAt": "2023-07-26T15:03:48Z",
            "updatedAt": "2023-07-28T09:13:37Z",
            "completed": "false",
            "businessInvitations": [],
            "userInvitations": [
              {
                "id": "text",
                "email": "some@email.com",
                "sentByUser": {},
                "status": "ACCEPTED",
                "createdAt": "2020-01-01T00:00:00.000Z",
                "updatedAt": "2020-01-01T00:00:00.000Z"
              }
            ],
            "email": "user@example.com",
            "consentedAt": "2023-07-28T09:13:37Z"
          },
          "business": {},
          "email": "user@example.com",
          "status": "PENDING",
          "createdAt": "2020-01-01T00:00:00.000Z",
          "updatedAt": "2020-01-01T00:00:00.000Z",
          "sourceIsInvitee": "true"
        }
      ],
      "contactPerson": {
        "auth0UserId": "auth0|41ba-aa49-f114ca4c263f",
        "business": {},
        "businessId": "02c36247-1aad-41ba-aa49-f114ca4c263f",
        "firstName": "Paul",
        "lastName": "Smith",
        "locale": "id-ID",
        "createdAt": "2023-07-26T15:03:48Z",
        "updatedAt": "2023-07-28T09:13:37Z",
        "completed": "false",
        "businessInvitations": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "sentByUser": {},
            "business": {},
            "email": "user@example.com",
            "status": "PENDING",
            "createdAt": "2020-01-01T00:00:00.000Z",
            "updatedAt": "2020-01-01T00:00:00.000Z",
            "sourceIsInvitee": "true"
          }
        ],
        "userInvitations": [
          {
            "id": "text",
            "email": "some@email.com",
            "sentByUser": {},
            "status": "ACCEPTED",
            "createdAt": "2020-01-01T00:00:00.000Z",
            "updatedAt": "2020-01-01T00:00:00.000Z"
          }
        ],
        "email": "user@example.com",
        "consentedAt": "2023-07-28T09:13:37Z"
      },
      "machineToMachineClientId": "I am a secret client"
    }
  ],
  "geometry": {
    "type": "Polygon",
    "coordinates": [
      [
        [
          100,
          0
        ],
        [
          101,
          0
        ],
        [
          101,
          1
        ],
        [
          100,
          1
        ],
        [
          100,
          0
        ]
      ]
    ]
  },
  "commodities": [
    "oil palm",
    "rubber"
  ],
  "name": "text",
  "surfaceArea": 0,
  "countryCode": "text",
  "mostRecentAnalysis": {
    "id": "02c36247-1aad-41ba-aa49-f114ca4c263f",
    "createdAt": "2023-07-26T15:03:48Z",
    "updatedAt": "2023-07-28T09:13:37Z",
    "status": "started",
    "plotId": "02c36247-1aad-41ba-aa49-f114ca4c263f",
    "analysedAt": "2023-07-28T09:13:37Z",
    "version": "open-source-1.0.0",
    "deforestedArea": 123.45,
    "deforestedGeometry": {
      "type": "Polygon",
      "coordinates": [
        [
          [
            13,
            52.5
          ],
          [
            13.5,
            52.5
          ],
          [
            13.5,
            52
          ],
          [
            13,
            52
          ],
          [
            13,
            52.5
          ]
        ]
      ]
    },
    "riskOfDeforestation": 0.3,
    "metadata": {
      "some": "metadata"
    },
    "name": "text",
    "type": "EUFOROBS"
  }
}

Update a plot.

Update the properties of the specified plot. Handles updates partially, i.e. properties missing in the request body will not be changed.

PATCHhttps://api.tradeaware.live-eo.com/plots/{id}
Path parameters
id*string
Body
commoditiesarray of Commodity (enum)

What crops (among the relevant commodities) are grown on this field (currently).

namestring

Free text name of the plot. Useful for easily finding and identifying the plot as an enduser.

descriptionobject

Short description to find and identify plots as owners.

geometryall of

The geometry of the plot with the polygon. Currently supported: Polygon geometry as defined in https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6

countryCodestring

The country code (ISO 31661Alpha2 expected)

isActiveboolean

Is this plot active in the system

filenamestring

Filename of the file where the plot is defined

Response
Body
id*string

id of this entity

Example: "02c36247-1aad-41ba-aa49-f114ca4c263f"
createdAt*string

ISO 8601

Example: "2023‐07‐26T15:03:48Z"
updatedAt*string

ISO 8601

Example: "2023‐07‐28T09:13:37Z"
suppliersarray of GetBusinessDto (object)

The suppliers of the plot with respect to the current business. May be multiple if the plot is reachable in the supply chain via multiple different direct suppliers of the current business.

geometry*one of

The geometry of the plot.

commodities*array of Commodity (enum)

What crops (among the relevant commodities) are grown on this field (currently).

name*string

Free text name of the plot. Useful for easily finding and identifying the plot as an enduser.

surfaceAreanumber

Surface area in square meters

countryCode*string

ISO 3166-1 alpha-2 country code of where the plot is located

mostRecentAnalysisall of

The latest analysis of this plot by createdAt. IMPORTANT: only set when 'mostRecentAnalysis' is provided in 'includes'. If no analysis on this plot is available yet, this property may be missing even when provided in 'includes'.

filenamenullable object

Filename of the plot. Useful to know where is the Plot coming from on batch create.

descriptionnullable object

Free text descrption of the plot. Useful for to keep human friendly Plot names.

ownerIdstring

The id of the owning business. May be undefined for supplier masking.

Request
const response = await fetch('https://api.tradeaware.live-eo.com/plots/{id}', {
    method: 'PATCH',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "id": "02c36247-1aad-41ba-aa49-f114ca4c263f",
  "createdAt": "2023‐07‐26T15:03:48Z",
  "updatedAt": "2023‐07‐28T09:13:37Z",
  "suppliers": [
    {
      "id": "02c36247-1aad-41ba-aa49-f114ca4c263f",
      "email": "user@example.com",
      "name": "Example Inc.",
      "username": "John Doe",
      "addressStreet": "Salawati 143",
      "addressZip": "98451",
      "addressPostcode": "12345",
      "addressArea": "Brandenburg",
      "addressCity": "West Papua",
      "addressCountryCode": "ID",
      "addressCountry": "Indonesia",
      "addressLine1": "Salawati 123",
      "addressLine2": "3rd floor",
      "createdAt": "2023-07-26T15:03:48Z",
      "updatedAt": "2023-07-28T09:13:37Z",
      "initialLocale": "id-ID",
      "units": "metric",
      "plots": [],
      "newlyCreated": "true",
      "members": [
        {
          "auth0UserId": "auth0|41ba-aa49-f114ca4c263f",
          "business": {},
          "businessId": "02c36247-1aad-41ba-aa49-f114ca4c263f",
          "firstName": "Paul",
          "lastName": "Smith",
          "locale": "id-ID",
          "createdAt": "2023-07-26T15:03:48Z",
          "updatedAt": "2023-07-28T09:13:37Z",
          "completed": "false",
          "businessInvitations": [
            {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "sentByUser": {},
              "business": {},
              "email": "user@example.com",
              "status": "PENDING",
              "createdAt": "2020-01-01T00:00:00.000Z",
              "updatedAt": "2020-01-01T00:00:00.000Z",
              "sourceIsInvitee": "true"
            }
          ],
          "userInvitations": [
            {
              "id": "text",
              "email": "some@email.com",
              "sentByUser": {},
              "status": "ACCEPTED",
              "createdAt": "2020-01-01T00:00:00.000Z",
              "updatedAt": "2020-01-01T00:00:00.000Z"
            }
          ],
          "email": "user@example.com",
          "consentedAt": "2023-07-28T09:13:37Z"
        }
      ],
      "connectionsAsSource": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "sourceBusiness": {},
          "targetBusiness": {},
          "createdAt": "2021-01-01T00:00:00.000Z",
          "updatedAt": "2021-01-01T00:00:00.000Z",
          "metadata": {
            "foo": "bar"
          },
          "plotsCount": 1
        }
      ],
      "connectionsAsTarget": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "sourceBusiness": {},
          "targetBusiness": {},
          "createdAt": "2021-01-01T00:00:00.000Z",
          "updatedAt": "2021-01-01T00:00:00.000Z",
          "metadata": {
            "foo": "bar"
          },
          "plotsCount": 1
        }
      ],
      "businessInvitations": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "sentByUser": {
            "auth0UserId": "auth0|41ba-aa49-f114ca4c263f",
            "business": {},
            "businessId": "02c36247-1aad-41ba-aa49-f114ca4c263f",
            "firstName": "Paul",
            "lastName": "Smith",
            "locale": "id-ID",
            "createdAt": "2023-07-26T15:03:48Z",
            "updatedAt": "2023-07-28T09:13:37Z",
            "completed": "false",
            "businessInvitations": [],
            "userInvitations": [
              {
                "id": "text",
                "email": "some@email.com",
                "sentByUser": {},
                "status": "ACCEPTED",
                "createdAt": "2020-01-01T00:00:00.000Z",
                "updatedAt": "2020-01-01T00:00:00.000Z"
              }
            ],
            "email": "user@example.com",
            "consentedAt": "2023-07-28T09:13:37Z"
          },
          "business": {},
          "email": "user@example.com",
          "status": "PENDING",
          "createdAt": "2020-01-01T00:00:00.000Z",
          "updatedAt": "2020-01-01T00:00:00.000Z",
          "sourceIsInvitee": "true"
        }
      ],
      "contactPerson": {
        "auth0UserId": "auth0|41ba-aa49-f114ca4c263f",
        "business": {},
        "businessId": "02c36247-1aad-41ba-aa49-f114ca4c263f",
        "firstName": "Paul",
        "lastName": "Smith",
        "locale": "id-ID",
        "createdAt": "2023-07-26T15:03:48Z",
        "updatedAt": "2023-07-28T09:13:37Z",
        "completed": "false",
        "businessInvitations": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "sentByUser": {},
            "business": {},
            "email": "user@example.com",
            "status": "PENDING",
            "createdAt": "2020-01-01T00:00:00.000Z",
            "updatedAt": "2020-01-01T00:00:00.000Z",
            "sourceIsInvitee": "true"
          }
        ],
        "userInvitations": [
          {
            "id": "text",
            "email": "some@email.com",
            "sentByUser": {},
            "status": "ACCEPTED",
            "createdAt": "2020-01-01T00:00:00.000Z",
            "updatedAt": "2020-01-01T00:00:00.000Z"
          }
        ],
        "email": "user@example.com",
        "consentedAt": "2023-07-28T09:13:37Z"
      },
      "machineToMachineClientId": "I am a secret client"
    }
  ],
  "geometry": {
    "type": "Polygon",
    "coordinates": [
      [
        [
          100,
          0
        ],
        [
          101,
          0
        ],
        [
          101,
          1
        ],
        [
          100,
          1
        ],
        [
          100,
          0
        ]
      ]
    ]
  },
  "commodities": [
    "oil palm",
    "rubber"
  ],
  "name": "text",
  "surfaceArea": 0,
  "countryCode": "text",
  "mostRecentAnalysis": {
    "id": "02c36247-1aad-41ba-aa49-f114ca4c263f",
    "createdAt": "2023-07-26T15:03:48Z",
    "updatedAt": "2023-07-28T09:13:37Z",
    "status": "started",
    "plotId": "02c36247-1aad-41ba-aa49-f114ca4c263f",
    "analysedAt": "2023-07-28T09:13:37Z",
    "version": "open-source-1.0.0",
    "deforestedArea": 123.45,
    "deforestedGeometry": {
      "type": "Polygon",
      "coordinates": [
        [
          [
            13,
            52.5
          ],
          [
            13.5,
            52.5
          ],
          [
            13.5,
            52
          ],
          [
            13,
            52
          ],
          [
            13,
            52.5
          ]
        ]
      ]
    },
    "riskOfDeforestation": 0.3,
    "metadata": {
      "some": "metadata"
    },
    "name": "text",
    "type": "EUFOROBS"
  },
  "ownerId": "text"
}

Delete a plot.

Deletes the specified plot. Uses soft-deletion instead of regular deletion to ensure auditability. There is currently no way to undo the soft-deletion via the API.

DELETEhttps://api.tradeaware.live-eo.com/plots/{id}
Path parameters
id*string
Response
Request
const response = await fetch('https://api.tradeaware.live-eo.com/plots/{id}', {
    method: 'DELETE',
    headers: {},
});
const data = await response.json();

Last updated