Create a new product (manager)

POST /manager/products
application/json

Body

Product object that needs to be added to the store

  • type string
  • name string
  • description string
  • sticker string
  • image string
  • active boolean
  • sku string
  • external_id string
  • price number
  • stock number
  • stock_available number
  • youtube string
  • image_instagram string
  • url string
  • lang string

    Values are fr_FR, en_GB, de_DE, or es_ES.

Responses

  • 201 application/json

    Returns the created product

    Hide response attributes Show response attributes object
    • id_product integer(int32)
    • name string(nullable)
    • type string(nullable)
    • discount_percentage number(float)
    • price_catalog integer(float)
    • reference_unit_price integer(float)
    • sku string(nullable)
    • youtube_id string(nullable)
    • url string(nullable)
    • description string(nullable)
    • images array[object]
      Hide images attributes Show images attributes object
      • id_i18n_content integer
      • lang string

        Values are en_GB, fr_FR, es_ES, or de_DE.

      • content string
    • price number(float)
    • stock integer(float)
    • stock_available number(float)
    • old_image string(nullable)
  • 401 application/json

    Unauthorized.

    Hide response attribute Show response attribute object
    • message string
  • 403

    Forbidden - You don't have permission to access this route

  • 422 application/json

    Unprocessable Content

    Hide response attributes Show response attributes object
    • message string

      Error message.

    • errors object
      Hide errors attributes Show errors attributes object
      • field array[string]

        Error message details.

      • * array[string] Additional properties

        Error message details.

POST /manager/products
curl \
 --request POST 'https://domain.tld/api/v2/manager/products' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"type":"string","name":"string","description":"string","sticker":"string","image":"string","active":true,"sku":"string","external_id":"string","price":42.0,"stock":42.0,"stock_available":42.0,"youtube":"string","image_instagram":"string","url":"string","lang":"fr_FR"}'
Request examples
{
  "type": "string",
  "name": "string",
  "description": "string",
  "sticker": "string",
  "image": "string",
  "active": true,
  "sku": "string",
  "external_id": "string",
  "price": 42.0,
  "stock": 42.0,
  "stock_available": 42.0,
  "youtube": "string",
  "image_instagram": "string",
  "url": "string",
  "lang": "fr_FR"
}
Response examples (201)
{
  "id_product": 42,
  "name": "string",
  "type": "string",
  "discount_percentage": 42.0,
  "price_catalog": 42,
  "reference_unit_price": 42,
  "sku": "string",
  "youtube_id": "string",
  "url": "string",
  "description": "string",
  "images": [
    {
      "id_i18n_content": 42,
      "lang": "en_GB",
      "content": "Hello"
    }
  ],
  "price": 42.0,
  "stock": 42,
  "stock_available": 42.0,
  "old_image": "string"
}
Response examples (401)
{
  "message": "Unauthorized."
}
Response examples (422)
{
  "message": "field is required! (and 3 more error)",
  "errors": {
    "field": [
      "Error message details here"
    ],
    "additionalProperty1": [
      "Error message details here"
    ],
    "additionalProperty2": [
      "Error message details here"
    ]
  }
}