TradeAware
  • Welcome to TradeAware User Guide
    • Getting Started
  • Using the TradeAware Web App
    • Upload and Analyzing Plots
    • Connect with your supply chain
    • Provide and Review Documents
    • Assess risk in your supply chain
    • Manage your transactions
    • Plot Upload and Analysis Trouble Shooting
    • How-to videos
  • Using the TradeAware API
    • API Access and Business Account Registration
    • Webhooks Guide
    • Authentication
      • Rotate client secret
      • Endpoints enabled for programmatic access
    • Upload and Analyzing Plots
    • Connect with your supply chain
    • Assess risk in your supply chain
    • Manage your transactions
    • API reference
      • Auth
      • Plots
        • Analyses of a specific Plot
        • Batch
      • Analyses
      • Attachments
      • Business invitations
      • Business connections
      • Transactions
        • Create a Transaction
        • Retrieve Transactions
          • Get a transaction by id
          • List all transactions
        • Modify an existing Transaction
          • Update a Transaction
          • Add a Transaction Component
          • Update a Transaction Component
          • Delete a Transaction Component
        • Delete a Transaction
        • Submit a Transaction
        • Retrieve DDS Data
      • Risk Assessments
        • Supplier Risk Assessments
          • Create a Supplier Risk Assessment
          • Update a Supplier Risk Assessment
          • Retrieve Supplier Risk Assessments
            • Get a supplier risk assessment by id
            • Get all supplier risk assessments
          • Retrieve the history
        • Plot Risk Assessments
          • Create a Plot Risk Assessment
          • Update a Plot Risk Assessment
          • Retrieve Plot Risk Assessments
            • Get a plot risk assessment by id
            • Get all plot risk assessments
          • Retrieve the history
      • Survey responses
      • Health
      • Version
      • Specification
  • Additional Resources
    • FAQs
    • Contact Support
    • Terms and Conditions
Powered by GitBook
On this page
  1. Using the TradeAware API
  2. API reference

Attachments

PreviousAnalysesNextBusiness invitations

Last updated 28 days ago

  • GETRetrieve an attachment.
  • POSTUpload a file.

Retrieve an attachment.

get

Retrieve an attachment by its ID.

Authorizations
Path parameters
idstring · uuidRequired

Id of the retrieved attachment.

Query parameters
presignbooleanOptional

When set to "true", adds the "fileUrl" field to the response object. "fileUrl" enables you to download the uploaded file associated with this attachment. If the file has not been malware-scanned and identified as clean yet, it will ignore the "presign" query string parameter and not set the "fileUrl" field. Any other value than "true" will be ignored.

Example: true
Responses
200Success
application/json
400Error
401Error
403Error
404Error
501
501 Not Implemented when the feature is not enabled on this environment.
get
GET /attachments/{id} HTTP/1.1
Host: api.tradeaware.live-eo.com
Authorization: Bearer JWT
Accept: */*
{
  "id": "02c36247-1aad-41ba-aa49-f114ca4c263f",
  "updatedAt": "2023-07-28T09:13:37Z",
  "createdAt": "2023-07-28T09:13:37Z",
  "fileUrl": "https://tradeaware.live-eo.com/api/biz-id-74b46f10-4d05-467d-bbfd-e2386772ff9b/atc-id-60bcd197-84d7-45e4-ae5f-827c8e739185.pdf",
  "filename": "testfile.txt"
}

Upload a file.

post

Create an attachment which represents the upload of an individual file.

Allowed file types are: pdf, doc, docx, xls, xlsx, jpeg, jpg, png, tif, tiff, heic, csv, txt, rtf.

Filenames must be less than 200 characters (including the file extension),and must no contain any of the following characters: % { } < > / \ " ` '

Authorizations
Body
filestring · binaryRequired

File data

Responses
201Success
application/json
400Error
401Error
403Error
415Error
501
501 Not Implemented when the feature is not enabled on this environment.
post
POST /attachments HTTP/1.1
Host: api.tradeaware.live-eo.com
Authorization: Bearer JWT
Content-Type: multipart/form-data
Accept: */*
Content-Length: 17

{
  "file": "binary"
}
{
  "id": "02c36247-1aad-41ba-aa49-f114ca4c263f",
  "updatedAt": "2023-07-28T09:13:37Z",
  "createdAt": "2023-07-28T09:13:37Z",
  "fileUrl": "https://tradeaware.live-eo.com/api/biz-id-74b46f10-4d05-467d-bbfd-e2386772ff9b/atc-id-60bcd197-84d7-45e4-ae5f-827c8e739185.pdf",
  "filename": "testfile.txt"
}