API

The LearningCart Enterprise API allows you to programmatically interact with your LearningCart site on an advanced level. These features are only available to enterprise customers. Endpoints listed below are for reference only. Please contact support for appropriate API endpoints for enterprise environments.

The first step in working with the API is to create an admin account specifically for your API access. This can be done by going to the Manage Users section of the left hand admin navigation menu and then selecting Admins. You can then click the Add Administrator button and create your new account.

Once that is done please use the ticket system (which is accessible via the help icon in the top right hand corner of your admin) to request API access. Make sure to reference the account you created so we can associate the correct permissions. Once we confirm you are setup you are ready to begin coding with our API.  


Authentication 

Request Token
GET - https://cdn.learningcart.com/CDNService.svc/requestToken

Arguments

  • string sitehostname
  • string username
  • string password

Returns

  • AuthenticationToken

*Note: sitehostname will be the domain, such as example.com, almost always set up without a www, but the exact value will be given when access is set up. Username is the email address of the admin account chosen to have set up with access. Once a token has been retrieved, it can be used for access to the rest of the end points.


Orders

Get Order
GET - https://cdn.learningcart.com/CDNService.svc/getOrderByID

Arguments

  • string AuthenticationToken
  • string orderid

Returns

  • Order


Get Orders By Date
GET - https://cdn.learningcart.com/CDNService.svc/getOrdersByDate

Arguments

  • string AuthenticationToken
  • DateTime BeginDate (not required)
  • DateTime EndDate (not required)

Returns

  • List<Order>

*Note: Omitting BeginDate defaults the date to 1 week ago, omitting the EndDate defaults it to Now.

Add Order
POST - https://cdn.learningcart.com/CDNService.svc/addOrder

Arguments

  • string AuthenticationToken
  • int CustomerID
  • List<ShoppingCartItem> ShoppingCart
  • string OrderComments (not required)
  • bool ZeroGrandTotal

Returns

  • Order

*Note: A valid Customer ID must be supplied. ShoppingCart is a list of objects of PriceID, Quantity, and Options. Sample json would look like
"ShoppingCart": [
        {
            "PriceID": "471",
            "Quantity": "10",
            "Options": ""
        },
        {
            "PriceID": "472",
            "Quantity": "1",
            "Options": ""
        }
]


Add Comped Order
GET - https://cdn.learningcart.com/CDNService.svc/addCompOrder

Arguments

  • string AuthenticationToken
  • int CustomerID
  • int PriceID
  • string OrderComments (not required)

Returns

  • Order

*Note: A valid Customer ID and Price ID must be supplied.


Update Order Status
POST - https://cdn.learningcart.com/CDNService.svc/updateOrderStatus

Arguments

  • string AuthenticationToken
  • int OrderID
  • string Status

Registration Codes

Get Registration Codes
GET - https://cdn.learningcart.com/CDNService.svc/getRegistrationCodes

Arguments

  • string AuthenticationToken
  • int CustomerID

Returns

  • List<RegistrationCodeOverview>

*Note: A valid Customer ID must be supplied.

Assign Registration Code
GET - https://cdn.learningcart.com/CDNService.svc/assignRegistrationCode

Arguments

  • string AuthenticationToken
  • int CustomerID
  • string RegistrationCode

Returns

  • boolean

*Note: A valid Customer ID and valid Registration Code must be supplied.

Remove Registration Code
GET - https://cdn.learningcart.com/CDNService.svc/removeRegistrationCode

Arguments

  • string AuthenticationToken
  • int CustomerID
  • string RegistrationCode

Returns

  • boolean

*Note: A valid Customer ID and valid Registration Code must be supplied.

Customers

Add Customer
GET - https://cdn.learningcart.com/CDNService.svc/addCustomer

Arguments

  • string AuthenticationToken
  • string FirstName
  • string LastName
  • string Email
  • string UserName
  • string Password
  • string Address1
  • string Address2
  • string City
  • string State
  • string Province
  • string Zip
  • string CountryName
  • string ShippingAddress1
  • string ShippingAddress2
  • string ShippingCity
  • string ShippingState
  • string ShippingProvince
  • string ShippingZip
  • string ShippingCountryName

Returns

  • Customer

*Note: Only AuthenticationToken and Email are required to be non-empty strings. Passing an Email that belongs to an existing Customer will return that Customer, not create a new one. Including any non-empty string values with an existing customer will update that customer with those new values.

Creating a Customer without a password will generate a random password, which will be included in the Customer response. Customer object has a isNew bit field to notify if the Customer was either created or simply retrieved/updated.

Add Customer With Locale
GET - https://cdn.learningcart.com/CDNService.svc/addCustomerWithLocale

This endpoint takes the exact same arguments as addCustomer with the addition of int LocaleID.

Add Update Customer
POST - https://cdn.learningcart.com/CDNService.svc/addUpdateCustomer

This endpoint takes the exact same arguments as addCustomerWithLocale, but it is a POST call.

Add Customer To Group
GET - https://cdn.learningcart.com/CDNService.svc/addCustomerToGroup

