Licenses
The licenses on each contract line item your credentials can see: how many were purchased, how many are assigned, how many are still available, and the dates they are valid. Use them to see how many members you can still invite, and which licenses a member finished early so that you can give the leftover time to someone else.
list licenses
Returns the contract line items you can see, with their license counts, latest end date first. Counts and status can be up to about 3 hours old. The assigned licenses on a contract line item are purchased_assigned_licenses + overage_assigned_licenses. This total can exceed purchased_licenses; the difference is overage.
Requires any one of
api:partner:reporting:read api:partner:reporting:write
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| page | integer | optional | Page number for pagination |
| per_page | integer | optional | Records per page |
| product_id | integer[] | optional | Product ids; a contract line item for any of them is returned |
| status | string (enum)[] | optional | Statuses; a contract line item in any of them is returned. Status can be up to about 3 hours old. Allowed values
|
| id | string (uuid)[] | optional | Contract line item ids. An id you cannot see returns no row. |
| partial_availability | boolean | optional | Return only contract line items whose early-finished licenses are, or are not, given to someone else automatically |
Responses
Response fields
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | optional | |
| data | Reporting.License[] | optional | |
| data[].id | string | required | |
| data[].coaching_months | integer | null | required | |
| data[].courtesy_assigned_licenses | integer | required | Every courtesy license on this contract line item, in use or used up. Courtesy licenses only exist once assigned. Can be up to about 3 hours old. |
| data[].ends_on | string (date) | required | |
| data[].full_available_licenses | integer | required | Can be up to about 3 hours old. |
| data[].full_term_access_assign_by_date | string (date) | null | required | The last day a new member still gets the full license length. Null when no licenses are available, or when the date would fall before starts_on. |
| data[].kind | string | required | |
| data[].label | string | null | required | |
| data[].overage_assigned_licenses | integer | required | Every overage license, in use or finished. Can be up to about 3 hours old. |
| data[].partial_availability | boolean | required | Whether a license that a member leaves early is given to someone else automatically. true: the leftover time is as long as a new license (both run to the contract line item end), so it counts in full_available_licenses. false: it counts in partial_available_licenses, and its leftover time is listed by the partial licenses endpoint. |
| data[].partial_available_licenses | integer | required | Licenses where a member finished early and the leftover time is unused. Invites never use these. Can be up to about 3 hours old. |
| data[].product_id | integer | required | |
| data[].product_name | string | required | |
| data[].purchased_assigned_licenses | integer | required | Can be up to about 3 hours old. |
| data[].purchased_licenses | integer | required | Can be up to about 3 hours old. |
| data[].related_links | object | optional | |
| data[].starts_on | string (date) | required | |
| data[].status | string (enum) | required | Can be up to about 3 hours old. Allowed values
|
| pagination_metadata | PaginationMetadata | optional | Pagination metadata for the response. |
| pagination_metadata.next_page_params | map<string, any> | null | required | Query params for the next page. Merge them into the params of this request. Null on the last page. |
| pagination_metadata.next_page_url | string | null | required | |
| pagination_metadata.page | integer | required | |
| pagination_metadata.per_page | integer | required | |
| pagination_metadata.previous_page_params | map<string, any> | null | required | Query params for the previous page. Merge them into the params of this request. Null on the first page. |
| pagination_metadata.previous_page_url | string | null | required | |
| pagination_metadata.total_records | integer | null | required |
curl -X GET "https://api.betterup.co/partner/reporting/licenses" \
-H "Authorization: Bearer <access_token>"{
"url": "<url>",
"data": [
{
"id": "<id>",
"coaching_months": 0,
"courtesy_assigned_licenses": 0,
"ends_on": "<date>",
"full_available_licenses": 0,
"full_term_access_assign_by_date": "<date>",
"kind": "<kind>",
"label": "<label>",
"overage_assigned_licenses": 0,
"partial_availability": true,
"partial_available_licenses": 0,
"product_id": 0,
"product_name": "<product_name>",
"purchased_assigned_licenses": 0,
"purchased_licenses": 0,
"related_links": {},
"starts_on": "<date>",
"status": "upcoming"
}
],
"pagination_metadata": {
"next_page_params": {
"<key>": {}
},
"next_page_url": "<next_page_url>",
"page": 0,
"per_page": 0,
"previous_page_params": {
"<key>": {}
},
"previous_page_url": "<previous_page_url>",
"total_records": 0
}
}list partial licenses
Returns the purchased licenses on a contract line item where a member finished early and the leftover time is unused and can be given to someone else. Shortest remaining time first; the order stays the same between requests. Empty when the license has partial_availability: true, because the leftover time is then given to someone else automatically. Can be up to about 3 hours old. A contract line item you cannot see returns 404, the same as one that does not exist.
Requires any one of
api:partner:reporting:read api:partner:reporting:write
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| license_id | string (uuid) | required | The contract line item id, as the licenses list returns it |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| page | integer | optional | Page number for pagination |
| per_page | integer | optional | Records per page |
Responses
Response fields
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | optional | |
| data | Reporting.PartialLicense[] | optional | |
| data[].id | string | required | |
| data[].kind | string | required | |
| data[].related_links | object | optional | |
| data[].remaining_duration_length_seconds | integer | required | Seconds of leftover time, capped at the contract line item end. Can be 0. Can be up to about 3 hours old. |
| pagination_metadata | PaginationMetadata | optional | Pagination metadata for the response. |
| pagination_metadata.next_page_params | map<string, any> | null | required | Query params for the next page. Merge them into the params of this request. Null on the last page. |
| pagination_metadata.next_page_url | string | null | required | |
| pagination_metadata.page | integer | required | |
| pagination_metadata.per_page | integer | required | |
| pagination_metadata.previous_page_params | map<string, any> | null | required | Query params for the previous page. Merge them into the params of this request. Null on the first page. |
| pagination_metadata.previous_page_url | string | null | required | |
| pagination_metadata.total_records | integer | null | required |
curl -X GET "https://api.betterup.co/partner/reporting/licenses/<license_id>/partial_licenses" \
-H "Authorization: Bearer <access_token>"{
"url": "<url>",
"data": [
{
"id": "<id>",
"kind": "<kind>",
"related_links": {},
"remaining_duration_length_seconds": 0
}
],
"pagination_metadata": {
"next_page_params": {
"<key>": {}
},
"next_page_url": "<next_page_url>",
"page": 0,
"per_page": 0,
"previous_page_params": {
"<key>": {}
},
"previous_page_url": "<previous_page_url>",
"total_records": 0
}
}