Skip to main content

Get a member's quota

Requirements, permissions, request and response fields, and error handling.

Request and permissions

GET https://openapi.qwenwork.ai/v1/biz/members/{user_id}/quota Authentication: Authorization: Bearer <access_token>; use an access token obtained through user OAuth authorization. Required business Scope: biz.quota.read Authorization method declared in the contract: Organization authorization (organization) The platform must enable the Scope for the application. The user must have the required business permissions, and the target resource must be within their accessible scope. Availability of personal or organization authorization depends on the application's actual console configuration.

Behavior and limitations

Get an organization member's individual quota and posted usage. The application requires biz.quota.read authorization, and the operator requires member read permission. The target member must be within their viewing scope. Only members in active or frozen status are supported. A missing member or unsupported status returns 404 quota_member_not_found. Success returns code, msg, and data. Quotas use integer CreditMinor units; 1 Credit equals 10000 CreditMinor. data=null means no quota record exists yet; data.allowance=null represents a legacy unlimited quota; allowance=0 means an actual zero quota. next_used_reset_at currently returns null.

Path parameters

ParameterTypeRequiredDescription and constraints
user_idstringYesTarget member UUID
Format: "uuid"

Request body

The public contract does not declare a request body. Do not add identity fields or undeclared business fields.

Success response

Preserve each business API's original response structure. Do not add a common code/msg/data wrapper.

HTTP 200

Member quota retrieved successfully. Response type: application/json
{
  "code": 200,
  "data": null,
  "msg": ""
}
FieldTypeRequiredDescription and constraints
codeintegerYesAllowed values: [200]
dataobject | nullYes—
dataobjectYesAny of: branch 1
Additional properties: false
data.allowanceinteger | nullYesAny of: branch 1
Individual quota in CreditMinor. A legacy unlimited quota is null; an actual zero quota is 0.
Format: "int64"
data.next_used_reset_atnullYesAny of: branch 1
Always null in the initial release.
data.usedintegerYesAny of: branch 1
Individual posted usage in CreditMinor.
Format: "int64"
data.user_idstringYesAny of: branch 1
Format: "uuid"
datanullYesAny of: branch 2
—
msgstringYes—

Error responses

HTTPDescription and handling
400The request does not conform to the parameter contract.
401Missing or invalid token. Check the organization-authorized access token.
403Organization authorization, permission, or application source IP validation failed, or the target is outside the organization/team scope. Business error codes are permission_denied, org_forbidden, or team_forbidden.
404The target member does not exist, has a pending invitation, or was removed. Verify the member UUID and status.
422Parameter values failed Biz validation. Check the request path and parameters.
429Rate limit exceeded. Reduce the call rate before retrying.
500Quota processing failed. Retain the request ID and contact support.
502Invalid quota service response. Retain the request ID and contact support.
503The quota service or platform is temporarily unavailable.
504The call timed out.
defaultOther platform or service error. Handle according to error_code and retain the request ID.
Retain the request ID and error fields from the response for troubleshooting. A write operation may have taken effect even after a timeout or disconnection. Do not automatically retry solely because no success response was received.

Complete field contract

