Contract
- shape
- document
- authority
- act
- evidence
- none
- subscription
- false
- permission
- any one of: staff.ops (the staff role staff_ops held in the Internal org, tradehq_role.staff_role); org.admin (carried by the caller's role template in the org `org_id`); a deactivated caller is refused first
- idempotency
- keyed
- emits
- export.requested, export.ready
- MCP tool
- export_org_data
- decision_set
- approve, reject, escalate
- REST
- POST https://api.containertradehq.com/v1/cap/export_org_data
Through MCP this call returns an approval request first; see Approvals.
Idempotency: keyed by the caller's Idempotency-Key, which is required: the same key and inputs replay the first result, the same key with other inputs is 409 idempotency_key_reused
Inputs
| name | type | required | validation |
|---|---|---|---|
| org_id | org_id | required | tradehq-org-id; 1 to 20 characters The org whose data is exported. |
Response
export_id· string · The export: ox and eighteen characters, derived from the Idempotency-Key.org_id· string · The org.status· string · queued when first answered (202); a replay answers where it is now.
Full JSON Schema
{
"type": "object",
"properties": {
"export_id": {
"type": "string",
"description": "The export: ox and eighteen characters, derived from the Idempotency-Key.",
"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.",
"x-data-class": "operational"
},
"status": {
"type": "string",
"enum": [
"queued",
"running",
"ready",
"failed"
],
"description": "queued when first answered (202); a replay answers where it is now.",
"x-data-class": "operational"
}
},
"required": [
"export_id",
"org_id",
"status"
],
"additionalProperties": false
} Refusals
org_export_unavailable· 422 · this deployment has no object store, no link key or no run route for org exports yetorg_export_running· 409 · an export of this org is still queued or running; wait for its linkidempotency_key_reused· 409 · this Idempotency-Key already made an export of another org, or by someone elseretry_key_mismatch· 409 · the Idempotency-Key was already used with different inputsretry_key_in_flight· 409 · a request with this Idempotency-Key is still runningretry_key_lost· 409 · another request took over this Idempotency-Key first; no export was made
The platform refusals apply to every call: version, authentication, authority, validation and rate limits, each in the same envelope.
Surfaces
- Mobile: D1: the result is a file to download and keep, which a phone does not hold
- MCP: approval required
- Voice: D1: the result is a file to download and keep, which a voice surface cannot hand over
- OneBox: no document originates an org export
Events
export.requestedaudit_onlyexport.readyaudit_only
Related
None.