Actions

Create An Action

curl-request
$ curl 'http://localhost:8080/actions' -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
  "identifier" : "Acckv",
  "name" : "ActionJC6",
  "description" : "Action's Description euB3",
  "transactionType" : "ACCO"
}'
http-request
POST /actions HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 129

{
  "identifier" : "Acckv",
  "name" : "ActionJC6",
  "description" : "Action's Description euB3",
  "transactionType" : "ACCO"
}
httpie-request
$ echo '{
  "identifier" : "Acckv",
  "name" : "ActionJC6",
  "description" : "Action's Description euB3",
  "transactionType" : "ACCO"
}' | http POST 'http://localhost:8080/actions' 'Content-Type:application/json' 'Accept:application/json'
http-response
HTTP/1.1 202 Accepted
Table 1. request-fields
Path Type Description

identifier

String

Action identifier

name

String

Name of action

description

String

Description of action

transactionType

String

transaction type

Get Default Actions

curl-request
$ curl 'http://localhost:8080/actions' -i -H 'Content-Type: application/json' -H 'Accept: */*'
http-request
GET /actions HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
httpie-request
$ http GET 'http://localhost:8080/actions' 'Content-Type:application/json' 'Accept:*/*'
http-response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 577

[ {
  "identifier" : "Open",
  "name" : "Account Opening",
  "description" : null,
  "transactionType" : "ACCO"
}, {
  "identifier" : "Transfer",
  "name" : "Account Transfer",
  "description" : null,
  "transactionType" : "ACCT"
}, {
  "identifier" : "Close",
  "name" : "Account Closing",
  "description" : null,
  "transactionType" : "ACCC"
}, {
  "identifier" : "Deposit",
  "name" : "Cash Deposit",
  "description" : null,
  "transactionType" : "CDPT"
}, {
  "identifier" : "Withdraw",
  "name" : "Cash Withdrawal",
  "description" : null,
  "transactionType" : "CWDL"
} ]
Table 2. response-fields
Path Type Description

[].identifier

String

Open

[].name

String

Account Opening

[].description

String

Description of Account Opening

[].transactionType

String

ACCO

[1].identifier

String

Transfer

[1].name

String

Account Transfer

[1].description

String

Description of Account Transfer

[1].transactionType

String

ACCT

[2].identifier

String

Close

[2].name

String

Account Closing

[2].description

String

Description of Account Closing

[2].transactionType

String

ACCC

[3].identifier

String

Deposit

[3].name

String

Cash Deposit

[3].description

String

Description of Cash Deposit

[3].transactionType

String

CDPT

[4].identifier

String

Withdraw

[4].name

String

Cash Withdraw

[4].description

String

Description of Cash Withdraw

[4].transactionType

String

CWDL

Product Definitions

Define A Product

curl-request
$ curl 'http://localhost:8080/definitions' -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
  "type" : "SAVINGS",
  "identifier" : "pdtDefke9z",
  "name" : "PdtName ns1aLB",
  "description" : "Product Descriptiont0nZa7t6",
  "currency" : {
    "code" : "USD",
    "name" : "US Dollar",
    "sign" : "$",
    "scale" : 3
  },
  "minimumBalance" : 50.0,
  "equityLedgerIdentifier" : "91xx",
  "cashAccountIdentifier" : "76xx",
  "expenseAccountIdentifier" : "38xx",
  "accrueAccountIdentifier" : "82xx",
  "interest" : 1.25,
  "term" : {
    "period" : 12,
    "timeUnit" : "MONTH",
    "interestPayable" : "MATURITY"
  },
  "charges" : [ {
    "actionIdentifier" : "Close",
    "incomeAccountIdentifier" : "10123",
    "name" : "Closing Account Fee",
    "proportional" : false,
    "amount" : 2.0
  }, {
    "actionIdentifier" : "Open",
    "incomeAccountIdentifier" : "10123",
    "name" : "Opening Account Charge",
    "proportional" : false,
    "amount" : 2.0
  } ],
  "flexible" : false
}'
http-request
POST /definitions HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 903