The JSON below contains this API's complete request, response, and error schemas, nested constraints, and public extension definitions. Copy it for reference. No success examples are inferred where none are declared.
{
  "components": {
    "securitySchemes": {
      "OpenPlatformBearer": {
        "description": "Organization-authorized application access token; Scope does not replace operator permissions or resource isolation",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "openapi": "3.1.0",
  "paths": {
    "/v1/biz/members/{user_id}/quota": {
      "get": {
        "description": "Get an organization member's individual quota and posted usage. The application requires biz.quota.read authorization, and the operator requires member read permission. The target member must be within their viewing scope.\n\nOnly members in active or frozen status are supported. A missing member or unsupported status returns 404 quota_member_not_found.\n\nSuccess returns code, msg, and data. Quotas use integer CreditMinor units; 1 Credit equals 10000 CreditMinor. data=null means no quota record exists yet; data.allowance=null represents a legacy unlimited quota; allowance=0 means an actual zero quota. next_used_reset_at currently returns null.",
        "operationId": "biz-get-member-quota",
        "parameters": [
          {
            "description": "Target member UUID",
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "code": 200,
                  "data": null,
                  "msg": ""
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "code": {
                      "enum": [
                        200
                      ],
                      "type": "integer"
                    },
                    "data": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "allowance": {
                              "description": "Individual quota in CreditMinor. A legacy unlimited quota is null; an actual zero quota is 0.",
                              "format": "int64",
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "next_used_reset_at": {
                              "description": "Always null in the initial release.",
                              "type": "null"
                            },
                            "used": {
                              "description": "Individual posted usage in CreditMinor.",
                              "format": "int64",
                              "type": "integer"
                            },
                            "user_id": {
                              "format": "uuid",
                              "type": "string"
                            }
                          },
                          "required": [
                            "user_id",
                            "allowance",
                            "used",
                            "next_used_reset_at"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "msg": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "msg",
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Member quota retrieved successfully.",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID generated by the open platform for each HTTP request for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed Trace ID.",
                "schema": {
                  "pattern": "^[0-9a-f]{32}$",
                  "type": "string"
                }
              },
              "X-Trace-ID": {
                "description": "OpenTelemetry TraceID of the current open platform request, correlated with X-Request-ID through request logs. A complete trace may not be available if sampling did not retain it.",
                "schema": {
                  "pattern": "^[0-9a-f]{32}$",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": 400,
                  "data": null,
                  "error_code": "OPENAPI_INVALID_REQUEST",
                  "msg": "请求参数不符合接口要求"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "null"
                    },
                    "error_code": {
                      "type": "string"
                    },
                    "msg": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "trace_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "msg",
                    "data",
                    "error_code"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The request does not conform to the parameter contract.",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID generated by the open platform for each HTTP request for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed Trace ID.",
                "schema": {
                  "pattern": "^[0-9a-f]{32}$",
                  "type": "string"
                }
              },
              "X-Trace-ID": {
                "description": "OpenTelemetry TraceID of the current open platform request, correlated with X-Request-ID through request logs. A complete trace may not be available if sampling did not retain it.",
                "schema": {
                  "pattern": "^[0-9a-f]{32}$",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": 401,
                  "data": null,
                  "error_code": "OPENAPI_UNAUTHENTICATED",
                  "msg": "访问凭证缺失、无效或已失效"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "null"
                    },
                    "error_code": {
                      "type": "string"
                    },
                    "msg": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "trace_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "msg",
                    "data",
                    "error_code"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Missing or invalid token. Check the organization-authorized access token.",
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-ID": {
                "description": "Request ID generated by the open platform for each HTTP request for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed Trace ID.",
                "schema": {
                  "pattern": "^[0-9a-f]{32}$",
                  "type": "string"
                }
              },
              "X-Trace-ID": {
                "description": "OpenTelemetry TraceID of the current open platform request, correlated with X-Request-ID through request logs. A complete trace may not be available if sampling did not retain it.",
                "schema": {
                  "pattern": "^[0-9a-f]{32}$",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": 403,
                  "data": null,
                  "error_code": "permission_denied",
                  "msg": "没有操作权限"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "null"
                    },
                    "error_code": {
                      "type": "string"
                    },
                    "msg": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "trace_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "msg",
                    "data",
                    "error_code"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Organization authorization, permission, or application source IP validation failed, or the target is outside the organization/team scope. Business error codes are permission_denied, org_forbidden, or team_forbidden.",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID generated by the open platform for each HTTP request for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed Trace ID.",
                "schema": {
                  "pattern": "^[0-9a-f]{32}$",
                  "type": "string"
                }
              },
              "X-Trace-ID": {
                "description": "OpenTelemetry TraceID of the current open platform request, correlated with X-Request-ID through request logs. A complete trace may not be available if sampling did not retain it.",
                "schema": {
                  "pattern": "^[0-9a-f]{32}$",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": 404,
                  "data": null,
                  "error_code": "quota_member_not_found",
                  "msg": "成员不存在"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "null"
                    },
                    "error_code": {
                      "type": "string"
                    },
                    "msg": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "trace_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "msg",
                    "data",
                    "error_code"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The target member does not exist, has a pending invitation, or was removed. Verify the member UUID and status.",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID generated by the open platform for each HTTP request for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed Trace ID.",
                "schema": {
                  "pattern": "^[0-9a-f]{32}$",
                  "type": "string"
                }
              },
              "X-Trace-ID": {
                "description": "OpenTelemetry TraceID of the current open platform request, correlated with X-Request-ID through request logs. A complete trace may not be available if sampling did not retain it.",
                "schema": {
                  "pattern": "^[0-9a-f]{32}$",
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "code": 422,
                  "data": null,
                  "error_code": "OPENAPI_INVALID_REQUEST",
                  "msg": "请求参数无效"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "null"
                    },
                    "error_code": {
                      "type": "string"
                    },
                    "msg": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "trace_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "msg",
                    "data",
                    "error_code"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Parameter values failed Biz validation. Check the request path and parameters.",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID generated by the open platform for each HTTP request for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed Trace ID.",
                "schema": {
                  "pattern": "^[0-9a-f]{32}$",
                  "type": "string"
                }
              },
              "X-Trace-ID": {
                "description": "OpenTelemetry TraceID of the current open platform request, correlated with X-Request-ID through request logs. A complete trace may not be available if sampling did not retain it.",
                "schema": {
                  "pattern": "^[0-9a-f]{32}$",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": 429,
                  "data": null,
                  "error_code": "OPENAPI_RATE_LIMITED",
                  "msg": "调用频率超限"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "null"
                    },
                    "error_code": {
                      "type": "string"
                    },
                    "msg": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "trace_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "msg",
                    "data",
                    "error_code"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Rate limit exceeded. Reduce the call rate before retrying.",
            "headers": {
              "Retry-After": {
                "description": "Delay in seconds or HTTP date before retrying.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-ID": {
                "description": "Request ID generated by the open platform for each HTTP request for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed Trace ID.",
                "schema": {
                  "pattern": "^[0-9a-f]{32}$",
                  "type": "string"
                }
              },
              "X-Trace-ID": {
                "description": "OpenTelemetry TraceID of the current open platform request, correlated with X-Request-ID through request logs. A complete trace may not be available if sampling did not retain it.",
                "schema": {
                  "pattern": "^[0-9a-f]{32}$",
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": 500,
                  "data": null,
                  "error_code": "internal_error",
                  "msg": "额度处理失败"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "null"
                    },
                    "error_code": {
                      "type": "string"
                    },
                    "msg": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "trace_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "msg",
                    "data",
                    "error_code"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Quota processing failed. Retain the request ID and contact support.",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID generated by the open platform for each HTTP request for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed Trace ID.",
                "schema": {
                  "pattern": "^[0-9a-f]{32}$",
                  "type": "string"
                }
              },
              "X-Trace-ID": {
                "description": "OpenTelemetry TraceID of the current open platform request, correlated with X-Request-ID through request logs. A complete trace may not be available if sampling did not retain it.",
                "schema": {
                  "pattern": "^[0-9a-f]{32}$",
                  "type": "string"
                }
              }
            }
          },
          "502": {
            "content": {
              "application/json": {
                "example": {
                  "code": 502,
                  "data": null,
                  "error_code": "biz_openapi_unavailable",
                  "msg": "额度服务暂不可用"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "null"
                    },
                    "error_code": {
                      "type": "string"
                    },
                    "msg": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "trace_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "msg",
                    "data",
                    "error_code"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Invalid quota service response. Retain the request ID and contact support.",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID generated by the open platform for each HTTP request for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed Trace ID.",
                "schema": {
                  "pattern": "^[0-9a-f]{32}$",
                  "type": "string"
                }
              },
              "X-Trace-ID": {
                "description": "OpenTelemetry TraceID of the current open platform request, correlated with X-Request-ID through request logs. A complete trace may not be available if sampling did not retain it.",
                "schema": {
                  "pattern": "^[0-9a-f]{32}$",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "example": {
                  "code": 503,
                  "data": null,
                  "error_code": "biz_openapi_unavailable",
                  "msg": "额度服务暂不可用"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "null"
                    },
                    "error_code": {
                      "type": "string"
                    },
                    "msg": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "trace_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "msg",
                    "data",
                    "error_code"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The quota service or platform is temporarily unavailable.",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID generated by the open platform for each HTTP request for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed Trace ID.",
                "schema": {
                  "pattern": "^[0-9a-f]{32}$",
                  "type": "string"
                }
              },
              "X-Trace-ID": {
                "description": "OpenTelemetry TraceID of the current open platform request, correlated with X-Request-ID through request logs. A complete trace may not be available if sampling did not retain it.",
                "schema": {
                  "pattern": "^[0-9a-f]{32}$",
                  "type": "string"
                }
              }
            }
          },
          "504": {
            "content": {
              "application/json": {
                "example": {
                  "code": 504,
                  "data": null,
                  "error_code": "OPENAPI_TIMEOUT",
                  "msg": "请求处理超时"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "null"
                    },
                    "error_code": {
                      "type": "string"
                    },
                    "msg": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "trace_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "msg",
                    "data",
                    "error_code"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The call timed out.",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID generated by the open platform for each HTTP request for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed Trace ID.",
                "schema": {
                  "pattern": "^[0-9a-f]{32}$",
                  "type": "string"
                }
              },
              "X-Trace-ID": {
                "description": "OpenTelemetry TraceID of the current open platform request, correlated with X-Request-ID through request logs. A complete trace may not be available if sampling did not retain it.",
                "schema": {
                  "pattern": "^[0-9a-f]{32}$",
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "null"
                    },
                    "error_code": {
                      "type": "string"
                    },
                    "msg": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    },
                    "trace_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "msg",
                    "data",
                    "error_code"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Other platform or service error. Handle according to error_code and retain the request ID.",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID generated by the open platform for each HTTP request for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed Trace ID.",
                "schema": {
                  "pattern": "^[0-9a-f]{32}$",
                  "type": "string"
                }
              },
              "X-Trace-ID": {
                "description": "OpenTelemetry TraceID of the current open platform request, correlated with X-Request-ID through request logs. A complete trace may not be available if sampling did not retain it.",
                "schema": {
                  "pattern": "^[0-9a-f]{32}$",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "OpenPlatformBearer": []
          }
        ],
        "summary": "Get a member's quota",
        "tags": [
          "额度"
        ]
      }
    }
  },
  "info": {
    "title": "Get a member's quota",
    "version": "2026-11-24"
  },
  "servers": [
    {
      "url": "https://openapi.qwenwork.ai"
    }
  ]
}
Back to the OpenAPI overview.