• Free Trial
  • Products
    • LMSThe world’s easiest-to-use learning management system.
    • Training ContentA robust library of off-the-shelf learning content.
  • Solutions
    • By Use Case
      • Employee Training
      • Sales Training
      • Customer Training
      • Partner Training
      • Compliance Training
      • View all
    • By Industry
      • Technology
      • Nonprofit
      • Retail
      • Hospitality
      • Healthcare
      • View all
  • Customers
    • Learn more about Litmos customer success stories.
      • Case Studies
      • Video Testimonials
      • I Love Litmos
      • Lenny Awards
    • Featured Customer
      • Sabre, a global travel technology provider, increases revenue by using Litmos to train their sales and technical teams.
  • Pricing
  • Resources
    • Ebooks & Infographics
    • Webinars & Podcasts
    • Events
    • Integrations
    • Blog
  • About
    • Company
    • Partners
    • Awards
    • Careers
    • Sustainability
  • Free Trial
Litmos
Log in
Contact us
Support
Search
  • Free Trial
  • Products
    • LMSThe world’s easiest-to-use learning management system.
    • Training ContentA robust library of off-the-shelf learning content.
  • Solutions
    • By Use Case
      • Employee Training
      • Sales Training
      • Customer Training
      • Partner Training
      • Compliance Training
      • View all
    • By Industry
      • Technology
      • Nonprofit
      • Retail
      • Hospitality
      • Healthcare
      • View all
  • Customers
    • Learn more about Litmos customer success stories.
      • Case Studies
      • Video Testimonials
      • I Love Litmos
      • Lenny Awards
    • Featured Customer
      • Sabre, a global travel technology provider, increases revenue by using Litmos to train their sales and technical teams.
  • Pricing
  • Resources
    • Ebooks & Infographics
    • Webinars & Podcasts
    • Events
    • Integrations
    • Blog
  • About
    • Company
    • Partners
    • Awards
    • Careers
    • Sustainability
  • Free Trial

Litmos Training Operations Documentation

APIs

Home › Litmos Training Operations Documentation › LTO API: POST Pricing Overview

LTO API: POST Pricing Overview

Detailed Pricing API overview

Mass import of pricing

This document will cover how to perform the pricing import function by leveraging a newly created LTO Pricing API.

Authentication and Authorization

The LTO REST API uses HTTP verbs and a RESTful endpoint structure

Information used for API authentication and authorization is submitted in the request header. The following header name/values are required with each request.

Header Description
CompanyLoginId Company Login Id (provisioned by LTO account management)
ProductId Product Id. 1=Learning Management, 2=Event Management
Username User account username
Password User account password

Request and response payloads

The LTO REST API request and response payloads are formatted as JSON. The API uses a combination of a HTTP status code and JSON message in the body of the response to report the status of each operation or request. The HTTP status code will convey the status of the operation and the JSON message will contain additional information, which will vary depending on the operation.

Property Type Required Max Description
Success Boolean Y Was the operation successful (true/false)
Error Array of Error objects If Success=false, error object is included. Otherwise Error is set to null
Data Object or array of objects If Success=false, Data is set to null

The error object contains the following properties:

Property Type Required Max Description
  Code string Y System error code returned from the operation. See system error code reference
Message string Y System message corresponding to the system error code. See system error code reference
MessageDetail string N Additional  details concerning error

LTO REST API Reference – Pricing

Pricing