{
  "type" : "SAVINGS",
  "identifier" : "pdtDefke9z",
  "name" : "PdtName ns1aLB",
  "description" : "Product Descriptiont0nZa7t6",
  "currency" : {
    "code" : "USD",
    "name" : "US Dollar",
    "sign" : "$",
    "scale" : 3
  },
  "minimumBalance" : 50.0,
  "equityLedgerIdentifier" : "91xx",
  "cashAccountIdentifier" : "76xx",
  "expenseAccountIdentifier" : "38xx",
  "accrueAccountIdentifier" : "82xx",
  "interest" : 1.25,
  "term" : {
    "period" : 12,
    "timeUnit" : "MONTH",
    "interestPayable" : "MATURITY"
  },
  "charges" : [ {
    "actionIdentifier" : "Close",
    "incomeAccountIdentifier" : "10123",
    "name" : "Closing Account Fee",
    "proportional" : false,
    "amount" : 2.0
  }, {
    "actionIdentifier" : "Open",
    "incomeAccountIdentifier" : "10123",
    "name" : "Opening Account Charge",
    "proportional" : false,
    "amount" : 2.0
  } ],
  "flexible" : false
}
httpie-request
$ echo '{
  "type" : "SAVINGS",
  "identifier" : "pdtDefke9z",
  "name" : "PdtName ns1aLB",
  "description" : "Product Descriptiont0nZa7t6",
  "currency" : {
    "code" : "USD",
    "name" : "US Dollar",
    "sign" : "$",
    "scale" : 3
  },
  "minimumBalance" : 50.0,
  "equityLedgerIdentifier" : "91xx",
  "cashAccountIdentifier" : "76xx",
  "expenseAccountIdentifier" : "38xx",
  "accrueAccountIdentifier" : "82xx",
  "interest" : 1.25,
  "term" : {
    "period" : 12,
    "timeUnit" : "MONTH",
    "interestPayable" : "MATURITY"
  },
  "charges" : [ {
    "actionIdentifier" : "Close",
    "incomeAccountIdentifier" : "10123",
    "name" : "Closing Account Fee",
    "proportional" : false,
    "amount" : 2.0
  }, {
    "actionIdentifier" : "Open",
    "incomeAccountIdentifier" : "10123",
    "name" : "Opening Account Charge",
    "proportional" : false,
    "amount" : 2.0
  } ],
  "flexible" : false
}' | http POST 'http://localhost:8080/definitions' 'Content-Type:application/json' 'Accept:application/json'
http-response
HTTP/1.1 202 Accepted
Table 3. request-fields
Path Type Description

type

String

Type of transaction

identifier

String

Action identifier

name

String

Name of action

description

String

Description of action

currency.code

String

Currency’s code

currency.name

String

Currency’s name

currency.sign

String

Currency’s sign

currency.scale

Integer

Currency’s scale

minimumBalance

Double

Minimum Balance

equityLedgerIdentifier

String

Equity Ledger Identifier

cashAccountIdentifier

String

Cash Account

expenseAccountIdentifier

String

Expense Account

accrueAccountIdentifier

String

Accrue Account

interest

Double

Interest

term.period

Integer

Term period

term.timeUnit

TimeUnit

Term time unit

term.interestPayable

String

Term interest payable

charges[].actionIdentifier

String

Charge first action

charges[].incomeAccountIdentifier

String

first Charge income account

charges[].name

String

Name of first charge

charges[].proportional

Boolean

Is charge proportional ?

charges[].amount

Double

Amount of first charge

charges[1].actionIdentifier

String

Charge second action

charges[1].incomeAccountIdentifier

String

Charge income account

charges[1].name

String

Name of second charge

charges[1].proportional

Boolean

Is charge proportional ?

charges[1].amount

Double

Amount of second charge

flexible

Boolean

is product definition flexible ?

Find A Product Definition

curl-request
$ curl 'http://localhost:8080/definitions/pdtDefjcoG' -i -H 'Content-Type: application/json' -H 'Accept: */*'
http-request
GET /definitions/pdtDefjcoG HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
httpie-request
$ http GET 'http://localhost:8080/definitions/pdtDefjcoG' 'Content-Type:application/json' 'Accept:*/*'
http-response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 962

