Skip to main content
PATCH
/
api
/
catalogs
/
{id}
Update Catalog
curl --request PATCH \
  --url https://qwoty.app/api/catalogs/{id} \
  --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": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Updated Catalog Name",
    "api_name": "updated_catalog_name",
    "reference": "CAT-001",
    "description": "Updated description",
    "is_active": true,
    "id_crm": "crm_123",
    "id_erp": "erp_456",
    "id_accounting": "acc_789",
    "created_at": "2024-12-21T10:30:00Z",
    "updated_at": "2024-12-21T14:45:00Z"
  }
}

Authorization

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

Path Parameters

id
string
required
UUID of the catalog to update

Request Body

name
string
Catalog name
api_name
string
API identifier
reference
string
Internal reference
description
string
Catalog description
is_active
boolean
Active status
id_crm
string
External CRM ID
id_erp
string
External ERP ID
id_accounting
string
External accounting ID

Examples

curl -X PATCH https://qwoty.app/api/catalogs/550e8400-e29b-41d4-a716-446655440000 \
  -H "Authorization: Bearer qwoty_your_token" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Catalog Name",
    "description": "Updated description"
  }'

Response

success
boolean
Indicates if the request was successful
data
object
The updated catalog object with all fields
{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Updated Catalog Name",
    "api_name": "updated_catalog_name",
    "reference": "CAT-001",
    "description": "Updated description",
    "is_active": true,
    "id_crm": "crm_123",
    "id_erp": "erp_456",
    "id_accounting": "acc_789",
    "created_at": "2024-12-21T10:30:00Z",
    "updated_at": "2024-12-21T14:45:00Z"
  }
}

Error Responses

{
  "success": false,
  "error": "Catalog not found"
}