Create product

What is it for?

Registers a new product in the system.

Conditions

  • Requires authentication.
  • Validations:
    • Possible errors when creating a product:
    • Error HTTP When it occurs:
    • Field validation 422 If "name" or "code" are empty or exceed the maximum character limit
    • After creation: the product is automatically set to "active" status.

Parameters

Fill in the fields in Body Params, Query Params and/or Path Params as applicable.

Expected response

HTTP 201 → { "id": 789 }

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required
length ≤ 255

Product name

string
length ≤ 255

Product description

string
required

Unique product code

number

Product cost

integer

Product category ID (if applicable)

string

Product image hash or identifier

number

Product length in centimeters (optional)

number

Product height in centimeters (optional)

number

Product width in centimeters (optional)

number

Product weight in kilograms (optional)

string

Weight unit (optional)

string

Dimension unit (optional)

Responses

400

Validation exception or invalid types (400 Bad Request)

404

Product not found

409

Conflict due to duplicate resource or uniqueness rule

422

Data validation or business rule error

Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json