Documentation


Overview | Postman | OAuth | Endpoints

 

Endpoints

BEGIN Navigation

Account

GET account

Returns information of the user currently using this API.

Example

GET https://api.schooltas.net/v1/account

Result

{
  "id": "e6335305-d285-46e1-89db-d2ae2e172b6f",
  "email": "james@schooltas.net",
  "firstName": "James",
  "lastName": "Bond",
  "avatar": "production-applicationstack-x2l8-pdfcontentbucket-8lgvyehv6f1g/user-data/e6335305-d285-46e1-89db-d2ae2e172b6f/avatars/avatar.jpg",
  "roles": [
    {
      "id": "1b2d416e-5753-47ef-9dce-afae90dca1d1"
      "name": "Editor"
    }
  ],
  "permissions": [
    {
      "resource": "Book"
      "operation": "Create"
    },
    {
      "resource": "Book"
      "operation": "Update"
    }
  ]
}

Books

GET books

Returns a list of books, filtered by organization. You need to select an organization by providing the id and type. You're only allowed to view books if the given organization is the same as yours, or your organization is the owner of the given organization. The results of books are paginated.

Parameters

Name Type Description
organization string Required. The id of the organization.
type string Required. The type of the organization. This can be either School, Publisher or Distributor.
language string Required. An uppercase language code which is used to display subjects and types of the books. Currently the following values are supported: DE, EN, ES, FR, IT, NL, PT, RU

Example

GET https://api.schooltas.net/v1/books?organization=53b6cff9-c101-4528-89bb-c1da4867cc4c&type=Publisher&language=NL

Result


  {
    "books": [
        {
            "id": "6164fa4d-c67e-4eaa-8a06-8c90f725b2fc",
            "ean": "9789006002676",
            "title": "Bronnenboek",
            "year": 2,
            "level": "vmbo-bk/lwoo",
            "series": "Bekijk het!",
            "subject": {
                "id": "8f468610-7686-4f19-a236-e12c49628d86",
                "translatedName": null
            },
            "organization": {
                "id": "53b6cff9-c101-4528-89bb-c1da4867cc4c",
                "type": "Publisher"
            },
            "coverUrl":  null,
            "pdfUrl":null,
            "type": {
                "name": "ReferenceBook",
                "translatedName": "naslagwerk"
            },
            "active": false,
            "settings": {
                "indexPageNumber": 0,
                "pageNumberOffset": 1
            }
        }
    ],
    "paging": {
        "nextCursor": "b3JnYW5pemF0aW9uSWQ6KFNUUklORzo1M2I2Y2ZmOS1jMTAxLTQ1MjgtODliYi1jMWRhNDg2N2NjNGMpO2lkOihTVFJJTkc6NjE2NGZhNGQtYzY3ZS00ZWFhLThhMDYtOGM5MGY3MjViMmZjKQ"
    }
}

When the organization doesn't have any books the books array will just be empty.

Errors

Returns a 400 error when the type or language is not valid.
Returns a 403 when you're not allowed to view books of the given organization.


GET books/:id

Return details of a book. You're only allowed to view books of your own organization.

Parameters

Name Type Description
id string Required. The id of the book.
language string Required. An uppercase language code which is used to display the subject and type of the book. Currently the following values are supported: DE, EN, ES, FR, IT, NL, PT, RU

Example

GET https://api.schooltas.net/v1/books/d7c85895-59fd-4303-958e-e27a942698e6?language=NL

Result

{
  "id": "d7c85895-59fd-4303-958e-e27a942698e6",
  "ean": "9870123456789",
  "title": "Test boek 1",
  "year": 2,
  "level": "GeoH2",
  "series": "Geo",
  "subject": {
    "id": "4d2cf29e-07f4-4b80-9f49-7869b8f693cc",
    "translatedName": "Aardrijkskunde"
  },
  "organization": {
    "id": "53b6cff9-c101-4528-89bb-c1da4867cc4c",
    "type": "Distributor"
  },
  "coverUrl": "production-applicationstack-x2l8-pdfcontentbucket-8lgvyehv6f1g/user-data/e6335305-d285-46e1-89db-d2ae2e172b6f/covers/cover.jpg",
  "pdfUrl":null,
  "type": {
    "name": "Coursebook",
    "translatedName": "lesboek"
  }
  "active": true,
  "settings": {
    "pageNumberOffset": 5,
    "indexPageNumber": 2
   }
}

The active flag is true if the book is enabled, has uploads (cover and PDF) available and has an encrypted PDF ready.

Errors

Returns a 403 when you're not allowed to view details of the book.
Returns a 404 error when there's no book with the given id.


GET books/:id/editor

Returns the url that is used to redirect the user to the editor.
This endpoint should be used in the following work flow:

  1. User sees list of books (or a single book)
  2. User clicks on "edit" link, linking to your server
  3. This endpoint gets called, which returns the correct editor url
  4. The user gets redirected to the returned url
Be aware that the returned url should be used within 1 minute.

Parameters

Name Type Description
id string Required. The id of the book.
language string Required. An uppercase language code which is used to display the subject and type of the book. Currently the following values are supported: DE, EN, ES, FR, IT, NL, PT, RU

Example

GET https://api.schooltas.net/v1/books/edbf6b99-ef35-4416-a54f-6dbeb1b42956/editor?language=EN

Result

{
"url": "https://mijn.schooltas.net/book-editor?publisher=true&edit=true&token=fc2bc0d7-e490-4377-879a-a228b0542ae9&language=EN#edbf6b99-ef35-4416-a54f-6dbeb1b42956"
}

Errors

Returns a 403 when you're not allowed to view details of the book.
Returns a 404 error when there's no book with the given id.


GET books/:id/licenses

Returns a list of licenses of your organization for which this book is used. The results of licenses are paginated.

Parameters

Name Type Description
id string Required. The id of the book.

Example

GET https://api.schooltas.net/v1/books/d7c85895-59fd-4303-958e-e27a942698e6/licenses

Result

{
  "licenses": [
    {
      "type": "Books",
      "books": [
        {
          "id": "d7c85895-59fd-4303-958e-e27a942698e6",
          "ean": "9870123456789",
          "title": "test boek 1"
        }
      ],
      "id": "4d2cf29e-07f4-4b80-9f69-7345b8f693cc",
      "organization": {
        "id": "53b6cff9-c101-4528-89bb-c1da4867cc4c",
        "type": "Publisher"
      },
      "name": "Test license 2",
      "code": "fedcba",
      "expiration": {
        "type": "Days",
        "days": 365
      },
      "maximumActivations": 32,
      "numberOfActivations": 1
    }
  ],
  "paging": {
    "nextCursor": "CiUSH2oJYXBwZW5naW5lchILEgxUTGljZW5zZUNvZGUYAgwYACAA"
  }
}

Errors

Returns a 403 when you're not allowed to view details of the book.
Returns a 404 error when there's no book with the given id.


GET books/subjects

Retrieve a list of all available subjects for books.

Parameters

Name Type Description
language string Required. An uppercase language code which is used to display the subjects. Currently the following values are supported: DE, EN, ES, FR, IT, NL, PT, RU

Example

GET https://api.schooltas.net/v1/books/subjects?language=EN

Result

{
    "subjects": [
        {
            "id": "4d2cf29e-07f4-4b80-9f49-7869b8f693cc",
            "translatedName": "Sociology"
        },
        {
            "id": "61ce3bde-5c76-4904-bb89-2ab835156dac",
            "translatedName": "Latin"
        },
        {
            "id": "550916c9-e4b5-4def-a798-db75fe42d4ef",
            "translatedName": "Arabic"
        },
        {
            "id": "87ae4cfd-e9e8-4b27-bf29-d5f89dbc5e56",
            "translatedName": "Home economics"
        },
        {
            "id": "d39c5232-4237-43b0-8d3b-efaa732c5c8e",
            "translatedName": "Horeca, Bakkerij en Recreatie"
        },
        {
            "id": "9f70519d-8d41-4bf4-913c-40a9fe018ba6",
            "translatedName": "Student Support"
        },
        {
            "id": "d9654997-b563-4ce3-a8b4-61316ced7033",
            "translatedName": "Philosophy"
        }
    ]
}

GET books/types

Retrieve a list of all available types for books.

Parameters

Name Type Description
language string Required. An uppercase language code which is used to display the types. Currently the following values are supported: DE, EN, ES, FR, IT, NL, PT, RU

Example

GET https://api.schooltas.net/v1/books/types?language=DE

Result

