# Endpoints

The Mediablob API 1.0 is based on xml.

While the original transport was only over SOAP, Mediablob now supports async posting of xml files over https. This method is much easier to use, and returns control faster to your application.

While there are no immediate plans to remove the legacy soap support, the async https transport is highly recommended for new api development.

## HTTPS endpoints

There are two available endpoints; one for development and testing, and the other for production use.

1. Development: `https://api.test2.mediablob.com/api/xml`
2. Production: `https://api.mediablob.com/api/xml`

### REST/HTTP Developer tools

Since the api supports standard http requests, it is easy to connect any environment to the api once you have your account details.

An effective way of testing the Mediablob integration is by using Chrome with the extension [Talend API Tester](https://chrome.google.com/webstore/detail/talend-api-tester-free-ed/aejoelaoggembcahagimdiliamlcdmfm).

1. Install the addon.
2. Open the new app from the upper right corner of Chrome.
3. Select the *Method*, i.e. `PUT` and fill in the url to the endpoint&#x20;

   [https://api.test2.mediablob.com/api/xml](#https-endpoints).
4. Add an *Authentication* request header that conforms to the credentials provided by Shoppa, i.e  `Authentication: Basic dXNlcm5hbWU6cGFzc3dvcmQ=`.
5. Add a proper *Content-Type* request header that describes what content is provided in the request body, if any. i.e. `Content-Type: application/xml`.
6. Fill in the request body, if needed. When submitting xml to the */api/xml* enpoint, the content shall *not* be manually xml-encoded (something that was required when using SOAP).
7. Click `Send` to post the xml file to the endpoint.

Shoppa also provides C# source code for a sample application that uploads xml files to the api.

## Legacy SOAP endpoints

There are two available endpoints; one for development and testing, and the other for production use.

1. Development: `http://ws.test2.mediablob.com/services/products.asmx`
2. Production: `http://ws.mediablob.com/services/products.asmx`

You can open the endpoint urls in a standard browser and read about the provided functions.

### SOAP Developer tools

Since the api supports standard soap requests, it is easy to connect any environment to the api once you have your account details.

An effective way of testing the Mediablob integration is by using Chrome with the extension [Wizdler](https://chrome.google.com/webstore/detail/wizdler/oebpmncolmhiapingjaagmapififiakb).

1. Install the addon.
2. Browse to the wsdl-definition of the webserver at [http://ws.test2.mediablob.com/services/products.asmx?WSDL](#legacy-soap-endpoints).
3. Click on the Wizdler icon in the addons toolbar and select the function you want to call.
4. Rewrite the example content in the browser window.
5. Click `GO` to post the xml file to the service.
6. Await the service response.

Shoppa also provides C# source code for a sample application that uploads xml files to the api.

## How to use the endpoints properly

Use the development endpoint for development and integration testing. The test environments have additional data format validation that gives better developer feedback. By working in a testing sandbox, you ensure any errors can be detected without affecting production users.

Switch to the production endpoint when uploaded data shall be seen by the end users.

The environments can of course be used in parallel. Just understand that testing and production environments are completely separated.

## Requesting user access

You will need a username and password to access any services in the Mediablob api. You also need to know your customer id(s) for many operations.

Accounts to the test and production environments are provided by the Shoppa Support Centre. Ask your Shoppa representative to request an account on your behalf.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://shoppa.gitbook.io/knowledge-hub/api-documentation/endpoints.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
