Create Retail Chain User

CreateRetailChainUser API Method

This operation is used to create a RetailChainUser (teller) if there is no user in the system. If the user id already exists, then user information will be updated.

📘

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

Syntax

POST {baseUrl}/retailer/user/create  

Example Request

Success Request

POST {baseUrl}/retailer/user/create 
Authorization: bearer {token}
Content-Type: application/json
X-GD-RequestId: test101
{
    "metadata": {
        "merchantId": "fscc0342",
        "registerId": "01",
        "requestDateTime": "2023-11-09T12:34:15Z",
        "storeId": "CC970",
        "userId": "[email protected]"
    },
  "firstName": "Jack",
  "lastName": "Bauer",
  "lastFourSsn": "1234",
  "isActive": true,
  "phoneNumber": "6648763215",
  "email": "[email protected]",
  "retailChainUserId": "[email protected]" 
}

Negative Request

POST {baseUrl}/retailer/user/create 
Authorization: bearer {token}
Content-Type: application/json
X-GD-RequestId: test101
{
    "metadata": {
        "merchantId": "fscc0342",
        "registerId": "01",
        "requestDateTime": "2023-11-09T05:50:33Z",
        "storeId": "CC970",
        "userId": "[email protected]"
    },
  "firstName": "Jack",
  "lastName": "Bauer",
  "lastFourSsn": "1234",
  "isActive": true,
  "phoneNumber": "abc",
  "email": "[email protected]",
  "retailChainUserId": "[email protected]" 
}

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.
If not supplied, InvalidParameter (Code:100) error will be return.
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.
If not supplied, InvalidParameter (Code:100) error will be return.
firstNameYesStringMaxLength: 30First name of the user
If not supplied, InvalidParameter (Code:100) error will be return.
lastNameYesStringMaxLength: 30Last name of the user.
If not supplied, InvalidParameter (Code:100) error will be return.
phoneNumberNoStringMaxLength: 25The phone number of the user.
If not digits, InvalidParameter (Code:100) error will be return.
emailNoStringEmail format: xxx@xxx
MaxLength: 40
The email of the user.
If not a email, InvalidParameter (Code:100) error will be return.
isActiveYesBoolture/falseDefault value: false. If passed in, will set the teller to either enabled or disabled status, indicating whether or not teller may perform transactions and receive incentives
retailChainUserIdYesStringMaxLength: 50
MinLength: 5
UserId, if exists
Used for modifying data for existing user
If not provided, new user will be created.
lastFourSsnNoString"1245"Last 4 digits of SSN. Optional.

Example Response

Success Response

HTTP/1.1 200 OK
Content-Type: application/json
X-GD-RequestId: test101
X-GD-ResponseId: 19d3ab3e-2ae3-4d5a-ae4e-6939f52d437b
X-GD-ResponseCode: 872

{
    "retailChainUserId": "[email protected]",
    "metadata": {
        "requestId": "test101",
        "responseId": "19d3ab3e-2ae3-4d5a-ae4e-6939f52d437b",
        "responseDateTime": "2023-11-09T12:34:17.2831789Z",
        "responseCode": 872,
        "responseDescription": "User has been updated."
}
}

Negative Response:

HTTP/1.1 200 OK
Content-Type: application/json
X-GD-RequestId: test101
X-GD-ResponseId: 06ab90fb-4e42-4975-b71c-eb4fd139fe44
X-GD-ResponseCode: 100

{
    "retailChainUserId": null,
    "metadata": {
        "requestId": "test101",
        "responseId": "06ab90fb-4e42-4975-b71c-eb4fd139fe44",
        "responseDateTime": "2023-11-09T12:45:10.245382Z",
        "responseCode": 100,
        "responseDescription": "The PhoneNumber field is not a valid phone number."
    }
}

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.
retailChainUserIdStringMaxLength: 50The UserId that is being created/updated.

Response Cases

CodeCodeTextResponseDescriptionDescription
100InvalidParameter• RequestId is required
• RequestDateTime is required
• UserId is required
• StoreId is required
• MerchantId is required
• The FirstName field is required.
• The LastName field 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 FirstName must be a string with a minimum length of 1 and a maximum length of 30.
• The field LastName must be a string with a minimum length of 1 and a maximum length of 30.
• The field PhoneNumber must be a string with a minimum length of 1 and a maximum length of 25.
• The field Email must be a string with a minimum length of 1 and a maximum length of 40.
• The Email field is not a valid e-mail address.
• The field RetailChainUserId must be a string with a minimum length of 5 and a maximum length of 50.
• The field RetailChainUserId must be a string with a minimum length of 5 and a maximum length of 50.
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.
860ErrorUpdateTellerError occurred during DB update.
861RetailChainUserNotFoundUser is not found.UserID in request is not found in system.
862RetailChainUserNotActiveUser is not active.UserId in request is not active.
871RetailChainUserCreatedUser has been created.New user created.
872RetailChainUserUpdatedUser has been updated.Existing user updated.
1000GeneralFailureGeneralFailureService failure.