{
  "types": [
    {
      "type": "Answers",
      "translatedName": "Antworten"
    },
    {
      "type": "ClassroomMaterial",
      "translatedName": "Unterrichtsmaterial"
    },
    {
      "type": "CourseActivityBook",
      "translatedName": "Arbeitsbuch"
    },
    {
      "type": "Coursebook",
      "translatedName": "Textbuch"
    },
    {
      "type": "Guide",
      "translatedName": "Grundbuch"
    },
    {
      "type": "Magazine",
      "translatedName": "Zeitschrift"
    }
  ]
}

POST books

Create a new book.

Fields

Name Type Description
ean string Required. The EAN identifier of the book.
title string Required. The title of the book.
year number Required. The academic year of the education level.
stream string The education level (e.g. K12).
series string The name of the book series where this book is part of.
subject string Required. The ID of the subject of the book (see GET subjects for more info).
type string Required. The type of the book (see GET types for more info).
language string Required. An uppercase language code used to display the subject and type. Currently the following values are supported: DE, EN, ES, FR, IT, NL, PT, RU
settings.pageNumberOffset number Integer, controls on what page the page numbering should start
settings.indexPageNumber number Integer that specifies on what page the index starts
pdfFile file The PDF which will be assigned to the book. This field is optional.
coverFile file The JPEG or PNG cover file which will be assigned to the book. This field is optional.
organization.id string The id of the organization that this book will belong to. If this field is left blank, the organization will be the one of the creator account. This field is optional.
organization.type string The type of the organization that this book will belong to. If this field is left blank, the organization will be the one of the creator account. This field is optional.

Example

POST https://api.schooltas.net/v1/books?language=EN
  This call uses a form-data HTTP-request.

Result


{
    "id": "a51a5680-faed-4918-82a0-d3db691fd542",
    "ean": "1234533899956",
    "title": "Booking cook",
    "year": 4,
    "level": "3",
    "series": null,
    "subject": {
        "id": "4d2cf29e-07f4-4b80-9f49-7869b8f693cc",
        "translatedName": "Sociology"
    },
    "organization": {
        "id": "d121ac6b-0d9d-4568-9909-b35803d1be12",
        "type": "Publisher"
    },
    "coverUrl": "production-applicationstack-x2l8-pdfcontentbucket-8lgvyehv6f1g/organization-data/publisher/d121ac6b-0d9d-4568-9909-b35803d1be12/image/jpeg2000-home_f966da65-8a81-4413-9355-266c3a6a74b9.jpg",
    "pdfUrl": "production-applicationstack-x2l8-pdfcontentbucket-8lgvyehv6f1g/organization-data/publisher/d121ac6b-0d9d-4568-9909-b35803d1be12/document/0000042424201_pdf_9bd58f4a-633e-491b-993b-fbac9e2c5c7e.pdf",
    "type": {
        "name": "Coursebook",
        "translatedName": "coursebook"
    },
    "active": false,
    "settings": {
        "indexPageNumber": 0,
        "pageNumberOffset": 1
    }
}

Errors

Returns a 400 when required data is missing.
Returns a 403 when you're not allowed to create a book for the given organization.


PUT books/:id

Update an existing book.

Fields

Name Type Description
id string Required. The unique id of the book (returned by GET books or POST book).
ean string Required. The EAN identifier of the book.
title string Required. The title of the book.
year number Required. The academic year of the education level.
stream string The education level (e.g. K12).
series string The name of the book series where this book is part of.
subject string Required. The ID of the subject of the book (see GET subjects for more info).
type string Required. The type of the book (see GET types for more info).
language string Required. An uppercase language code used to display the subject and type. Currently the following values are supported: DE, EN, ES, FR, IT, NL, PT, RU
settings object An object containing settings of a book.
pageNumberOffsetInteger, controls on what page the page numbering should start indexPageNumberInteger that specifies on what page the index starts

Example

PUT https://api.schooltas.net/v1/books/8c9f0ab3-f95f-4d5a-b578-e0e6427caee3?language=EN

{
  "ean": "9870123456789",
  "title": "Hello with book",
  "year": 4,
  "level": "College",
  "series": "ABC 2nd edition",
  "subject": "550916c9-e4b5-4def-a798-db75fe42d4ef",
  "type": "Coursebook",
  "settings": {
    "pageNumberOffset": 3,
    "indexPageNumber": 2
  }
}

Result

{
  "id": "fb3d6a63-ca3d-4989-80b9-7d7799ce4a87",
  "ean": "9870123456789",
  "title": "Hello with book",
  "year": 4,
  "level": "College",
  "series": "ABC 2nd edition",
  "subject": {
    "id": "550916c9-e4b5-4def-a798-db75fe42d4ef",
    "translatedName": "Math"
  },
  "organization": {
    "id": "53b6cff9-c101-4528-89bb-c1da4867cc4c",
    "type": "Publisher"
  },
  "coverUrl": null,
  "type": {
    "name": "Coursebook",
    "translatedName": "coursebook"
  },
  "active": false,
  "settings": {
    "pageNumberOffset": 3,
    "indexPageNumber": 2
  }
}

Errors

Returns a 400 when required data is missing.
Returns a 403 when you're not allowed to update this book. Returns a 404 when a book with the given id doesn't exist.


Classes

GET classes/:id

Get a class by its id.

Fields

Name Type Description
classId string Required. Class id.

Example

GET https://api.schooltas.net/v1/classes/fae424cf-cb27-4ed8-b5b9-4e7b19a1253c

Result

{
  "classId": "fae424cf-cb27-4ed8-b5b9-4e7b19a1253c",
  "className": "B group",
  "classCode": "dxphoc",
  "subjectId": "550916c9-e4b5-4def-a798-db75fe42d4ef",
  "usersInClass": [
    "000a95e2-b2d9-4176-b15f-4330b89cac14",
    "001e7b32-c79f-4191-965b-ce55ef7946ad",
    "00245635-b9e7-4e91-86af-f91f23b06a41"
  ]
}

Errors

Returns a 400 when there is something wrong in the provided JSON.


GET classes/classesForUser/:id

Get classes by user id.

Fields

Name Type Description
userId string Required. The id of the end user.

Example

GET https://api.schooltas.net/v1/classes/classesForUser/550916c9-e4b5-4def-a798-db75fe42d4ef

Result

{
  "classes": [
    {
      "classId": "550916c9-e4b5-4def-a798-db75fe42d4ef",
      "className": "Centric class",
      "classCode": "dxphoc",
      "subjectId": "fb3d6a63-ca3d-4989-80b9-7d7799ce4a87",
      "usersInClass": [
    	"000a95e2-b2d9-4176-b15f-4330b89cac14",
    	"001e7b32-c79f-4191-965b-ce55ef7946ad",
    	"00245635-b9e7-4e91-86af-f91f23b06a41"
      ]
    },
    {
      "classId": "53b6cff9-c101-4528-89bb-c1da4867cc4c",
      "className": "testClass2-2",
      "classCode": "lyknxl",
      "subjectId": "550916c9-e4b5-4def-a798-db75fe42d4ef",
      "usersInClass": [
    	"00245635-b9e7-4e91-86af-f91f23b06a41"
      ]
    }
  ]
}

Errors

Returns a 400 when there is something wrong in the provided JSON.


POST classes

Create a new class.

Fields

Name Type Description
subjectId string Required. The id of the subject used by the created class.
schoolId string Required. The id of the school used by the created class.
name string Required. The name of the class that will be created.

Example

POST https://api.schooltas.net/v1/classes

{
  "subjectId": "0532c08d-dd23-442b-ad23-0e3b7d26fc0f",
  "schoolId": "f1dbf9c2-3586-4678-9f1e-1dcedcbd1abb",
  "name" : "testClass2"
}
        

Result

{
  "classId": "550916c9-e4b5-4def-a798-db75fe42d4ef",
  "className": "testClass3",
  "classCode": "xhwfxa",
  "subjectId": "0532c08d-dd23-442b-ad23-0e3b7d26fc0f",
  "usersInClass": null
}

Errors

Returns a 400 when there is something wrong in the provided JSON.


PUT assignClass/assignClassToUser

Assign a class to a user.

Fields

Name Type Description
userId String Required. The id of the end user who will be connected to the class.
classId string Required. The id of the class to which the end user will be connected to.

Example

PUT https://api.schooltas.net/v1/assignClass/assignClassToUser

{
  "userId": "00245635-b9e7-4e91-86af-f91f23b06a41",
  "classId": "550916c9-e4b5-4def-a798-db75fe42d4ef"
}

Result

{
  "className": "Science Class",
  "classId": "550916c9-e4b5-4def-a798-db75fe42d4ef",
  "classCode": "zodizl",
  "subjectId": "0532c08d-dd23-442b-ad23-0e3b7d26fc0f",
  "usersInClass": [
    "001e7b32-c79f-4191-965b-ce55ef7946ad",
    "00245635-b9e7-4e91-86af-f91f23b06a41",
    "53b6cff9-c101-4528-89bb-c1da4867cc4c",
    "550916c9-e4b5-4def-a798-db75fe42d4ef"
  ]
}

