PUNCH-IN/OUT WEB SERVICE CALLS
pipoIsLoggedIn
Parameters: String:Token
Return Type: Boolean
A return value of true indicates that a user is currently logged in to the PrintNow system.
pipoLoginUser
Parameters: String:Username, String:Password
Return Type: String
If the login operation is successful, a user token will be returned; otherwise an empty string will be
returned.
pipoLogoutUser
Parameters: String:Token
Return Type: String
Upon logging out a new user token will be returned (currently always an empty string).
pipoGetUserInfo
Parameters: String:Token
Return Type: PrintnowUser
If no user is currently logged in, a null object is returned; if a user is currently logged in a PrintnowUser object is returned with the user’s basic information (id, name, company).
pipoSetUserInfo
Parameters: String:Token, String:CurrentPassword, String:NewPassword, String:FirstName,
String:LastName, Boolean:ShowToolTips
Return Type: PrintnowUser
If no user is currently logged in or the incorrect CurrentPassword is passed, a null object is returned; if a user is currently logged in a PrintnowUser object is returned with the user’s updated basic information (id, name, company). In cases where the account password does not need to be changed, just pass the same value to CurrentPassword and NewPassword.
Note: This function will not change user information for a temporary user account.
pipoGetUserProjects
Parameters: String:Token
Return Type: PrintnowProjects
If the token is invalid a null object is returned, otherwise a list of projects is returned which includes ids, names and various other project info.
pipoCreateUser
Parameters: String:Username, String:Password, String:Email, String:FirstName, String:LastName
Return Type: String
Upon completion of the user creation function the success/failure status message will be returned. Success messages are prepended with the string “Success:”, while failures are prepended with “Error:”.
pipoCreateTempUser
Parameters: N/A
Return Type: StringArray
If the temporary user creation operation fails, the first element in the string array will contain an error message; if the operation is successful, a string array with 2 elements will be returned (element 0 – temp username, element 1 – temp password).
pipoConvertTempUser
Parameters: String:Token, String:Username, String:Password, String:Email, String:FirstName,
String:LastName, Boolean:ShowToolTips
Return Type: PrintnowUser
This function is to convert a temporary user into a normal user account. If the conversion process is successful, a PrintnowUser object is returned with the updated user information; if the conversion fails a PrintnowUser object with the temporary user information is returned.
pipoTransferTempUser
Parameters: String:Token, String:Username, String:Password
Return Type: PrintnowUser
This function is meant to transfer a temporary user’s account to a full user account. For example: If a user was not logged in to a third party system before entering the flex editor, a temporary user account will automatically be created. Upon exiting the flex editor you may offer the user a choice between logging in to an existing account or checking out as a guest. If the user were to log in you could then transfer the temporary account to their normal user account while keeping the same token (and any images that were upload as the temp user). The Username and Password parameters should correspond to the account to be transferred to. If the transfer is successful, a PrintnowUser object will be returned with the transferred user info; otherwise a PrintnowUser object will be returned with the temporary user info.
pipoIsTempUser
Parameters: String:Token
Return Type: Boolean
A return value of false indicates that the user associated with the token is full user account, true indicates that the user is a temporary account (or that the user token is no longer valid).
Note: This should be used in conjunction with pipoIsLoggedIn to accurately determine whether an account is temporary or not.
pipoCreateOrder
Parameters: String:Token, IntegerArray:Products, String:ExternalProductId
Return Type: Integer
If no user is currently logged in or no products ids have been passed, then a return value of 0 (zero) will be returned to indicate that no order was created; otherwise the return value will be the id of the order created in the PrintNow system. The Products parameter should hold all of the product ids that are to be associated with this order. The ExternalProductId parameter in this context can be used to store an order identifier from a 3rd party system to assist in mapping an order between the PrintNow system and said 3rd party system. If the ExternalProductId is not to be used an empty string should be passed.
pipoProcessOrder
Parameters: String:Token, Integer:OrderId
Return Type: Boolean
indicates that the order processing operation has begun successfully. There are a few conditions which will prevent the order processing operation to fail:
The order processing operation fires off the indicated order to be merged. A return value of true
1) No user currently logged in
2) OrderId is not found in the PrintNow system
3) Logged in user does not match the user that placed the order
3rd Party Shopping Cart Integration
When editing products in the PrintNow AdminTools, each product has a field called Integration Id which allows for mapping a product to an indentifier in a 3rd party system. The usual way for sending a customers in to the flex editor is to redirect the browser to “FlexEditor.aspx?productid=123” where 123 is the product id to load from the PrintNow system, however to make it easier to integrate with our system you have the option to direct the user to “FlexEdit.aspx?epi=MyExternalProduct” where MyExternalProduct is the IntegrationId entered for a specific product. Also, the epi query string parameter needs to be url encoded.
More detailed information about the various protocols and request/response information can be found by visiting the web services description page (http://ws.yourdomainhere/PrintnowServices.asmx).