Page tree
Skip to end of metadata
Go to start of metadata

This page will provide you instructions on how to test our API's directly and examples on how to communicate with our API's.

Test API

If you want to test Extends API's you may use the below Test credentials (Read only). These credentials will allow you to test the "Get" methods in the Extend API Library, meaning you will be able to read data but not create.

 Test credentials (Read only)

Username: APIReadOnly

Password: APIReadOnly

Client parameter for testing: APIDEMO

If you want to test any of the Extend API's with other methods than "Get", please contact your client manager at Extend or the Extend Support to get the correct testing credentials.

Extend use different credentials depending on which method you want to test, so we request that you specify which methods you are interested in.

When you have your testing credentials you may test the different methods in the API interface in the Extend API Library or by making your own API calls.

Fill out the required parameter values, and the optional parameters if they are applicable, and execute by clicking the "Try it out" button. You will be prompted to fill in your credentials to proceed.

 "Try it out" - description

Extend recommend you to not use the Microsoft Edge browser, since the login-prompt is not fully supported.

Your API response will be showed below the "Try it out" button.

Example Code

Here are some example code on how to communicate with the Extend API's.

It´s a c# example, click "c# example" below to view the example. If you want to download the example as a project, click here to download.

 c# example
using System.Net.Http.Headers;

namespace ExtendAPI
    class Program
        static void Main(string[] args)
            string username = "APIReadOnly";
            string password = "APIReadOnly";
            string yourClient = "APIDemo";
            string apiurl = "{client}/Products";

            apiurl = apiurl.Replace("{client}", yourClient);
            HttpClient client = new HttpClient();           
            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
            string credentials = Convert.ToBase64String(ASCIIEncoding.ASCII.GetBytes(username + ":" + password));
            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", credentials );

            HttpResponseMessage response = client.GetAsync(apiurl).Result;
            HttpContent content = response.Content;

            // Check Status Code                                
            Console.WriteLine("Response StatusCode: " + (int)response.StatusCode);

            // Read the string.
            string result = content.ReadAsStringAsync().Result;

            // Display the result.
            if (result != null)

  • No labels