Context. The study of the integrated properties of star-forming galaxies is central to understand their formation and evolution. Some of these properties are extensive and therefore their analysis require totally covering and spatially resolved observations. Among these properties, metallicity can be defined in spiral discs by means of integral field spectroscopy (IFS) of individual H ii regions. The simultaneous analysis of the abundances of primary elements, as oxygen, and secondary, as nitrogen, also provides clues about the star formation history and the processes that shape the build-up of spiral discs. Aims. Our main aim is to analyse simultaneously O/H and N/O abundance ratios in H ii regions in different radial positions of the discs in a large sample of spiral galaxies to obtain the slopes and the characteristic abundance ratios that can be related to their integrated properties. Methods. We analysed the optical spectra of individual selected H ii regions extracted from a sample of 350 spiral galaxies of the CALIFA survey. We calculated total O/H abundances and, for the first time, N/O ratios using the semi-empirical routine Hii-Chi-mistry, which, according to Pérez-Montero (2014, MNRAS, 441, 2663), is consistent with the direct method and reduces the uncertainty in the O/H derivation using [N ii] lines owing to the dispersion in the O/H-N/O relation. Then we performed linear fittings to the abundances as a function of the de-projected galactocentric distances. Results. The analysis of the radial distribution both for O/H and N/O in the non-interacting galaxies reveals that both average slopes are negative, but a non-negligible fraction of objects have a flat or even a positive gradient (at least 10% for O/H and 4% for N/O). The slopes normalised to the effective radius appear to have a slight dependence on the total stellar mass and the morphological type, as late low-mass objects tend to have flatter slopes. No clear relation is found, however, to explain the presence of inverted gradients in this sample, and there is no dependence between the average slopes and the presence of a bar. The relation between the resulting O/H and N/O linear fittings at the effective radius is much tighter (correlation coefficient ρs = 0.80) than between O/H and N/O slopes (ρs = 0.39) or for O/H and N/O in the individual H ii regions (ρs = 0.37). These O/H and N/O values at the effective radius also correlate very tightly (less than 0.03 dex of dispersion) with total luminosity and stellar mass. The relation with other integrated properties, such as star formation rate, colour, or morphology, can be understood only in light of the found relation with mass.