Skip to content

Latest commit

 

History

History
134 lines (111 loc) · 7.67 KB

MarketplaceApi.md

File metadata and controls

134 lines (111 loc) · 7.67 KB

Org.OpenAPITools.Api.MarketplaceApi

All URIs are relative to https://api.api2cart.com/v1.1

Method HTTP request Description
MarketplaceProductFind GET /marketplace.product.find.json marketplace.product.find

MarketplaceProductFind

ModelResponseMarketplaceProductFind MarketplaceProductFind (string? storeId = null, int? count = null, string? pageCursor = null, string? categoriesIds = null, string? keyword = null, string? asin = null, string? ean = null, string? gtin = null, string? upc = null, string? mpn = null, string? isbn = null, string? varParams = null, string? exclude = null, string? responseFields = null)

marketplace.product.find

Search product in global catalog.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class MarketplaceProductFindExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.api2cart.com/v1.1";
            // Configure API key authorization: StoreKeyAuth
            config.AddApiKey("x-store-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-store-key", "Bearer");
            // Configure API key authorization: ApiKeyAuth
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new MarketplaceApi(config);
            var storeId = 1;  // string? | Store Id (optional) 
            var count = 20;  // int? | This parameter sets the entity amount that has to be retrieved. Max allowed count=250 (optional)  (default to 10)
            var pageCursor = ;  // string? | Used to retrieve entities via cursor-based pagination (it can't be used with any other filtering parameter) (optional) 
            var categoriesIds = 23,56;  // string? | Defines product add that is specified by comma-separated categories id (optional) 
            var keyword = T-shirt;  // string? | Defines search keyword (optional) 
            var asin = 97703178470;  // string? | Amazon Standard Identification Number. (optional) 
            var ean = 5901234123457;  // string? | European Article Number. An EAN is a unique 8 or 13-digit identifier that many industries (such as book publishers) use to identify products. (optional) 
            var gtin = 12345678912345;  // string? | Global Trade Item Number. An GTIN is an identifier for trade items. (optional) 
            var upc = 9770317847001;  // string? | Universal Product Code. A UPC (UPC-A) is a commonly used identifer for many different products. (optional) 
            var mpn = 9770317847001;  // string? | Manufacturer Part Number. A MPN is an identifier of a particular part design or material used. (optional) 
            var isbn = 9783161484100;  // string? | International Standard Book Number. An ISBN is a unique identifier for books. (optional) 
            var varParams = id,model,price,images;  // string? | Set this parameter in order to choose which entity fields you want to retrieve (optional)  (default to "force_all")
            var exclude = false;  // string? | Set this parameter in order to choose which entity fields you want to ignore. Works only if parameter `params` equal force_all (optional) 
            var responseFields = {result};  // string? | Set this parameter in order to choose which entity fields you want to retrieve (optional) 

            try
            {
                // marketplace.product.find
                ModelResponseMarketplaceProductFind result = apiInstance.MarketplaceProductFind(storeId, count, pageCursor, categoriesIds, keyword, asin, ean, gtin, upc, mpn, isbn, varParams, exclude, responseFields);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling MarketplaceApi.MarketplaceProductFind: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the MarketplaceProductFindWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // marketplace.product.find
    ApiResponse<ModelResponseMarketplaceProductFind> response = apiInstance.MarketplaceProductFindWithHttpInfo(storeId, count, pageCursor, categoriesIds, keyword, asin, ean, gtin, upc, mpn, isbn, varParams, exclude, responseFields);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling MarketplaceApi.MarketplaceProductFindWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
storeId string? Store Id [optional]
count int? This parameter sets the entity amount that has to be retrieved. Max allowed count=250 [optional] [default to 10]
pageCursor string? Used to retrieve entities via cursor-based pagination (it can't be used with any other filtering parameter) [optional]
categoriesIds string? Defines product add that is specified by comma-separated categories id [optional]
keyword string? Defines search keyword [optional]
asin string? Amazon Standard Identification Number. [optional]
ean string? European Article Number. An EAN is a unique 8 or 13-digit identifier that many industries (such as book publishers) use to identify products. [optional]
gtin string? Global Trade Item Number. An GTIN is an identifier for trade items. [optional]
upc string? Universal Product Code. A UPC (UPC-A) is a commonly used identifer for many different products. [optional]
mpn string? Manufacturer Part Number. A MPN is an identifier of a particular part design or material used. [optional]
isbn string? International Standard Book Number. An ISBN is a unique identifier for books. [optional]
varParams string? Set this parameter in order to choose which entity fields you want to retrieve [optional] [default to "force_all"]
exclude string? Set this parameter in order to choose which entity fields you want to ignore. Works only if parameter `params` equal force_all [optional]
responseFields string? Set this parameter in order to choose which entity fields you want to retrieve [optional]

Return type

ModelResponseMarketplaceProductFind

Authorization

StoreKeyAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 successful operation -

[Back to top] [Back to API list] [Back to Model list] [Back to README]