API Reference / Contracts
Get this workspace's ownership coverage
Returns whether the workspace's record of which Steam accounts hold which items is complete and fresh enough to enforce owned-item limits, as bounded counts with no account identified. A buying contract with a max_owned_per_item limit is paused with holdings unconfirmed while coverage is not complete.
/ contracts. v1. Contracts/ GetOwnershipCoverageRequest body
application/jsonRequired
Request for the caller's workspace's ownership coverage on its own. The workspace comes from the caller's actor, so the request carries no fields.
No fields.
Response body
application/json
Success
coverage?OwnershipCoverageThe aggregate assessment. Absent only when the service runs without an inventory membership source, in which case coverage is unknown rather than empty.
Show attributes
complete?booleanTrue only when every authoritative workspace account has a matching current-lifecycle, complete and fresh context-2 ownership proof.
freshCompleteAccounts?integerRecorded accounts with complete, fresh proofs. This count alone does not certify membership or zero ownership.
Format"int32"
reason?stringOverall proof assessment. Membership mismatch includes unobserved or changed account identities. Pending, failed and stale observations remain distinguishable in recorded_reasons.
Value in"OWNERSHIP_"OWNERSHIP_"OWNERSHIP_"OWNERSHIP_"OWNERSHIP_"OWNERSHIP_"OWNERSHIP_"OWNERSHIP_"OWNERSHIP_"OWNERSHIP_
recordedAccounts?integerNondeleted locally recorded accounts in the workspace. May differ from authoritative membership during bootstrap or lifecycle changes.
Format"int32"
recordedReasons?array<OwnershipCoverageReasonCount>Bounded aggregate counts by recorded proof reason. No account names, Steam IDs, timestamps or membership fingerprint are returned.
Show attributes
accountCount?integerNumber of recorded observations with this reason. These are not certified current-member counts when membership does not match.
Format"int32"
reason?stringBounded reason for these locally recorded account observations.
Value in"OWNERSHIP_"OWNERSHIP_"OWNERSHIP_"OWNERSHIP_"OWNERSHIP_"OWNERSHIP_"OWNERSHIP_"OWNERSHIP_"OWNERSHIP_"OWNERSHIP_
totalAccounts?integerAuthoritative workspace account total. Absent when the native membership read failed. Explicit zero means a verified empty membership, not unknown coverage.
Format"int32"
application/json
The request lacks a valid API key in the Authorization header.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The API key is not allowed to perform this action on this workspace.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The request was rate limited. Slow down and retry later.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
An internal server error occurred.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
curl -X POST "https://api.goldmine.to/contracts.v1.Contracts/GetOwnershipCoverage" \
-H "Authorization: Bearer $CSTRADER_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'const res = await fetch("https://api.goldmine.to/contracts.v1.Contracts/GetOwnershipCoverage", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CSTRADER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({}),
});
const data = await res.json();body := strings.NewReader(`{}`)
req, err := http.NewRequestWithContext(ctx, http.MethodPost, "https://api.goldmine.to/contracts.v1.Contracts/GetOwnershipCoverage", body)
if err != nil {
return err
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CSTRADER_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)import os, requests
res = requests.post(
"https://api.goldmine.to/contracts.v1.Contracts/GetOwnershipCoverage",
headers={"Authorization": f"Bearer {os.environ['CSTRADER_API_KEY']}"},
json={},
)
data = res.json(){
"coverage": {
"complete": false,
"freshCompleteAccounts": 3,
"reason": "OWNERSHIP_COVERAGE_REASON_COMPLETE",
"recordedAccounts": 3,
"recordedReasons": [
{
"accountCount": 3,
"reason": "OWNERSHIP_COVERAGE_REASON_COMPLETE"
}
],
"totalAccounts": 3
}
}{
"code": "unauthenticated",
"message": "The request lacks a valid API key in the Authorization header."
}{
"code": "permission_denied",
"message": "The API key is not allowed to perform this action on this workspace."
}{
"code": "resource_exhausted",
"message": "The request was rate limited. Slow down and retry later."
}{
"code": "internal",
"message": "An internal server error occurred."
}