ApiProduct

ApiProduct carries complete information of a product. Depending on the options you provided in your request, it is possible that only parts of product information is in the response.

VVS and SEG have some differences regarding available properties. These differences appear property IndustrySpecific. ApiProduct class itself is identical in VVS and SEG.

Notice that documents and images do not belong to a product. A product links to documents. Documents binary data is not included in ApiProduct, but download-links are provided.

Note: Every writable field has a "nnnIsSpecified" boolean value field. This field is to tell the API that a new value is supplied in updates and import. This is visible in the WSDL

ApiProduct

        [DataContract(Name = "ApiProduct")]
        public class ApiProduct
        {
            public IndustrySpecificAbstractBase IndustrySpecific { get; set; }
            public long Id { get; set; }
            public bool HasCEMark { get; set; }
            public string Color { get; set; } // varchar(30)
            public string CountryIdentifier { get; set; } // varchar(10)
            public DateTime ApprovedAt { get; set; }
            public string CustomsNumber { get; set; } // varchar(35)
            public ProductDangerous DangerousItem { get; set; }
            public string DangerousItemStr { get; set; } // varchar(35)
            public string Description { get; set; } VVS: // nvarchar(2000), SEG: // varchar(500)
            public string Design { get; set; } // varchar(30)
            public int Diameter { get; set; }
            public string Dimension { get; set; } // varchar(30)
            public DateTime? EndAt { get; set; }
            public double EtimEnrichment { get; set; }
            public bool? ExportBan { get; set; }
            public List<ApiProductExtNumber> ExtNumbers { get; set; }
            public bool? FrostSensible { get; set; }
            public string Function { get; set; } // varchar(30)
            public string GroupingWord { get; set; } // nvarchar(25)
            public int Height { get; set; }
            public ProductInfoLevelType InfoLevel { get; set; }
            public bool IsSafeWater { get; set; }
            public string SafeWaterVersion { get; set; } // nvarchar(10)
            public string SafeWaterIdentifier { get; set; } // nvarchar(5)
            public int Length { get; set; }
            public ApiManufacturerInProduct Manufacturer { get; set; }
            public string ManufacturerTypeCode { get; set; }VVS: // varchar(100), SEG: // varchar(25)
            public string Material { get; set; } // varchar(30)
            public DateTime ModifiedAt { get; set; }
            public string NameEn { get; set; } // varchar(30)
            public string NameLongEn { get; set; } // varchar(500)
            public string NameLongSv { get; set; } VVS: // varchar(30), SEG: // varchar(120)
            public string NameSv { get; set; } // varchar(30)
            public int? Number { get; set; } // nullable is used when applying for candidates
            public string NumberStr  { get; set; } // varchar(35)
            public string OtherInfo { get; set; } // varchar(30)
            public List<ApiProductPackage> Packages { get; set; }
            public int PcsInPack { get; set; }
            public bool? Perishable { get; set; }
            public int PerishableTime { get; set; }
            public string ProductModel { get; set; } // nvarchar(25)
            public string ProductTypeName { get; set; } // varchar(30)
            public DateTime? PublishedAfter { get; set; }
            public int? ReplacedByNumber { get; set; }
            public string ReplacedByNumberStr { get; }
            public ProductStorageRequirement StorageRequirement { get; set; }
            public string StorageRequirementStr { get; set; } // varchar(35)
            public string Surface { get; set; } // varchar(30)
            public string Trademark { get; set; } // varchar(30)
            public string Unit { get; set; } // varchar(5), validering på giltiga kombinationer
            public List<ApiProductUri> Uris { get; set; }
            public decimal Weight { get; set; }
            public int Width { get; set; }
            public List ApiEtimInfo EtimDatas { get; set; }
            public List<ApiActivityLog>> ActivityLogs { get; set; }
            public List<ApiArticleAccessory> ArticleAccessories { get; set; }
            public List<ApiArticleAccessory> ArticleAccessoryFor { get; set; }
            public ApiProductGroup productgroup { get; set; }
            public List<ApiArticleSerie> ArticleSeries { get; set; }
            public string BvbId { get; set; } // nvarchar(10)
            public int BvbVersion { get; set; }
            public ApiBvbResultType BvbResult { get; set; }
            public string SeriesName { get; set; } // nvarchar(25)
    

            public bool? IsWholesalerApproved{ get; set; }
            public string BulletText { get; set; } // nvarchar(1000)
            public string DescriptionEn { get; set; } // nvarchar(2000)
        }
        

