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
| name | type | required | validation |
|---|---|---|---|
| org_id | org_id | required | tradehq-org-id; 1 to 20 characters The org the file is for. |
| upload_id | text | required | 26 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
upload_not_arrived· 409 · nothing has been uploaded to the link yetupload_size_mismatch· 422 · the uploaded object is not the size create_upload declaredupload_type_mismatch· 422 · the uploaded object is not the content type create_upload declaredfiles_unavailable· 422 · this deployment has no intake or files store configured yetorg_is_a_test_twin· 422 · the org is a test twin; files belong to its live org
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
intake.receivedplanned_webhook