{
  "servicePath": "",
  "discoveryVersion": "v1",
  "documentationLink": "https://developers.google.com/news/subscribe/subscription-linking/overview",
  "description": "readerrevenuesubscriptionlinking.googleapis.com API.",
  "schemas": {
    "Reader": {
      "description": "A reader of a publication.",
      "id": "Reader",
      "properties": {
        "createTime": {
          "format": "google-datetime",
          "type": "string",
          "readOnly": true,
          "description": "Output only. Time the publication reader was created and associated with a Google user."
        },
        "publicationId": {
          "type": "string",
          "readOnly": true,
          "description": "Output only. The SwG publication id that the reader has linked their subscription to."
        },
        "name": {
          "description": "Output only. The resource name of the reader. The last part of ppid in the resource name is the publisher provided id.",
          "readOnly": true,
          "type": "string"
        },
        "originatingPublicationId": {
          "readOnly": true,
          "description": "Output only. The SwG publication id that the reader's subscription linking was originating from.",
          "type": "string"
        },
        "ppid": {
          "type": "string",
          "readOnly": true,
          "description": "Output only. The publisher provided id of the reader."
        }
      },
      "type": "object"
    },
    "Entitlement": {
      "properties": {
        "expireTime": {
          "type": "string",
          "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.",
          "format": "google-datetime"
        },
        "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"
        },
        "subscriptionToken": {
          "type": "string",
          "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."
        },
        "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"
        }
      },
      "description": "A single entitlement for a publication reader",
      "type": "object",
      "id": "Entitlement"
    },
    "DeleteReaderResponse": {
      "description": "Response to deleting a reader of a publication.",
      "type": "object",
      "properties": {},
      "id": "DeleteReaderResponse"
    },
    "ReaderEntitlements": {
      "properties": {
        "entitlements": {
          "type": "array",
          "items": {
            "$ref": "Entitlement"
          },
          "description": "All of the entitlements for a publication reader."
        },
        "name": {
          "type": "string",
          "readOnly": true,
          "description": "Output only. The resource name of the singleton."
        }
      },
      "id": "ReaderEntitlements",
      "description": "A singleton containing all of a reader's entitlements for a publication.",
      "type": "object"
    }
  },
  "revision": "20261116",
  "name": "readerrevenuesubscriptionlinking",
  "mtlsRootUrl": "https://readerrevenuesubscriptionlinking.mtls.googleapis.com/",
  "kind": "discovery#restDescription",
  "canonicalName": "Subscription Linking",
  "title": "Reader Revenue Subscription Linking API",
  "version": "v1",
  "basePath": "",
  "ownerDomain": "google.com",
  "batchPath": "batch",
  "protocol": "rest",
  "version_module": true,
  "parameters": {
    "upload_protocol": {
      "type": "string",
      "location": "query",
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")."
    },
    "callback": {
      "location": "query",
      "type": "string",
      "description": "JSONP"
    },
    "alt": {
      "type": "string",
      "description": "Data format for response.",
      "location": "query",
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ],
      "enum": [
        "json",
        "media",
        "proto"
      ],
      "default": "json"
    },
    "fields": {
      "type": "string",
      "location": "query",
      "description": "Selector specifying which fields to include in a partial response."
    },
    "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.",
      "type": "string",
      "location": "query"
    },
    "prettyPrint": {
      "type": "boolean",
      "location": "query",
      "default": "true",
      "description": "Returns response with indentations and line breaks."
    },
    "access_token": {
      "description": "OAuth access token.",
      "location": "query",
      "type": "string"
    },
    "uploadType": {
      "location": "query",
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "type": "string"
    },
    "quotaUser": {
      "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",
      "type": "string"
    },
    "$.xgafv": {
      "type": "string",
      "location": "query",
      "enum": [
        "1",
        "2"
      ],
      "description": "V1 error format.",
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ]
    },
    "oauth_token": {
      "location": "query",
      "description": "OAuth 2.0 token for the current user.",
      "type": "string"
    }
  },
  "fullyEncodeReservedExpansion": true,
  "resources": {
    "publications": {
      "resources": {
        "readers": {
          "methods": {
            "get": {
              "description": "Gets a reader of a publication. Returns NOT_FOUND if the reader does not exist.",
              "id": "readerrevenuesubscriptionlinking.publications.readers.get",
              "flatPath": "v1/publications/{publicationsId}/readers/{readersId}",
              "parameterOrder": [
                "name"
              ],
              "httpMethod": "GET",
              "path": "v1/{+name}",
              "parameters": {
                "name": {
                  "required": true,
                  "description": "Required. The resource name of the reader. Format: publications/{publication_id}/readers/{ppid}",
                  "pattern": "^publications/[^/]+/readers/[^/]+$",
                  "type": "string",
                  "location": "path"
                }
              },
              "response": {
                "$ref": "Reader"
              }
            },
            "updateEntitlements": {
              "path": "v1/{+name}",
              "id": "readerrevenuesubscriptionlinking.publications.readers.updateEntitlements",
              "response": {
                "$ref": "ReaderEntitlements"
              },
              "request": {
                "$ref": "ReaderEntitlements"
              },
              "httpMethod": "PATCH",
              "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.",
              "parameters": {
                "name": {
                  "type": "string",
                  "location": "path",
                  "pattern": "^publications/[^/]+/readers/[^/]+/entitlements$",
                  "required": true,
                  "description": "Output only. The resource name of the singleton."
                },
                "updateMask": {
                  "location": "query",
                  "description": "Optional. The list of fields to update. Defaults to all fields.",
                  "format": "google-fieldmask",
                  "type": "string"
                }
              },
              "parameterOrder": [
                "name"
              ],
              "flatPath": "v1/publications/{publicationsId}/readers/{readersId}/entitlements"
            },
            "delete": {
              "parameterOrder": [
                "name"
              ],
              "flatPath": "v1/publications/{publicationsId}/readers/{readersId}",
              "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.",
              "parameters": {
                "force": {
                  "description": "If set to true, any entitlements under the reader will also be purged.",
                  "location": "query",
                  "type": "boolean"
                },
                "name": {
                  "type": "string",
                  "pattern": "^publications/[^/]+/readers/[^/]+$",
                  "required": true,
                  "description": "Required. The resource name of the reader. Format: publications/{publication_id}/readers/{ppid}",
                  "location": "path"
                }
              },
              "id": "readerrevenuesubscriptionlinking.publications.readers.delete",
              "response": {
                "$ref": "DeleteReaderResponse"
              },
              "path": "v1/{+name}"
            },
            "getEntitlements": {
              "flatPath": "v1/publications/{publicationsId}/readers/{readersId}/entitlements",
              "parameters": {
                "name": {
                  "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",
                  "required": true
                }
              },
              "path": "v1/{+name}",
              "parameterOrder": [
                "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.",
              "response": {
                "$ref": "ReaderEntitlements"
              },
              "id": "readerrevenuesubscriptionlinking.publications.readers.getEntitlements"
            }
          }
        }
      }
    }
  },
  "id": "readerrevenuesubscriptionlinking:v1",
  "ownerName": "Google",
  "icons": {
    "x16": "http://www.google.com/images/icons/product/search-16.gif",
    "x32": "http://www.google.com/images/icons/product/search-32.gif"
  },
  "rootUrl": "https://readerrevenuesubscriptionlinking.googleapis.com/",
  "baseUrl": "https://readerrevenuesubscriptionlinking.googleapis.com/"
}
