Skip to main content
POST
/
api
/
catalogs
Create Catalog
curl --request POST \
  --url https://qwoty.app/api/catalogs \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "api_name": "<string>",
  "reference": "<string>",
  "description": "<string>",
  "is_active": true,
  "id_crm": "<string>",
  "id_erp": "<string>",
  "id_accounting": "<string>"
}
'
{
  "success": true,
  "data": {
    "id": "660e8400-e29b-41d4-a716-446655440001",
    "name": "Premium Products",
    "api_name": "premium_products",
    "reference": "CAT-002",
    "description": "Catalog for premium tier products",
    "is_active": true,
    "id_crm": null,
    "id_erp": null,
    "id_accounting": null,
    "created_at": "2024-12-21T10:30:00Z",
    "updated_at": "2024-12-21T10:30:00Z"
  }
}

Authorization

Authorization
string
required
Bearer token for authentication. Format: Bearer qwoty_your_token

Request Body

name
string
required
Catalog name
api_name
string
API identifier (auto-generated if not provided)
reference
string
Internal reference
description
string
Catalog description
is_active
boolean
default:"true"
Active status
id_crm
string
External CRM ID
id_erp
string
External ERP ID
id_accounting
string
External accounting ID

Examples

curl -X POST https://qwoty.app/api/catalogs \
  -H "Authorization: Bearer qwoty_your_token" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Premium Products",
    "description": "Catalog for premium tier products",
    "reference": "CAT-002",
    "is_active": true
  }'

Response

success
boolean
Indicates if the request was successful
data
object
The created catalog object with all fields
{
  "success": true,
  "data": {
    "id": "660e8400-e29b-41d4-a716-446655440001",
    "name": "Premium Products",
    "api_name": "premium_products",
    "reference": "CAT-002",
    "description": "Catalog for premium tier products",
    "is_active": true,
    "id_crm": null,
    "id_erp": null,
    "id_accounting": null,
    "created_at": "2024-12-21T10:30:00Z",
    "updated_at": "2024-12-21T10:30:00Z"
  }
}

Error Responses

{
  "success": false,
  "error": "Validation error",
  "details": {
    "name": "Name is required"
  }
}