ApiProductExtNumber

When updating an ApiProductExtNumber

TypeIdentifier is used as key field when updating ApiProductExtNumber

The following external numbers are in use.

Code constant Type identifier VVS type name SEG type name Comment
TypeManufacturer LEV Eget Artikel-nr Leverantörens artikelnummer
TypeEAN EAN GTIN GTIN GTIN-13 and GTIN-14 can be used
TypeDanDK DK Danska VVS-nr -
TypeFinLVI LVI Finska LVI-nr -
TypeNorNRF NRF Norska NRF-nr -
TypeENumber SEG E-nummer -
TypeRSKNumber RSK - RSK-nummer
TypeUNSPSC UNS UNSPSC-kod UNSPSC-kod
TypeReach REC Omfattas av REACH-direktivets informationsplikt Omfattas av REACH-direktivets informationsplikt Only Yes/No J/N true/false

NOTE The integer field TypeId corresponds to the value in TypeIdentifier. (TypeId is an internal id used in the system)

        public class ApiProductExtNumber
        {
            public int TypeId { get; set; }
            public string TypeIdentifier { get; set; } // varchar(3)
            public string TypeName { get; set; } // varchar(100)
            public string Value { get; set; } // varchar(35)
        }
        

NOTE on using the REC-type

If you set the value to a "true"-value the product has to have at least one of certain environment related documents. If not, the service will respond with a validation error.

NumberStr

ReadOnly field. Added to have a field that is able to retain leading zeroes in Number property

ApiManufacturerInProduct

        public class ApiManufacturerInProduct
        {
            public int Id { get; set; }
            public string Identifier { get; set; }
            public string Name { get; set; }
            public string Alias { get; set; }
        }
        

ApiProductPackage

        public class ApiProductPackage
        {
            [Obsolete]
            public int Count { get; set; }
            public decimal CountWithDecimals { get; set; }
            public string EAN { get; set; } // varchar(14)
            public bool Exists { get; set; }
            public int Height { get; set; }
            public int SortOrder  { get; set; }
            public int Length { get; set; }
            public long? PackagingFunctionId { get; set; }
            public long? PalletTypeId { get; set; }
            public int TargetCount { get; set; }
            public string TargetEAN { get; set; } // nvarchar(20)
            public string TypeId { get; set; } 
            public decimal Weight { get; set; }
            public int Width { get; set; }
        }
        

Key field for package - SortOrder

Use the field SortOrder to set the package level with the following values.

ApiProductPackage levels has the following hierarchy:

            Bas = 1
            Mellan = 2
            Mellan2 = 3
            Top = 4 
        

Enabling changes to package

Note:The fields TypeId and TypeIdIsSpecified must be set for any changes of a ProductPackage to have effect

Delete a package

Note 2:For deletion of a ProductPackage, set TypeId to '0'

Use new field CountWithDecimals

ApiProductPackage measurements M and M2 can be set as numerics with three decimals.

The field Count is regarded as Depreceated from 2018-12-20. It can still be used but will return an incorrect value when units are M and M2.

Optional fields

To enable clients to still use the old depreceated integer field Count. Note these fields are now optional: (2018-12-20)

The logic for the use of these fields is When reading packages for a product the values returned are

Ids for PackagingFunctionId PalletTypeId and TypeId

Get the available Id-values with these Soap-methods.

ApiProductUri

Provides a link to documents. Several products can link to the same document. Use FullUrl to access the source document. Uri types:

Show URI types

Downscaled images (thumbnails) are provided by the Prodibas system. See Downscaled image thumbnails.

        //FullUrl, ShortUrl och Uri tas från samma fält
        public class ApiProductUri
        {
            public string FullUrl { get; set; } // varchar(900)
            public string ShortUrl { get; set; } // varchar(900)
            public string Type { get; set; } // varchar(20)
            public string TypeName { get; set; } // varchar(35)
            public string Uri { get; set; } // varchar(900)
        }
        

ApiEtimInfo

NOTE When updating any one of the ETIM-features, set property "ValuesIsSpecified" to true.

