Product Api


Common objects

There are some objects that are used in requests/responses across the API services and methods. For example:

  • All requests contains an authentication object
  • The update methods can have validation errors
  • Some requests are queued and a Pingback url can be provided in the request and used instead of polling the corresponding GetResult method

Authentication

The ApiAuthentication object contains three parts:

  • The company identifier, on the format "MANU" + the company number
  • Industry e.g "VVS" or "SEG"
  • The authentication key

public class ApiAuthentication
{
    public string CompanyIdentifier { get; set; }   // string.Format("MANU{0}", company.Id)
    public Industry Industry { get; set; }          // see enum below
    public string Key { get; set; }                 // any of your active API keys. 
}
public enum Industry
{
    VVS = 1, 
    SEG = 2
}
Example xml

In example, the key is for the dev environment. Not applicable elsewhere.


<requestparams:Authentication>
       <requestparams:CompanyIdentifier>MANU999</requestparams:CompanyIdentifier>
       <requestparams:Industry>VVS</requestparams:Industry>
       <requestparams:Key>DEVMANU999</requestparams:Key>
</requestparams:Authentication>


Request objects

Every request has to provide authentication information as an input parameter.

Anonymous requests are blocked.

public class ApiRequest
{
    public ApiAuthentication Authentication { get; set; }
}
Example xml

<soapenv:Envelope 
	xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' 
    xmlns:apirequest='Prodibas.API.V1' 
    xmlns:outputopts='Prodibas.API.V1.Parameters.OutputOptions' 
    xmlns:requestparams='Prodibas.API.V1.Parameters'>
<soapenv:Header/>

...
 <apirequest:GetByIdentifier> (example method)
...
 <apirequest:productIdentifier> (example params for this method)
...
 <apirequest:structuredOutputOptions> (example optional params for this method)
...
 <apirequest:requestOptions>  (required authentication for all requests )
    <requestparams:Authentication>
       <requestparams:CompanyIdentifier>MANU999</requestparams:CompanyIdentifier>
       <requestparams:Industry>VVS</requestparams:Industry>
       <requestparams:Key>DEVMANU999</requestparams:Key>
    </requestparams:Authentication>
 </apirequest:requestOptions>

The ApiQueuedRequest is a request that will be queued and processed in batch.

It will return a QueuedId of the queued request which then can be used to poll result.

public class ApiQueuedRequest : ApiRequest
{
    public string  PingBackUrl { get; set; }
}

If PingBackUrl is present, the service will make one HTTP GET request to notify the client-side that the queued work has been processed. Firewall port openings might be required on the client-side. Unreliable if there are network issues.

Example xml

<soapenv:Envelope 
	xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'
	xmlns:apirequest='Prodibas.API.V1' 
	xmlns:requestparams='Prodibas.API.V1.Parameters'
	xmlns:outputopts='Prodibas.API.V1.Parameters.OutputOptions'>
	<soapenv:Header/>
	<soapenv:Body>
...
 <apirequest:GetManyByIdentifiersQueued> (example method)
...
 <apirequest:productIdentifier> (example params for this method)
...
 <apirequest:structuredOutputOptions> (example optional params for this method)
...
<apirequest:queuedRequestOptions> (required authentication for all requests )
	<requestparams:Authentication>
		<requestparams:CompanyIdentifier>MANU999</requestparams:CompanyIdentifier>
		<requestparams:Industry>VVS</requestparams:Industry>
		<requestparams:Key>DEVMANU999</requestparams:Key>
	</requestparams:Authentication>
	<requestparams:PingBackUrl></requestparams:PingBackUrl> (optional PingBackUrl)
</apirequest:queuedRequestOptions>

The ApiUpdateRequest object is one of the parameters for UpdateSingle

If an update request attempts to update documents (the term documents refers to both images and documents that are linked to a product) the documents are provided in a list of ApiUploadDocument (see below).

The product uri and document is linked together by using the same string value for ApiUploadDocument.FileName and ApiProductUri.Url. Several products and/or product uris can link to the same document. In this case it is only necessary to provide one document in the request.

FileName must be unique within your company's "sandbox". Prodibas will rename the files according to the internal rules.

Enabling changes to documents

Note: The fields Type, TypeIsSpecified, Uri, UriIsSpecified and UrisIsSpecified must be set for any changes of a document to have effect. If the document referred to in field Uri is not an external link, a ApiUploadDocument must also be provided.

public class ApiUpdateRequest : ApiRequest 
{
    public List<ApiUploadDocument> Documents { get; set; }
}

public class ApiUploadDocument
{
    public string FileName { get; set; }
    public byte[] Bytes { get; set; }
}

See also:

Example xml

<s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'>
	<s:Header></s:Header>
	<s:Body>
		<UpdateSingle xmlns='Prodibas.API.V1'>
			<product xmlns:a='Prodibas.API.V1.Model' 
			xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
				... product properties...
				<a:Uris>
					... uris...
					<a:ApiProductUri>
						... uri properties...
						<a:Type>BILD</a:Type>
						<a:TypeIsSpecified>true</a:TypeIsSpecified>
						... uri properties...
						<a:Uri>filename1.jpg</a:Uri>
						<a:UriIsSpecified>true</a:UriIsSpecified>
					</a:ApiProductUri>
					... uris...
					<a:ApiProductUri>
						... uri properties...
						<a:Type>MAN</a:Type>
						<a:TypeIsSpecified>true</a:TypeIsSpecified>
						... uri properties...
						<a:Uri>filename2.pdf</a:Uri>
						<a:UriIsSpecified>true</a:UriIsSpecified>
					</a:ApiProductUri>
					... uris...
					<a:ApiProductUri>
						... uri properties...
						<a:Type>PROD</a:Type>
						<a:TypeIsSpecified>true</a:TypeIsSpecified>
						... uri properties...
						<a:Uri>filename2.pdf</a:Uri>
						<a:UriIsSpecified>true</a:UriIsSpecified>
					</a:ApiProductUri>
					... uris...
				</a:Uris>
				<a:UrisIsSpecified>true</a:UrisIsSpecified>
				... product properties...
			</product>
			<structuredInputOptions xmlns:a='Prodibas.API.V1.Parameters.OutputOptions' i:nil='true' xmlns:i='http://www.w3.org/2001/XMLSchema-instance'></structuredInputOptions>
			<requestOptions xmlns:a='Prodibas.API.V1.Parameters' xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
				<a:Authentication>
					<a:CompanyIdentifier>MANU999</a:CompanyIdentifier>
					<a:Industry>VVS</a:Industry>
					<a:Key>DEVMANU999</a:Key>
				</a:Authentication>
				<a:Documents>
					<a:ApiUploadDocument>
						<a:Bytes>... a base64 encoded document</a:Bytes>
						<a:FileName>filename1.jpg</a:FileName>
					</a:ApiUploadDocument>
					<a:ApiUploadDocument>
						<a:Bytes>... another base64 encoded document</a:Bytes>
						<a:FileName>filename2.pdf</a:FileName>
					</a:ApiUploadDocument>
				</a:Documents>
			</requestOptions>
		</UpdateSingle>
	</s:Body>
</s:Envelope>



If no documents are provided, the documents section is set to null

 
...
        <a:Documents i:nil='true'>
        </a:Documents>
...

The ApiQueuedUpdateRequest object is one of the parameters for UpdateManyQueued. It's identical to ApiUpdateRequest but also includes the PingBackUrl.

public class ApiQueuedUpdateRequest : ApiUpdateRequest 
{
    public string PingBackUrl { get; set; }
}

If PingBackUrl is present, the service will make one HTTP GET request to notify the client-side that the queued work has been processed. Firewall port openings might be required on the client-side. Unreliable if there are network issues.


Response objects

Most API responses contains a Data and a User object. What type Data is depends on the request method. The User object contains information about the user who made the request.

[DataContract(Name = "ApiResponse_{0}")]
public class ApiResponse<T>
{
    public T Data { get; set; }
    public ApiUser User { get; set; }
}

public class ApiUser
{
    public int Id { get; set; }
    public string Email { get; set; }
    public string Name { get; set; }
}

For example, a response could have the following signature:

Example xml

<s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'>
	<s:Body>
		<GetSingleByIdentifierResponse xmlns='Prodibas.API.V1'> (example method)
			<GetSingleByIdentifierResult 
			xmlns:a='Prodibas.API.V1.Parameters'
			xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
				<a:Data xmlns:b='Prodibas.API.V1.Model'>
				... product properties...
				</a:Data>
				<a:User 
				xmlns:b='http://schemas.datacontract.org/2004/07/WebService.V1.Parameters'>
					<b:Email i:nil='true'/>
					<b:Id>1</b:Id>
					<b:Name>Test Testsson</b:Name>
				</a:User>
			</GetSingleByIdentifierResult>
		</GetSingleByIdentifierResponse>
	</s:Body>
</s:Envelope>

A queued/batched request returns a ApiQueuedResponse containing a QueueId. The QueueId is used to receive the result by using the GetResult or GetUpdateResult methods.

public class ApiQueuedResponse
{
    public int QueueId { get; set; }
}
Example xml

<s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'>
	<s:Body>
		<GetManyByIdentifiersQueuedResponse xmlns='Prodibas.API.V1'> (example method)
			<GetManyByIdentifiersQueuedResult 
			xmlns:a='Prodibas.API.V1.Parameters' 
			xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
				<a:QueueId>67640</a:QueueId>
			</GetManyByIdentifiersQueuedResult>
		</GetManyByIdentifiersQueuedResponse>
	</s:Body>
</s:Envelope>


Pingback url

A PingBackUrl can optionally be provided in all queued requests.

If PingBackUrl is present, the service will make one HTTP GET request to notify the client-side that the queued work has been processed. Firewall port openings might be required on the client-side. Unreliable if there are network issues.

Add QueueId to the pingback url

You can insert {QueueId} into the pingback url and it will be replaced with the QueueId of the request.

If this is sent to the service:
http://myserver.mydomain.com?MyownId=ABC123&QueueId={QueueId}

It could result in a pingback call like this:
http://myserver.mydomain.com?MyownId=ABC123&QueueId=12345


Validation errors

Validation errors can be returned in the response as a result of a failed product(s) update operation.

Prodibas uses comprehensive validation of incoming data. Some of the rules relates to other products in the system. There are also rules regarding roles and the right to change some data. If the API refuses to write data because of validation rules, it responds with one or several ApiModelValidationErrors.

Client side should always verify the result of writing data to Prodibas. Client side should also provide a way to present a report to the end-user.

public class ApiModelValidationError 
{
    public string Field { get; set; }
    public string Message { get; set; } 
}
Example xml

<s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'>
	<s:Body>
		<UpdateSingleResponse xmlns='Prodibas.API.V1'> (example method)
			<UpdateSingleResult xmlns:a='Prodibas.API.V1.Model' 
				xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
				<a:ApiModelValidationError>
					<a:Field>NameEn</a:Field>
					<a:Message>
						Artikel (4842188-123) valideringsfel. 
						Fält: Benämning Engelsk. Ogiltigt antal tecken. 
						Måste vara 30 eller färre. 
						Angivet värde=AS123 NameEn UpdateSingle 17:44
					</a:Message>
				</a:ApiModelValidationError>
				<a:ApiModelValidationError>
					<a:Field>Color</a:Field>
					<a:Message>
						Produkt (4842188-123) valideringsfel vid förändring. 
						Fält: Färg. Värdet kan endast ändras av en administratör.
					</a:Message>
				</a:ApiModelValidationError>
			</UpdateSingleResult>
		</UpdateSingleResponse>
	</s:Body>