Operation Create pricing
Description Create brand new price records for new courses
Method POST
Request Provide pricing object in request body
Response
HTTP Status Description
201 Operation successful. Pricing object created. Newly created pricing object is returned in response
400 Operation not successful. Pricing object not created. Response contains error information
Operation Add new currency/country/pricing for existing pricing records
Description Add new currency/country/pricing for existing  pricing records. This supports only numeric prices
Method POST
Request Provide pricing object in request body.
Response
HTTP Status Description
201 Operation successful. Pricing object created. Newly created pricing object is returned in response
400 Operation not successful. Pricing object not created. Response contains error information
Operation Update pricing (complete pricing object update)
Description Update pricing of existing pricing records. This operation supports complete object update only. Partial object update is NOT supported at this time. If the API request data does not supply ALL properties/fields with their intended values, the fields not supplied will be assigned the default value: NULL. If the record previously had data in this field, the value will now be set to NULL. The PricingID and RowID are required for update. If the RowID does not exist then an error will be thrown.
Method PUT
Request Provide updated pricing object in request body.
Response
HTTP Status Description
200 Operation successful. Pricing object updated. Updated pricing object returned in response
400 Operation not successful. Pricing object not updated. Response contains error information
404 Operation not successful. Pricing object not found
Operation Update Country Pricing (partial pricing object update)
Description Update country/currency/price for existing pricing records. This operation supports partial object update only. The PricingID,  RowID, Country, Currency, Price and DefaultPrice are required for the update. If the RowID does not exist then an error will be thrown.  This supports only numeric prices.
Method PUT
Request Provide updated pricing object in request body.
Response
HTTP Status Description
200 Operation successful. Pricing object updated. Updated pricing object returned in response
400 Operation not successful. Pricing object not updated. Response contains error information
404 Operation not successful. Pricing object not found

Pricing object

Property Type Required Max Description/Notes
ID int N/A Read-only. Resource Identifier (system generated)
RowID Int N/A Only used in response and in API URL
PricingID Int N/A Only used in response and in API URL
CourseID Int N/A Only used in response and in API URL
PriceName string Y 255 Course Price Name
Description String N 255 Course Price Description
Price numeric Y 9,2 Course Price
OtherPrice String N 255 Other price value besides adding country and currency information
IsListPrice Int N If price is a list Price. Values are 1 or 0
PriceType string N/A 50 If  price is added for country and currency then the value is “numeric” else “alphanumeric. Only used in response
CurrencyCode string Y 3 Currency code for price
DefaultPrice Int Y Used to determine the default currency. Values are 1 or 0. This is not required when “Adding new country currency” to existing price record”
StartDate Datetime N Price start date
ExpirationDate Datetime N Price expiration date
AlwaysDisplay Smallint N Always Display Price (regardless of Start/Expiration dates). Values are 1 or 0
DisplayToAll Smallint N Display Group Pricing to All. Values are 1 or 0
IgnoreDiscountUplift Smallint N Ignore Attendee Group-Assigned Discount. Values are 1 or 0
DisplayOnly Smallint N If list price is display only. Values are 1 or 0
DisplayMultiCurrencies Smallint N Display all currencies. Values are 1 or 0
CurrencyCountry String N 2 Currency Country Code
GroupID Int N Attendee Group key

Course Pricing Endpoint URLs

  1. Get course pricing data by Course ID.

End point URL: GET/Price/Course/5

Example:  https://apibeta.viewcentral.com/api/course/30/price

