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>MANU616</requestparams:CompanyIdentifier>
       <requestparams:Industry>VVS</requestparams:Industry>
       <requestparams:Key>DEVMANU616</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.V2' 
    xmlns:outputopts='Prodibas.API.V2.Parameters.OutputOptions' 
    xmlns:requestparams='Prodibas.API.V2.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>MANU616</requestparams:CompanyIdentifier>
       <requestparams:Industry>VVS</requestparams:Industry>
       <requestparams:Key>DEVMANU616</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.V2' 
	xmlns:requestparams='Prodibas.API.V2.Parameters'
	xmlns:outputopts='Prodibas.API.V2.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>MANU616</requestparams:CompanyIdentifier>
		<requestparams:Industry>VVS</requestparams:Industry>
		<requestparams:Key>DEVMANU616</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.V2'>
			<product xmlns:a='Prodibas.API.V2.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.V2.Parameters.OutputOptions' i:nil='true' xmlns:i='http://www.w3.org/2001/XMLSchema-instance'></structuredInputOptions>
			<requestOptions xmlns:a='Prodibas.API.V2.Parameters' xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
				<a:Authentication>
					<a:CompanyIdentifier>MANU616</a:CompanyIdentifier>
					<a:Industry>VVS</a:Industry>
					<a:Key>DEVMANU616</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.V2.Parameters'
			xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
				<a:Data xmlns:b='Prodibas.API.V2.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>

ApiResponseWithMetaData is the same as ApiResponse, but also includes metadata about the response returned. Used by GetSearchResult in order to retrieve pagination metadata.

public class ApiResponseWithMetaDataV2<T> : ApiResponseV2<T>
{
    public ApiMetaData MetaData { get; set; }
}

public class ApiMetaData
{
    public int TotalCount { get; set; }
    public int Count { get; set; } 
    public int? Next { get; set; }
}

ApiMetaData
  • TotalCount. Total number of objects in result set
  • Count. Number of objects in this response
  • Next. Next page in result set, null if no more pages

For example, a response could have the following signature:

Example xml