</s:Envelope>


Product model

The Product Api service concerns functionality related to the product model and the its components. This page describes that model.


The ApiProduct model is the central object in the Product Api service. It describes a product/article in VVS or SEG. The product model consists of simple properties (strings, integers and so on) and more complex properties (for example lists of ApiProductUri and ApiArticleAccessory).

Each property (except for strictly readonly properties like NumberStr) has a corresponding boolean "IsSpecified" property (for example Unit and UnitIsSpecified). The "IsSpecified" properties are used to specify which properties should be updated in an update request. For example, if you want to update the Unit property, set the property to the desired value AND set UnitIsSpecified=true in the update request. If UnitIsSpecified is not set to true, the Unit property will not be updated.

Please note that some properties cannot be updated by setting "IsSpecified", usually because of limited access (for example only admin can update certain fields). Please inspected the validation error for more information.

The "IsSpecified" properties are omitted in class description below for readability reasons.

[DataContract(Name = "ApiProduct")]
public class ApiProduct
{
    public long Id { get; set; }
    public IndustrySpecificAbstractBase IndustrySpecific { get; set; } 
    public bool HasCEMark { get; set; }
    public string Color { get; set; } 
    public string CountryIdentifier { get; set; } 
    public DateTime? ApprovedAt { get; set; }
    public string CustomsNumber { get; set; } 
    public string ApiProductDangerous  DangerousItem { get; set; } 
    public string Description { get; set; } 
    public string Design { get; set; } 
    public int Diameter { get; set; }
    public string Dimension { get; set; } 
    public DateTime? EndAt { get; set; }
    public double EtimEnrichment { get; set; }
    public string EtimClassIdentifier { get; set; }
    public bool? ExportBan { get; set; }
    public List<ApiProductExtNumber> ExtNumbers { get; set; }
    public bool? FrostSensible { get; set; }
    public string Function { get; set; } 
    public int Height { get; set; }
    public string Identifier { get; set; }
    public ApiProductInfoLevelType InfoLevel { get; set; }
    public bool IsSafeWater { get; set; }
    public string SafeWaterVersion { get; set; } 
    public string SafeWaterIdentifier { get; set; } 
    public bool? IsNordicPolymark { get; set; }
    public string NordicPolymarkId { get; set; }
    public int Length { get; set; }
    public string ManufacturerTypeCode { get; set; }
    public ApiManufacturerInProduct Manufacturer { get; set; }
    public string Material { get; set; } 
    public DateTime ModifiedAt { get; set; }
    public string NameEn { get; set; } 
    public string NameLongEn { get; set; } 
    public string NameLongSv { get; set; } 
    public string NameSv { get; set; } 
    public bool? NonPhysical { get; set; } 
    public int? Number { get; set; } 
    public string NumberStr { get; set; } 
    public string OtherInfo { get; set; } 
    public List<ApiProductPackage> Packages { get; set; }
    public int PcsInPack { get; set; }
    public bool? Perishable { get; set; }
    public int PerishableTime { get; set; }
    public string ProductTypeName { get; set; } 
    public DateTime? PublishedAfter { get; set; }
    public int? ReplacedByNumber { get; set; }
    public string ReplacedByNumberStr { get; } 
    public ApiProductStorageRequirementTypes StorageRequirement { get; set; } 
    public string Surface { get; set; } 
    public string Trademark { get; set; } 
    public string Unit { get; set; } 
    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; }
    public int BvbVersion { get; set; }
    public ApiBvbResultType BvbResult  { get; set; }
    public string BvbBk04Kod { get; set; }
    public string BvbBsabKod { get; set; }
    public string SeriesName { get; set; } 
    public string ProductModel { get; set; } 
    public string GroupingWord { get; set; } 
    public DateTime? ReachVersionOfCandidateList { get; set; }
    public bool? IsWholesalerApproved{ get; set; }
    public string BulletText { get; set; } 
    public string DescriptionEn { get; set; } 
    public string BvbTotalAssessment { get; set; }
    public string BvbLifecycleAssessment { get; set; }
    public string BvbContentAssessment { get; set; }
    public string BvbCaption { get; set; }
    public string BvbImage { get; set; }
    public string BvbUrl { get; set; }
    public string DangerousItemUnNumber { get; set; }
    public DateTime? PublishedAfterWholesaler { get; set; }
    public ApiEnvironmentalData EnvironmentalData { get; set; } 
    public bool? HasValidationErrors { get; set; }
    public string StatisticGroup { get; set; }
}
Example xml

<b:ActivityLogs i:nil='true'/>
<b:ActivityLogsIsSpecified>false</b:ActivityLogsIsSpecified>
<b:ApprovedAt>2003-04-01T00:00:00</b:ApprovedAt>
<b:ApprovedAtIsSpecified>false</b:ApprovedAtIsSpecified>
<b:ArticleAccessories i:nil='true'/>
<b:ArticleAccessoriesIsSpecified>false</b:ArticleAccessoriesIsSpecified>
<b:ArticleAccessoryFor i:nil='true'/>
<b:ArticleAccessoryForIsSpecified>false</b:ArticleAccessoryForIsSpecified>
<b:ArticleSeries i:nil='true'/>
<b:ArticleSeriesIsSpecified>false</b:ArticleSeriesIsSpecified>
<b:BvbBk04Kod/>
<b:BvbBk04KodIsSpecified>false</b:BvbBk04KodIsSpecified>
<b:BvbBsabKod/>
<b:BvbBsabKodIsSpecified>false</b:BvbBsabKodIsSpecified>
<b:BvbId/>
<b:BvbIdIsSpecified>false</b:BvbIdIsSpecified>
<b:BvbResult>None</b:BvbResult>
<b:BvbResultIsSpecified>false</b:BvbResultIsSpecified>
<b:BvbVersion>0</b:BvbVersion>
<b:BvbVersionIsSpecified>false</b:BvbVersionIsSpecified>
<b:Color>vit</b:Color>
<b:ColorIsSpecified>false</b:ColorIsSpecified>
<b:CountryIdentifier>DE</b:CountryIdentifier>
<b:CountryIdentifierIsSpecified>false</b:CountryIdentifierIsSpecified>
<b:CustomsNumber>6110191090</b:CustomsNumber>
<b:CustomsNumberIsSpecified>false</b:CustomsNumberIsSpecified>
<b:DangerousItem>None</b:DangerousItem>
<b:DangerousItemIsSpecified>false</b:DangerousItemIsSpecified>
<b:Description>OBS! Detta är endast en artikel som används för testning.</b:Description>
<b:DescriptionIsSpecified>false</b:DescriptionIsSpecified>
<b:Design>S-lås/limmad/med sits</b:Design>
<b:DesignIsSpecified>false</b:DesignIsSpecified>
<b:Diameter>0</b:Diameter>
<b:DiameterIsSpecified>false</b:DiameterIsSpecified>
<b:Dimension/>
<b:DimensionIsSpecified>false</b:DimensionIsSpecified>
<b:EndAt i:nil='true'/>
<b:EndAtIsSpecified>false</b:EndAtIsSpecified>
<b:EnvironmentalData i:nil='true'/>
<b:EnvironmentalDataIsSpecified>false</b:EnvironmentalDataIsSpecified>
<b:EtimClassIdentifier>EC011318</b:EtimClassIdentifier>
<b:EtimClassIdentifierIsSpecified>false</b:EtimClassIdentifierIsSpecified>
<b:EtimDatas i:nil='true'/>
<b:EtimDatasIsSpecified>false</b:EtimDatasIsSpecified>
<b:EtimEnrichment>0.514286</b:EtimEnrichment>
<b:EtimEnrichmentIsSpecified>false</b:EtimEnrichmentIsSpecified>
<b:ExportBan>false</b:ExportBan>
<b:ExportBanIsSpecified>false</b:ExportBanIsSpecified>
<b:ExtNumbers i:nil='true'/>
<b:ExtNumbersIsSpecified>false</b:ExtNumbersIsSpecified>
<b:FrostSensible>false</b:FrostSensible>
<b:FrostSensibleIsSpecified>false</b:FrostSensibleIsSpecified>
<b:Function>dubbelspolning</b:Function>
<b:FunctionIsSpecified>false</b:FunctionIsSpecified>
<b:GroupingWord/>
<b:GroupingWordIsSpecified>false</b:GroupingWordIsSpecified>
<b:HasCEMark>true</b:HasCEMark>
<b:HasCEMarkIsSpecified>false</b:HasCEMarkIsSpecified>
<b:Height>0</b:Height>
<b:HeightIsSpecified>false</b:HeightIsSpecified>
<b:Id>988425</b:Id>
<b:IdIsSpecified>false</b:IdIsSpecified>
<b:Identifier>ART988425</b:Identifier>
<b:IndustrySpecific i:type='b:IndustrySpecificVVS'>
   <b:Power>dsf</b:Power>
   <b:PowerIsSpecified>false</b:PowerIsSpecified>
   <b:Pressure/>
   <b:PressureIsSpecified>false</b:PressureIsSpecified>
   <b:Size/>
   <b:SizeIsSpecified>false</b:SizeIsSpecified>
   <b:Standard/>
   <b:StandardIsSpecified>false</b:StandardIsSpecified>
</b:IndustrySpecific>
<b:IndustrySpecificIsSpecified>false</b:IndustrySpecificIsSpecified>
<b:InfoLevel>ActiveNumber</b:InfoLevel>
<b:InfoLevelIsSpecified>false</b:InfoLevelIsSpecified>
<b:IsNordicPolymark>false</b:IsNordicPolymark>
<b:IsNordicPolymarkIsSpecified>false</b:IsNordicPolymarkIsSpecified>
<b:IsSafeWater>true</b:IsSafeWater>
<b:IsSafeWaterIsSpecified>false</b:IsSafeWaterIsSpecified>
<b:IsWholesalerApproved>true</b:IsWholesalerApproved>
<b:Length>0</b:Length>
<b:LengthIsSpecified>false</b:LengthIsSpecified>
<b:Manufacturer>
   <b:Alias>Gästföretaget</b:Alias>
   <b:Id>616</b:Id>
   <b:Identifier>MANU616</b:Identifier>
   <b:Name>Gästföretaget</b:Name>
