---
agentTools:
  projectIndex: https://docs.developer.yelp.com/llms.txt
---

# Get Quota

Get quota information for the given subscription type.
This includes the maximum number of subscriptions that can be active this month, the current total number of active subscriptions and the remaining amount that can be created this month.
To get quota information regarding the deletion of subscriptions, please reach out to partner-support@yelp.com

[block:callout]
{
  "type": "info",
  "body": "This endpoint is part of the Business Subscriptions API, visit [Business Subscriptions API](https://docs.developer.yelp.com/docs/business-subscriptions-api) to learn more."
}
[/block]

# OpenAPI definition

````json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Business Subscriptions",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.yelp.com/v3/businesses/"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "To authenticate API calls with the API Key, set the Authorization HTTP header value as `Bearer API_KEY`.\n\nExample: `Bearer 23813239889e947efd3e787cc41b0b839f442a85c5bfd30bd4b9a85ec3a54d5cae4d52b37ff52e64deb9c83bd04883812a6cebde04f2f25752f31be0ac74b514`.\n\nYou can create or find your API Key at [yelp.com](https://www.yelp.com/developers/v3/manage_app).\n"
      }
    }
  },
  "paths": {
    "/subscriptions": {
      "get": {
        "tags": [
          "Business Subscriptions"
        ],
        "summary": "Get Business Subscriptions",
        "description": "Retrieve a paginated list of business subscriptions for a given subscription type.\n\nExample:\nTo fetch the first 100 business subscriptions of type WEBHOOK, sent a GET request to the following URL:\nhttps://api.yelp.com/v3/businesses/subscriptions?subscription_type=WEBHOOK\n\nFor the above request a successful GET call will return at most 100 business subscriptions with the following response body:\n\n```json\n{\n  \"total\": 2,\n  \"offset\": 0,\n  \"limit\": 100,\n  \"subscription_type\": \"WEBHOOK\",\n  \"subscriptions\": [\n    {\"business_id\": \"4U9kSBLuBDU391x6bxU-YA\", \"subscribed_at\": \"2022-12-10T09:50:00+00\"},\n    {\"business_id\": \"7w8SVwIEhxZ7jPnMUFYrng\", \"subscribed_at\": \"2022-12-10T10:52:30+00\"},\n  ]\n}\n```\n\n**Note**: Each subscription type requires configuration by Yelp to access, please reach out to partner-support@yelp.com to configure access.\n",
        "operationId": "get_business_subscriptions",
        "parameters": [
          {
            "name": "subscription_type",
            "required": true,
            "in": "query",
            "schema": {
              "description": "Type of subscriptions being returned",
              "type": "string",
              "enum": [
                "LISTING_MANAGEMENT",
                "YELP_KNOWLEDGE",
                "WEBHOOK"
              ]
            }
          },
          {
            "name": "limit",
            "description": "The maximum number of business subscriptions to return.",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 0,
              "maximum": 10000
            }
          },
          {
            "name": "offset",
            "description": "Offset the list of returned business subscriptions by this amount.",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully fetched the business subscriptions",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "total": 2,
                      "offset": 0,
                      "limit": 100,
                      "subscription_type": "WEBHOOK",
                      "subscriptions": [
                        {
                          "business_id": "4U9kSBLuBDU391x6bxU-YA",
                          "subscribed_at": "2022-12-10T09:50:00+00"
                        },
                        {
                          "business_id": "7w8SVwIEhxZ7jPnMUFYrng",
                          "subscribed_at": "2022-12-10T10:52:30+00"
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "subscriptions": {
                      "description": "List of active subscriptions",
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "business_id": {
                            "$ref": "#/paths/~1subscriptions/post/requestBody/content/application~1json/schema/properties/business_ids/items"
                          },
                          "subscribed_at": {
                            "description": "The time when the subscription got created",
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "subscription_type": {
                      "$ref": "#/paths/~1subscriptions/get/parameters/0/schema"
                    },
                    "total": {
                      "description": "Total number of active subscriptions for the specified subscription type.",
                      "type": "integer"
                    },
                    "offset": {
                      "description": "Current offset",
                      "type": "integer"
                    },
                    "limit": {
                      "description": "Current limit",
                      "type": "integer"
                    }
                  },
                  "required": [
                    "subscriptions",
                    "subscription_type",
                    "total",
                    "offset",
                    "limit"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. Message varies depending on failure scenario",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "description"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "The error code."
                        },
                        "description": {
                          "type": "string",
                          "description": "The description of the error."
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Invalid Request": {
                    "value": {
                      "error": {
                        "code": "INVALID_REQUEST",
                        "description": "Invalid Request"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API key has either expired or doesn't have the required scopes to query this endpoint.\n\n| code  | description |\n| ------------- | ------------- |\n| UNAUTHORIZED_API_KEY  | The API key provided is not currently able to query this endpoint.  |\n| TOKEN_INVALID  | Invalid API key or authorization header.  |\n",
            "content": {
              "application/json": {
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "error": {
                        "code": "UNAUTHORIZED_API_KEY",
                        "description": "The API key provided is not currently able to query this endpoint."
                      }
                    }
                  },
                  "Invalid Token": {
                    "value": {
                      "error": {
                        "code": "TOKEN_INVALID",
                        "description": "Invalid API key or authorization header."
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/paths/~1subscriptions/get/responses/400/content/application~1json/schema"
                }
              }
            }
          },
          "403": {
            "description": "This error is returned in any of the following scenarios:\n- The API key provided is not currently able to query this endpoint or manage business subscriptions of a certain type\n- Trying to access a Partner API endpoint for which the API Client has not been enabled\n\n| code | description |\n| ----- | ------------------ |\n| PARTNER_ENDPOINT_DISABLED |  You are trying to access a Partner API endpoint for which your API Client has not been enabled. Please reach out to partner-support@yelp.com for more information. |\n| AUTHORIZATION_ERROR | Authorization Error |\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/paths/~1subscriptions/get/responses/400/content/application~1json/schema"
                },
                "examples": {
                  "Partner Endpoint Disabled": {
                    "value": {
                      "error": {
                        "code": "PARTNER_ENDPOINT_DISABLED",
                        "description": "You are trying to access a Partner API endpoint for which your API Client has not been enabled. Please reach out to partner-support@yelp.com for more information."
                      }
                    }
                  },
                  "Authorization Error": {
                    "value": {
                      "error": {
                        "code": "AUTHORIZATION_ERROR",
                        "description": "Authorization Error"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "You have either exceeded your daily quota, or have exceeded the queries-per-second limit for this endpoint. Try reducing the rate at which you make queries.",
            "content": {
              "application/json": {
                "examples": {
                  "Rate limited": {
                    "value": {
                      "error": {
                        "code": "TOO_MANY_REQUESTS_PER_SECOND",
                        "description": "You have exceeded the queries-per-second limit for this endpoint. Try reducing the rate at which you make queries."
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/paths/~1subscriptions/get/responses/400/content/application~1json/schema"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "examples": {
                  "Internal Server Error": {
                    "value": {
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "description": "Something went wrong internally, please try again later."
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/paths/~1subscriptions/get/responses/400/content/application~1json/schema"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{quota_subscription_type}/quota": {
      "get": {
        "tags": [
          "Business Subscriptions"
        ],
        "summary": "Get Quota",
        "description": "Get quota information for the given subscription type.\nThis includes the maximum number of subscriptions that can be active this month, the current total number of active subscriptions and the remaining amount that can be created this month.\nTo get quota information regarding the deletion of subscriptions, please reach out to partner-support@yelp.com\n",
        "operationId": "get_business_subscriptions_quota",
        "parameters": [
          {
            "in": "path",
            "name": "quota_subscription_type",
            "description": "Subscription Type for which the quota information is returned.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "YELP_KNOWLEDGE"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully fetched the quota information.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "total_subscriptions": 100,
                      "allowed_subscriptions": 125,
                      "remaining_subscriptions": 25
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "total_subscriptions": {
                      "type": "integer",
                      "description": "Number of currently active YELP_KNOWLEDGE subscriptions."
                    },
                    "allowed_subscriptions": {
                      "type": "integer",
                      "description": "Number of total YELP_KNOWLEDGE subscriptions that can be created this month."
                    },
                    "remaining_subscriptions": {
                      "type": "integer",
                      "description": "Number of remaining YELP_KNOWLEDGE subscriptions that can still be created this month."
                    }
                  },
                  "required": [
                    "total_subscriptions",
                    "allowed_subscriptions",
                    "remaining_subscriptions"
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/paths/~1subscriptions/get/responses/401"
          },
          "403": {
            "$ref": "#/paths/~1subscriptions/get/responses/403"
          },
          "429": {
            "$ref": "#/paths/~1subscriptions/get/responses/429"
          },
          "500": {
            "$ref": "#/paths/~1subscriptions/get/responses/500"
          }
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": false,
    "samples-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 99,
      "1": 155,
      "2": 3,
      "3": 89,
      "4": 237,
      "5": 206,
      "6": 159,
      "7": 0,
      "8": 15,
      "9": 218,
      "10": 27,
      "11": 156
    }
  }
}
````