Add a Transaction Component

Add a component to an existing transaction.

Create a component for a transaction.

Create a new component for the specified transaction.

post

/transactions/{id}/components

Authorizations
Path parameters
idstringrequired
Body
one of
Responses
curl -L \
  --request POST \
  --url 'https://api.tradeaware.live-eo.com/transactions/{id}/components' \
  --header 'Authorization: Bearer JWT' \
  --header 'Content-Type: application/json' \
  --data '{"hsn":"18010000","quantity":123.45,"unit":"KGM","description":"text","namePairs":[{"commonName":"soybean","scientificName":"Glycine max"},{"commonName":"edamame","scientificName":"Glycine max var. viridis"}],"dateOfProduction":"2021-01-01T00:00:00.000Z","endDateOfProduction":"2021-01-01T00:00:00.000Z","supplierBusinessId":"02c36247-1aad-41ba-aa49-f114ca4c263f"}'
{
  "id": "02c36247-1aad-41ba-aa49-f114ca4c263f",
  "hsn": "18010000",
  "commodity": "oil palm",
  "quantity": 123.45,
  "unit": "KGM",
  "description": "text",
  "namePairs": [
    {
      "commonName": "soybean",
      "scientificName": "Glycine max"
    }
  ],
  "transactionId": "02c36247-1aad-41ba-aa49-f114ca4c263f",
  "dateOfProduction": "2021-01-01T00:00:00.000Z",
  "endDateOfProduction": "2021-01-01T00:00:00.000Z",
  "createdAt": "2023-07-26T15:03:48Z",
  "updatedAt": "2023-07-28T09:13:37Z",
  "supplierBusiness": {
    "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": "[Circular Reference]",
        "geometry": {
          "type": "Polygon",
          "coordinates": [
            [
              [
                100,
                0
              ],
              [
                101,
                0
              ],
              [
                101,
                1
              ],
              [
                100,
                1
              ],
              [
                100,
                0
              ]
            ]
          ]
        },
        "commodities": [
          "oil palm",
          "rubber"
        ],
        "name": "text",
        "surfaceArea": 1,
        "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,
          "type": "EUFOROBS",
          "metadata": {
            "some": "metadata"
          },
          "name": "text"
        },
        "mostRecentAnalysesByType": {
          "EUFOROBS": {
            "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,
            "type": "EUFOROBS",
            "metadata": {
              "some": "metadata"
            },
            "name": "text"
          },
          "PRECISION": {
            "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,
            "type": "EUFOROBS",
            "metadata": {
              "some": "metadata"
            },
            "name": "text"
          }
        },
        "filename": {},
        "description": "text",
        "ownerId": "text"
      }
    ],
    "newlyCreated": "true",
    "members": [
      {
        "auth0UserId": "auth0|41ba-aa49-f114ca4c263f",
        "business": "[Circular Reference]",
        "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": "[Circular Reference]",
        "userInvitations": "[Circular Reference]",
        "email": "user@example.com",
        "consentedAt": "2023-07-28T09:13:37Z",
        "entitlements": {
          "canTriggerPrecisionAnalysis": false
        }
      }
    ],
    "connectionsAsSource": [
      {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "sourceBusiness": "[Circular Reference]",
        "targetBusiness": "[Circular Reference]",
        "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": "[Circular Reference]",
        "targetBusiness": "[Circular Reference]",
        "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": "[Circular Reference]",
        "business": "[Circular Reference]",
        "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": "[Circular Reference]",
      "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": "[Circular Reference]",
      "userInvitations": "[Circular Reference]",
      "email": "user@example.com",
      "consentedAt": "2023-07-28T09:13:37Z",
      "entitlements": {
        "canTriggerPrecisionAnalysis": false
      }
    },
    "machineToMachineClientId": "1234567890asdfghjk",
    "eori": "text",
    "vat": "text"
  }
}

Last updated