Skip to main content

Purchase / Sale Analysis

How to Process a Buy or Sell Analysis via REST API?

Written by Lenka Haringerová

The following two URLs are used for purchase and sales analysis queries via the REST API:

  1. Purchase analysis – /c/{firma}/analyza-nakupu

  2. Sales analysis – /c/{firma}/analyza-prodeje

The {firma} parameter represents the database identifier of the company.

Parameters

The parameters are identical for both analyses, with minor differences:

Parameter

*

Description

Options

Default value

analyzovat

×

Defines the target of the analysis being performed:

  • cenik – goods movement

  • skupZboz – goods movement summarized by product groups

  • sklad – warehouse turnovers

  • stredisko – cost center turnovers

  • zakazka – turnovers by order

  • adresar – turnovers by company

  • skupFir – turnovers summarized by company groups

  • mistUrc – turnovers by destination (sales analysis only)

clenit

Defines an additional breakdown of the analyzed data:

  • cenik – by goods

  • skupZboz – by product groups

  • sklad – by warehouse

  • stredisko – breakdown by cost center

  • zakazka – breakdown by order

  • adresar – by company

  • skupFir – by company groups

  • mistUrc – by destination (sales analysis only)

No additional breakdown.

datumOd

Lower date boundary (posting date) for the analyzed documents.

No restriction on the oldest document date.

datumDo

Upper date boundary (posting date) for the analyzed documents.

No restriction on the most recent document date.

datumyUcetne

Specifies whether the provided document dates are treated as posting dates. When set to false, the dates are treated as issue dates.

true/false

true (search documents by posting date)

neucetniDoklady

Controls whether non-accounting documents are included in the analysis.

true/false

true (include non-accounting documents)

mesicniSumace

Sets whether monthly turnover summations should be performed.

true/false

true (perform monthly summations)

stredisko

Restricts the analysis to a selected cost center. For multiple cost centers, the query parameter can be specified more than once.

Cost center identifier (integer ID or code).

Analyze all cost centers without restriction.

Applies only to analyzovat=adresar or analyzovat=skupFir

nekatalogovePolozky

Specifies whether non-catalogue items should be included in the analysis. This is relevant only when analyzing by company or by company groups.

true/false

false (include catalogue items only)

Applies only to analyzovat=cenik

cenik

Restricts the goods analysis to a selected item.

Identifier of the required price list item.

Analyze all price list items without restriction.

Applies only to analyzovat=adresar

firma

Restricts the company-based analysis to a selected company.

Identifier of the required company.

Analyze all companies without restriction.

* = required parameter

Examples

  • GET /c/demo/analyza-prodeje?analyzovat=cenik

  • GET /c/demo/analyza-nakupu?analyzovat=adresar&datumOd=2012-01-01&datumDo=2012-12-31&datumyUcetne=false

  • GET /c/demo/analyza-prodeje?analyzovat=skupFir&nekatalogovePolozky=false&stredisko=code:A&stredisko=code:B

  • GET /c/demo/analyza-nakupu?analyzovat=adresar&clenit=skupZboz&datumOd=2012-01-01&mesicniSumace=true

Did this answer your question?