{
  "type" : "SAVINGS",
  "identifier" : "pdtDefjcoG",
  "name" : "PdtName UbYDDd",
  "description" : "PdtName UbYDDd",
  "currency" : {
    "code" : "USD",
    "name" : "US Dollar",
    "sign" : "$",
    "scale" : 3
  },
  "minimumBalance" : 50.0,
  "equityLedgerIdentifier" : "91xx",
  "cashAccountIdentifier" : "76xx",
  "expenseAccountIdentifier" : "38xx",
  "accrueAccountIdentifier" : "82xx",
  "interest" : 1.25,
  "term" : {
    "period" : 12,
    "timeUnit" : "MONTH",
    "interestPayable" : "MATURITY"
  },
  "charges" : [ {
    "actionIdentifier" : "Close",
    "incomeAccountIdentifier" : "10123",
    "name" : "Closing Account Fee",
    "description" : null,
    "proportional" : false,
    "amount" : 2.0
  }, {
    "actionIdentifier" : "Open",
    "incomeAccountIdentifier" : "10123",
    "name" : "Opening Account Charge",
    "description" : null,
    "proportional" : false,
    "amount" : 2.0
  } ],
  "flexible" : false,
  "active" : false
}
Table 4. response-fields
Path Type Description

type

String

Type of transaction

identifier

String

Action identifier

name

String

Name of action

description

String

Description of action

currency.code

String

Currency’s code

currency.name

String

Currency’s name

currency.sign

String

Currency’s sign

currency.scale

Integer

Currency’s scale

minimumBalance

Double

Minimum Balance

equityLedgerIdentifier

String

Equity Ledger Identifier

cashAccountIdentifier

String

Cash Account

expenseAccountIdentifier

String

Expense Account

accrueAccountIdentifier

String

Accrue Account

interest

Double

Interest

term.period

Integer

Term period

term.timeUnit

TimeUnit

Term time unit

term.interestPayable

String

Term interest payable

charges[].actionIdentifier

String

Charge first action

charges[].incomeAccountIdentifier

String

first Charge income account

charges[].name

String

Name of first charge

charges[].proportional

Boolean

Is charge proportional ?

charges[].amount

Double

Amount of first charge

charges[].description

String

Description of first charge

charges[1].actionIdentifier

String

Charge second action

charges[1].incomeAccountIdentifier

String

Charge income account

charges[1].name

String

Name of second charge

charges[1].proportional

Boolean

Is charge proportional ?

charges[1].description

String

Description of second charge

charges[1].amount

Double

Amount of second charge

flexible

Boolean

Is product definition flexible ?

active

Boolean

Is product definition active ?

Fetch Product Definitions

curl-request
$ curl 'http://localhost:8080/definitions' -i -H 'Content-Type: application/json' -H 'Accept: */*'
http-request
GET /definitions HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
httpie-request
$ http GET 'http://localhost:8080/definitions' 'Content-Type:application/json' 'Accept:*/*'
http-response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1930

[ {
  "type" : "SAVINGS",
  "identifier" : "pdtDefLvjQ",
  "name" : "PdtName sTMFCI",
  "description" : "PdtName sTMFCI",
  "currency" : {
    "code" : "USD",
    "name" : "US Dollar",
    "sign" : "$",
    "scale" : 3
  },
  "minimumBalance" : 50.0,
  "equityLedgerIdentifier" : "91xx",
  "cashAccountIdentifier" : "76xx",
  "expenseAccountIdentifier" : "38xx",
  "accrueAccountIdentifier" : "82xx",
  "interest" : 1.25,
  "term" : {
    "period" : 12,
    "timeUnit" : "MONTH",
    "interestPayable" : "MATURITY"
  },
  "charges" : [ {
    "actionIdentifier" : "Close",
    "incomeAccountIdentifier" : "10123",
    "name" : "Closing Account Fee",
    "description" : null,
    "proportional" : false,
    "amount" : 2.0
  }, {
    "actionIdentifier" : "Open",
    "incomeAccountIdentifier" : "10123",
    "name" : "Opening Account Charge",
    "description" : null,
    "proportional" : false,
    "amount" : 2.0
  } ],
  "flexible" : false,
  "active" : false
}, {
  "type" : "SAVINGS",
  "identifier" : "pdtDef5fKH",
  "name" : "PdtName BpW9P8",
  "description" : "PdtName BpW9P8",
  "currency" : {
    "code" : "USD",
    "name" : "US Dollar",
    "sign" : "$",
    "scale" : 3
  },
  "minimumBalance" : 50.0,
  "equityLedgerIdentifier" : "91xx",
  "cashAccountIdentifier" : "76xx",
  "expenseAccountIdentifier" : "38xx",
  "accrueAccountIdentifier" : "82xx",
  "interest" : 1.25,
  "term" : {
    "period" : 12,
    "timeUnit" : "MONTH",
    "interestPayable" : "MATURITY"
  },
  "charges" : [ {
    "actionIdentifier" : "Close",
    "incomeAccountIdentifier" : "10123",
    "name" : "Closing Account Fee",
    "description" : null,
    "proportional" : false,
    "amount" : 2.0
  }, {
    "actionIdentifier" : "Open",
    "incomeAccountIdentifier" : "10123",
    "name" : "Opening Account Charge",
    "description" : null,
    "proportional" : false,
    "amount" : 2.0
  } ],
  "flexible" : false,
  "active" : false
} ]
Table 5. response-fields
Path Type Description

