Skip to content

List subscriptions for the authenticated user

GET
/user/marketplace_purchases

Lists the active subscriptions for the authenticated user.

API method documentation

per_page
integer
default: 30

The number of results per page (max 100). For more information, see “Using pagination in the REST API.”

page
integer
default: 1

The page number of the results to fetch. For more information, see “Using pagination in the REST API.”

Response

Media type application/json
Array<object>
User Marketplace Purchase

User Marketplace Purchase

object
billing_cycle
required
string
next_billing_date
required
string format: date-time
nullable
unit_count
required
integer
nullable
on_free_trial
required
boolean
free_trial_ends_on
required
string format: date-time
nullable
updated_at
required
string format: date-time
nullable
account
required
Marketplace Account
object
url
required
string format: uri
id
required
integer
type
required
string
node_id
string
login
required
string
email
string format: email
nullable
organization_billing_email
string format: email
nullable
plan
required
Marketplace Listing Plan

Marketplace Listing Plan

object
url
required
string format: uri
accounts_url
required
string format: uri
id
required
integer
number
required
integer
name
required
string
description
required
string
monthly_price_in_cents
required
integer
yearly_price_in_cents
required
integer
price_model
required
string
Allowed values: FREE FLAT_RATE PER_UNIT
has_free_trial
required
boolean
unit_name
required
string
nullable
state
required
string
bullets
required
Array<string>
Examples
Example default
[
{
"billing_cycle": "monthly",
"next_billing_date": "2017-11-11T00:00:00Z",
"unit_count": null,
"on_free_trial": true,
"free_trial_ends_on": "2017-11-11T00:00:00Z",
"updated_at": "2017-11-02T01:12:12Z",
"account": {
"login": "github",
"id": 4,
"node_id": "MDEyOk9yZ2FuaXphdGlvbjE=",
"url": "https://api.github.com/orgs/github",
"email": null,
"organization_billing_email": "billing@github.com",
"type": "Organization"
},
"plan": {
"url": "https://api.github.com/marketplace_listing/plans/1313",
"accounts_url": "https://api.github.com/marketplace_listing/plans/1313/accounts",
"id": 1313,
"number": 3,
"name": "Pro",
"description": "A professional-grade CI solution",
"monthly_price_in_cents": 1099,
"yearly_price_in_cents": 11870,
"price_model": "FLAT_RATE",
"has_free_trial": true,
"unit_name": null,
"state": "published",
"bullets": [
"Up to 25 private repositories",
"11 concurrent builds"
]
}
}
]
Link
string
Example
<https://api.github.com/resource?page=2>; rel="next", <https://api.github.com/resource?page=5>; rel="last"

Not modified

Requires authentication

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Resource not found

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}