Get product sales data

Get product sales data by shop date

{
  productSales(date: "2020-03-16") {
    totalCount
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
    edges {
      node {
        code
        saleitemId
        name
        unitPrice
        quantity
        totalAmount
      }
      cursor
    }
  }
}

get product sales data in month

{
  productSales(startDate: "2020-03-01", endDate: "2020-03-31") {
    totalCount
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
    edges {
      node {
        code
        saleitemId
        name
        unitPrice
        quantity
        totalAmount

      }
      cursor
    }
  }
}

example response

{
  "data": {
    "productSales": {
      "totalCount": 73,
      "pageInfo": {
        "hasNextPage": false,
        "hasPreviousPage": false,
        "startCursor": "YXJyYXljb25uZWN0aW9uOjA=",
        "endCursor": "YXJyYXljb25uZWN0aW9uOjcy"
      },
      "edges": [
        {
          "node": {
            "code": "BGO038",
            "saleitemId": 62,
            "name": "Fedderbrau",
            "unitPrice": 150,
            "quantity": 1,
            "totalAmount": 150
          },
          "cursor": "YXJyYXljb25uZWN0aW9uOjA="
        },
        {
          "node": {
            "code": "BGR161",
            "saleitemId": 184,
            "name": "JW Red Label 35cl",
            "unitPrice": 600,
            "quantity": 1,
            "totalAmount": 600
          },
          "cursor": "YXJyYXljb25uZWN0aW9uOjE="
        },
        ...
Last updated on