[].type

String

Type of transaction

[].identifier

String

Action identifier

[].name

String

Name of action

[].description

String

Description of action

[].currency.code

String

Currency’s code

[].currency.name

String

Currency’s name

[].currency.sign

String

Currency’s sign

[].currency.scale

Integer

Currency’s scale

[].minimumBalance

Double

Minimum Balance

[].equityLedgerIdentifier

String

Equity Ledger Identifier

[].cashAccountIdentifier

String

Cash Account

[].expenseAccountIdentifier

String

Expense Account

[].accrueAccountIdentifier

String

Accrue Account

[].interest

Double

Interest

[].term.period

Integer

Term period

[].term.timeUnit

TimeUnit

Term time unit

[].term.interestPayable

String

Term interest payable

[].charges[].incomeAccountIdentifier

String

first Charge income account

[].charges[].name

String

Name of first charge

[].charges[].proportional

Boolean

Is charge proportional ?

[].charges[].amount

Double

Amount of first charge

[].charges[].description

String

Description of first charge

[].charges[1].actionIdentifier

String

Charge second action

[].charges[1].incomeAccountIdentifier

String

Charge income account

[].charges[1].name

String

Name of second charge

[].charges[1].proportional

Boolean

Is charge proportional ?

[].charges[1].description

String

Description of second charge

[].charges[1].amount

Double

Amount of second charge

[].flexible

Boolean

Is product definition flexible ?

[1].active

Boolean

Is product definition active ?

[1].type

String

Type of transaction

[1].identifier

String

Action identifier

[1].name

String

Name of action

[1].description

String

Description of action

[1].currency.code

String

Currency’s code

[1].currency.name

String

Currency’s name

[1].currency.sign

String

Currency’s sign

[1].currency.scale

Integer

Currency’s scale

[1].minimumBalance

Double

Minimum Balance

[1].equityLedgerIdentifier

String

Equity Ledger Identifier

[1].cashAccountIdentifier

String

Cash Account

[1].expenseAccountIdentifier

String

Expense Account

[1].accrueAccountIdentifier

String

Accrue Account

[1].interest

Double

Interest

[1].term.period

Integer

Term period

[1].term.timeUnit

TimeUnit

Term time unit

[1].term.interestPayable

String

Term interest payable

[1].charges[].actionIdentifier

String

Charge first action

[1].charges[].incomeAccountIdentifier

String

first Charge income account

[1].charges[].name

String

Name of first charge

[1].charges[].proportional

Boolean

Is charge proportional ?

[1].charges[].amount

Double

Amount of first charge

[1].charges[].description

String

Description of first charge

[1].charges[1].actionIdentifier

String

Charge second action

[1].charges[1].incomeAccountIdentifier

String

Charge income account

[1].charges[1].name

String

Name of second charge

[1].charges[1].proportional

Boolean

Is charge proportional ?

[1].charges[1].description

String

Description of second charge

[1].charges[1].amount

Double

Amount of second charge

[1].flexible

Boolean

Is product definition flexible ?

[1].active

Boolean

Is product definition active ?

Find A Product Definition’s Instances

curl-request
$ curl 'http://localhost:8080/definitions/pdtDefZikm/instances' -i -H 'Content-Type: application/json' -H 'Accept: */*'
http-request
GET /definitions/pdtDefZikm/instances HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
httpie-request
$ http GET 'http://localhost:8080/definitions/pdtDefZikm/instances' 'Content-Type:application/json' 'Accept:*/*'
http-response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 323