{
  "Success": true,
  "Error": null,
  "Data": {
    "CourseId": 30,
    "PriceRecord": [
      {
        "RowId": 391,
        "PricingId": 265,
        "PriceName": "Bundle Price",
        "Description": "Descr",
        "IsListPrice": 0,
        "AlwaysDisplay": 0,
        "DisplayToAll": 1,
        "IgnoreDiscountUplift": 0,
        "DisplayOnly": 0,
        "DisplayMultiCurrencies": 1,
        "StartDate": "2014-01-01T16:00:00.000",
        "ExpirationDate": "2015-03-05T16:00:00.000",
        "OtherPrice": "alpha price",
        "PriceType": "AlphaNumeric",
        "CountryCurrency": [
          {
            "CurrencyCountry": "",
            "CurrencyCode": "USD",
            "Price": "",
            "DefaultPrice": 0,
            "ID": 227838
          }
        ],
        "AttendeeGroups": [
          {
            "GroupID": 5,
            "GroupName": "Former TdF Winners"
          },
          {
            "GroupID": 6,
            "GroupName": "TdF Favorite"
          },
          {
            "GroupID": 7,
            "GroupName": "One hit TdF wonders"
          }
        ]
      },
      {
        "RowId": 392,
        "PricingId": 265,
        "PriceName": "Bundle Price updated",
        "Description": "Descr",
        "IsListPrice": 0,
        "AlwaysDisplay": 0,
        "DisplayToAll": 1,
        "IgnoreDiscountUplift": 0,
        "DisplayOnly": 0,
        "DisplayMultiCurrencies": 1,
        "StartDate": "2014-01-01T16:00:00.000",
        "ExpirationDate": "2015-03-05T16:00:00.000",
        "OtherPrice": "",
        "PriceType": "Numeric",
        "CountryCurrency": [
          {
            "CurrencyCountry": "US",
            "CurrencyCode": "USD",
            "Price": "120.00",
            "DefaultPrice": 1,
            "ID": 227842
          }
        ],
        "AttendeeGroups": [
          {
            "GroupID": 5,
            "GroupName": "Former TdF Winners"
          },
          {
            "GroupID": 6,
            "GroupName": "TdF Favorite"
          },
          {
            "GroupID": 7,
            "GroupName": "One hit TdF wonders"
          }
        ]
      },
      {
        "RowId": 393,
        "PricingId": 265,
        "PriceName": "Bundle Price 3 updated",
        "Description": "Descr",
        "IsListPrice": 0,
        "AlwaysDisplay": 0,
        "DisplayToAll": 1,
        "IgnoreDiscountUplift": 0,
        "DisplayOnly": 0,
        "DisplayMultiCurrencies": 1,
        "StartDate": "2014-01-01T16:00:00.000",
        "ExpirationDate": "2015-03-05T16:00:00.000",
        "OtherPrice": "",
        "PriceType": "Numeric",
        "CountryCurrency": [
          {
            "CurrencyCountry": "GB",
            "CurrencyCode": "GBP",
            "Price": "1200.00",
            "DefaultPrice": 0,
            "ID": 227846
          },
          {
            "CurrencyCountry": "UZ",
            "CurrencyCode": "NZD",
            "Price": "1000.00",
            "DefaultPrice": 1,
            "ID": 227847
          }
        ],
        "AttendeeGroups": [
          {
            "GroupID": 5,
            "GroupName": "Former TdF Winners"
          },
          {
            "GroupID": 6,
            "GroupName": "TdF Favorite"
          },
          {
            "GroupID": 7,
            "GroupName": "One hit TdF wonders"
          }
        ]
      }
    ]
  }
}
  1. Create completely new pricing data for existing courses i.e. add one or more new prices. If the price records   are successfully created then a “Get course pricing data by Course ID” will be provided in the response.

End point URL: POST /Course/<CourseID>/Price

Example:  https://apibeta.viewcentral.com/api/course/6/Price

{
  "PriceRecord": [
    {
      "PriceName": "Bundle Price",
      "Description": "Descr",
      "IsListPrice": 0,
      "AlwaysDisplay": 0,
      "DisplayToAll": 1,
      "IgnoreDiscountUplift": 0,
      "DisplayOnly": 0,
      "DisplayMultiCurrencies": 1,
      "StartDate": "2014-01-01",
      "ExpirationDate": "2015-03-05",
      "OtherPrice": "",
      "CountryCurrency": [
        {
          "CurrencyCountry": "GB",
          "CurrencyCode": "GBP",
          "Price": "1200.00",
          "DefaultPrice": 0
        },
        {
          "CurrencyCountry": "UZ",
          "CurrencyCode": "NZD",
          "Price": "1000.00",
          "DefaultPrice": 1
        }
      ],
      "AttendeeGroups": [
        {
          "GroupID": 5
        },
        {
          "GroupID": 6
        },
        {
          "GroupID": 7
        }
      ]
    },
    {
      "PriceName": "Bundle price 2",
      "Description": "Descr",
      "IsListPrice": 1,
      "AlwaysDisplay": 0,
      "DisplayToAll": 0,
      "IgnoreDiscountUplift": 0,
      "DisplayOnly": 0,
      "DisplayMultiCurrencies": 0,
      "StartDate": "",
      "ExpirationDate": "",
      "OtherPrice": "Free Sampler"
    }
  ]
}
  1. Add a new country/currency/price for an existing price record (pricing ID and row ID). The default price cannot be set here and by default it will be set to 0 for new country/currency/price records. If the new country/currency/price records are successfully created then a “Get course pricing data by Course ID” will be provided in the response.

