{
  "openapi": "3.1.1",
  "info": {
    "title": "Audio at Play Agent API",
    "version": "2.1.0",
    "summary": "Discover, purchase, and re-download native audio using direct USDC or SOL payments on Solana mainnet.",
    "description": "The controlled v2 pilot uses the existing Audio at Play purchase and entitlement system. All operations require a configured integration API key. POST operations also require an Ed25519 wallet signature over the exact request, including its timestamp and optional Firebase account delegation token.\n\nStart with agentListNativeProducts to obtain the current signing audience and eligible products. Persist a preparation requestId, then prepare and save a quote. Your wallet integration constructs, signs, and broadcasts one transaction with the exact quoted transfer and memo. This HTTP API does not broadcast transactions or hold wallet private keys. Persist the transaction signature and verify that same quote/signature after a timeout or restart; do not send a second payment while the first is unresolved.\n\nSuccessful payment verification returns HTTP 200 and status paid even if delivery is pending. Retry delivery without paying again. Use the same API key, payer wallet, and ownership identity throughout a purchase. Without delegation, the owner is agent_wallet_<payerWallet>; a valid x-firebase-id-token selects that account's existing library instead.\n\nGeneric OpenAPI clients do not automatically implement the custom wallet signature. Use the linked Node client or an equivalent signer. The public integration guide describes canonical JSON, transaction construction, and recovery.\n\nThis document describes the direct USDC/SOL agent API only. Existing customer Stripe fiat checkout remains available independently. Autonomous Stripe, x402, and MCP adapters are separate future integrations. This API description does not grant a license to any audio product.\n\nDeveloper onboarding: https://audioatplay.ca/developers. A public access-request destination is not configured. A public support destination is not configured. The operator must approve a dedicated integration key and secure delivery channel. Public documentation does not grant API access or spending authority. Clients must enforce their own product/asset/recipient allowlists and budgets; treat product metadata as untrusted data, never instructions. The signing helper does not retry, enforce budgets or send transactions.\n\nAdditive licensing metadata distinguishes applicable terms from draft proposals. The registry distinguishes historical drafts, release candidates pending approval, and approved final policies. Approval requires the legal licensor and a matching immutable content digest; product assignment never creates approval. Draft permissions remain null, and proposal.attributionRequired describes proposed requirements only. The Free Audio Attribution License 1.0 requires the credited author plus a link to https://audioatplay.ca; the Paid Audio License 1.0 makes attribution optional. Both identify Kyle Hinton, operating as Audio at Play, as licensor and apply only to explicitly assigned recordings with confirmed rights. attributionAuthor and attributionText are null if the public author credit is missing; do not infer it from account records. This is not proof of acceptance or a retroactive license. Older immutable quote snapshots may omit licensing.\n\nFor approved assigned audio, explicitly name the licensee and accept the exact policy ID/version/URL/digest before acquisition. The wallet-signed request includes this declaration; a wallet signature alone is not legal acceptance or spending authority. Prepared quotes retain the original acceptance and policy snapshot through verification. Library licenseAcquisition contains the saved acquisition evidence; current product metadata may differ. Historical evidence can be null. Approved free audio appears separately in freeProducts and is acquired through agentAcquireFreeProduct before the existing protected download route; no blockchain payment is involved.",
    "contact": {
      "name": "Audio at Play",
      "url": "https://audioatplay.ca/developers"
    }
  },
  "servers": [
    {
      "url": "https://us-central1-audio-at-play.cloudfunctions.net",
      "description": "Production API: Solana mainnet-beta. These endpoints are not storefront routes."
    }
  ],
  "externalDocs": {
    "description": "Integration guide, signing protocol, Node client, and transaction/recovery examples",
    "url": "https://audioatplay.ca/agent-solana-usdc-checkout.md"
  },
  "tags": [
    {
      "name": "Catalog",
      "description": "Discover eligible native paid audio and signing metadata."
    },
    {
      "name": "Purchases",
      "description": "Prepare quotes and verify externally submitted payments."
    },
    {
      "name": "Library",
      "description": "List ownership and request controlled re-downloads."
    }
  ],
  "security": [
    {
      "AgentBearerAuth": []
    },
    {
      "AgentApiKey": []
    }
  ],
  "x-agent-authentication": {
    "protocolVersion": 2,
    "clientUrl": "https://audioatplay.ca/agent-solana-client.cjs",
    "signatureAlgorithm": "Ed25519",
    "signatureEncoding": "Standard base64 of the raw 64-byte signature",
    "messageEncoding": "UTF-8, eight lines joined by LF, with no trailing LF",
    "messageLines": [
      "Audio at Play agent API v2",
      "Catalog auth.audience",
      "Lowercase hexadecimal SHA-256 of the API key",
      "POST",
      "Exact function name, matching the operationId",
      "Exact x-agent-timestamp header string",
      "Lowercase hexadecimal SHA-256 of the canonical JSON request body",
      "Lowercase hexadecimal SHA-256 of the exact Firebase ID token, or of the empty string when absent"
    ],
    "canonicalJson": "Recursively sort object keys lexicographically, preserve array order, and use JSON string/number encoding with no extra whitespace. Sign every body field, including requestId and payerWallet. This is the protocol defined by the linked client, not a promise of support for every JSON canonicalization standard.",
    "maximumClockSkewMs": 300000,
    "maximumJsonBodyBytes": 16384,
    "retry": "Re-sign with a current timestamp and the same persisted operation requestId. Never reuse a signature after changing the body, API key, or account token."
  },
  "paths": {
    "/agentListNativeProducts": {
      "get": {
        "operationId": "agentListNativeProducts",
        "tags": [
          "Catalog"
        ],
        "summary": "List eligible products and discover the signing audience",
        "description": "Requires an integration API key but no wallet signature. Returns native, active, paid, Solana-enabled products with a configured download path and valid USDC pricing. SOL is offered when its configured price is valid. Catalog presence is not a guarantee of current Storage availability; preparation checks delivery before issuing a quote. The response never discloses the server's private RPC URL. Limits are 120 requests per minute per API key, shared with all agent operations. Approved free recordings are returned separately in freeProducts and use endpoints.acquireFree; the paid products array retains its existing contract.",
        "responses": {
          "200": {
            "description": "Current catalog, canonical API endpoints, and v2 signing metadata.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NoStore"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/agentPrepareSolanaPurchase": {
      "post": {
        "operationId": "agentPrepareSolanaPurchase",
        "tags": [
          "Purchases"
        ],
        "summary": "Prepare an idempotent 15-minute USDC or SOL quote",
        "description": "Persist a unique requestId before the first call. Reuse that ID and the same buyer, product, and asset for transport retries to obtain the same quote. Changing the product or asset under that ID returns HTTP 409. An expired unpaid quote returns HTTP 412; first reconcile any submitted payment, then use a new ID only when a new quote is actually needed. Reusing an already-paid preparation can return status paid; do not pay it again.\n\nPreparation checks private file access and URL signing before returning instructions. Save the complete quote, including its owner, amountAtomic, mint, recipient, memo, checkoutSessionId, and expiresAt. Construct the transaction from the returned quote, not from cached catalog prices. The payer must sign the transfer, and its exact memo must be a top-level instruction in that same transaction. Submit before expiry with time for chain processing. This operation creates a quote; it does not transfer funds.\n\nLimits: 20 preparations per minute per key, in addition to the shared 120-request limit.\n\nFor an approved assigned policy, provide licenseAcceptance containing accepted=true, authorityConfirmed=true, licensee and the exact policyId, version, termsUrl and termsDigest from product.licensing. Changing that declaration under the same requestId conflicts; retain and retry the original quote. Verification uses the stored snapshot even when a newer policy is approved.",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentTimestamp"
          },
          {
            "$ref": "#/components/parameters/WalletSignature"
          },
          {
            "$ref": "#/components/parameters/FirebaseIdToken"
          }
        ],
        "requestBody": {
          "required": true,
          "description": "JSON object of at most 16 KiB. Every field is included in the wallet signature.",
          "x-max-body-bytes": 16384,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreparePurchaseRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stored quote. Only status prepared is an unpaid quote; status paid must not trigger another transfer.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NoStore"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/agentVerifySolanaPurchase": {
      "post": {
        "operationId": "agentVerifySolanaPurchase",
        "tags": [
          "Purchases"
        ],
        "summary": "Verify or recover an already-submitted payment",
        "description": "Use the saved checkoutSessionId and transaction signature. Requires a successful finalized transaction, the quoted payer's signature, the exact memo, matching recipient/mint/amount, and an on-chain timestamp within the quote window (with the protocol's 30-second tolerance before quote creation). A transfer made on time can be verified after quote expiry or product edits.\n\nThe quote, purchase, and entitlement are fulfilled atomically. Retrying the same paid quote/signature returns the same purchase and entitlement IDs without another chain lookup. A different signature for an already-paid quote returns HTTP 409. Recovery must use the original API key, payer, and owner identity; a refreshed Firebase token for the same account is supported.\n\nHTTP 200 with fulfillmentStatus pending still means the payment is paid. Do not pay again. Request delivery with agentRequestProductDownload. Verification retries reuse the first live download grant; after that grant expires, verification remains paid/pending and a fresh download requestId is required. An HTTP error or timeout after broadcasting is not permission to submit a new payment. Persist and reconcile the existing quote/signature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentTimestamp"
          },
          {
            "$ref": "#/components/parameters/WalletSignature"
          },
          {
            "$ref": "#/components/parameters/FirebaseIdToken"
          }
        ],
        "requestBody": {
          "required": true,
          "description": "JSON object of at most 16 KiB. The signature field is the blockchain transaction signature, separate from the HTTP wallet-signature header.",
          "x-max-body-bytes": 16384,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyPurchaseRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Payment is paid. Inspect fulfillmentStatus to distinguish ready delivery from pending delivery.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NoStore"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaidResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/agentListLibrary": {
      "post": {
        "operationId": "agentListLibrary",
        "tags": [
          "Library"
        ],
        "summary": "List the authenticated owner's active entitlements",
        "description": "A signed read using the same wallet-owned or delegated account identity as the purchase. Returns at most 50 items ordered by entitlement document ID. Pass nextCursor unchanged to retrieve the next page; null means there are no more pages. Missing product records remain visible with product null and available false. Owned unpublished products remain available when their private file remains configured. available is metadata, not a guarantee that a download URL can currently be signed.",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentTimestamp"
          },
          {
            "$ref": "#/components/parameters/WalletSignature"
          },
          {
            "$ref": "#/components/parameters/FirebaseIdToken"
          }
        ],
        "requestBody": {
          "required": true,
          "description": "JSON object of at most 16 KiB. Omit cursor for the first page.",
          "x-max-body-bytes": 16384,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LibraryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A page of active entitlements for the authenticated owner.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NoStore"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/agentRequestProductDownload": {
      "post": {
        "operationId": "agentRequestProductDownload",
        "tags": [
          "Library"
        ],
        "summary": "Issue or retry an expiring download grant for an owned product",
        "description": "Requires an active entitlement, including when the product is now free. Use the same owner identity as the purchase. No additional purchase is needed. Persist a new requestId before requesting a new grant; reuse it for transport retries. A repeated ID returns the same still-live URL without another quota event. An expired cached grant returns HTTP 412; use a new download requestId, not another payment.\n\nThe limit is three issued grants per owner/product in a rolling 24 hours, shared with website downloads. Issuing a grant consumes quota even if the file is never fetched. Downloading from an existing live URL does not request another grant. Standard URLs last five minutes; files of at least 300 MiB receive two hours. Fetch downloadUrl directly without forwarding agent API credentials to Storage. Delivery uses expiring signed URLs and never falls back to permanent token URLs.",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentTimestamp"
          },
          {
            "$ref": "#/components/parameters/WalletSignature"
          },
          {
            "$ref": "#/components/parameters/FirebaseIdToken"
          }
        ],
        "requestBody": {
          "required": true,
          "description": "JSON object of at most 16 KiB.",
          "x-max-body-bytes": 16384,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DownloadRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Expiring signed URL and the quota snapshot recorded when this grant was issued. A cached retry returns the original snapshot.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NoStore"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadGrant"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/agentAcquireFreeProduct": {
      "post": {
        "operationId": "agentAcquireFreeProduct",
        "tags": [
          "Library"
        ],
        "summary": "Acquire approved free audio for the named licensee",
        "description": "Requires the same API key and Ed25519 signed identity as other mutations, including any Firebase account delegation. Explicitly accept the exact approved policy for the named licensee. Native free audio must have confirmed original-audio rights and complete required public credit. Creates a free purchase and entitlement through the shared fulfillment model; no transfer, payment signature or wallet spending is requested. Retries preserve the original acquisition and do not replace its terms, including after product or policy edits. Then use the existing protected download endpoint and quota. Revoked entitlements cannot be revived.",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentTimestamp"
          },
          {
            "$ref": "#/components/parameters/WalletSignature"
          },
          {
            "$ref": "#/components/parameters/FirebaseIdToken"
          }
        ],
        "requestBody": {
          "required": true,
          "description": "JSON object of at most 16 KiB.",
          "x-max-body-bytes": 16384,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcquireFreeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Free acquisition retained. No payment is required; request a protected download separately.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/NoStore"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcquireFreeResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "AgentBearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Configured integration API key, not a Firebase token or wallet secret. Send Authorization: Bearer <key>. The key's SHA-256 hash is part of every signed POST. Supply either this scheme or AgentApiKey; when both are present, the Bearer key takes precedence."
      },
      "AgentApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "x-agent-api-key",
        "description": "Alternative to Authorization: Bearer. Use the same exact key when computing the request signature. Keep integration keys private; the public OpenAPI file never contains a usable key."
      }
    },
    "parameters": {
      "AgentTimestamp": {
        "name": "x-agent-timestamp",
        "in": "header",
        "required": true,
        "description": "Current Unix time in milliseconds as exactly 13 decimal digits. Must match signing-message line six and be within five minutes of server time. Refresh and re-sign retries.",
        "schema": {
          "type": "string",
          "pattern": "^[0-9]{13}$"
        }
      },
      "WalletSignature": {
        "name": "x-agent-wallet-signature",
        "in": "header",
        "required": true,
        "description": "Standard base64 encoding of the raw 64-byte Ed25519 signature over the protocol's eight-line UTF-8 message. Its public key must be body.payerWallet. This is not the blockchain transaction signature.",
        "schema": {
          "type": "string",
          "pattern": "^[A-Za-z0-9+/]{86}==$"
        }
      },
      "FirebaseIdToken": {
        "name": "x-firebase-id-token",
        "in": "header",
        "required": false,
        "description": "Optional current Firebase ID token for an explicitly authorized existing website account. The server checks revocation and uses the verified UID as owner. Include SHA-256 of this exact token in signing-message line eight. Omit it to use agent_wallet_<payerWallet>. Keep the same ownership identity for prepare, verify, library, and downloads; token refresh for the same account is supported.",
        "schema": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "headers": {
      "NoStore": {
        "description": "Agent API responses must not be cached.",
        "schema": {
          "type": "string",
          "const": "no-store"
        }
      },
      "RetryAfter": {
        "description": "The current API sends 60 for rate-limit and quota errors. A download-quota error may require waiting for the 24-hour quota window; this header is not a promise that a download will be allowed after 60 seconds.",
        "schema": {
          "type": "string",
          "const": "60"
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Invalid JSON body, identifier, cursor, transaction-signature format, payer wallet, or selected asset.",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Unauthenticated": {
        "description": "Missing/unrecognized API key, missing/stale timestamp, invalid request signature, or invalid/revoked account delegation token.",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Quote does not belong to this API key, payer, and owner identity, or the owner has no active entitlement.",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "NotFound": {
        "description": "Requested product, transaction, or file could not be found. After submitting funds, reconcile the saved quote/signature rather than sending a new payment.",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "MethodNotAllowed": {
        "description": "Use the HTTP method declared for this endpoint.",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          },
          "Allow": {
            "description": "The accepted method for this function.",
            "schema": {
              "type": "string",
              "enum": [
                "GET",
                "POST"
              ]
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Conflict": {
        "description": "A preparation requestId or payment reference is already bound to another operation. Reconcile the original quote/payment; do not send funds again.",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "PreconditionFailed": {
        "description": "Product/delivery configuration is unavailable, an unpaid quote or cached download grant expired, a transfer does not meet its quote requirements, or a purchase is no longer active. Follow the error message. An expired download grant needs a new download requestId, not a new purchase.",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Per-key request/preparation limit or the owner's per-product download quota was reached.",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          },
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "InternalError": {
        "description": "Unexpected server error. Retry signed requests with a current timestamp and their persisted identifiers; reconcile submitted payments without paying again.",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Unavailable": {
        "description": "The pilot is disabled or a required service is temporarily unavailable. Preserve quote and transaction identifiers for later recovery.",
        "headers": {
          "Cache-Control": {
            "$ref": "#/components/headers/NoStore"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      }
    },
    "schemas": {
      "DocumentId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200,
        "pattern": "^(?!\\.{1,2}$)[A-Za-z0-9_.-]+$",
        "description": "1-200 ASCII letters, digits, underscores, hyphens, or dots; neither . nor .. is allowed."
      },
      "SolanaPublicKey": {
        "type": "string",
        "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$",
        "description": "Canonical base58 encoding of a 32-byte Solana public key. A payer must also prove ownership with an Ed25519 signature."
      },
      "TransactionSignature": {
        "type": "string",
        "pattern": "^[1-9A-HJ-NP-Za-km-z]{64,88}$",
        "description": "Saved base58 Solana transaction signature returned by the wallet/RPC. Never substitute the HTTP request signature."
      },
      "Cursor": {
        "type": "string",
        "maxLength": 1500,
        "pattern": "^[^/]*$",
        "description": "Opaque entitlement document ID returned as nextCursor. Pass it unchanged. The server additionally limits UTF-8 encoding to 1500 bytes.",
        "x-max-utf8-bytes": 1500
      },
      "SignedRequest": {
        "type": "object",
        "required": [
          "payerWallet",
          "requestId"
        ],
        "properties": {
          "payerWallet": {
            "$ref": "#/components/schemas/SolanaPublicKey"
          },
          "requestId": {
            "$ref": "#/components/schemas/DocumentId",
            "description": "Persist a unique ID before prepare/download and reuse it for retries. A random UUID is suitable. Library and verify also require a requestId, but verification is deduplicated by quote/payment."
          }
        },
        "description": "Common signed JSON body. Additional fields are allowed by the API and must also be covered by the signature."
      },
      "PreparePurchaseRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SignedRequest"
          },
          {
            "type": "object",
            "required": [
              "productId"
            ],
            "properties": {
              "productId": {
                "$ref": "#/components/schemas/DocumentId"
              },
              "assetSymbol": {
                "type": "string",
                "enum": [
                  "USDC",
                  "SOL"
                ],
                "default": "USDC"
              },
              "licenseAcceptance": {
                "$ref": "#/components/schemas/LicenseAcceptance"
              }
            }
          }
        ]
      },
      "VerifyPurchaseRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SignedRequest"
          },
          {
            "type": "object",
            "required": [
              "checkoutSessionId",
              "signature"
            ],
            "properties": {
              "checkoutSessionId": {
                "$ref": "#/components/schemas/DocumentId"
              },
              "signature": {
                "$ref": "#/components/schemas/TransactionSignature"
              }
            }
          }
        ]
      },
      "LibraryRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SignedRequest"
          },
          {
            "type": "object",
            "properties": {
              "cursor": {
                "$ref": "#/components/schemas/Cursor"
              }
            }
          }
        ]
      },
      "DownloadRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SignedRequest"
          },
          {
            "type": "object",
            "required": [
              "productId"
            ],
            "properties": {
              "productId": {
                "$ref": "#/components/schemas/DocumentId"
              }
            }
          }
        ]
      },
      "LicensingProposal": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "version",
          "status",
          "title",
          "reviewUrl",
          "attributionRequired",
          "attributionText",
          "attributionUrl"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "reviewUrl": {
            "type": "string"
          },
          "attributionAuthor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Explicit public author credit from the product; never an internal account ID or private profile. Null when missing. Optional on older snapshots."
          },
          "attributionText": {
            "type": [
              "string",
              "null"
            ],
            "description": "Complete proposed credit including author and website; null if the public author credit is missing."
          },
          "attributionUrl": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "pending-approval"
            ]
          },
          "attributionRequired": {
            "type": "boolean"
          }
        }
      },
      "ProductLicensing": {
        "type": "object",
        "additionalProperties": false,
        "description": "Allowlisted display metadata, not evidence of legal acceptance. Draft/unassigned permissions are unknown; never treat a proposal as an active license. A supplied external terms URL does not establish its rights automatically.",
        "required": [
          "status",
          "id",
          "version",
          "url",
          "attributionRequired",
          "attributionText",
          "attributionUrl",
          "permissions",
          "proposal"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "unassigned",
              "external",
              "needs-review",
              "draft",
              "approved",
              "terms-provided",
              "pending-approval"
            ]
          },
          "id": {
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Applicable public terms only; never the draft review page."
          },
          "attributionRequired": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "attributionAuthor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Explicit public author credit from the product; never an internal account ID or private profile. Null when missing. Optional on older snapshots."
          },
          "attributionText": {
            "type": [
              "string",
              "null"
            ]
          },
          "attributionUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "permissions": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "commercialUse",
              "modification",
              "agentAssistance",
              "standaloneRedistribution",
              "modelTraining"
            ],
            "properties": {
              "commercialUse": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "modification": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "agentAssistance": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "standaloneRedistribution": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "modelTraining": {
                "type": [
                  "boolean",
                  "null"
                ]
              }
            }
          },
          "proposal": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LicensingProposal"
              },
              {
                "type": "null"
              }
            ]
          },
          "licensor": {
            "type": [
              "string",
              "null"
            ]
          },
          "termsDigest": {
            "type": [
              "string",
              "null"
            ]
          },
          "summary": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ProductMetadata": {
        "type": "object",
        "required": [
          "id",
          "slug",
          "title",
          "description",
          "productType",
          "tags",
          "includedFileTypes",
          "licenseUrl"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string",
            "description": "Storefront page is https://audioatplay.ca/product/<slug>."
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "productType": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "includedFileTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Configured format metadata; an empty list means it has not been supplied."
          },
          "licensing": {
            "$ref": "#/components/schemas/ProductLicensing"
          },
          "licenseUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Applicable public terms URL, or null if unconfirmed. A draft review URL is not an applicable license."
          }
        }
      },
      "UsdcAsset": {
        "type": "object",
        "required": [
          "symbol",
          "mint",
          "amount",
          "amountAtomic"
        ],
        "properties": {
          "symbol": {
            "type": "string",
            "const": "USDC"
          },
          "mint": {
            "$ref": "#/components/schemas/SolanaPublicKey"
          },
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Human-readable USDC amount."
          },
          "amountAtomic": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991,
            "description": "Exact quoted transfer in 6-decimal USDC atomic units. Use this integer, not a floating-point recomputation."
          }
        }
      },
      "SolAsset": {
        "type": "object",
        "required": [
          "symbol",
          "mint",
          "amount",
          "amountAtomic"
        ],
        "properties": {
          "symbol": {
            "type": "string",
            "const": "SOL"
          },
          "mint": {
            "type": "null"
          },
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Human-readable SOL amount."
          },
          "amountAtomic": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991,
            "description": "Exact quoted transfer in lamports (1 SOL = 1,000,000,000 lamports)."
          }
        }
      },
      "SolanaAsset": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/UsdcAsset"
          },
          {
            "$ref": "#/components/schemas/SolAsset"
          }
        ]
      },
      "CatalogProduct": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProductMetadata"
          },
          {
            "type": "object",
            "required": [
              "recipientWallet",
              "acceptedAssets",
              "defaultAgentAssetSymbol",
              "defaultAgentAsset"
            ],
            "properties": {
              "recipientWallet": {
                "$ref": "#/components/schemas/SolanaPublicKey"
              },
              "acceptedAssets": {
                "type": "array",
                "minItems": 1,
                "items": {
                  "$ref": "#/components/schemas/SolanaAsset"
                }
              },
              "defaultAgentAssetSymbol": {
                "type": "string",
                "const": "USDC"
              },
              "defaultAgentAsset": {
                "$ref": "#/components/schemas/UsdcAsset"
              }
            }
          }
        ]
      },
      "CatalogResponse": {
        "type": "object",
        "required": [
          "products",
          "paymentRail",
          "defaultAgentAssetSymbol",
          "cluster",
          "rpcUrl",
          "serverTime",
          "auth",
          "endpoints"
        ],
        "properties": {
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CatalogProduct"
            }
          },
          "paymentRail": {
            "type": "string",
            "const": "solana"
          },
          "defaultAgentAssetSymbol": {
            "type": "string",
            "const": "USDC"
          },
          "cluster": {
            "type": "string",
            "description": "Production returns mainnet-beta. Bind the cluster-specific audience returned by auth.",
            "examples": [
              "mainnet-beta"
            ]
          },
          "rpcUrl": {
            "type": "null",
            "description": "Use your own RPC connection for the returned cluster. Private server RPC credentials are never exposed."
          },
          "serverTime": {
            "type": "string",
            "format": "date-time"
          },
          "auth": {
            "type": "object",
            "required": [
              "version",
              "audience",
              "signatureWindowMs"
            ],
            "properties": {
              "version": {
                "type": "integer",
                "const": 2
              },
              "audience": {
                "type": "string",
                "description": "Use the exact returned value when signing. Production: audio-at-play:solana-agent-v2:mainnet-beta."
              },
              "signatureWindowMs": {
                "type": "integer",
                "const": 300000
              }
            }
          },
          "endpoints": {
            "type": "object",
            "required": [
              "prepare",
              "verify",
              "library",
              "download"
            ],
            "properties": {
              "prepare": {
                "type": "string",
                "format": "uri"
              },
              "verify": {
                "type": "string",
                "format": "uri"
              },
              "library": {
                "type": "string",
                "format": "uri"
              },
              "download": {
                "type": "string",
                "format": "uri"
              },
              "acquireFree": {
                "type": "string",
                "format": "uri"
              }
            }
          },
          "freeProducts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductMetadata"
            },
            "description": "Active free original audio with confirmed rights, public credit and an approved assigned policy. These use free acquisition, never a payment quote."
          }
        }
      },
      "QuotePayment": {
        "type": "object",
        "required": [
          "cluster",
          "rpcUrl",
          "payerWallet",
          "recipientWallet",
          "asset",
          "memo",
          "memoProgramId"
        ],
        "properties": {
          "cluster": {
            "type": "string",
            "description": "Must match the intended network; production is mainnet-beta."
          },
          "rpcUrl": {
            "type": "null"
          },
          "payerWallet": {
            "$ref": "#/components/schemas/SolanaPublicKey"
          },
          "recipientWallet": {
            "$ref": "#/components/schemas/SolanaPublicKey"
          },
          "asset": {
            "$ref": "#/components/schemas/SolanaAsset"
          },
          "memo": {
            "type": "string",
            "pattern": "^AudioAtPlay:agent:agent_[a-f0-9]{64}$",
            "description": "Exact single top-level agent memo to include in the transfer transaction. Do not modify, omit, or substitute another quote's memo."
          },
          "memoProgramId": {
            "type": "string",
            "const": "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"
          }
        }
      },
      "QuoteResponse": {
        "type": "object",
        "required": [
          "checkoutSessionId",
          "status",
          "product",
          "entitlementUserId",
          "expiresAt",
          "payment",
          "instructions"
        ],
        "properties": {
          "checkoutSessionId": {
            "$ref": "#/components/schemas/DocumentId"
          },
          "status": {
            "type": "string",
            "enum": [
              "prepared",
              "paid"
            ],
            "description": "Never transfer funds when the reused quote is already paid."
          },
          "product": {
            "$ref": "#/components/schemas/ProductMetadata"
          },
          "entitlementUserId": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "15-minute payment window from quote creation. Paid quotes may be returned after expiry."
          },
          "payment": {
            "$ref": "#/components/schemas/QuotePayment"
          },
          "instructions": {
            "type": "string"
          },
          "licenseAcquisition": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LicenseAcquisition"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "PurchaseIdentifiers": {
        "type": "object",
        "required": [
          "purchaseId",
          "entitlementId"
        ],
        "properties": {
          "purchaseId": {
            "type": "string"
          },
          "entitlementId": {
            "type": "string"
          }
        }
      },
      "VerifiedPayment": {
        "type": "object",
        "required": [
          "signature",
          "payerWallet",
          "recipientWallet",
          "asset"
        ],
        "properties": {
          "signature": {
            "$ref": "#/components/schemas/TransactionSignature"
          },
          "payerWallet": {
            "$ref": "#/components/schemas/SolanaPublicKey"
          },
          "recipientWallet": {
            "$ref": "#/components/schemas/SolanaPublicKey"
          },
          "asset": {
            "$ref": "#/components/schemas/SolanaAsset"
          }
        }
      },
      "PaidBase": {
        "type": "object",
        "required": [
          "status",
          "doNotPayAgain",
          "checkoutSessionId",
          "purchase",
          "entitlementUserId",
          "product",
          "payment",
          "fulfillmentStatus"
        ],
        "properties": {
          "status": {
            "type": "string",
            "const": "paid"
          },
          "doNotPayAgain": {
            "type": "boolean",
            "const": true
          },
          "checkoutSessionId": {
            "$ref": "#/components/schemas/DocumentId"
          },
          "purchase": {
            "$ref": "#/components/schemas/PurchaseIdentifiers"
          },
          "entitlementUserId": {
            "type": "string"
          },
          "product": {
            "$ref": "#/components/schemas/ProductMetadata"
          },
          "payment": {
            "$ref": "#/components/schemas/VerifiedPayment"
          },
          "fulfillmentStatus": {
            "type": "string",
            "enum": [
              "ready",
              "pending"
            ]
          }
        }
      },
      "PaidReady": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaidBase"
          },
          {
            "type": "object",
            "required": [
              "download"
            ],
            "properties": {
              "fulfillmentStatus": {
                "type": "string",
                "const": "ready"
              },
              "download": {
                "$ref": "#/components/schemas/DownloadGrant"
              }
            }
          }
        ]
      },
      "PaidPending": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaidBase"
          },
          {
            "type": "object",
            "required": [
              "downloadError"
            ],
            "properties": {
              "fulfillmentStatus": {
                "type": "string",
                "const": "pending"
              },
              "downloadError": {
                "$ref": "#/components/schemas/ApiError"
              }
            }
          }
        ],
        "description": "Payment is durably paid. Retry delivery with agentRequestProductDownload; never pay again because delivery is pending."
      },
      "PaidResponse": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/PaidReady"
          },
          {
            "$ref": "#/components/schemas/PaidPending"
          }
        ],
        "discriminator": {
          "propertyName": "fulfillmentStatus",
          "mapping": {
            "ready": "#/components/schemas/PaidReady",
            "pending": "#/components/schemas/PaidPending"
          }
        }
      },
      "LibraryItem": {
        "type": "object",
        "required": [
          "entitlementId",
          "productId",
          "product",
          "available"
        ],
        "properties": {
          "entitlementId": {
            "type": "string"
          },
          "productId": {
            "type": "string"
          },
          "product": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProductMetadata"
              },
              {
                "type": "null"
              }
            ]
          },
          "available": {
            "type": "boolean"
          },
          "licenseAcquisition": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LicenseAcquisition"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "LibraryResponse": {
        "type": "object",
        "required": [
          "entitlementUserId",
          "items",
          "nextCursor"
        ],
        "properties": {
          "entitlementUserId": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "maxItems": 50,
            "items": {
              "$ref": "#/components/schemas/LibraryItem"
            }
          },
          "nextCursor": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Cursor"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "DownloadGrant": {
        "type": "object",
        "required": [
          "downloadUrl",
          "downloadUrlExpiresAt",
          "remainingDownloads",
          "downloadCountInWindow",
          "isDownloadLimitBypassed",
          "windowEndsAt"
        ],
        "properties": {
          "downloadUrl": {
            "type": "string",
            "format": "uri",
            "description": "Expiring signed Storage URL. Fetch it without forwarding API keys, Firebase tokens, or wallet-signature headers."
          },
          "downloadUrlExpiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "remainingDownloads": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2
          },
          "downloadCountInWindow": {
            "type": "integer",
            "minimum": 1,
            "maximum": 3
          },
          "isDownloadLimitBypassed": {
            "type": "boolean",
            "const": false
          },
          "windowEndsAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "description": "Quota values are the snapshot when this grant was issued, reused unchanged for an idempotent retry."
      },
      "ApiError": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "Examples: invalid-argument, unauthenticated, permission-denied, not-found, failed-precondition, already-exists, resource-exhausted, unavailable, internal, method-not-allowed."
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ApiError"
          }
        }
      },
      "LicenseAcceptance": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "accepted",
          "authorityConfirmed",
          "policyId",
          "version",
          "termsUrl",
          "termsDigest",
          "licensee"
        ],
        "properties": {
          "accepted": {
            "type": "boolean",
            "const": true
          },
          "authorityConfirmed": {
            "type": "boolean",
            "const": true
          },
          "policyId": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "termsUrl": {
            "type": "string",
            "format": "uri"
          },
          "termsDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "licensee": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "description": "Explicit declaration by the acquiring party, not inferred from API access or wallet authentication. Required for approved assigned policies. Use the exact metadata shown before acquisition."
      },
      "LicenseAcquisition": {
        "type": "object",
        "required": [
          "license",
          "acceptance"
        ],
        "properties": {
          "license": {
            "$ref": "#/components/schemas/ProductLicensing"
          },
          "acceptance": {
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "policyId",
                  "version",
                  "termsUrl",
                  "termsDigest",
                  "licensee",
                  "accepted",
                  "authorityConfirmed",
                  "acceptedAt",
                  "actorType",
                  "actorId"
                ],
                "properties": {
                  "accepted": {
                    "type": "boolean",
                    "const": true
                  },
                  "authorityConfirmed": {
                    "type": "boolean",
                    "const": true
                  },
                  "policyId": {
                    "type": "string"
                  },
                  "version": {
                    "type": "string"
                  },
                  "termsUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "termsDigest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "licensee": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "acceptedAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "actorType": {
                    "type": "string",
                    "enum": [
                      "human",
                      "agent"
                    ]
                  },
                  "actorId": {
                    "type": "string"
                  },
                  "agentPrincipalId": {
                    "type": "string"
                  },
                  "payerWallet": {
                    "$ref": "#/components/schemas/SolanaPublicKey"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "description": "Snapshot retained with the acquisition. Null acceptance is not acceptance. Only exposed to its authenticated owner, not in the public catalog."
      },
      "AcquireFreeRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SignedRequest"
          },
          {
            "type": "object",
            "required": [
              "productId",
              "licenseAcceptance"
            ],
            "properties": {
              "productId": {
                "$ref": "#/components/schemas/DocumentId"
              },
              "licenseAcceptance": {
                "$ref": "#/components/schemas/LicenseAcceptance"
              }
            }
          }
        ]
      },
      "AcquireFreeResponse": {
        "type": "object",
        "required": [
          "status",
          "doNotPayAgain",
          "purchase"
        ],
        "properties": {
          "status": {
            "type": "string",
            "const": "acquired"
          },
          "doNotPayAgain": {
            "type": "boolean",
            "const": true
          },
          "purchase": {
            "type": "object",
            "required": [
              "purchaseId",
              "entitlementId",
              "licenseAcquisition"
            ],
            "properties": {
              "purchaseId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Historical entitlements may lack a recorded source purchase."
              },
              "entitlementId": {
                "type": "string"
              },
              "licenseAcquisition": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/LicenseAcquisition"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        }
      }
    }
  },
  "x-agent-access": {
    "requestUrl": null,
    "supportUrl": null,
    "status": "unconfigured"
  }
}
