Start here

The Data API is the primary way that apps and services interact with Wino. It provides extensive access to data about individual Wino shops.


Use cases#

  • Connect an ecommerce site to Wino
  • Export bulk data
  • Write data, including about products, suppliers, taxes, prices, and more.

Requirements#

  • The Data API is available through GraphQL.
  • This is a versioned API. Updates are released periodically.
  • Apps must authenticate to interact with the Data API.
  • All apps and services connecting to the Data API are subject to Wino’s API Terms of Service.

Structure#

The Wino's GraphQL API was developed in order to manage establishments related to the beverage market. So, we created a system that relationate the various entities involved with this service, for example, Customer, Supplier, Product, etc.

In this sense, we organized our API according to the following minimal schema:

alt text

As you can see, the system design has different schemas and different relationships with each other, where the main schema: Shop is highlighted because it represents the establishment to be managed.

Throughout this documentation, each schema will be presented separately, providing a complete understanding of how to use this API.

Send your first query#

This guide describes the basic steps for getting started with Wino's GraphQL API.

To retrieve a product, you need to define the data you want to retrieve:

REQUEST /graphql

query {
variant(id: "96835dcb-6dbc-4a44-ac94-3cfae1293eec") {
id
name
product {
name
}
}
}

Once the API has been sent, the Wino server returns the following result:

RESPONSE /graphql

{
"data": {
"variant": {
"id": "96835dcb-6dbc-4a44-ac94-3cfae1293eec",
"name": "2017, 0.75cL",
"product": {
"name": "Crozes Hermitage"
}
}
}
}

That's all folks ! In the next part of the documentation, we will come back to some parts of the docs in more detail: webhooks, mutations ...