LogoLogo
API Documentation
API Documentation
  • What is Mediablob
  • Fields
  • Endpoints
    • Authorization
    • REST
    • SOAP (legacy)
      • Pictures
  • XML structure
    • XSD
    • Products
      • Extending existing products
      • Deleting products
    • Complement products
    • Pricelists
      • Local price overrides
      • Future price changes
    • Campaigns
    • Productgroups
    • Local integration
      • Signorder
      • Display groups
    • Error messages
  • Images
    • Formats and resolution
Powered by GitBook
On this page
  • /api/xml
  • Used for uploading Shoppa XML's to the integration service bus queue
  • Used for uploading a custom XML to the integration service
  • Operation to list all uploaded XML's for the defined date
  • /api/status
  • Operation to check if the XML processing is done
  • Operation to get a detailed information about the XML process
  • /api/images
  • Upload images
  • Check if an image exists
  • Find the Mediablob hashcode for an uploaded image
Export as PDF
  1. Endpoints

REST

All endpoints use a leaky bucket queue algorithm. There is a max capacity of 50 messages at a time with a renewal of 1 message per 5 seconds.

/api/xml

Used for uploading Shoppa XML's to the integration service bus queue

PUT https://api.mediablob.com/api/xml

Available Shoppa XML's can be found at XML structure

Headers

Name
Type
Description

Authorization*

String

Basic authentication using the integration user credentials.

customerId*

String

ShoppaID or ExternalID for the customer node.

customerIdType*

String

"ShoppaID" or "ExternalID". Should be correspondant to the id used as customerId.

Request Body

Name
Type
Description

Text

String

File

Object

SessionId example:

23829771-e1d5-4dc3-8311-6503a38f2614
{
message: "The request is invalid."
}
{
message: "Authorization has been denied for this request."
}

Used for uploading a custom XML to the integration service

PUT https://api.mediablob.com/api/xml/custom

Custom XML's will be passed through one or several XSLT schemas before being uploaded to the service bus queue. XSLTs are uploaded by Shoppa. To upload or change an XSLT, contact your Shoppa representative for help.

Headers

Name
Type
Description

Authorization*

String

Basic authentication using the integration user credentials.

customerId*

String

ShoppaID or ExternalID for the customer node.

customerIdType*

String

"ShoppaID" or "ExternalID". Should be correspondant to the id used as customerId.

Request Body

Name
Type
Description

Text

String

File

Object

SessionId example:

23829771-e1d5-4dc3-8311-6503a38f2614
{
message: "Authorization has been denied for this request."
}

Operation to list all uploaded XML's for the defined date

GET https://api.mediablob.com/api/xml/{date}

Headers

Name
Type
Description

Authorization*

String

Basic authentication using the integration user credentials.

customerId*

String

ShoppaID or ExternalID for the customer node.

customerIdType*

String

"ShoppaID" or "ExternalID". Should be correspondant to the id used as customerId.

Id: SessionId for the message. File: Link to the upoaded file. Result: Route to retrieve the result file. See /api/statusfor more information. Errors:

{
id: "80004390-0000-a900-b63f-84710c7967bb",
receivedAt: "2022-12-28T13:01:51+00:00",
fileLenght: 164,
sentBy:{
    name: "sebbewstest",
    shoppaId: 17786,
    externalId: null
},
file: "https://mbintegrationdatainttest.blob.core.windows.net/xml/2022-12-28/17786/17786/a5ff59a67806e7af3d49fb184a671c68.xml",
result: "https://api.test2.mediablob.com/api/status/80004390-0000-a900-b63f-84710c7967bb/result",
errors:[]
}
{
message: "The request is invalid."
}
{
message: "Authorization has been denied for this request."
}

Operation to check if the XML processing is done

GET https://api.mediablob.com/api/status/{sessionId}/done

{sessionId} corresponds to the hashcode returned by a 202 Accepted response in /api/xml

true
false

Operation to get a detailed information about the XML process

GET https://api.mediablob.com/api/status/{sessionId}/result

{sessionId} corresponds to the hashcode returned by a 202 Accepted response in /api/xml

The request is still being proccessed.

Response header contains a parameter "Location". The parameter contains an URL to the error message.

/api/images

Upload images

POST https://api.mediablob.com/api/images

Upload one or more images to Mediablob as multipart form data objects. If this image already exists, the In C# you need to add the images to a MultipartFormDataContent object, which you add to an HttpClient call. The response contains the Mediablob id for each image, which you can use to reference the images in further integrations. If your image has a clipping path you can add these parameters to the call to tell our rest endpoint which clipping path you want to use. The invert parameter is there to make it possible to invert the clipping path.

Query Parameters

Name
Type
Description

invert

String

True if the inside of the clipping path shall be removed instead of kept. Defaults to False.

clippingpath

String

The name of the clipping path to be used. Defaults to not use clipping paths.

Headers

Name
Type
Description

Authorization*

String

Basic authentication using the integration user credentials.

customerId*

String

ShoppaID or ExternalID for the customer node.

customerIdType*

String

"ShoppaID" or "ExternalID". Should be correspondant to the id used as customerId.

Request Body

Name
Type
Description

file

Object

Binary image data. Repeat for each image to be uploaded. The parameter name is not used.

{
    // Response
}

Check if an image exists

HEAD https://api.mediablob.com/api/images/{Mediablob-hashcode}

Verify that an image exists in Mediablob by using the Mediablob-hashcode that was returned when the image was originally uploaded.

Headers

Name
Type
Description

Authorization*

String

Basic authentication using the integration user credentials.

customerId*

String

ShoppaID or ExternalID for the customer node.

customerIdType*

String

"ShoppaID" or "ExternalID". Should be correspondant to the id used as customerId.

{
    // Response
}
{
    // Response
}

Find the Mediablob hashcode for an uploaded image

GET https://api.mediablob.com/api/images

Find the Mediablob-hashcode for an image that has been previously uploaded. You need to provide one of md5 or uri query parameter, but not both in the request. The Mediablob-hashcode is returned in the response if it is successful, which you can use to reference the image in further integrations.

Query Parameters

Name
Type
Description

md5

String

The md5 hash of the original image.

uri

String

An external uri from which the image was originally fetched. Images can be fetched from external uri's during product xml uploads.

Headers

Name
Type
Description

Authorization*

String

Basic authentication using the integration user credentials.

customerId*

String

ShoppaID or ExternalID for the customer node.

customerIdType*

String

"ShoppaID" or "ExternalID". Should be correspondant to the id used as customerId.

{
    // Response
}
{
    // Response
}
PreviousAuthorizationNextSOAP (legacy)

Last updated 3 months ago