ATD Sandbox API

This is a sandbox environment.

Get all Publications

Return all publications (books and magazines) grouped in formats (Paperback, digital).

The product data is real but some data is dummy (communities of practice, series, business categories, keywords and total number of items).

Endpoint

GET /Publications/Index;

Parameters

  • page
  • pageSize

Get all Education Programs

Return all education programs and the courses related to each one.

Endpoint

GET /EducationPrograms/Index;

Parameters

  • page
  • pageSize

Get all generic products

Return all products that are not publications or education programs

Endpoint

GET /GenericProducts/Index;

Parameters

  • page
  • pageSize

Get publication product

Return a publication product

Endpoint

GET /ProductInformation/PublicationProduct;

Parameters

  • productId
  • productCode

At least one of the parameters is required.

Sample Requests

/ProductInformation/PublicationProduct?productId=10367405

Get generic product

Return a product

Endpoint

GET /ProductInformation/Index;

Parameters

  • productId
  • productCode

At least one of the parameters is required.

Sample Requests

/ProductInformation/Index?productId=10367405

List shopping cart items

Return all products from a user shopping cart

Endpoint

GET /ShoppingCart/List;

Parameters

  • customerNumber (required)
  • isMember (optional)

Sample Requests

/ShoppingCart/List?customerNumber=11191404

The above URL lists the shopping cart for the user "[email protected]", customerNumber 11191404.


Add items to shopping cart

Add one or more products to cart

Endpoint

GET /ShoppingCart/AddToCart;

Parameters

  • customerNumber (required)
  • productId[] (required)
  • rateCode (required)
  • rateStructure (required)
  • extraCop (optional)
  • useMemberBenefit (optional)
  • quantity (optional)

Sample Requests

/ShoppingCart/AddToCart?customerNumber=11191404&productId=10367405&rateCode=STD&rateStructure=LIST&quantity=1

The above URL adds a book to the cart for the user "[email protected]", customerNumber 11191404.

Get Customer information

Get customer information based on the Customer Number

Endpoint

GET /Customer/GetCustomer;

Parameters

  • customerNumber (required)

Sample Request

/Customer/GetCustomer?masterCustomerId=11125725

Get all Customers

Return all Customers. If the updateDate parameter is present, it returns all customers that were added or modified after the date

Endpoint

GET /Customer/GetAllCustomers;

Parameters

  • page
  • pageSize
  • UpdateDate (format yyyy-MM-ddTHH:mm:ssZ)

Get closest chapters

Takes a latitude and a longitude and returns the 5 closest chapters

Endpoint

GET /Chapter/GetClosestChapters;

Parameters

  • lat
  • lng

Both parameters are required.

Sample Requests

/Chapter/GetClosestChapters?lat=32.3546679&lng=-89.3985283

Get all chapters

Return all chapters

Endpoint

GET /Chapter/GetChapters;

Get Customer digital orders

Get customer digital orders which includes all benefits and downloads

Endpoint

GET /Customer/GetDownloads;

Parameters

  • customerNumber (required)

Sample Request

/Customer/GetDownloads?masterCustomerId=11125725


Create free PDF download order

Create a "free download" order for an eligible customer

Endpoint

POST /Benefit/DownloadFreeProduct;

Parameters

  • customerNumber
  • productId*

*E-book productId. Identified by the proper format (PDF) in the product data

Sample request

curl -X POST -H "Cache-Control: no-cache" -H "Postman-Token: ba8b6570-526f-ee9a-5029-8959d39049be" -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" -F "customerNumber=11125725" -F "productId=16125806" "http://api-sandbox.td.org/Benefit/DownloadFreeProduct"

Response

{  
   "customerName":"Joel Verona Oliveira",
   "orderDate":"Jan 24, 2017",
   "orderNumber":"9004748404",
   "masterCustomerId":"11125725",
   "subCustomerId":0,
   "orderLineNumber":1,
   "productId":16125806,
   "productTitle":"Building Compliance Training That Actually Matters",
   "productSubTitle":"",
   "imgSrc":"//shop.td.org/WebFiles/ProductImages/16125806.Def.L.png",
   "formats":[  
      {  
         "fileId":16125823,
         "limitDownload":false,
         "downloadsAllowed":5,
         "downloaded":0,
         "fileExtension":"pdf",
         "fileExtensionDisplay":"PDF",
         "enabled":true,
         "downloadsRemaining":5
      }
   ],
   "success":true,
   "errorMessage":null,
   "productUrl":"https://www.td.org/Publications/TD-at-Work/2017/Building-Compliance-Training-That-Actually-Matters"
}
        

