WhileLabel Service


Introduction

The CallFire White Label Service allow White Label customers programmatically to manage their users and automate typical user administration tasks.
Note: The service is currently in beta mode (as of 4/19/2010) and the spec may change.

Operations

createUsers

Creates a user.

Parameters

Parameter Required ValuesDescription
key Y String key API Key for the account.
userObject Y complex type See below.
UserObject
Attribute Required ValuesDescription
firstName Y any text First name of the user
lastName Y any text Last name of the user
phone Y any text phone number of the user.
ext Y any text extension of the user. Can pass in empty strings.
email Y any text Email of the user, will also serve as their login.
chargePerMin Y double Any positive double value.
companyName Y any text Name of the user's organization.
password Y any text password for the user's login
increment Y double Billing increment of the user, must be a positive value
defaultThreshold Y double The default CPM that every campaign created by the user will be assigned.
accountBalance Y double Starting credit to give the customer

Return

ResponseMessage

Example

Attribute Required ValuesDescription
txnCode Y 200 (Success), 400 (Bad Request), or 500 (Internal Error) n/a
txnMessage Y <userid>,<userapikey> Returns the user id as well as the user's API key seperated by a comma
	public static void main(String[] args) 
	{
		String apikey ="YOUR_KEY";
		WhiteLabelService_Service service = new WhiteLabelService_Service();
		WhiteLabelService httpPortType = service.getWhiteLabelServiceHttpPort();
		UserObject object = new UserObject();
		populateValues( object );
		ResponseMessage response = httpPortType.createUsers( apikey, object  );
		System.out.println( response.getTxnMessage().getValue().toString() );
		ResponseMessage response1 = httpPortType.addAccountBalance( apikey,object );
		System.out.println( response1.getTxnMessage().getValue().toString() );

	}
	private static void populateValues(UserObject object) 
	{
		ObjectFactory of = new ObjectFactory();
		object.setFirstname( of.createUserObjectFirstname( "JJ") );
		object.setLastname( of.createUserObjectLastname( "Abrams") );
		object.setAccountBalance( of.createUserObjectAccountBalance("5"));
		object.setChargePerMin( of.createUserObjectChargePerMin( ".035") );
		object.setCompanyname( of.createUserObjectCompanyname("EezLand"));
		object.setDefaultTreshold( of.createUserObjectDefaultTreshold( "50") );
		object.setEmail( of.createUserObjectEmail( "abrams99@abrams.com") );
		object.setExt( of.createUserObjectExt( "213") );
		object.setIncrement( of.createUserObjectIncrement( "60" ) );
		object.setPassword( of.createUserObjectPassword( "temp" ) );
		object.setPhone( of.createUserObjectPhone( "2135556678" ) );
		object.setUserid( of.createUserObjectUserid( "1443") ); // needed only for addAccountBalance operation
	}

The output will look like

1444,a04f7bc5bsewverea582aafecc8d0381bc8ffc8ff8c
Credit added successfully