POST
/
suppliers
/
{id}
/
products
cURL
curl --request POST \
  --url https://api.daraa.io/suppliers/{id}/products \
  --header 'Content-Type: application/json' \
  --data '{
  "id": "<string>",
  "supplierId": "<string>",
  "sku": "<string>",
  "name": "<string>",
  "description": "<string>",
  "category": "<string>",
  "unitPrice": 123,
  "minimumQuantity": 123,
  "availableQuantity": 123,
  "unitOfMeasure": "<string>",
  "weight": 123,
  "dimensions": {
    "length": 123,
    "width": 123,
    "height": 123
  },
  "isActive": true,
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}'
{
  "identifiers": [
    {}
  ],
  "generatedMaps": [
    {}
  ],
  "raw": "<any>"
}

Path Parameters

id
string
required

Body

application/json
id
string
required

Unique identifier for the product

supplierId
string
required

ID of the supplier

sku
string
required

Supplier's SKU for this product

name
string
required

Product name

unitPrice
number
required

Price per unit

isActive
boolean
required

Whether product is active

description
string

Product description

category
string

Product category

minimumQuantity
number

Minimum order quantity

availableQuantity
number

Available quantity in stock

unitOfMeasure
string

Unit of measure (pcs, kg, lbs, etc.)

weight
number

Product weight

dimensions
object

Product dimensions

createdAt
string<date-time>
updatedAt
string<date-time>

Response

200 - application/json

Ok

Result object returned by InsertQueryBuilder execution.

identifiers
object[]
required

Contains inserted entity id. Has entity-like structure (not just column database name and values).

generatedMaps
object[]
required

Generated values returned by a database. Has entity-like structure (not just column database name and values).

raw
any
required

Raw SQL result returned by executed query.