Skip to main content

Shopping

Integrating with ticketing systems

We recommend using the Shopping portal for provisioning software, but if you already have established process in place and only want to use Shopping for its delivery features, Shopping provides the following integration methods.

When invoking the POST APIs, make sure that UserAgent for the request is set to mimic a browser's user agent, for example. Mozilla/5.0 (Windows NT 6.2; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0

Add "X-Requested-With" header to the request with value set to "XMLHttpRequest" while invoking the POST APIs.

Requestitems/GetAllApplicationsInfo

Gets a list of all the applications in the system.

Type

GET

Usage

URL: [ShoppingBaseUrl]/Requestitems/GetAllApplicationsInfo?responseFormat=xml

Input Parameters

responseFormat – the default response is in JSON format but can be set to XML with responseFormat=xml

Returns

Users/GetUsersInfo

Gets the user id.

Type

GET

Usage
  • To get user details with the userAccount and/or emailAccount parameter:

    URL: <ShoppingBaseUrl>/Users/GetUsersInfo?userAccount=<userAccount>&emailAccount=<emailAccount>&responseFormat=xml

    You need only use the userAccount or emailAccount parameter to get the user id. If both parameters are provided, userAccount takes precedence.

    or

  • To get user details with the emailAccount parameter:

    URL: <ShoppingBaseUrl>/Users/GetUsersFromEmail?emailAccount=<emailAddress>&responseFormat=xml
Input parameters
  • userAccount – the user account

  • emailAccount – the email address for the user

  • responseFormat – the default response is in JSON format but can be set to XML with responseFormat=xml

Returns
  • Returns the user id if one is found. Else returns an empty string.

  • Example JSON response format

    [{"FullName":"Administrator","Id":2,"ManagerAccount":"","ManagerEmail":"","ManagerFullName":"","UserAccount":"DEV26\\Administrator","UserEmail":"Administrator@DEV26.local","UserLanguage":"en-US","IsSccmUser":true}]
  • Example XML response format

    <ArrayOfUserInfo xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <UserInfo>
          <FullName>Administrator</FullName>
          <Id>2</Id>
          <ManagerAccount/>
          <ManagerEmail/>
          <ManagerFullName/>
          <UserAccount>DEV26\Administrator</UserAccount>
          <UserEmail>Administrator@DEV26.local</UserEmail>
          <UserLanguage>en-US</UserLanguage>
          <IsSccmUser>true</IsSccmUser>
       </UserInfo>
    </ArrayOfUserInfo>

Machines/GetMachineInfo

Gets information about the machine based its domain and machine name.

Type

GET

Usage
  • URL: <ShoppingBaseUrl>/Machines/GetMachineInfo?domainName=<domainName>&machineName=<machineName>&responseFormat=xml
Input parameters
  • domainName – the domain the machine is associated with

  • machineName – name of the machine

  • responseFormat – the default response is in JSON format but can be set to XML with responseFormat=xml

Returns
  • Example JSON response format

    [{"Id":2,"Name":"DEV26-CLIENT03"}]
  • Example XML response response format

    <ArrayOfMachineInfo xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <MachineInfo>
          <Id>2</Id>
          <Name>DEV26-CLIENT03</Name>
       </MachineInfo>
    </ArrayOfMachineInfo>

Orders/GetOrderStatus

Returns the status of a particular order.

Type
  • GET

Usage
  • URL: <ShoppingBaseUrl>/Orders/GetOrderStatus?requestRef=<requestRef>&responseFormat=xml
Input parameters
  • requestRef – the request reference of the order

  • responseFormat – the default response is in JSON format but can be set to XML with responseFormat=xml

Returns
  • Example JSON response

    {"OrderStatus":"Order Placed"}
  • Example XML response

    <?xml version="1.0" encoding="utf-8"?>
    <string>Order Placed</string>

RequestItem/PlaceOrder

Enables an order to be placed for a particular user and machine. The user and machine must already exist in the Shopping database for this method to succeed.

Type
  • POST

Usage
  • URL: <ShoppingBaseUrl>/RequestItem/PlaceOrder
Input parameters
  • applicationid – the application id to be installed. Derived from GetAllApplicationsInfo

  • machineid – the machine id the application is to be installed on. Derived from GetMachineInfo

  • userid – the user id requesting the application. Derived from GetUsersInfo

  • comments – optional parameter to capture comments from the user making the request

Returns
  • Returns the request reference if the order is successfully placed; else an empty string

Approver/ApprovePendingOrder

Approves a pending order. This method only supports the single approver workflow.

Type
  • POST

Usage
  • URL: <ShoppingBaseUrl>/Approver/ApprovePendingOrder
Input parameters
  • processingId – the processing id of the order pending approval. This parameter takes precedence over requestRef if present

  • requestRef – the request reference of the order pending approval. Derived from GetOrderStatus

  • comments – optional parameter to capture comments from the approver

Returns
  • Boolean – 1 if the order is approved and 0 if is it is declined

Approver/RejectPendingOrder

Rejects a pending order. This method only supports the single approver workflow.

Type
  • POST

Usage
  • URL: <ShoppingBaseUrl>/Approver/RejectPendingOrder
Input parameters
  • processingId – the processing id of the order pending approval. This parameter takes precedence over requestRef if present

  • requestRef – the request reference of the order pending approval. Derived from GetOrderStatus

  • comments – optional parameter to capture comments from the approver

Returns
  • Boolean – 1 if the order is rejected and 0 if it is not rejected