Skip to main content
POST
/
measurement_templates
Add a new measurement template
curl --request POST \
  --url https://api.rechain.co/public/v1/measurement_templates \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Template Name",
  "companyId": "123e4567-e89b-12d3-a456-426614174000",
  "unit": "centimeters"
}
'
{
  "name": "Template Name",
  "companyId": "123e4567-e89b-12d3-a456-426614174000",
  "unit": "centimeters",
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "templateDimensionsCount": 5,
  "templateSizesCount": 3,
  "templateDimensions": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    }
  ],
  "templateSizes": [
    {
      "id": "<string>"
    }
  ],
  "templateSizeDimensions": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "sizeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "dimensionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "measurement": "10"
    }
  ]
}

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 measurement template

name
string
required
Example:

"Template Name"

companyId
string<uuid>
required
Example:

"123e4567-e89b-12d3-a456-426614174000"

unit
string

centimeters or inches

Example:

"centimeters"

Response

Successful operation

id
string<uuid>
Example:

"123e4567-e89b-12d3-a456-426614174000"

templateDimensionsCount
integer
Example:

5

templateSizesCount
integer
Example:

3

templateDimensions
object[]
templateSizes
object[]
templateSizeDimensions
object[]