Promo codes (Lära)

TABLE OF CONTENTS
Promocode/get
Promocode/getlist
Promocode/create
Promocode/getlist
Promocode/edit
Promocode/delete
Promocode/adduser
Promocode/removeuser
Promocode/getuserlist
Promocode/addbranch
Promocode/removebranch
Promocode/getbranchlist
Promocode/addgroup
Promocode/removegroup
Promocode/getgrouplist
Promocode/addworkspace
Promocode/addworkspaces
Promocode/removeworkspace
Promocode/getworkspacelist
Promocode/addworkspaceinstance
Promocode/addworkspaceinstances
Promocode/removeworkspaceinstance
Promocode/getworkspaceinstancelist
Promo code error code descriptions 

Promo codes

« Promo codes » are a component used to grant a discount that applies in the shopping cart for certain users, certain training items or programs, or for everyone. They are named « promocode » in the API.

Promocode/get

Retrieves information about a promo code in your environment.
API call address : https://.../lmsapi/promocode/get

Request

Example of request call content for information on a promo code:

{
"id": "7IoopVM73nHZMhUaQ3JvWw%3d%3d"
}

Field descriptions

Name

Required

Comments/description

idX

Unique identifier of the promo code.
(String type)

Response

Example of the response call content for an information request on a promo code:

{
    "id": "kCAPmac05pz%2fsme3uMhUcA%3d%3d",
    "clientId": 123,
    "name": "code promotionnel d'ouverture",
    "code": "s7ztbeh1g0",
    "price": 15.0,
    "type": 0,
    "uses": -1,
    "startDate": "2020-01-01T00:00:00",
    "endDate": "2020-01-31T00:00:00",
    "minPrice": 0.0,
    "status": 0,
    "canBeCombined": false,
    "isShownInCatalog": false,
    "isVisibleForUsers": true,
    "creationDate": "2019-09-13T17:37:05.103",
    "daysApplicableBeforeStart": 0,
    "precision": {
        "texts": [],
        "ErrorID": 0
    },
    "description": {
        "texts": [
            {
                "text": "<div style=\"display: flex;align-items: center;color: #007E02;background-color: #DFF0D8;border-radius: 4px;width: 100%;word-break: break-word;\"><div class=\"icon icon-price-tag larger fr-fil fr-dib\" style=\"margin: 0px 5px;\"></div><p style=\"font-weight: bold; margin: 0;\"><strong>Applicable rebate</strong></p></div>",
                "languageId": 2
            }
        ],
        "ErrorID": 0
    }
}

Field descriptions

Name 

Required

Comments/description

id
Unique identifier of the promo code.
(String type)
clientId
Unique identifier of your organization on the SVIeSolutions server.
name
Name of the promo code.
(String type)
code
Character string of the promo code that will be used by the users.
(String type)
price

Amount of the discount granted by the promo code (based on the "type" field). 

(Number type)

type
Unit of measure of the promo code.
  • 0 = Percentage
  • 1 = Currency or fixed amount

(Number type)

uses
Maximum number of uses of the promo code.
(Number type)
startDate
Start date for use of the promo code. The code cannot be used before this date.

(Date type YYYY-MM-DDTHH:MM:SSZ)

endDate
End date for use of the promo code. The code cannot be used after this date.

(Date type YYYY-MM-DDTHH:MM:SSZ)

minPrice
Minimum transaction price for use of the promo code. Below this price, the code cannot be used.
(Number type)
status
Indicates whether the promo code is enabled. If inactive, the promo code cannot be used.
  • 0 = Active 
  • 1 = Inactive

(Number type)

canBeCombined
Indicates whether the promo code can be used at the same time as one or more other promo codes sharing this characteristic.
(Boolean type)
isShownInCatalog
Indicates whether the promo code will be visible in the catalogue to eligible users and whether it will be applied automatically to their cart. This feature can only be enabled if "canBeCombined" is set to "true".
(Boolean type)
isVisibleForUsers
Indicates whether the promo code will be displayed in the list of promo codes available to the user, in their file and in the shopping cart.
(Boolean type)
creationDate
Indicates the creation date of the promo code.

(Date type YYYY-MM-DDTHH:MM:SSZ)

daysApplicableBeforeStart
Indicates the number of days before the start of the session after which the code can no longer be used. Enter "0" to leave this setting disabled.
(Number type)
precision
- texts
- text
- languageId

Text: comment displayed when the promo code is used by the users in the system.
(String type)

languageId: The name can be multilingual: 

  • 1 = French (Canada) 
  • 2 = English
  • 3 = French (France)
  • 4 = Spanish

 (Number type)

description
- texts
- text
- languageId

Text: Description of the promo code as seen by the users in the system. (String type)

languageId: The text can be multilingual: 

  • 1 = French (Canada) 
  • 2 = English
  • 3 = French (France)
  • 4 = Spanish

 (Number type)

Promocode/getlist

Retrieves information about a list of promo codes in your environment.
API call address : https://.../lmsapi/promocode/getlist

Request

Example of request call content for information on a promo code:

{
}

Field descriptions

Name

Required

Comments/description



No field is required. Please enter empty braces.

Response

Example of the response call content for an information request on a list of promo codes:

