Tradecloud API v2 manual
  • Introduction
    • Welcome
      • Checklist
      • Support
    • API
      • Rules
      • Requests
      • JSON versus XML
      • Environments
      • Standards
      • Compatibility
      • Tools
        • Swagger UI
        • Postman
        • .NET SDK
      • Webhook versus polling
        • Polling usage
        • Polling echo
      • Delivery schedule
    • Security
      • Security overview
      • Authentication
      • Authorization
      • Encryption
      • Document storage
  • Guide
    • 1. Getting an Account
    • 2. Sending your first order
      • Option A: Sending a Delivery Schedule per order line
      • Option B: Sending a Single Delivery per order line
  • Processes
    • Forecasts
      • Issue a new forecast
      • Issue a new Slimstock forecast
    • Orders
      • Buyer order process
        • Issue a new order
          • Delivery schedule
          • Indicators
          • No delivery expected
          • Propose when accepted
          • Attach a document to an order
          • Choose attach document API
        • Update an existing order
        • Receive an order response
          • Download a document attached to an order response
          • Single delivery order response
        • Receive goods
        • Complete an order
        • Reopen an order
        • Cancel an order
      • Supplier order process
        • Receive an order
          • Download a document attached to an order
          • Single delivery order
        • Send order response
          • Attach a document to an order response
        • Reopen an order
        • Cancel an order
    • Shipments
      • Supplier shipment process
        • Send despatch advice
      • Buyer shipment process
        • Receive a shipment event
          • Download a document attached to a shipment
Powered by GitBook
On this page
  • Method 1. Download the document from the Tradecloud object-storage
  • Step 1. Retrieve the objectId from the document
  • Step. 2. Retrieve the downloadUrl from the object storage
  • Step 3. Download the document using the downloadUrl
  • Method 2. Download the document from the supplier content server
  • Step 1. Retrieve the url from the document
  • Step 2. Download the document using the url
  1. Processes
  2. Orders
  3. Buyer order process
  4. Receive an order response

Download a document attached to an order response

How to download a document from an order or line response

You can download documents using two methods:

  1. If the webhook order or line document contains an objectId: Download the supplier's document from the Tradecloud object-storage using the objectId and downloadUrl

  2. If the webhook order or line document contains an url: Download the document from the supplier's content server.

If both objectId and url are missing in the document, no file is available for download.

Method 1. Download the document from the Tradecloud object-storage

Step 1. Retrieve the objectId from the document

Please check the documents fields in:

"documents": [
  {
    "code": "123456789",
    "revision": "B",
    "name": "Tradecloud API Manual",
    "objectId": "67aa8ece-5d41-496f-a94c-483e360b833b",
    "type": "General",
    "description": "General document"
  }
],

In this example the objectId is:

67aa8ece-5d41-496f-a94c-483e360b833b

Step. 2. Retrieve the downloadUrl from the object storage

Step 3. Download the document using the downloadUrl

Just GET the downloadUrl

This Amazon AWS S3 presigned url will expire within 1 minute.

Method 2. Download the document from the supplier content server

Step 1. Retrieve the url from the document

"documents": [
  {
    "code": "123456789",
    "revision": "B",
    "name": "Tradecloud API Manual",
    "url": "http://supplier.com/content/manual.pdf",
    "type": "General",
    "description": "General document"
  }
],

Please check the documents fields in:

In this example the url is:

http://supplier.com/content/manual.pdf

Step 2. Download the document using the url

Just GET the url

PreviousReceive an order responseNextSingle delivery order response

Last updated 1 year ago

Apply the objectId in the end point to retrieve the downloadUrl from the object storage.

GET document metadata