Arguments

  • string AuthenticationToken
  • int CustomerID
  • int GroupID
  • bool isAdmin (not required. Default false)

Returns

  • bool

*Note: By default, API users can not assign a customer to a group as an admin. LearningCart has to be notified if that API user is to be given that access.

Products

Add Product
POST - https://cdn.learningcart.com/CDNService.svc/addProduct

Arguments

  • string AuthenticationToken
  • string ProductName
  • string ProductDescription
  • string ShortDescription
  • decimal Shipping
  • decimal ShippingInternational
  • decimal ShippingWeight
  • bool Taxable
  • bool Active
  • bool Hidden
  • string ProductURL
  • string RedirectURL
  • string CustomField1
  • string CustomField2
  • string CustomField3
  • string CustomField4
  • string CustomField5
  • string CustomField6

Returns

  • Int ProductID

Update Product
POST - https://cdn.learningcart.com/CDNService.svc/updateProduct

Arguments

  • string AuthenticationToken
  • int ProductID
  • string ProductName
  • string ProductDescription
  • string ShortDescription
  • decimal Shipping
  • decimal ShippingInternational
  • decimal ShippingWeight
  • bool Taxable
  • bool Active
  • bool Hidden
  • string ProductURL
  • string RedirectURL
  • string CustomField1
  • string CustomField2
  • string CustomField3
  • string CustomField4
  • string CustomField5
  • string CustomField6

Add Product Price
POST - https://cdn.learningcart.com/CDNService.svc/addProductPrice

Arguments

  • string AuthenticationToken
  • int ProductID
  • decimal Price
  • string PriceName
  • int Duration
  • int ReoccurCount
  • bool GenerateRegistrationCodes
  • int TrialPeriod
  • datetime EventStartDate
  • datetime EventEndDate
  • datetime AvailabilityEndDate
  • datetime AvailabilityStartDate
  • int AvailableQuantity
  • string SKU
  • string UPC
  • string ISBN
  • string PriceAddress
  • string PriceCity
  • string PriceState
  • string PriceProvince
  • string PricePriceZip
  • string PriceCountry
  • string[] AvailableToGroups
  • string[] PlacePurchaserInGroups

Returns

  • int PriceID

Update Product Price
POST - https://cdn.learningcart.com/CDNService.svc/updateProductPrice

Arguments

  • string AuthenticationToken
  • int PriceID
  • int ProductID
  • decimal Price
  • string PriceName
  • int Duration
  • int ReoccurCount
  • bool GenerateRegistrationCodes
  • int TrialPeriod
  • datetime EventStartDate
  • datetime EventEndDate
  • datetime AvailabilityEndDate
  • datetime AvailabilityStartDate
  • int AvailableQuantity
  • string SKU
  • string UPC
  • string ISBN
  • string PriceAddress
  • string PriceCity
  • string PriceState
  • string PriceProvince
  • string PricePriceZip
  • string PriceCountry
  • string AvailableToGroups
  • string PlacePurchaserInGroups

Get Product
GET - https://cdn.learningcart.com/CDNService.svc/getProduct

Arguments

  • string AuthenticationToken
  • int ProductID

Get Product Price
GET - https://cdn.learningcart.com/CDNService.svc/getProductPrice

Arguments

  • string AuthenticationToken
  • int PriceID

Set Product Courses
POST - https://cdn.learningcart.com/CDNService.svc/setProductCourses

Arguments

  • string AuthenticationToken
  • int ProductID
  • int[] CourseIDs

*Note: This call will remove any Courses attached to this product and add the Courses supplied in the call.

Discounts

Add Discount
POST - https://cdn.learningcart.com/CDNService.svc/addDiscount

Arguments

  • string AuthenticationToken
  • string DiscountCode
  • string DiscountAmount
  • decimal MinimumAmount
  • bool SingleUse
  • DateTime StartDate
  • DateTime EndDate
  • int NumberOfCodes
  • int ProductID (optional)
  • int PriceID  (optional) 
  • int CategoryID  (optional) 

Returns

  • List<Discount>

*Note:

  1. When DiscountCode is an empty string, a random code will be generated. If a specific DiscountCode is supplied, then NumberOfCodes will be ignored, and only 1 code will be generated. To generate multiple codes, set DiscountCode to an empty string. 
  2. DiscountAmount can either be a decimal value to represent a specific amount off (e.g. 10.00), or a percent value. For percents, include the percent symbol. For example, 50%.

Delete Discount
POST - https://cdn.learningcart.com/CDNService.svc/deleteDiscount

Arguments

  • string AuthenticationToken
  • string DiscountCode


Completions

Get Completions
GET - https://cdn.learningcart.com/CDNService.svc/getCompletions

Arguments

  • string AuthenticationToken
  • DateTime BeginDate
  • DateTime EndDate

Returns

  • List<CourseCompletionInfo>

*Note: Report returns Customers who’ve either began or completed training within the date range given. A Status field is returned either 0 for began training, 1 for completed. API User can optionally be set up to only report specific Course IDs, Group IDs, a “Manager” Customer ID, and a maximum days date span for the begin and end dates.