</b:Manufacturer>
<b:ManufacturerIsSpecified>false</b:ManufacturerIsSpecified>
<b:ManufacturerTypeCode>Kan användas Uljon 2003-04-01</b:ManufacturerTypeCode>
<b:ManufacturerTypeCodeIsSpecified>false</b:ManufacturerTypeCodeIsSpecified>
<b:Material>keramik</b:Material>
<b:MaterialIsSpecified>false</b:MaterialIsSpecified>
<b:ModifiedAt>2020-10-28T15:52:38.08</b:ModifiedAt>
<b:ModifiedAtIsSpecified>false</b:ModifiedAtIsSpecified>
<b:NameEn/>
<b:NameEnIsSpecified>false</b:NameEnIsSpecified>
<b:NameLongEn/>
<b:NameLongEnIsSpecified>false</b:NameLongEnIsSpecified>
<b:NameLongSv>Testartikel 2</b:NameLongSv>
<b:NameLongSvIsSpecified>false</b:NameLongSvIsSpecified>
<b:NameSv>För test</b:NameSv>
<b:NameSvIsSpecified>false</b:NameSvIsSpecified>
<b:NonPhysical>false</b:NonPhysical>
<b:NordicPolymarkId/>
<b:NordicPolymarkIdIsSpecified>false</b:NordicPolymarkIdIsSpecified>
<b:Number>4806392</b:Number>
<b:NumberIsSpecified>false</b:NumberIsSpecified>
<b:NumberStr>4806392</b:NumberStr>
<b:OtherInfo/>
<b:OtherInfoIsSpecified>false</b:OtherInfoIsSpecified>
<b:Packages i:nil='true'/>
<b:PackagesIsSpecified>false</b:PackagesIsSpecified>
<b:PcsInPack>0</b:PcsInPack>
<b:PcsInPackIsSpecified>false</b:PcsInPackIsSpecified>
<b:Perishable i:nil='true'/>
<b:PerishableIsSpecified>false</b:PerishableIsSpecified>
<b:PerishableTime>0</b:PerishableTime>
<b:PerishableTimeIsSpecified>false</b:PerishableTimeIsSpecified>
<b:ProductGroup i:nil='true'/>
<b:ProductGroupIsSpecified>false</b:ProductGroupIsSpecified>
<b:ProductModel>MOdellen</b:ProductModel>
<b:ProductModelIsSpecified>false</b:ProductModelIsSpecified>
<b:ProductTypeName>Testartikel (WC-stol)</b:ProductTypeName>
<b:ProductTypeNameIsSpecified>false</b:ProductTypeNameIsSpecified>
<b:PublishedAfter i:nil='true'/>
<b:PublishedAfterIsSpecified>false</b:PublishedAfterIsSpecified>
<b:ReachVersionOfCandidateList i:nil='true'/>
<b:ReachVersionOfCandidateListIsSpecified>false</b:ReachVersionOfCandidateListIsSpecified>
<b:ReplacedByNumber i:nil='true'/>
<b:ReplacedByNumberIsSpecified>false</b:ReplacedByNumberIsSpecified>
<b:ReplacedByNumberStr/>
<b:SafeWaterIdentifier>999</b:SafeWaterIdentifier>
<b:SafeWaterIdentifierIsSpecified>false</b:SafeWaterIdentifierIsSpecified>
<b:SafeWaterVersion>2016:1</b:SafeWaterVersion>
<b:SafeWaterVersionIsSpecified>false</b:SafeWaterVersionIsSpecified>
<b:SeriesName/>
<b:SeriesNameIsSpecified>false</b:SeriesNameIsSpecified>
<b:StorageRequirement>None</b:StorageRequirement>
<b:StorageRequirementIsSpecified>false</b:StorageRequirementIsSpecified>
<b:Surface/>
<b:SurfaceIsSpecified>false</b:SurfaceIsSpecified>
<b:Trademark/>
<b:TrademarkIsSpecified>false</b:TrademarkIsSpecified>
<b:Unit>ST</b:Unit>
<b:UnitIsSpecified>false</b:UnitIsSpecified>
<b:Uris i:nil='true'/>
<b:UrisIsSpecified>false</b:UrisIsSpecified>
<b:Weight>1.3</b:Weight>
<b:WeightIsSpecified>false</b:WeightIsSpecified>
<b:Width>0</b:Width>
<b:WidthIsSpecified>false</b:WidthIsSpecified>
<b:BulletText/>
<b:BulletTextIsSpecified>false</b:BulletTextIsSpecified>
<b:DescriptionEn/>
<b:DescriptionEnIsSpecified>false</b:DescriptionEnIsSpecified>
<b:BvbTotalAssessment/>
<b:BvbTotalAssessmentIsSpecified>false</b:BvbTotalAssessmentIsSpecified>
<b:BvbLifecycleAssessment/>
<b:BvbLifecycleAssessmentIsSpecified>false</b:BvbLifecycleAssessmentIsSpecified>
<b:BvbContentAssessment/>
<b:BvbContentAssessmentIsSpecified>false</b:BvbContentAssessmentIsSpecified>
<b:BvbCaption/>
<b:BvbCaptionIsSpecified>false</b:BvbCaptionIsSpecified>
<b:BvbImage/>
<b:BvbImageIsSpecified>false</b:BvbImageIsSpecified>
<b:BvbUrl/>
<b:BvbUrlIsSpecified>false</b:BvbUrlIsSpecified>
<b:DangerousItemUnNumber></b:DangerousItemUnNumber>
<b:DangerousItemUnNumberIsSpecified>false</b:DangerousItemUnNumberIsSpecified>
<b:PublishedAfterWholesaler i:nil='true'/>
<b:PublishedAfterWholesalerIsSpecified>false</b:PublishedAfterWholesalerIsSpecified>
<b:EnvironmentalData i:nil='true' />
<b:EnvironmentalDataIsSpecified>false</b:EnvironmentalDataIsSpecified>
<b:HasValidationErrors>false</b:HasValidationErrors>
<b:StatisticGroup i:nil='true'/>

Industry specific properties of ApiProduct are handled by classes that inherit from ApiProductIdentifierAbstractBase. The abstract class itself has no properties.

IndustrySpecificVVS

public class IndustrySpecificVVS : IndustrySpecificAbstractBase
{
    public string Power { get; set; }
    public bool PowerIsSpecified { get; set; }

    public string Pressure { get; set; }
    public bool PressureIsSpecified { get; set; }

    public string Size { get; set; }
    public bool SizeIsSpecified { get; set; }

    public string Standard { get; set; }
    public bool StandardIsSpecified { get; set; }
}
        

IndustrySpecificSEG

The Str suffixed fields contains the same value as the non suffixed field with a length of 7 characters and left-padded with zeroes. The Str suffixed fields are readonly.

public class IndustrySpecificSEG : IndustrySpecificAbstractBase
{
    public int? ReplacedPartlyByNumber { get; set; }
    public bool ReplacedPartlyByNumberIsSpecified { get; set; }
    
    public string ReplacedPartlyByNumberStr { get; set; }

    public int? ReplacesNumber { get; set; }
    public bool ReplacesNumberIsSpecified { get; set; }

    public string ReplacesNumberStr { get; set; }

    public int? ReplacesPartlyNumber { get; set; }
    public bool ReplacesPartlyNumberIsSpecified { get; set; }

    public string ReplacesPartlyNumberStr { get; set; }
}
        
ApiManufacturerInProduct contains information regarding the manufacturer that the product belongs to. All properties are readonly.

public class ApiManufacturerInProduct
{
    public int Id { get; set; }
    public string Identifier { get; set; }
    public string Name { get; set; }
    public string Alias { get; set; }
}
        
Example xml
        
<b:Manufacturer>
	<b:Alias>Gästföretaget!</b:Alias>
	<b:Id>616</b:Id>
	<b:Identifier>MANU616</b:Identifier>
	<b:Name>Gästföretaget</b:Name>
</b:Manufacturer>
        
        
public class ApiProductPackage
{
    [Obsolete]
    public int Count { get; set; }
    public bool CountIsSpecified { get; set; }

    public decimal CountWithDecimals { get; set; }
    public bool CountWithDecimalsIsSpecified { get; set; }

    public string EAN { get; set; } 
    public bool EANIsSpecified { get; set; }

    public bool Exists { get; set; }

    public int Height { get; set; }
    public bool HeightIsSpecified { get; set; }

    public int Length { get; set; }
    public bool LengthIsSpecified { get; set; }

    public long? PackagingFunctionId  { get; set; }
    public bool PackagingFunctionIdIsSpecified { get; set; }

    public long? PalletTypeId  { get; set; }
    public bool PalletTypeIdIsSpecified { get; set; }

    public int SortOrder  { get; set; }
    public bool SortOrderIsSpecified { get; set; }

    public int TargetCount { get; set; }
    public bool TargetCountIsSpecified { get; set; }

    public string TargetEAN { get; set; } 
    public bool TargetEANIsSpecified { get; set; }

    public string TypeId  { get; set; }
    public bool TypeIdIsSpecified { get; set; }

    public decimal Weight { get; set; }
    public bool WeightIsSpecified { get; set; }