Errors

Returns a 400 error when there is something wrong in the provided JSON.


PUT classes/:id

Update an existing class.

Fields

Name Type Description
subjectId string Required. The new value for the subject id.
name string Required. The new value for the class name.

Example

PUT https://api.schooltas.net/v1/classes/587616c9-e4b5-4def-a798-db75fe42d4dsd

{
  "subjectId": "0532c08d-dd23-442b-ad23-0e3b7d26fc0f",
  "name" : "testClass2"
}

Result

{
  "classId": "587616c9-e4b5-4def-a798-db75fe42d4dsd",
  "className": "testClass3",
  "classCode": "xhwfxa",
  "subjectId": "0532c08d-dd23-442b-ad23-0e3b7d26fc0f",
  "schoolId": "d0b18ab4-a842-4155-9072-eac7a558d06a",
  "creationDate": "2017-03-07T09:44:12.232",
  "deactivationDate": null,
  "usersInClass": [
    "53b6cff9-c101-4528-89bb-c1da4867cc4c"
  ]
}

Errors

Returns a 400 error when there is something wrong in the provided JSON.


PUT classes/delete/:id

Mark a class as deleted and remove the users assigned to the class.

Fields

Name Type Description
classId string Required. Class id.

Example

PUT https://api.schooltas.net/v1/classes/delete/587616c9-e4b5-4def-a798-db75fe42d4dsd

Result

{
  "classId": "587616c9-e4b5-4def-a798-db75fe42d4dsd",
  "className": "testClass4",
  "classCode": "vkxegz",
  "subjectId": "0532c08d-dd23-442b-ad23-0e3b7d26fc0f",
  "usersInClass": null
}

Errors

Returns a 400 error when there is something wrong in the provided JSON.


PUT unAssignClass/unAssignClassFromUser

Unassign a class from a user.

Fields

Name Type Description
userId string Required. The id of the end user from which will be disconnected.
classId string Required. The id of the class from which the end user will be disconnected.

Example

PUT https://api.schooltas.net/v1/unAssignClass/unAssignClassFromUser

{
  "userId": "53b6cff9-c101-4528-89bb-c1da4867cc4c",
  "classId": "587616c9-e4b5-4def-a798-db75fe42d4dsd"
}

Result

{
  "className": "Science Class",
  "classId": "587616c9-e4b5-4def-a798-db75fe42d4dsd",
  "classCode": "zodizl",
  "subjectId": "0532c08d-dd23-442b-ad23-0e3b7d26fc0f",
  "usersInClass": [
    "001e7b32-c79f-4191-965b-ce55ef7946ad",
    "00245635-b9e7-4e91-86af-f91f23b06a41",
    "550916c9-e4b5-4def-a798-db75fe42d4ef"
  ]
}

Errors

Returns a 400 error when there is something wrong in the provided JSON.


Files

POST files

Create a new file.

Fields

Name Type Description
file File Required. The file to be uploaded.
fileType string Required. A String containing the file type, supported values are: Audio, Document, Image, Video.

Example

POST https://api.schooltas.net/v1/files
  This call uses a form-data HTTP-request.

Result

{
    "type": "AmazonStorage",
    "id": "3bdac72c-685e-4188-911e-3235d3b88531",
    "url": "https://api.schooltas.net/v1/api/file/get/3bdac72c-685e-4188-911e-3235d3b88531"
}

Errors

Returns a 400 when required data is missing.
Returns a 403 when you're not allowed to create a reader for the given organization.


Licenses

GET licenses

Returns a list of licenses that are created by the organization of the requesting user. The results of publishers are paginated (with a maximum of 100 per page).

Parameters

Name Type Description
type string Required. The type of the licenses. This can be either BOOKS or TEACHER.

Example

GET https://api.schooltas.net/v1/licenses?type=BOOKS

Result


 {
    "licenses": [
        {
            "type": "Books",
            "books": [
                {
                    "id": "b5aa3667-97e2-4969-a26e-0744944ae424",
                    "ean": "1000000000269",
                    "title": "Gezond leven"
                }
            ],
            "expiration": {
                "type": "Days",
                "days": null
            },
            "id": "a6bdf8f0-17eb-4e9b-b662-555de3552997",
            "name": "Guido de Bres Onderbouw",
            "code": "whpkezxrvnrgsyda",
            "maximumActivations": 50,
            "numberOfActivations": 0,
            "endUsers": [
                {
                    "id": "2756684c-343e-4a12-b67d-290a174509de",
                    "email": "113362@guido.nl",
                    "firstName": "Elisah",
                    "lastName": "Schouten",
                    "language": "NL"
                },
                {
                    "id": "fa10b952-4d71-4f3f-9fd2-58cc3c32dbc4",
                    "email": "115071@guido.nl",
                    "firstName": "Rik",
                    "lastName": "Goedhart",
                    "language": "NL"
                }
            ]
        }
    ],
    "paging": {
        "nextCursor": "b3JnYW5pemF0aW9uSWQ6KFNUUklORzo1M2I2Y2ZmOS1jMTAxLTQ1MjgtODliYi1jMWRhNDg2N2NjNGMpO2lkOihTVFJJTkc6N2RlMTkxOGEtOTg2OS00NjgyLTg0OTAtZGQ3OTk0YTBjZjQ3KTtjcmVhdGlvbkRhdGU6KFNUUklORzoyMDEzLTA5LTE3VDExOjI3OjM4LjQ2M1op"
    }
}

Note that the expiration.days is the number of days a license will be valid after activation.


GET licenses/:id

Return details of a license. You're only allowed to view licenses if your organization is the owner of the license.

Parameters

Name Type Description
id string Required. The id of the license.

Example

GET https://api.schooltas.net/v1/licenses/a6bdf8f0-17eb-4e9b-b662-555de3552997

Result


{
  "id": "a6bdf8f0-17eb-4e9b-b662-555de3552997",
  "name": "Teacher license",
  "code": "asdfghjkl",
  "maximumActivations": 10,
  "numberOfActivations": 6,
  "type": "Teacher",
  "endUsers": [
    {
      "id": "2756684c-343e-4a12-b67d-290a174509de",
      "email": "john@tm.nl",
      "firstName": "John",
      "lastName": "Smith"
    },
    {
      "id": "fa10b952-4d71-4f3f-9fd2-58cc3c32dbc4",
      "email": "bob@tm.nl",
      "firstName": "Bob",
      "lastName": "Thorne"
    }
  ]
}

Errors

Returns a 403 when you're not allowed to view details of the license.

Returns a 404 error when there's no license with the given id.


GET licenses/code/:code

Return details of a license. You're only allowed to view licenses if your organization is the owner of the license.

Parameters

Name Type Description
code string The code of the license.

Example

GET https://api.schooltas.net/v1/licenses/code/asdfghjkl

Result


{
  "id": "6d99007d-6a0c-4cfd-94ee-0da0af8e4b49",
  "name": "Teacher license",
  "code": "asdfghjkl",
  "maximumActivations": 10,
  "numberOfActivations": 6,
  "type": "Teacher",
  "endUsers": [
    {
      "id": "2756684c-343e-4a12-b67d-290a174509de",
      "email": "rob@tm.nl",
      "firstName": "Rob",
      "lastName": "Lakerveld"
    },
    {
      "id": "fa10b952-4d71-4f3f-9fd2-58cc3c32dbc4",
      "email": "bob@tm.nl",
      "firstName": "Bob",
      "lastName": "Thorne"
    }
  ]
}

Errors

Returns a 403 when you're not allowed to view details of the license.

Returns a 404 error when there's no license with the given code.


GET licenses/:id/activations

Returns the activations of that specific license. This endpoint is available for teacher licenses only. You're only allowed to view licenses if your organization is the owner of the license.

Parameters

Name Type Description
id string The id of the license.

Example

GET https://api.schooltas.net/v1/licenses/0ecae213-ac28-4005-ae48-9581efdf4e08/activations

Result


{
    "activations": [
        {
            "creationDate": "2017-12-05 11:12:51",
            "expirationDate": "2022-12-06 00:00:00",
            "user": "24d4455e-834d-4db3-b321-aa2b499eb162"
        },
        {
            "creationDate": "2017-12-19 10:59:49",
            "expirationDate": "2022-12-20 00:00:00",
            "user": "8ec5f389-6aca-464b-b796-c8d62814a6d8"
        },
        {
            "creationDate": "2017-12-05 11:11:59",
            "expirationDate": "2022-12-06 00:00:00",
            "user": "b218f20f-eada-4f43-b0ec-ef59bb79cb22"
        }
    ]
}

