Skip to main content
POST
/
products
Add a new product
curl --request POST \
  --url https://api.rechain.co/public/v1/products \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "T-Shirt",
  "reference": "201"
}
'
{
  "id": "fb13bf64-2897-45ff-a29d-c09fc384811d",
  "name": "<string>",
  "status": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "companyId": 123,
  "description": "<string>",
  "notes": "<string>",
  "reference": "<string>",
  "productCategory": "<string>",
  "developmentStageId": 123,
  "componentLevel": "<string>",
  "supplierId": 123,
  "brandId": 123,
  "developmentStagesGroupId": 123,
  "mainComponentId": 123,
  "developmentStage": {
    "id": 123,
    "name": "<string>",
    "color": "<string>"
  },
  "productPhotos": [
    {
      "id": 123,
      "fileUrl": "<string>",
      "position": 123
    }
  ],
  "variants": [
    {
      "id": 123,
      "name": "<string>",
      "reference": "<string>",
      "photoUrl": "<string>",
      "variantPhotos": [
        {
          "id": 123,
          "fileUrl": "<string>"
        }
      ],
      "variantValues": [
        {
          "id": 123,
          "content": "<string>",
          "variantFieldId": 123
        }
      ],
      "identifiers": [
        {
          "productSize": {
            "id": 123,
            "name": "<string>"
          },
          "barcode": "<string>",
          "sku": "<string>",
          "identifierValues": [
            {
              "id": 123,
              "content": "<string>",
              "identifierField": {
                "id": 123,
                "name": "<string>"
              }
            }
          ]
        }
      ]
    }
  ],
  "attachments": [
    {
      "id": 123,
      "fileUrl": "<string>",
      "name": "<string>",
      "attachmentCategory": {
        "en": "<string>",
        "cn": "<string>"
      }
    }
  ],
  "productLabels": [
    {
      "id": 123,
      "name": "<string>",
      "position": 123,
      "labelId": 123,
      "labelGroupId": 123,
      "labelGroupPosition": 123
    }
  ],
  "productValues": [
    {
      "id": 123,
      "content": "<string>",
      "productFieldId": 123
    }
  ],
  "sizeSets": [
    {
      "id": 123,
      "name": "<string>"
    }
  ],
  "mainComponent": {
    "id": 123,
    "name": "<string>",
    "code": "<string>"
  },
  "components": [
    {
      "id": 123,
      "name": "<string>",
      "code": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Create a new product in the store

name
string
required
Example:

"T-Shirt"

reference
string
required
Example:

"201"

Response

Successful operation

id
string
Example:

"fb13bf64-2897-45ff-a29d-c09fc384811d"

name
string
status
string
createdAt
string<date-time>
updatedAt
string<date-time>
companyId
integer
description
string
notes
string
reference
string
productCategory
string
developmentStageId
integer
componentLevel
string
supplierId
integer
brandId
integer
developmentStagesGroupId
integer
mainComponentId
integer
developmentStage
object
productPhotos
object[]
variants
object[]
attachments
object[]
productLabels
object[]
productValues
object[]
sizeSets
object[]
mainComponent
object
components
object[]