[ {
  "customerIdentifier" : "CustomerFJh",
  "productIdentifier" : "pdtDefZikm",
  "accountIdentifier" : "CustomerFJh.91xx.00001",
  "alternativeAccountNumber" : null,
  "beneficiaries" : [ "BenefiaryYPU", "BenefiaryXP2" ],
  "openedOn" : null,
  "lastTransactionDate" : null,
  "state" : "PENDING",
  "balance" : null
} ]
Table 6. response-fields
Path Type Description

[].customerIdentifier

String

Customer Identifier

[].productIdentifier

String

Product identifier

[].accountIdentifier

String

Account Identifier

[].alternativeAccountNumber

Null

Alternative Account Number

[].beneficiaries

Set<String>

Set of beneficiaries

[].openedOn

Null

[].lastTransactionDate

Null

Last transaction date

[].state

String

State of product instance

[].balance

Double

Balance

Update A Product Definition

curl-request
$ curl 'http://localhost:8080/definitions/pdtDeflpjB' -i -X PUT -H 'Content-Type: application/json' -H 'Accept: */*' -d '{
  "type" : "SAVINGS",
  "identifier" : "pdtDeflpjB",
  "name" : "PdtName cEJcHN",
  "description" : "PdtName cEJcHN",
  "currency" : {
    "code" : "USD",
    "name" : "US Dollar",
    "sign" : "$",
    "scale" : 3
  },
  "minimumBalance" : 50.0,
  "equityLedgerIdentifier" : "91xx",
  "cashAccountIdentifier" : "76xx",
  "expenseAccountIdentifier" : "38xx",
  "accrueAccountIdentifier" : "82xx",
  "interest" : 1.25,
  "term" : {
    "period" : 12,
    "timeUnit" : "MONTH",
    "interestPayable" : "MATURITY"
  },
  "charges" : [ {
    "actionIdentifier" : "Close",
    "incomeAccountIdentifier" : "10123",
    "name" : "Closing Account Fee",
    "proportional" : false,
    "amount" : 2.0
  }, {
    "actionIdentifier" : "Open",
    "incomeAccountIdentifier" : "10123",
    "name" : "Opening Account Charge",
    "proportional" : false,
    "amount" : 2.0
  } ],
  "flexible" : true,
  "active" : true
}'
http-request
PUT /definitions/pdtDeflpjB HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
Content-Length: 908

{
  "type" : "SAVINGS",
  "identifier" : "pdtDeflpjB",
  "name" : "PdtName cEJcHN",
  "description" : "PdtName cEJcHN",
  "currency" : {
    "code" : "USD",
    "name" : "US Dollar",
    "sign" : "$",
    "scale" : 3
  },
  "minimumBalance" : 50.0,
  "equityLedgerIdentifier" : "91xx",
  "cashAccountIdentifier" : "76xx",
  "expenseAccountIdentifier" : "38xx",
  "accrueAccountIdentifier" : "82xx",
  "interest" : 1.25,
  "term" : {
    "period" : 12,
    "timeUnit" : "MONTH",
    "interestPayable" : "MATURITY"
  },
  "charges" : [ {
    "actionIdentifier" : "Close",
    "incomeAccountIdentifier" : "10123",
    "name" : "Closing Account Fee",
    "proportional" : false,
    "amount" : 2.0
  }, {
    "actionIdentifier" : "Open",
    "incomeAccountIdentifier" : "10123",
    "name" : "Opening Account Charge",
    "proportional" : false,
    "amount" : 2.0
  } ],
  "flexible" : true,
  "active" : true
}
httpie-request
$ echo '{
  "type" : "SAVINGS",
  "identifier" : "pdtDeflpjB",
  "name" : "PdtName cEJcHN",
  "description" : "PdtName cEJcHN",
  "currency" : {
    "code" : "USD",
    "name" : "US Dollar",
    "sign" : "$",
    "scale" : 3
  },
  "minimumBalance" : 50.0,
  "equityLedgerIdentifier" : "91xx",
  "cashAccountIdentifier" : "76xx",
  "expenseAccountIdentifier" : "38xx",
  "accrueAccountIdentifier" : "82xx",
  "interest" : 1.25,
  "term" : {
    "period" : 12,
    "timeUnit" : "MONTH",
    "interestPayable" : "MATURITY"
  },
  "charges" : [ {
    "actionIdentifier" : "Close",
    "incomeAccountIdentifier" : "10123",
    "name" : "Closing Account Fee",
    "proportional" : false,
    "amount" : 2.0
  }, {
    "actionIdentifier" : "Open",
    "incomeAccountIdentifier" : "10123",
    "name" : "Opening Account Charge",
    "proportional" : false,
    "amount" : 2.0
  } ],
  "flexible" : true,
  "active" : true
}' | http PUT 'http://localhost:8080/definitions/pdtDeflpjB' 'Content-Type:application/json' 'Accept:*/*'
http-response
HTTP/1.1 202 Accepted
Table 7. request-fields
Path Type Description

