In Mailship, you can create products by sending a POST request to the https://app.mailship.eu/api/product
endpoint. The request should include a JSON payload with the product's details.
Here's an example of how to create a product:
{
"eshops": [
"529baf4b-b7f1-4ff4-827f-b05f52a1a22f"
],
"productSku": 123,
"internalSku": 456,
"organisation": "529baf4b-b7f1-4ff4-827f-b05f52a1a22f",
"productGroup": "529baf4b-b7f1-4ff4-827f-b05f52a1a22f",
"name": "Mikrovlnná trouba 526",
"description": "Volně stojící ikrovlnná trouba s příkonem 3kW",
"weight": 50,
"height": 50,
"width": 400,
"length": 1000,
"referenceNumbers": [
123,
456
],
"packagingType": "A",
"imeiCheckRequired": false,
"workAroundSnIn": false,
"workAroundEanSticker": false,
"workAroundWarrantyInf": false,
"workAroundLot": false,
"active": true,
"countryOfOrigin": "CZ",
"hsCode": "HS123456",
"type": "bundle",
"childrenProducts": [
{
"productId": "529baf4b-b7f1-4ff4-827f-b05f52a1a22f",
"quantity": 0
}
],
"category": "dangerous_substances"
}
When sending the request, make sure to set the Content-Type
header to application/json
.
Here's a detailed explanation of the fields in the JSON payload:
eshops
(required): An array of strings. These are the UUIDs of the e-shops associated with the product.productSku
(required): A string. This is the product's SKU, which typically represents the barcode of the item. It must be unique across the entire organization.internalSku
(required): A string. This is the internal SKU for the product, which is typically used as the product identification in the organization's ERP or e-commerce platform.
organisation
(required): A string. This is the UUID of the organisation associated with the product.productGroup
: A string. This is the UUID of the product group the product belongs to.name
(required): A string between 2 and 255 characters. This is the name of the product.description
: A string between 2 and 255 characters or null. This is a description of the product.weight
: An integer between 0 and 10,000,000 or null. This is the weight of the product in grams.height
: An integer between 0 and 20,000 or null. This is the height of the product in millimeters.width
: An integer between 0 and 20,000 or null. This is the width of the product in millimeters.length
: An integer between 0 and 20,000 or null. This is the length of the product in millimeters.referenceNumbers
: An array of strings. These are additional barcodes for the product. If the product has multiple barcodes, they can be included here.packagingType
(required): A string. This is the type of packaging for the product. The default value is "A". For specific packaging options defined by Mailship, different values can be used.imeiCheckRequired
(required): A boolean. This indicates whether an IMEI (International Mobile Equipment Identity) check is required for the product. This is partially implemented and should not be used yet.workAroundSnIn
(required): A boolean. This indicates whether the product's serial numbers need to be monitored. The default value is false.workAroundEanSticker
(required): A boolean. This indicates whether the product needs to be labeled with EAN barcodes. This is typically used if the product is missing barcode labels. The default value is false.workAroundWarrantyInf
(required): A boolean. This indicates whether the product's warranty needs to be checked. The default value is false.workAroundLot
(required): A boolean. This indicates whether the product's lot and batch need to be checked. The default value is false.
active
(required): A boolean. This indicates whether the product is active.countryOfOrigin
: A 2-character string. This is the country of origin code according to the ISO 3166-1 alpha-2. This field is used for customs clearance.
hsCode
: A string of up to 25 characters or null. This is the Harmonized System (HS) code of the product. The HS code is used by customs authorities to classify products for customs clearance.type
: A string of up to 32 characters or null. This is the type of the product. Possible values are "virtual", "physical", and "bundle".childrenProducts
: An array of objects or null. These are the child products and their quantities.category
: A string or null. This is the category of the product. The value can be "dangerous_substances".