Salesly API
API Reference

Create a product

POST
/products

Authorization

x-api-key<token>

Your tenant API key

In: header

Request Body

application/jsonRequired
reference
Required
string
name
Required
string
descriptionstring
vat
Required
number

VAT percentage (e.g. 21)

product_category_ref
Required
string

Category reference slug

servicesstring
stocknumber
rates
Required
array<object>
curl -X POST "https://rest.salesly.app/api/v1/developers/products" \
  -H "x-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "reference": "string",
    "name": "string",
    "description": "string",
    "vat": 0,
    "product_category_ref": "string",
    "services": "string",
    "stock": 0,
    "rates": [
      {
        "sku": "string",
        "cost": 0,
        "price": 0,
        "primary": true
      }
    ]
  }'

Product created

{
  "data": {
    "id": 0,
    "reference": "string",
    "name": "string",
    "description": "string",
    "vat_id": 0,
    "product_category_id": 0,
    "services": "string",
    "stock": 0,
    "rates": [
      {
        "id": 0,
        "sku": "string",
        "cost": 0,
        "price": 0,
        "primary": true
      }
    ],
    "category": {
      "id": 0,
      "name": "string",
      "reference": "string",
      "parent_id": 0,
      "has_products": true,
      "has_objectives": true,
      "children": [
        {
          "id": 0,
          "name": "string",
          "reference": "string",
          "parent_id": 0,
          "has_products": true,
          "has_objectives": true,
          "children": [],
          "created_at": "2019-08-24T14:15:22Z",
          "updated_at": "2019-08-24T14:15:22Z"
        }
      ],
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    },
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}