MOJALOOP Central Settlements
Base URL: /v2, Version: 2.0
Mojaloop API for Settlements.
Summary
Tag: getHealth
Operation | Description |
---|---|
GET /health | getHealth |
Tag: getSettlementWindowById
Operation | Description |
---|---|
GET /settlementWindows/{id} | getSettlementWindowById |
Tag: updateSettlementBySettlementParticipant
Operation | Description |
---|---|
PUT /settlements/{sid}/participants/{pid} | updateSettlementBySettlementParticipant |
Tag: getSettlementBySettlementParticipantAccount
Operation | Description |
---|---|
GET /settlements/{sid}/participants/{pid}/accounts/{aid} | getSettlementBySettlementParticipantAccount |
Tag: updateSettlementBySettlementParticipantAccount
Operation | Description |
---|---|
PUT /settlements/{sid}/participants/{pid}/accounts/{aid} | updateSettlementBySettlementParticipantAccount |
Tag: sampled
Operation | Description |
---|---|
GET /settlementWindows/{id} | getSettlementWindowById |
POST /settlementWindows/{id} | closeSettlementWindow |
GET /settlementWindows | getSettlementWindowsByParams |
GET /settlements | getSettlementsByParams |
POST /settlements | createSettlement |
GET /settlements/{id} | getSettlementById |
PUT /settlements/{id} | updateSettlementById |
GET /settlements/{sid}/participants/{pid} | getSettlementBySettlementParticipant |
PUT /settlements/{sid}/participants/{pid} | updateSettlementBySettlementParticipant |
GET /settlements/{sid}/participants/{pid}/accounts/{aid} | getSettlementBySettlementParticipantAccount |
PUT /settlements/{sid}/participants/{pid}/accounts/{aid} | updateSettlementBySettlementParticipantAccount |
Tag: closeSettlementWindow
Operation | Description |
---|---|
POST /settlementWindows/{id} | closeSettlementWindow |
Tag: getSettlementWindowsByParams
Operation | Description |
---|---|
GET /settlementWindows | getSettlementWindowsByParams |
Tag: getSettlementsByParams
Operation | Description |
---|---|
GET /settlements | getSettlementsByParams |
Tag: createSettlement
Operation | Description |
---|---|
POST /settlements | createSettlement |
Tag: getSettlementById
Operation | Description |
---|---|
GET /settlements/{id} | getSettlementById |
Tag: updateSettlementById
Operation | Description |
---|---|
PUT /settlements/{id} | updateSettlementById |
Tag: getSettlementBySettlementParticipant
Operation | Description |
---|---|
GET /settlements/{sid}/participants/{pid} | getSettlementBySettlementParticipant |
Paths
Gets the health of the service and sub-services (i.e. database).
application/json
- 200 OK
-
A valid and health service.
- 502 Bad Gateway
-
API is live, but error connecting to required sub-service.
Returns Settlements as per parameter(s).
Name | Description | Type | Data Type | Annotation |
---|---|---|---|---|
currency | A valid currency to filter on. |
query | string | |
participantId | A valid participant Id to filter on. |
query | integer | |
settlementWindowId | A valid Settlement Window Id to filter on. |
query | number | |
accountId | A valid Account Id to filter on. |
query | number | |
state | A settlement state to filter on. |
query | string , x ∈ { PENDING_SETTLEMENT , PS_TRANSFERS_RECORDED , PS_TRANSFERS_RESERVED , PS_TRANSFERS_COMMITTED , SETTLING , SETTLED , ABORTED } | |
fromDateTime | The start date for query (relates to central-ledger.settlement.createdDate). Can be used together with `toDateTime'. eg 2017-07-20T17:32:28Z |
query | string (date-time) | |
toDateTime | The end date for query (relates to central-ledger.settlement.createdDate). Can be used together with `fromDateTime'. eg 2017-07-21T17:32:28Z |
query | string (date-time) | |
fromSettlementWindowDateTime | The start date for query (relates to central-ledger.settlementWindow.createdDate). Can be used together with `toDateTime'. eg 2017-07-20T17:32:28Z |
query | string (date-time) | |
toSettlementWindowDateTime | The end date for query (relates to central-ledger.settlementWindow.createdDate). Can be used together with `fromDateTime'. eg 2017-07-21T17:32:28Z |
query | string (date-time) |
application/json
- 200 OK
-
Settlement window(s) returned by the filtering parameters.
- 400 Bad Request
-
Bad request.
- 401 Unauthorized
-
Authorisation information is missing or invalid.
- 404 Not Found
-
No data found.
- 415 Unsupported Media Type
-
Unsupported Media Type.
- default
-
Unexpected error
Triggers settlement creation. Returns settlement report.
application/json
A JSON object containing settlement windows to be included.
application/json
- 200 OK
-
Created settlement with all windows and accounts.
- 400 Bad Request
-
Bad request.
- 401 Unauthorized
-
Authorisation information is missing or invalid.
- 404 Not Found
-
No data found.
- 415 Unsupported Media Type
-
Unsupported Media Type.
- default
-
Unexpected error
Returns Settlement(s) as per parameters/filter criteria.
Name | Description | Type | Data Type | Annotation |
---|---|---|---|---|
id | A valid Settlement Id. |
path | integer |
application/json
- 200 OK
-
Settlement successfully returned by the filtering/Query parameters.
- 400 Bad Request
-
Bad request.
- 401 Unauthorized
-
Authorisation information is missing or invalid.
- 404 Not Found
-
No data found.
- 415 Unsupported Media Type
-
Unsupported Media Type.
- default
-
Unexpected error
Acknowledgement of settlement by updating with Settlement Id.
application/json
A JSON object containing settlement update info.
Name | Description | Type | Data Type | Annotation |
---|---|---|---|---|
id | A valid Settlement Id. |
path | integer |
application/json
- 200 OK
-
Settlements updated.
- 400 Bad Request
-
Bad request.
- 401 Unauthorized
-
Authorisation information is missing or invalid.
- 404 Not Found
-
No data found.
- 415 Unsupported Media Type
-
Unsupported Media Type.
- default
-
Unexpected error
GET /settlements/{sid}/participants/{pid}
Tags: sampled, getSettlementBySettlementParticipantReturns Settlement(s) as per filter criteria.
Name | Description | Type | Data Type | Annotation |
---|---|---|---|---|
sid | A valid Settlement Id. |
path | integer | |
pid | A valid Participant Id. |
path | integer |
application/json
- 200 OK
-
Settlement, settlement windows and settlement accounts returned by the filtering parameters.
- 400 Bad Request
-
Bad request.
- 401 Unauthorized
-
Authorisation information is missing or invalid.
- 404 Not Found
-
No data found.
- 415 Unsupported Media Type
-
Unsupported Media Type.
- default
-
Unexpected error
PUT /settlements/{sid}/participants/{pid}
Tags: sampled, updateSettlementBySettlementParticipantAcknowledgement of settlement by updating the reason and state by SP.
application/json
A JSON object containing settlement update info.
Name | Description | Type | Data Type | Annotation |
---|---|---|---|---|
sid | A valid Settlement Id. |
path | integer | |
pid | A valid Participant Id. |
path | integer |
application/json
- 200 OK
-
Settlements updated.
- 400 Bad Request
-
Bad request.
- 401 Unauthorized
-
Authorisation information is missing or invalid.
- 404 Not Found
-
No data found.
- 415 Unsupported Media Type
-
Unsupported Media Type.
- default
-
Unexpected error
GET /settlements/{sid}/participants/{pid}/accounts/{aid}
Tags: sampled, getSettlementBySettlementParticipantAccountReturns Settlement(s) as per filter criteria.
Name | Description | Type | Data Type | Annotation |
---|---|---|---|---|
sid | A valid Settlement Id. |
path | integer | |
pid | A valid Participant Id. |
path | integer | |
aid | A valid Account Id. |
path | integer |
application/json
- 200 OK
-
Settlement, settlement windows and settlement accounts returned by the filtering parameters.
- 400 Bad Request
-
Bad request.
- 401 Unauthorized
-
Authorisation information is missing or invalid.
- 404 Not Found
-
No data found.
- 415 Unsupported Media Type
-
Unsupported Media Type.
- default
-
Unexpected error
PUT /settlements/{sid}/participants/{pid}/accounts/{aid}
Tags: sampled, updateSettlementBySettlementParticipantAccountAcknowledgement of settlement by updating the reason and state by SPA.
application/json
A JSON object containing settlement update info.
Name | Description | Type | Data Type | Annotation |
---|---|---|---|---|
sid | A valid Settlement Id. |
path | integer | |
pid | A valid Participant Id. |
path | integer | |
aid | A valid Account Id. |
path | integer |
application/json
- 200 OK
-
Settlements updated.
- 400 Bad Request
-
Bad request.
- 401 Unauthorized
-
Authorisation information is missing or invalid.
- 404 Not Found
-
No data found.
- 415 Unsupported Media Type
-
Unsupported Media Type.
- default
-
Unexpected error
Returns Settlement Windows as per parameter(s).
Name | Description | Type | Data Type | Annotation |
---|---|---|---|---|
participantId | A valid participant Id to filter on. |
query | integer | |
state | A settlement window state to filter on. |
query | string , x ∈ { OPEN , CLOSED , PENDING_SETTLEMENT , SETTLED , ABORTED } | |
fromDateTime | The start date for query (relates to central-ledger.settlementWindow.createdDate). Can be used together with `toDateTime'. eg 2017-07-20T17:32:28Z |
query | string (date-time) | |
toDateTime | The end date for query (relates to central-ledger.settlementWindow.createdDate). Can be used together with `fromDateTime'. eg 2017-07-21T17:32:28Z |
query | string (date-time) | |
currency | A valid currency to filter on. |
query | string |
application/json
- 200 OK
-
Settlement window(s) returned by the filtering parameters.
- 400 Bad Request
-
Bad request.
- 401 Unauthorized
-
Authorisation information is missing or invalid.
- 404 Not Found
-
No data found.
- 415 Unsupported Media Type
-
Unsupported Media Type.
- default
-
Unexpected error
Returns a Settlement Window by id.
Name | Description | Type | Data Type | Annotation |
---|---|---|---|---|
id | A valid settlement window id to be supplied in the query. |
path | integer |
application/json
- 200 OK
-
A settlement window's data returned.
- 400 Bad Request
-
Bad request.
- 401 Unauthorized
-
Authorisation information is missing or invalid.
- 404 Not Found
-
No data found.
- 415 Unsupported Media Type
-
Unsupported Media Type
- default
-
Unexpected error
Closes requested window and opens a new one.
application/json
A JSON object containing settlement window closure info.
Name | Description | Type | Data Type | Annotation |
---|---|---|---|---|
id | path | integer |
application/json
- 200 OK
-
Settlement window closed and new window opened.
- 400 Bad Request
-
Bad request.
- 401 Unauthorized
-
Authorisation information is missing or invalid.
- 404 Not Found
-
No data found.
- 415 Unsupported Media Type
-
Unsupported Media Type.
- default
-
Unexpected error
Schema definitions
- id: string
-
Account Id
- reason: string
-
TBD
- state: string
-
"PENDING_SETTLEMENT"
- netSettlementAmount: netSettlementAmount
-
- id: integer
-
Participant Currency Id
- reason: string
-
TBD
- state: string
-
"PENDING_SETTLEMENT"
- netSettlementAmount: netSettlementAmount
-
- errorInformation: object
-
- errorCode: integer
-
- errorDescription: string
-
- extensionList: object
-
- extension: object[]
- id: integer
-
- accounts: object[]
- id: integer
-
- state: string
-
- settlementWindows: object[]
- participants: object[]
- settlementModel: string
-
- reason: string
-
- settlementWindows: object[]
- id: integer
-
Participant Currency Id
- reason: string
-
"reason"
- state: string , x ∈ { PENDING_SETTLEMENT , PS_TRANSFERS_RECORDED , PS_TRANSFERS_RESERVED , PS_TRANSFERS_COMMITTED , SETTLED }
-
"SETTLED"
- externalReference: string
-
"external-reference-abc123"
- id: integer
-
Participant Id
- accounts: object[]
- state: string , x ∈ { ABORTED , INVALID }
-
- reason: string
-
- externalReference: string
-
- participants: object[]
- state: string , x ∈ { PENDING_SETTLEMENT , PS_TRANSFERS_RECORDED , PS_TRANSFERS_RESERVED , PS_TRANSFERS_COMMITTED , SETTLED }
-
"SETTLED"
- reason: string
-
"string"
- externalReference: string
-
"external-reference-abc123"
- accounts: object[]
- id: integer
-
- reason: string
-
- state: string
-
- createdDate: string
-
- changedDate: string
-
- content: object[]
- state: string , x ∈ { CLOSED }
-
"CLOSED"
- reason: string
-
"string"
- id: integer
-
- state: string
-
- ledgerAccountType: string
-
- currencyId: string
-
- createdDate: string
-
- changedDate: string
-
- settlementId: integer
-