type

String

Type of transaction

identifier

String

Action identifier

name

String

Name of action

description

String

Description of action

currency.code

String

Currency’s code

currency.name

String

Currency’s name

currency.sign

String

Currency’s sign

currency.scale

Integer

Currency’s scale

minimumBalance

Double

Minimum Balance

equityLedgerIdentifier

String

Equity Ledger Identifier

cashAccountIdentifier

String

Cash Account

expenseAccountIdentifier

String

Expense Account

accrueAccountIdentifier

String

Accrue Account

interest

Double

Interest

term.period

Integer

Term period

term.timeUnit

TimeUnit

Term time unit

term.interestPayable

String

Term interest payable

charges[].actionIdentifier

String

Charge first action

charges[].incomeAccountIdentifier

String

first Charge income account

charges[].name

String

Name of first charge

charges[].proportional

Boolean

Is charge proportional ?

charges[].amount

Double

Amount of first charge

charges[1].actionIdentifier

String

Charge second action

charges[1].incomeAccountIdentifier

String

Charge income account

charges[1].name

String

Name of second charge

charges[1].proportional

Boolean

Is charge proportional ?

charges[1].amount

Double

Amount of second charge

flexible

Boolean

Is product definition flexible ?

active

Boolean

Is product definition active ?

Activate A Product Definition

curl-request
$ curl 'http://localhost:8080/definitions/pdtDefVOl6/commands' -i -X POST -H 'Content-Type: application/json' -H 'Accept: */*' -d '{
  "action" : "ACTIVATE",
  "note" : "NotexJ6i"
}'
http-request
POST /definitions/pdtDefVOl6/commands HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
Content-Length: 50

{
  "action" : "ACTIVATE",
  "note" : "NotexJ6i"
}
httpie-request
$ echo '{
  "action" : "ACTIVATE",
  "note" : "NotexJ6i"
}' | http POST 'http://localhost:8080/definitions/pdtDefVOl6/commands' 'Content-Type:application/json' 'Accept:*/*'
http-response
HTTP/1.1 202 Accepted
Table 8. request-fields
Path Type Description

action

String

Action +enum Action { ACTIVATE, + DEACTIVATE + }

note

String

Note

Deactivate A Product Definition

curl-request
$ curl 'http://localhost:8080/definitions/pdtDefG6t7/commands' -i -X POST -H 'Content-Type: application/json' -H 'Accept: */*' -d '{
  "action" : "DEACTIVATE",
  "note" : "NoteukNy"
}'
http-request
POST /definitions/pdtDefG6t7/commands HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
Content-Length: 52

{
  "action" : "DEACTIVATE",
  "note" : "NoteukNy"
}
httpie-request
$ echo '{
  "action" : "DEACTIVATE",
  "note" : "NoteukNy"
}' | http POST 'http://localhost:8080/definitions/pdtDefG6t7/commands' 'Content-Type:application/json' 'Accept:*/*'
http-response
HTTP/1.1 202 Accepted
Table 9. request-fields
Path Type Description

action

String

Action +enum Action { ACTIVATE, + DEACTIVATE + }

note

String

Note

Get Product Definition’s Commands

curl-request
$ curl 'http://localhost:8080/definitions/pdtDef7jJv/commands' -i -H 'Content-Type: application/json' -H 'Accept: */*'
http-request
GET /definitions/pdtDef7jJv/commands HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
httpie-request
$ http GET 'http://localhost:8080/definitions/pdtDef7jJv/commands' 'Content-Type:application/json' 'Accept:*/*'
http-response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 3

[ ]

Delete A Product Definition

