OfficeGest
Sales/Reports/Top selling articles

Top selling articles

Returns the top selling articles ranked by net sales total (VAT excluded, credit notes subtracted) across all non-canceled sales documents updated in the current account. Only normal articles are considered. Results are ordered by total descending, limited by the limit parameter (default 15).

GET
/sales/reports/top-selling-articles
AuthorizationBearer <token>

In: header

Query Parameters

limit?integer

Maximum number of articles returned, ranked by net sales total. Defaults to 15, max 100.

Response Body

curl -X GET "https://og-tenant1.test:8003/api/v2/sales/reports/top-selling-articles?limit=0"
{
  "data": [
    {
      "article_code": "string",
      "article_name": "string",
      "total": 0
    }
  ]
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}