complete_upload

Finish a file upload

act entity tenant-private since 2026-10-01

Finishes an upload create_upload started, once the bytes have been PUT to its link: checks the object is the declared size and type and hands it to be filed. Calling it again answers the upload as it stands.

Contract

shape
entity
authority
act
evidence
none
subscription
false
permission
any one of: org.member (carried by the caller's role template in the org `org_id`); a deactivated caller is refused first
idempotency
natural
emits
intake.received
MCP tool
none
decision_set
approve, reject
REST
POST https://api.containertradehq.com/v1/cap/complete_upload

Idempotency: keyed by the contract's own inputs: the same inputs replay the first call's result

Inputs

nametyperequiredvalidation
org_idorg_idrequiredtradehq-org-id; 1 to 20 characters
The org the file is for.
upload_idtextrequired26 to 26 characters
The upload_id create_upload answered.

Response

  • upload_id · string · The upload.
  • org_id · string · The org the file is for.
  • state · string · received when it is waiting to be filed, then filed.
  • size · integer · Its size in bytes.
  • content_type · string · Its content type, as declared.
Full JSON Schema
{
  "type": "object",
  "properties": {
    "upload_id": {
      "type": "string",
      "description": "The upload.",
      "x-data-class": "operational"
    },
    "org_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 20,
      "pattern": "^[A-Za-z0-9_-]{1,20}$",
      "format": "tradehq-org-id",
      "description": "The org the file is for.",
      "x-data-class": "operational"
    },
    "state": {
      "type": "string",
      "enum": [
        "received",
        "filed",
        "held",
        "expired"
      ],
      "description": "received when it is waiting to be filed, then filed.",
      "x-data-class": "operational"
    },
    "size": {
      "type": "integer",
      "description": "Its size in bytes.",
      "x-data-class": "operational"
    },
    "content_type": {
      "type": "string",
      "description": "Its content type, as declared.",
      "x-data-class": "operational"
    }
  },
  "required": [
    "upload_id",
    "org_id",
    "state",
    "size",
    "content_type"
  ],
  "additionalProperties": false
}

Refusals

The platform refusals apply to every call: version, authentication, authority, validation and rate limits, each in the same envelope.

Surfaces

DesktopF
MobileF
APIF
MCPN
VoiceN
PushF
OneBoxN
OutboundN
  • MCP: an agent adds a file with add_file, which needs no second step
  • Voice: a voice surface has no file to upload
  • OneBox: a document arrives through the intake's own channels
  • Outbound: crosses to no counterparty

Events

Related

route_held_file