curl-request
$ curl 'http://localhost:8080/definitions/pdtDef8nnl' -i -X DELETE -H 'Content-Type: application/json' -H 'Accept: */*'
http-request
DELETE /definitions/pdtDef8nnl HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
http-response
HTTP/1.1 202 Accepted
httpie-request
$ http DELETE 'http://localhost:8080/definitions/pdtDef8nnl' 'Content-Type:application/json' 'Accept:*/*'

Product Instances

Create A Product Instance

curl-request
$ curl 'http://localhost:8080/instances' -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
  "customerIdentifier" : "CustomerXKC",
  "productIdentifier" : "pdtDefu35E",
  "beneficiaries" : [ "BenefiaryQ73", "BenefiaryCgU" ]
}'
http-request
POST /instances HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 136

{
  "customerIdentifier" : "CustomerXKC",
  "productIdentifier" : "pdtDefu35E",
  "beneficiaries" : [ "BenefiaryQ73", "BenefiaryCgU" ]
}
httpie-request
$ echo '{
  "customerIdentifier" : "CustomerXKC",
  "productIdentifier" : "pdtDefu35E",
  "beneficiaries" : [ "BenefiaryQ73", "BenefiaryCgU" ]
}' | http POST 'http://localhost:8080/instances' 'Content-Type:application/json' 'Accept:application/json'
Table 10. request-fields
Path Type Description

customerIdentifier

String

Customer Identifier

productIdentifier

String

Product identifier

beneficiaries

Set<String>

Set of beneficiaries

http-response
HTTP/1.1 202 Accepted

Find A Product Instance

curl-request
$ curl 'http://localhost:8080/instances/CustomerRpP.91xx.00001' -i -H 'Content-Type: */*' -H 'Accept: application/json'
http-request
GET /instances/CustomerRpP.91xx.00001 HTTP/1.1
Content-Type: */*
Accept: application/json
Host: localhost:8080
httpie-request
$ http GET 'http://localhost:8080/instances/CustomerRpP.91xx.00001' 'Content-Type:*/*' 'Accept:application/json'
http-response
HTTP/1.1 200 OK
Content-Disposition: inline;filename=f.txt
Content-Type: application/json;charset=UTF-8
Content-Length: 319

{
  "customerIdentifier" : "CustomerRpP",
  "productIdentifier" : "pdtDefubmW",
  "accountIdentifier" : "CustomerRpP.91xx.00001",
  "alternativeAccountNumber" : null,
  "beneficiaries" : [ "BenefiaryJ38", "BenefiaryW84" ],
  "openedOn" : null,
  "lastTransactionDate" : null,
  "state" : "PENDING",
  "balance" : null
}
Table 11. response-fields
Path Type Description

customerIdentifier

String

Customer Identifier

productIdentifier

String

Product identifier

accountIdentifier

String

Account Identifier

alternativeAccountNumber

String

Alternative account Number

beneficiaries

Set<String>

Set of beneficiaries

openedOn

String

Date product instance was opened

lastTransactionDate

String

Last transaction date

state

String

State of product

balance

Double

balance

Fetch Instances

curl-request
$ curl 'http://localhost:8080/instances?customer=Customerg2h' -i -H 'Content-Type: */*' -H 'Accept: application/json'
http-request
GET /instances?customer=Customerg2h HTTP/1.1
Content-Type: */*
Accept: application/json
Host: localhost:8080
httpie-request
$ http GET 'http://localhost:8080/instances?customer=Customerg2h' 'Content-Type:*/*' 'Accept:application/json'
http-response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 323

[ {
  "customerIdentifier" : "Customerg2h",
  "productIdentifier" : "pdtDefvoxw",
  "accountIdentifier" : "Customerg2h.91xx.00001",
  "alternativeAccountNumber" : null,
  "beneficiaries" : [ "BenefiaryqTR", "Benefiary7F8" ],
  "openedOn" : null,
  "lastTransactionDate" : null,
  "state" : "PENDING",
  "balance" : null
} ]
Table 12. response-fields
Path Type Description

[].customerIdentifier

String

Customer Identifier

[].productIdentifier

String

Product identifier

[].accountIdentifier

String

Account Identifier

[].alternativeAccountNumber

String

Alternative account Number

[].beneficiaries

Set<String>

Set of beneficiaries

[].openedOn

String

Date product instance was opened

[].lastTransactionDate

String

Last transaction date

[].state

String

State of product

[].balance

Double

balance

Fetch Transaction Types

