Actions
Create An Action
$ 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"
}'
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"
}
$ 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/1.1 202 Accepted
Path | Type | Description |
---|---|---|
|
|
Action identifier |
|
|
Name of action |
|
|
Description of action |
|
|
transaction type |
Get Default Actions
$ curl 'http://localhost:8080/actions' -i -H 'Content-Type: application/json' -H 'Accept: */*'
GET /actions HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
$ http GET 'http://localhost:8080/actions' 'Content-Type:application/json' 'Accept:*/*'
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"
} ]
Path | Type | Description |
---|---|---|
|
|
Open |
|
|
Account Opening |
|
|
Description of Account Opening |
|
|
ACCO |
|
|
Transfer |
|
|
Account Transfer |
|
|
Description of Account Transfer |
|
|
ACCT |
|
|
Close |
|
|
Account Closing |
|
|
Description of Account Closing |
|
|
ACCC |
|
|
Deposit |
|
|
Cash Deposit |
|
|
Description of Cash Deposit |
|
|
CDPT |
|
|
Withdraw |
|
|
Cash Withdraw |
|
|
Description of Cash Withdraw |
|
|
CWDL |
Product Definitions
Define A Product
$ 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
}'
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
}
$ 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/1.1 202 Accepted
Path | Type | Description |
---|---|---|
|
|
Type of transaction |
|
|
Action identifier |
|
|
Name of action |
|
|
Description of action |
|
|
Currency’s code |
|
|
Currency’s name |
|
|
Currency’s sign |
|
|
Currency’s scale |
|
|
Minimum Balance |
|
|
Equity Ledger Identifier |
|
|
Cash Account |
|
|
Expense Account |
|
|
Accrue Account |
|
|
Interest |
|
|
Term period |
|
|
Term time unit |
|
|
Term interest payable |
|
|
Charge first action |
|
|
first Charge income account |
|
|
Name of first charge |
|
|
Is charge proportional ? |
|
|
Amount of first charge |
|
|
Charge second action |
|
|
Charge income account |
|
|
Name of second charge |
|
|
Is charge proportional ? |
|
|
Amount of second charge |
|
|
is product definition flexible ? |
Find A Product Definition
$ curl 'http://localhost:8080/definitions/pdtDefjcoG' -i -H 'Content-Type: application/json' -H 'Accept: */*'
GET /definitions/pdtDefjcoG HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
$ http GET 'http://localhost:8080/definitions/pdtDefjcoG' 'Content-Type:application/json' 'Accept:*/*'
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
}
Path | Type | Description |
---|---|---|
|
|
Type of transaction |
|
|
Action identifier |
|
|
Name of action |
|
|
Description of action |
|
|
Currency’s code |
|
|
Currency’s name |
|
|
Currency’s sign |
|
|
Currency’s scale |
|
|
Minimum Balance |
|
|
Equity Ledger Identifier |
|
|
Cash Account |
|
|
Expense Account |
|
|
Accrue Account |
|
|
Interest |
|
|
Term period |
|
|
Term time unit |
|
|
Term interest payable |
|
|
Charge first action |
|
|
first Charge income account |
|
|
Name of first charge |
|
|
Is charge proportional ? |
|
|
Amount of first charge |
|
|
Description of first charge |
|
|
Charge second action |
|
|
Charge income account |
|
|
Name of second charge |
|
|
Is charge proportional ? |
|
|
Description of second charge |
|
|
Amount of second charge |
|
|
Is product definition flexible ? |
|
|
Is product definition active ? |
Fetch Product Definitions
$ curl 'http://localhost:8080/definitions' -i -H 'Content-Type: application/json' -H 'Accept: */*'
GET /definitions HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
$ http GET 'http://localhost:8080/definitions' 'Content-Type:application/json' 'Accept:*/*'
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
} ]
Path | Type | Description |
---|---|---|
|
|
Type of transaction |
|
|
Action identifier |
|
|
Name of action |
|
|
Description of action |
|
|
Currency’s code |
|
|
Currency’s name |
|
|
Currency’s sign |
|
|
Currency’s scale |
|
|
Minimum Balance |
|
|
Equity Ledger Identifier |
|
|
Cash Account |
|
|
Expense Account |
|
|
Accrue Account |
|
|
Interest |
|
|
Term period |
|
|
Term time unit |
|
|
Term interest payable |
|
|
first Charge income account |
|
|
Name of first charge |
|
|
Is charge proportional ? |
|
|
Amount of first charge |
|
|
Description of first charge |
|
|
Charge second action |
|
|
Charge income account |
|
|
Name of second charge |
|
|
Is charge proportional ? |
|
|
Description of second charge |
|
|
Amount of second charge |
|
|
Is product definition flexible ? |
|
|
Is product definition active ? |
|
|
Type of transaction |
|
|
Action identifier |
|
|
Name of action |
|
|
Description of action |
|
|
Currency’s code |
|
|
Currency’s name |
|
|
Currency’s sign |
|
|
Currency’s scale |
|
|
Minimum Balance |
|
|
Equity Ledger Identifier |
|
|
Cash Account |
|
|
Expense Account |
|
|
Accrue Account |
|
|
Interest |
|
|
Term period |
|
|
Term time unit |
|
|
Term interest payable |
|
|
Charge first action |
|
|
first Charge income account |
|
|
Name of first charge |
|
|
Is charge proportional ? |
|
|
Amount of first charge |
|
|
Description of first charge |
|
|
Charge second action |
|
|
Charge income account |
|
|
Name of second charge |
|
|
Is charge proportional ? |
|
|
Description of second charge |
|
|
Amount of second charge |
|
|
Is product definition flexible ? |
|
|
Is product definition active ? |
Find A Product Definition’s Instances
$ curl 'http://localhost:8080/definitions/pdtDefZikm/instances' -i -H 'Content-Type: application/json' -H 'Accept: */*'
GET /definitions/pdtDefZikm/instances HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
$ http GET 'http://localhost:8080/definitions/pdtDefZikm/instances' 'Content-Type:application/json' 'Accept:*/*'
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
} ]
Path | Type | Description |
---|---|---|
|
|
Customer Identifier |
|
|
Product identifier |
|
|
Account Identifier |
|
|
Alternative Account Number |
|
|
Set of beneficiaries |
|
|
|
|
|
Last transaction date |
|
|
State of product instance |
|
|
Balance |
Update A Product Definition
$ 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
}'
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
}
$ 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/1.1 202 Accepted
Path | Type | Description |
---|---|---|
|
|
Type of transaction |
|
|
Action identifier |
|
|
Name of action |
|
|
Description of action |
|
|
Currency’s code |
|
|
Currency’s name |
|
|
Currency’s sign |
|
|
Currency’s scale |
|
|
Minimum Balance |
|
|
Equity Ledger Identifier |
|
|
Cash Account |
|
|
Expense Account |
|
|
Accrue Account |
|
|
Interest |
|
|
Term period |
|
|
Term time unit |
|
|
Term interest payable |
|
|
Charge first action |
|
|
first Charge income account |
|
|
Name of first charge |
|
|
Is charge proportional ? |
|
|
Amount of first charge |
|
|
Charge second action |
|
|
Charge income account |
|
|
Name of second charge |
|
|
Is charge proportional ? |
|
|
Amount of second charge |
|
|
Is product definition flexible ? |
|
|
Is product definition active ? |
Activate A Product Definition
$ curl 'http://localhost:8080/definitions/pdtDefVOl6/commands' -i -X POST -H 'Content-Type: application/json' -H 'Accept: */*' -d '{
"action" : "ACTIVATE",
"note" : "NotexJ6i"
}'
POST /definitions/pdtDefVOl6/commands HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
Content-Length: 50
{
"action" : "ACTIVATE",
"note" : "NotexJ6i"
}
$ echo '{
"action" : "ACTIVATE",
"note" : "NotexJ6i"
}' | http POST 'http://localhost:8080/definitions/pdtDefVOl6/commands' 'Content-Type:application/json' 'Accept:*/*'
HTTP/1.1 202 Accepted
Path | Type | Description |
---|---|---|
|
|
Action +enum Action { ACTIVATE, + DEACTIVATE + } |
|
|
Note |
Deactivate A Product Definition
$ curl 'http://localhost:8080/definitions/pdtDefG6t7/commands' -i -X POST -H 'Content-Type: application/json' -H 'Accept: */*' -d '{
"action" : "DEACTIVATE",
"note" : "NoteukNy"
}'
POST /definitions/pdtDefG6t7/commands HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
Content-Length: 52
{
"action" : "DEACTIVATE",
"note" : "NoteukNy"
}
$ echo '{
"action" : "DEACTIVATE",
"note" : "NoteukNy"
}' | http POST 'http://localhost:8080/definitions/pdtDefG6t7/commands' 'Content-Type:application/json' 'Accept:*/*'
HTTP/1.1 202 Accepted
Path | Type | Description |
---|---|---|
|
|
Action +enum Action { ACTIVATE, + DEACTIVATE + } |
|
|
Note |
Get Product Definition’s Commands
$ curl 'http://localhost:8080/definitions/pdtDef7jJv/commands' -i -H 'Content-Type: application/json' -H 'Accept: */*'
GET /definitions/pdtDef7jJv/commands HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
$ http GET 'http://localhost:8080/definitions/pdtDef7jJv/commands' 'Content-Type:application/json' 'Accept:*/*'
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 3
[ ]
Delete A Product Definition
$ curl 'http://localhost:8080/definitions/pdtDef8nnl' -i -X DELETE -H 'Content-Type: application/json' -H 'Accept: */*'
DELETE /definitions/pdtDef8nnl HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
HTTP/1.1 202 Accepted
$ http DELETE 'http://localhost:8080/definitions/pdtDef8nnl' 'Content-Type:application/json' 'Accept:*/*'
Product Instances
Create A Product Instance
$ 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" ]
}'
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" ]
}
$ echo '{
"customerIdentifier" : "CustomerXKC",
"productIdentifier" : "pdtDefu35E",
"beneficiaries" : [ "BenefiaryQ73", "BenefiaryCgU" ]
}' | http POST 'http://localhost:8080/instances' 'Content-Type:application/json' 'Accept:application/json'
Path | Type | Description |
---|---|---|
|
|
Customer Identifier |
|
|
Product identifier |
|
|
Set of beneficiaries |
HTTP/1.1 202 Accepted
Find A Product Instance
$ curl 'http://localhost:8080/instances/CustomerRpP.91xx.00001' -i -H 'Content-Type: */*' -H 'Accept: application/json'
GET /instances/CustomerRpP.91xx.00001 HTTP/1.1
Content-Type: */*
Accept: application/json
Host: localhost:8080
$ http GET 'http://localhost:8080/instances/CustomerRpP.91xx.00001' 'Content-Type:*/*' 'Accept:application/json'
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
}
Path | Type | Description |
---|---|---|
|
|
Customer Identifier |
|
|
Product identifier |
|
|
Account Identifier |
|
|
Alternative account Number |
|
|
Set of beneficiaries |
|
|
Date product instance was opened |
|
|
Last transaction date |
|
|
State of product |
|
|
balance |
Fetch Instances
$ curl 'http://localhost:8080/instances?customer=Customerg2h' -i -H 'Content-Type: */*' -H 'Accept: application/json'
GET /instances?customer=Customerg2h HTTP/1.1
Content-Type: */*
Accept: application/json
Host: localhost:8080
$ http GET 'http://localhost:8080/instances?customer=Customerg2h' 'Content-Type:*/*' 'Accept:application/json'
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
} ]
Path | Type | Description |
---|---|---|
|
|
Customer Identifier |
|
|
Product identifier |
|
|
Account Identifier |
|
|
Alternative account Number |
|
|
Set of beneficiaries |
|
|
Date product instance was opened |
|
|
Last transaction date |
|
|
State of product |
|
|
balance |
Fetch Transaction Types
$ curl 'http://localhost:8080/instances/transactiontypes?customer=Customerjpa' -i -H 'Content-Type: */*' -H 'Accept: application/json'
GET /instances/transactiontypes?customer=Customerjpa HTTP/1.1
Content-Type: */*
Accept: application/json
Host: localhost:8080
$ http GET 'http://localhost:8080/instances/transactiontypes?customer=Customerjpa' 'Content-Type:*/*' 'Accept:application/json'
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 36
[ {
"transactionType" : "ACCO"
} ]
Path | Type | Description |
---|---|---|
|
|
Transaction Type |
Update A Product Instance
$ 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"
}'
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"
}
$ 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'
Path | Type | Description |
---|---|---|
|
|
Customer Identifier |
|
|
Product identifier |
|
|
Account Identifier |
|
|
Set of beneficiaries |
|
|
State of product |
HTTP/1.1 202 Accepted
Activate A Product Instance
$ curl 'http://localhost:8080/instances/Customer1sC.91xx.00001' -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d 'command=ACTIVATE'
POST /instances/Customer1sC.91xx.00001 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
command=ACTIVATE
$ http --form POST 'http://localhost:8080/instances/Customer1sC.91xx.00001' 'Content-Type:application/json' 'Accept:application/json' 'command=ACTIVATE'
HTTP/1.1 202 Accepted
Close A Product Instance
$ curl 'http://localhost:8080/instances/Customerbub.91xx.00001' -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d 'command=CLOSE'
POST /instances/Customerbub.91xx.00001 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
command=CLOSE
$ http --form POST 'http://localhost:8080/instances/Customerbub.91xx.00001' 'Content-Type:application/json' 'Accept:application/json' 'command=CLOSE'
HTTP/1.1 202 Accepted
Transact In A Product Instance
$ curl 'http://localhost:8080/instances/CustomerjPC.91xx.00001' -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d 'command=TRANSACTION'
POST /instances/CustomerjPC.91xx.00001 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
command=TRANSACTION
$ http --form POST 'http://localhost:8080/instances/CustomerjPC.91xx.00001' 'Content-Type:application/json' 'Accept:application/json' 'command=TRANSACTION'
HTTP/1.1 202 Accepted
Get Available Transaction Types
$ curl 'http://localhost:8080/instances/transactiontypes?customer=Customerjpa' -i -H 'Content-Type: */*' -H 'Accept: application/json'
GET /instances/transactiontypes?customer=Customerjpa HTTP/1.1
Content-Type: */*
Accept: application/json
Host: localhost:8080
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 36
[ {
"transactionType" : "ACCO"
} ]
$ http GET 'http://localhost:8080/instances/transactiontypes?customer=Customerjpa' 'Content-Type:*/*' 'Accept:application/json'