Create Account

1. Method: Create Account


Important notes

Public and Private Keys are unique for Sandbox and Live.
Sandbox Endpoint URL: https://sandbox.api.igsend.co.uk/services/createaccount 
Live Endpoint URL: https://api.igsend.co.uk/services/createaccount 

 Double click the URL above to insert into the Endpoint field below
Endpoint URL
Public Key
Private Key

Request Payload


Response Payload


2. Request data

As no JSON payload is required for this API, the required data (client name) must be passed in the URL.

Example: https://api.igsend.co.uk/services/createaccount/?ClientName=Income Group Ltd

Title Datatype Validation Max. Data Length Example Data Notes
Client Name String
  • Must not be null or empty
  • Must be alphanumeric and include only these special characters
    • - (dash)
    • & (ampersand)
    •   (space)
50 ACME Pvt Ltd. This parameter contains the Client name.

3. JSON Response Data

The table below details the response code, message ID and message returned from an API call.
status MessageID Message Description
1 10010 Request processed successfully Response received and tableRes holds the data of the new account. The AccountNumber value is nested within tableRes
Example response
											
	{
		"coreRes": 
		{
			"status": 1,
			"Message": "CreateAccount : Success",
			"MessageID": 10010    
		},
		"tableRes": 
		[
			{
				"ClientID": 100000,
				"AccountNumber": "12345678",
				"Status": "SUCCESS",
				"Status_reason": "SUCCESS"      
			}
		]
	}
												
											
2 10009 Data Validation Failed. Invalid ClientName. Name cannot be Null or Empty; Max Length: 50; Must be alphanumeric, containing only the special characters as above

4. Code Example

C#
								
	using (HttpClient client = new HttpClient())
	{
		string PublicKey = "{Your public key}";
		string PrivateKey = "{Your private key}";
		string ClientName = "{Company Name}";
		string RequestAddress = "https://api.igsend.co.uk/services/createaccount/?ClientName=" + ClientName
		client.BaseAddress = new Uri(RequestAddress);
		var auth = string.Format("{0}:{1}", PublicKey, PrivateKey);
		var encoded = Convert.ToBase64String(Encoding.ASCII.GetBytes(auth));
		client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", encoded);
		HttpResponseMessage response = await client.PostAsync(RequestAddress);
	}
								
							
If you develop in another code, which may be useful to other customers, we would love to include further examples here. You can submit your example code to the API team.