{
  "parameters": {
    "quotaUser": {
      "type": "string",
      "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.",
      "location": "query"
    },
    "prettyPrint": {
      "location": "query",
      "type": "boolean",
      "default": "true",
      "description": "Returns response with indentations and line breaks."
    },
    "uploadType": {
      "location": "query",
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "type": "string"
    },
    "fields": {
      "description": "Selector specifying which fields to include in a partial response.",
      "type": "string",
      "location": "query"
    },
    "upload_protocol": {
      "location": "query",
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
      "type": "string"
    },
    "alt": {
      "default": "json",
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ],
      "location": "query",
      "description": "Data format for response.",
      "type": "string",
      "enum": [
        "json",
        "media",
        "proto"
      ]
    },
    "oauth_token": {
      "location": "query",
      "description": "OAuth 2.0 token for the current user.",
      "type": "string"
    },
    "key": {
      "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.",
      "location": "query",
      "type": "string"
    },
    "callback": {
      "description": "JSONP",
      "type": "string",
      "location": "query"
    },
    "$.xgafv": {
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "description": "V1 error format.",
      "type": "string",
      "enum": [
        "1",
        "2"
      ],
      "location": "query"
    },
    "access_token": {
      "location": "query",
      "type": "string",
      "description": "OAuth access token."
    }
  },
  "baseUrl": "https://readerrevenuesubscriptionlinking.googleapis.com/",
  "id": "readerrevenuesubscriptionlinking:v1",
  "fullyEncodeReservedExpansion": true,
  "basePath": "",
  "discoveryVersion": "v1",
  "batchPath": "batch",
  "icons": {
    "x16": "http://www.google.com/images/icons/product/search-16.gif",
    "x32": "http://www.google.com/images/icons/product/search-32.gif"
  },
  "protocol": "rest",
  "mtlsRootUrl": "https://readerrevenuesubscriptionlinking.mtls.googleapis.com/",
  "resources": {
    "publications": {
      "resources": {
        "readers": {
          "methods": {
            "getEntitlements": {
              "flatPath": "v1/publications/{publicationsId}/readers/{readersId}/entitlements",
              "path": "v1/{+name}",
              "id": "readerrevenuesubscriptionlinking.publications.readers.getEntitlements",
              "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.",
              "httpMethod": "GET",
              "parameterOrder": [
                "name"
              ],
              "response": {
                "$ref": "ReaderEntitlements"
              },
              "parameters": {
                "name": {
                  "required": true,
                  "description": "Required. The name of the reader entitlements to retrieve. Format: publications/{publication_id}/readers/{reader_id}/entitlements",
                  "location": "path",
                  "type": "string",
                  "pattern": "^publications/[^/]+/readers/[^/]+/entitlements$"
                }
              }
            },
            "updateEntitlements": {
              "httpMethod": "PATCH",
              "flatPath": "v1/publications/{publicationsId}/readers/{readersId}/entitlements",
              "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.",
              "parameterOrder": [
                "name"
              ],
              "path": "v1/{+name}",
              "parameters": {
                "updateMask": {
                  "description": "Optional. The list of fields to update. Defaults to all fields.",
                  "location": "query",
                  "type": "string",
                  "format": "google-fieldmask"
                },
                "name": {
                  "pattern": "^publications/[^/]+/readers/[^/]+/entitlements$",
                  "description": "Output only. The resource name of the singleton.",
                  "required": true,
                  "type": "string",
                  "location": "path"
                }
              },
              "response": {
                "$ref": "ReaderEntitlements"
              },
              "request": {
                "$ref": "ReaderEntitlements"
              },
              "id": "readerrevenuesubscriptionlinking.publications.readers.updateEntitlements"
            },
            "get": {
              "flatPath": "v1/publications/{publicationsId}/readers/{readersId}",
              "description": "Gets a reader of a publication. Returns NOT_FOUND if the reader does not exist.",
              "parameters": {
                "name": {
                  "type": "string",
                  "required": true,
                  "pattern": "^publications/[^/]+/readers/[^/]+$",
                  "description": "Required. The resource name of the reader. Format: publications/{publication_id}/readers/{ppid}",
                  "location": "path"
                }
              },
              "id": "readerrevenuesubscriptionlinking.publications.readers.get",
              "httpMethod": "GET",
              "response": {
                "$ref": "Reader"
              },
              "path": "v1/{+name}",
              "parameterOrder": [
                "name"
              ]
            },
            "delete": {
              "response": {
                "$ref": "DeleteReaderResponse"
              },
              "parameterOrder": [
                "name"
              ],
              "id": "readerrevenuesubscriptionlinking.publications.readers.delete",
              "path": "v1/{+name}",
              "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.",
              "parameters": {
                "name": {
                  "location": "path",
                  "pattern": "^publications/[^/]+/readers/[^/]+$",
                  "required": true,
                  "type": "string",
                  "description": "Required. The resource name of the reader. Format: publications/{publication_id}/readers/{ppid}"
                },
                "force": {
                  "description": "If set to true, any entitlements under the reader will also be purged.",
                  "type": "boolean",
                  "location": "query"
                }
              },
              "flatPath": "v1/publications/{publicationsId}/readers/{readersId}",
              "httpMethod": "DELETE"
            }
          }
        },
        "-": {
          "resources": {
            "readers": {
              "resources": {
                "entitlements": {
                  "methods": {
                    "list": {
                      "id": "readerrevenuesubscriptionlinking.publications.-.readers.entitlements.list",
                      "description": "Lists reader entitlements across parent publications via wildcard. - Returns PERMISSION_DENIED if the caller does not have access. - Returns NOT_FOUND if the reader does not exist.",
                      "flatPath": "v1/publications/-/readers/{readersId}/entitlements",
                      "path": "v1/{+parent}/entitlements",
                      "httpMethod": "GET",
                      "parameterOrder": [
                        "parent"
                      ],
                      "response": {
                        "$ref": "ListReaderEntitlementsResponse"
                      },
                      "parameters": {
                        "pageSize": {
                          "type": "integer",
                          "description": "Optional. The maximum number of entitlements to return. The service may return fewer than this value. If unspecified, at most 50 entitlements will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.",
                          "format": "int32",
                          "location": "query"
                        },
                        "parent": {
                          "required": true,
                          "pattern": "^publications/-/readers/[^/]+$",
                          "location": "path",
                          "description": "Required. The parent reader scope. Format: \"publications/-/readers/{reader_id}\"",
                          "type": "string"
                        },
                        "pageToken": {
                          "description": "Optional. A page token, received from a previous `ListReaderEntitlements` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListReaderEntitlements` must match the call that provided the page token.",
                          "type": "string",
                          "location": "query"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "canonicalName": "Subscription Linking",
  "schemas": {
    "ReaderEntitlements": {
      "properties": {
        "entitlements": {
          "items": {
            "$ref": "Entitlement"
          },
          "description": "All of the entitlements for a publication reader.",
          "type": "array"
        },
        "name": {
          "description": "Output only. The resource name of the singleton.",
          "readOnly": true,
          "type": "string"
        }
      },
      "description": "A singleton containing all of a reader's entitlements for a publication.",
      "type": "object",
      "id": "ReaderEntitlements"
    },
    "Entitlement": {
      "type": "object",
      "id": "Entitlement",
      "description": "A single entitlement for a publication reader",
      "properties": {
        "detail": {
          "type": "string",
          "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."
        },
        "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": {
          "format": "google-datetime",
          "description": "Optional. Expiration time of the entitlement. If unset, the entitlement does not expire (indefinite entitlement). We need to support indefinite entitlements for platform publishers. dd: go/rrm-sl-notedotcom Entitlements that have expired over 30 days will be purged.",
          "type": "string"
        },
        "productId": {
          "type": "string",
          "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\""
        }
      }
    },
    "Reader": {
      "id": "Reader",
      "properties": {
        "publicationId": {
          "type": "string",
          "readOnly": true,
          "description": "Output only. The SwG publication id that the reader has linked their subscription to."
        },
        "name": {
          "type": "string",
          "readOnly": true,
          "description": "Output only. The resource name of the reader. The last part of ppid in the resource name is the publisher provided id."
        },
        "ppid": {
          "type": "string",
          "readOnly": true,
          "description": "Output only. The publisher provided id of the reader."
        },
        "originatingPublicationId": {
          "type": "string",
          "readOnly": true,
          "description": "Output only. The SwG publication id that the reader's subscription linking was originating from."
        },
        "createTime": {
          "format": "google-datetime",
          "readOnly": true,
          "description": "Output only. Time the publication reader was created and associated with a Google user.",
          "type": "string"
        }
      },
      "description": "A reader of a publication.",
      "type": "object"
    },
    "DeleteReaderResponse": {
      "description": "Response to deleting a reader of a publication.",
      "type": "object",
      "properties": {},
      "id": "DeleteReaderResponse"
    },
    "ListReaderEntitlementsResponse": {
      "id": "ListReaderEntitlementsResponse",
      "properties": {
        "readerEntitlements": {
          "type": "array",
          "items": {
            "$ref": "ReaderEntitlements"
          },
          "description": "The collection of ReaderEntitlements found across the scoped child publications. Every element's `name` field will contain the canonical sub-publication path, never the wildcard dash."
        },
        "nextPageToken": {
          "description": "A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.",
          "type": "string"
        }
      },
      "description": "Response containing the aggregated collection of matching ReaderEntitlements objects.",
      "type": "object"
    }
  },
  "description": "readerrevenuesubscriptionlinking.googleapis.com API.",
  "documentationLink": "https://developers.google.com/news/subscribe/subscription-linking/overview",
  "version_module": true,
  "rootUrl": "https://readerrevenuesubscriptionlinking.googleapis.com/",
  "name": "readerrevenuesubscriptionlinking",
  "revision": "20260928",
  "version": "v1",
  "ownerDomain": "google.com",
  "kind": "discovery#restDescription",
  "servicePath": "",
  "title": "Reader Revenue Subscription Linking API",
  "ownerName": "Google"
}
