Overview

The Doshii data API provides a simple and asynchronous mechanism to fetch large data sets for orders associated to your subscribed locations. 

  • The API is accessible via a REST endpoint.
  • Authentication requires an API key.
  • You can only retrieve data for locations that you have explicitly subscribed.
  • There will be no PII extracted as part of these requests, this includes any delivery information or membership loyalty information.
  • Request rates are enforced by the service.
  • Requests are processed asynchronously and in the order they are received. Submitting the same request multiple times will not speed up its processing.
  • The requester/consumer will be notified via a webhook when files are ready to be downloaded.

Data Structure

The data that is received contains order data with SKU level information. As highlighted above, there will be no PII information contained with the payloads, and any merchant information will be anonymised. The order payload is made up of the standard order properties described in the GET ~/orders/:id API endpoint.

NB: All PII (consumer, delivery, checkin, loyalty) information will be excluded from this output.

{
"orders": [
{
<standard order information minus PII - see API>,
"location": {
"id": "<bulk data location id>",
"state": "VIC",
"postalCode": "3182",
"city": "St Kilda",
"country": "AU",
"classification": "Restaurant"
}
}
]
}

 

Sample Data Structure

Below is a sample data structure, listing each of the properties that could potentially appear in the order payload.

{
"orders": [
{
"id": "1634",
"mealPhase": "ordered",
"status": "accepted",
"type": "pickup",
"posCreatedAt": "2019-01-01T12:00:00.000Z",
"items": [
{
"posId": "123",
"name": "Toasted Sourdough Bread & Eggs",
"quantity": 1,
"unitPrice": "1100",
"totalBeforeSurcounts": "1100",
"totalAfterSurcounts": "1100",
"type": "bundle",
"includedItems": [
{
"name": "Item name",
"posId": "123",
"quantity": 1,
"unitPrice": "1000",
"options": [
{
"posId": "123",
"name": "Option name",
"variants": [
{
"posId": "123",
"name": "Variant name",
"price": "1000"
}
]
}
]
}
],
"surcounts": [
{
"posId": "123",
"name": "Item name",
"amount": 1000,
"type": "absolute",
"value": "1000"
}
],
"taxes": [
{
"posId": "123",
"name": "Item name",
"amount": "10",
"type": "percentage",
"taxType": "inclusive",
"value": "1000"
}
],
"options": [
{
"posId": "123",
"name": "Option name",
"variants": [
{
"posId": "123",
"name": "Variant name",
"price": "1000"
}
]
}
]
}
],
"surcounts": [
{
"posId": "123",
"name": "Item name",
"amount": 1000,
"type": "absolute",
"value": "1000"
}
],
"taxes": [
{
"posId": "123",
"name": "Item name",
"amount": "1000",
"type": "absolute",
"taxType": "exclusive",
"value": "1000"
}
],
"transactions": [
{
"method": "mastercard",
"amount": "1000",
"tip": 0,
"status": "requested"
}
],
"location": {
"id": "a1b2c3d4",
"state": "VIC",
"postalCode": "3182",
"city": "St Kilda",
"country": "AU",
"classification": "Restaurant"
}
}
]
}

 

API endpoints

There are two endpoints available for consuming this service.

  • sandbox   https://data.sandbox.doshii.co/v3
  • live   https://data.live.doshii.co/v3

Please note that these are two different and separate environments and neither the data (app ID, locations, orders, etc.) nor the authorisation key will be the same.

 

Data Retrieval

Once a request has been processed, the extracted data is held on a shared S3 bucket, which allows you to pull down the data at your convenience. The data is only held for 7 days, at which time, the bulk data request will need to be re-issued.

To prepare for this S3 access, certain details will need to be shared between Doshii and your AWS infrastructure team. The details will be covering an IAM ARN of a role with certain permissions. The purpose of this role can be discussed in more detail once an agreement is in place. In addition, any IP addresses describing the machines that will be accessing this data should be provided so they can be whitelisted.

More specific details around this process can be obtained from the Integrations team.