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
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
Text
String
File
Object
SessionId example:
23829771-e1d5-4dc3-8311-6503a38f2614{
message: "The request is invalid."
}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
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
Text
String
File
Object
SessionId example:
Operation to list all uploaded XML's for the defined date
GET https://api.mediablob.com/api/xml/{date}
Headers
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:
/api/auth
Validate authentication and fetch environment information
GET https://api.mediablob.com/api/auth/me
Can be used to fetch information about the environment node structure. Such as customerIds, available languageCodes/countryCodes.
/api/status
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
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
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
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
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
file
Object
Binary image data. Repeat for each image to be uploaded. The parameter name is not used.
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
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.
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
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
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.
Last updated