Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Info
titleRequired Headers


Key
Value
Example
Acceptapplication/json
AuthorizationBearer <your token>Bearer wV1MLk5+sFzioJw/3M5r9A==
Content-Typeapplication/json
X-LearnerId<the learner id>The DMTD-supplied identifier that identifies the learner (see Getting started and /1/learner - POST)*
X-LearnerCode<the learner code>A REST-client-supplied identifier that identifies the learner (see Getting started and /1/learner - POST)*
X-UserId<the user id>The DMTD-supplied identifier that identifies the owner of the purchase (see Getting started and /1/user - POST)
X-UserCode<the user code>A REST-client-supplied identifier that identifies the owner of the purchase (see Getting started and /1/user - POST)

*Required  if Fields.type == 'assessment'


Info
titleFields


FieldTypeOptionalDescription
systemDomainStringRequiredThe DMTD-Supported domain of the purchase ('vbmapp', 'efl')
typeproductTypeStringRequiredThe type of product being purchased in the SystemDomain ('assessment', 'training')

trainingProduct

StringOptionalType type of training product being purchased ('conducting').  Required when type == 'training'


...

Info
titleExample
curl -X POST \
  -H 'Authorization: Bearer L2Hth4lRwgHRBWtX8Hkl5w==' \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-UserId: 7" \
-H "X-LearnerId: 1" \
  -d '{ "systemDomain": "vbmapp", "type": "assessment" }' \
  http://data-sandbox.datamtd.com/1/purchase


Info
titleResponse
{
    "quantity": 1,
    "subscriptionLength": {
        "type": "years",
        "length": 1
    },
    "id": 15,
    "purchasedProductsGenerated": true,
    "organizationId": 9,
    "updatedAt": "2019-07-16T14:06:54Z",
    "createdAt": "2019-07-16T14:06:54Z",
    "completed": true,
    "productDescription": {
        "systemDomain": "vbmapp",
        "productType": "assessment"
    }
}