getByIdPost
Fetch product details by providing IDs in the request.
/getById
Usage and SDK Samples
curl -X POST "https://api.ubuy.com.kw/node-apps/api/crawl/v1/getById"
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.
Sku sku = ; // Sku |
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.getByIdPost(xStoreSecret, xStoreId, xApiKey, sku, xRequestId, xUbuyUserId, xUbuyTags);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProductsApi#getByIdPost");
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.
Sku sku = ; // Sku |
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.getByIdPost(xStoreSecret, xStoreId, xApiKey, sku, xRequestId, xUbuyUserId, xUbuyTags);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProductsApi#getByIdPost");
e.printStackTrace();
}
}
}
String *xStoreSecret = xStoreSecret_example; // Store Secret Key
String *xStoreId = xStoreId_example; // Store ID
String *xApiKey = xApiKey_example; // API key of the store.
Sku *sku = ; //
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 getByIdPostWith:xStoreSecret
xStoreId:xStoreId
xApiKey:xApiKey
sku:sku
xRequestId:xRequestId
xUbuyUserId:xUbuyUserId
xUbuyTags:xUbuyTags
completionHandler: ^(inline_response_200_1 output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var UbuyApiDocumentation = require('ubuy_api_documentation');
var api = new UbuyApiDocumentation.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 sku = ; // {Sku}
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.getByIdPost(xStoreSecret, xStoreId, xApiKey, sku, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getByIdPostExample
{
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 sku = new Sku(); // Sku |
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.getByIdPost(xStoreSecret, xStoreId, xApiKey, sku, xRequestId, xUbuyUserId, xUbuyTags);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ProductsApi.getByIdPost: " + 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.
$sku = ; // Sku |
$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->getByIdPost($xStoreSecret, $xStoreId, $xApiKey, $sku, $xRequestId, $xUbuyUserId, $xUbuyTags);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductsApi->getByIdPost: ', $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 $sku = WWW::SwaggerClient::Object::Sku->new(); # Sku |
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->getByIdPost(xStoreSecret => $xStoreSecret, xStoreId => $xStoreId, xApiKey => $xApiKey, sku => $sku, xRequestId => $xRequestId, xUbuyUserId => $xUbuyUserId, xUbuyTags => $xUbuyTags);
print Dumper($result);
};
if ($@) {
warn "Exception when calling ProductsApi->getByIdPost: $@\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.
sku = # Sku |
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.get_by_id_post(xStoreSecret, xStoreId, xApiKey, sku, xRequestId=xRequestId, xUbuyUserId=xUbuyUserId, xUbuyTags=xUbuyTags)
pprint(api_response)
except ApiException as e:
print("Exception when calling ProductsApi->getByIdPost: %s\n" % e)
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)
|
Name | Description |
---|---|
sku * |