REST

/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

NameTypeDescription

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

NameTypeDescription

Text

String

File

Object

SessionId example:

23829771-e1d5-4dc3-8311-6503a38f2614

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

NameTypeDescription

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

NameTypeDescription

Text

String

File

Object

SessionId example:

23829771-e1d5-4dc3-8311-6503a38f2614

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

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

Headers

NameTypeDescription

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:[]
}

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

/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

NameTypeDescription

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

NameTypeDescription

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

NameTypeDescription

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

NameTypeDescription

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
}

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

NameTypeDescription

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

NameTypeDescription

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
}

Last updated