Claim benefit

Create a benefit order for a customer

Endpoint

POST /Benefit/Claim;

Parameters

  • customerNumber
  • productId*

*E-book productId. Identified by the proper format (PDF) in the product data

Sample request

curl -X POST -H "Cache-Control: no-cache" -H "Postman-Token: d11acf18-d51f-812c-4e90-71f8f24c69d4" -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" -F "customerNumber=11125725" -F "productId=12262877" "http://api-sandbox.td.org/Benefit/Claim"

Response

  {
   "customerName":"Joel Verona Oliveira",
   "orderDate":"Jul 21, 2016",
   "orderNumber":"9004555895",
   "masterCustomerId":"11125725",
   "subCustomerId":0,
   "orderLineNumber":1,
   "productId":12262877,
   "productTitle":"Ready, Set, Curate (PDF)",
   "productSubTitle":"",
   "imgSrc":"//shop.td.org/WebFiles/ProductImages/12262877.Def.L.png",
   "formats":[
      {
         "fileId":12263002,
         "limitDownload":true,
         "downloadsAllowed":5,
         "downloaded":0,
         "fileExtension":"pdf",
         "fileExtensionDisplay":"PDF",
         "enabled":true,
         "downloadsRemaining":5
      },
      {
         "fileId":12870877,
         "limitDownload":true,
         "downloadsAllowed":5,
         "downloaded":0,
         "fileExtension":"epub",
         "fileExtensionDisplay":"EPUB",
         "enabled":true,
         "downloadsRemaining":5
      },
      {
         "fileId":12870880,
         "limitDownload":true,
         "downloadsAllowed":5,
         "downloaded":0,
         "fileExtension":"mobi",
         "fileExtensionDisplay":"Kindle",
         "enabled":true,
         "downloadsRemaining":5
      }
   ],
   "success":true,
   "errorMessage":null,
   "productUrl":"https://www.td.org/Store/Product?ProductId=12262877"
}
        

Claim Free Product ($0 member price)

Create a free order for a customer

Endpoint

POST /Benefit/DownloadFreeProduct;

Parameters

  • customerNumber
  • productId*

*E-book productId. Identified by the proper format (PDF) in the product data

Sample request

curl -X POST -H "Cache-Control: no-cache" -H "Postman-Token: d11acf18-d51f-812c-4e90-71f8f24c69d4" -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" -F "customerNumber=11125725" -F "productId=12262877" "http://api-sandbox.td.org/Benefit/DownloadFreeProduct"

Response

  {
   "customerName":"Joel Verona Oliveira",
   "orderDate":"Jul 21, 2016",
   "orderNumber":"9004555895",
   "masterCustomerId":"11125725",
   "subCustomerId":0,
   "orderLineNumber":1,
   "productId":12262877,
   "productTitle":"Ready, Set, Curate (PDF)",
   "productSubTitle":"",
   "imgSrc":"//shop.td.org/WebFiles/ProductImages/12262877.Def.L.png",
   "formats":[
      {
         "fileId":12263002,
         "limitDownload":true,
         "downloadsAllowed":5,
         "downloaded":0,
         "fileExtension":"pdf",
         "fileExtensionDisplay":"PDF",
         "enabled":true,
         "downloadsRemaining":5
      },
      {
         "fileId":12870877,
         "limitDownload":true,
         "downloadsAllowed":5,
         "downloaded":0,
         "fileExtension":"epub",
         "fileExtensionDisplay":"EPUB",
         "enabled":true,
         "downloadsRemaining":5
      },
      {
         "fileId":12870880,
         "limitDownload":true,
         "downloadsAllowed":5,
         "downloaded":0,
         "fileExtension":"mobi",
         "fileExtensionDisplay":"Kindle",
         "enabled":true,
         "downloadsRemaining":5
      }
   ],
   "success":true,
   "errorMessage":null,
   "productUrl":"https://www.td.org/Store/Product?ProductId=12262877"
}
        

Get Customer claimed benefits

Get customer digital orders - Benefits only

Endpoint

GET /Customer/GetClaimedBenefits;

Parameters

  • customerNumber (required)

Sample Request

/Customer/GetClaimedBenefits?masterCustomerId=11125725

Add membership to shopping cart

Add membership to shopping cart

Endpoint

GET /ShoppingCart/AddMembershipToCart;

