v1

latestOpenAPI 3.0.12026-08-0688138402.2 KB
Documents

Document Upload

Prepare a document for direct upload. This endpoint is used to prepare a document for direct upload and subsequent usage in other requests. Refer to the Direct Upload guide for more information.

post/documents/upload

Request body

file_namestring required

the name of the file to be uploaded.

byte_sizeinteger required

Byte size of the file to be uploaded.

checksumstring required

Checksum of the file to be uploaded, calculated as a base64 encoded MD5 hash.

content_type'application/pdf' required

The content type of the file to be uploaded.

Example request

{
  "file_name": "test_file.pdf",
  "byte_size": 15584,
  "checksum": "ptCgPrKd1VRBr2hOeYNRWQ==",
  "content_type": "application/pdf"
}

Response

Successful.

signed_idstring

A signed identifier for the file to be uploaded, which can be used to reference the file in subsequent requests.

Example response

{
  "signed_id": " eyJf(...)",
  "direct_upload": {
    "url": "https://app.shipmondo.com/active_storage/eyJf(...)",
    "headers": {
      "Content-Type": "application/pdf"
    }
  }
}