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

Parameter

Required (Y/N)

Format/ Data Type

Pattern

Description

X-GD-RequestId

Yes

String

MaxLength:50

It is a unique transaction identifier that is generated by the retailer.

requestDateTime

Yes

DateTime

2023-08-08T12:34:56Z

Time 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

registerID

No

String

MaxLength: 20

Register where the transaction occurred.

userId

Yes

String

MaxLength:50

The unique ID of the user generating the transaction and also the tellerID used to associate the card.

storeId

Yes

String

MaxLength: 20

The store number associated with the retailer that sold the package.
If not supplied, InvalidParameter (Code:100) error will be return.

merchantId

Yes

String

MaxLength: 20

Unique merchant Id. It is defined by Green Dot – Merchant corresponding with Retailer.

accountNumber

No

String

16 digits PAN

Account Number (PAN) of the card.
For Insight partners, it can pass in registration id instead of PAN.

accountIdentifier

No

GUID

e5843e05-d367-4bf1-a223-3af46ae18802

Newly 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

Parameter

Format/Data Type

Pattern

Description

requestId

String

MaxLength:50

The unique request ID generated from the request.

responseId

String

MaxLength:50

The unique Response Identifier (generated by GreenDot).

responseDateTime

DateTime

2023-09-07T16:12:23.4541445+08:00

Time 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

responseCode

Numeric

MaxLength:4

Indicates success and failure of the response codes. It is in the numeric format.

responseDescription

String

MaxLength:255

Describes the Response Code in more detail. It is in the String format.

Response Cases

Code

CodeText

ResponseDescription

Description

0

Success

Success.

100

InvalidParameter

• 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.

130

InvalidMerchant

InvalidMerchant

MerchantId in request has not been found/enabled in the system.

800

InvalidStore

Store was not found

Store is not found; store is not for the partner or store does not support this operation.

861

RetailChainUserNotFound

RetailChainUserNotFound

UserID in request is not found in system.

862

RetailChainUserNotActive

User is not active

UserId in request is not active.

815

AccountNotFound

AccountNotFound

The account of the card that is going to be associated with can not be found in the system.

110

InvalidAccountNumber

• 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.

863

UserNameNotMatch

UserNameNotMatch

The name of the card that is going to be associated with does not match the name of the teller.

868

SameCardIsNotAllowed

Card has already been associated with the teller

Same Card has already been associated with the teller.

870

ChangeFeePlanFailed

This 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.

860

ErrorUpdateTeller

Failed to save teller card info into database

1000

GeneralFailure

GeneralFailure

Service failure.