Product
Create Product

Create Product

Creates a new product object.
POST/product/create

Parameters

name - string required
The product's reference.


reference - string required
The product's reference.


vat - integer required
The product's vat id.


rates - array required
An array of objects ( Rates ), Only one can be primary 1 .


More parameters optional

  • product_category_ref - string
  • comments - string
  • comment - string

We are still working on the definitions of each parameter.

EXAMPLE
{
  "reference": "ProductAPI",
  "price": 15,
  "cost": 2,
  "max_discount": null,
  "stock": 1,
  "active": true,
  "product_category_ref": "C_API",
  "services": null,
  "taxes": null,
  "name": "Product API",
  "description": "Product API description",
  "vat": 21,
  "rates": [
    {
      "sku": "ProductAPI_rate_1",
      "cost": 1.00,
      "price": 5.00,
      "services": 0.00,
      "primary": 1
    }
  ]
}

Response

status 200

Full product object created.

Response
{
    "reference": "ProductAPI",
    "max_discount": null,
    "stock": 1,
    "active": true,
    "taxes": null,
    "vat_id": 2,
    "product_category_id": 1,
    "slug": "productapi",
    "updated_at": "2024-01-30 17:26:57",
    "created_at": "2024-01-30 17:26:57",
    "id": 19,
    "name_ref": "(ProductAPI2) Product API",
    "name": "Product API",
    "description": "Product API description",
    "store_name": null,
    "store_description": null,
    "translations": [
        {
            "locale": "es",
            "name": "Product API",
            "description": "Product API description",
            "product_id": 19,
            "updated_at": "2024-01-30 17:26:57",
            "created_at": "2024-01-30 17:26:57",
            "id": 55
        },
        {
            "locale": "ca",
            "product_id": 19,
            "name": "Product API",
            "description": "Product API description",
            "updated_at": "2024-01-30 17:26:57",
            "created_at": "2024-01-30 17:26:57",
            "id": 56
        },
        {
            "locale": "en",
            "product_id": 19,
            "name": "Product API",
            "description": "Product API description",
            "updated_at": "2024-01-30 17:26:57",
            "created_at": "2024-01-30 17:26:57",
            "id": 57
        }
    ],
    "rates": [
        {
            "id": 19,
            "product_id": 19,
            "sku": "ProductAPI_rate_1",
            "cost": 1,
            "price": 5,
            "services": 0,
            "primary": true,
            "created_at": "2024-01-30 17:26:57",
            "updated_at": "2024-01-30 17:26:57",
            "name": "ProductAPI_rate_1 (5.000)"
        }
    ]
}