[
    {
        "id": "kCAPmac05pz%2fsme3uMhUcA%3d%3d",
        "clientId": 473,
        "name": "code promotionnel d'ouverture",
        "code": "s7ztbeh1g0",
        "price": 15.0,
        "type": 0,
        "uses": 0,
        "startDate": "2020-01-01T00:00:00",
        "endDate": "2020-01-31T00:00:00",
        "minPrice": 0.0,
        "status": 0,
        "canBeCombined": false,
        "isShownInCatalog": false,
        "isVisibleForUsers": true,
        "creationDate": "2019-09-13T17:37:05.103",
        "daysApplicableBeforeStart": 0,
        "precision": {
            "texts": [
                {
                    "languageId": 1
                },
                {
                    "languageId": 2
                },
                {
                    "languageId": 3
                },
                {
                    "languageId": 4
                }
            ],
            "ErrorID": 0
        },
        "description": {
            "texts": [
                {
                    "languageId": 1
                },
                {
                    "text": "<div style=\"display: flex;align-items: center;color: #007E02;background-color: #DFF0D8;border-radius: 4px;width: 100%;word-break: break-word;\"><div class=\"icon icon-price-tag larger fr-fil fr-dib\" style=\"margin: 0px 5px;\"></div><p style=\"font-weight: bold; margin: 0;\"><strong>Applicable rebate</strong></p></div>",
                    "languageId": 2
                },
                {
                    "languageId": 3
                },
                {
                    "languageId": 4
                }
            ],
            "ErrorID": 0
        }
    },
    {
        "id": "79uBZCFYLIqDoxlPB9bTEA%3d%3d",
        "clientId": 473,
        "name": "code test",
        "code": "jbi0qw9gen",
        "price": 100.0,
        "type": 0,
        "uses": 0,
        "startDate": "0001-01-01T00:00:00",
        "endDate": "0001-01-01T00:00:00",
        "minPrice": 0.0,
        "status": 0,
        "canBeCombined": false,
        "isShownInCatalog": false,
        "isVisibleForUsers": false,
        "creationDate": "2021-02-17T09:41:26.033",
        "daysApplicableBeforeStart": 0,
        "precision": {
            "texts": [
                {
                    "languageId": 1
                },
                {
                    "languageId": 2
                },
                {
                    "languageId": 3
                },
                {
                    "languageId": 4
                }
            ],
            "ErrorID": 0
        },
        "description": {
            "texts": [
                {
                    "text": "<div style=\"display: flex;align-items: center;color: #007E02;background-color: #DFF0D8;border-radius: 4px;width: 100%;word-break: break-word;\"><div class=\"icon icon-price-tag larger fr-fil fr-dib\" style=\"margin: 0px 5px;\"></div><p style=\"font-weight: bold; margin: 0;\"><strong>Rabais applicable</strong></p></div>",
                    "languageId": 1
                },
                {
                    "languageId": 2
                },
                {
                    "languageId": 3
                },
                {
                    "languageId": 4
                }
            ],
            "ErrorID": 0
        }
    },
]

Field descriptions

Name 

Required

Comments/description

id
Unique identifier of the promo code.
(String type)
clientId
Unique identifier of your organization on the SVIeSolutions server.
name
Name of the promo code.
(String type)
code
Character string of the promo code that will be used by the users.
(String type)
price

Amount of the discount granted by the promo code (based on the "type" field). 

(Number type)

type
Unit of measure of the promo code.
  • 0 = Percentage
  • 1 = Currency or fixed amount

(Number type)

uses
Maximum number of uses of the promo code.
(Number type)
startDate
Start date for use of the promo code. The code cannot be used before this date.

(Date type YYYY-MM-DDTHH:MM:SSZ)

endDate
End date for use of the promo code. The code cannot be used after this date.

(Date type YYYY-MM-DDTHH:MM:SSZ)

minPrice
Minimum transaction price for use of the promo code. Below this price, the code cannot be used.
(Number type)
status
Indicates whether the promo code is enabled. If inactive, the promo code cannot be used.
  • 0 = Active 
  • 1 = Inactive

(Number type)

canBeCombined
Indicates whether the promo code can be used at the same time as one or more other promo codes sharing this characteristic.
(Boolean type)
isShownInCatalog
Indicates whether the promo code will be visible in the catalogue to eligible users and whether it will be applied automatically to their cart. This feature can only be enabled if "canBeCombined" is set to "true".
(Boolean type)
isVisibleForUsers
Indicates whether the promo code will be displayed in the list of promo codes available to the user, in their file and in the shopping cart.
(Boolean type)
creationDate
Indicates the creation date of the promo code.

(Date type YYYY-MM-DDTHH:MM:SSZ)

daysApplicableBeforeStart
Indicates the number of days before the start of the session after which the code can no longer be used. Enter "0" to leave this setting disabled.
(Number type)
precision
- texts
- text
- languageId

Text: comment displayed when the promo code is used by the users in the system.
(String type)

languageId: The name can be multilingual: 

  • 1 = French (Canada) 
  • 2 = English
  • 3 = French (France)
  • 4 = Spanish

 (Number type)

description
- texts
- text
- languageId

Text: Description of the promo code as seen by the users in the system. (String type)

languageId: The text can be multilingual: 

  • 1 = French (Canada) 
  • 2 = English
  • 3 = French (France)
  • 4 = Spanish

 (Number type)

Promocode/create

