Get Account Information (Get Account)
This API Operation uses an accountId to retrieve account information, including the current balance. Updates are reflected in the current balance.
HTTP Method: GET
URI: https://api.blackhawknetwork.com/accountProcessing/v1/getAccount?accountId={accountIdValue}
Request
Request Header Attributes
All three of these header attributes are optional; however, if a client wants idempotency support then they should specify all three on every request
Name | Type | Required | Description |
---|---|---|---|
requestorId | String | N | A value defined by the client application that can be used to uniquely identify that client application. If the client application does not specify a value, a globally unique identifier will be filled in automatically. |
requestId | String | N | A value defined by the client application that can be used to uniquely identify that specific request from the client. This value should be set if the client application wants to take advantage of an idempotent operation on a service. |
previousAttempts | String | N | The number of times this same request has been attempted unsuccessfully before. A value that is greater than zero will cause the service to view this request as a retry attempt and it will be treated idempotently. |
Request Elements
Name | Type | Required | Description |
---|---|---|---|
accountId | GUID | Y | Internal identifier of an account, aka cardId |
Response
Response Header Attributes
Standard header attributes only
Response Elements
Name | Type | Description |
---|---|---|
account | AccountInformation | The requested account information |
Error Codes
HTTP Status Code | Error Code | Description |
---|---|---|
400 | bhn.com.service.request.missing.parameter | Account ID missing in request |
400 | com.bhn.general.invalid.argument | Illegal argument supplied in the request |
409 | account.does.not.exist | No account found for account ID |
409 | productline.not.found | Product line not found in the system |
409 | product.not.found | Product ID associated to the product line is not found in the system |
409 | productLine.setup.not.complete | The product line passed in the request is not set up completely for a balance inquiry |
Sample
GET /accountProcessing/v1/getAccount?accountId=FAXF46GSGX3VTP34Y28YXRBWL4 HTTP/1.1
requestorId: RZ2JMRQW0SM680Q0MF2M8FBFMR
Content-Type: application/json; charset=UTF-8
Accept: application/json; charset=UTF-8
Host: api.blackhawknetwork.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.2 (java 1.5)
HTTP/1.1 200 OK
Date: Fri, 06 Jul 2012 20:37:08 GMT
Content-Type: application/json;charset=UTF-8
Content-Length: 32
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
{
"entityId":"https://api.blackhawknetwork.com/accountProcessing/v1/getAccount?accountId=FAXF46GSGX3VTP34Y28YXRBWL4",
"creatorId":"YKGVJGPTWC7TPWGPA3KJ2FX01R",
"updaterId":"YKGVJGPTWC7TPWGPA3KJ2FX01R",
"type":"RETAILER_CARD",
"accountNumber":"3F72THH8CZDSQB7GF7MAJPAVKW",
"securityCode":"58JWBCMYKXBCA",
"productLineId":"https://api.blackhawknetwork.com/productManagement/v1/productLine/ZLKZ6RD706YZXJD5Q7MBLN6FVM",
"balance":10,
"balanceAsOf": "2014-05-14",
"isBalanceStale": false,
"currency":"USD",
"status": "ACTIVATED"
}
Updated 9 months ago