curl-request
$ curl 'http://localhost:8080/instances/transactiontypes?customer=Customerjpa' -i -H 'Content-Type: */*' -H 'Accept: application/json'
http-request
GET /instances/transactiontypes?customer=Customerjpa HTTP/1.1
Content-Type: */*
Accept: application/json
Host: localhost:8080
httpie-request
$ http GET 'http://localhost:8080/instances/transactiontypes?customer=Customerjpa' 'Content-Type:*/*' 'Accept:application/json'
http-response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 36

[ {
  "transactionType" : "ACCO"
} ]
Table 13. response-fields
Path Type Description

[].transactionType

String

Transaction Type

Update A Product Instance

curl-request
$ curl 'http://localhost:8080/instances/CustomerS9B.91xx.00001' -i -X PUT -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
  "customerIdentifier" : "CustomerS9B",
  "productIdentifier" : "pdtDefCibC",
  "accountIdentifier" : "CustomerS9B.91xx.00001",
  "beneficiaries" : [ "BeneficiaryOne", "BeneficiaryTwo" ],
  "state" : "PENDING"
}'
http-request
PUT /instances/CustomerS9B.91xx.00001 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 213

{
  "customerIdentifier" : "CustomerS9B",
  "productIdentifier" : "pdtDefCibC",
  "accountIdentifier" : "CustomerS9B.91xx.00001",
  "beneficiaries" : [ "BeneficiaryOne", "BeneficiaryTwo" ],
  "state" : "PENDING"
}
httpie-request
$ echo '{
  "customerIdentifier" : "CustomerS9B",
  "productIdentifier" : "pdtDefCibC",
  "accountIdentifier" : "CustomerS9B.91xx.00001",
  "beneficiaries" : [ "BeneficiaryOne", "BeneficiaryTwo" ],
  "state" : "PENDING"
}' | http PUT 'http://localhost:8080/instances/CustomerS9B.91xx.00001' 'Content-Type:application/json' 'Accept:application/json'
Table 14. request-fields
Path Type Description

customerIdentifier

String

Customer Identifier

productIdentifier

String

Product identifier

accountIdentifier

String

Account Identifier

beneficiaries

Set<String>

Set of beneficiaries

state

String

State of product

http-response
HTTP/1.1 202 Accepted

Activate A Product Instance

curl-request
$ curl 'http://localhost:8080/instances/Customer1sC.91xx.00001' -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d 'command=ACTIVATE'
http-request
POST /instances/Customer1sC.91xx.00001 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

command=ACTIVATE
httpie-request
$ http --form POST 'http://localhost:8080/instances/Customer1sC.91xx.00001' 'Content-Type:application/json' 'Accept:application/json' 'command=ACTIVATE'
http-response
HTTP/1.1 202 Accepted

Close A Product Instance

curl-request
$ curl 'http://localhost:8080/instances/Customerbub.91xx.00001' -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d 'command=CLOSE'
http-request
POST /instances/Customerbub.91xx.00001 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

command=CLOSE
httpie-request
$ http --form POST 'http://localhost:8080/instances/Customerbub.91xx.00001' 'Content-Type:application/json' 'Accept:application/json' 'command=CLOSE'
http-response
HTTP/1.1 202 Accepted

Transact In A Product Instance

curl-request
$ curl 'http://localhost:8080/instances/CustomerjPC.91xx.00001' -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d 'command=TRANSACTION'
http-request
POST /instances/CustomerjPC.91xx.00001 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

command=TRANSACTION
httpie-request
$ http --form POST 'http://localhost:8080/instances/CustomerjPC.91xx.00001' 'Content-Type:application/json' 'Accept:application/json' 'command=TRANSACTION'
http-response
HTTP/1.1 202 Accepted

Get Available Transaction Types

curl-request
$ curl 'http://localhost:8080/instances/transactiontypes?customer=Customerjpa' -i -H 'Content-Type: */*' -H 'Accept: application/json'
http-request
GET /instances/transactiontypes?customer=Customerjpa HTTP/1.1
Content-Type: */*
Accept: application/json
Host: localhost:8080
http-response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 36

[ {
  "transactionType" : "ACCO"
} ]
httpie-request
$ http GET 'http://localhost:8080/instances/transactiontypes?customer=Customerjpa' 'Content-Type:*/*' 'Accept:application/json'