Deposit Transactions

Deposit to patron account

POST /api/.../patrons/{id}/accounttransactions/deposit

This method allows the caller to add deposit to patron account.

Request Information

Parameters
Name Type Required Description
depositData DtoFineData Yes Define this parameter in the request body.
id Integer Yes The unique id assigned to the patron.
DtoFineData
Property Type Nullable Description
TxnAmount Decimal No Required. Amount of the transaction.
PatronPaymentMethod Int No Required. For current implementation possible values are: 11 for paying with cash
FreeTextNote String Yes Notes
Request body
Example
application/json, text/json
{ 
TxnAmount : 10, 
FreeTextNote : "Deposit from NextGen",
PatronPaymentMethod: 11
}
      

Response Information

Returns list of transaction ids
Example
application/json, text/json
{
    [
        1,
        2,
        3
    ]
}

Return Deposit

PUT /api/.../patrons/{id}/accounttransactions/deposit?action=return

This method allows the caller to return full or partial deposit.

Forfeit Deposit

PUT /api/.../patrons/{id}/accounttransactions/deposit?action=forfeit

This method allows the caller to forfeit full or partial deposit.

Credit Deposit

PUT /api/.../patrons/{id}/accounttransactions/deposit?action=credit

This method allows the caller add credit from full or partial deposit.

Request and Response information is similar for 'Return', 'Forfeit' or 'Credit' a deposit

Request Information

Parameters
Name Type Required Description
depositData DtoFineData Yes Define this parameter in the request body.
id Integer Yes The unique id assigned to the patron.
action String Yes Define this parameter in the request query string. Possible values: 'return', 'credit', 'forfeit'
DtoFineData
Property Type Nullable Description
TxnAmount Decimal No Required. Amount of the transaction.
MainTxnIDs Int No Required. List of transaction IDs. Unique identifier for each transaction
FreeTextNote String Yes Notes
Request body
Example
application/json, text/json
{ 
TxnAmount : 10, 
FreeTextNote : "Return deposit from NextGen",
MainTxnIDs:
 [
        3,
        4,
        5
 ]
}

Response Information

Example
application/json, text/json
{
    [
        1,
        2,
        3
    ]
}

Reference for Polaris enum values:

enum PatronPaymentMethod
{
    PayFrmCredit = 1,
    PayFrmDeposit = 2,
    DepositFrmCredit = 3,
    CreditFrmDeposit = 4,
    CreditFrmPAY = 5,
    StoredValue = 6,
    Cash = 11,
    CreditCard = 12,
    DebitCard = 13,
    Check = 14,
    Voucher = 15,
    CollectionAgency = 16,
    SmartCard = 17
}
            

HTTP Response Codes

Code Description
200 OK. Success
400 Null object. Bad request
409 CONFLICT. Patron record is secured.