Current Accounts API

Current Accounts API is used to:

  • List all Current Accounts.
  • Update existing Current Accounts.
  • Create new Current Accounts.

URL http://127.0.0.1/Prospect-IRIS/Prospect.svc/GB0010001/verAccount_CaOpens()
Http MethodGET
Http Request Headers Accept: 'Application/atom+xml'
Accept: 'Application/hal+json'
Http Response Headers Content-Type: 'Application/atom+xml'
Content-Type: 'Application/hal+json'
Response Type Collection
Response
URL http://127.0.0.1/Prospect-IRIS/Prospect.svc/GB0010001/verAccount_CaOpens('AcctId')
Http MethodGET
Http Request Headers Accept: 'Application/atom+xml'
Accept: 'Application/hal+json'
Http Response Headers Content-Type: 'Application/atom+xml'
Content-Type: 'Application/hal+json'
Response Type Single Item
Response
URL http://127.0.0.1/Prospect-IRIS/Prospect.svc/GB0010001/verAccount_CaOpens()/new
Http Method POST
Http Response Headers Accept: 'Application/atom+xml'
Accept: 'Application/hal+json'
URL Parameters Optional: /verAccount_CaOpens()/new?AcctIf='NumericValue'
Response Type Single Item with account number
Response
# T24 Name OData Name Description Validation Rule
1 CUSTOMER Customer Identifies the Customer to whom the Account belongs. This field maintains a link between the Customer and their Accounts. Internal Accounts are recognised by ID's which contain a Currency Code in the first 3 characters. These do not belong to Customers. 1-10 numeric character Customer Code or 3-10 type MNE (uppercase alpha or numeric or '.') character Customer Mnemonic.
Mandatory input for Customer Accounts not allowed for Internal Accounts
2 CATEGORY Category Indicates the Category code for the Account. The Category code is used to classify financial transactions on T24 according to the type of business operation or product type. 4-5 numeric character Category code (Mandatory input)
It must be an existing code on the CATEGORY table.
For Customer Accounts, it must be in the range 1000 to 9999.
For Internal Accounts, it must be in the range 10000 to 19999.
3 CURRENCY Currency Identifies the Currency of the Account. All entries passed to the Account must be in this Currency. Once the Account record has been authorised, the Currency cannot be amended. 3 type SSS (uppercase alpha) character or 1-3 numeric character Currency code.
Cannot be changed after record has been authorised. (Mandatory Input).
It must be an existing code on the CURRENCY Table.
URL http://127.0.0.1/Prospect-IRIS/Prospect.svc/GB0010001/verAccount_CaOpens('AcctId')/validate
Http Method POST
Http Request Headers Accept: 'Application/atom+xml'
Accept: 'Application/hal+json'
Etag: 'returned by server'
Http Request Headers Content-Type: 'Application/atom+xml'
Content-Type: 'Application/hal+json'
If-Match: 'etag value'
Response
URL http://127.0.0.1/Prospect-IRIS/Prospect.svc/GB0010001/verAccount_CaOpens('AcctId')/authorise
Http Method POST
Http Request Headers Accept: 'Application/atom+xml'
Accept: 'Application/hal+json'
Etag: 'returned by server'
Http Request Headers Content-Type: 'Application/atom+xml'
Content-Type: 'Application/hal+json'
If-Match: 'etag value'
Response
URL http://127.0.0.1/Prospect-IRIS/Prospect.svc/GB0010001/verAccount_CaOpens('AcctId')
Http Method PUT
Http Request Headers Accept: 'Application/atom+xml'
Accept: 'Application/hal+json'
Etag: 'returned by server'
Http Request Headers Content-Type: 'Application/atom+xml'
Content-Type: 'Application/hal+json'
If-Match: 'etag value'
Response

Add dependency in pom.xml
                        <repositories> <repository> <id>mjangid</id> <name>iris-repo</name> <url>https://github.com/mjangid/iris-repo/raw/master/</url>
                        </repository> </repositories> <dependencies> <dependency> <groupId>com.temenos.interaction</groupId>
                        <artifactId>useragent-generic-java</artifactId> <version>0.10.0</version>
                        <scope>compile</scope> </dependency> </dependencies>
                      
JAVA code
                        import com.temenos.useragent.generic.DefaultInteractionSession; import com.temenos.useragent.generic.InteractionSession;
                        import com.temenos.useragent.generic.mediatype.AtomPayloadHandler; public class Customer { public
                        Boolean createCustomer(String dataServiceUrl) { InteractionSession session = DefaultInteractionSession.newSession();
                        session.registerHandler("application/atom+xml", AtomPayloadHandler.class) .basicAuth("INPUTT", "123456")
                        .header("Content-Type", "application/atom+xml") .header("Accept", "application/atom+xml").url() .baseuri(dataServiceUrl).path("verAccount_CaOpens()/new")
                        .post(); if (201 == session.result().code()) { return true; } return false; } }
                      

Example in Java Script

Java Script code