资源

组织

组织 的每一个端点,附带它强制要求的作用域、它接受的请求体、一份可读的响应,以及它可能返回的拒绝。

列出该凭据可代为操作的组织。

get/organizations
作用域
无需作用域
Idempotency-Key
不接受
返回
200
请求
curl "https://passportcraft.com/api/v1/organizations" \
  -H "Authorization: Bearer $PASSPORTCRAFT_API_KEY"
响应 · 200
{
  "object": "list",
  "data": [
    {
      "object": "connection",
      "organization_id": "8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2",
      "name": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2",
      "scopes": [
        "passports:read",
        "passports:write",
        "units:read",
        "units:write"
      ],
      "granted_at": "2026-07-14T11:02:19.004Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

GET /organizations

说明该凭据可为此组织执行哪些操作。

get/organizations/{organization}/capabilities
作用域
passports:read
Idempotency-Key
不接受
返回
200

路径参数

organizationstring必填

本次请求代为操作的组织。密钥必须已获得该组织的授权。

错误

该端点可能返回的全部拒绝,以及它们所带的 HTTP 状态码。

请求
curl "https://passportcraft.com/api/v1/organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/capabilities" \
  -H "Authorization: Bearer $PASSPORTCRAFT_API_KEY"
响应 · 200
{
  "object": "list",
  "data": [
    {
      "object": "capability",
      "id": "passport_publishing",
      "name": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/capabilities/passport_publishing",
      "organization_id": "8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2",
      "livemode": true,
      "requested": true,
      "allowed": true,
      "verification_status": "valid",
      "problems": [],
      "detail": {
        "plan_id": "pro",
        "subscription_status": "active",
        "publish_limit": 500,
        "published_count": 37,
        "per_passport_check": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/{id}/validate"
      }
    },
    {
      "object": "capability",
      "id": "france_affichage_filing",
      "name": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/capabilities/france_affichage_filing",
      "organization_id": "8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2",
      "livemode": true,
      "requested": true,
      "allowed": false,
      "verification_status": "pending",
      "problems": [
        {
          "code": "delegation_required",
          "message": "The delegation is awaiting verification against the French portal.",
          "type": "pending",
          "remediating_actions": [
            {
              "code": "await_portal_verification",
              "message": "No action is required. Poll this capability until verification completes."
            }
          ]
        }
      ],
      "detail": {
        "delegation_status": "pending",
        "portal_brand_id": null,
        "delegated_at": "2026-07-30T16:20:00.000Z",
        "entitlement": "paid",
        "free_filing_reason": "paid",
        "per_passport_requirements": [
          "gtin_required",
          "attestation_required"
        ],
        "attestation_wording_version": "2026-08-07.1",
        "per_passport_check": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/{id}/affichage",
        "api_filing_supported": true,
        "api_filing_scope": "filings:write"
      }
    },
    {
      "object": "capability",
      "id": "document_upload",
      "name": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/capabilities/document_upload",
      "organization_id": "8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2",
      "livemode": true,
      "requested": true,
      "allowed": true,
      "verification_status": "valid",
      "problems": [],
      "detail": {
        "document_limit": 50,
        "documents_used": 12
      }
    }
  ],
  "has_more": false,
  "next_cursor": null
}

GET /organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/capabilities

组织 — PassportCraft API 参考 | PassportCraft