Parameters

  • customerNumber (required)
  • membershipProduct (required) - Product Code
  • communites (optional)
  • extra (optional) - Extra product code - DINFO for the TD at Work subscription
  • membershipProductRateCode (optional)
  • autoRenew (boolean) (optional)
  • goGreen (boolean) (optional)

Sample Requests

/ShoppingCart/AddMembershipToCart?customerNumber=11191404&membershipProduct=PLUS&extra=DINFO&goGreen=True

The above URL adds a membership to the cart for the user "[email protected]", customerNumber 11191404.

Download free product

Create a complementary order for a customer. It only creates the order if the user has access to the access group and if the product is eligible

Endpoint

POST /Benefit/DownloadFreeProduct;

Parameters

  • customerNumber
  • productId*

*E-book productId. Identified by the proper format (PDF) in the product data

Sample request

curl -X POST -H "Cache-Control: no-cache" -H "Postman-Token: d11acf18-d51f-812c-4e90-71f8f24c69d4" -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" -F "customerNumber=11125725" -F "productId=12262877" "http://api-sandbox.td.org/Benefit/DownloadFreeProduct"

Response

  {
   "customerName":"Joel Verona Oliveira",
   "orderDate":"Jul 21, 2016",
   "orderNumber":"9004555895",
   "masterCustomerId":"11125725",
   "subCustomerId":0,
   "orderLineNumber":1,
   "productId":12262877,
   "productTitle":"Ready, Set, Curate (PDF)",
   "productSubTitle":"",
   "imgSrc":"//shop.td.org/WebFiles/ProductImages/12262877.Def.L.png",
   "formats":[
      {
         "fileId":12263002,
         "limitDownload":true,
         "downloadsAllowed":5,
         "downloaded":0,
         "fileExtension":"pdf",
         "fileExtensionDisplay":"PDF",
         "enabled":true,
         "downloadsRemaining":5
      },
      {
         "fileId":12870877,
         "limitDownload":true,
         "downloadsAllowed":5,
         "downloaded":0,
         "fileExtension":"epub",
         "fileExtensionDisplay":"EPUB",
         "enabled":true,
         "downloadsRemaining":5
      },
      {
         "fileId":12870880,
         "limitDownload":true,
         "downloadsAllowed":5,
         "downloaded":0,
         "fileExtension":"mobi",
         "fileExtensionDisplay":"Kindle",
         "enabled":true,
         "downloadsRemaining":5
      }
   ],
   "success":true,
   "errorMessage":null,
   "productUrl":"https://www.td.org/Store/Product?ProductId=12262877"
}
        

Download PDF product

Retrieves the actual file

Endpoint

GET /ProductDownload/Index;

Parameters

  • masterCustomerId (required)
  • subCustomerId (required)
  • orderNumber
  • orderLineNumber
  • productId (required)
  • fileId (required)
  • emailAddress (optional)

Sample request

/ProductDownload?masterCustomerId=11125725&subCustomerId=0&orderNumber=9004555892&orderLineNumber=1&productId=13997930&fileid=13997946

The above URL check if the user is allowed to download the file, create a log for user downloaded files, decrement the avilable downloads, and return the file location.

Questionnaire

Retrieves Questionnaire based on the product code

Endpoint

GET /Questionnaire/GetQuestionnaire;

Parameters

  • productId (required)
  • masterCustomerId (required)

Sample request

/Questionnaire/GetQuestionnaire?productId=21377808&masterCustomerId=1125725

The above URL gets all Questionnaire for passed Product ID and MasterCustomerID.

Access Code Order

Creating an order with a passed Access Code

Endpoint

POST /Order/AccessCode;

Parameters

  • masterCustomerId (required)
  • accessCode (required)

Sample request

curl -X POST -H "Cache-Control: no-cache" -H "Postman-Token: d11acf18-d51f-812c-4e90-71f8f24c69d4" -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" -F "masterCustomerId=11125725" -F "accessCode=testcode" "https://api-sandbox.td.org/Order/AccessCode"

Response

        {
    "internalKey": null,
    "navigationKey": null,
    "isValid": true,
    "message": "",
    "orderNumber": "9005473916",
    "operationResult": null
}
        

Get Conference Event

Retrieves Conference Event from ConferenceData based on the Location Id for the conference schedule

Endpoint

GET /Conference/GetConferenceData;

Parameters

  • locationId (required)

Sample request

/Conference/GetConferenceData?locationId=12

The above URL gets all Conference Event data for passed Location ID.