<s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'>
  <s:Body>
    <GetSearchResultResponse xmlns='Prodibas.API.V2'>
        <GetSearchResultResult 
         xmlns:a='Prodibas.API.V2.Parameters' 
         xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
          <a:Data xmlns:b='Prodibas.API.V2.Model'>
            <b:ApiProduct>
            ... (a product)
            </b:ApiProduct>
            <b:ApiProduct>
            ... (a second product)
            </b:ApiProduct>
            ...
          </a:Data>
          <a:User i:nil='true' />
          <a:MetaData>
            <a:Count>100</a:Count>
            <a:Next>500</a:Next>
            <a:TotalCount>1133242</a:TotalCount>
          </a:MetaData>
        </GetResultResult>
    </GetResultResponse>
  </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.V2'> (example method)
			<GetManyByIdentifiersQueuedResult 
			xmlns:a='Prodibas.API.V2.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.V2'> (example method)
			<UpdateSingleResult xmlns:a='Prodibas.API.V2.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.

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 Description { get; set; } 
    public string Design { 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 string InfoLevel { get; set; }
    public string 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 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 string Number { 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 string 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 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 string Bk04Code { get; set; }
    public string BsabCode { 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 BvbId { get; set; }
    public int? BvbVersion { 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 UnNumber { get; set; }
    public DateTime? PublishedAfterWholesaler { get; set; }
    public ApiEnvironmentalData EnvironmentalData { get; set; } 
    public bool? HasValidationErrors { get; set; }
    public string NameLongSvLong { get; set; } 
    public string StatisticGroup { get; set; }
}
Example xml

<b:ActivityLogs i:nil='true'/>
<b:ApprovedAt>2013-09-25T00:00:00</b:ApprovedAt>
<b:ArticleAccessories i:nil='true'/>
<b:ArticleAccessoriesIsSpecified>false</b:ArticleAccessoriesIsSpecified>
<b:ArticleAccessoryFor i:nil='true'/>
<b:ArticleAccessoryForIsSpecified>false</b:ArticleAccessoryForIsSpecified>
<b:Bk04Code>20201</b:Bk04Code>
<b:Bk04CodeIsSpecified>false</b:Bk04CodeIsSpecified>
<b:BsabCode>PB-.5215</b:BsabCode>
<b:BsabCodeIsSpecified>false</b:BsabCodeIsSpecified>
<b:BulletText>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</b:BulletText>
<b:BulletTextIsSpecified>false</b:BulletTextIsSpecified>
<b:BvbCaption/>
<b:BvbCaptionIsSpecified>false</b:BvbCaptionIsSpecified>
<b:BvbContentAssessment/>
<b:BvbContentAssessmentIsSpecified>false</b:BvbContentAssessmentIsSpecified>
<b:BvbId/>
<b:BvbIdIsSpecified>false</b:BvbIdIsSpecified>
<b:BvbImage/>
<b:BvbImageIsSpecified>false</b:BvbImageIsSpecified>
<b:BvbLifecycleAssessment/>
<b:BvbLifecycleAssessmentIsSpecified>false</b:BvbLifecycleAssessmentIsSpecified>
<b:BvbTotalAssessment/>
<b:BvbTotalAssessmentIsSpecified>false</b:BvbTotalAssessmentIsSpecified>
<b:BvbUrl/>
<b:BvbUrlIsSpecified>false</b:BvbUrlIsSpecified>
<b:BvbVersion>0</b:BvbVersion>
<b:BvbVersionIsSpecified>false</b:BvbVersionIsSpecified>
<b:Color>blå 1824</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:Description>integrerad värmepump</b:Description>
<b:DescriptionEn/>
<b:DescriptionEnIsSpecified>false</b:DescriptionEnIsSpecified>
<b:DescriptionIsSpecified>false</b:DescriptionIsSpecified>
<b:Design>emaljerad beredare</b:Design>
<b:DesignIsSpecified>false</b:DesignIsSpecified>
<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>EC011316</b:EtimClassIdentifier>
<b:EtimClassIdentifierIsSpecified>false</b:EtimClassIdentifierIsSpecified>
<b:EtimDatas i:nil='true'/>
<b:EtimDatasIsSpecified>false</b:EtimDatasIsSpecified>
<b:EtimEnrichment>0.085714</b:EtimEnrichment>
<b:ExportBan i:nil='true'/>
<b:ExportBanIsSpecified>false</b:ExportBanIsSpecified>
<b:ExtNumbers i:nil='true'/>
<b:ExtNumbersIsSpecified>false</b:ExtNumbersIsSpecified>
<b:FrostSensible i:nil='true'/>
<b:FrostSensibleIsSpecified>false</b:FrostSensibleIsSpecified>
<b:Function>för tappvarmvatten</b:Function>
<b:FunctionIsSpecified>false</b:FunctionIsSpecified>
<b:GroupingWord>Prodibas</b:GroupingWord>
<b:GroupingWordIsSpecified>false</b:GroupingWordIsSpecified>
<b:HasCEMark>false</b:HasCEMark>
<b:HasCEMarkIsSpecified>false</b:HasCEMarkIsSpecified>
<b:HasValidationErrors>false</b:HasValidationErrors>
<b:Id>1017160</b:Id>
<b:IdIsSpecified>false</b:IdIsSpecified>
<b:IndustrySpecific i:type='b:IndustrySpecificVVS'>
  <b:Power>1200/1800W 230V 16A</b:Power>
  <b:PowerIsSpecified>false</b:PowerIsSpecified>
  <b:Pressure>max 6bar</b:Pressure>
  <b:PressureIsSpecified>false</b:PressureIsSpecified>
  <b:Size>287l, 661x720x1935mm (ØxDxH)</b:Size>
  <b:SizeIsSpecified>false</b:SizeIsSpecified>
  <b:Standard>AFS1994:4 8§</b:Standard>
  <b:StandardIsSpecified>false</b:StandardIsSpecified>
</b:IndustrySpecific>
<b:IndustrySpecificIsSpecified>false</b:IndustrySpecificIsSpecified>
<b:InfoLevel>GtinEanNumber</b:InfoLevel>
<b:IsNordicPolymark>false</b:IsNordicPolymark>
<b:IsNordicPolymarkIsSpecified>false</b:IsNordicPolymarkIsSpecified>
<b:IsSafeWater>false</b:IsSafeWater>
<b:IsSafeWaterIsSpecified>false</b:IsSafeWaterIsSpecified>
<b:IsWholesalerApproved>false</b:IsWholesalerApproved>
<b:Manufacturer>
  <b:Id>616</b:Id>
  <b:Identifier>MANU616</b:Identifier>
  <b:Name>Gästföretaget 123</b:Name>
</b:Manufacturer>
<b:ManufacturerIsSpecified>false</b:ManufacturerIsSpecified>
<b:ManufacturerTypeCode/>
<b:ManufacturerTypeCodeIsSpecified>false</b:ManufacturerTypeCodeIsSpecified>
<b:Material>stål/flermaterial</b:Material>
<b:MaterialIsSpecified>false</b:MaterialIsSpecified>
<b:ModifiedAt>2021-04-23T15:11:28.243</b:ModifiedAt>
<b:NameEn>TEST WITH IMAGE 001</b:NameEn>
<b:NameEnIsSpecified>false</b:NameEnIsSpecified>
<b:NameLongEn/>
<b:NameLongEnIsSpecified>false</b:NameLongEnIsSpecified>
<b:NameLongSv>Värmepump TEST SOAPUI 1</b:NameLongSv>
<b:NameLongSvIsSpecified>false</b:NameLongSvIsSpecified>
<b:NameSv>ACV Glass HP 300 C</b:NameSv>
<b:NameSvIsSpecified>false</b:NameSvIsSpecified>
<b:NameLongSvLong>Värmepump TEST SOAPUI 1 Lång text</b:NameLongSvLong>
<b:NameLongSvLongIsSpecified>false</b:NameLongSvLongIsSpecified>
<b:NordicPolymarkId/>
<b:NordicPolymarkIdIsSpecified>false</b:NordicPolymarkIdIsSpecified>
<b:Number>6241006</b:Number>
<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>PM616</b:ProductModel>
<b:ProductModelIsSpecified>false</b:ProductModelIsSpecified>
<b:ProductTypeName>Testartikel (Värmepump)</b:ProductTypeName>
<b:ProductTypeNameIsSpecified>false</b:ProductTypeNameIsSpecified>
<b:PublishedAfter>2020-11-24T00:00:00</b:PublishedAfter>
<b:PublishedAfterIsSpecified>false</b:PublishedAfterIsSpecified>
<b:PublishedAfterWholesaler i:nil='true'/>
<b:PublishedAfterWholesalerIsSpecified>false</b:PublishedAfterWholesalerIsSpecified>
<b:ReachVersionOfCandidateList i:nil='true'/>
<b:ReachVersionOfCandidateListIsSpecified>false</b:ReachVersionOfCandidateListIsSpecified>
<b:ReplacedByNumber i:nil='true'/>
<b:ReplacedByNumberIsSpecified>false</b:ReplacedByNumberIsSpecified>
<b:ReplacedByNumberStr/>
<b:SafeWaterIdentifier/>
<b:SafeWaterIdentifierIsSpecified>false</b:SafeWaterIdentifierIsSpecified>
<b:SafeWaterVersion/>
<b:SafeWaterVersionIsSpecified>false</b:SafeWaterVersionIsSpecified>
<b:SeriesName>Prodibas</b:SeriesName>
<b:SeriesNameIsSpecified>false</b:SeriesNameIsSpecified>
<b:StorageRequirement>FrostProof</b:StorageRequirement>
<b:StorageRequirementIsSpecified>false</b:StorageRequirementIsSpecified>
<b:Surface>polypropylenhölje</b:Surface>
<b:SurfaceIsSpecified>false</b:SurfaceIsSpecified>
<b:Trademark/>
<b:TrademarkIsSpecified>false</b:TrademarkIsSpecified>
<b:UnNumber/>
<b:UnNumberIsSpecified>false</b:UnNumberIsSpecified>
<b:Unit>M</b:Unit>
<b:UnitIsSpecified>false</b:UnitIsSpecified>
<b:Uris i:nil='true'/>
<b:UrisIsSpecified>false</b:UrisIsSpecified>
<b:Weight>9999.1</b:Weight>
<b:WeightIsSpecified>false</b:WeightIsSpecified>
<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; }
}
        
Example xml
        
<b:Manufacturer>
	<b:Id>616</b:Id>
	<b:Identifier>MANU616</b:Identifier>
	<b:Name>Gästföretaget</b:Name>
</b:Manufacturer>
        
        
public class ApiProductPackage
{

    public decimal Count { get; set; } 
    public string EAN { get; set; } 
    public int Height { get; set; }
    public int Length { get; set; }
    public int Level  { get; set; }
    public int LevelStr  { get; set; }
    public long? PackagingFunctionId  { get; set; }
    public long? PalletTypeId  { get; set; }
    public int TargetCount { get; set; }
    public string TargetEAN { get; set; } 
    public string TypeId  { get; set; }
    public decimal Weight { get; set; }
    public int Width { get; set; }
}
        

Key field for package - Level

Use the field Level to set the package level with the following values:

  • 1 = BAS
  • 2 = MELLAN
  • 3 = MELLAN2
  • 4 = TOPP

Adding a package

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

Enabling changes to package

Note: The fields TypeId, TypeIdIsSpecified, Level, LevelIsSpecified, and PackagesIsSpecified must be set for any changes of a ProductPackage to have effect.

Delete a package

For deletion of a ProductPackage, set TypeId to '0'

Example xml

<b:Packages>
    <b:ApiProductPackage>
     <b:Count>1.000</b:Count>
     <b:CountIsSpecified>false</b:CountIsSpecified>
     <b:EAN/>
     <b:EANIsSpecified>false</b:EANIsSpecified>
     <b:Height>25</b:Height>
     <b:HeightIsSpecified>false</b:HeightIsSpecified>
     <b:Length>25</b:Length>
     <b:LengthIsSpecified>true</b:LengthIsSpecified>
     <b:Level>4</b:Level>
     <b:LevelIsSpecified>false</b:LevelIsSpecified>
     <b:LevelStr>TOPP</b:LevelStr>
     <b:PackagingFunctionId>3</b:PackagingFunctionId>
     <b:PackagingFunctionIdIsSpecified>false</b:PackagingFunctionIdIsSpecified>
     <b:PalletTypeId>6</b:PalletTypeId>
     <b:PalletTypeIdIsSpecified>true</b:PalletTypeIdIsSpecified>
     <b:TargetCount>0</b:TargetCount>
     <b:TargetCountIsSpecified>false</b:TargetCountIsSpecified>
     <b:TargetEAN/>
     <b:TargetEANIsSpecified>false</b:TargetEANIsSpecified>
     <b:TypeId>BX</b:TypeId>
     <b:TypeIdIsSpecified>true</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>true</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 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 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: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

 <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

 <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 string ShortUrl { get; set; } 

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

    public string TypeName { 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:ShortUrl>BILD_616_5732612.jpg</b:ShortUrl>
      <b:Type>BILD</b:Type>
      <b:TypeIsSpecified>false</b:TypeIsSpecified>
      <b:TypeName>Bild</b:TypeName>
      <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; }
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
  • 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 string TypeIdentifier { get; set; } 
    public bool TypeIdentifierIsSpecified { get; set; }
    public string TypeName { 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 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:TypeIdentifier>EAN</b:TypeIdentifier>
      <b:TypeIdentifierIsSpecified>false</b:TypeIdentifierIsSpecified>
      <b:TypeName>GTIN</b:TypeName>
      <b:Value>6430025684000</b:Value>
      <b:ValueIsSpecified>false</b:ValueIsSpecified>
   </b:ApiProductExtNumber>
   ...
</b:ExtNumbers>
<b:ExtNumbersIsSpecified>false</b:ExtNumbersIsSpecified>


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

ApiEtimInfo

NOTE! When updating any one of the ETIM features, set properties FeaturesIsSpecified 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> Features { get; set; }
    public bool FeaturesIsSpecified { 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 string FeatureType { 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!

FeatureType

Available ETIM feature types are None, Alphanumeric, Numeric, Logical or NumericRange. They can also be found here: GetEtimFeatureTypes

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 string Name { get; set; }  
}
        

ApiEtimUnit

Describes the unit of the ETIM feature.

public class ApiEtimUnit
{
    public string Description { get; set; } 
    public string Identifier { get; set; } 
    public string Name { 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:Features>
			<b:ApiEtimProductData>
				<b:FeatureIdentifier>EF020449</b:FeatureIdentifier>
				<b:FeatureIdentifierIsSpecified>false</b:FeatureIdentifierIsSpecified>
				<b:FeatureType>Numeric</b:FeatureType>
				<b:NameSv>Max. arbetstryck</b:NameSv>
				<b:PossibleValues i:nil='true'/>
				<b:Unit>
					<b:Description>Tryck</b:Description>
					<b:Identifier>EU570056</b:Identifier>
					<b:Name>bar</b:Name>
				</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: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:Features>
		<b:FeaturesIsSpecified>false</b:FeaturesIsSpecified>
	</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; }
    }
        

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.V2.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.V2.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.V2.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.V2.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.V2.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: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? Default true.

Packages

Should Packages be returned or not?

ProductGroups

Should ProductGroups be returned or not?

ProductGroupsVersion 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.
Uris

Should Uris be returned or not? Default true.

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.V2.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 validationerrors (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

Currently, no such errors are defined, but will in near future.

A list will then be provided


Methods Download wsdl
Read and write products, both single products and big batches with queues.
Depreciated methods has been removed from WSDL in this version 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:prod='Prodibas.API.V2' 
  xmlns:prod1='Prodibas.API.V2.Parameters.OutputOptions' 
  xmlns:prod2='Prodibas.API.V2.Parameters'>
   <soapenv:Header/>
   <soapenv:Body>
      <prod:GetByIdentifier>
         <prod:productIdentifier 
          i:type='params1:ByNumber' 
         	xmlns:params1='Prodibas.API.V2.Parameters' 
         	xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
            <params1:Number>6241006</params1:Number>
         </prod:productIdentifier>
         <prod:structuredOutputOptions>
            <prod1:Etim>1</prod1:Etim>
         </prod:structuredOutputOptions>
         <prod:requestOptions>
            <prod2:Authentication>
               <prod2:CompanyIdentifier>MANU616</prod2:CompanyIdentifier>
               <prod2:Industry>VVS</prod2:Industry>
               <prod2:Key>DEVMANU616</prod2:Key>
            </prod2:Authentication>
         </prod:requestOptions>
      </prod: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.V2'>
         <GetByIdentifierResult 
          xmlns:a='Prodibas.API.V2.Parameters' 
          xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
            <a:Data xmlns:b='Prodibas.API.V2.Model'>
               <b:ApiProduct>
                  ... (a product)
               </b:ApiProduct>
               <b:ApiProduct>
                  ... (a second product)
               </b:ApiProduct>
                  ...
            </a:Data>
            <a:User>
               <a:Email i:nil='true'/>
               <a:Id>1</a:Id>
               <a:Name>Test Testsson</a: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:prod='Prodibas.API.V2' 
  xmlns:prod1='Prodibas.API.V2.Parameters.OutputOptions' 
  xmlns:prod2='Prodibas.API.V2.Parameters'>
   <soapenv:Header/>
   <soapenv:Body>
      <prod:GetSingleByIdentifier>
         <prod:productIdentifier 
          i:type='params1:ByNumber' 
         	xmlns:params1='Prodibas.API.V2.Parameters' 
         	xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
            <params1:Number>6241006</params1:Number>
         </prod:productIdentifier>
         <prod:structuredOutputOptions>
            <prod1:Accessories>true</prod1:Accessories>
            <prod1:ActivityLog>true</prod1:ActivityLog>
           <prod1:EnvironmentalData>false</prod1:EnvironmentalData>
            <prod1:Etim>1</prod1:Etim>
            <prod1:EtimShowFeaturePossibleValues>true</prod1:EtimShowFeaturePossibleValues>
            <prod1:ExtNumbers>true</prod1:ExtNumbers>
            <prod1:Packages>true</prod1:Packages>
            <prod1:ProductGroups>true</prod1:ProductGroups>
            <prod1:ProductGroupsVersion>2</prod1:ProductGroupsVersion>
            <prod1:Uris>true</prod1:Uris>
         </prod:structuredOutputOptions>
         <prod:requestOptions>
            <prod2:Authentication>
               <prod2:CompanyIdentifier>MANU616</prod2:CompanyIdentifier>
               <prod2:Industry>VVS</prod2:Industry>
               <prod2:Key>DEVMANU616</prod2:Key>
            </prod2:Authentication>
         </prod:requestOptions>
      </prod: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.V2'>
         <GetSingleByIdentifierResult 
          xmlns:a='Prodibas.API.V2.Parameters' 
          xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
            <a:Data xmlns:b='Prodibas.API.V2.Model'>
               ... (a product)
            </a:Data>
            <a:User>
               <a:Email i:nil='true'/>
               <a:Id>1</a:Id>
               <a:Name>Test Testsson</a: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.

Note that you can omit fields that should remain unchanged.

Note though, that fields necessary to uniquely identify the product must be provided. That is, one of the simple identifiers productidentifiers (see examples requests in xml).

IsSpecified is only necessary to set on fields that should be updated, and should not be used for the identifying fields.

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
(ID ByNumber) Read more

<soapenv:Envelope 
  xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' 
  xmlns:prod='Prodibas.API.V2' 
  xmlns:prod1='Prodibas.API.V2.Model'
  xmlns:arr='http://schemas.microsoft.com/2003/10/Serialization/Arrays' 
  xmlns:prod2='Prodibas.API.V2.Parameters.OutputOptions'
  xmlns:prod3='Prodibas.API.V2.Parameters'>
   <soapenv:Header/>
   <soapenv:Body>
      <prod:UpdateSingle>
         <prod:product 
          xmlns:b='Prodibas.API.V2.Model' 
          xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
               ...  product properties to be updated  ...
               <b:Description>Integrerad värmepump</b:Description>
               <b:DescriptionIsSpecified>true</b:DescriptionIsSpecified>
               ... identifying ByNumber ...
               <b:Number>6241006</b:Number>
               ...  more product properties to be updated  ...
         </prod:product>
         <prod:structuredInputOptions
               xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
               <prod2:IgnoreWarnings>false</prod2:IgnoreWarnings>
         </prod:structuredInputOptions>
         <prod:requestOptions>
            <prod3:Authentication>
               <prod3:CompanyIdentifier>MANU616</prod3:CompanyIdentifier>
               <prod3:Industry>VVS</prod3:Industry>
               <prod3:Key>DEVMANU616</prod3:Key>
            </prod3:Authentication>
         </prod:requestOptions>
      </prod:UpdateSingle>
   </soapenv:Body>
</soapenv:Envelope>


(ID ByManufacturerAndNumber) Read more


...
<prod:product 
 xmlns:b='Prodibas.API.V2.Model' 
 xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
   ...  product properties to be updated  ...
   <b:Description>Integrerad värmepump</b:Description>
   <b:DescriptionIsSpecified>true</b:DescriptionIsSpecified>
   ... identifying ByManufacturerAndNumber ...
   <b:Manufacturer>
     <b:Identifier>MANU616</b:Identifier>
   </b:Manufacturer>        
   <b:Number>6241006</b:Number>
   ...  more product properties to be updated  ...
</prod:product>
...

(ID ByManufacturerAndManufacturerArticleNumber) Read more


...
<prod:product 
 xmlns:b='Prodibas.API.V2.Model' 
 xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
   ...  product properties to be updated  ...
   <b:Description>Integrerad värmepump</b:Description>
   <b:DescriptionIsSpecified>true</b:DescriptionIsSpecified>
   ... identifying ByManufacturerAndManufacturerArticleNumber ...
   <b:ExtNumbers>
     <b:ApiProductExtNumber>
       <b:TypeIdentifier>LEV</b:TypeIdentifier>
       <b:Value>Gast001</b:Value>
     </b:ApiProductExtNumber>
   </b:ExtNumbers>
   <b:Manufacturer>
     <b:Identifier>MANU616</b:Identifier>
   </b:Manufacturer>        
   ...  more product properties to be updated  ...
</prod:product>
...

(ID ByManufacturerAndArticleGTIN ) Read more
Note that if more than one hit, it will be an exception


...
<prod:product 
 xmlns:b='Prodibas.API.V2.Model' 
 xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
   ...  product properties to be updated  ...
   <b:Description>Integrerad värmepump</b:Description>
   <b:DescriptionIsSpecified>true</b:DescriptionIsSpecified>
   ... identifying ByManufacturerAndArticleGTIN ...
   <b:ExtNumbers>
     <b:ApiProductExtNumber>
       <b:TypeIdentifier>EAN</b:TypeIdentifier>
       <b:Value>7391515425000</b:Value>
     </b:ApiProductExtNumber>
   </b:ExtNumbers>
   <b:Manufacturer>
     <b:Identifier>MANU616</b:Identifier>
   </b:Manufacturer>        
   ...  more product properties to be updated  ...
</prod:product>
...
Example Response xml Read more

<s:Envelope 
  xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'>
   <s:Body>
      <UpdateSingleResponse xmlns='Prodibas.API.V2'>
         <UpdateSingleResult 
          xmlns:a='Prodibas.API.V2.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.

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:prod='Prodibas.API.V2' 
 xmlns:prod1='Prodibas.API.V2.Parameters'
 xmlns:prod2='Prodibas.API.V2.Parameters.OutputOptions'
 xmlns:prod3='Prodibas.API.V2.Parameters.FilterOptions' >
   <soapenv:Header/>
   <soapenv:Body>
      <prod:GetManyByIdentifiersQueued>
         <prod:productIdentifiers>
            <prod1:ApiProductIdentifierAbstractBase 
             xmlns:d4p1='Prodibas.API.V2.Parameters' 
             xmlns:i='http://www.w3.org/2001/XMLSchema-instance' 
             i:type='d4p1:ByNumber'>
               <d4p1:Number>5853172</d4p1:Number>
            </prod1:ApiProductIdentifierAbstractBase>
            <prod1:ApiProductIdentifierAbstractBase 
             xmlns:d4p1='Prodibas.API.V2.Parameters' 
             xmlns:i='http://www.w3.org/2001/XMLSchema-instance' 
             i:type='d4p1:ByManufacturerAndNumber'>
               <d4p1:ManufacturerIdentifier>MANU616</d4p1:ManufacturerIdentifier>
               <d4p1:Number>6241006</d4p1:Number>
            </prod1:ApiProductIdentifierAbstractBase>
         </prod:productIdentifiers>
         <prod:structuredOutputOptions>
            <prod2:Accessories>true</prod2:Accessories>
         </prod:structuredOutputOptions>
         <prod:structuredFilterOptions>
            <prod3:ActiveStatus>Active</prod3:ActiveStatus>
         </prod:structuredFilterOptions>
         <prod:queuedRequestOptions>
            <prod1:Authentication>
               <prod1:CompanyIdentifier>MANU616</prod1:CompanyIdentifier>
               <prod1:Industry>VVS</prod1:Industry>
               <prod1:Key>DEVMANU616</prod1:Key>
            </prod1:Authentication>
            <prod1:PingBackUrl>https://myserver.mydomain.com?MyownId=ABC123&amp;QueueId={QueueId}</prod1:PingBackUrl>
         </prod:queuedRequestOptions>
      </prod: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.V2'>
         <GetManyByIdentifiersQueuedResult 
          xmlns:a='Prodibas.API.V2.Parameters' 
          xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
            <a:QueueId>77736</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

<soapenv:Envelope 
 xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' 
 xmlns:prod='Prodibas.API.V2'
 xmlns:prod1='Prodibas.API.V2.Parameters'
 xmlns:prod2='Prodibas.API.V2.Parameters.OutputOptions'>
   <soapenv:Header/>
   <soapenv:Body>
      <prod:SearchQueued>
         <prod:searchProductsParameters>
            <prod1:ActiveStatus>All</prod1:ActiveStatus>
            <prod1:ManufacturerIdentifier>MANU616</prod1:ManufacturerIdentifier>
         </prod:searchProductsParameters>
         <prod:pagingParameters>
            <prod1:Count>1000</prod1:Count>
            <prod1:From>0</prod1:From>
         </prod:pagingParameters>
         <prod:structuredOutputOptions>
            <prod2:ExtNumbers>false</prod2:ExtNumbers>
            <prod2:Uris>true</prod2:Uris>
         </prod:structuredOutputOptions>
         <prod:queuedRequestOptions>
            <prod1:Authentication>
               <prod1:CompanyIdentifier>MANU616</prod1:CompanyIdentifier>
               <prod1:Industry>VVS</prod1:Industry>
               <prod1:Key>DEVMANU616</prod1:Key>
            </prod1:Authentication>
            <prod1:PingBackUrl>http://localhost:49673/api/
             Test/PingbackTest?message=MANU616-Search-Prodnummer-QueueId={QueueId}
             -BLABLA-QueueId2={QueueId}
            </prod1:PingBackUrl> 
         </prod:queuedRequestOptions>
      </prod:SearchQueued>
   </soapenv:Body>
</soapenv:Envelope>

Example xml response Read more

<s:Envelope 
  xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'>
   <s:Body>
      <SearchQueuedResponse 
       xmlns='Prodibas.API.V2'>
         <SearchQueuedResult 
          xmlns:a='Prodibas.API.V2.Parameters' 
          xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
            <a:QueueId>74725</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/' 
 xmlns:prod='Prodibas.API.V2' 
 xmlns:prod1='Prodibas.API.V2.Model' 
 xmlns:prod2='Prodibas.API.V2.Parameters.OutputOptions' 
 xmlns:prod3='Prodibas.API.V2.Parameters'>
   <soapenv:Header/>
   <soapenv:Body>
      <prod:UpdateManyQueued>
         <prod:products>
            <prod1:ApiProduct>
               ...  product properties to be updated  ...
               <prod1:Description>integrerad värmepump</prod1:Description>
               <prod1:DescriptionIsSpecified>true</prod1:DescriptionIsSpecified>              
               ... identifying ByNumber ...			   
               <prod1:Number>6241006</prod1:Number>
               ...  more product properties to be updated  ...
            </prod1:ApiProduct>
            <prod1:ApiProduct>
               ...  product properties to be updated  ...
               <prod1:Description>dimmer för utvändiga armaturer</prod1:Description>
               <prod1:DescriptionIsSpecified>true</prod1:DescriptionIsSpecified>   
               ... identifying ByNumber ...			   			   
               <prod1:Number>5853172</prod1:Number>
               ...  more product properties to be updated  ...
            </prod1:ApiProduct>
            ... more products ...
         </prod:products>
         <prod:structuredInputOptions
               xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
               <prod2:IgnoreWarnings>false</prod2:IgnoreWarnings>
         </prod:structuredInputOptions>
         <prod:queuedRequestOptions>
            <prod3:Authentication>
               <prod3:CompanyIdentifier>MANU616</prod3:CompanyIdentifier>
               <prod3:Industry>VVS</prod3:Industry>
               <prod3:Key>DEVMANU616</prod3:Key>
            </prod3:Authentication>
            <prod3:PingBackUrl>http://localhost:49673/api/
             Test/PingbackTest?message=MANU616-Search-Prodnummer-QueueId={QueueId}
             -BLABLA-QueueId2={QueueId}</prod3:PingBackUrl>
         </prod:queuedRequestOptions>
      </prod: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.V2'>
         <UpdateManyQueuedResult 
          xmlns:a='Prodibas.API.V2.Parameters' 
          xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
            <a:QueueId>77753</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 GetSearchResult to get result of a queued search that includes pagination metadata.
  • 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.V2' 
 xmlns:prod1='Prodibas.API.V2.Parameters'>
   <soapenv:Header/>
   <soapenv:Body>
      <prod:GetResult>
         <prod:queueId>77754</prod:queueId>
         <prod:requestOptions>
            <prod1:Authentication>
               <prod1:CompanyIdentifier>MANU616</prod1:CompanyIdentifier>
               <prod1:Industry>VVS</prod1:Industry>
               <prod1:Key>DEVMANU616</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.V2'>
         <GetResultResult 
          xmlns:a='Prodibas.API.V2.Parameters'
          xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
            <a:Data xmlns:b='Prodibas.API.V2.Model'>
               <b:ApiProduct>
                  ... a product ...
               </b:ApiProduct>
               <b:ApiProduct>
                  ... a second product ...
               </b:ApiProduct>
                  ... more products ...
            </a:Data>
            <a:User i:nil='true'/>
         </GetResultResult>
      </GetResultResponse>
   </s:Body>
</s:Envelope>

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

The result includes metadata (pagination metadata for searches).

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.V2' 
    xmlns:prod1='Prodibas.API.V2.Parameters'>
   <soapenv:Header/>
   <soapenv:Body>
      <prod:GetSearchResult>
         <prod:queueId>63768</prod:queueId>
         <prod:requestOptions>
            <prod1:Authentication>
               <prod1:CompanyIdentifier>MANU616</prod1:CompanyIdentifier>
               <prod1:Industry>VVS</prod1:Industry>
               <prod1:Key>DEVMANU616</prod1:Key>
            </prod1:Authentication>
         </prod:requestOptions>
      </prod:GetSearchResult>
   </soapenv:Body>
</soapenv:Envelope>

Example response xml Read more

<s:Envelope 
 xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'>
   <s:Body>
      <GetSearchResultResponse xmlns='Prodibas.API.V2'>
         <GetSearchResultResult 
          xmlns:a='Prodibas.API.V2.Parameters' 
          xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
            <a:Data xmlns:b='Prodibas.API.V2.Model'>
               <b:ApiProduct>
                  ... a product ...
               </b:ApiProduct>
               <b:ApiProduct>
                  ... a second product ...
               </b:ApiProduct>
                  ... more products ...
            </a:Data>
            <a:User i:nil='true'/>
            <a:MetaData>
               <a:Count>100</a:Count>
               <a:Next>500</a:Next>
               <a:TotalCount>1133242</a:TotalCount>
            </a:MetaData>
         </GetSearchResultResult>
      </GetSearchResultResponse>
   </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.V2' 
 xmlns:prod1='Prodibas.API.V2.Parameters'>
   <soapenv:Header/>
   <soapenv:Body>
      <prod:GetUpdateResult>
         <prod:queueId>77760</prod:queueId>
         <prod:requestOptions>
            <prod1:Authentication>
               <prod1:CompanyIdentifier>MANU616</prod1:CompanyIdentifier>
               <prod1:Industry>VVS</prod1:Industry>
               <prod1:Key>DEVMANU616</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.V2'>
         <GetUpdateResultResult 
          xmlns:a='Prodibas.API.V2.Parameters' 
          xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
            <a:Data xmlns:b='Prodibas.API.V2.Model'>
               <b:ApiModelValidationError>
                  <b:Field i:nil='true'/>
                  <b:Message>Product (Number) 6241006 ETIM class identifier=EC1010 does not exist.</b:Message>
               </b:ApiModelValidationError>
               <b:ApiModelValidationError>
                  <b:Field i:nil='true'/>
                  <b:Message>Product (Number) 5853172 Produkt (5853172-616) valideringsfel vid förändring. Fält: Produktnamn. Värdet kan endast ändras av en administratör.</b:Message>
               </b:ApiModelValidationError>
            </a:Data>
            <a:User i:nil='true'/>
         </GetUpdateResultResult>
      </GetUpdateResultResponse>
   </s:Body>
</s:Envelope>


Search products parameters

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

The paging parameters are used to paginate through the result.

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
  • Name
  • ArticleNumberMin AND ArticleNumberMax
  • LastChanged

public class SearchProductsParameters
{
    public string ActiveStatus { get; set; } // default 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 string InfoLevel { get; set; }
    public DateTime? LastChanged { get; set; }
    public string ManufacturerIdentifier { get; set; }
    public string Name { get; set; }            
    public string ProductGroupIdentifier { get; set; } 
    public DateTime? RegistrationDateFrom { get; set; }
    public DateTime? RegistrationDateTo { get; set; }
}

ActiveStatus

Available values for parameter ActiveStatus are: All, Active or Expired.

ProductGroupIdentifier and InfoLevel

Product groups can be retrieved with the method GetProductGroups in Global Data Api. InfoLevels can be retrieved with the method GetProductInfoLevels in Global Data Api.

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.

Example xml

<searchProductsParameters 
xmlns:params='Prodibas.API.V2.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:ManufacturerIdentifier>MANU616</params:ManufacturerIdentifier>
</searchProductsParameters>

Provide paging parameters in order to paginate through a large search result.

NOTE! If no paging parameters are provided, the entire search result will be fetched. Please avoid this for large batches. The returned batch should never exceed 20 000 products.

public class PagingParameters
{
    public int Count { get; set; }
    public int From { get; set; }
}

Start by setting From=0 and Count to the desired batch size. Use the metadata returned from GetSearchResult in order to find the next value for From to retrieve the next search page in the result set.

Example xml

<prod:pagingParameters>
    <prod1:Count>100</prod1:Count>
    <prod1:From>0</prod1:From>
</prod:pagingParameters>