/1/purchase - POST

Overview

This API generates a purchase for the learner and assigns it to the learner that enables an active subscription for it and take assessments


Headers

KeyvalueDescription
X-LearnerId (Required)<LearnerId value>The learner for which you want to create the authorization for

Body

KeyValueDescription
systemDomainvbmappSystem Domain can be added as vbmapp
productTypeAssessment

localee.g en,es etcThe locale of the assessment that we want to set the subscription for

Code Example

curl --location 'https://api-sandbox.vbmappapp.com/1/purchase' \
--header 'User-Agent: dmtd-rest-api' \
--header 'Accept: application/json' \
--header 'X-LearnerId: 19354' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 8KctZgXXXXXQ==' \
--data '{ "systemDomain": "vbmapp", "productType": "assessment", "locale": "en" }'

Example Response

[
    {
        "quantity": 1,
        "subscriptionLength": {
            "type": "years",
            "length": 1
        },
        "id": 1044,
        "purchasedProductsGenerated": true,
        "organizationId": 259,
        "createdAt": "2025-06-09T09:16:24.000000Z",
        "updatedAt": "2025-06-09T09:16:24.000000Z",
        "completed": true,
        "productDescription": {
            "productType": "assessment",
            "assessmentProduct": {
                "locale": "en",
                "systemDomain": "vbmapp"
            }
        }
    }
]

Did this page help you?