    public int Width { get; set; }
    public bool WidthIsSpecified { 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 
        

Adding a package

Note: At least the fields TypeId, TypeIdIsSpecified, CountWithDecimals, CountWithDecimalsIsSpecified, SortOrder, SortOrderIsSpecified and PackagesIsSpecified is required.

Enabling changes to package

Note: The fields TypeId, TypeIdIsSpecified, SortOrder, SortOrderIsSpecified and PackagesIsSpecified 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

Decimal field CountWithDecimals replaces integer field Count.

If Unit of ApiProduct is set as M or M2 and the count of ApiProductPackage is a decimal, field CountWithDecimals must be used instead of Count to set the count as a numerical with three decimals.

The field Count is regarded as deprecated from 2018-12-20. It can still be used but will return an incorrect value when Unit is M or M2 and CountWithDecimals is set as a decimal.

Optional fields

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

  • Count and CountIsSpecified
  • CountWithDecimals and CountWithDecimalsIsSpecified
The logic for the use of these fields is
  • If CountWithDecimalsIsSpecified=true system uses the value in CountWithDecimals
  • Or else if CountIsSpecified=true system uses the value in Count
When reading packages for a product the values returned are
  • CountWithDecimals - The value with decimals
  • Count - The value as an int (NOTE! if there are decimals these will be truncated)

Example xml

<b:Packages>
   <b:ApiProductPackage>
      <b:Count>1</b:Count>
      <b:CountIsSpecified>false</b:CountIsSpecified>
      <b:CountWithDecimals>1.000</b:CountWithDecimals>
      <b:CountWithDecimalsIsSpecified>false</b:CountWithDecimalsIsSpecified>
      <b:EAN/>
      <b:EANIsSpecified>false</b:EANIsSpecified>
      <b:Exists>true</b:Exists>
      <b:Height>25</b:Height>
      <b:HeightIsSpecified>false</b:HeightIsSpecified>
      <b:Length>25</b:Length>
      <b:LengthIsSpecified>false</b:LengthIsSpecified>
      <b:PackagingFunctionId i:nil='true'/>
      <b:PackagingFunctionIdIsSpecified>false</b:PackagingFunctionIdIsSpecified>
      <b:PalletTypeId i:nil='true'/>
      <b:PalletTypeIdIsSpecified>false</b:PalletTypeIdIsSpecified>
      <b:SortOrder>1</b:SortOrder>
      <b:SortOrderIsSpecified>false</b:SortOrderIsSpecified>
      <b:TargetCount>0</b:TargetCount>
      <b:TargetCountIsSpecified>false</b:TargetCountIsSpecified>
      <b:TargetEAN/>
      <b:TargetEANIsSpecified>false</b:TargetEANIsSpecified>
      <b:TypeId>BX</b:TypeId>
      <b:TypeIdIsSpecified>false</b:TypeIdIsSpecified>
      <b:Weight>250.000</b:Weight>
      <b:WeightIsSpecified>false</b:WeightIsSpecified>
      <b:Width>25</b:Width>
      <b:WidthIsSpecified>false</b:WidthIsSpecified>
   </b:ApiProductPackage>
   <b:ApiProductPackage>...
   <b:ApiProductPackage>...
</b:Packages>
<b:PackagesIsSpecified>false</b:PackagesIsSpecified>

Article relations

There are two collections of Accessories (Article relations) on the product.

The ArticleAccessoriesFor-collection is the inverse of the ArticleAccessories and cannot be updated directly.

In the collection, there can be more than one relation between two products at the same time. One per relation type.


public class ApiArticleAccessory 
{
    
    public long Id { get; set; } 
    public bool IdIsSpecified { get; set; }
    public long ManufacturerId { get; set; }           
    public bool ManufacturerIsSpecified { get; set; }
    public string Number { get; set; }
    public bool NumberIsSpecified { get; set; }
    public string RelationType { get; set; }
    public bool RelationTypeIsSpecified { get; set; }
    public string ConsistsOfNo { get; set; }
    public bool ConsistsOfNoIsSpecified { get; set; }
}

Relevant fields for Article relations

The relevant fields are Number, RelationType and ConsistsOfNo. The ID-field is obsolete and is removed in Version 2 of the API. It can be omitted in the update

The RelationType code has the following valid values:

  • 'Accessory' = "Tillbehör"
  • 'Spare' = "Reservdel"
  • 'ConsistsOf' = "Består av"
  • 'OptionalMandatoryAccessory' = "Valbart obligatoriskt tillbehör"
  • 'Delete' = "(Deletes the releation(s) as described below)"
The underlying value for the code can be retrieved as a list here: GetArticleRelationTypes

The ConsistsOfNo = 'Består av antal' field is only applicable for the RelationType 'ConsistsOf'= "Består av". Valid values are positive integers. ConsistsOfNo will always be empty in list ArticleAccessoryFor

Updating the ArticleAccessories collection

Supply a complete ApiArticleAccessory record in the ArticleAccessories collection and set ArticleAccessoriesIsSpecified to update the collection.

All relations that have the relevant fields set is handled as follows. For a relation to another product:

  • It has to be a relation to a product with the same manufacturer. Otherwise it will be an exception
  • Duplicates within the same POST (same product and relationtype) will render an exception
  • If the relationtype is 'Delete' - all relations to that product is deleted, except the relations with other type in the POST
  • Existing relations that are not in the POST will not be affected, except for the above described 'Delete' procedure
  • A supplied relation in the POST that already exists will remain unchanged
  • A supplied relation in the POST that does not exists will be added
  • If the relationtype is 'ConsistsOf', set ArticleAccessoriesIsSpecified, NumberIsSpecified and ConsistsOfNoIsSpecified to be able to set ConsistsOfNo on a new relation, or update ConsistsOfNo on an existing relation

To update the type of a relation on a product you should thus have two records in the post. One 'Delete' that removes the all the current ones, and then one (or more than one when applicable) for the new relation type on the product.

Example xml
        
 <b:ArticleAccessories>
   <b:ApiArticleAccessory>
         <b:ConsistsOfNo i:nil='true' />
         <b:ConsistsOfNoIsSpecified>false</b:ConsistsOfNoIsSpecified>
         <b:Id>0</b:Id>
         <b:IdIsSpecified>false</b:IdIsSpecified>
         <b:ManufacturerId>616</b:ManufacturerId>
         <b:ManufacturerIdIsSpecified>false</b:ManufacturerIdIsSpecified>
         <b:Number>1024660</b:Number>
         <b:NumberIsSpecified>true</b:NumberIsSpecified>
         <b:RelationType>OptionalMandatoryAccessory</b:RelationType>
         <b:RelationTypeIsSpecified>true</b:RelationTypeIsSpecified>
    </b:ApiArticleAccessory>
</b:ArticleAccessories>
<b:ArticleAccessoriesIsSpecified>true</b:ArticleAccessoriesIsSpecified>

        
Example xml - updating the record from (anything) to 'Spare' (Specify the Id is not neccessary)

 <b:ArticleAccessories>
   <b:ApiArticleAccessory>
         <b:ManufacturerId>616</b:ManufacturerId>
         <b:ManufacturerIdIsSpecified>false</b:ManufacturerIdIsSpecified>
         <b:Number>1024660</b:Number>
         <b:NumberIsSpecified>true</b:NumberIsSpecified>
         <b:RelationType>Delete</b:RelationType>
         <b:RelationTypeIsSpecified>true</b:RelationTypeIsSpecified>
    </b:ApiArticleAccessory>
   <b:ApiArticleAccessory>
         <b:ManufacturerId>616</b:ManufacturerId>
         <b:ManufacturerIdIsSpecified>false</b:ManufacturerIdIsSpecified>
         <b:Number>1024660</b:Number>
         <b:NumberIsSpecified>true</b:NumberIsSpecified>
         <b:RelationType>Spare</b:RelationType>
         <b:RelationTypeIsSpecified>true</b:RelationTypeIsSpecified>
    </b:ApiArticleAccessory>
</b:ArticleAccessories>
<b:ArticleAccessoriesIsSpecified>true</b:ArticleAccessoriesIsSpecified>


Example xml - updating ConsistsOfNo on ConsistsOf relation type (Specify the Id is not neccessary)

 <b:ArticleAccessories>
   <b:ApiArticleAccessory>
         <b:ConsistsOfNo>2</b:ConsistsOfNo>
         <b:ConsistsOfNoIsSpecified>true</b:ConsistsOfNoIsSpecified>
         <b:ManufacturerId>616</b:ManufacturerId>
         <b:ManufacturerIdIsSpecified>false</b:ManufacturerIdIsSpecified>
         <b:Number>1024660</b:Number>
         <b:NumberIsSpecified>true</b:NumberIsSpecified>
         <b:RelationType>ConsistsOfNo</b:RelationType>
         <b:RelationTypeIsSpecified>true</b:RelationTypeIsSpecified>
    </b:ApiArticleAccessory>
</b:ArticleAccessories>
<b:ArticleAccessoriesIsSpecified>true</b:ArticleAccessoriesIsSpecified>


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

Read more about updating documents here: ApiUpdateRequest

//FullUrl, ShortUrl and Uri originates from the same data field
public class ApiProductUri
{
    public string FullUrl { get; set; } 
    public bool FullUrlIsSpecified { get; set; }

    public string ShortUrl { get; set; } 
    public bool ShortUrlIsSpecified { get; set; }

    public string Type { get; set; } 
    public bool TypeIsSpecified { get; set; }

    public string TypeName { get; set; } 
    public bool TypeNameIsSpecified { get; set; }

    public string Uri { get; set; } 
    public bool UriIsSpecified { get; set; }
}
        

Uri types

On the reference lists page you can find available URI types to use for VVS and SEG.

Downscaled images

Prodibas uses extensive caching to avoid recreating 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 requests.

  • VVS https://www.rskdatabasen.se/thumb/number/{productNumber}/{manufacturerIdentifier}/{uriType}/{maxWidth}/{maxHeight}/{options}
  • VVS https://www.rskdatabasen.se/thumb/id/{productId}/{uriType}/{maxWidth}/{maxHeight}/{options}
  • SEG https://www.enummersok.se/thumb/number/{productNumber}/{manufacturerIdentifier}/{uriType}/{maxWidth}/{maxHeight}/{options}
  • SEG https://www.enummersok.se/thumb/id/{productId}/{uriType}/{maxWidth}/{maxHeight}/{options}
Example:
https://www.rskdatabasen.se/thumb/number/5853175/MANU616/BILD/120/120/FitWithinFrameTargetSize

Querystring

  • int productNumber - RSK- or E-nummer
  • string manufacturerIdentifier - string.Format("MANU{0}", manufacturerId)
  • long productId - Prodibas Id of the product
  • string uriType - ApiProductUri.Type
  • int maxWidth (px)
  • int maxHeight (px)
  • SizeCalculationOptions options

Recommendations for scaled image sizes

These are the settings 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:

  • FillFrame = 0 - rectangular images will be bigger than target-size in whether width or height, guarantees that both width and height are at least as big as the target-size (if the image was big enough)
  • FitWithinFrame = 1 - rectangular images will be smaller than target-size in whether width or height, guarantees that the image fits wholly within the target-size
  • FillFrameTargetSize = 2 – as FillFrame but the edges (sides or top-bottom) are cropped, guarantees that image has the exact target-size
  • FitWithinFrameTargetSize = 3 – as FitWithinFrame but the edges (sides or top-bottom) are filled with transparency, guarantees that image has the exact target-size

FitWithinFrame examples

  • target-size = 1000 x 500
  • 300 x 400 ⊲ 300 x 400 (smaller)
  • 1500 x 400 ⊲ 1000 x 267 (wider)
  • 800 x 700 ⊲ 571 x 500 (taller)
  • 2000 x 600 ⊲ 1000 x 300 (biggerRatioBasedOnWidth)
  • 2000 x 1500 ⊲ 667 x 500 (biggerRatioBasedOnHeight)

FillFrame examples

  • target-size = 1000 x 500
  • 300 x 400 ⊲ 300 x 400 (smaller)
  • 1500 x 400 ⊲ 1500 x 400 (widerButNotTaller)
  • 800 x 700 ⊲ 800 x 700 (tallerButNotWider)
  • 2000 x 600 ⊲ 1667 x 500 (biggerRatioBasedOnHeight)
  • 2000 x 1500 ⊲ 1000 x 750 (biggerRatioBasedOnWidth)

FitWithinFrameTargetSize test top-left corner

  • target-size = 500 x 600
  • 500 x 300 ⊲ left = 0 top = 150 (wide)
  • 400 x 600 ⊲ left = 50 top = 0 (tall)

FillFrameTargetSize test top-left corner

  • target-size = 500 x 600
  • 700 x 600 ⊲ left = -100 top = 0 (wide)
  • 500 x 900 ⊲ left = 0 top = -150 (tall)
Example xml

<b:Uris>
   <b:ApiProductUri>
      <b:FullUrl>http://localhost:8080/VVS-public/BILD/BILD_616_5732612.jpg</b:FullUrl>
      <b:FullUrlIsSpecified>false</b:FullUrlIsSpecified>
      <b:ShortUrl>BILD_616_5732612.jpg</b:ShortUrl>
      <b:ShortUrlIsSpecified>false</b:ShortUrlIsSpecified>
      <b:Type>BILD</b:Type>
      <b:TypeIsSpecified>false</b:TypeIsSpecified>
      <b:TypeName>Bild</b:TypeName>
      <b:TypeNameIsSpecified>false</b:TypeNameIsSpecified>
      <b:Uri i:nil='true'/>
      <b:UriIsSpecified>false</b:UriIsSpecified>
   </b:ApiProductUri>
   <b:ApiProductUri>...
   <b:ApiProductUri>...
   <b:ApiProductUri>...
</b:Uris>
<b:UrisIsSpecified>false</b:UrisIsSpecified>


These fields can only be read, not updated. If the product has an assessment in Bvb (Byggvarubedömingen), the fields will contain information of the assessment.

public string BvbId { get; set; } 
public int BvbVersion { get; set; }
[Obsolete]
public ApiBvbResultType BvbResult { get; set; }
public string BvbTotalAssessment { get; set; }
public string BvbLifecycleAssessment { get; set; }
public string BvbContentAssessment { get; set; }
public string BvbCaption { get; set; }
public string BvbImage { get; set; }
public string BvbUrl { get; set; }
        

  • BvbId - Product id of the assessment of the product in Bvb
  • BvbVersion - Version of the assessment of the product in Bvb
  • BvbResult - Obsolete, replaced by BvbTotalAssessment
  • BvbTotalAssessment - The total assessment of the product in Bvb. Empty string if no total assessment exists, else one of the following values: Rekommenderas, Accepteras, Undviks
  • BvbLifecycleAssessment - The lifecycle assessment of the product in Bvb. Empty string if no lifecycle assessment exists, else one of the following values: Rekommenderas, Accepteras, Undviks
  • BvbContentAssessment - The content assessment of the product in Bvb. Empty string if no content assessment exists, else one of the following values: Rekommenderas, Accepteras, Undviks
  • BvbCaption - Text caption of the image representing the total assessment of the product in Bvb
  • BvbImage - Link to the image representing the total assessment of the product in Bvb
  • BvbUrl - Url to the product in Bvb


External numbers representing the product.

public class ApiProductExtNumber
{
    public int TypeId { get; set; }
    public bool TypeIdIsSpecified { get; set; }

    public string TypeIdentifier { get; set; } 
    public bool TypeIdentifierIsSpecified { get; set; }

    public string TypeName { get; set; } 
    public bool TypeNameIsSpecified { get; set; }

    public string Value { get; set; } 
    public bool ValueIsSpecified { get; set; }
}
        

When updating an ApiProductExtNumber

TypeIdentifier is used as key field when updating ApiProductExtNumber

The external numbers types in use can be found on reference lists page.

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

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.

Example xml

<b:ExtNumbers>
   <b:ApiProductExtNumber>
      <b:TypeId>3</b:TypeId>
      <b:TypeIdIsSpecified>false</b:TypeIdIsSpecified>
      <b:TypeIdentifier>EAN</b:TypeIdentifier>
      <b:TypeIdentifierIsSpecified>false</b:TypeIdentifierIsSpecified>
      <b:TypeName>GTIN</b:TypeName>
      <b:TypeNameIsSpecified>false</b:TypeNameIsSpecified>
      <b:Value>6430025684000</b:Value>
      <b:ValueIsSpecified>false</b:ValueIsSpecified>
   </b:ApiProductExtNumber>
   ...
</b:ExtNumbers>
<b:ExtNumbersIsSpecified>false</b:ExtNumbersIsSpecified>


The ETIM features of the product are specified in the ApiEtimInfo property.

ApiEtimInfo

NOTE! When updating any one of the ETIM features, set properties ValuesIsSpecified and EtimDatasIsSpecified to true!

public class ApiEtimInfo
{
    public string ClassIdentifier { get; set; } 
    public string ClassName { get; set; } 
    public string GroupIdentifier { get; set; } 
    public string GroupName  { get; set; } 
    public List<ApiEtimProductData> Values { get; set; }
    public bool ValuesIsSpecified { get; set; } 
}
        

ApiEtimProductData

Describes one ETIM feature on a product.

public class ApiEtimProductData
{
    public string NameSv { get; set; } 
    public string FeatureIdentifier { get; set; }  // Update key
    public bool FeatureIdentifierIsSpecified { get; set; }
    public ApiEtimFeatureType FeatureType { get; set; } 
    public bool FeatureTypeIsSpecified { get; set; }
    public List<ApiEtimValue> PossibleValues { get; set; }
    public ApiEtimUnit ApiEtimUnit Unit { get; set; }
    public string Value { get; set; } 
    public bool ValueIsSpecified { get; set; }
    public string ValueAsText { get; set; } 
}
        

Update ETIM feature by setting these fields:
Field Value
FeatureIdentifier EFxxxxxx
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!

ApiEtimFeatureType

Available ETIM feature types:

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

ApiEtimValue

The property PossibleValues on ApiEtimProductData contains a list of possible values that the feature can have. For this list to be filled in a GET request, StructuredOutputOptions.EtimShowFeaturePossibleValues must be set to true.
public class ApiEtimValue
{
    public string Identifier { get; set; }   
    public bool IdentifierIsSpecified { get; set; }
    public string Name { get; set; }  
    public bool NameIsSpecified { get; set; }
}
        

ApiEtimUnit

Describes the unit of the ETIM feature.

public class ApiEtimUnit
{
    public string Description { get; set; } 
    public bool DescriptionIsSpecified { get; set; }
    public string Identifier { get; set; } 
    public bool IdentifierIsSpecified { get; set; }
    public string Name { get; set; } 
    public bool NameIsSpecified { get; set; }
}
        
Example xml

<b:EtimDatas>
	<b:ApiEtimInfo>
		<b:ClassIdentifier>EC010980</b:ClassIdentifier>
		<b:ClassName>Cirkulationspump</b:ClassName>
		<b:GroupIdentifier>EG015260</b:GroupIdentifier>
		<b:GroupName>Tryckökning/Tryckminskning</b:GroupName>
		<b:Values>
			<b:ApiEtimProductData>
				<b:FeatureIdentifier>EF020449</b:FeatureIdentifier>
				<b:FeatureIdentifierIsSpecified>false</b:FeatureIdentifierIsSpecified>
				<b:FeatureType>Numeric</b:FeatureType>
				<b:FeatureTypeIsSpecified>false</b:FeatureTypeIsSpecified>
				<b:NameSv>Max. arbetstryck</b:NameSv>
				<b:PossibleValues i:nil='true'/>
				<b:Unit>
					<b:Description>Tryck</b:Description>
					<b:DescriptionIsSpecified>false</b:DescriptionIsSpecified>
					<b:Identifier>EU570056</b:Identifier>
					<b:IdentifierIsSpecified>false</b:IdentifierIsSpecified>
					<b:Name>bar</b:Name>
					<b:NameIsSpecified>false</b:NameIsSpecified>
				</b:Unit>
				<b:Value i:nil='true'/>
				<b:ValueAsText i:nil='true'/>
				<b:ValueIsSpecified>false</b:ValueIsSpecified>
			</b:ApiEtimProductData>
			<b:ApiEtimProductData>
				<b:FeatureIdentifier>EF003701</b:FeatureIdentifier>
				<b:FeatureIdentifierIsSpecified>false</b:FeatureIdentifierIsSpecified>
				<b:FeatureType>Alphanumeric</b:FeatureType>
				<b:FeatureTypeIsSpecified>false</b:FeatureTypeIsSpecified>
				<b:NameSv>Elanslutning</b:NameSv>
				<b:PossibleValues i:nil='true'/>
				<b:Unit i:nil='true'/>
				<b:Value>EV020300</b:Value>
				<b:ValueAsText>Anslutningsplint</b:ValueAsText>
				<b:ValueIsSpecified>false</b:ValueIsSpecified>
			</b:ApiEtimProductData>
			<b:ApiEtimProductData>...
			<b:ApiEtimProductData>...
		</b:Values>
		<b:ValuesIsSpecified>false</b:ValuesIsSpecified>
	</b:ApiEtimInfo>
</b:EtimDatas>
<b:EtimDatasIsSpecified>false</b:EtimDatasIsSpecified>

This class contains various environmental properties for the ApiProduct

ApiEnvironmentalData

    public class ApiEnvironmentalData
    {
        public bool? HasBatteridirektivet { get; set; }
        public bool HasBatteridirektivetIsSpecified { get; set; }

        public bool? HasNanomaterial  { get; set; }
        public bool HasNanomaterialIsSpecified { get; set; }

        public bool? HasVoc { get; set; }
        public bool HasVocIsSpecified { get; set; }

        public bool? HasBiocider { get; set; }
        public bool HasBiociderIsSpecified { get; set; }

        public bool? HasEkodesignDir2009125EC { get; set; }
        public bool HasEkodesignDir2009125ECIsSpecified { get; set; }

        public bool? HasRoHS { get; set; }
        public bool HasRoHSIsSpecified { get; set; }

        public string RoHSVersion { get; set; }
        public bool RoHSVersionIsSpecified { get; set; }

        public bool? HasKonfliktmineraler { get; set; }
        public bool HasKonfliktmineralerIsSpecified { get; set; }
        
        public bool? HasKonfliktGuld { get; set; }
        public bool HasKonfliktGuldIsSpecified { get; set; }
        
        public bool? HasKonfliktVolfram { get; set; }
        public bool HasKonfliktVolframIsSpecified { get; set; }
        
        public bool? HasKonfliktTenn { get; set; }
        public bool HasKonfliktTennIsSpecified { get; set; }
        
        public bool? HasKonfliktTantal { get; set; }
        public bool HasKonfliktTantalIsSpecified { get; set; }
        
        public bool? HasKonfliktKobolt { get; set; }
        public bool HasKonfliktKoboltIsSpecified { get; set; }

        public bool? HasRecyledMaterial { get; set; }
        public bool HasRecyledMaterialIsSpecified { get; set; }
        
        public List<ApiProductSVHCSubstance> SVHCSubstances { get; set; }
        public bool SVHCSubstancesIsSpecified { get; set; }

        public string EpdIdentifier { get; set; }
        public bool EpdIdentifierIsSpecified { get; set; }

        public decimal? EpdReCalculationFactor { get; set; }
        public bool EpdReCalculationFactorIsSpecified { get; set; }

        public double? PrecisionWeight { get; set; }
        public bool PrecisionWeightIsSpecified { get; set; }
    
}
        

This class contains a Substance of very high concern (SVHC) for the product. A list of SVHC substances is included in ApiEnvironmentalData.

ApiProductSVHCSubstance

    public class ApiProductSVHCSubstance
    {
	    public int Order { get; set; }
	    public bool OrderIsSpecified { get; set; }

	    public string SubstanceName { get; set; }
	    public bool SubstanceNameIsSpecified { get; set; }

	    public string CAS { get; set; }

	    public string EG { get; set; }

	    public int? BvbExternalSubstanceNameId { get; set; }

	    public int? BvbExternalSubstanceId { get; set; }
    }
        

Product identifiers
Product identifiers are used to identify products when:
  • Reading single products
  • Writing single products
  • Writing multiple products, matching the incoming ApiProduct with the target product (server side)

All classes that inherit from ApiProductIdentifierAbstractBase can be used as product identifiers.

There are two kind of identifiers:

  • Simple
  • Flexible (combines features from the simple kinds)

Se examples: GetByIdentifier

Simple identifiers

Find product by ManufacturerIdentifier and RSK-/E-number.

public class ByManufacturerAndNumber : ApiProductIdentifierAbstractBase
{
    public string ManufacturerIdentifier { get; set; }
    public int Number { get; set; }
}
Example xml

<apirequest:productIdentifier 
    i:type='params:ByManufacturerAndNumber'
    xmlns:params='Prodibas.API.V1.Parameters'
    xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
            <params:ManufacturerIdentifier>MANU616</params:ManufacturerIdentifier  >
            <params:Number>4806392</params:Number  >
</apirequest:productIdentifier>

Find product by RSK-/E-number.

Easier to use, only RSK/E-number is required. But throws exception when used for numbers which match several products. Only VVS has around 10 000 old products where this can happen. SEG has no such duplicates.

public class ByNumber : ApiProductIdentifierAbstractBase
{
    public int Number { get; set; }
}
Example xml

<apirequest:productIdentifier 
    i:type='params:ByNumber'
    xmlns:params='Prodibas.API.V1.Parameters'
    xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
            <params:Number>4806392</params:Number  >
</apirequest:productIdentifier>

Usable in cases when RSK/E-number is not available. Throws exception if it matches several products.

public class ByManufacturerAndManufacturerArticleNumber : ApiProductIdentifierAbstractBase
{
    public string ManufacturerIdentifier { get; set; }
    public string ManufacturerArticleNumber { get; set; }
}
Example xml

<apirequest:productIdentifier 
    i:type='params:ByManufacturerAndManufacturerArticleNumber'
    xmlns:params='Prodibas.API.V1.Parameters'
    xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
            <params:ManufacturerArticleNumber>vvsinfo 12345</params:ManufacturerArticleNumber  >
            <params:ManufacturerIdentifier>MANU616</params:ManufacturerIdentifier  >
</apirequest:productIdentifier>

Usable in cases where GTIN is a key.

Notes:

  • This is for match on product's GTIN, not GTINs on the (logistics) packages.
  • If you use GetSingleByIdentifier and leave the ManufacturerIdentifier empty you might get more than one hit. It will then render an exception. You should in this cases use GetByIdentifier instead.
public class ByManufacturerAndArticleGTIN : ApiProductIdentifierAbstractBase
{
    public string ManufacturerIdentifier { get; set; }
    public string GTIN { get; set; }
}
Example xml

<apirequest:productIdentifier 
    i:type='params:ByManufacturerAndArticleGTIN'
    xmlns:params='Prodibas.API.V1.Parameters'
    xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
        <params:GTIN>6430025684000</params:GTIN>
        <params:ManufacturerIdentifier>MANU616</params:ManufacturerIdentifier>
</apirequest:productIdentifier>

Flexible identifiers

Identifies the product based on the parameters available in the incoming request. Please note that prioritizing is based on which search parameters are present, not if the product is found in the database. It is possible that the first method ByManufacturerAndNumber is chosen, but the product is not found, and the service returns null for a reading request.

This is the prioritizing order:

  1. if ManufacturerIdentifier and Number are present, use ByManufacturerAndNumber
  2. if Number is present, use ByNumber
  3. if ManufacturerIdentifier and ManufacturerArticleNumber are present, use ByManufacturerAndManufacturerArticleNumber
  4. if ManufacturerIdentifier and ArticleGTIN are present, use ByManufacturerAndArticleGTIN
  5. otherwise throw exception

For read requests the ByCombinedPrioritized parameter will be converted to a simple identifier.

For write requests, first a ByCombinedPrioritized will be created based on the ApiProduct, then converted to a simple identifier.

public class ByCombinedPrioritized : ApiProductIdentifierAbstractBase
{
    public string ManufacturerIdentifier { get; set; }
    public int? Number { get; set; }
    public string ManufacturerArticleNumber { get; set; }
    public string ArticleGTIN { get; set; }
}
Example xml

<apirequest:productIdentifier 
	xmlns:params='Prodibas.API.V1.Parameters' 
	xmlns:i='http://www.w3.org/2001/XMLSchema-instance' 
	i:type='params:ByCombinedPrioritized'>
		<params:ManufacturerIdentifier>MANU616</params:ManufacturerIdentifier>
		<params:Number>6241006</params:Number>
</apirequest:productIdentifier>


Structured options

The structured options helps tweaking a query/update. They can for example be used to determine which parts of an ApiProduct to return. There are three types:

  • Structured output options. Used in GET queries.
  • Structured filter options. Used only in GetManyByIdentifiersQueued.
  • Structured input options. Used in updates.

Note that order of the options matters. If in the wrong order, the values will not be set. Check the WSDL!


Defines which parts of product information should be returned. Helps to keep better performance by avoiding unneeded database calls and network transfer.

As a parameter it is always optional. By default ExtNumbers and Uris are included.

public class StructuredOutputOptions
{
    public bool Accessories { get; set; }
    public bool ActivityLog { get; set; }
    public bool? EnvironmentalData { get; set; }
    public int? Etim { get; set; }
    public bool EtimShowFeaturePossibleValues { get; set; }
    public bool? ExtNumbers { get; set; } // default true
    public bool Packages { get; set; }
    public bool ProductGroups { get; set; }
    public int ProductGroupsVersion { get; set; } // default 1
    public bool? Uris { get; set; } // default true
}
Example xml

Vary the values in structuredOutputOptions below

 <apirequest:structuredOutputOptions>
      <outputopts:Accessories>false</outputopts:Accessories>
      <outputopts:ActivityLog>false</outputopts:ActivityLog>
      <outputopts:EnvironmentalData>false</outputopts:EnvironmentalData>      
      <outputopts:Etim>0</outputopts:Etim>
      <outputopts:EtimShowFeaturePossibleValues>false</outputopts:EtimShowFeaturePossibleValues>
      <outputopts:ExtNumbers>false</outputopts:ExtNumbers>
      <outputopts:Packages>false</outputopts:Packages>
      <outputopts:ProductGroups>false</outputopts:ProductGroups>
      <outputopts:ProductGroupsVersion>1</outputopts:ProductGroupsVersion>           
      <outputopts:ProductMini>false</outputopts:ProductMini>
      <outputopts:Serie>false</outputopts:Serie>
      <outputopts:Uris>false</outputopts:Uris>
 </apirequest:structuredOutputOptions>         

See example: GetByIdentifier

Accessories

Should Accessories be returned or not?

ActivityLog

Should ActivityLog be returned or not?

EnvironmentalData

Should EnvironmentalData be returned or not?

ExtNumbers

Should ExtNumbers be returned or not?

Packages

Should Packages be returned or not?

ProductGroups

Should ProductGroups be returned or not?

ProductGroupsVersion Introduced in 2020-R09
Version of product group that should be returned. For SEG this should always be 1 if provided. For VVS, set to 2 in order to retrieve 4-level product groups.
ProductMini Introduced in 2019-R12
Emits a ApiResultMini search result instead of full product
**NOTE 1:** This overrides ALL other output options
**NOTE 2:** This is currently only implemented in the REST-version of the API.
Serie

Obsolete. Has no effect on result.

Uris

Should Uris be returned or not?

Etim (version)

Major number of ETIM version that client side is expecting.

If null ETIM data is not returned.

Use GetEtimVersions to see the list of currently available ETIM versions.

NOTE: As of 2017-07-17 use value 1 to include ETIM data for current ETIM-version in product.

EtimShowFeaturePossibleValues Should returned ETIM data include possible values for features that have a fixed set of values? Note that the Etim output option must have a not null value for this to take effect.

Defines filters on the products returned.

As a parameter it is always optional. By default no filter is set.

public class StructuredFilterOptions
{
    public string ActiveStatus { get; set; } // default All
}

Valid values for ActiveStatus are: All, Active, Expired.

Example xml
 <apirequest:structuredFilterOptions>
      <outputopts:ActiveStatus>Active</outputopts:ActiveStatus>
 </apirequest:structuredFilterOptions>         

See example: GetManyByIdentifiersQueued

Defines some options of the incoming data format.

public class StructuredInputOptions
{
    public int? Etim { get; set; }
    public bool? IgnoreWarnings { get; set; }
}
Example xml

Vary the values in structuredInputOptions below

<structuredInputOptions
    xmlns:InputOptions='Prodibas.API.V1.Parameters.OutputOptions' 
	xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
    <InputOptions:Etim>7</InputOptions:Etim>
	<InputOptions:IgnoreWarnings>false</InputOptions:IgnoreWarnings>
</structuredInputOptions>      

Etim

Specify Etim-version Not implemented (yet)

IgnoreWarnings

Specify that some validation errors (classified as "Warnings") should be overridden when updating.

You should not overuse this feature, since the warnings are also validation errors - but are in some cases hard to avoid


Methods Download wsdl (See also Note on HTTPS under Environments)
Read and write products, both single products and big batches with queues.
Note: Some of the methods visible in the WSDL actually has no implementation, or is depreciated and thus cannot be used Read more
  • ExposeTypes
  • GetResultAsXml
  • GetManyByIdentifiersAsBmecatQueued
  • GetSingleByIdentifierAsBmecat
  • SearchAsBmecatQueued
  • UpdateManyFromBmecatQueued
  • UpdateSingleFromBmecat
  • ValidateSingleByIdentifier
  • ValidateSingleByIdentifierFromBmecat
  • ProcessQueueInternal

Direct methods

Requests that handle a single product will be processed directly.

Returns one or many products matching the identifier and to which the user has read access.

Parameters

Returns

Throws

  • InternalErrorFault if not authorized
Example Request xml Read more

<soapenv:Envelope 
	xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' 
	xmlns:apirequest='Prodibas.API.V1' 
	xmlns:outputopts='Prodibas.API.V1.Parameters.OutputOptions' 
	xmlns:requestparams='Prodibas.API.V1.Parameters'>
   <soapenv:Header/>
   <soapenv:Body>
      <apirequest:GetByIdentifier>
         <apirequest:productIdentifier 
		    i:type='params:ByNumber'
		    xmlns:params='Prodibas.API.V1.Parameters'
		    xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
            <params:Number>4806392</params:Number>
		</apirequest:productIdentifier>
         <apirequest:structuredOutputOptions>
            <outputopts:Accessories>false</outputopts:Accessories>
            <outputopts:ActivityLog>false</outputopts:ActivityLog>
            <outputopts:EnvironmentalData>false</outputopts:EnvironmentalData>
            <outputopts:Etim>0</outputopts:Etim>
            <outputopts:EtimShowFeaturePossibleValues>true</outputopts:EtimShowFeaturePossibleValues>
            <outputopts:ExtNumbers>true</outputopts:ExtNumbers>
            <outputopts:Packages>true</outputopts:Packages>
            <outputopts:ProductGroups>false</outputopts:ProductGroups>
            <outputopts:ProductGroupsVersion>1</outputopts:ProductGroupsVersion>
            <outputopts:Serie>false</outputopts:Serie>
            <outputopts:Uris>true</outputopts:Uris>
         </apirequest:structuredOutputOptions>         
         <apirequest:requestOptions>
            <requestparams:Authentication>
               <requestparams:CompanyIdentifier>MANU999</requestparams:CompanyIdentifier>
               <requestparams:Industry>VVS</requestparams:Industry>
               <requestparams:Key>DEVMANU999</requestparams:Key>
            </requestparams:Authentication>
         </apirequest:requestOptions>
      </apirequest:GetByIdentifier>
   </soapenv:Body>
</soapenv:Envelope>

Example Response xml Read more

<s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'>
   <s:Body>
      <GetByIdentifierResponse xmlns='Prodibas.API.V1'>
         <GetByIdentifierResult 
            xmlns:a='Prodibas.API.V1.Parameters' 
            xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
            <a:Data xmlns:b='Prodibas.API.V1.Model'>
               <b:ApiProduct>
			   ... (a product)
               </b:ApiProduct>
              <b:ApiProduct>
			   ... (a second product)
               </b:ApiProduct>
            </a:Data>
            <a:User xmlns:b='http://schemas.datacontract.org/2004/07/WebService.V1.Parameters'>
               <b:Email i:nil='true'/>
               <b:Id>1</b:Id>
               <b:Name>Test Testsson</b:Name>
            </a:User>
         </GetByIdentifierResult>
      </GetByIdentifierResponse>
   </s:Body>
</s:Envelope>

Returns just one products matching the identifier and to which the user has read access. Behaviour when using the parameter type ByNumber:

  • If there exists many products for the same identifier, check if one is active and return that product.
  • If there exists only one product return that product.
  • Otherwise throws an error stating how many products there are for the identifier

Parameters

Returns

Throws

  • InternalErrorFault if not authorized or too many products matching given identifier
Example Request xml Read more

<soapenv:Envelope 
	xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' 
	xmlns:apirequest='Prodibas.API.V1' 
	xmlns:outputopts='Prodibas.API.V1.Parameters.OutputOptions' 
	xmlns:requestparams='Prodibas.API.V1.Parameters'>
   <soapenv:Header/>
   <soapenv:Body>
      <apirequest:GetSingleByIdentifier>
         <apirequest:productIdentifier 
		    i:type='params:ByNumber'
		    xmlns:params='Prodibas.API.V1.Parameters'
		    xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
            <params:Number>4806392</params:Number>
		</apirequest:productIdentifier>
         <apirequest:structuredOutputOptions>
            <outputopts:Accessories>false</outputopts:Accessories>
            <outputopts:ActivityLog>false</outputopts:ActivityLog>
            <outputopts:EnvironmentalData>false</outputopts:EnvironmentalData>
            <outputopts:Etim>0</outputopts:Etim>
            <outputopts:EtimShowFeaturePossibleValues>true</outputopts:EtimShowFeaturePossibleValues>
            <outputopts:ExtNumbers>true</outputopts:ExtNumbers>
            <outputopts:Packages>true</outputopts:Packages>
            <outputopts:ProductGroups>false</outputopts:ProductGroups>
            <outputopts:ProductGroupsVersion>1</outputopts:ProductGroupsVersion>
            <outputopts:Serie>false</outputopts:Serie>
            <outputopts:Uris>true</outputopts:Uris>
         </apirequest:structuredOutputOptions>         
         <apirequest:requestOptions>
            <requestparams:Authentication>
               <requestparams:CompanyIdentifier>MANU999</requestparams:CompanyIdentifier>
               <requestparams:Industry>VVS</requestparams:Industry>
               <requestparams:Key>DEVMANU999</requestparams:Key>
            </requestparams:Authentication>
         </apirequest:requestOptions>
      </apirequest:GetSingleByIdentifier>
   </soapenv:Body>
</soapenv:Envelope>

Example Response xml Read more

<s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'>
	<s:Body>
		<GetSingleByIdentifierResponse xmlns='Prodibas.API.V1'>
			<GetSingleByIdentifierResult xmlns:a='Prodibas.API.V1.Parameters' xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
				<a:Data xmlns:b='Prodibas.API.V1.Model'>
					(a product)
				</a:Data>
				<a:User xmlns:b='http://schemas.datacontract.org/2004/07/WebService.V1.Parameters'>
					<b:Email i:nil='true'/>
					<b:Id>1</b:Id>
					<b:Name>Test Testsson</b:Name>
				</a:User>
			</GetSingleByIdentifierResult>
		</GetSingleByIdentifierResponse>
	</s:Body>
</s:Envelope>

It's only possible to update existing products.

Supply an ApiProduct in order to update it. Only properties with corresponding boolean "IsSpecified" property set to true will be updated with the supplied values. Read more on how to update specific complex properties on ApiProduct (for example Uris or Packages) here: ApiProduct.

Parameters

Returns

Throws

  • InternalErrorFault if not authorized

Note on manufacturer identifier in Product

When updating as the role manufacturer you are only authorized to update your own products.

If no value is supplied in the field Identifier in ApiProduct Manufacturer the logged in users manufacturer identity is used.

Example Request xml Read more

<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>
	<soapenv:Header></soapenv:Header>
	<soapenv:Body>
		<UpdateSingle xmlns='Prodibas.API.V1'>
			<product 
				xmlns:b='Prodibas.API.V1.Model' 
				xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
					... product properties ...
					<b:Color>blue (no update)</b:Color>
					<b:ColorIsSpecified>false</b:ColorIsSpecified>
					... product properties ...
					<b:Description>product description (update)</b:Description>
					<b:DescriptionIsSpecified>true</b:DescriptionIsSpecified>
					... product properties ...
			</product>
			<structuredInputOptions
                xmlns:InputOptions='Prodibas.API.V1.Parameters.OutputOptions' 
				xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
				<InputOptions:IgnoreWarnings>false</InputOptions:IgnoreWarnings>
			</structuredInputOptions>
            <requestOptions 
				xmlns:requestparams='Prodibas.API.V1.Parameters' 
				xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
				<requestparams:Authentication>
					<requestparams:CompanyIdentifier>MANU616</requestparams:CompanyIdentifier>
					<requestparams:Industry>VVS</requestparams:Industry>
					<requestparams:Key>DEVMANU616</requestparams:Key>
				</requestparams:Authentication>
				<requestparams:Documents i:nil='true'>
				</requestparams:Documents>
			</requestOptions>
		</UpdateSingle>
	</soapenv:Body>
</soapenv:Envelope>

Example Response xml Read more

<s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'>
	<s:Body>
		<UpdateSingleResponse xmlns='Prodibas.API.V1'>
			<UpdateSingleResult xmlns:a='Prodibas.API.V1.Model' xmlns:i='http://www.w3.org/2001/XMLSchema-instance'/>
		</UpdateSingleResponse>
	</s:Body>
</s:Envelope>


Queued methods

Requests that handle more than one product will be queued. Read more

To see if the request has been processed and if the result is ready either use the Pingback parameter or use appropriate Get result operation. Queuing enables the API to process batches greater than 30 000 products. There is no upper limit set. All operations that use queuing are marked with "Queued" in their name.

The main use case is for administrative applications. Extensive use may be throttled or handled in separate contracts.

The Get result operations either returns the result or throws WorkNotDoneFault which the client is supposed to catch. The exception also provides the time interval when the client should recheck.

C#-SDK.

C#-SDK takes care of queue and polling of GetResult operations. SDK provides synchronous methods.

A many version of GetByIdentifier. Input is a list of product identifiers.

Products not found are not reported.
If there are duplicate products all products are returned.

Parameters

Returns

Throws

  • InternalErrorFault if not authorized
Example Request xml Read more

<soapenv:Envelope 
xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' 
xmlns:apirequest='Prodibas.API.V1' 
xmlns:outputopts='Prodibas.API.V1.Parameters.OutputOptions' 
xmlns:filteropts='Prodibas.API.V1.Parameters.FilterOptions' 
xmlns:requestparams='Prodibas.API.V1.Parameters'>
<soapenv:Header/>
<soapenv:Body>
	<apirequest:GetManyByIdentifiersQueued>
		<apirequest:productIdentifiers>
		<requestparams:ApiProductIdentifierAbstractBase 
		i:type='params:ByNumber'
		xmlns:params='Prodibas.API.V1.Parameters'
		xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
			<params:Number>5853172</params:Number>
	</requestparams:ApiProductIdentifierAbstractBase>
	</apirequest:productIdentifiers>
	<apirequest:structuredOutputOptions>
		<outputopts:Accessories>false</outputopts:Accessories>
		<outputopts:ActivityLog>false</outputopts:ActivityLog>
        <outputopts:EnvironmentalData>false</outputopts:EnvironmentalData>
		<outputopts:Etim>0</outputopts:Etim>
		<outputopts:EtimShowFeaturePossibleValues>true</outputopts:EtimShowFeaturePossibleValues>
		<outputopts:ExtNumbers>true</outputopts:ExtNumbers>
		<outputopts:Packages>true</outputopts:Packages>
		<outputopts:ProductGroups>false</outputopts:ProductGroups>
		<outputopts:ProductGroupsVersion>1</outputopts:ProductGroupsVersion>
		<outputopts:Serie>false</outputopts:Serie>
		<outputopts:Uris>true</outputopts:Uris>
	</apirequest:structuredOutputOptions>
    <apirequest:structuredFilterOptions>
        <filteropts:ActiveStatus>Active</filteropts:ActiveStatus>
    </apirequest:structuredFilterOptions>
	<apirequest:queuedRequestOptions>
		<requestparams:Authentication>
			<requestparams:CompanyIdentifier>MANU999</requestparams:CompanyIdentifier>
			<requestparams:Industry>VVS</requestparams:Industry>
			<requestparams:Key>DEVMANU999</requestparams:Key>
		</requestparams:Authentication>
		<requestparams:PingBackUrl>https://myserver.mydomain.com?MyownId=ABC123&amp;QueueId={QueueId}</requestparams:PingBackUrl>
	</apirequest:queuedRequestOptions>
	</apirequest:GetManyByIdentifiersQueued>
</soapenv:Body>
</soapenv:Envelope>

Example Response xml Read more

<s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'>
	<s:Body>
		<GetManyByIdentifiersQueuedResponse xmlns='Prodibas.API.V1'>
			<GetManyByIdentifiersQueuedResult xmlns:a='Prodibas.API.V1.Parameters' xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
				<a:QueueId>67627</a:QueueId>
			</GetManyByIdentifiersQueuedResult>
		</GetManyByIdentifiersQueuedResponse>
	</s:Body>
</s:Envelope>

Search for products using search parameters.

Parameters

Returns

Throws

  • InternalErrorFault if not authorized
Example xml request Read more

<s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'>
  <s:Header/>
  <s:Body>
    <SearchQueued xmlns='Prodibas.API.V1'>
      <searchProductsParameters 
      	xmlns:prod1='Prodibas.API.V1.Parameters' 
      	xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
        <prod1:ActiveStatus>All</prod1:ActiveStatus>
 	   <prod1:ArticleNumberMax>9999999</prod1:ArticleNumberMax>
	   <prod1:ArticleNumberMin>0000000</prod1:ArticleNumberMin>
        <prod1:LastChangedOptionSearchGreaterThanOnly>true</prod1:LastChangedOptionSearchGreaterThanOnly>
        <prod1:TakeApproximately>10</prod1:TakeApproximately>
      </searchProductsParameters>
      <structuredOutputOptions 
      	xmlns:prod1='Prodibas.API.V1.Parameters.OutputOptions' 
      	xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
        <prod1:Accessories>false</prod1:Accessories>
        <prod1:ActivityLog>false</prod1:ActivityLog>
        <prod1:EnvironmentalData>false</prod1:EnvironmentalData>
        <prod1:Etim>0</prod1:Etim>
        <prod1:EtimShowFeaturePossibleValues>false</prod1:EtimShowFeaturePossibleValues>
        <prod1:ExtNumbers>false</prod1:ExtNumbers>
        <prod1:Packages>false</prod1:Packages>
        <prod1:ProductGroups>false</prod1:ProductGroups>
        <prod1:Serie>false</prod1:Serie>
        <prod1:Uris>false</prod1:Uris>
      </structuredOutputOptions>
      <queuedRequestOptions 
      	xmlns:prod1='Prodibas.API.V1.Parameters' 
      	xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
			<prod1:Authentication>
			<prod1:CompanyIdentifier>MANU999</prod1:CompanyIdentifier>
			<prod1:Industry>VVS</prod1:Industry>
			<prod1:Key>DEVMANU999</prod1:Key>
			</prod1:Authentication>
		   <prod1:PingBackUrl>
			http://localhost:49673/api/
			Test/PingbackTest?message=MANU999-Search-Prodnummer-QueueId={QueueId}
			-BLABLA-QueueId2={QueueId}
		   </prod1:PingBackUrl>     
      </queuedRequestOptions>
    </SearchQueued>
  </s:Body>
</s:Envelope>


Example xml response Read more

<s:Envelope 
    xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'>
   <s:Body>
      <SearchQueuedResponse 
           xmlns='Prodibas.API.V1'>
         <SearchQueuedResult 
            xmlns:a='Prodibas.API.V1.Parameters' 
            xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
            <a:QueueId>60814</a:QueueId>
         </SearchQueuedResult>
      </SearchQueuedResponse>
   </s:Body>
</s:Envelope>

It's only possible to update existing products.

Supply a list of ApiProduct in order to update. Only properties with IsSpecified set to true will be updated with the supplied values. Read more on how to update specific complex properties on ApiProduct (for example Uris or Packages) here: ApiProduct.

Parameters

Returns

Throws

  • InternalErrorFault if not authorized
Example Request xml Read more

<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>
	<soapenv:Header></soapenv:Header>
	<soapenv:Body>
		<UpdateManyQueued xmlns='Prodibas.API.V1'>
			<products 
				xmlns:b='Prodibas.API.V1.Model' 
				xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
					<b:ApiProduct>
					... product properties ...
					<b:Color>blue (no update)</b:Color>
					<b:ColorIsSpecified>false</b:ColorIsSpecified>
					... product properties ...
					<b:Description>product description (update)</b:Description>
					<b:DescriptionIsSpecified>true</b:DescriptionIsSpecified>
					... product properties ...
					</b:ApiProduct>
					(more products...)
			</products>
			<structuredInputOptions
                xmlns:InputOptions='Prodibas.API.V1.Parameters.OutputOptions' 
				xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
				<InputOptions:IgnoreWarnings>false</InputOptions:IgnoreWarnings>
			</structuredInputOptions>
			<queuedRequestOptions 
				xmlns:requestparams='Prodibas.API.V1.Parameters' 
				xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
				<requestparams:Authentication>
					<requestparams:CompanyIdentifier>MANU999</requestparams:CompanyIdentifier>
					<requestparams:Industry>VVS</requestparams:Industry>
					<requestparams:Key>DEVMANU999</requestparams:Key>
				</requestparams:Authentication>
				<requestparams:Documents i:nil='true'>
				</requestparams:Documents>
				<requestparams:PingBackUrl>https://myserver.mydomain.com?MyownId=ABC123&amp;QueueId={QueueId}</requestparams:PingBackUrl>
			</queuedRequestOptions>
		</UpdateManyQueued>
	</soapenv:Body>
</soapenv:Envelope>

Example Response xml Read more

<s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'>
	<s:Body>
		<UpdateManyQueuedResponse xmlns='Prodibas.API.V1'>
			<UpdateManyQueuedResult xmlns:a='Prodibas.API.V1.Parameters' xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
				<a:QueueId>67631</a:QueueId>
			</UpdateManyQueuedResult>
		</UpdateManyQueuedResponse>
	</s:Body>
</s:Envelope>


Get result

These methods provide the result of queued work, when the work has been processed. Read more

  • Use GetResult to get result of a queued get request.
  • Use GetUpdateResult to get result of a queued update request.

If the work is not ready, these throw WorkNotReadyFault which the client is supposed to catch. The fault also provides the time interval when the client should recheck.

This method provide the result of queued work, when the work has been processed.

If the work is not ready, WorkNotReadyFault is thrown.

Parameters

  • required int queueId
  • required ApiRequest requestOptions

Returns

Throws

  • InternalErrorFault if not authorized
  • WorkNotReadyFault if result is not ready. The fault also provides the time interval when the client should recheck.
  • SevereDataFault if there is an internal error while processing the result. For certain transient errors the processing will be retried a fixed number of times.
  • WorkNotProcessedFault if result has not successfully been processed and retry count has been exceeded (probably due to SQL-timeout or deadlock).
Example request xml Read more

<soapenv:Envelope 
    xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' 
    xmlns:prod='Prodibas.API.V1' 
    xmlns:prod1='Prodibas.API.V1.Parameters'>
   <soapenv:Header/>
   <soapenv:Body>
      <prod:GetResult>
         <prod:queueId>63768</prod:queueId>
         <prod:requestOptions>
            <prod1:Authentication>
			<prod1:CompanyIdentifier>MANU999</prod1:CompanyIdentifier>
			<prod1:Industry>VVS</prod1:Industry>
			<prod1:Key>DEVMANU999</prod1:Key>
            </prod1:Authentication>
         </prod:requestOptions>
      </prod:GetResult>
   </soapenv:Body>
</soapenv:Envelope>

Example response xml Read more

<s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'>
	<s:Body>
		<GetResultResponse xmlns='Prodibas.API.V1'>
			<GetResultResult 
				xmlns:a='Prodibas.API.V1.Parameters' 
				xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
				<a:Data xmlns:b='Prodibas.API.V1.Model'>
					<b:ApiProduct>
					... (a product)
					</b:ApiProduct>
					<b:ApiProduct>
					... (a second product)
					</b:ApiProduct>
				</a:Data>
				<a:User i:nil='true' 
					xmlns:b='http://schemas.datacontract.org/2004/07/WebService.V1.Parameters'/>
			</GetResultResult>
		</GetResultResponse>
	</s:Body>
</s:Envelope>

Used for getting the feedback of how update/work batch went. Can be used for creating a report for the end-user.

Parameters

  • required int queueId
  • required ApiRequest requestOptions

Returns

Throws

  • InternalErrorFault if not authorized
  • WorkNotReadyFault if result is not ready. The fault also provides the time interval when the client should recheck.
  • SevereDataFault if there is an internal error while processing the result. For certain transient errors the processing will be retried a fixed number of times.
  • WorkNotProcessedFault if result has not successfully been processed and retry count has been exceeded (probably due to SQL-timeout or deadlock).
Example request xml Read more

<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:prod='Prodibas.API.V1' xmlns:prod1='Prodibas.API.V1.Parameters'>
	<soapenv:Header/>
	<soapenv:Body>
		<prod:GetUpdateResult>
			<prod:queueId>67638</prod:queueId>
			<prod:requestOptions>
				<prod1:Authentication>
					<prod1:CompanyIdentifier>MANU999</prod1:CompanyIdentifier>
					<prod1:Industry>VVS</prod1:Industry>
					<prod1:Key>DEVMANU999</prod1:Key>
				</prod1:Authentication>
			</prod:requestOptions>
		</prod:GetUpdateResult>
	</soapenv:Body>
</soapenv:Envelope>

Example response xml Read more

<s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'>
	<s:Body>
		<GetUpdateResultResponse xmlns='Prodibas.API.V1'>
			<GetUpdateResultResult xmlns:a='Prodibas.API.V1.Parameters' xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
				<a:Data xmlns:b='Prodibas.API.V1.Model'>
					<b:ApiModelValidationError>
						<b:Field i:nil='true'/>
						<b:Message>Product (Number) 6241006 ETIM class identifier=EC1010 does not exist.</b:Message>
					</b:ApiModelValidationError>
				</a:Data>
				<a:User i:nil='true' xmlns:b='http://schemas.datacontract.org/2004/07/WebService.V1.Parameters'/>
			</GetUpdateResultResult>
		</GetUpdateResultResponse>
	</s:Body>
</s:Envelope>


Search products parameters

The search parameters are used in search queries to find product from different criteria.

Note that order of the parameters matters. If in the wrong order, the values will not be set. Check the WSDL!

Search methods:


Provide at least one of the following (parameters can be combined):

  • ManufacturerIdentifier
  • ProductGroupIdentifier OR ProductGroupId
  • Name
  • ArticleNumberMin AND ArticleNumberMax
  • LastChanged

public class SearchProductsParameters
{
    public ApiActiveStatusEnum? ActiveStatus { get; set; } // default ApiActiveStatusEnum.All
    public int? ArticleNumberMax { get; set; }
    public int? ArticleNumberMin { get; set; }
    public string EtimClassIdentifier { get; set; }
    public DateTime? ExpiryDateFrom { get; set; }
    public DateTime? ExpiryDateTo   { get; set; }
    public ApiProductInfoLevelType? InfoLevel { get; set; }
    public DateTime? LastChanged { get; set; }
    public string ManufacturerIdentifier { get; set; }
    public string Name { get; set; } 
    public int? ProductGroupId  { get; set; }           
    public string ProductGroupIdentifier { get; set; } 
    public DateTime? RegistrationDateFrom { get; set; }
    public DateTime? RegistrationDateTo { get; set; }
    public int? TakeApproximately { get; set; }
    public bool LastChangedOptionSearchGreaterThanOnly { get; set; }
}
public enum ApiActiveStatusEnum
{
    Expired = -1,
    All = 0,
    Active = 1
}
public enum ApiProductInfoLevelType
{
    Unknown = 0,
    ActiveNumber = 1,
    GtinEanNumber = 3,
    EnvironmentDocs = 5,
    NameAndProductPicture = 17,
    Package1 = 18
}

Date ranges from and to

For these parameters:

  • ExpiryDateFrom
  • ExpiryDateTo
  • RegistrationDateFrom
  • RegistrationDateTo

The following rules apply:

The From dates can be set with the time component to zero values. Like so: "2009-03-02T00:00:00"

The To dates can be set with the time component to values greater than zero. Like so: "2009-03-02T23:59:59" If the time part is all zeroes, it is set to the max value for that day, that is the last millisecond.

TakeApproximately

Parameter TakeApproximately is used for splitting up huge search results into batches. The batches are based on products' ModifiedAt date. The client can continue to use the same pattern regularly for getting product updates.

If the parameter TakeApproximately is present:

  • the result is sorted by product.ModifiedAt (ascending)
  • guaranteed that all products with the same ModifiedAt are in the same batch (therefore batch size may be greater than expected, but no more than five times as big as the defined batch size)

The client is encouraged to use a progress indicator that points out ModifiedAt of the latest updated product.
After processing the returned products, the caller can forward it's progress indicator to products.Max(_=>_.ModifiedAt).
The progress indicator should be used as a parameter in the next API call as LastChanged.
NOTE! Remember to add 1ms, otherwise the same products will be returned.

Using parameter LastChangedOptionSearchGreaterThanOnly

  • Set LastChangedOptionSearchGreaterThanOnly to TRUE to search for products with ModifiedAt greater than the value in LastChanged.
  • Setting this to TRUE permits the client to search for Products down to milliseconds.
  • Default value for this is FALSE which tells the SearchQueued to search for ModifiedAt greater than or equal the value in LastChanged.
This was added due to a restriction in SQL-server datetime precision for milliseconds in DateTime fields.

The ModifiedAt can be set with the milliseconds component. Like so: "2009-03-02T23:59:59.001".

The returned batch should never exceed 20 000 products.

ProductGroupId and ProductGroupIdentifier

Either search by ProductGroupId or ProductGroupIdentifier.
Product groups can be retrieved with the method GetProductGroups in Global Data Api.

Example xml

<searchProductsParameters 
xmlns:params='Prodibas.API.V1.Parameters' 
xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
	<params:ActiveStatus>Active</params:ActiveStatus>
	<params:LastChanged>2021-01-14T17:45:03.787</params:LastChanged>
	<params:LastChangedOptionSearchGreaterThanOnly>true</params:LastChangedOptionSearchGreaterThanOnly>
	<params:ManufacturerIdentifier>MANU616</params:ManufacturerIdentifier>
	<params:TakeApproximately>10</params:TakeApproximately>
</searchProductsParameters>