OfficeGest
Stocks/Articles/{article}/Complementaries

Create article complementary relation

Creates a complementary article relation for the given article. A complementary article is a product suggested together with the parent article. Persists the relation in TABLE_ARTCOMPLOBRIG with auto-generated NLinha.

POST
/stocks/articles/{article}/complementaries
AuthorizationBearer <token>

In: header

Path Parameters

articlestring
complementary_idstring

Complementary article identifier

quantity?number

Quantity required (default 0)

Range0 <= value
required?boolean

Whether the complementary is mandatory

complementary_price?number

Complementary article price override

extra_description?string

Additional description for the relation

Lengthlength <= 127
multiple_quantity?boolean

Whether the quantity is multiplied with the parent article quantity

Response Body

curl -X POST "https://og-tenant1.test:8003/api/v2/stocks/articles/string/complementaries" \
  -H "Content-Type: application/json" \
  -d '{
    "complementary_id": "string"
  }'
{
  "data": {
    "complementary_id": "string",
    "quantity": 0,
    "extra_description": "string",
    "required": true,
    "multiple_quantity": true,
    "complementary_price": 0
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}