AccountingThis service provides methods that create, change or delete Users, Accounts and Groups. Most functionality provided here is also available using the Webview Interface. Please note that the fallback location does not offer all Accounting methods, see Implementing fallback for more information. Summary | | | These methods allow Webservices.nl partners to have their customers use our services, without having to handle account administration or registration of costs. | | Retrieve a token with which a new account may be registered via the Webview Interface by one of your customers. | | | | | | | | | | | | | | Returns the users balance. | | Change the user’s balance. | | Returns the accounts balance | | | | View the profile of a user. | | Edit the profile of a user. | | Edit the complete profile of a user. | | Create a user, assign it to groups and send it an activation mail. | | Change the current password of a user. | | | | Send a notification email to a user with a new password. | | | | List all groups that the current user can assign to the target user. | | | | Remove a user from a group. | | | | View the profile of an account. | | Edit the properties ( AccountV2) of an account. | | List all users in this account. | | Search for users of an account using a search phrase. | | | | Set host restrictions for the account | | View host restrictions for the account | | Set host restrictions for the user | | View host restrictions for the user | | | | | | | | | | | | Returns the number of credits a account has assigned. | | This method is deprecated and will be removed. | | add any complex types used by soap functions in this class | | | | | | | | | | | | | | | | | | |
Partner customer registrationThese methods allow Webservices.nl partners to have their customers use our services, without having to handle account administration or registration of costs. The customer registers his own account via our Webview Interface. As a partner you can set the credentials for this Account, enabling you to use the account within your application, on behalve of the customer. In short- Your customer registers himself on our platform and pays for his own account.
- Your application stores the account details for the customer’s Webservices.nl account, such as usernames and passwords.
- Our services become available to your application through the customer’s account.
Setting up a new customer accountIn order to set up the customer’s account correctly, a number of steps are required. Step-by-step customer account setup: 1 | A customer within your application needs to use our services, but doesn’t have a Webservices.nl account yet. Your application calls accountGetCreationToken to get a registration URL and a token. The token must be stored with the customer data in your application. | 2 | The customer is directed to our Webview Interface using the registration URL retrieved in the previous step. | 3 | A Webservices.nl account is registered and paid for by the customer. It is automatically associated with your partner account (the one used to call accountGetCreationToken). | 4 | Via a call to accountGetCreationStatus, the identifier of the new account is retrieved by your application. | 5 | Now that the new customer’s account identifier is known, your application can generate passwords for the account, and assign them using the accountUserListV2 and userChangePassword methods. Two Users are created for all accounts. Only one has access to our data services (‘customername_User’), the other is intended for the administration of the account. The customer’s account can now be used to call the webservices from your application. | 6 | When the customer is close to running out of balance on his Webservices.nl account (see accountViewBalance), use accountGetOrderToken to retrieve a token for accessing the order page in the Webview Interface. |
accountGetCreationTokenRetrieve a token with which a new account may be registered via the Webview Interface by one of your customers. The newly created account will be associated with your account. Tokens are only valid for a limited amount of time. Use accountGetCreationStatus to get the id of the account created using the token. Parametersreturn_url | This is the URL to which the customer is redirected after registering a Webservices.nl account. If a customer arrives at this URL the accountGetCreationStatus should be called to check if account creation was successful. |
ReturnsAn AccountCreationToken
accountGetCreationStatusGet the id of an account created with a token from accountGetCreationToken. Depending on the outcome of the account registration the following is returnedA value larger than 0 | The customer has successfully registered an account. The returned value is the account id of the new account. | A value of 0 | The customer has not yet finished the account registration process. It may be that Webservices.nl is awaiting confirmation of a payment performed by the customer. You should not retrieve a new account registration token, or direct the customer to the account registration page again. This could result in the customer registering and paying for an account that is never used. Instead, try calling accountGetCreationStatus again later. | A ‘Server.Data.NotFound’ error | This error indicates that the registration process was unsuccessful. See Error Handling::Error codes. You may start the registration process over by calling accountGetCreationToken. |
ParametersReturnsThe account id, which is 0 when the account registration has not finished yet
accountGetOrderTokenRetrieve a token that can be used order account balance via the Webview Interface. Parametersaccountid | The id of the account for which balance will be ordered | return_url | This is the URL to which the customer is redirected after finishing the order process. |
ReturnsAn AccountOrderToken
userSessionRemoveRemove all or one User::Session of a User. Parametersuserid | User ID of the user to view, use 0 for the current user | reactid | Session ID to remove, use 0 to remove all sessions |
ReturnsNothing See alsoAuthentication::logout
userSessionListLists all the current valid User::Sessions of a User. Parametersuserid | User ID of the user to view, use 0 for the current user | page | Page to retrieve, pages start counting at 1 |
Returns
userViewBalanceReturns the users balance. If the user is in the ‘autoassign’ user group, he is not restricted by his balance. In that case, he can still do method calls even though his balance amount is zero. If the user is not in the ‘autoassign’ user group, the user can spend his own balance amount, but not more. Parametersuserid | User ID of the user to view the balance of, use 0 for the current user |
ReturnsSee alsoaccountViewBalance, Balance
userEditBalanceChange the user’s balance. Parametersuserid | User ID of the user to edit the balance of, use 0 for the current user | balance | Amount of balance to add to (or remove from, if negative) the user |
ReturnsNothing See alsouserViewBalance
accountViewBalanceReturns the accounts balance Parametersaccountid | Account ID of the account to view the balance of, use 0 for the current account |
Returnsbalance | The accounts balance |
See alsoBalance
userViewV2View the profile of a user. Parametersuserid | User ID of the user to view, use 0 for the current user |
Returns
userEditV2Edit the profile of a user. This method allows Group::Account users to edit their own profile. Group::Account admins can use userEditExtendedV2 to change the complete profile. Parametersuserid | User ID of the user to edit, use 0 for the current user. | email | Registration email address, used for activation. | address | Address of the company using this user. | contactname | Name of the contact person responsible for this user. | contactemail | This field is not used and is ignored by the method. | telephone | Telephone number of the contact person responsible for this user. | fax | Fax number of the contact person responsible for this user. | password | The current password for this user. |
ReturnsNothing See alsouserEditExtendedV2
userEditExtendedV2Edit the complete profile of a user. This method is only available to Group::Account admins. Group::Account users can use userEditV2 to change some part of the profile. Parametersuserid | User ID of the user to edit, use 0 for the current user | nickname | Nickname to use for this user. All users get a prefix set by Account::Username prefix. | password | The new password for this user. To keep the current password pass the empty string. | email | Registration email address, used for activation. | companyname | Name of the company using this user, if any. | address | Address of the company using this user, if any. | contactname | Name of the contact person responsible for this user. | contactemail | This field is not used and is ignored by the method. | telephone | Telephone number of the contact person responsible for this user. | fax | Fax number of the contact person responsible for this user. | clientcode | Deprecated, should contain an empty string. | comments | Comments on the user, can only be seen and edited by Group::Account admins. | accountid | the Account ID to assign this user to, use 0 for the current account. Only usable by Group::Admins | balancethreshold | Balance threshold to alert user, 0 to disable. | notificationrecipients | Recipients of balance alert notification:” ‘-- accountcontact’ = contact account contact ‘-- user’ = contact user ‘-- accountcontact_and_user’ = both Returns: Nothing |
See alsouserEditV2, userChangePassword
userCreateV2Create a user, assign it to groups and send it an activation mail. Parametersaccountid | the Account ID to assign this user to. | nickname | Nickname to use for this user, leave empty to to create a random nickname. All users get a prefix set by Account::Username prefix. | password | Password to use for authentication, leave empty for a strong random password. | usergroups | array of user group IDs to assign this user to. see userListAssignableGroups for a list. | email | Registration email address, used for activation. | companyname | Name of the company using this user, if any. | address | Address of the company using this user, if any. | contactname | Name of the contact person responsible for this user. | contactemail | This field is not used and is ignored by the method. | telephone | Telephone number of the contact person responsible for this user. | fax | Fax number of the contact person responsible for this user. | clientcode | Deprecated, should contain an empty string. | comments | Comments on the user, can only be seen and edited by Group::Account admins. |
Returnsid | User ID of the newly created user. | nickname | Nickname of the newly created user. | password | Password of the newly created user. Together with the activation email, this is the only time the password is plainly visible. |
userChangePasswordChange the current password of a user. A Group::Account users has to give the old password for authentication, Group::Account admins do not have to. Parametersuserid | User ID of the user to edit, use 0 for the current user | old_password | The old password, not required for Group::Account admins | new_password | The new password. |
ReturnsNothing See alsouserNotify
userRemoveRemove the user. This method is only available to Group::Account admins. Parametersuserid | User ID of the user to remove, use 0 for the current user |
ReturnsNothing
userNotifySend a notification email to a user with a new password. This method is part of the User::Creation process. Parametersuserid | User ID of the user to notify, use 0 for the current user | password | Password to use for authentication, leave empty for a strong random password. |
Returnsout | Password of the user. Together with the activation email, this is the only time the password is plainly visible. |
userListAssignableGroupsList all groups that the current user can assign to the target user. This list contains both assigned and unassigned groups. Parametersuserid | User ID of the user to target, use 0 for the current user | page | Page to retrieve, pages start counting at 1 |
ReturnsSee alsouserAddGroup, userRemoveGroup
userAddGroupAdd a user to a group. A user can use userListAssignableGroups to view the groups that can be assigned. Parametersuserid | User ID of the user to add to the group, use 0 for the current user | usergroupid | User Group ID of the group to add the user to |
ReturnsNothing See alsouserListAssignableGroups, userRemoveGroup
userRemoveGroupRemove a user from a group. A user can use userViewV2 to view the groups that are currently assigned to the user. Parametersuserid | User ID of the user to remove from the group, use 0 for the current user | usergroupid | User Group ID of the group to remove the user from |
ReturnsNothing See alsouserViewV2, userAddGroup, userListAssignableGroups
accountViewV2View the profile of an account. Parametersaccountid | Account ID of the account to move use 0 for the account of the current user |
Returns
accountEditV2Edit the properties (AccountV2) of an account. This method allows Group::Account admins to edit their account profile. Parametersaccountid | Account ID of the account to edit, use 0 for the current user’s account | address | Address of the company using this account. | contactname | Name of the contact person responsible for this account. | contactemail | Email address of the contact person responsible for this account. | telephone | Telephone number of the contact person responsible for this account. | fax | Fax number of the contact person responsible for this account. | description | Description of the account to its users. | balancethreshold | Balance threshold to alert account, use 0 to disable. |
ReturnsNothing
accountUserListV2List all users in this account. This method is only available to Group::Account admins. Parametersaccountid | Account ID of the account to list, use 0 for the current user’s account | page | Page to retrieve, pages start counting at 1 |
Returns
accountUserSearchV2Search for users of an account using a search phrase. This method is only available to Group::Account admins. Parametersaccountid | Account ID of the account to list, use 0 for the current user’s account | phrase | Phrase to search for in user profiles | page | Page to retrieve, pages start counting at 1 |
Returns
accountEditHostRestrictionsSet host restrictions for the account Parametersaccountid | Account ID of the account, use 0 for the current user’s account | restrictions | A string with host restrictions separated by semi colons (;) |
ReturnsNothing See alsouserEditHostRestrictions, accountViewHostRestrictions
accountViewHostRestrictionsView host restrictions for the account Parametersaccountid | Account ID of the account, use 0 for the current user’s account |
ReturnsA string containing all restrictions, separated by semi colons See alsouserViewHostRestrictions, accountEditHostRestrictions
userEditHostRestrictionsSet host restrictions for the user Parametersuserid | User ID of the user, use 0 for the current user | restrictions | A string with host restrictions separated by semi colons (;) |
ReturnsNothing See alsoaccountEditHostRestrictions, userViewHostRestrictions
Deprecated accounting methods
userCreateAutoNoticeThis method is deprecated, use userCreateV2 instead Create a user, assign it to groups and credits, and send it an activation mail. Parametersaccountid | the Account ID to assign this user to. | nickname | Nickname to use for this user, leave empty to to create a random nickname. All users get a prefix set by Account::Username prefix. | password | Password to use for authentication, leave empty for a strong random password. | credits | number of credits to move to this user from the account. | usergroups | array of user group IDs to assign this user to. see userListAssignableGroups for a list. | email | Registration email address, used for activation. | companyname | Name of the company using this user, if any. | address | Address of the company using this user, if any. | contactname | Name of the contact person responsible for this user. | contactemail | This field is not used and is ignored by the method. | telephone | Telephone number of the contact person responsible for this user. | fax | Fax number of the contact person responsible for this user. | clientcode | Deprecated, should contain an empty string. | comments | Comments on the user, can only be seen and edited by Group::Account admins. |
Returnsid | User ID of the newly created user. | nickname | Nickname of the newly created user. | password | Password of the newly created user. Together with the activation email, this is the only time the password is plainly visible. |
userViewNoticeThis method is deprecated, use userViewV2 instead View the profile of a user. Parametersuserid | User ID of the user to view, use 0 for the current user |
Returns
userViewCreditsNoticeThis method is deprecated and will be removed, use userViewBalance instead Returns the number of credits a user has assigned. Parametersuserid | User ID of the user to view the credits of, use 0 for the current user |
Returnscredits | The number of credits currently assigned to the user |
accountViewNoticeThis method is deprecated, use accountViewV2 instead View the profile of an account. Parametersaccountid | Account ID of the account to move, use 0 for the account of the current user |
Returns
accountViewCreditsReturns the number of credits a account has assigned. NoticeThis method is deprecated and will be removed, use accountViewBalance instead Parametersaccountid | Account ID of the account to view, use 0 for the account of the current user |
Returnsout | The number of credits currently assigned to the account |
accountUsesBalanceNoticeThis method is deprecated and will be removed. ParametersReturns
Type definitionsadd any complex types used by soap functions in this class
UserA User entry. id | User ID of the user | nickname | Username used in authentication | email | Primary email address linked to this user | companyname | Incase the user is used by a company, its name | address | Incase the user is used by a company, its billing address | contactname | Name of the contact person of this user | contactemail | This field is not used and always contains the empty string | telephone | Telephone number where the contact person can be reached | fax | Fax number where the contact person can be reached | credits | Number of credits assigned to this user | clientcode | Deprecated, internal client code, visible to Group::Account admins | comments | Comments on the user, visible to Group::Account admins | creationtime | Time the user was created, ‘YYYY-MM-DD HH:MM:SS’ format | lastmodified | Time the user was last modified, ‘YYYY-MM-DD HH:MM:SS’ format | active | Whether this user is activated | account_id | Account ID of the account this user belongs | account_name | Account name of the account this user belongs | usergroups | Patterns::{Type}Array of UserGroup entries. | creditthreshold | Credit threshold to alert account, 0 to disable. | notificationrecipients | Recipients of credit alert notification: ‘accountcontact’ = contact account contact, ‘user’ = contact user, ‘accountcontact_and_user’ = both |
See alsouserView, UserGroup
UserCredentialsA UserCredentials entry. id | User ID of the user. | username | Username of the user. | password | Password of the user. |
UserV2A UserV2 entry. id | User ID of the user | nickname | Username used in authentication | email | Primary email address linked to this user | balance | Amount of balance the user has. See also userViewBalance. | balancethreshold | Balance threshold to alert account, 0 to disable. | notificationrecipients | Recipients of credit alert notification: ‘accountcontact’ = contact account contact, ‘user’ = contact user, ‘accountcontact_and_user’ = both | companyname | In case the user is used by a company, its name | address | In case the user is used by a company, its billing address | contactname | Name of the contact person of this user | contactemail | This field is not used and always contains the empty string | telephone | Telephone number where the contact person can be reached | fax | Fax number where the contact person can be reached | clientcode | Deprecated, internal client code, visible to Group::Account admins. Optional. | comments | Comments on the user, visible to Group::Account admins. Optional. | creationtime | Time the user was created, ‘YYYY-MM-DD HH:MM:SS’ format. Optional. | lastmodified | Time the user was last modified, ‘YYYY-MM-DD HH:MM:SS’ format. Optional. | active | Whether this user is activated | account_id | Account ID of the account this user belongs | account_name | Account name of the account this user belongs | usergroups | Patterns::{Type}Array of UserGroup entries. |
See alsouserViewV2, accountUserListV2, accountUserSearchV2, UserGroup
AccountAn Account entry. id | Account ID of the account | name | Name of this Account | address | Billing address of the company using the account. | environment | Either ‘test’ or ‘production’. In the development stage an account is in the ‘test’ environment, and the batch of credits assigned to the account can be used for testing purposes. Accounts in the ‘production’ environment use actual credits. | reseller | Indicates if this account is a webservices reseller | contactname | Name of the contact person of this account. | contactemail | Email address of the contact person of this account. | telephone | Telephone number where the contact person can be reached. | fax | Fax number where the contact person can be reached. | description | Description of the account to its users. | creationtime | Time the user was created, ‘YYYY-MM-DD HH:MM:SS’ format | lastmodified | Time the user was last modified, ‘YYYY-MM-DD HH:MM:SS’ format | credits | Number of credits available to this account | clientcode | Not used, always empty | comments | Comments on the account, visible to Group::Admins | usernameprefix | All user nicknames in this account start with this prefix | creditthreshold | Credit threshold to alert account, 0 to disable. |
See alsoaccountView Deprecated, seeAccountV2
AccountV2An AccountV2 entry. id | Account ID of the account | name | Name of this Account | address | Billing address of the company using the account. | environment | Either ‘test’ or ‘production’. In the development stage an account is in the ‘test’ environment, and the balance assigned to the account can be used for testing purposes without any costs. | reseller | Indicates if this account is a webservices reseller | contactname | Name of the contact person of this account. | contactemail | Email address of the contact person of this account. | telephone | Telephone number where the contact person can be reached. | fax | Fax number where the contact person can be reached. | description | Description of the account to its users. | creationtime | Time the user was created, ‘YYYY-MM-DD HH:MM:SS’ format | lastmodified | Time the user was last modified, ‘YYYY-MM-DD HH:MM:SS’ format | clientcode | Not used, always empty | comments | Comments on the account, visible to Group::Admins | usernameprefix | All user nicknames in this account start with this prefix | balance | The account balance | balancethreshold | Balance threshold to alert account, 0 to disable. |
See alsoaccountViewV2
SessionA session entry. reactid | 32 character hash string that identified the session | user_id | User ID of the user to which the session belongs | user_nickname | User nickname of the user to which the session belongs | creationtime | Time the session was created, ‘YYYY-MM-DD HH:MM:SS’ format | lastvisit | Last time this session was used, ‘YYYY-MM-DD HH:MM:SS’ format | hits | Number of times this session has been used. | ip | IP string to which the session may optionally be locked |
See alsouserSessionList
|