Contract
- shape
- entity
- authority
- act
- evidence
- optional
- 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
- none
- MCP tool
- attach_to_feedback
- decision_set
- approve, reject
- REST
- POST https://api.containertradehq.com/v1/cap/attach_to_feedback
Through MCP this call returns an approval request first; see Approvals.
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 report was sent for. |
| feedback_id | attach_id | required | 8 to 64 characters The report, as send_feedback answered it (feedback_id). |
| file_id | attach_id | required | 8 to 64 characters Your id for the file, the same on every part of it: a file is attached once. |
| name | text | required | 1 to 200 characters The file's name, as support will see it. |
| content_type | one_of | required | one of image/png, image/jpeg, image/webp, image/gif, video/mp4, video/quicktime, video/webm, application/pdf, text/plain, text/csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document What the file is: an image, a video, a PDF, text, CSV, a spreadsheet or a document. |
| size | integer | required | 1 to 52428800 The whole file's size in bytes, at most 50 MiB. |
| sha256 | sha256_hex | required | 64 to 64 characters The whole file's sha256, in hex. |
| part | integer | required | 0 to 49 This part, from 0. |
| parts | integer | required | 1 to 50 How many parts the file travels in: the size in 1 MiB parts, rounded up. |
| content | part_content | required | 4 to 1398104 characters This part's bytes as base64: 1 MiB, the last part the rest. |
Response
state· string · received: this part is in and the file is not whole yet; attached: the file is on the report.reference· string · The report's reference.missing· integer[] · The parts not yet in, from 0: send each of them (again).
Full JSON Schema
{
"type": "object",
"properties": {
"state": {
"type": "string",
"enum": [
"received",
"attached"
],
"description": "received: this part is in and the file is not whole yet; attached: the file is on the report.",
"x-data-class": "operational"
},
"reference": {
"type": "string",
"description": "The report's reference.",
"x-data-class": "operational"
},
"missing": {
"type": "array",
"maxItems": 50,
"items": {
"type": "integer",
"minimum": 0,
"maximum": 49
},
"description": "The parts not yet in, from 0: send each of them (again).",
"x-data-class": "operational"
}
},
"required": [
"state",
"reference",
"missing"
],
"additionalProperties": false
} Refusals
capability_not_enabled· 422 · sending feedback is not switched on for this org yet (send_feedback's release flag)feedback_unavailable· 422 · this deployment has no broker credential for feedback yet; nothing was sentbad_part· 422 · parts is not the file's size in 1 MiB parts, part is past them, or the part is not its sizeno_such_report· 422 · no report of yours carries that idfile_mismatch· 409 · this file id already names a file of another size, digest or typeattachment_busy· 422 · Trade HQ is taking in as much as it can; send the part again shortlyattachment_corrupt· 422 · the parts did not add up to the file's size and sha256; send the whole file againfeedback_not_filed· 422 · the part could not be taken just now; send it again
The platform refusals apply to every call: version, authentication, authority, validation and rate limits, each in the same envelope.
Surfaces
- MCP: approval required
- Voice: a file is chosen or captured, not said
- Push: emits nothing
- OneBox: a report's file is the person's own, not read off a document
- Outbound: goes to Trade HQ's support, never to a counterparty
Events
None emitted.
Related
create_api_key, create_service_account, update_service_account