Errors

Returns a 400 error when you try to view activations for a BOOKS license.

Returns a 403 when you're not allowed to view details of the license.

Returns a 404 error when there's no license with the given id.


POST licenses

Create a new license. Send JSON in the body with the following fields. The organization you are connected to will become the owner of the created license.

Fields

Name Type Description
name string Required. The name of the license.
code string The code of the license. Will be automatically generated when omitted. The code can only exist of lowercase-alphanumeric characters and must be unique (across all organizations using Schooltas).
maximumActivations number Required. The maximum number of times this license can be activated by users.
type string Required. The type of the license. This can be either Books or Teacher.
books [string] Required when type is Books. List of book IDs.
expiration object Required when type is Books. This determines for how long the license is valid.
expiration.type string Required when type is Books. The type of the expiration. This can be either Days or Date.
expiration.days number Required when expiration.type is Days. This determines for how long (after activation) the license is valid. Can be 30, 90, 365, 455,820,1095,1185,1550 or 3650 days.
expiration.date string Required when expiration.type is Date. This determines until which date the license is valid. Format for date is yyyy-MM-dd.
organization.id string The id of the organization that this license will belong to. If this field is left blank, the organization will be the one of the creator account. This field is optional.
organization.type string The type of the organization that this license will belong to. If this field is left blank, the organization will be the one of the creator account. This field is optional.
licenseCategory string The id of one of the existing license categories. If this field is left blank, the license category will be the default one. This field is optional.

Example

POST https://api.schooltas.net/v1/licenses

{
  "name": "Book license 4",
  "code": "newlicensecode",
  "expiration": {
    "type": "Days",
    "days": 365
  },
  "maximumActivations": 40,
  "type": "Books",
  "organization": {
      "id": "d121ac6b-0d9d-4568-9909-b35803d1be12",
      "type": "Publisher"
  },
  "books": [ "b5aa3667-97e2-4969-a26e-0744944ae424", "fa10b952-4d71-4f3f-9fd2-58cc3c32dbc4" ],
  "licenseCategory":"1"
}

Result

{
  "id": "27556lyh-343e-4a12-b67d-290a1745rt56",
  "name": "Book license 4",
  "code": "newlicensecode",
  "expiration": {
    "type": "Days",
    "days": 365
  },
  "maximumActivations": 40,
  "numberOfActivations": 0,
  "type": "Books",
  "organization": {
      "id": "d121ac6b-0d9d-4568-9909-b35803d1be12",
      "type": "Publisher"
  },
  "organization": {
      "id": "d121ac6b-0d9d-4568-9909-b35803d1be12",
      "type": "Publisher"
  },
  "books": [
    {
      "id": "b5aa3667-97e2-4969-a26e-0744944ae424",
      "ean": "2410928375012",
      "name": "Epic book 3"
    },
    {
      "id": "fa10b952-4d71-4f3f-9fd2-58cc3c32dbc4",
      "ean": "9034528375567",
      "name": "Epic book 4"
    }
  ],
  "licenseCategory":"Normal License"
}

Errors

Returns a 400 error when their is something wrong in the provided JSON.


PUT licenses/:id

Update an existing license. You are only allowed to update a license that was created by your organization. Send JSON in the body with the following fields.

Fields

Name Type Description
name string Required. The name of the license.
maximumActivations number Required. The maximum number of times this license can be activated by users. This must be equal to or more then the numberOfActivations.
type string Required. The type of the license. This can be either Books or Teacher. Cannot be changed after creation.
books [number] Required when type is Books. List of book IDs. Cannot be changed if the license has been activated by someone.
expiration object Required when type is Books. This determines for how long the license is valid.
expiration.type string Required when type is Books. The type of the expiration. This can be either Days or Date.
expiration.days number Required when expiration.type is Days. This determines for how long (after activation) the license is valid. Can be 30, 90, 365, 455,820,1095,1185,1550 or 3650 days.
expiration.date string Required when expiration.type is Date. This determines until which date the license is valid. Format for date is yyyy-MM-dd.
licenseCategory string The id of one of the existing license categories. If this field is left blank, the license category will be the default one. This field is optional.

Example

PUT https://api.schooltas.net/v1/licenses/27556lyh-343e-4a12-b67d-290a1745rt56
        
{
  "name": "Book license 4",
  "expiration": {
    "type": "Days",
    "days": 90
  },
  "maximumActivations": 20,
  "type": "Books",
  "books": [ "b5aa3667-97e2-4969-a26e-0744944ae424" ],
  "licenseCategory":"2"
}

Result

{
  "id": "27556lyh-343e-4a12-b67d-290a1745rt56",
  "name": "Book license 4",
  "code": "newlicensecode",
  "expiration": {
    "type": "Days",
    "days": 90
  },
  "maximumActivations": 20,
  "numberOfActivations": 0,
  "type": "Books",
  "books": [
    {
      "id": "b5aa3667-97e2-4969-a26e-0744944ae424",
      "ean": "2410928375012",
      "name": "Epic book 3"
    }
  ],
  "licenseCategory":"Extended License"
}

Errors

Returns a 400 error when their is something wrong in the provided JSON.


PUT licenses/:id/cancel

Cancel license with the given id. You are only allowed to cancel a license that was created by your organization.

Fields

Name Type Description
licenseId string Required. The id of the license to be canceled.

Example

PUT https://api.schooltas.net/v1/licenses/4d2cf29e-07f4-4b80-9f69-7345b8f693cc/cancel

Result

The call returns a 200 OK if all went well.

Errors

Returns a 403 when you're not allowed to delete this license.
Returns a 404 when there's no license with the given id.


DELETE licenses/:id

Delete license with the given id. You are only allowed to delete a license that was created by your organization. It is only possible to delete licenses which are not yet activated by a user.

Fields

Name Type Description
licenseId string Required. The id of the license to be deleted.

Example

DELETE https://api.schooltas.net/v1/licenses/4d2cf29e-07f4-4b80-9f69-7345b8f693cc

Result

The call returns a 204 No Content if all went well.

Errors

Returns a 400 when the license has 1 or more activations.
Returns a 403 when you're not allowed to delete this license.
Returns a 404 when there's no license with the given id.


PUT licenses/assignLicense

Assign a license to an end user.

Fields

Name Type Description
userId string Required. The id of the end user to whom the license will be assigned.
licenseId string Required. The id of the license which will be assigned to the end user.

Example

PUT https://api.schooltas.net/v1/licenses/assignLicense

{
  "userId": "fa10b952-4d71-4f3f-9fd2-58cc3c32dbc4",
  "licenseId": "27556lyh-343e-4a12-b67d-290a1745rt56"
}

Result

{
  "user": {
    "id": "fa10b952-4d71-4f3f-9fd2-58cc3c32dbc4",
    "email": "john.smith@mail.com",
    "firstName": "John",
    "lastName": "Smith",
    "language": "EN"
  },
  "activatedLicensesIds": [
    "fedcba"
  ]
}

Errors

Returns a 400 error when there is something wrong in the provided JSON.


Publishers

GET publishers

Returns a list of publishers, filtered by the organization of the requesting user. The results of publishers are paginated.

Example

GET https://api.schooltas.net/v1/publishers

Result

{
  "publishers": [
    {
      "id": "ed025b50-839f-4434-ba85-56282222442b",
      "name": "Thieme Meulenhoff",
      "roles": [
        {
          "id": "3b06fbc5-7bff-4e91-866c-71d7bb373130"
          "name": "Editor"
        }
      ]
    }
  ],
  "paging": {
    "nextCursor": "E-ABAIICGWoJYXBwZW5naW5lcgwLEgVUQm9vaxjIAQwU"
  }
}

GET publishers/:id

Return details of a publisher. You're only allowed to view publishers if you are the owner of the publisher.

Parameters

Name Type Description
id string Required. The id of the publisher.

Example

GET https://api.schooltas.net/v1/publishers/0bd56810-5aa2-4f17-92f4-80493dc714e1

Result

{
  "id": "0bd56810-5aa2-4f17-92f4-80493dc714e1",
  "name": "Thieme Meulenhoff",
  "roles": [
    {
      "id": "b109fb2a-e70b-4b40-a4c0-cd048f90c805"
      "name": "Editor"
    }
  ]
}

Errors

Returns a 404 error when there's no publisher with the given id.
Returns a 403 when you're not allowed to view details of the publisher.


POST publishers

Create a new publisher. Send JSON in the body with the following fields. You can only create a publisher if you are connected to a distributor. The distributor you are connected to will become the owner of the created publisher.

Fields

Name Type Description
name string Required. The name of the publisher. Max 50 characters.

