Standard Metadata
Standard Metadata Overview
Metadata about the retail location must be provided with each API call, except for the PingCheck API call.
If it’s a GET request. All the metadata should be passed in header. Other request like POST/PUT, the metadata will be set in request body. NOTE: RequestId should only be passed in the header with prefix “X-GD-” for all requests.
Metadata via API Headers (Get Verbs)
When passed as HTTP headers each parameter must be prefixed with “X-GD-“. Below is an example of a call including the HTTP headers. NOTE: For GET endpoints, metadata should be passed in the HTTP headers
GET {baseUrl}/XXXX/XXX
Accept: application/json
X-GD-RequestId: 123456789
X-GD-MerchantId: FSCC0342
X-GD-RegisterId: 01001
X-GD-StoreId: CC970
X-GD-UserId: [email protected]
X-GD-RequestDateTime: 2023-09-18T10:53:07Z
Metadata via Request body payload (POST, PUT Verbs)
The meta data can also be passed in the request body, metadata element. Below is an example of a call using metadata in the request body. NOTE: For POST endpoints, metadata should be passed in the body.
POST {baseUrl}/XXXX/XXX
Content-Type: application/json
X-GD-RequestId: 123456789
{
"metadata": {
"merchantId": "FSCC0342",
"registerId": "01001",
"storeId": "CC970",
"userId": "[email protected]"
"requestDateTime": "2013-09-18T10:53:07Z"
},
... {remainder of payload}
}
Request Parameters
Parameter | Required (Y/N) | Format/Data Type | Pattern | Description |
---|---|---|---|---|
X-GD-RequestId | Yes | String | MaxLength:50 | The unique request ID generated from 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 | The unique register ID,where the transaction has occurred. |
userId | Yes | String | MaxLength:50 | It is a unique ID of the user performing the transaction. |
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. |
Updated 17 days ago