Associate Retail Chain User With Card

AssociateRetailChainUserWithCard API Method

This operation is to associate an employee card with RetailChainUser(teller). The teller’s First/Last name should match the card holder’s First/Last name.

📘

Every request triggered should have a unique X-GD-RequestId value in the header.

Syntax

POST {baseUrl}/retailer/user/associate

Example Request

Success Request

POST {baseUrl}/retailer/user/associate 
Authorization: bearer {token}
Content-Type: application/json
X-GD-RequestId: test101
{
    "metadata": {
        "merchantId": "fscc0342",
        "registerId": "01",
        "requestDateTime": "2023-11-09T13:25:45Z",
        "storeId": "CC970",
        "userId": "[email protected]"
    },  
  "accountNumber": "",
  "accountIdentifier": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx" 
}

Negative Request

POST {baseUrl}/retailer/user/associate 
Authorization: bearer {token}
Content-Type: application/json
X-GD-RequestId: test101
{
    "metadata": {
        "merchantId": "fscc0342",
        "registerId": "01",
        "requestDateTime": "2023-11-09T13:50:33Z",
        "storeId": "CC970",
        "userId": "[email protected]"
    },  
  "accountNumber": "",
  "accountIdentifier": "06e33e98-5c40-4c1a-967b-930f28f509a4"
}

Request Parameters

ParameterRequired (Y/N)Format/ Data TypePatternDescription
X-GD-RequestIdYesStringMaxLength:50It is a unique transaction identifier that is generated by the retailer.
requestDateTimeYesDateTime2023-08-08T12:34:56ZTime stamp at which transaction occurred.
The time stamp has to be in UTC time zone and follow the following date and time formats:
• YYYY-MM-DDTHH:mm:ssZ
registerIDNoStringMaxLength: 20Register where the transaction occurred.
userIdYesStringMaxLength:50The unique ID of the user generating the transaction and also the tellerID used to associate the card.
storeIdYesStringMaxLength: 20The store number associated with the retailer that sold the package.
If not supplied, InvalidParameter (Code:100) error will be return.
merchantIdYesStringMaxLength: 20Unique merchant Id. It is defined by Green Dot – Merchant corresponding with Retailer.
accountNumberNoString16 digits PANAccount Number (PAN) of the card.
For Insight partners, it can pass in registration id instead of PAN.
accountIdentifierNoGUIDe5843e05-d367-4bf1-a223-3af46ae18802Newly created unique identifier for sale card, should be using for all subsequent API calls. Either of AccountNumber / AccountIdentifier required.

Example Response

Success Response

HTTP/1.1 200 OK
Content-Type: application/json
X-GD-RequestId: test101
X-GD-ResponseId: 0237f1af-3168-4907-a86f-dafc5b42957e
X-GD-ResponseCode: 0

{    
    "metadata": {
        "requestId": "test101",
        "responseId": "0237f1af-3168-4907-a86f-dafc5b42957e",
        "responseDateTime": "2023-11-09T13:25:46.1924552Z",
        "responseCode": 0,
        "responseDescription": "Success"}
}

Negative Response

HTTP/1.1 200 OK
Content-Type: application/json
X-GD-RequestId: test101
X-GD-ResponseId: 5dad1c33-3675-42e6-9c2d-8261d9a201c2
X-GD-ResponseCode: 863

{    
    "metadata": {
        "requestId": "test101",
        "responseId": "5dad1c33-3675-42e6-9c2d-8261d9a201c2",
        "responseDateTime": "2023-11-09T13:50:37.4678618Z",
        "responseCode": 863,
        "responseDescription": "UserNameNotMatch"    
} 
}

Response Parameters

ParameterFormat/Data TypePatternDescription
requestIdStringMaxLength:50The unique request ID generated from the request.
responseIdStringMaxLength:50The unique Response Identifier (generated by GreenDot).
responseDateTimeDateTime2023-09-07T16:12:23.4541445+08:00Time stamp at which transaction occurred.
The time stamp is in UTC time zone and follow the following date and time formats:
• YYYY-MM-DDTHH:mm:ssfffffffK
responseCodeNumericMaxLength:4Indicates success and failure of the response codes. It is in the numeric format.
responseDescriptionStringMaxLength:255Describes the Response Code in more detail. It is in the String format.

Response Cases

CodeCodeTextResponseDescriptionDescription
0SuccessSuccess.
100InvalidParameter• RequestId is required
• RequestDateTime is required
• UserId is required
• StoreId is required
• MerchantId is required
• The RetailChainUserId field is required.
• RequestId is too long
• UserId is too long
• StoreId is too long
• MerchantId is too long
• The field RetailChainUserId must be a string with a minimum length of 1 and a maximum length of 50.
• Invalid length of AccountNumber
Invalid parameter in the request. Examples: MerchantID not supplied, StoreID not supplied.
130InvalidMerchantInvalidMerchantMerchantId in request has not been found/enabled in the system.
800InvalidStoreStore was not foundStore is not found; store is not for the partner or store does not support this operation.
861RetailChainUserNotFoundRetailChainUserNotFoundUserID in request is not found in system.
862RetailChainUserNotActiveUser is not activeUserId in request is not active.
815AccountNotFoundAccountNotFoundThe account of the card that is going to be associated with can not be found in the system.
110InvalidAccountNumber• Account Not Found.
• AccountStatus is Closed
• AccountStatus is Pending
• AccountStatus is Locked
• Account Status is Restricted
• Invalid Account Status
Account is not found; account status is not valid.
863UserNameNotMatchUserNameNotMatchThe name of the card that is going to be associated with does not match the name of the teller.
868SameCardIsNotAllowedCard has already been associated with the tellerSame Card has already been associated with the teller.
870ChangeFeePlanFailedThis account cannot be updated to an employee account till 24 hours from the account creation. Please try after 24 hours of account creation.Failed to upgrade teller card to employee card.
860ErrorUpdateTellerFailed to save teller card info into database
1000GeneralFailureGeneralFailureService failure.