End point URL: – POST /Course/<CourseID>/Price/Row/<rowID>

https://apibeta.viewcentral.com/api/course/6/Price/Row/394

Example

{
  "PriceRecord": [
    {
      "CountryCurrency": [
        {
          "Price": "50.00",
          "CurrencyCode": "USD",
          "CurrencyCountry": "US"
        },
        {
          "Price": "20.00",
          "CurrencyCode": "CAD",
          "CurrencyCountry": "CA"
        }
      ]
    }
  ]
}
  1. Update: Update complete pricing object. Existing pricing data will be overwritten with the data sent through this API so the complete pricing data has to be sent in the request. If the update is successful then a “Get course pricing data by Course ID” will be provided in the response.

End point URL: PUT /Courses/<CourseID>/Price/Row/<rowID>

https://apibeta.viewcentral.com/api/course/30/Price/Row/393

– Update to PricingObject.PriceType =”Numeric”

{
  "PriceRecord": [
    {
      "PriceName": "API Price updated",
      "Description": "Descr",
      "IsListPrice": 0,
      "AlwaysDisplay": 0,
      "DisplayToAll": 0,
      "IgnoreDiscountUplift": 0,
      "DisplayOnly": 0,
      "DisplayMultiCurrencies": 0,
      "StartDate": "2014-01-01",
      "ExpirationDate": "2015-03-05",
      "CountryCurrency": [
        {
          "CurrencyCountry": "GB",
          "CurrencyCode": "EUR",
          "Price": "1200.00",
          "DefaultPrice": 1
        },
        {
          "CurrencyCountry": "US",
          "CurrencyCode": "USD",
          "Price": "1000.00",
          "DefaultPrice": 0
        }
      ],
      "AttendeeGroups": [
        {
          "GroupID": 5
        },
        {
          "GroupID": 6
        },
        {
          "GroupID": 7
        }
      ]
    }
  ]
}

– Update to PricingObject.PriceType =”Alphanumeric”

https://apibeta.viewcentral.com/api/course/30/Price/Row/391

{
  "PriceRecord": [
    {
      "PriceName": "API Price updated",
      "Description": "Descr",
      "IsListPrice": 0,
      "AlwaysDisplay": 0,
      "DisplayToAll": 0,
      "IgnoreDiscountUplift": 0,
      "DisplayOnly": 0,
      "DisplayMultiCurrencies": 0,
      "StartDate": "2014-01-01",
      "ExpirationDate": "2015-03-05",
      "Otherprice": "Free Sampler",
      "AttendeeGroups": [
        {
          "GroupID": 5
        },
        {
          "GroupID": 6
        },
        {
          "GroupID": 7
        }
      ]
    }
  ]
}
  1. Update: partial pricing object i.e. country/currency/pricing – this is created so it can support update through import functionality as well as outside of the UI. If the update is successful then a “Get course pricing data by Course ID” will be provided in the response.

End point URL: PUT /Courses/<CourseID>/Country/Price/Row/<rowID>

https://apibeta.viewcentral.com/api/course/6/Country/Price/Row/394

Example

{
  "PriceRecord": [
    {
      "CountryCurrency": [
        {
          "Price": "20.00",
          "CurrencyCode": "USD",
          "CurrencyCountry": "US",
          "Defaultprice": 1
        },
        {
          "Price": "30.00",
          "CurrencyCode": "FRF",
          "CurrencyCountry": "FR",
          "Defaultprice": 0
        }
      ]
    }
  ]
}

For a complete list of error codes, please review the section “LTO REST API Reference – System Error Codes”, which is available toward the end of this document.

Response Examples

Below are examples to give a sense of how the responses are structured and formatted

Example 1:  Incorrect authentication information is provided in any operation

