Before you can consume REST services you must create a user:
Log into CourseSales.com
Select Setup on the top row of the Ribbon
Select the large Logins icon
A user with the username SoapSoap is usually created when a CourseSales.com account is first set up - see if you can find this user, and click the Edit icon. If there is no SoapSoap user then click New on the Ribbon to create a new user. (Note, if you end up with two soap users you may have problems later - you can use the advanced filter to see how many soap users you have, filter without a status).
Make sure the user has a valid username, that a password has been set (you will need this password later), and that the user has Status of Active. Also make sure the CourseSales.com Internal Type is Soap.
Save the record.
The location / URI is:
The URI accepts a JSON encoded array as its only parameter, and the function returns a JSON encoded array.
You must specify login details in the request, by adding them to the lowest level of the array:
eg in PHP this would be:
$parameters = array(); $parameters[‘LoginUsername’] = ‘yourSoapUsername’; $parameters[‘LoginPassword’] = ‘yourSoapPassword’;
Worked example for PHP
$parameters = array();
$parameters[‘LoginUsername’] = ‘yourSoapUsername’; $parameters[‘LoginPassword’] = ‘yourSoapPassword’;
return ‘https://[yoursubdomain].coursesales.com/rest/index?’. json_encode( $parameters );