Business invitations

Invite a business to join your commercial network.

Creates a business invitation, which represents an invitation to a business to join your commercial network so that you can get access to their data.

POSThttps://api.tradeaware.live-eo.com/business-invitations
Body
email*string

email of the user representing the business that this invitation is for

Example: "user@example.com"
Response
Body
id*string

id of this entity

Example: "123e4567-e89b-12d3-a456-426614174000"
sentByUser*all of

user that sent this invitation

businessall of

business that this invitation is for

email*string

email of the user that this invitation is for

Example: "user@example.com"
status*BusinessInvitationStatus (enum)
PENDINGACCEPTEDREJECTEDEXPIREDCANCELLED
createdAt*string

date this entity was created

Example: "2020-01-01T00:00:00.000Z"
updatedAt*string

date this entity was last updated

Example: "2020-01-01T00:00:00.000Z"
sourceIsInvitee*boolean

describes if the invited business will share or recieve data

Example: "true"
Request
const response = await fetch('https://api.tradeaware.live-eo.com/business-invitations', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "email": "user@example.com"
    }),
});
const data = await response.json();
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "sentByUser": {
    "auth0UserId": "auth0|41ba-aa49-f114ca4c263f",
    "business": {
      "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": [],
      "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": [],
      "contactPerson": {},
      "machineToMachineClientId": "I am a secret client"
    },
    "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": {
    "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": [],
        "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": [],
    "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": [],
      "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"
  },
  "email": "user@example.com",
  "status": "PENDING",
  "createdAt": "2020-01-01T00:00:00.000Z",
  "updatedAt": "2020-01-01T00:00:00.000Z",
  "sourceIsInvitee": "true"
}

List all the business invitations you received.

List all business invitations you have received from other businesses. Business invitations cancelled by the sender will not be included in the response.

GEThttps://api.tradeaware.live-eo.com/business-invitations
Query parameters
Response
Body
id*string

id of this entity

Example: "123e4567-e89b-12d3-a456-426614174000"
sentByUser*all of

user that sent this invitation

businessall of

business that this invitation is for

email*string

email of the user that this invitation is for

Example: "user@example.com"
status*BusinessInvitationStatus (enum)
PENDINGACCEPTEDREJECTEDEXPIREDCANCELLED
createdAt*string

date this entity was created

Example: "2020-01-01T00:00:00.000Z"
updatedAt*string

date this entity was last updated

Example: "2020-01-01T00:00:00.000Z"
sourceIsInvitee*boolean

describes if the invited business will share or recieve data

Example: "true"
Request
const response = await fetch('https://api.tradeaware.live-eo.com/business-invitations', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "sentByUser": {
      "auth0UserId": "auth0|41ba-aa49-f114ca4c263f",
      "business": {
        "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": [],
        "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": [],
        "contactPerson": {},
        "machineToMachineClientId": "I am a secret client"
      },
      "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": {
      "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": [],
          "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": [],
      "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": [],
        "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"
    },
    "email": "user@example.com",
    "status": "PENDING",
    "createdAt": "2020-01-01T00:00:00.000Z",
    "updatedAt": "2020-01-01T00:00:00.000Z",
    "sourceIsInvitee": "true"
  }
]

List all the business invitations you have sent.

List all business invitations you have sent to other businesses to join your commercial network.

GEThttps://api.tradeaware.live-eo.com/business-invitations/sent
Query parameters
Response
Body
id*string

id of this entity

Example: "123e4567-e89b-12d3-a456-426614174000"
sentByUser*all of

user that sent this invitation

businessall of

business that this invitation is for

email*string

email of the user that this invitation is for

Example: "user@example.com"
status*BusinessInvitationStatus (enum)
PENDINGACCEPTEDREJECTEDEXPIREDCANCELLED
createdAt*string

date this entity was created

Example: "2020-01-01T00:00:00.000Z"
updatedAt*string

date this entity was last updated

Example: "2020-01-01T00:00:00.000Z"
sourceIsInvitee*boolean

describes if the invited business will share or recieve data

Example: "true"
Request
const response = await fetch('https://api.tradeaware.live-eo.com/business-invitations/sent', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "sentByUser": {
      "auth0UserId": "auth0|41ba-aa49-f114ca4c263f",
      "business": {
        "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": [],
        "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": [],
        "contactPerson": {},
        "machineToMachineClientId": "I am a secret client"
      },
      "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": {
      "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": [],
          "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": [],
      "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": [],
        "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"
    },
    "email": "user@example.com",
    "status": "PENDING",
    "createdAt": "2020-01-01T00:00:00.000Z",
    "updatedAt": "2020-01-01T00:00:00.000Z",
    "sourceIsInvitee": "true"
  }
]

Update a business invitation.

Update the properties of the specified business invitation. Handles updates partially, i.e. properties missing in the request body will not be changed. Use this endpoint to update the status of the business invitation, i.e. to ACCEPTED or REJECTED.

If you have sent the invitation, you can also cancel it with this endpoint and the status CANCELLED.

PATCHhttps://api.tradeaware.live-eo.com/business-invitations/{id}
Path parameters
id*string
Body
status*BusinessInvitationStatus (enum)
PENDINGACCEPTEDREJECTEDEXPIREDCANCELLED
Response
Body
id*string

id of this entity

Example: "123e4567-e89b-12d3-a456-426614174000"
sentByUser*all of

user that sent this invitation

businessall of

business that this invitation is for

email*string

email of the user that this invitation is for

Example: "user@example.com"
status*BusinessInvitationStatus (enum)
PENDINGACCEPTEDREJECTEDEXPIREDCANCELLED
createdAt*string

date this entity was created

Example: "2020-01-01T00:00:00.000Z"
updatedAt*string

date this entity was last updated

Example: "2020-01-01T00:00:00.000Z"
sourceIsInvitee*boolean

describes if the invited business will share or recieve data

Example: "true"
Request
const response = await fetch('https://api.tradeaware.live-eo.com/business-invitations/{id}', {
    method: 'PATCH',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "status": "PENDING"
    }),
});
const data = await response.json();
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "sentByUser": {
    "auth0UserId": "auth0|41ba-aa49-f114ca4c263f",
    "business": {
      "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": [],
      "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": [],
      "contactPerson": {},
      "machineToMachineClientId": "I am a secret client"
    },
    "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": {
    "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": [],
        "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": [],
    "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": [],
      "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"
  },
  "email": "user@example.com",
  "status": "PENDING",
  "createdAt": "2020-01-01T00:00:00.000Z",
  "updatedAt": "2020-01-01T00:00:00.000Z",
  "sourceIsInvitee": "true"
}

Last updated