Creates a promo code in your environment.
API call address : https://.../lmsapi/promocode/create

Request

Example of request call content to create a promo code:

{
"name": "code",
"code": "rentrée2025",
"price": 15.0,
"type": 0,
"uses": 5,
"startDate": "2020-01-01T00:00:00",
"endDate": "2020-01-31T00:00:00",
"minPrice": 0.0,
"status": 0,
"canBeCombined": false,
"isShownInCatalog": false,
"isVisibleForUsers": true,
"daysApplicableBeforeStart": 0,
"precision": {
"texts": [
{
"text": "Merci pour votre inscription!",
"languageId": 1
},
],
},
"description": {
"texts": [
{
"text": "<div style=\"display: flex;align-items: center;color: #007E02;background-color: #DFF0D8;border-radius: 4px;width: 100%;word-break: break-word;\"><div class=\"icon icon-price-tag larger fr-fil fr-dib\" style=\"margin: 0px 5px;\"></div><p style=\"font-weight: bold; margin: 0;\"><strong>Applicable rebate</strong></p></div>",
"languageId": 1
},
],
},
}

Field descriptions

Name 

Required

Comments/description

nameXName of the promo code.
(String type)
code
Character string of the promo code that will be used by the users.
(String type)
priceX

Amount of the discount granted by the promo code (based on the "type" field). 

(Number type)

typeXUnit of measure of the promo code.
  • 0 = Percentage
  • 1 = Currency or fixed amount

(Number type)

uses
Maximum number of uses of the promo code.
(Number type)
startDate
Start date for use of the promo code. The code cannot be used before this date.

(Date type YYYY-MM-DDTHH:MM:SSZ)

endDate
End date for use of the promo code. The code cannot be used after this date.

(Date type YYYY-MM-DDTHH:MM:SSZ)

minPrice
Minimum transaction price for use of the promo code. Below this price, the code cannot be used.
(Number type)
statusXIndicates whether the promo code is enabled. If inactive, the promo code cannot be used.
  • 0 = Active 
  • 1 = Inactive

(Number type)

canBeCombinedXIndicates whether the promo code can be used at the same time as one or more other promo codes sharing this characteristic.
(Boolean type)
isShownInCatalog
Indicates whether the promo code will be visible in the catalogue to eligible users and whether it will be applied automatically to their cart. This feature can only be enabled if "canBeCombined" is set to "true".
(Boolean type)
isVisibleForUsers
Indicates whether the promo code will be displayed in the list of promo codes available to the user, in their file and in the shopping cart.
(Boolean type)
creationDate
Indicates the creation date of the promo code.

(Date type YYYY-MM-DDTHH:MM:SSZ)

daysApplicableBeforeStart
Indicates the number of days before the start of the session after which the code can no longer be used. Enter "0" to leave this setting disabled.
(Number type)
precision
- texts
- text
- languageId

Text: comment displayed when the promo code is used by the users in the system.
(String type)

languageId: The name can be multilingual: 

  • 1 = French (Canada) 
  • 2 = English
  • 3 = French (France)
  • 4 = Spanish

 (Number type)

description
- texts
- text
- languageId

Text: Description of the promo code as seen by the users in the system. (String type)

languageId: The text can be multilingual: 

  • 1 = French (Canada) 
  • 2 = English
  • 3 = French (France)
  • 4 = Spanish

 (Number type)

Response

Example of the response call content for a request to create a promo code:

