{
  "documentationLink": "https://developers.google.com/news/subscribe/subscription-linking/overview",
  "id": "readerrevenuesubscriptionlinking:v1",
  "revision": "20260629",
  "canonicalName": "Subscription Linking",
  "servicePath": "",
  "protocol": "rest",
  "rootUrl": "https://readerrevenuesubscriptionlinking.googleapis.com/",
  "title": "Reader Revenue Subscription Linking API",
  "icons": {
    "x16": "http://www.google.com/images/icons/product/search-16.gif",
    "x32": "http://www.google.com/images/icons/product/search-32.gif"
  },
  "basePath": "",
  "version_module": true,
  "version": "v1",
  "description": "readerrevenuesubscriptionlinking.googleapis.com API.",
  "fullyEncodeReservedExpansion": true,
  "kind": "discovery#restDescription",
  "baseUrl": "https://readerrevenuesubscriptionlinking.googleapis.com/",
  "batchPath": "batch",
  "parameters": {
    "quotaUser": {
      "type": "string",
      "location": "query",
      "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters."
    },
    "alt": {
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ],
      "description": "Data format for response.",
      "default": "json",
      "type": "string",
      "enum": [
        "json",
        "media",
        "proto"
      ],
      "location": "query"
    },
    "oauth_token": {
      "type": "string",
      "location": "query",
      "description": "OAuth 2.0 token for the current user."
    },
    "callback": {
      "type": "string",
      "location": "query",
      "description": "JSONP"
    },
    "prettyPrint": {
      "type": "boolean",
      "location": "query",
      "description": "Returns response with indentations and line breaks.",
      "default": "true"
    },
    "$.xgafv": {
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "type": "string",
      "enum": [
        "1",
        "2"
      ],
      "location": "query",
      "description": "V1 error format."
    },
    "access_token": {
      "description": "OAuth access token.",
      "type": "string",
      "location": "query"
    },
    "uploadType": {
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "type": "string",
      "location": "query"
    },
    "upload_protocol": {
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
      "type": "string",
      "location": "query"
    },
    "key": {
      "type": "string",
      "location": "query",
      "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token."
    },
    "fields": {
      "type": "string",
      "location": "query",
      "description": "Selector specifying which fields to include in a partial response."
    }
  },
  "discoveryVersion": "v1",
  "ownerName": "Google",
  "name": "readerrevenuesubscriptionlinking",
  "mtlsRootUrl": "https://readerrevenuesubscriptionlinking.mtls.googleapis.com/",
  "ownerDomain": "google.com",
  "schemas": {
    "ReaderEntitlements": {
      "id": "ReaderEntitlements",
      "type": "object",
      "properties": {
        "name": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. The resource name of the singleton."
        },
        "entitlements": {
          "items": {
            "$ref": "Entitlement"
          },
          "description": "All of the entitlements for a publication reader.",
          "type": "array"
        }
      },
      "description": "A singleton containing all of a reader's entitlements for a publication."
    },
    "Reader": {
      "id": "Reader",
      "type": "object",
      "properties": {
        "publicationId": {
          "description": "Output only. The SwG publication id that the reader has linked their subscription to.",
          "readOnly": true,
          "type": "string"
        },
        "originatingPublicationId": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. The SwG publication id that the reader's subscription linking was originating from."
        },
        "name": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. The resource name of the reader. The last part of ppid in the resource name is the publisher provided id."
        },
        "ppid": {
          "description": "Output only. The publisher provided id of the reader.",
          "readOnly": true,
          "type": "string"
        },
        "createTime": {
          "description": "Output only. Time the publication reader was created and associated with a Google user.",
          "readOnly": true,
          "type": "string",
          "format": "google-datetime"
        }
      },
      "description": "A reader of a publication."
    },
    "Entitlement": {
      "description": "A single entitlement for a publication reader",
      "id": "Entitlement",
      "type": "object",
      "properties": {
        "productId": {
          "description": "Required. The publication's product ID that the user has access to. This is the same product ID as can be found in Schema.org markup (http://schema.org/productID). E.g. \"dailybugle.com:basic\"",
          "type": "string"
        },
        "detail": {
          "description": "The detail field can carry a description of the SKU that corresponds to what the user has been granted access to. This description, which is opaque to Google, can be displayed in the Google user subscription console for users who linked the subscription to a Google Account. Max 80 character limit.",
          "type": "string"
        },
        "subscriptionToken": {
          "description": "A source-specific subscription token. This is an opaque string that the publisher provides to Google. This token is opaque and has no meaning to Google.",
          "type": "string"
        },
        "expireTime": {
          "type": "string",
          "format": "google-datetime",
          "description": "Required. Expiration time of the entitlement. Entitlements that have expired over 30 days will be purged. The max expire_time is 398 days from now()."
        }
      }
    },
    "DeleteReaderResponse": {
      "id": "DeleteReaderResponse",
      "type": "object",
      "properties": {},
      "description": "Response to deleting a reader of a publication."
    }
  },
  "resources": {
    "publications": {
      "resources": {
        "readers": {
          "methods": {
            "get": {
              "response": {
                "$ref": "Reader"
              },
              "id": "readerrevenuesubscriptionlinking.publications.readers.get",
              "flatPath": "v1/publications/{publicationsId}/readers/{readersId}",
              "parameterOrder": [
                "name"
              ],
              "path": "v1/{+name}",
              "httpMethod": "GET",
              "description": "Gets a reader of a publication. Returns NOT_FOUND if the reader does not exist.",
              "parameters": {
                "name": {
                  "pattern": "^publications/[^/]+/readers/[^/]+$",
                  "required": true,
                  "description": "Required. The resource name of the reader. Format: publications/{publication_id}/readers/{ppid}",
                  "location": "path",
                  "type": "string"
                }
              }
            },
            "getEntitlements": {
              "flatPath": "v1/publications/{publicationsId}/readers/{readersId}/entitlements",
              "parameterOrder": [
                "name"
              ],
              "path": "v1/{+name}",
              "httpMethod": "GET",
              "description": "Gets the reader entitlements for a publication reader. - Returns PERMISSION_DENIED if the caller does not have access. - Returns NOT_FOUND if the reader does not exist.",
              "parameters": {
                "name": {
                  "required": true,
                  "pattern": "^publications/[^/]+/readers/[^/]+/entitlements$",
                  "location": "path",
                  "type": "string",
                  "description": "Required. The name of the reader entitlements to retrieve. Format: publications/{publication_id}/readers/{reader_id}/entitlements"
                }
              },
              "response": {
                "$ref": "ReaderEntitlements"
              },
              "id": "readerrevenuesubscriptionlinking.publications.readers.getEntitlements"
            },
            "delete": {
              "parameters": {
                "name": {
                  "pattern": "^publications/[^/]+/readers/[^/]+$",
                  "required": true,
                  "description": "Required. The resource name of the reader. Format: publications/{publication_id}/readers/{ppid}",
                  "location": "path",
                  "type": "string"
                },
                "force": {
                  "description": "If set to true, any entitlements under the reader will also be purged.",
                  "location": "query",
                  "type": "boolean"
                }
              },
              "path": "v1/{+name}",
              "httpMethod": "DELETE",
              "description": "Removes a publication reader, effectively severing the association with a Google user. If `force` is set to true, any entitlements for this reader will also be deleted. (Otherwise, the request will only work if the reader has no entitlements.) - If the reader does not exist, return NOT_FOUND. - Return FAILED_PRECONDITION if the force field is false (or unset) and entitlements are present.",
              "flatPath": "v1/publications/{publicationsId}/readers/{readersId}",
              "parameterOrder": [
                "name"
              ],
              "id": "readerrevenuesubscriptionlinking.publications.readers.delete",
              "response": {
                "$ref": "DeleteReaderResponse"
              }
            },
            "updateEntitlements": {
              "flatPath": "v1/publications/{publicationsId}/readers/{readersId}/entitlements",
              "parameterOrder": [
                "name"
              ],
              "httpMethod": "PATCH",
              "parameters": {
                "name": {
                  "pattern": "^publications/[^/]+/readers/[^/]+/entitlements$",
                  "required": true,
                  "description": "Output only. The resource name of the singleton.",
                  "location": "path",
                  "type": "string"
                },
                "updateMask": {
                  "location": "query",
                  "type": "string",
                  "format": "google-fieldmask",
                  "description": "Optional. The list of fields to update. Defaults to all fields."
                }
              },
              "request": {
                "$ref": "ReaderEntitlements"
              },
              "response": {
                "$ref": "ReaderEntitlements"
              },
              "id": "readerrevenuesubscriptionlinking.publications.readers.updateEntitlements",
              "path": "v1/{+name}",
              "description": "Updates the reader entitlements for a publication reader. The entire reader entitlements will be overwritten by the new reader entitlements in the payload, like a PUT. - Returns PERMISSION_DENIED if the caller does not have access. - Returns NOT_FOUND if the reader does not exist."
            }
          }
        }
      }
    }
  }
}