Example

POST https://api.schooltas.net/v1/publishers

{
  "name": "Hueber",
}

Result

The call returns a 200 with the changed publisher if all went well.

{
  "id": "a761a32f-3773-48b3-8653-07fced729e37",
  "name": "Heuber",
  "roles": [
    {
      "id": "70584072-6536-43a1-9a3b-5cf529e9d496"
      "name": "Editor"
    }
  ]
}

Errors

Returns a 400 error when you're name of the publisher already exists.


PUT publishers/:id

Update details for the publisher of the given id. Send JSON in the body with the following fields.

Fields

Name Type Description
name string Required. The name of the publisher. Max 50 characters.

Example

PUT https://api.schooltas.net/v1/publishers/a761a32f-3773-48b3-8653-07fced729e37

{
  "name": "Hueber",
}

Result

The call returns a 200 with the changed publisher if all went well.

{
  "id": "a761a32f-3773-48b3-8653-07fced729e37",
  "name": "Hueber",
  "roles": [
    {
      "id": "70584072-6536-43a1-9a3b-5cf529e9d496"
      "name": "Editor"
    }
  ]
}

Errors

Returns a 400 error when you're name of the publisher already exists.
Returns a 403 error when you're not allowed to change this publisher.
Returns a 404 error when there's no publisher with the given id.


Readers

GET readers

Returns a list of readers that are created by the organization of the requesting user. The results of readers are paginated.

Parameters

Name Type Description
language string Required. An uppercase language code which is used to display subjects and types of the readers. Currently the following values are supported: DE, EN, ES, FR, IT, NL, PT, RU

Example

GET https://api.schooltas.net/v1/readers?language=NL

Result

{
  "readers":
    [
      {
        "id": "6c4cb3ae-3743-4722-80f7-0f863a765e18",
        "ean": "9870123456789",
        "title": "test reader 1",
        "subject": {
          "id": "70584072-6536-43a1-9a3b-5cf529e9d496",
          "translatedName": "Aardrijkskunde"
        },
        "organization": {
          "id": "6hu7b3ae-3743-4722-80f7-0f863a765e18",
          "type": "School"
        },
        "coverUrl": "production-applicationstack-x2l8-pdfcontentbucket-8lgvyehv6f1g/organization-data/publisher/d121ac6b-0d9d-4568-9909-b35803d1be12/image/jpeg2000-home_f966da65-8a81-4413-9355-266c3a6a74b9.jpg",
        "pdfUrl": null,
        "type": {
          "name": "TeacherMaterial",
          "translatedName": "teacher material"
        },
        "active": false,
    	"tableOfContents": null,
    	"pdfDownloadable": true
      }
    ],
    "paging": {
      "nextCursor": "E-ABAIICGWoJYXBwZW5naW5lcgwLEgVUQm9vaxjIAQwU"
    }
  }

When the organization doesn't have any readers the readers array will just be empty.

Errors

Returns a 400 error when the type or language is not valid.
Returns a 403 when you're not allowed to view readers.


GET readers/:id

Return details of a reader. You're only allowed to view readers of your own organization.

Parameters

Name Type Description
id string Required. The id of the reader.
language string Required. An uppercase language code which is used to display the subject and type of the reader. Currently the following values are supported: DE, EN, ES, FR, IT, NL, PT, RU

Example

GET https://api.schooltas.net/v1/readers/6c4cb3ae-3743-4722-80f7-0f863a765e18?language=NL

Result


  {
    "id": "6c4cb3ae-3743-4722-80f7-0f863a765e18",
    "ean": "9870123456789",
    "title": "Test reader 1",
    "subject": {
      "id": "ae0a8a6c-b623-4919-9537-a2df4545b273",
      "translatedName": "Aardrijkskunde"
    },
    "organization": {
      "id": "6hu7b3ae-3743-4722-80f7-0f863a765456",
      "type": "Distributor"
    },
    "coverUrl": "production-applicationstack-x2l8-pdfcontentbucket-8lgvyehv6f1g/organization-data/publisher/d121ac6b-0d9d-4568-9909-b35803d1be12/image/jpeg2000-home_f966da65-8a81-4413-9355-266c3a6a74b9.jpg",
    "pdfUrl": null,
    "type": {
      "name": "TeacherMaterial",
      "translatedName": "teacher material"
    }
    "active": true,
    "settings": {
        "indexPageNumber": 0,
        "pageNumberOffset": 1
    },
    "tableOfContents": null,
    "pdfDownloadable": true
  }

The active flag is true if the reader is enabled, has uploads (cover and PDF) available and has an encrypted PDF ready.

Errors

Returns a 403 when you're not allowed to view details of the reader.
Returns a 404 error when there's no reader with the given id.


GET readers/:id/editor

Returns the url that is used to redirect the user to the editor.
This endpoint should be used in the following work flow:

  1. User sees list of readers (or a single reader)
  2. User clicks on "edit" link, linking to your server
  3. This endpoint gets called, which returns the correct editor url
  4. The user gets redirected to the returned url
Be aware that the returned url should be used within 1 minute.

Parameters

Name Type Description
id string Required. The id of the reader.
language string Required. An uppercase language code which is used to display the subject and type of the reader. Currently the following values are supported: DE, EN, ES, FR, IT, NL, PT, RU

Example

GET https://api.schooltas.net/v1/readers/edbf6b99-ef35-4416-a54f-6dbeb1b42956/editor?language=EN

Result

{
"url": "https://mijn.schooltas.net/book-editor?publisher=true&edit=true&token=fc2bc0d7-e490-4377-879a-a228b0542ae9&language=EN#edbf6b99-ef35-4416-a54f-6dbeb1b42956"
}

Errors

Returns a 403 when you're not allowed to view details of the reader.
Returns a 404 error when there's no reader with the given id.


POST readers

Create a new reader. This call includes directly uploading a PDF document into the system.

Fields

Name Type Description
title string Required. The title of the reader.
subject string Required. The ID of the subject of the reader (see GET subjects for more info).
pdfFile PDF file Required. The PDF file that will be uploaded and assigned to the newly created reader. This field is required.
language string Required. An uppercase language code used to display the subject and type. Currently the following values are supported: DE, EN, ES, FR, IT, NL, PT, RU
pdfDownloadable string Set this field to "true" in order to let the users download the PDF file associated with this reader.
settings.pageNumberOffset number Integer, controls on what page the page numbering should start
settings.indexPageNumber number Integer that specifies on what page the index starts
organization.id string The id of the organization that this reader will belong to. If this field is left blank, the organization will be the one of the creator account. This field is optional.
organization.type string The type of the organization that this reader will belong to. If this field is left blank, the organization will be the one of the creator account. This field is optional.

Example

POST https://api.schooltas.net/v1/readers?language=EN
  This call uses a form-data HTTP-request

Result


  {
    "id": "cf645c61-237a-47d4-9974-e7cbfb997048",
    "ean": "Reader0ab796e",
    "title": "Awesome reader",
    "subject": {
        "id": "4d2cf29e-07f4-4b80-9f49-7869b8f693cc",
        "translatedName": "Sociology"
    },
    "organization": {
      "id": "ae0a8a6c-b623-4919-9537-a2df4545b273",
      "type": "School"
    },
    "coverUrl": "production-applicationstack-x2l8-pdfcontentbucket-8lgvyehv6f1g/organization-data/publisher/d121ac6b-0d9d-4568-9909-b35803d1be12/image/jpeg2000-home_f966da65-8a81-4413-9355-266c3a6a74b9.jpg",
    "pdfUrl": "production-applicationstack-x2l8-pdfcontentbucket-8lgvyehv6f1g/organization-data/publisher/d121ac6b-0d9d-4568-9909-b35803d1be12/document/0000042424201_pdf_9bd58f4a-633e-491b-993b-fbac9e2c5c7e.pdf",
    "type": {
      "name": "TeacherMaterial",
      "translatedName": "teacher material"
    },
    "active": true,
    "settings": {
        "indexPageNumber": 0,
        "pageNumberOffset": 1
    },
    "tableOfContents": null,
    "pdfDownloadable": false
  }

Errors

Returns a 400 when required data is missing or when the maximum 150 MB file size is exceeded.
Returns a 403 when you're not allowed to create a reader for the given organization.


PUT readers

Create a new reader. This call can only be used after uploading a PDF document using the POST Files service.

Fields

Name Type Description
title string Required. The title of the reader.
subject string Required. The ID of the subject of the reader (see GET subjects for more info).
fileId string Required. The file id reference to an uploaded PDF-document using POST Files service.
language string Required. An uppercase language code used to display the subject and type. Currently the following values are supported: DE, EN, ES, FR, IT, NL, PT, RU
pdfDownloadable string Set this field to "true" in order to let the users download the PDF file associated with this reader.
settings object An object containing settings of a book.
pageNumberOffsetInteger, controls on what page the page numbering should start
indexPageNumberInteger that specifies on what page the index starts

