Skip to main content

Cash Deposits

Unit provides an API for searching nearby Cash Deposit store locations by coordinates or postal code. Cash deposits can be made by either swiping a customer card, or by scanning a barcode.

The API supports searching by coordinates and postal code.

List By Coordinates

List Cash Deposit store locations by coordinates.

VerbGET
URLhttps://api.s.unit.sh/store-locations
Timeout (Seconds)120

Query Parameters

NameTypeDefaultDescription
filter[coordinates]JSON objectFilters the results by the specified coordinates.
filter[serviceType]stringSwipeOptional. Filters the results by the specified service type. Possible values are: Swipe, Barcode.
page[limit]integer100Optional. Maximum number of resources that will be returned. Maximum is 1000 resources. See Pagination.
page[offset]integer0Optional. Number of resources to skip. See Pagination.
curl -X GET 'https://api.s.unit.sh.co/store-locations?filter[coordinates]={"longitude": "-71.935242", "latitude": "40.730610"}' \
-H "Authorization: Bearer ${TOKEN}"

Response

Response is a JSON:API document.

200 OK

data
Array of Cash Deposit Store Location resources.
meta
JSON object that contains pagination data
Pagination data includes offset, limit and total (estimated total items).
Example Response:
{
"data": [
{
"type": "storeLocation",
"attributes": {
"storeId": "2385",
"retailerName": "CVS",
"phone": "5163248587",
"address": {
"street": "38 Pantigo Rd",
"city": "East Hampton",
"state": "NY",
"postalCode": "11937",
"country": "US"
},
"coordinates": {
"longitude": -72.182441,
"latitude": 40.965453
},
"distance": 20.74174506966581
}
},
{
"type": "storeLocation",
"attributes": {
"storeId": "4385",
"retailerName": "7-Eleven",
"phone": "6316682842",
"address": {
"street": "653 Montauk Hwy",
"city": "Montauk",
"state": "NY",
"postalCode": "11954",
"country": "US"
},
"coordinates": {
"longitude": -71.9495,
"latitude": 41.032124
},
"distance": 20.8461474146222
}
}
],
"meta": {
"pagination": {
"total": 178,
"limit": 2,
"offset": 0
}
}
}

List By Postal Code

List Cash Deposit store locations by postal code.

VerbGET
URLhttps://api.s.unit.sh/store-locations
Timeout (Seconds)120

Query Parameters

NameTypeDefaultDescription
filter[postalCode]stringFilters the results by the specified postal code.
filter[serviceType]stringSwipeOptional. Filters the results by the specified service type. Possible values are: Swipe, Barcode.
page[limit]integer100Optional. Maximum number of resources that will be returned. Maximum is 1000 resources. See Pagination.
page[offset]integer0Optional. Number of resources to skip. See Pagination.
curl -X GET 'https://api.s.unit.sh/store-locations?filter[postalCode]=12300' \
-H "Authorization: Bearer ${TOKEN}"

Response

Response is a JSON:API document.

200 OK

data
Array of Cash Deposit Store Location resources.
meta
JSON object that contains pagination data
Pagination data includes offset, limit and total (estimated total items).
Example Response:
{
"data": [
{
"type": "storeLocation",
"attributes": {
"storeId": "2385",
"retailerName": "CVS",
"phone": "5163248587",
"address": {
"street": "38 Pantigo Rd",
"city": "East Hampton",
"state": "NY",
"postalCode": "11937",
"country": "US"
},
"coordinates": {
"longitude": -72.182441,
"latitude": 40.965453
},
"distance": 20.74174506966581
}
},
{
"type": "storeLocation",
"attributes": {
"storeId": "4385",
"retailerName": "7-Eleven",
"phone": "6316682842",
"address": {
"street": "653 Montauk Hwy",
"city": "Montauk",
"state": "NY",
"postalCode": "11954",
"country": "US"
},
"coordinates": {
"longitude": -71.9495,
"latitude": 41.032124
},
"distance": 20.8461474146222
}
}
],
"meta": {
"pagination": {
"total": 178,
"limit": 2,
"offset": 0
}
}
}

Generate Barcode

Generate a barcode for a Cash Deposit store location.

Note

Cash Deposit barcodes are valid for a single use, at a specific location, and up to one hour from the time they are generated.

VerbPOST
URLhttps://api.s.unit.sh/cash-deposits/barcodes
Required Scopecash-deposits-write
Timeout (Seconds)5

Attributes

storeId
string
The unique storeId identifier of a store, obtained from either List by coordinates or List by post code endpoints.

Relationships

account
JSON:API Relationship
The Deposit Account receiving the payment.
customer
JSON:API Relationship
The Customer receiving the payment.
Example Request:
curl -X POST 'https://api.s.unit.sh/cash-deposits/barcodes'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "cashDepositBarcode",
"attributes": {
"storeId": "2438"
},
"relationships": {
"customer": {
"data": {
"type": "customer",
"id": "10001"
}
},
"account": {
"data": {
"type": "account",
"id": "10002"
}
}
}
}
}'

Response

Response is a JSON:API document.

200 OK

data
Cash Deposit Barcode resource.
Example Response:
{
"data": {
"type": "cashDepositBarcode",
"attributes": {
"barcodeNumber": "123456789123456789000000000000",
"expiration": "2023-12-26T13:37:23.927Z",
"storeId": "2481",
"retailerName": "7-Eleven"
},
"relationships": {
"customer": {
"data": {
"type": "customer",
"id": "10001"
}
},
"account": {
"data": {
"type": "account",
"id": "10002"
}
}
}
}
}

Get Barcode Image by Barcode Number

Get a cash deposit barcode image by barcode number.

VerbGET
URLhttps://api.s.unit.sh/cash-deposits/barcodes/{barcodeNumber}/image
Required Scopecash-deposits
Timeout (Seconds)5

Query Parameters

NameTypeDefaultDescription
barcodeNumberstringThe unique barcodeNumber identifier of a barcode, obtained from Generate Barcode endpoint.

Response

Response is a IMAGE:PNG file.

200 OK
curl -X GET 'https://api.s.unit.sh/cash-deposits/barcodes/123456789123456789000000000000/image' \
-H "Authorization: Bearer ${TOKEN}"