products

POST /companies/{companySlug}/products/salesReport

Changed on

Creates a report based on provided specifications.

Request

  • Base URL
    https://api.fiken.no/api/v2
  • URL
    https://api.fiken.no/api/v2/companies/{companySlug}/products/salesReport
  • Auth
    OAuth 2
    Authorization code: https://fiken.no/oauth/authorize
    Token URL: https://fiken.no/oauth/token

Request body

fromstring date required

Start date range for the report, inclusive, format yyyy-mm-dd

tostring date required

End date range for the report, inclusive, format yyyy-mm-dd

Example request

{
  "from": "2018-04-03",
  "to": "2018-04-03"
}

Response

OK

Example response

[
  {
    "product": {
      "productId": 2888156,
      "createdDate": "2018-04-03",
      "lastModifiedDate": "2018-04-03",
      "name": "Spade",
      "unitPrice": 300000,
      "costPrice": 150000,
      "incomeAccount": "3000",
      "vatType": "HIGH",
      "active": true,
      "productNumber": "125-1",
      "stock": 5
    },
    "sold": {
      "count": 250,
      "sales": 45,
      "netAmount": 5000,
      "vatAmount": 500,
      "grossAmount": 5500
    },
    "credited": {
      "count": 250,
      "sales": 45,
      "netAmount": 5000,
      "vatAmount": 500,
      "grossAmount": 5500
    },
    "sum": {
      "count": 250,
      "sales": 45,
      "netAmount": 5000,
      "vatAmount": 500,
      "grossAmount": 5500
    }
  }
]

Changes