Barcode Lookup
Barcode Lookup API Method
Searching and Retrieving Barcodes
Depending on the endpoint used, the Barcode Lookup API searches and retrieves barcode information for given input criteria. This includes:
- Barcode Number
- Retailer Key
- Specific Customer ID
- Range of start and end dates
Structure of API Calls:
GET /~/v1/barcode/{gd_barcode_id}/Retailer/{gd_retailer_key}/partner_ref/{partner_transaction_reference}
GET /~/v1/barcode/{gd_barcode_id}/Retailer/{gd_retailer_key}
GET /~/v1/barcode/sender_customer_ref/{sender_customer_ref}/start_date/{start_date}/end_date/{end_date}/partner_ref/{partner_transaction_reference?}
GET /~/v1/Barcode/sender_customer_ref/{sender_customer_ref}/start_date/{start_date}/end_date/{end_date}
Sample Request Parameters
URL: ~/v1/barcode/830324007490008112325460183192/Retailer/2433
URL: ~/v1/barcode/830324007490008112325460183192/Retailer/2433/partner_ref/1234
URL: ~/v1/barcode/sender_customer_ref/123456789/start_date/2020-01- 01/end_date/2020-05-28
Headers
{
x-gdn-timestamp:2020-05-25T02:30:35Z
x-gdn-encryptiontype:1
x-gdn-messageid:2020052500823
x-gdn-channeltype:1
x-gdn-devicetype:2
x-gdn-ipaddress:192.168.1.1
x-gdn-programnumber:Catalina-BC
x-gdn-signature:21AE309FF0A8162439B1458B857599D8ECE5EA155AFDB327BCED728B0B2DB8D5
}
Request Parameters Field Descriptions
Parameter | Type | Required | Description |
---|---|---|---|
gd_barcode_id | String | Yes | The barcode number, output from the Barcode Generation API. |
gd_retailer_key | int | Yes | This is the Retailer selected when generating the barcode. |
partner_transaction_reference | String | Optional | The unique, partner-generated transaction reference (if provided). |
sender_customer_ref | String | Yes | The Customer ID provided by the sender. |
start_date | DateTime | Yes | The barcode start date, YYYY-MM-DD. |
end_date | DateTime | Yes | The barcode end date, YYYY-MM-DD. Must not exceed current date. |
Sample Response Model
{
"Barcodes": [
{
"gd_barcode_id": "string",
"gd_barcode_id_expiration": "2022-05-06T13:07:44.722Z",
"gd_retailer_key": 0,
"gd_retailer_name": "string",
"gd_barcode_change_date": "2022-05-06T13:07:44.723Z",
"sender_customer_ref": "string",
"gd_barcode_status": 0,
"amount": 0
}
],
"gd_search_count": 0,
"partner_transaction_reference": "string",
"gd_transaction_reference": "string",
"gd_response_code": 0,
"gd_response_message": "string",
"gd_response_date": "2022-05-06T13:07:44.723Z"
}
Response Sample 1
<barcode_inquiry_response xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://greendotcorp.com/WebServices/Corporate/GDFNReloadServices/">
<gd_response_code>0</gd_response_code>
<gd_response_date>2020-05-29T06:48:03.9009349Z</gd_response_date>
<gd_response_message>Success</gd_response_message>
<gd_transaction_reference>1ac3503d-ec0a-4582-8d80-875bcc1cdf93</gd_transaction_reference>
<partner_transaction_reference></partner_transaction_reference>
<amount i:nil="true" />
<gd_barcode_change_date>2020-03-05T13:34:22.593Z</gd_barcode_change_date>
<gd_barcode_id>830324007490008112325460183192</gd_barcode_id>
<gd_barcode_id_expiration>2020-06-03T09:17:14.18Z</gd_barcode_id_expiration>
<gd_barcode_status>7</gd_barcode_status>
<gd_retailer_key>2433</gd_retailer_key>
<gd_retailer_name>CVS</gd_retailer_name>
<sender_customer_ref>123456789</sender_customer_ref>
</barcode_inquiry_response>
Response Sample 2
<barcode_inquiry_response xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://greendotcorp.com/WebServices/Corporate/GDFNReloadServices/">
<gd_response_code>0</gd_response_code>
<gd_response_date>2020-05-29T06:46:31.6900736Z</gd_response_date>
<gd_response_message>Success</gd_response_message>
<gd_transaction_reference>f9fb346d-da6b-43ef-bebe-3763525d3958</gd_transaction_reference>
<partner_transaction_reference>1234</partner_transaction_reference>
<amount i:nil="true" />
<gd_barcode_change_date>2020-03-05T13:34:22.593Z</gd_barcode_change_date>
<gd_barcode_id>830324007490008112325460183192</gd_barcode_id>
<gd_barcode_id_expiration>2020-06-03T09:17:14.18Z</gd_barcode_id_expiration>
<gd_barcode_status>7</gd_barcode_status>
<gd_retailer_key>2433</gd_retailer_key>
<gd_retailer_name>CVS</gd_retailer_name>
<sender_customer_ref>123456789</sender_customer_ref>
</barcode_inquiry_response>
Response Sample 3
<barcode_inquiry_response xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://greendotcorp.com/WebServices/Corporate/GDFNReloadServices/">
<gd_response_code>0</gd_response_code>
<gd_response_date>2020-05-29T06:46:31.6900736Z</gd_response_date>
<gd_response_message>Success</gd_response_message>
<gd_transaction_reference>f9fb346d-da6b-43ef-bebe-3763525d3958</gd_transaction_reference>
<partner_transaction_reference>1234</partner_transaction_reference>
<amount i:nil="true" />
<gd_barcode_change_date>2020-03-05T13:34:22.593Z</gd_barcode_change_date>
<gd_barcode_id>830324007490008112325460183192</gd_barcode_id>
<gd_barcode_id_expiration>2020-06-03T09:17:14.18Z</gd_barcode_id_expiration>
<gd_barcode_status>7</gd_barcode_status>
<gd_retailer_key>2433</gd_retailer_key>
<gd_retailer_name>CVS</gd_retailer_name>
<sender_customer_ref>123456789</sender_customer_ref>
</barcode_inquiry_response>
Response Sample 4
<barcode_list_inquiry_response xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://greendotcorp.com/WebServices/Corporate/GDFNReloadServices/">
<gd_response_code>0</gd_response_code>
<gd_response_date>2020-05-29T06:38:52.3690967Z</gd_response_date>
<gd_response_message>Success</gd_response_message>
<gd_transaction_reference>c59d2656-28c8-4c0c-9b0b-752ebcc6f245</gd_transaction_reference>
<partner_transaction_reference>401db81d-59bf-4528-9b82-95626731d02d</partner_transaction_reference>
<Barcodes>
<barcode>
<amount i:nil="true" />
<gd_barcode_change_date>2020-03-05T13:34:22.593Z</gd_barcode_change_date>
<gd_barcode_id>830324007490008112325460183192</gd_barcode_id>
<gd_barcode_id_expiration>2020-06-03T09:17:14.18Z</gd_barcode_id_expiration>
<gd_barcode_status>7</gd_barcode_status>
<gd_retailer_key>2433</gd_retailer_key>
<gd_retailer_name>CVS</gd_retailer_name>
<sender_customer_ref>1147762</sender_customer_ref>
</barcode>
<barcode>
<amount>22.2200</amount>
<gd_barcode_change_date>2020-05-28T15:36:09.387Z</gd_barcode_change_date>
<gd_barcode_id>830324007490008112326038087609</gd_barcode_id>
<gd_barcode_id_expiration>2020-08-26T15:36:08.933Z</gd_barcode_id_expiration>
<gd_barcode_status>1</gd_barcode_status>
<gd_retailer_key>2433</gd_retailer_key>
<gd_retailer_name>CVS</gd_retailer_name>
<sender_customer_ref>1147762</sender_customer_ref>
</barcode>
</Barcodes>
<gd_search_count>2</gd_search_count>
</barcode_list_inquiry_response>
Response Field Descriptions
Parameter | Type | Description |
---|---|---|
gd_search_count | int | The total number of barcodes found in the search. |
Barcodes | list | This is the Barcode information list. |
gd_barcode_id | String | The barcode number or link code based on the type of barcode generated. |
gd_barcode_id_expiration | DateTime | Expiration date/time of the barcode or barcode link based on the type selected. |
gd_retailer_key | int | Retailer selected for generating the barcode. |
gd_barcode_type | int | The barcode type. |
gd_retailer_name | String | This is the retailer’s name as maintained in Green Dot’s system. |
gd_barcode_change_date | DateTime | This is the last barcode change date. |
sender_customer_ref | String | This is an echo of the sender_customer_ref field, which is received as input. |
gd_barcode_status | int | 1 = New 2 = Pending 3 = Consumed 4 = Voided 5 = Expired 6 = Cancelled 7 = Declined |
amount | Decimal | When applicable, this is the amount for which the barcode was generated. |
partner_transaction_reference | String | TransactionReference of the partner if the partner passes this information. |
gd_transaction_reference | String | The Unique reference that Green Dot generated for this transaction. |
gd_response_code | Int | Refer to Response Codes. |
gd_response_message | String | Custom text describing the success or failure of the API. |
gd_response_date | DateTime | The Response date time in UTC. |
Updated 2 months ago