Add Completion
Post - https://cdn.learningcart.com/CDNService.svc/addCompletion

Arguments

  • string AuthenticationToken
  • int ModuleID
  • int CustomerID
  • string Status
  • int Score
  • DateTime StartDate
  • DateTime CompleteDate

Object Definitions/Return Values

AuthenticationToken

  • Guid "Authentication Token"
  • DateTime "Issue Date"
  • DateTime "Expiration Date"
  • string "Issue Date String"
  • string "Expiration Date String"

Order

  • int "Order ID"
  • DateTime "Order Date"
  • decimal "Grand Total"
  • decimal "Product Total"
  • decimal "Shipping"
  • decimal "Tax"
  • string "Shipping Address"
  • string "Order Status"
  • string "Customer Comments"
  • decimal "Discount"
  • decimal "Full Grand Total"
  • string "Order Date String"
  • List<OrderDetail> OrderDetails
  • Customer Customer

OrderDetail

  • int "Order Detail ID"
  • decimal "Shipping"
  • decimal "Price"
  • string "options"
  • int "Quantity"
  • decimal "Original Price"
  • Product Product
  • ProductAccessInfo ProductAccessInfo

Product

  • string "Product Name"
  • int "Product ID"
  • decimal "Price"
  • decimal "Employee Price"
  • decimal "Shipping"
  • decimal "Shipping Intl"
  • decimal "Weight"
  • string "Price Name"
  • DateTime "Event Start Date"
  • DateTime "Event End Date"
  • string "Custom Field 1"
  • string "Custom Field 2"
  • string "Custom Field 3"
  • string "Custom Field 4"
  • string "Custom Field 5"
  • string "Custom Field 6"
  • string "SKU"
  • string "UPC"
  • string "ISBN"
  • string "Additional Details"
  • string "Event Start Date String"
  • string "Event End Date String"

ProductPrice

  • int "Price ID"
  • string "Price Name"
  • decimal "Price"
  • int "Duration"
  • int "Trial Period"
  • int "Reoccur Count"
  • DateTime "Event Start Date"
  • DateTime "Event End Date"
  • DateTime "Availability Start Date"
  • DateTime "Availability End Date"
  • string "Available Quantity"
  • string "SKU"
  • string "UPC"
  • string "ISBN"
  • string "Price Address"
  • string "Price City"
  • string "Price State"
  • string "Price Province"
  • string "Price Zip"
  • string "Price Country"
  • string "Additional Details"
  • string "Event Start Date String"
  • string "Event End Date String"
  • string "Availability Start Date String"
  • string "Availability End Date String"
  • Product Product

ProductInfo

  • string "Product Name"
  • int "Product ID"
  • decimal "Price"
  • decimal "Employee Price"
  • decimal "Shipping"
  • decimal "Shipping Intl"
  • decimal "Weight"
  • string "Price Name"
  • DateTime "Event Start Date"
  • DateTime "Event End Date"
  • string "Custom Field 1"
  • string "Custom Field 2"
  • string "Custom Field 3"
  • string "Custom Field 4"
  • string "Custom Field 5"
  • string "Custom Field 6"
  • string "SKU"
  • string "UPC"
  • string "ISBN"
  • string "Additional Details"
  • string "Event Start Date String"
  • string "Event End Date String"

Discount

  • int "Discount ID"
  • string "Discount Code"
  • decimal "Discount Amount"
  • decimal "Discount Percentage"
  • decimal "Minimum Amount"
  • DateTime "Start Date"
  • DateTime "End Date"
  • string "Category"
  • bool "Single Use"
  • Product Product
  • ProductPrice ProductPrice

ProductAccessInfo

  • DateTime "Start Date"
  • DateTime "Expiration Date"
  • int "Status"
  • DateTime "Create Date"
  • string "Edited"
  • string "Start Date String"
  • string "Expiration Date String"
  • string "Create Date String"

Course

  • int "Course ID"
  • string "Course Name"
  • string "Description"
  • string "CEUs"
  • string "Course Level"
  • string "Course Location"
  • string "AdditionalCertificateText"
  • string "Course Identifier"

CourseCompletionInfo

  • DateTime "Start Date"
  • DateTime "Completed Date"
  • int "Status"
  • int "Score"
  • string "Start Date String"
  • string "Completed Date String"
  • Course Course
  • Customer Customer

Customer

  • "Customer ID"
  • string "First Name"
  • string "Last Name"
  • string "Email"
  • string "User Name"
  • string "Password"
    *Note: Password is always returned NULL on existing customers. It is only returned with a value on new customers.
  • string "Address 1"
  • string "Address 2"
  • string "City"
  • string "State"
  • string "Province"
  • string "Zip"
  • string "Country Name"
  • string "Shipping Address 1"
  • string "Shipping Address 2"
  • string "Shipping City"
  • string "Shipping State"
  • string "Shipping Province"
  • string "Shipping Zip"
  • string "Shipping Country Name"
  • bool "isNew"

ShoppingCartItem

  • int PriceID
  • int Quantity
  • string Options

Powered by LearningCart.
Privacy Policy | Terms