ValuesIsSpecifiedtrue if updating

        public class ApiEtimInfo
        {
            public string ClassIdentifier { get; set; } // nvarchar(255) // ???
            public string ClassName { get; set; } // nvarchar(255)
            public string GroupIdentifier { get; set; } // nvarchar(255)
            public string GroupName  { get; set; } // nvarchar(255)
            public List ApiEtimProductData Values { get; set; } 
            public bool ValuesIsSpecified { get; set; } 
        }
        

ApiEtimProductData

Update ETIM-feature by setting these fields:

Field Value
FeatureIdentifier EFxxxxxx
FeatureIdentifierIsSpecified true if updating
Value - The valueNumber, Range (x|y), Bool (true/false), EtimValue (EVxxxxxxx) or EtimValue as text
ValueIsSpecifiedtrue if updating
NOTE: a blank value in property Value will delete the feature value.

        public class ApiEtimProductData
        {
            public string NameSv { get; set; } // varchar(30)
            public string FeatureIdentifier { get; set; } // nvarchar(255) // Update key
            public bool FeatureIdentifierIsSpecified { get; set; }
            public ApiEtimFeatureType  FeatureType { get; set; } // Description!
            public bool FeatureTypeIsSpecified { get; set; }
            public List ApiEtimValue PossibleValues { get; set; }
            public ApiEtimUnit ApiEtimUnit Unit { get; set; }
            public string Value { get; set; } // nvarchar(50)
            public bool ValueIsSpecified { get; set; }
            [DataMember(IsRequired = false)]
            public string ValueAsText { get; set; } // nvarchar(255)
        }
        

ApiEtimFeatureType

        public enum ApiEtimFeatureType
        {
            [Description("None")]
            None = ' ',
            [Description("Alphanumeric")]
            Alphanumeric = 'A',
            [Description("Numeric")]
            Numeric = 'N',
            [Description("Logical")]
            Logical = 'L',
            [Description("Range")]
            NumericRange = 'R'
        }
        

ApiEtimValue

        public class ApiEtimValue
        {
            [DataMember]
            public string Identifier { get; set; }  //  nvarchar(255) 
            [DataMember(IsRequired = true)]
            public bool IdentifierIsSpecified { get; set; }
            [DataMember]
            public string Name { get; set; }  // nvarchar(255)
            [DataMember(IsRequired = true)]
            public bool NameIsSpecified { get; set; }
        }
        

ApiEtimUnit

        public class ApiEtimUnit
        {
            [DataMember]
            public string Description { get; set; } // nvarchar(255)
            [DataMember(IsRequired = true)]
            public bool DescriptionIsSpecified { get; set; }
            [DataMember]
            public string Identifier { get; set; } // nvarchar(255)
            [DataMember(IsRequired = true)]
            public bool IdentifierIsSpecified { get; set; }
            [DataMember]
            public string Name { get; set; } // nvarchar(255)
            [DataMember(IsRequired = true)]
            public bool NameIsSpecified { get; set; }
        }
        

Downscaled images

Prodibas uses extensive caching to avoid re-creating the same images again. But as soon as the original image is newer than cached version, the cache is updated on the first request.

Scaled images can be accessed via HTTP request

example:
https://www.rskdatabasen.se/thumb/number/5853175/MANU616/BILD/120/120/FitWithinFrameTargetSize

Querystring

Recommendations for scaled image sizes

These are the system our system uses internally for different sizes.

Thumbnails 120x120px
Medium 400x400px
Large 700x700px

Downscaling and validating images

Validation

Minimum allowed size is 1181x1181 px. The requirement must be met for both width and height. Eg 900x1200 px will not be accepted.

Images that are not stored in Prodibas are not validated. This applies in cases when InfoPlus only has a URL to an external image.

Downscaling

Smaller images are never scaled up.

Proportions are preserved when scaling.

During uploads the original image is scaled down to 1181 px width or height, according to SizeCalculationOptions.FillFrame. This is the image size that Prodibas stores. Rectangular images will be bigger than 1181 px whether in width or height.

SizeCalculationOptions

Prodibas supports 4 different ways of downscaling:

FitWithinFrame examples

FillFrame examples

FitWithinFrameTargetSize test top-left corner

FillFrameTargetSize test top-left corner