Get Started with the Optiseller API

How to get started with the Optiseller API

Raymond Booth avatar
Written by Raymond Booth
Updated over a week ago

The Optiseller API is available to all subscribers, with different quotas of calls depending on your plan.

When you have signed up for your Optiseller subscription, you can retrieve the API subscription keys from within the portal, from the "Optiseller API" on the left hand navigation area

The developer portal link is also located here which is at https://developer.optiseller.com/

In the developer portal, you can explore and test the APIs, by clicking the "Try It" button:

This opens a form to allow you to enter the parameters, and if you copy and paste the subscription key form the portal, you can call the API immediately

In this example, we've used the BrandMPN parameter to try and source Item Specifics via teh "GetAspectSuggester" API

And the results are shown at the bottom of the form

Alternatively, API test tools such as postman can be used or with some simple scripting the API is accessible with a small amount of code, a c# example is below

Note that the header for the subscription key is named Ocp-Apim-Subscription-Key

using System.Net.Http.Headers;
using System;
using Newtonsoft.Json;

Console.WriteLine("Hello, World!");


using var client = new HttpClient();
var url = "https://connect.optiseller.com/suggestionapi/AspectSuggester";

var urlParameters = "?brandmpn=toshiba ct-8541";

client.BaseAddress = new Uri(url);

// Add an Accept header for JSON format.
client.DefaultRequestHeaders.Accept.Add(
new MediaTypeWithQualityHeaderValue("application/json"));

// Add header for subscription key
client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "ADD_YOUR_KEY_HERE");

// Get data response
var response = client.GetAsync(urlParameters).Result;
if (response.IsSuccessStatusCode)
{
// Parse the response body
var result = response.Content.ReadAsStringAsync().Result;

var dynamicObject = JsonConvert.DeserializeObject<dynamic>(result)!;
foreach (var item in dynamicObject.aspects)
{
Console.WriteLine("{0}:{1}", item.name, item.values?[0]);
};
}
else
{
Console.WriteLine("{0} ({1})", (int)response.StatusCode, response.ReasonPhrase);
}

If you have any questions or would like to chat to someone about the API please get in touch and we will be happy to help.

Did this answer your question?