Skip to main content
Skip table of contents

Creation of Product

Create Product

Create a new product entity in your product catalog.

Request structure

Endpoint:

POST /api/product

URL (prod):

https://app.mailship.eu/api/product

Headers:

CODE
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json

Request body:

For detailed request body specifications, please refer to our API doc.

Request Example (cURL):

CODE
curl --location "https://app.mailship.eu/api/product" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {{token}}" \
--data "{
    \"eshops\": [
        \"5a40a7bf-c1e9-4148-a96a-539510402861\"
    ],
    \"productSku\": \"testProductDevPortal\",
    \"internalSku\": \"testProductDevPortal\",
    \"organisation\": \"p8e4544d-45fd-452a-83ed-160727ddca5b\",
    \"productGroup\": null,
    \"name\": \"test Product Dev Portal\",
    \"description\": null,
    \"weight\": null,
    \"height\": null,
    \"width\": null,
    \"length\": null,
    \"referenceNumbers\": [
        \"testProductDevPortal\"
    ],
    \"packagingType\": \"A\",
    \"imeiCheckRequired\": false,
    \"workAroundSnIn\": false,
    \"workAroundEanSticker\": false,
    \"workAroundWarrantyInf\": false,
    \"workAroundLot\": false,
    \"active\": true,
    \"countryOfOrigin\": null,
    \"hsCode\": null,
    \"type\": \"physical\",
    \"childrenProducts\": null,
    \"customsDescription\": null,
    \"requiresAdditionalWork\": true,
    \"requiresQualitativeReceiving\": false,
    \"expectedTurnover\": null,
    \"expirationOffset\": null,
    \"localisation\": []
}"

Request body specifications

Here is an additional, more detailed explanation of certain fields:

Field

Description

"eshops"

An array of e-shop IDs where the product is available. Multiple e-shops can be specified, allowing the product to be listed in multiple stores.

If no e-shop is provided, the product will still be created but cannot be used for order fulfillment (shipping).

Retrieve the list of your available e-shop IDs using the endpoint: POST /api/eshop/list.

"organisation"

Specifies your organization ID. Retrieve your organization ID via POST /api/eshop/list.

"services"

Defines additional product-related services. Find more details here.

"childrenProducts"

Required only when creating a bundle product (type: "bundle").

This field is an array of product IDs that make up the bundle. Find more details about bundles here.

Retrieve the list of your available products via POST /api/product/list.

"codes"

Used when a product has multiple EAN codes. The codes field is an array of various EAN codes.

You cannot use both codes and productSku simultaneously.

For additional field informations, refer to the Knowledge Base or API Doc.

Response

If successful, the API returns the newly created product entity in JSON format.

See more details in the API Doc.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.