Description

advertisement
Method
Customer/{customerId}/
accounts
Type
GET
HttpCode
Description
200
An array of accounts
[
{
"accountId": "4257800026777",
"balance": 0,
"softUpperLimit": 1000000,
"cardHolderId": 205117,
"currency": "NOK",
"withdrawAccountType": null,
"withdrawAccountNo": "471110******0000",
"withdrawExpiryDate": "2024-05-31T22:00:00.000+0000",
"depositAccountNo": null,
"depositAccountType": null,
"depositExpiryDate": "1970-01-01T00:00:00.000+0000",
"upgradeDate": null,
"kidMessage": null,
"withdrawAccountEntryMethod": "TYPED",
"depositAccountEntryMethod": "UNKNOWN",
"withdrawAccountModifiedBy": "bpi:101427227",
"depositAccountModifiedBy": "bpi:101427227",
"withdrawAccountOpens": "2014-02-17T21:04:59.000+0000",
"withdrawAccountModified": "2014-02-21T07:50:47.000+0000",
"depositAccountOpens": null,
"depositAccountModified": "2014-02-21T07:50:47.000+0000"
},
{
"accountId": "4157802429385",
"balance": 8500,
"softUpperLimit": 1000000,
"cardHolderId": 205117,
"currency": "NOT",
"withdrawAccountType": null,
"withdrawAccountNo": "400192******4077",
"withdrawExpiryDate": "2017-08-31T22:00:00.000+0000",
"depositAccountNo": "60010511138",
"depositAccountType": null,
"depositExpiryDate": null,
"upgradeDate": null,
"kidMessage": null,
"withdrawAccountEntryMethod": "TYPED",
"depositAccountEntryMethod": "TYPED",
"withdrawAccountModifiedBy": "ntp:4157802429385",
"depositAccountModifiedBy": "bpi:101427227(minSide)",
"withdrawAccountOpens": null,
"withdrawAccountModified": "2015-05-13T13:53:26.000+0000",
"depositAccountOpens": "2015-04-09T12:35:44.000+0000",
"depositAccountModified": "2015-04-09T12:35:44.000+0000"
}
]
204
401
401
500
200
Customer/{customerId}/
agreements
GET
If there is no accounts
If user didn't provide token for
authorization
If provided bpid didn't match
with accessToken
Unexpected server error with
error description
An array of agreements
[
{
"contractId": 4329,
"buypassId": 101427417,
"merchantId": 512,
"merchantName": "Buypass - minside",
"status": 3,
"maxAmount": 100000,
"minDate": "2015-02-12T23:00:00.000+0000",
"maxDate": "2015-12-01T23:00:00.000+0000",
"debitRequired": true,
"accountNumber": "************0000",
"accountExpiry": "2024-05-31T22:00:00.000+0000",
"lastUsed": "2015-02-13T09:29:52.000+0000",
"amountUsed": 95500,
"created": null
}
]
204
401
401
500
200
Customer/{customerId}/
agreements/{agreementI
d}
GET
If there is no agreements
If user didn't provide token for
authorization
If provided bpid didn't match
with accessToken
Unexpected server error with
error description
Single agreement
{
"contractId": 4329,
"buypassId": 101427417,
"merchantId": 512,
"merchantName": "Buypass - minside",
"status": 3,
"maxAmount": 100000,
"minDate": "2015-02-12T23:00:00.000+0000",
"maxDate": "2015-12-01T23:00:00.000+0000",
"debitRequired": true,
"accountNumber": "************0000",
"accountExpiry": "2024-05-31T22:00:00.000+0000",
"lastUsed": "2015-02-13T09:29:52.000+0000",
"amountUsed": 95500,
"created": null
}
401
401
404
500
204
401
Customer/{customerId}/
agreements/{agreementI
d}
DELET 401
E
404
500
200
Account/{accountId}
GET
If user didn't provide token for
authorization
If provided bpid didn't match
with accessToken
If there is no agreement with
such id
Unexpected server error with
error description
Something, saying that
agreement was removed
If user didn't provide token for
authorization
If provided bpid didn't match
with accessToken
If there is no agreement with
such id
Unexpected server error with
error description
Single account will be returned
{
"accountId": "4257800026777",
"balance": 0,
"softUpperLimit": 1000000,
"cardHolderId": 205117,
"currency": "NOK",
"withdrawAccountType": null,
"withdrawAccountNo": "471110******0000",
"withdrawExpiryDate": "2024-05-31T22:00:00.000+0000",
"depositAccountNo": null,
"depositAccountType": null,
"depositExpiryDate": "1970-01-01T00:00:00.000+0000",
"upgradeDate": null,
"kidMessage": "{\n \"message\": \"some mock message, which
would be changed in th future. Have a nice day! :)\"\n}",
"withdrawAccountEntryMethod": "TYPED",
"depositAccountEntryMethod": "UNKNOWN",
"withdrawAccountModifiedBy": "bpi:101427227",
"depositAccountModifiedBy": "bpi:101427227",
"withdrawAccountOpens": "2014-02-17T21:04:59.000+0000",
"withdrawAccountModified": "2014-02-21T07:50:47.000+0000",
"depositAccountOpens": null,
"depositAccountModified": "2014-02-21T07:50:47.000+0000"
}
401
404
500
200
Account/{accountId}/dep
osit
POST
If user didn't provide token for
authorization
If user haven't account with such
accountId
Unexpected server error with
error description
Will return currency and balance
on specified account
{
"currency": "NOK",
"balance": 7500
}
400
401
If provided json is incorrect
If user didn't provide access
token
404
500
200
Account/{accountId}/pay
mentcards
[
{
"opens": null,
"accountEntryMethod": "TYPED",
"modified": "2015-05-13T13:53:26.000+0000",
"accountId": "4157802429385",
"accountModifiedBy": "ntp:4157802429385",
"accountNo": "400192******4077",
"accountType": null,
"accountVerified": null,
"expires": "2017-08-31T22:00:00.000+0000"
GET
}
]
204
401
404
500
202
Account/{accountId}/pay
mentcards
If such account with provided id
wasn't found
Unexpected server error with
error description
An array of payment cards.
POST
400
401
If user haven't payment cards
If user didn't provide token for
authorization
If such account with provided id
wasn't found
Unexpected server error with
error description
Code, that card was created
If provided json is incorrect
If user didn't provide token for
authorization
403
404
500
200
If user already have card with
such ID
If such account with provided id
wasn't found
Unexpected server error with
error description
Response with current balance
{
"currency": "NOK",
"balance": 0
}
Account/{accountId}/pay
mentcards/balance
401
GET
404
500
200
Account/{accountId}/pay
mentcards/{cardId}
If user didn't provide token for
authorization
If such account with provided id
wasn't found
Unexpected server error with
error description
Single card.
{
"opens": null,
"accountEntryMethod": "TYPED",
"modified": "2015-05-28T09:41:17.000+0000",
"accountId": "4157802429385",
"accountModifiedBy": "ntp:4157802429385",
"accountNo": "400192******4077",
"accountType": null,
"accountVerified": null,
"expires": "2020-02-29T23:00:00.000+0000"
GET
}
401
If user didn't provide token for
authorization
404
404
500
202
400
401
Account/{accountId}/pay
mentcards/{cardId}
PUT
403
404
500
204
400
401
Account/{accountId}/pay
mentcards/{cardId}
DELET
E
404
500
200
PUT
If such account with provided id
wasn't found
If payment card with such ID
wasn't found
Unexpected server error with
error description
The result of the update.
if provided data was invalid
If user didn't provide token for
authorization
If user haven't card
If such account with provided id
wasn't found
Unexpected server error with
error description
The result of the delete.
if provided data was invalid
If user didn't provide token for
authorization
If such account with provided id
wasn't found
Unexpected server error with
error description
Will return currency and ballance
on specified account.
{
"currency": "NOK",
"balance": 7500
}
400
401
Account/{accountId}/pay
mentcards/{cardId}/with
draw
404
500
200
Account/{accountId}/tra
nsactions
GET
If provided json is incorrect
If user didn't provide access
token
If such account with provided id
wasn't found
Unexpected server error with
error description
An array of transactions in
provided time range
[
{
"transactionDate": "28.05 11:34",
"transactionText": "Overf. til bankkonto",
"transactionType": 2,
"currency": "NOK",
"amount": "-1000",
"transactionId": 516540
},
{
"transactionDate": "13.05 15:57",
"transactionText": "Overf fra bet.kort",
"transactionType": 1,
"currency": "NOK",
"amount": "3000",
"transactionId": 511352
},
{
"transactionDate": "13.05 15:46",
"transactionText": "Overf. til bankkonto",
"transactionType": 2,
"currency": "NOK",
"amount": "-2000",
"transactionId": 511351
},
{
"transactionDate": "21.02 08:54",
"transactionText": "Varekj�",
"transactionType": 2,
"currency": "NOK",
"amount": "-7500",
"transactionId": 378423
},
{
"transactionDate": "21.02 08:53",
"transactionText": "Varekj�",
"transactionType": 2,
"currency": "NOK",
"amount": "-5000",
"transactionId": 378421
},
{
"transactionDate": "21.02 08:53",
"transactionText": "Utbetaling",
"transactionType": 1,
"currency": "NOK",
"amount": "7500",
"transactionId": 378419
},
{
"transactionDate": "21.02 08:53",
"transactionText": "Utbetaling",
"transactionType": 1,
"currency": "NOK",
"amount": "10000",
"transactionId": 378417
},
{
"transactionDate": "21.02 08:53",
"transactionText": "Varekj�",
"transactionType": 2,
"currency": "NOK",
"amount": "-5000",
"transactionId": 378415
},
{
"transactionDate": "21.02 08:53",
"transactionText": "Varekj�",
"transactionType": 2,
"currency": "NOK",
"amount": "-7500",
"transactionId": 378413
},
{
"transactionDate": "21.02 08:52",
"transactionText": "Utbetaling",
"transactionType": 1,
"currency": "NOK",
"amount": "10000",
"transactionId": 378411
},
{
"transactionDate": "21.02 08:52",
"transactionText": "Varekj�",
"transactionType": 2,
"currency": "NOK",
"amount": "-2500",
"transactionId": 378409
},
{
"transactionDate": "21.02 08:52",
"transactionText": "Utbetaling",
"transactionType": 1,
"currency": "NOK",
"amount": "2500",
"transactionId": 378407
},
{
"transactionDate": "21.02 08:52",
"transactionText": "Varekj�",
"transactionType": 2,
"currency": "NOK",
"amount": "-5000",
"transactionId": 378405
},
{
"transactionDate": "21.02 08:52",
"transactionText": "Utbetaling",
"transactionType": 1,
"currency": "NOK",
"amount": "10000",
"transactionId": 378403
}
]
204
400
401
If user haven't transactions in
specified date range
If user specify invalid date range
If user didn't provide token for
authorization
404
500
200
If there is no account with
specified accountId.
Unexpected server error with
error description
Separate transaction
{
"transactionDate": "13.05 15:46",
"transactionText": "Overf. til bankkonto",
"transactionType": 2,
"currency": "NOK",
"amount": "-2000",
"transactionId": 511351
}
Account/{accountId}/tra
nsactions/{transId}
GET
401
404
404
500
If user didn't provide token for
authorization
If there is no account with
specified accountId.
If there is no transaction with
specified id.
Unexpected server error with
error description
Download