Update Company

An overview of the Update Company endpoint.

This endpoint allows you to udpate certain values of an existing company (subscription). (Access to this endpoint must be requested, limited access is granted)

HTTP Method

PUT /api/v2/companies/{id}

Request

Headers:

  • Content-Type: application/json - Specifies that the request body format is JSON.

  • Accept: application/json - Indicates that the client expects a JSON response.

  • Authorization: Bearer {token} - A valid Bearer token must be provided to authenticate the request.

URL Parameters

  • id (integer, required): The id of the company (subscription) you intend to update. Example: 1234

Body Parameters:

  • status (string, required): The status of the company (published, expired). Example: published

  • total_licenses (integer, required): The total number of licenses. Example: 100

  • license_renewal_date (date): The subscription renewal date for the company licenses.

Request Examples

curl --request PUT \
    "https://api.r1learning.com/api/v2/companies/1234" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: Bearer {token}" \
    --data "{
    \"status\": \"published\",
    \"total_licenses\": 10,
    \"license_renewal_date\": \"2025-01-01\"
}"

Response

Data Dictionary:

  • id (Integer): The unique identifier for the company within the R1 Discover system.

  • name (string): The name of the company.

  • status (string): The subscription status of the company (published, expired)

  • total_licenses (Integer): The total number of licenses available to the company

  • license_renewal_date (date): The subscription renewal date for the company licenses.

Response Examples

{
    "message": "Company updated successfully",
    "data": {
        "id": 10231,
        "name": "Example Company",
        "status": "published",
        "total_licenses": "11",
        "license_renewal_date": "2025-10-01"
    }
}
Link to the endpoint in postman

Notes

  • Authorization Required: Ensure the provided Bearer token is valid and has sufficient privileges to access the endpoint.

Last updated