{
"id": "qs%2fn%2f%2fwqq0isHEiVPmbIWQ%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

id
Unique identifier of the promo code.
(String type)

Promocode/getlist

Retrieves information about a list of promo codes in your environment.
API call address : https://.../lmsapi/promocode/getlist

Request

Example of request call content for information on a promo code:

{
}

Field descriptions

Name

Required

Comments/description



No field is required. Please enter empty braces.

Response

Example of the response call content for an information request on a list of promo codes:

[
{
"id": "kCAPmac05pz%2fsme3uMhUcA%3d%3d",
"clientId": 473,
"name": "code promotionnel d'ouverture",
"code": "s7ztbeh1g0",
"price": 15.0,
"type": 0,
"uses": 0,
"startDate": "2020-01-01T00:00:00",
"endDate": "2020-01-31T00:00:00",
"minPrice": 0.0,
"status": 0,
"canBeCombined": false,
"isShownInCatalog": false,
"isVisibleForUsers": true,
"creationDate": "2019-09-13T17:37:05.103",
"daysApplicableBeforeStart": 0,
"precision": {
"texts": [
{
"languageId": 1
},
{
"languageId": 2
},
{
"languageId": 3
},
{
"languageId": 4
}
],
"ErrorID": 0
},
"description": {
"texts": [
{
"languageId": 1
},
{
"text": "<div style=\"display: flex;align-items: center;color: #007E02;background-color: #DFF0D8;border-radius: 4px;width: 100%;word-break: break-word;\"><div class=\"icon icon-price-tag larger fr-fil fr-dib\" style=\"margin: 0px 5px;\"></div><p style=\"font-weight: bold; margin: 0;\"><strong>Applicable rebate</strong></p></div>",
"languageId": 2
},
{
"languageId": 3
},
{
"languageId": 4
}
],
"ErrorID": 0
}
},
{
"id": "79uBZCFYLIqDoxlPB9bTEA%3d%3d",
"clientId": 473,
"name": "code test",
"code": "jbi0qw9gen",
"price": 100.0,
"type": 0,
"uses": 0,
"startDate": "0001-01-01T00:00:00",
"endDate": "0001-01-01T00:00:00",
"minPrice": 0.0,
"status": 0,
"canBeCombined": false,
"isShownInCatalog": false,
"isVisibleForUsers": false,
"creationDate": "2021-02-17T09:41:26.033",
"daysApplicableBeforeStart": 0,
"precision": {
"texts": [
{
"languageId": 1
},
{
"languageId": 2
},
{
"languageId": 3
},
{
"languageId": 4
}
],
"ErrorID": 0
},
"description": {
"texts": [
{
"text": "<div style=\"display: flex;align-items: center;color: #007E02;background-color: #DFF0D8;border-radius: 4px;width: 100%;word-break: break-word;\"><div class=\"icon icon-price-tag larger fr-fil fr-dib\" style=\"margin: 0px 5px;\"></div><p style=\"font-weight: bold; margin: 0;\"><strong>Rabais applicable</strong></p></div>",
"languageId": 1
},
{
"languageId": 2
},
{
"languageId": 3
},
{
"languageId": 4
}
],
"ErrorID": 0
}
},
]

Field descriptions

Name 

Required

Comments/description

id
Unique identifier of the promo code.
(String type)
clientId
Unique identifier of your organization on the SVIeSolutions server.
name
Name of the promo code.
(String type)
code
Character string of the promo code that will be used by the users.
(String type)
price

Amount of the discount granted by the promo code (based on the "type" field). 

(Number type)

type
Unit of measure of the promo code.
  • 0 = Percentage
  • 1 = Currency or fixed amount

(Number type)

uses
Maximum number of uses of the promo code.
(Number type)
startDate
Start date for use of the promo code. The code cannot be used before this date.

(Date type YYYY-MM-DDTHH:MM:SSZ)

endDate
End date for use of the promo code. The code cannot be used after this date.

(Date type YYYY-MM-DDTHH:MM:SSZ)

minPrice
Minimum transaction price for use of the promo code. Below this price, the code cannot be used.
(Number type)
status
Indicates whether the promo code is enabled. If inactive, the promo code cannot be used.
  • 0 = Active 
  • 1 = Inactive

(Number type)

canBeCombined
Indicates whether the promo code can be used at the same time as one or more other promo codes sharing this characteristic.
(Boolean type)
isShownInCatalog
Indicates whether the promo code will be visible in the catalogue to eligible users and whether it will be applied automatically to their cart. This feature can only be enabled if "canBeCombined" is set to "true".
(Boolean type)
isVisibleForUsers
Indicates whether the promo code will be displayed in the list of promo codes available to the user, in their file and in the shopping cart.
(Boolean type)
creationDate
Indicates the creation date of the promo code.

(Date type YYYY-MM-DDTHH:MM:SSZ)

daysApplicableBeforeStart
Indicates the number of days before the start of the session after which the code can no longer be used. Enter "0" to leave this setting disabled.
(Number type)
precision
- texts
- text
- languageId

Text: comment displayed when the promo code is used by the users in the system.
(String type)

languageId: The name can be multilingual: 

  • 1 = French (Canada) 
  • 2 = English
  • 3 = French (France)
  • 4 = Spanish

 (Number type)

description
- texts
- text
- languageId

Text: Description of the promo code as seen by the users in the system. (String type)

languageId: The text can be multilingual: 

  • 1 = French (Canada) 
  • 2 = English
  • 3 = French (France)
  • 4 = Spanish

 (Number type)

Promocode/edit

Modifies a promo code in your environment.
API call address : https://.../lmsapi/promocode/edit

Request

Example of request call content to modify a promo code:

{
"id": "kCAPmac05pz%2fsme3uMhUcA%3d%3d",
"clientId": 473,
"name": "code",
"code": "rentrée2025",
"price": 15.0,
"type": 0,
"uses": 5,
"startDate": "2020-01-01T00:00:00",
"endDate": "2020-01-31T00:00:00",
"minPrice": 0.0,
"status": 0,
"canBeCombined": false,
"isShownInCatalog": false,
"isVisibleForUsers": true,
"daysApplicableBeforeStart": 0,
"precision": {
"texts": [
{
"text": "Merci pour votre inscription!",
"languageId": 1
},
],
},
"description": {
"texts": [
{
"text": "<div style=\"display: flex;align-items: center;color: #007E02;background-color: #DFF0D8;border-radius: 4px;width: 100%;word-break: break-word;\"><div class=\"icon icon-price-tag larger fr-fil fr-dib\" style=\"margin: 0px 5px;\"></div><p style=\"font-weight: bold; margin: 0;\"><strong>Applicable rebate</strong></p></div>",
"languageId": 1
},
],
},
}

Field descriptions

Name 

Required

Comments/description

idXUnique identifier of the promo code.
(String type)
clientId
Unique identifier of your organization on the SVIeSolutions server.
name
Name of the promo code.
(String type)
code
Character string of the promo code that will be used by the users.
(String type)
price

Amount of the discount granted by the promo code (based on the "type" field). 

(Number type)

type
Unit of measure of the promo code.
  • 0 = Percentage
  • 1 = Currency or fixed amount

(Number type)

uses
Maximum number of uses of the promo code.
(Number type)
startDate
Start date for use of the promo code. The code cannot be used before this date.

(Date type YYYY-MM-DDTHH:MM:SSZ)

endDate
End date for use of the promo code. The code cannot be used after this date.

(Date type YYYY-MM-DDTHH:MM:SSZ)

minPrice
Minimum transaction price for use of the promo code. Below this price, the code cannot be used.
(Number type)
status
Indicates whether the promo code is enabled. If inactive, the promo code cannot be used.
  • 0 = Active 
  • 1 = Inactive

(Number type)

canBeCombined
Indicates whether the promo code can be used at the same time as one or more other promo codes sharing this characteristic.
(Boolean type)
isShownInCatalog
Indicates whether the promo code will be visible in the catalogue to eligible users and whether it will be applied automatically to their cart. This feature can only be enabled if "canBeCombined" is set to "true".
(Boolean type)
isVisibleForUsers
Indicates whether the promo code will be displayed in the list of promo codes available to the user, in their file and in the shopping cart.
(Boolean type)
creationDate
Indicates the creation date of the promo code.

(Date type YYYY-MM-DDTHH:MM:SSZ)

daysApplicableBeforeStart
Indicates the number of days before the start of the session after which the code can no longer be used. Enter "0" to leave this setting disabled.
(Number type)
precision
- texts
- text
- languageId

Text: comment displayed when the promo code is used by the users in the system.
(String type)

languageId: The name can be multilingual: 

  • 1 = French (Canada) 
  • 2 = English
  • 3 = French (France)
  • 4 = Spanish

 (Number type)

description
- texts
- text
- languageId

Text: Description of the promo code as seen by the users in the system. (String type)

languageId: The text can be multilingual: 

  • 1 = French (Canada) 
  • 2 = English
  • 3 = French (France)
  • 4 = Spanish

 (Number type)

Response

Example of the response call content for a request to modify a promo code:

{
"id": "qs%2fn%2f%2fwqq0isHEiVPmbIWQ%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

id
Unique identifier of the promo code.
(String type)

Promocode/delete

Deletes a promo code from your environment.
API call address : https://.../lmsapi/promocode/delete

Request

Example of request call content to delete a promo code:

{
"id": "kCAPmac05pz%2fsme3uMhUcA%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

idXUnique identifier of the promo code.
(String type)

Response

Example of the response call content for a request to delete a promo code:

{
"id": "kCAPmac05pz%2fsme3uMhUcA%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

id
Unique identifier of the promo code.
(String type)

Promocode/adduser

Assigns a promo code in your environment to a user.
API call address : https://.../lmsapi/promocode/adduser

Request

Example of request call content to assign a promo code in your environment to a user:

{
    "id": "Ffq1G51MapoQABnIwOcedQ%3d%3d",
    "userId":"6SPYUlYlIeL3WXhC0eJ4jA%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

idXUnique identifier of the promo code.
(String type)
userIdXUnique identifier of the user.
(String type)

Response

Example of the response call content for a request to assign a promo code in your environment to a user:

{
    "id": "Ffq1G51MapoQABnIwOcedQ%3d%3d",
    "userId":"6SPYUlYlIeL3WXhC0eJ4jA%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

id
Unique identifier of the promo code.
(String type)
userId
Unique identifier of the user.
(String type)

Promocode/removeuser

Removes the assignment of a promo code in your environment to a user.
API call address : https://.../lmsapi/promocode/removeuser

Request

Example of request call content to remove the assignment of a promo code in your environment to a user:

{
    "id": "Ffq1G51MapoQABnIwOcedQ%3d%3d",
    "userId":"6SPYUlYlIeL3WXhC0eJ4jA%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

idXUnique identifier of the promo code.
(String type)
userIdXUnique identifier of the user.
(String type)

Response

Example of the response call content for a request to remove the assignment of a promo code in your environment to a user:

{
    "id": "Ffq1G51MapoQABnIwOcedQ%3d%3d",
    "userId":"6SPYUlYlIeL3WXhC0eJ4jA%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

id
Unique identifier of the promo code.
(String type)
userId
Unique identifier of the user.
(String type)

Promocode/getuserlist

Retrieves a list of the users assigned to a promo code in your environment.
API call address : https://.../lmsapi/promocode/getuserlist

Request

Example of request call content for a list of the users assigned to a promo code in your environment:

{
    "id": "Ffq1G51MapoQABnIwOcedQ%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

idXUnique identifier of the promo code.
(String type)

Response

Example of the response call content for a request for a list of the users assigned to a promo code in your environment:

[
    {
        "id": "qs%2fn%2f%2fwqq0isHEiVPmbIWQ%3d%3d",
        "userId": "RrHd5EmYmSgXzC8AegdDeA%3d%3d"
    },
    {
        "id": "qs%2fn%2f%2fwqq0isHEiVPmbIWQ%3d%3d",
        "userId": "3j5BmPY5d5FmUuFDrOo8Ug%3d%3d"
    },
    {
        "id": "qs%2fn%2f%2fwqq0isHEiVPmbIWQ%3d%3d",
        "userId": "1N17fDQgreIR2idrIXEySw%3d%3d"
    }
]

Field descriptions

Name 

Required

Comments/description

id
Unique identifier of the promo code.
(String type)
userId
Unique identifier of the user.
(String type)

Promocode/addbranch

Assigns a promo code in your environment to the users of a branch of the organization chart.
API call address : https://.../lmsapi/promocode/addbranch

Request

Example of request call content to assign a promo code in your environment to the users of a branch of the organization chart:

{
    "id": "Ffq1G51MapoQABnIwOcedQ%3d%3d",
    "branchId":"6SPYUlYlIeL3WXhC0eJ4jA%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

idXUnique identifier of the promo code.
(String type)
branchIdXUnique identifier of the branch.
(String type)

Response

Example of the response call content for a request to assign a promo code in your environment to the users of a branch of the organization chart:

{
    "id": "Ffq1G51MapoQABnIwOcedQ%3d%3d",
    "branchId":"6SPYUlYlIeL3WXhC0eJ4jA%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

id
Unique identifier of the promo code.
(String type)
branchId
Unique identifier of the branch.
(String type)

Promocode/removebranch

Removes the assignment of a promo code in your environment from the users of a branch of the organization chart.
API call address : https://.../lmsapi/promocode/removebranch

Request

Example of request call content to remove the assignment of a promo code in your environment from the users of a branch of the organization chart:

{
    "id": "Ffq1G51MapoQABnIwOcedQ%3d%3d",
    "branchId":"6SPYUlYlIeL3WXhC0eJ4jA%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

idXUnique identifier of the promo code.
(String type)
branchIdXUnique identifier of the branch.
(String type)

Response

Example of the response call content for a request to remove the assignment of a promo code in your environment from the users of a branch of the organization chart :

{
    "id": "Ffq1G51MapoQABnIwOcedQ%3d%3d",
    "branchId":"6SPYUlYlIeL3WXhC0eJ4jA%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

id
Unique identifier of the promo code.
(String type)
branchId
Unique identifier of the branch.
(String type)

Promocode/getbranchlist

Retrieves a list of the user branches assigned to a promo code in your environment.
API call address : https://.../lmsapi/promocode/getbranchlist

Request

Example of request call content for a list of the user branches assigned to a promo code in your environment:

{
    "id": "Ffq1G51MapoQABnIwOcedQ%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

idXUnique identifier of the promo code.
(String type)

Response

Example of the response call content for a request for a list of the user branches assigned to a promo code in your environment:

[
    {
        "id": "qs%2fn%2f%2fwqq0isHEiVPmbIWQ%3d%3d",
        "branchId": "RrHd5EmYmSgXzC8AegdDeA%3d%3d"
    },
    {
        "id": "qs%2fn%2f%2fwqq0isHEiVPmbIWQ%3d%3d",
        "branchId": "3j5BmPY5d5FmUuFDrOo8Ug%3d%3d"
    },
    {
        "id": "qs%2fn%2f%2fwqq0isHEiVPmbIWQ%3d%3d",
        "branchId": "1N17fDQgreIR2idrIXEySw%3d%3d"
    }
]

Field descriptions

Name 

Required

Comments/description

id
Unique identifier of the promo code.
(String type)
branchId
Unique identifier of the branch.
(String type)

Promocode/addgroup

Assigns a promo code in your environment to the users of a group.
API call address : https://.../lmsapi/promocode/addgroup

Request

Example of request call content to assign a promo code in your environment to the users of a group:

{
    "id": "Ffq1G51MapoQABnIwOcedQ%3d%3d",
    "groupId":"6SPYUlYlIeL3WXhC0eJ4jA%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

idXUnique identifier of the promo code.
(String type)
groupIdXUnique identifier of the group.
(String type)

Response

Example of the response call content for a request to assign a promo code in your environment to the users of a group:

{
    "id": "Ffq1G51MapoQABnIwOcedQ%3d%3d",
    "groupId":"6SPYUlYlIeL3WXhC0eJ4jA%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

id
Unique identifier of the promo code.
(String type)
groupId
Unique identifier of the group.
(String type)

Promocode/removegroup

Removes the assignment of a promo code in your environment from a user group.
API call address : https://.../lmsapi/promocode/removegroup

Request

Example of request call content to remove the assignment of a promo code in your environment from a user group:

{
    "id": "Ffq1G51MapoQABnIwOcedQ%3d%3d",
    "groupId":"6SPYUlYlIeL3WXhC0eJ4jA%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

idXUnique identifier of the promo code.
(String type)
groupIdXUnique identifier of the group.
(String type)

Response

Example of the response call content for a request to remove the assignment of a promo code in your environment from a user group :

{
    "id": "Ffq1G51MapoQABnIwOcedQ%3d%3d",
    "groupId":"6SPYUlYlIeL3WXhC0eJ4jA%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

id
Unique identifier of the promo code.
(String type)
groupId
Unique identifier of the group.
(String type)

Promocode/getgrouplist

Retrieves a list of the user groups assigned to a promo code in your environment.
API call address : https://.../lmsapi/promocode/getgrouplist

Request

Example of request call content for a list of the user groups assigned to a promo code in your environment:

{
    "id": "Ffq1G51MapoQABnIwOcedQ%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

idXUnique identifier of the promo code.
(String type)

Response

Example of the response call content for a request for a list of the user groups assigned to a promo code in your environment:

[
    {
        "id": "qs%2fn%2f%2fwqq0isHEiVPmbIWQ%3d%3d",
        "groupId": "RrHd5EmYmSgXzC8AegdDeA%3d%3d"
    },
    {
        "id": "qs%2fn%2f%2fwqq0isHEiVPmbIWQ%3d%3d",
        "groupId": "3j5BmPY5d5FmUuFDrOo8Ug%3d%3d"
    },
    {
        "id": "qs%2fn%2f%2fwqq0isHEiVPmbIWQ%3d%3d",
        "groupId": "1N17fDQgreIR2idrIXEySw%3d%3d"
    }
]

Field descriptions

Name 

Required

Comments/description

id
Unique identifier of the promo code.
(String type)
groupId
Unique identifier of the group.
(String type)

Promocode/addworkspace

Assigns a promo code in your environment to a training item.
API call address : https://.../lmsapi/promocode/addworkspace

Request

Example of request call content to assign a promo code in your environment to a training item:

{
    "id": "Ffq1G51MapoQABnIwOcedQ%3d%3d",
    "workspaceId":"6SPYUlYlIeL3WXhC0eJ4jA%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

idXUnique identifier of the promo code.
(String type)
workspaceIdXUnique identifier of the training item.
(String type)

Response

Example of the response call content for a request to assign a promo code in your environment to a training item:

{
    "id": "Ffq1G51MapoQABnIwOcedQ%3d%3d",
    "workspaceId":"6SPYUlYlIeL3WXhC0eJ4jA%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

id
Unique identifier of the promo code.
(String type)
workspaceId
Unique identifier of the training item.
(String type)

Promocode/addworkspaces

Assigns a promo code in your environment to several training items.
API call address : https://.../lmsapi/promocode/addworkspaces

Request

Example of request call content to assign a promo code in your environment to training items:

{
  "id": "tirQkNjqBn5Tk5vwRlAE1Q%3d%3d",
  "workspaces": [
        "BzEm1iKId2qsP86aUKd38RlgVg%3df%3d",
        "sBzEm1iKI2dqP8f6aUK3g8RldVg%3dd%3d"
    ] 
}

Field descriptions

Name 

Required

Comments/description

idXUnique identifier of the promo code.
(String type)
workspacesXUnique identifiers of the training items.
(String type)

Response

Example of the response call content for a request to assign a promo code in your environment to training items:

{
  "id": "tirQkNjqBn5Tk5vwRlAE1Q%3d%3d",
  "workspaces": [
        "BzEm1iKId2qsP86aUKd38RlgVg%3df%3d",
        "sBzEm1iKI2dqP8f6aUK3g8RldVg%3dd%3d"
    ] 
}

Field descriptions

Name 

Required

Comments/description

id
Unique identifier of the promo code.
(String type)
workspaces
Unique identifiers of the training items.
(String type)

Promocode/removeworkspace

Removes the assignment of a promo code in your environment from a training item.
API call address : https://.../lmsapi/promocode/removeworkspace

Request

Example of request call content to remove the assignment of a promo code in your environment from a training item:

{
    "id": "Ffq1G51MapoQABnIwOcedQ%3d%3d",
    "workspaceId":"6SPYUlYlIeL3WXhC0eJ4jA%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

idXUnique identifier of the promo code.
(String type)
workspaceIdXUnique identifier of the training item.
(String type)

Response

Example of the response call content for a request to remove the assignment of a promo code in your environment from a training item:

{
    "id": "Ffq1G51MapoQABnIwOcedQ%3d%3d",
    "workspaceId":"6SPYUlYlIeL3WXhC0eJ4jA%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

id
Unique identifier of the promo code.
(String type)
workspaceId
Unique identifier of the training item.
(String type)

Promocode/getworkspacelist

Retrieves a list of the training items assigned to a promo code in your environment.
API call address : https://.../lmsapi/promocode/getworkspacelist

Request

Example of request call content for a list of the training items assigned to a promo code in your environment:

{
    "id": "Ffq1G51MapoQABnIwOcedQ%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

idXUnique identifier of the promo code.
(String type)

Response

Example of the response call content for a request for a list of the training items assigned to a promo code in your environment:

[
    {
        "id": "qs%2fn%2f%2fwqq0isHEiVPmbIWQ%3d%3d",
        "workspaceId": "RrHd5EmYmSgXzC8AegdDeA%3d%3d"
    },
    {
        "id": "qs%2fn%2f%2fwqq0isHEiVPmbIWQ%3d%3d",
        "workspaceId": "3j5BmPY5d5FmUuFDrOo8Ug%3d%3d"
    },
    {
        "id": "qs%2fn%2f%2fwqq0isHEiVPmbIWQ%3d%3d",
        "workspaceId": "1N17fDQgreIR2idrIXEySw%3d%3d"
    }
]

Field descriptions

Name 

Required

Comments/description

id
Unique identifier of the promo code.
(String type)
workspaceId
Unique identifier of the training item.
(String type)

Promocode/addworkspaceinstance

Assigns a promo code in your environment to a training session.
API call address : https://.../lmsapi/promocode/addworkspaceinstance

Request

Example of request call content to assign a promo code in your environment to a training session:

{
    "id": "Ffq1G51MapoQABnIwOcedQ%3d%3d",
    "workspaceInstanceId":"6SPYUlYlIeL3WXhC0eJ4jA%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

idXUnique identifier of the promo code.
(String type)
workspaceInstanceIdXUnique identifier of the training session.
(String type)

Response

Example of the response call content for a request to assign a promo code in your environment to a training session:

{
    "id": "Ffq1G51MapoQABnIwOcedQ%3d%3d",
    "workspaceInstanceId":"6SPYUlYlIeL3WXhC0eJ4jA%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

id
Unique identifier of the promo code.
(String type)
workspaceInstanceId
Unique identifier of the training session.
(String type)

Promocode/addworkspaceinstances

Assigns a promo code in your environment to several training sessions.
API call address : https://.../lmsapi/promocode/addworkspaceinstances

Request

Example of request call content to assign a promo code in your environment to training sessions:

{
  "id": "tirQkNjqBn5Tk5vwRlAE1Q%3d%3d",
  "workspaceInstances": [
        "BzEm1iKId2qsP86aUKd38RlgVg%3df%3d",
        "sBzEm1iKI2dqP8f6aUK3g8RldVg%3dd%3d"
    ] 
}

Field descriptions

Name 

Required

Comments/description

idXUnique identifier of the promo code.
(String type)
workspaceInstancesXUnique identifiers of the training sessions.
(String type)

Response

Example of the response call content for a request to assign a promo code in your environment to training sessions:

{
  "id": "tirQkNjqBn5Tk5vwRlAE1Q%3d%3d",
  "workspaceInstances": [
        "BzEm1iKId2qsP86aUKd38RlgVg%3df%3d",
        "sBzEm1iKI2dqP8f6aUK3g8RldVg%3dd%3d"
    ] 
}

Field descriptions

Name 

Required

Comments/description

id
Unique identifier of the promo code.
(String type)
workspaceInstances
Unique identifiers of the training sessions.
(String type)

Promocode/removeworkspaceinstance

Removes the assignment of a promo code in your environment from a training session.
API call address : https://.../lmsapi/promocode/removeworkspaceinstance

Request

Example of request call content to remove the assignment of a promo code in your environment from a training session:

{
    "id": "Ffq1G51MapoQABnIwOcedQ%3d%3d",
    "workspaceInstanceId":"6SPYUlYlIeL3WXhC0eJ4jA%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

idXUnique identifier of the promo code.
(String type)
workspaceInstanceIdXUnique identifier of the training session.
(String type)

Response

Example of the response call content for a request to remove the assignment of a promo code in your environment from a training session:

{
    "id": "Ffq1G51MapoQABnIwOcedQ%3d%3d",
    "workspaceInstanceId":"6SPYUlYlIeL3WXhC0eJ4jA%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

id
Unique identifier of the promo code.
(String type)
workspaceInstanceId
Unique identifier of the training session.
(String type)

Promocode/getworkspaceinstancelist

Retrieves a list of the training sessions assigned to a promo code in your environment.
API call address : https://.../lmsapi/promocode/getworkspaceinstancelist

Request

Example of request call content for a list of the training sessions assigned to a promo code in your environment:

{
    "id": "Ffq1G51MapoQABnIwOcedQ%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

idXUnique identifier of the promo code.
(String type)

Response

Example of the response call content for a request for a list of the training sessions assigned to a promo code in your environment:

[
    {
        "id": "qs%2fn%2f%2fwqq0isHEiVPmbIWQ%3d%3d",
        "workspaceInstanceId": "RrHd5EmYmSgXzC8AegdDeA%3d%3d"
    },
    {
        "id": "qs%2fn%2f%2fwqq0isHEiVPmbIWQ%3d%3d",
        "workspaceInstanceId": "3j5BmPY5d5FmUuFDrOo8Ug%3d%3d"
    },
    {
        "id": "qs%2fn%2f%2fwqq0isHEiVPmbIWQ%3d%3d",
        "workspaceInstanceId": "1N17fDQgreIR2idrIXEySw%3d%3d"
    }
]

Field descriptions

Name 

Required

Comments/description

id
Unique identifier of the promo code.
(String type)
workspaceInstanceId
Unique identifier of the training session.
(String type)

Promo code error code descriptions 

Number

Message

Comments/description

1300

Required id

You must provide an identifier for the promo code.

1301

Invalid id

The identifier provided for the promo code is invalid.

1302

Required name

You must provide a name  for the promo code.

1303

Invalid name length

The length of the name provided for the promo code is invalid. It must contain a minimum of 3 and a maximum of 50 characters.

1304

Invalid code length

The length of the code provided for the promo code is invalid. It must contain a minimum of 3 and a maximum of 50 characters.

1305

Required price

You must provide an amount for the promo code.

1306

Required type

You must provide the discount type of the promo code.

1307

Invalid type

The type provided for the promo code is invalid.

1308

Required status

You must provide the activation status of the promo code.

1309

Invalid status

The status provided for the promo code is invalid.

1310

Required canBeCombined

You must provide "True" or "False".

1311

Invalid precision length

The length of the precision text provided for the promo code is invalid. It must contain a minimum of 5 and a maximum of 250 characters.

1312

Branch already in promo code

The branch is already associated with the promo code.

1313

Code already exists

The code provided already exists. You must choose another one.

1314

Required workspaceInstances


You must provide a list of session identifiers.
1315Required workspacesYou must provide a list of training item identifiers.


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.