Ulabs API Documentation

Products

Detail By Id

Fetch product details by providing ID in the request.


/detailById

Usage and SDK Samples

curl -X POST "https://api-ulabs.ubuy.com/api/crawl/v1/products/detailById"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProductsApi;

import java.io.File;
import java.util.*;

public class ProductsApiExample {

    public static void main(String[] args) {
        
        ProductsApi apiInstance = new ProductsApi();
        String xStoreSecret = xStoreSecret_example; // String | Store Secret Key
        String xStoreId = xStoreId_example; // String | Store ID
        String xApiKey = xApiKey_example; // String | API key of the store.
        Id id = ; // Id | 
        String xRequestId = xRequestId_example; // String | API request ID, It gets added back in response.
        String xUbuyUserId = xUbuyUserId_example; // String | Unique ID of the end user who is executing an API. (Max 100 characters)
        String xUbuyTags = xUbuyTags_example; // String | API Tags for segmentation, Each tag is separated by comma. (Each tag must be less than 80 characters long)
        try {
            inline_response_200_1 result = apiInstance.detailByIdPost(xStoreSecret, xStoreId, xApiKey, id, xRequestId, xUbuyUserId, xUbuyTags);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#detailByIdPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductsApi;

public class ProductsApiExample {

    public static void main(String[] args) {
        ProductsApi apiInstance = new ProductsApi();
        String xStoreSecret = xStoreSecret_example; // String | Store Secret Key
        String xStoreId = xStoreId_example; // String | Store ID
        String xApiKey = xApiKey_example; // String | API key of the store.
        Id id = ; // Id | 
        String xRequestId = xRequestId_example; // String | API request ID, It gets added back in response.
        String xUbuyUserId = xUbuyUserId_example; // String | Unique ID of the end user who is executing an API. (Max 100 characters)
        String xUbuyTags = xUbuyTags_example; // String | API Tags for segmentation, Each tag is separated by comma. (Each tag must be less than 80 characters long)
        try {
            inline_response_200_1 result = apiInstance.detailByIdPost(xStoreSecret, xStoreId, xApiKey, id, xRequestId, xUbuyUserId, xUbuyTags);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#detailByIdPost");
            e.printStackTrace();
        }
    }
}
String *xStoreSecret = xStoreSecret_example; // Store Secret Key
String *xStoreId = xStoreId_example; // Store ID
String *xApiKey = xApiKey_example; // API key of the store.
Id *id = ; // 
String *xRequestId = xRequestId_example; // API request ID, It gets added back in response. (optional)
String *xUbuyUserId = xUbuyUserId_example; // Unique ID of the end user who is executing an API. (Max 100 characters) (optional)
String *xUbuyTags = xUbuyTags_example; // API Tags for segmentation, Each tag is separated by comma. (Each tag must be less than 80 characters long) (optional)

ProductsApi *apiInstance = [[ProductsApi alloc] init];

[apiInstance detailByIdPostWith:xStoreSecret
    xStoreId:xStoreId
    xApiKey:xApiKey
    id:id
    xRequestId:xRequestId
    xUbuyUserId:xUbuyUserId
    xUbuyTags:xUbuyTags
              completionHandler: ^(inline_response_200_1 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var UlabsApiDocumentation = require('ulabs_api_documentation');

var api = new UlabsApiDocumentation.ProductsApi()

var xStoreSecret = xStoreSecret_example; // {String} Store Secret Key

var xStoreId = xStoreId_example; // {String} Store ID

var xApiKey = xApiKey_example; // {String} API key of the store.

var id = ; // {Id} 

var opts = { 
  'xRequestId': xRequestId_example, // {String} API request ID, It gets added back in response.
  'xUbuyUserId': xUbuyUserId_example, // {String} Unique ID of the end user who is executing an API. (Max 100 characters)
  'xUbuyTags': xUbuyTags_example // {String} API Tags for segmentation, Each tag is separated by comma. (Each tag must be less than 80 characters long)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.detailByIdPost(xStoreSecret, xStoreId, xApiKey, id, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class detailByIdPostExample
    {
        public void main()
        {
            
            var apiInstance = new ProductsApi();
            var xStoreSecret = xStoreSecret_example;  // String | Store Secret Key
            var xStoreId = xStoreId_example;  // String | Store ID
            var xApiKey = xApiKey_example;  // String | API key of the store.
            var id = new Id(); // Id | 
            var xRequestId = xRequestId_example;  // String | API request ID, It gets added back in response. (optional) 
            var xUbuyUserId = xUbuyUserId_example;  // String | Unique ID of the end user who is executing an API. (Max 100 characters) (optional) 
            var xUbuyTags = xUbuyTags_example;  // String | API Tags for segmentation, Each tag is separated by comma. (Each tag must be less than 80 characters long) (optional) 

            try
            {
                inline_response_200_1 result = apiInstance.detailByIdPost(xStoreSecret, xStoreId, xApiKey, id, xRequestId, xUbuyUserId, xUbuyTags);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductsApi.detailByIdPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ProductsApi();
$xStoreSecret = xStoreSecret_example; // String | Store Secret Key
$xStoreId = xStoreId_example; // String | Store ID
$xApiKey = xApiKey_example; // String | API key of the store.
$id = ; // Id | 
$xRequestId = xRequestId_example; // String | API request ID, It gets added back in response.
$xUbuyUserId = xUbuyUserId_example; // String | Unique ID of the end user who is executing an API. (Max 100 characters)
$xUbuyTags = xUbuyTags_example; // String | API Tags for segmentation, Each tag is separated by comma. (Each tag must be less than 80 characters long)

try {
    $result = $api_instance->detailByIdPost($xStoreSecret, $xStoreId, $xApiKey, $id, $xRequestId, $xUbuyUserId, $xUbuyTags);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->detailByIdPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProductsApi;

my $api_instance = WWW::SwaggerClient::ProductsApi->new();
my $xStoreSecret = xStoreSecret_example; # String | Store Secret Key
my $xStoreId = xStoreId_example; # String | Store ID
my $xApiKey = xApiKey_example; # String | API key of the store.
my $id = WWW::SwaggerClient::Object::Id->new(); # Id | 
my $xRequestId = xRequestId_example; # String | API request ID, It gets added back in response.
my $xUbuyUserId = xUbuyUserId_example; # String | Unique ID of the end user who is executing an API. (Max 100 characters)
my $xUbuyTags = xUbuyTags_example; # String | API Tags for segmentation, Each tag is separated by comma. (Each tag must be less than 80 characters long)

eval { 
    my $result = $api_instance->detailByIdPost(xStoreSecret => $xStoreSecret, xStoreId => $xStoreId, xApiKey => $xApiKey, id => $id, xRequestId => $xRequestId, xUbuyUserId => $xUbuyUserId, xUbuyTags => $xUbuyTags);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductsApi->detailByIdPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ProductsApi()
xStoreSecret = xStoreSecret_example # String | Store Secret Key
xStoreId = xStoreId_example # String | Store ID
xApiKey = xApiKey_example # String | API key of the store.
id =  # Id | 
xRequestId = xRequestId_example # String | API request ID, It gets added back in response. (optional)
xUbuyUserId = xUbuyUserId_example # String | Unique ID of the end user who is executing an API. (Max 100 characters) (optional)
xUbuyTags = xUbuyTags_example # String | API Tags for segmentation, Each tag is separated by comma. (Each tag must be less than 80 characters long) (optional)

try: 
    api_response = api_instance.detail_by_id_post(xStoreSecret, xStoreId, xApiKey, id, xRequestId=xRequestId, xUbuyUserId=xUbuyUserId, xUbuyTags=xUbuyTags)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductsApi->detailByIdPost: %s\n" % e)

Parameters

Header parameters
Name Description
x-store-secret*
String
Store Secret Key
Required
x-store-id*
String
Store ID
Required
x-api-key*
String
API key of the store.
Required
x-request-id
String
API request ID, It gets added back in response.
x-ubuy-userId
String
Unique ID of the end user who is executing an API. (Max 100 characters)
x-ubuy-tags
String
API Tags for segmentation, Each tag is separated by comma. (Each tag must be less than 80 characters long)
Body parameters
Name Description
id *

Responses

Status: 200 - Products has been fetched successfully.


Search By Keyword

Retrieve a list of products by providing a keyword in the request.


/searchBykeyword

Usage and SDK Samples

curl -X POST "https://api-ulabs.ubuy.com/api/crawl/v1/products/searchBykeyword"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProductsApi;

import java.io.File;
import java.util.*;

public class ProductsApiExample {

    public static void main(String[] args) {
        
        ProductsApi apiInstance = new ProductsApi();
        String xStoreSecret = xStoreSecret_example; // String | Store Secret Key
        String xStoreId = xStoreId_example; // String | Store ID
        String xApiKey = xApiKey_example; // String | API key of the store.
        Keywords keywords = ; // Keywords | 
        String xRequestId = xRequestId_example; // String | API request ID, It gets added back in response.
        String xUbuyUserId = xUbuyUserId_example; // String | Unique ID of the end user who is executing an API. (Max 100 characters)
        String xUbuyTags = xUbuyTags_example; // String | API Tags for segmentation, Each tag is separated by comma. (Each tag must be less than 80 characters long)
        try {
            inline_response_200 result = apiInstance.searchBykeywordPost(xStoreSecret, xStoreId, xApiKey, keywords, xRequestId, xUbuyUserId, xUbuyTags);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#searchBykeywordPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProductsApi;

public class ProductsApiExample {

    public static void main(String[] args) {
        ProductsApi apiInstance = new ProductsApi();
        String xStoreSecret = xStoreSecret_example; // String | Store Secret Key
        String xStoreId = xStoreId_example; // String | Store ID
        String xApiKey = xApiKey_example; // String | API key of the store.
        Keywords keywords = ; // Keywords | 
        String xRequestId = xRequestId_example; // String | API request ID, It gets added back in response.
        String xUbuyUserId = xUbuyUserId_example; // String | Unique ID of the end user who is executing an API. (Max 100 characters)
        String xUbuyTags = xUbuyTags_example; // String | API Tags for segmentation, Each tag is separated by comma. (Each tag must be less than 80 characters long)
        try {
            inline_response_200 result = apiInstance.searchBykeywordPost(xStoreSecret, xStoreId, xApiKey, keywords, xRequestId, xUbuyUserId, xUbuyTags);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProductsApi#searchBykeywordPost");
            e.printStackTrace();
        }
    }
}
String *xStoreSecret = xStoreSecret_example; // Store Secret Key
String *xStoreId = xStoreId_example; // Store ID
String *xApiKey = xApiKey_example; // API key of the store.
Keywords *keywords = ; // 
String *xRequestId = xRequestId_example; // API request ID, It gets added back in response. (optional)
String *xUbuyUserId = xUbuyUserId_example; // Unique ID of the end user who is executing an API. (Max 100 characters) (optional)
String *xUbuyTags = xUbuyTags_example; // API Tags for segmentation, Each tag is separated by comma. (Each tag must be less than 80 characters long) (optional)

ProductsApi *apiInstance = [[ProductsApi alloc] init];

[apiInstance searchBykeywordPostWith:xStoreSecret
    xStoreId:xStoreId
    xApiKey:xApiKey
    keywords:keywords
    xRequestId:xRequestId
    xUbuyUserId:xUbuyUserId
    xUbuyTags:xUbuyTags
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var UlabsApiDocumentation = require('ulabs_api_documentation');

var api = new UlabsApiDocumentation.ProductsApi()

var xStoreSecret = xStoreSecret_example; // {String} Store Secret Key

var xStoreId = xStoreId_example; // {String} Store ID

var xApiKey = xApiKey_example; // {String} API key of the store.

var keywords = ; // {Keywords} 

var opts = { 
  'xRequestId': xRequestId_example, // {String} API request ID, It gets added back in response.
  'xUbuyUserId': xUbuyUserId_example, // {String} Unique ID of the end user who is executing an API. (Max 100 characters)
  'xUbuyTags': xUbuyTags_example // {String} API Tags for segmentation, Each tag is separated by comma. (Each tag must be less than 80 characters long)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.searchBykeywordPost(xStoreSecret, xStoreId, xApiKey, keywords, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class searchBykeywordPostExample
    {
        public void main()
        {
            
            var apiInstance = new ProductsApi();
            var xStoreSecret = xStoreSecret_example;  // String | Store Secret Key
            var xStoreId = xStoreId_example;  // String | Store ID
            var xApiKey = xApiKey_example;  // String | API key of the store.
            var keywords = new Keywords(); // Keywords | 
            var xRequestId = xRequestId_example;  // String | API request ID, It gets added back in response. (optional) 
            var xUbuyUserId = xUbuyUserId_example;  // String | Unique ID of the end user who is executing an API. (Max 100 characters) (optional) 
            var xUbuyTags = xUbuyTags_example;  // String | API Tags for segmentation, Each tag is separated by comma. (Each tag must be less than 80 characters long) (optional) 

            try
            {
                inline_response_200 result = apiInstance.searchBykeywordPost(xStoreSecret, xStoreId, xApiKey, keywords, xRequestId, xUbuyUserId, xUbuyTags);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProductsApi.searchBykeywordPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ProductsApi();
$xStoreSecret = xStoreSecret_example; // String | Store Secret Key
$xStoreId = xStoreId_example; // String | Store ID
$xApiKey = xApiKey_example; // String | API key of the store.
$keywords = ; // Keywords | 
$xRequestId = xRequestId_example; // String | API request ID, It gets added back in response.
$xUbuyUserId = xUbuyUserId_example; // String | Unique ID of the end user who is executing an API. (Max 100 characters)
$xUbuyTags = xUbuyTags_example; // String | API Tags for segmentation, Each tag is separated by comma. (Each tag must be less than 80 characters long)

try {
    $result = $api_instance->searchBykeywordPost($xStoreSecret, $xStoreId, $xApiKey, $keywords, $xRequestId, $xUbuyUserId, $xUbuyTags);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->searchBykeywordPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProductsApi;

my $api_instance = WWW::SwaggerClient::ProductsApi->new();
my $xStoreSecret = xStoreSecret_example; # String | Store Secret Key
my $xStoreId = xStoreId_example; # String | Store ID
my $xApiKey = xApiKey_example; # String | API key of the store.
my $keywords = WWW::SwaggerClient::Object::Keywords->new(); # Keywords | 
my $xRequestId = xRequestId_example; # String | API request ID, It gets added back in response.
my $xUbuyUserId = xUbuyUserId_example; # String | Unique ID of the end user who is executing an API. (Max 100 characters)
my $xUbuyTags = xUbuyTags_example; # String | API Tags for segmentation, Each tag is separated by comma. (Each tag must be less than 80 characters long)

eval { 
    my $result = $api_instance->searchBykeywordPost(xStoreSecret => $xStoreSecret, xStoreId => $xStoreId, xApiKey => $xApiKey, keywords => $keywords, xRequestId => $xRequestId, xUbuyUserId => $xUbuyUserId, xUbuyTags => $xUbuyTags);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProductsApi->searchBykeywordPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ProductsApi()
xStoreSecret = xStoreSecret_example # String | Store Secret Key
xStoreId = xStoreId_example # String | Store ID
xApiKey = xApiKey_example # String | API key of the store.
keywords =  # Keywords | 
xRequestId = xRequestId_example # String | API request ID, It gets added back in response. (optional)
xUbuyUserId = xUbuyUserId_example # String | Unique ID of the end user who is executing an API. (Max 100 characters) (optional)
xUbuyTags = xUbuyTags_example # String | API Tags for segmentation, Each tag is separated by comma. (Each tag must be less than 80 characters long) (optional)

try: 
    api_response = api_instance.search_bykeyword_post(xStoreSecret, xStoreId, xApiKey, keywords, xRequestId=xRequestId, xUbuyUserId=xUbuyUserId, xUbuyTags=xUbuyTags)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProductsApi->searchBykeywordPost: %s\n" % e)

Parameters

Header parameters
Name Description
x-store-secret*
String
Store Secret Key
Required
x-store-id*
String
Store ID
Required
x-api-key*
String
API key of the store.
Required
x-request-id
String
API request ID, It gets added back in response.
x-ubuy-userId
String
Unique ID of the end user who is executing an API. (Max 100 characters)
x-ubuy-tags
String
API Tags for segmentation, Each tag is separated by comma. (Each tag must be less than 80 characters long)
Body parameters
Name Description
keywords *

Responses

Status: 200 - Found the products successfully.