Example

PUT https://api.schooltas.net/v1/readers?language=EN

{
  {
    "title": "Awesome reader",
    "subject": "0e770cd4-a5d5-471e-a2fb-7b43c144bed8",
    "fileId": "7654f337-0b83-4f0b-bbf7-75996111447a",
    "settings": {
      "pageNumberOffset": 3,
      "indexPageNumber": 2
    },
    "pdfDownloadable": true
  }

Result


  {
    "id": "96a9a52b-5998-42c1-9612-5f5ea62b6855",
    "ean": "Reader85216c1",
    "title": "Awesome reader",
    "subject": {
      "id": "0e770cd4-a5d5-471e-a2fb-7b43c144bed8",
      "translatedName": "History"
    },
    "organization": {
      "id": "45e092fa-af31-4537-bb2d-91496b67e39b",
      "type": "School"
    },
    "coverUrl": "production-applicationstack-x2l8-pdfcontentbucket-8lgvyehv6f1g/organization-data/publisher/d121ac6b-0d9d-4568-9909-b35803d1be12/image/jpeg2000-home_f966da65-8a81-4413-9355-266c3a6a74b9.jpg",
    "pdfUrl": null,
    "type": {
      "name": "TeacherMaterial",
      "translatedName": "teacher material"
    },
    "active": true,
    "settings": {
      "pageNumberOffset": 3,
      "indexPageNumber": 2
    },
    "tableOfContents": null,
    "pdfDownloadable": true
  }

Errors

Returns a 400 when required data is missing.
Returns a 403 when you're not allowed to create a reader for the given organization.


PUT readers/:id

Updates a reader.

Fields

Name Type Description
title string Required. The title of the reader.
subject string Required. The ID of the subject of the reader (see GET subjects for more info).
fileId string (Optional) The file id reference to an uploaded PDF-document using POST Files service.
language string Required. An uppercase language code used to display the subject and type. Currently the following values are supported: DE, EN, ES, FR, IT, NL, PT, RU
pdfDownloadable string (Optional) Set this field to "true" in order to let the users download the PDF file associated with this reader.
settings object An object containing settings of a book.
pageNumberOffsetInteger, controls on what page the page numbering should start
indexPageNumber Integer that specifies on what page the index starts

Example

PUT https://api.schooltas.net/v1/readers/96a9a52b-5998-42c1-9612-5f5ea62b6855?language=EN

  {
    "title": "Awesome reader",
    "subject": "0e770cd4-a5d5-471e-a2fb-7b43c144bed8",
    "fileId": "7654f337-0b83-4f0b-bbf7-75996111447a",
    "settings": {
      "pageNumberOffset": 3,
      "indexPageNumber": 1
    },
    "pdfDownloadable": true
  }

Result


  {
    "id": "96a9a52b-5998-42c1-9612-5f5ea62b6855",
    "ean": "Reader85216c1",
    "title": "Awesome reader",
    "subject": {
      "id": "0e770cd4-a5d5-471e-a2fb-7b43c144bed8",
      "translatedName": "History"
    },
    "organization": {
      "id": "e4bb664b-2b48-4b16-a61a-274ce9383492",
      "type": "School"
    },
    "coverUrl": "production-applicationstack-x2l8-pdfcontentbucket-8lgvyehv6f1g/organization-data/publisher/d121ac6b-0d9d-4568-9909-b35803d1be12/image/jpeg2000-home_f966da65-8a81-4413-9355-266c3a6a74b9.jpg",
    "pdfUrl": null,
    "type": {
      "name": "TeacherMaterial",
      "translatedName": "teacher material"
    },
    "active": true,
    "settings": {
      "pageNumberOffset": 3,
      "indexPageNumber": 1
    },
    "tableOfContents": null,
    "pdfDownloadable": true
  }

Errors

Returns a 400 when required data is missing.
Returns a 403 when you're not allowed to create a reader for the given organization.


Roles

GET roles

Returns a list of roles, filtered by organization. You need to select an organization by providing the id and type. You're only allowed to view roles if the organization is the same as yours, or the owner is the same as your organization.

Parameters

Name Type Description
organization string Required. The id of the organization.
type string Required. The type of the organization. This can be either School, Publisher or Distributor

Example

GET https://api.schooltas.net/v1/roles?organization=ae0a8a6c-b623-4919-9537-a2df4545b273&type=Distributor

Result

{
  "roles": [
    {
      "id": "b42f54da-d941-4388-b3b4-4bbc0ed4037a",
      "name": "Distributor Admin",
      "permissions": [
        {
          "resource": "Book"
          "operation": "Create"
        },
        {
          "resource": "Book"
          "operation": "Update"
        }
      ]
    }
  ]
}

Errors

Returns a 400 error when the type is not valid.
Returns a 403 when you're not allowed to view roles of the given organization.


Schools

GET schools

Returns a list of schools, filtered by the organization of the requesting user. The results of schools are paginated.

Example

GET https://api.schooltas.net/v1/schools

Result

{
  "schools": [
    {
      "id": "0b1a1dfc-d0a0-4559-8271-5a7f98a7b15f",
      "name": "Johannes Fontanus College",
      "country": "NL",
      "city": "Barneveld",
      "roles": [
        {
          "id": "b42f54da-d941-4388-b3b4-4bbc0ed4037a",
          "name": "Teacher"
        }
      ]
    }
  ],
  "paging": {
    "nextCursor": "E-ABAIICGWoJYXBwZW5naW5lcgwLEgVUQm9vaxjIAQwU"
  }
}

GET schools/:id

Return details of a school. You're only allowed to view schools if you are the owner of the school.

Parameters

Name Type Description
id string Required. The id of the school.

Example

GET https://api.schooltas.net/v1/schools/0b1a1dfc-d0a0-4559-8271-5a7f98a7b15f

Result

{
  "id": "0b1a1dfc-d0a0-4559-8271-5a7f98a7b15f",
  "name": "Johannes Fontanus College",
  "country": "NL",
  "city": "Barneveld",
  "roles": [
    {
      "id": "b42f54da-d941-4388-b3b4-4bbc0ed4037a",
      "name": "Teacher"
    }
  ]
}

Errors

Returns a 404 error when there's no school with the given id.
Returns a 403 when you're not allowed to view details of the school.


GET schools/:id/classes

Return all classes that belong to the specific school. You're only allowed to view schools classes if you are the owner of the school.

Parameters

Name Type Description
id string Required. The id of the school.

Example

GET https://api.schooltas.net/v1/schools/0b1a1dfc-d0a0-4559-8271-5a7f98a7b15f/classes

Result

The call returns a 200 with a list of classes that belong to that specific school.

deactivationDate field is null if the class is still active, or has a valid date if the class was deactivated.


   [
       {
        "classId": "c550c7ce-cef6-4792-ae3a-d9f157b44c9d",
        "className": "Example class",
        "classCode": "wfykqx",
        "subjectId": "5494e27b-c520-485d-8ddb-39a4e23a586a",
        "schoolId": "3ad35475-f72f-48de-804c-2d5138378bf0",
        "creationDate": "2018-01-31T09:59:31.775",
        "deactivationDate": null,
        "usersInClass": [
            	"b218f20f-eada-4f43-b0ec-ef59bb79cb22"
        	]
    	}
    ]

Errors

Returns a 404 error when there's no school with the given id.
Returns a 403 when you're not allowed to view the classes of the school.


POST schools

Create a new school. Send JSON in the body with the following fields. You can only create a school if you are connected to a distributor. The distributor you are connected to will become the owner of the created school.

Fields

Name Type Description
name string Required. The name of the school. Max 50 characters.
country string Required. Country code following the ISO 3166-1 alpha-2 standard.
city string Required. The name of the city.

Example

POST https://api.schooltas.net/v1/schools

{
  "name": "Prins Willem Alaxenderschool",
  "country": "NL",
  "city": "Amersfoort"
}

Result

The call returns a 200 with the changed school if all went well.

{
  "id": "7f008f6f-4670-4bf2-a07a-56f4430d168f",
  "name": "Prins Willem Alaxenderschool",
  "country": "NL",
  "city": "Amersfoort",
  "roles": [
    {
      "id": "a3c568bb-44c0-4dbc-b654-3b8c032427db"
      "name": "Teacher"
    }
  ]
}

Errors

Returns a 400 error when the name of the school already exists.


PUT schools/:id

Update details for the school of the given id. Send JSON in the body with the following fields.

Fields

Name Type Description
name string Required. The name of the school. Max 50 characters.
country string Required. Country code following the ISO 3166-1 alpha-2 standard.
city string Required. The name of the city.

Example

PUT https://api.schooltas.net/v1/schools/7f008f6f-4670-4bf2-a07a-56f4430d168f

{
  "name": "Prins Willem Alaxenderschool",
  "country": "NL",
  "city": "Barneveld"
}

Result

The call returns a 200 with the changed school if all went well.

{
  "id": "7f008f6f-4670-4bf2-a07a-56f4430d168f",
  "name": "Prins Willem Alaxenderschool",
  "country": "NL",
  "city": "Barneveld",
  "roles": [
    {
      "id": "a3c568bb-44c0-4dbc-b654-3b8c032427db"
      "name": "Teacher"
    }
  ]
}

Errors

Returns a 400 error when you're name of the school already exists.
Returns a 403 error when you're not allowed to change this school.
Returns a 404 error when there's no school with the given id.


Subscriptions


GET subscriptions

Return list of subscriptions. You're only allowed to view subscriptions of your own organization. The results of subscriptions are paginated.

Example

GET https://api.schooltas.net/v1/subscriptions

Result

{
  subscriptions: [
    {
      "id": "9afbc26a-2282-4840-90f5-8670c77d72ff",
      "code": "gwjjaa",
      "maximumActivations": 3,
      "numberOfActivations": 1,
      "expirationDate": "2016-11-04"
    }
  ],
  "paging": {
  	"nextCursor": "b3JnYW5pemF0aW9uSWQ6KFNUUklORzphZTBhOGE2Yy1iNjIzLTQ5MTktOTUzNy1hMmRmNDU0NWIyNzMpO2lkOihTVFJJTkc6NWE0NzA1ZGMtZDY0ZC00MjlmLThiODUtMzc1Yjg5Y2ZhMjgwKTtjcmVhdGVkT246KFNUUklORzoyMDE2LTA4LTI2VDE0OjIzOjQ3LjY3Nlop"
  }
}

Errors

Returns a 403 when you're not allowed to view details of the subscriptions.


GET subscriptions/:id

Returns a subscription. You're only allowed to view subscriptions of your own organization.

Parameters

Name Type Description
id string Required. The id of the subscription.

Example

GET https://api.schooltas.net/v1/subscriptions/9afbc26a-2282-4840-90f5-8670c77d72ff

Result

{
  "id": "9afbc26a-2282-4840-90f5-8670c77d72ff",
  "code": "gwjjaa",
  "maximumActivations": 3,
  "numberOfActivations": 1,
  "expirationDate": "2018-11-04"
}

Errors

Returns a 403 when you're not allowed to view details of the subscriptions.
Returns a 404 when the subscription is not found.


POST subscriptions

Create a new subscription.

Fields

Name Type Description
maximumActivations number Required. The maximum number of users that can use this subscription simultaneously. This must be equal or greater than 1.
expirationDate string Required. This determines until which date the license is valid. Format for date is yyyy-MM-dd. This date must be in the future.
organization.id string The id of the organization that this subscription will belong to. If this field is left blank, the organization will be the one of the creator account. This field is optional.
organization.type string The type of the organization that this subscription will belong to. If this field is left blank, the organization will be the one of the creator account. This field is optional.

Example

POST https://api.schooltas.net/v1/subscriptions
        
{
  "maximumActivations": 3,
  "expirationDate": "2016-11-04",
  "organization": {
      "id": "d121ac6b-0d9d-4568-9909-b35803d1be12",
      "type": "Publisher"
  }
}

Result

{
  "id": "00c4ba64-3f1e-432c-8477-7bfe29dcc0d8",
  "code": "patsyd",
  "maximumActivations": 3,
  "numberOfActivations": 0,
  "expirationDate": "2016-11-04",
  "organization": {
      "id": "d121ac6b-0d9d-4568-9909-b35803d1be12",
      "type": "Publisher"
  }
}

Errors

Returns a 400 when required data is missing.
Returns a 403 when you're not allowed to create a subscription for the current organization.


PUT subscriptions/:id

Update a subscription.

Fields

Name Type Description
maximumActivations number Required. The maximum number of users that can use this subscription simultaneously. Must be less than the current numberOfActivations.

Example

PUT https://api.schooltas.net/v1/subscriptions/00c4ba64-3f1e-432c-8477-7bfe29dcc0d8

{
  "maximumActivations": 10
}

Result

{
  "id": "00c4ba64-3f1e-432c-8477-7bfe29dcc0d8",
  "code": "patsyd",
  "maximumActivations": 10,
  "numberOfActivations": 0,
  "expirationDate": "2016-11-04"
}

Errors

Returns a 400 error when the maximumActivations is not valid.
Returns a 403 error when you're not allowed to change this subscription.
Returns a 404 error when there's no subscription with the given id.


PUT /subscriptions/assignSubscription

Assign a subscription to an end user.

Fields

Name Type Description
userId string Required. The id of the end user to whom the subscription will be assigned.
subscriptionId string Required. The id of the subscription which will be assigned to the end user.

Example

PUT https://api.schooltas.net/v1/subscriptions/assignSubscription

{
  "userId": "9a3dd297-fdcb-482b-a046-3563e1354c1b",
  "subscriptionId": "00c4ba64-3f1e-432c-8477-7bfe29dcc0d8"
}

Result

The call returns a 200 with the updated subscription if all went well.

{
  "user": {
    "id": "9a3dd297-fdcb-482b-a046-3563e1354c1b",
    "email": "john.smith@mail.com",
    "firstName": "John",
    "lastName": "Smith",
    "language": "EN"
  },
  "activatedSubscriptionIds": [
    "fedcba"
  ]
}

Errors

Returns a 400 error when there is something wrong in the provided JSON.

Users

GET users

Returns a list of users, filtered by organization. You need to select an organization by providing the id and type. You're only allowed to view users if their organization is the same as yours, or their owner is the same as your organization. The results of users are paginated.

Parameters

Name Type Description
organization string Required. The id of the organization.
type string Required. The type of the organization. This can be either School, Publisher or Distributor

Example

GET https://api.schooltas.net/v1/users?organization=53b6cff9-c101-4528-89bb-c1da4867cc4c&type=Publisher

Result

{
  "users": [
  {
        "id": "122b6a63-c076-4221-9a92-b36cafc5c2c6",
        "email": "m.luijks@thiememeulenhoff.nl",
        "firstName": "Martijn",
        "lastName": "Luijks",
        "language": "NL",
        "avatarUrl": "production-applicationstack-x2l8-pdfcontentbucket-8lgvyehv6f1g/user-data/122b6a63-c076-4221-9a92-b36cafc5c2c6/avatars/avatar.jpg",
        "organization": {
            "id": "53b6cff9-c101-4528-89bb-c1da4867cc4c",
            "type": "Publisher"
        },
        "roles": [
            {
                "id": "a6d05ab7-a09a-43dc-8dc1-1b19e47cdb64",
                "name": "Creator"
            },
            {
                "id": "2170f39d-608a-4987-921e-a58b35758c18",
                "name": "Salesman"
            },
            {
                "id": "6efc287e-532c-4747-94eb-def1293d9b20",
                "name": "Licenser"
            }
        ]
    }
  ],
  "paging": {
    "nextCursor": "b3JnYW5pemF0aW9uSWQ6KFNUUklORzo1M2I2Y2ZmOS1jMTAxLTQ1MjgtODliYi1jMWRhNDg2N2NjNGMpO2lkOihTVFJJTkc6YzY5NzFiMjEtNDNiNy00ZjZlLTg2MGUtYzc3NjlkODE5ZGEzKTtjcmVhdGlvbkRhdGU6KFNUUklORzoyMDExLTA5LTI5VDAxOjI4OjE5LjAwMFop"
  }
}

Errors

Returns a 400 error when the type is not valid.
Returns a 403 when you're not allowed to view users of the given organization.


GET users/:id

Return details of a user. You're only allowed to view users if their organization is the same as yours, or their owner is the same as your organization.

Parameters

Name Type Description
id string Required. The id of the user.

Example

GET https://api.schooltas.net/v1/users/122b6a63-c076-4221-9a92-b36cafc5c2c6

Result

{
    "id": "122b6a63-c076-4221-9a92-b36cafc5c2c6",
    "email": "m.luijks@thiememeulenhoff.nl",
    "firstName": "Martijn",
    "lastName": "Luijks",
    "language": "NL",
    "avatarUrl": "production-applicationstack-x2l8-pdfcontentbucket-8lgvyehv6f1g/user-data/122b6a63-c076-4221-9a92-b36cafc5c2c6/avatars/avatar.jpg",
    "organization": {
        "id": "53b6cff9-c101-4528-89bb-c1da4867cc4c",
        "type": "Publisher"
    },
    "roles": [
        {
            "id": "a6d05ab7-a09a-43dc-8dc1-1b19e47cdb64",
            "name": "Creator"
        },
        {
            "id": "2170f39d-608a-4987-921e-a58b35758c18",
            "name": "Salesman"
        },
        {
            "id": "6efc287e-532c-4747-94eb-def1293d9b20",
            "name": "Licenser"
        }
    ]
}
 

Errors

Returns a 404 error when there's no user with the given id.
Returns a 403 when you're not allowed to view details of the user.


GET /users/userId/:email

Get the user id by sending the e-mail.

Parameters

Name Type Description
email string Required. The e-mail of the user.

Example

GET https://api.schooltas.net/v1/users/userId/john.smith@email.com

Result

userId

Returns a 404 error when there's no user with the given email.


POST users

Create a new user. The user will receive an email with a random password. Send JSON in the body with the following fields. All fields are required.

Fields

Name Type Description
firstName string Required. The first name of the user. Max 50 characters.
lastName string Required. The last name of the user. Max 50 characters.
email string Required. The email of the user.
language string Required. An uppercase language code which is also used for sending out the registration email. Currently the following values are supported: DE, EN, ES, FR, IT, NL, PT, RU
organization object Required. An organization has an id and a type. The type needs to be either School, Publisher or Distributor. You need to have the same organization as what you're setting this user to, or the organization's owner needs to be the same as your organization.
roles [string] Required. A set of role ids which should be assigned to this user. The field itself is required, but the value can be an empty array if you want to assign no roles to the user.

Example

POST https://api.schooltas.net/v1/users

{
  "firstName": "Miepje",
  "lastName": "Van Schooltas",
  "email": "miepje@schooltas.net",
  "language": "NL",
  "organization": {
    "id": "6efc287e-532c-4747-94eb-def1293d9b20",
    "type": "Distributor"
  },
  "roles": ["122b6a63-c076-4221-9a92-b36cafc5c2c6"]
}

Result

The call returns a 200 with the new user if all went well.

{
  "id": "ecae46d2-7ff8-4676-ab4c-9c20a205f108",
  "email": "miepje@schooltas.net",
  "firstName": "Miepje",
  "lastName": "Van Schooltas",
  "language": "NL",
  "avatarUrl": null,
  "organization": {
    "id": "6efc287e-532c-4747-94eb-def1293d9b20",
    "type": "Distributor"
  },
  "roles": [
    {
      "id": "122b6a63-c076-4221-9a92-b36cafc5c2c6",
      "name": "Distributor Admin"
    }
  ]
}

Errors

Returns a 400 error when the input parameters are not valid.
Returns a 403 error when you're not allowed to set the user to the given organization.


POST users/enduser

Create a new end user. The user will receive an email with a random password. Send JSON in the body with the following fields. All fields are required.

Fields

Name Type Description
firstName string Required. The first name of the user. Max 50 characters.
lastName string Required. The last name of the user. Max 50 characters.
email string Required. The email of the user.
language string Required. An uppercase language code which is also used for sending out the registration email. Currently the following values are supported: DE, EN, ES, FR, IT, NL, PT, RU

Example

POST https://api.schooltas.net/v1/users/enduser

{
  "firstName": "Miepje",
  "lastName": "Van Schooltas",
  "email": "miepje@schooltas.net",
  "language": "NL"
}

Result

The call returns a 200 with the new user if all went well.

{
  "id": "c7616c15-e0be-4790-8b19-5b99cc1bd587",
  "email": "miepje@schooltas.net",
  "firstName": "Miepje",
  "lastName": "Van Schooltas",
  "language": "NL"
}

Note that the email address will be null as long as the user is not verified yet.

Errors

Returns a 400 error when the input parameters are not valid.


PUT users/:id

Update details for the user of the given id. Send JSON in the body with the following fields. All fields are required.

Fields

Name Type Description
firstName string Required. The new first name of the user. Max 50 characters.
lastName string Required. The new last name of the user. Max 50 characters.
organization object Required. An organization has an id and a type. The type needs to be either School, Publisher or Distributor. You need to have the same organization as what you're setting this user to, or the organization's owner needs to be the same as your organization.
roles [string] Required. A set of role ids which should be assigned to this user. The field itself is required, but the value can be an empty array if you want to assign no roles to the user. Note that these roles will overwrite all existing roles for the user.

Example

PUT https://api.schooltas.net/v1/users/9a3dd297-fdcb-482b-a046-3563e1354c1b

{
  "firstName": "Miepje",
  "lastName": "Van Schooltas",
  "organization": {
    "id": "6efc287e-532c-4747-94eb-def1293d9b20",
    "type": "Distributor"
  },
  "roles": ["122b6a63-c076-4221-9a92-b36cafc5c2c6"]
}

Result

The call returns a 200 with the changed user if all went well.

{
  "id": "9a3dd297-fdcb-482b-a046-3563e1354c1b",
  "email": "miepje@schooltas.net",
  "firstName": "Miepje",
  "lastName": "Van Schooltas",
  "language": "NL",
  "avatarUrl": "production-applicationstack-x2l8-pdfcontentbucket-8lgvyehv6f1g/user-data/122b6a63-c076-4221-9a92-b36cafc5c2c6/avatars/avatar.jpg",
  "organization": {
    "id": "6efc287e-532c-4747-94eb-def1293d9b20",
    "type": "Distributor"
  },
  "roles": [
    {
      "id": "122b6a63-c076-4221-9a92-b36cafc5c2c6",
      "name": "Distributor Admin"
    }
  ]
}

Errors

Returns a 400 error when the type is not valid.
Returns a 403 error when you're not allowed to change this user, or when you're not allowed to change the user to the give organization.
Returns a 404 error when there's no user with the given id or when the given organization was not found.



PUT users/enduser/:id

Update details for the end user of the given id. Send JSON in the body with the following fields. All fields are required.

Fields

Name Type Description
firstName string Required. The new first name of the user. Max 50 characters.
lastName string Required. The new last name of the user. Max 50 characters.

Example

PUT https://api.schooltas.net/v1/users/enduser/9a3dd297-fdcb-482b-a046-3563e1354c1b

{
  "firstName": "Miepje",
  "lastName": "Van Schooltas"
}

Result

The call returns a 200 with the changed end user if all went well.

{
  "id": "9a3dd297-fdcb-482b-a046-3563e1354c1b",
  "email": "miepje@schooltas.net",
  "firstName": "Miepje",
  "lastName": "Van Schooltas",
  "language": "NL",
  "avatarUrl": "production-applicationstack-x2l8-pdfcontentbucket-8lgvyehv6f1g/user-data/122b6a63-c076-4221-9a92-b36cafc5c2c6/avatars/avatar.jpg"
}

Errors

Returns a 404 error when there's no user with the given id.



PUT users/:id/anonymize

Anonymize the user with the given id.

Parameters

Name Type Description
id string Required. The id of the user to be anonymized.

Example

PUT https://api.schooltas.net/v1/users/9a3dd297-fdcb-482b-a046-3563e1354c1b/anonymize

Result

The call returns a 200 if all went well and the user is now anonymized.

Errors

Returns a 403 error when you're not allowed to change this user, or when you're not allowed to change the user to the give organization.
Returns a 404 error when there's no user with the given id or when the given organization was not found.



GET users/checkModified

Retrieve a list of IDs for the users who have been modified on the specified date. This call will only return modifications in users your organisation has created.

Parameters

Name Type Description
dateToCheck string Optional. The date to check for modified users. Must be in the form of 'yyyy-MM-dd'. If not provided, the default value is yesterday.

Example

GET https://api.schooltas.net/v1/users/checkModified

Result

The call returns a list with the IDs of the modified users, empty if no user was modified.



GET users/:id/modifications

Get all the modifications made to the user, on the specified date.

Parameters

Name Type Description
id string Required. The id of the user.
dateToCheck string Optional. The date to check for the user's modifications. Must be in the form of 'yyyy-MM-dd'. If not provided, the default value is yesterday.

Example

GET https://api.schooltas.net/v1/users/9a3dd297-fdcb-482b-a046-3563e1354c1b/modifications

Result

The call returns a list with the modifications for the specified user, empty if no modifications found.



GET users/:id/lastlogin

Get the last login date (iPad, web, overall) for a specific user. This call will only return the last login information for a user your organisation has created.

Parameters

Name Type Description
id string Required. The id of the user.

Example

GET https://api.schooltas.net/v1/users/9a3dd297-fdcb-482b-a046-3563e1354c1b/lastlogin

Result

The call returns the last login information for the specified user, empty if no modifications found.