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

ParameterTypeRequiredDescription
gd_barcode_idStringYesThe barcode number, output from the Barcode Generation API.
gd_retailer_keyintYesThis is the Retailer selected when generating the barcode.
partner_transaction_referenceStringOptionalThe unique, partner-generated transaction reference (if provided).
sender_customer_refStringYesThe Customer ID provided by the sender.
start_dateDateTimeYesThe barcode start date, YYYY-MM-DD.
end_dateDateTimeYesThe 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

ParameterTypeDescription
gd_search_countintThe total number of barcodes found in the search.
BarcodeslistThis is the Barcode information list.
gd_barcode_idStringThe barcode number or link code based on the type of barcode generated.
gd_barcode_id_expirationDateTimeExpiration date/time of the barcode or barcode link based on the type selected.
gd_retailer_keyintRetailer selected for generating the barcode.
gd_barcode_typeintThe barcode type.
gd_retailer_nameStringThis is the retailer’s name as maintained in Green Dot’s system.
gd_barcode_change_dateDateTimeThis is the last barcode change date.
sender_customer_refStringThis is an echo of the sender_customer_ref field, which is received as input.
gd_barcode_statusint1 = New
2 = Pending
3 = Consumed
4 = Voided
5 = Expired
6 = Cancelled
7 = Declined
amountDecimalWhen applicable, this is the amount for which the barcode was generated.
partner_transaction_referenceStringTransactionReference of the partner if the partner passes this information.
gd_transaction_referenceStringThe Unique reference that Green Dot generated for this transaction.
gd_response_codeIntRefer to Response Codes.
gd_response_messageStringCustom text describing the success or failure of the API.
gd_response_dateDateTimeThe Response date time in UTC.