OSZZ API

<back to all web services

Search

The following routes are available for this service:
GET/search
GET/{Ver}/search
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    @DataContract
    public static class Search
    {
        @DataMember
        public String q = null;

        @DataMember
        public UUID tokenId = null;

        @DataMember
        public Integer ver = null;
        
        public String getQ() { return q; }
        public Search setQ(String value) { this.q = value; return this; }
        public UUID getTokenId() { return tokenId; }
        public Search setTokenId(UUID value) { this.tokenId = value; return this; }
        public Integer getVer() { return ver; }
        public Search setVer(Integer value) { this.ver = value; return this; }
    }

    @DataContract
    public static class SearchResponse implements IResponse
    {
        @DataMember
        public ResponseStatus responseStatus = null;

        @DataMember
        public ArrayList<ProductModel> result = null;
        
        public ResponseStatus getResponseStatus() { return responseStatus; }
        public SearchResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
        public ArrayList<ProductModel> getResult() { return result; }
        public SearchResponse setResult(ArrayList<ProductModel> value) { this.result = value; return this; }
    }

    @DataContract
    public static class ProductModel
    {
        @DataMember
        public UUID id = null;

        @DataMember
        public String manufacturerTitle = null;

        @DataMember
        public String number = null;

        @DataMember
        public String title = null;
        
        public UUID getId() { return id; }
        public ProductModel setId(UUID value) { this.id = value; return this; }
        public String getManufacturerTitle() { return manufacturerTitle; }
        public ProductModel setManufacturerTitle(String value) { this.manufacturerTitle = value; return this; }
        public String getNumber() { return number; }
        public ProductModel setNumber(String value) { this.number = value; return this; }
        public String getTitle() { return title; }
        public ProductModel setTitle(String value) { this.title = value; return this; }
    }

}

Java Search DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /search HTTP/1.1 
Host: api.oszz.ru 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<SearchResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <ResponseStatus>
    <ErrorCode>String</ErrorCode>
    <Message>String</Message>
    <StackTrace>String</StackTrace>
    <Errors>
      <ResponseError>
        <ErrorCode>String</ErrorCode>
        <FieldName>String</FieldName>
        <Message>String</Message>
        <Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </Meta>
      </ResponseError>
    </Errors>
    <Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </Meta>
  </ResponseStatus>
  <Result>
    <ProductModel>
      <Id>00000000-0000-0000-0000-000000000000</Id>
      <ManufacturerTitle>String</ManufacturerTitle>
      <Number>String</Number>
      <Title>String</Title>
    </ProductModel>
  </Result>
</SearchResponse>