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
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. If not supplied, InvalidParameter (Code:100) error will be return. |
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. If not supplied, InvalidParameter (Code:100) error will be return. |
firstName | Yes | String | MaxLength: 30 | First name of the user If not supplied, InvalidParameter (Code:100) error will be return. |
lastName | Yes | String | MaxLength: 30 | Last name of the user. If not supplied, InvalidParameter (Code:100) error will be return. |
phoneNumber | No | String | MaxLength: 25 | The phone number of the user. If not digits, InvalidParameter (Code:100) error will be return. |
No | String | Email format: xxx@xxx MaxLength: 40 | The email of the user. If not a email, InvalidParameter (Code:100) error will be return. | |
isActive | Yes | Bool | ture/false | Default 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 |
retailChainUserId | Yes | String | MaxLength: 50 MinLength: 5 | UserId, if exists Used for modifying data for existing user If not provided, new user will be created. |
lastFourSsn | No | String | "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
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. |
retailChainUserId | String | MaxLength: 50 | The UserId that is being created/updated. |
Response Cases
Code | CodeText | ResponseDescription | Description |
---|---|---|---|
100 | InvalidParameter | • 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. |
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. |
860 | ErrorUpdateTeller | Error occurred during DB update. | |
861 | RetailChainUserNotFound | User is not found. | UserID in request is not found in system. |
862 | RetailChainUserNotActive | User is not active. | UserId in request is not active. |
871 | RetailChainUserCreated | User has been created. | New user created. |
872 | RetailChainUserUpdated | User has been updated. | Existing user updated. |
1000 | GeneralFailure | GeneralFailure | Service failure. |
Updated 7 months ago