GET pricing by Course ID

HTTP Status: 401

Response:

{
  "Success": false,
  "Error": {
    "Code": "AUTHENTICATION_FAILED ",
    "Message": "Request authentication/Authorization failed",
    "MessageDetail": "Authentication failed. Incorrect company login ID, product ID, username or password provided."
  },
  "Data": null
}

Example 2:  3 errors found (incorrect data format, duplicate record and restriction record errors found) creating pricing object)

HTTP Status: 400

Response:

{
  "Success": false,
  "Error": [
    {
      "Code": "INVALID_DATA_FORMAT",
      "Message": "Value supplied is not in the acceptable data format",
      "MessageDetail": "Price should be numeric"
    },
    {
      "Code": "INVALID_DATA_DUPLICATE",
      "Message": "Duplicate record found",
      "MessageDetail": "Cannot have duplicate value for country, currency code and pricing for same course"
    },
    {
      "Code": "INVALID_DATA_REFERENCE_CODE",
      "Message": "Reference code supplied is invalid",
      "MessageDetail": "Currency Code should be only 3-characters"
    }
  ]
}

LTO REST API Reference – System Error Codes

Note: the LTO API does not currently support localized error messages

Error Code Error Message
INVALID_REQUEST Invalid Request
AUTHENTICATION_FAILED Request authentication/Authorization failed
VALIDATION_FAILED Request validation process failed
INVALID_DATA_TYPE Value supplied is not in the acceptable data type
INVALID_DATA_FORMAT Value supplied is not in the acceptable data format
INVALID_DATA_RANGE Value supplied is not in the acceptable range
INVALID_DATA_LENGTH Value supplied is not in the acceptable length
INVALID_DATA_REFERENCE_CODE Reference code supplied is invalid
INVALID_DATA_REFERENCE_OBJECT Reference object supplied is invalid
INVALID_DATA_DUPLICATE Duplicate record found
REQUIRED_DATA_MISSING Required data missing

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of Litmos.

The information contained herein may be changed without prior notice. Some software products marketed by Litmos and its distributors contain proprietary software components of other software vendors. National product specifications may vary.

These materials are provided by Litmos for informational purposes only, without representation or warranty of any kind, and Litmos or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for Litmos company products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.

In particular Litmos or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation, and Litmos or its affiliated companies’ strategy and possible future developments, products, and/or platform directions and functionality are all subject to change and may be changed by Litmos or its affiliated companies at any time for any reason without notice.

The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, and they should not be relied upon in making purchasing decisions.

© 2022 Litmos or a Litmos affiliate company. All rights reserved.

Litmos and other Litmos products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Litmos (or a Litmos affiliate company) in the United States and other countries. All other product and service names mentioned are the trademarks of their respective companies.

Match keywords.

Useful Links

  • Release Notes
  • Customer Portal

In this article

Related articles

  1. LTO REST API: Schedule Pricing (Get, Create, Update)
  2. LTO REST API: Attendee (Get Create, Update, Delete)
  3. LTO REST API: Organization (Get, Create, Update, Delete)

Also of Interest

  • Microsoft eLearning Software
  • Free eLearning Platform
  • SCORM-compliant Learning Management System (LMS)
  • Corporate LMS
  • Enterprise Learning Management System
  • LMS Platform
  • eLearning Platform
  • What is a learning management system?
  • See Additional Resources

Solutions by Use Case

  • Employee Training
  • Customer Training
  • Compliance Training
  • Sales Training
  • Operations Training
  • Gig Worker Training
  • Contractor Training
  • Supplier Training

Solutions by Industry

  • Technology
  • Nonprofit
  • Retail
  • Hospitality
  • Healthcare

Contact Us

Contact
UK: +44 20 4551 1606
USA: +1 925 490 0401
AUS: +61 3 7066 4851
Email
Support
Address
Contact Us
Litmos Reviews Litmos Reviews
Litmos Careers Careers

© 2023 Litmos US, L.P. and affiliates. All rights reserved.

  • Privacy Statement
  • Terms & Conditions
  • Website Terms