Skip to main content

Products

A product is anything you sell — a SaaS plan, a physical product, a service. Products live in the account catalog and can be attached to deals through Deal products to compute the deal value.

Resource shape

AttributeTypeRequiredExampleNotes
identifierstringNoSKU-ABC-001SKU or unique code. Defaults to empty.
namestringNoPremium SubscriptionDefaults to empty.
descriptionstringNoAnnual premium plan with full features.
amount_in_centsintegerNo19900Price in cents (19900 = R$ 199,00). Defaults to 0.
quantity_availableintegerNo100Stock count. Defaults to 0.
custom_attributesobjectNo{ "category": "Software" }Free‑form custom fields.

All endpoints below assume:

{base_url} = https://app.woofedcrm.com
{account_id} = 1

Get product

GET /api/v1/accounts/{account_id}/products/{id}

Retrieves a single product by ID.

Example request

curl -X GET "https://app.woofedcrm.com/api/v1/accounts/1/products/1" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN_HERE"

Example response — 200 OK

The response also returns the deal_products belonging to the product.

{
"id": 1,
"identifier": "SNS895SASXVDW",
"amount_in_cents": 1000035,
"quantity_available": 2,
"description": "Nice car",
"name": "Car",
"custom_attributes": { "number_of_doors": "4" },
"additional_attributes": {},
"created_at": "2025-01-12T18:21:03Z",
"updated_at": "2025-01-12T18:21:03Z",
"account_id": 1,
"deal_products": [
{
"id": 3,
"product_id": 1,
"deal_id": 10,
"created_at": "2025-01-12T18:21:05Z",
"updated_at": "2025-01-12T18:21:05Z",
"unit_amount_in_cents": 0,
"product_identifier": "",
"product_name": "",
"total_amount_in_cents": 0,
"quantity": 1,
"account_id": 1
}
]
}

Possible errors

StatusWhen
401Missing or invalid token.
404Product not found.

Create product

POST /api/v1/accounts/{account_id}/products

Creates a new product in the catalog.

Body

{
"identifier": "SNS895SASXVDW",
"amount_in_cents": 1000035,
"quantity_available": 2,
"description": "Nice car",
"name": "Car",
"custom_attributes": { "number_of_doors": "4" }
}

Example request

curl -X POST "https://app.woofedcrm.com/api/v1/accounts/1/products" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-d '{
"identifier": "SNS895SASXVDW",
"amount_in_cents": 1000035,
"quantity_available": 2,
"description": "Nice car",
"name": "Car",
"custom_attributes": { "number_of_doors": "4" }
}'

Example response — 201 Created

{
"id": 7,
"identifier": "SNS895SASXVDW",
"name": "Car",
"description": "Nice car",
"amount_in_cents": 1000035,
"quantity_available": 2,
"custom_attributes": { "number_of_doors": "4" },
"additional_attributes": {},
"account_id": 1,
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:30:00Z"
}

Possible errors

StatusWhen
401Missing or invalid token.
422Validation error.

Search products

POST /api/v1/accounts/{account_id}/products/search

Searches products with a Ransack‑style query object. See API structure → Search for the predicate list.

Body

{
"query": {
"identifier_eq": "SKU-12345",
"name_cont": "Car",
"description_cont": "electric",
"amount_in_cents_gteq": 1000,
"quantity_available_gt": 0,
"created_at_gteq": "2025-01-01T00:00:00Z",
"updated_at_lteq": "2025-01-31T23:59:59Z"
}
}

Example request

curl -X POST "https://app.woofedcrm.com/api/v1/accounts/1/products/search" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-d '{
"query": {
"name_cont": "Car",
"amount_in_cents_gteq": 1000
}
}'

Example response — 200 OK

{
"data": [
{
"id": 7,
"identifier": "SNS895SASXVDW",
"amount_in_cents": 1000035,
"quantity_available": 2,
"description": "Nice car",
"name": "Car",
"custom_attributes": { "number_of_doors": "4" },
"additional_attributes": {},
"created_at": "2025-01-12T18:21:03Z",
"updated_at": "2025-01-12T18:21:03Z",
"account_id": 1
}
],
"pagination": {
"page": 1,
"items": 1,
"count": 1,
"pages": 1,
"from": 1,
"last": 1,
"to": 1,
"prev": null,
"next": null
}
}

Possible errors

StatusWhen
400Malformed JSON body.
401Missing or invalid token.
422Unknown predicate or unsearchable field.

Update product

PUT /api/v1/accounts/{account_id}/products/{id}

Updates an existing product. You can change any subset of fields; omitted fields are left untouched.

Body

{
"identifier": "PROD-123",
"amount_in_cents": 150099,
"quantity_available": 2,
"description": "Car description",
"name": "Car",
"custom_attributes": { "number_of_doors": "4" }
}

Example request

curl -X PUT "https://app.woofedcrm.com/api/v1/accounts/1/products/1" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-d '{
"amount_in_cents": 150099,
"quantity_available": 2
}'

Example response — 200 OK

{
"id": 1,
"identifier": "PROD-123",
"name": "Car",
"description": "Car description",
"amount_in_cents": 150099,
"quantity_available": 2,
"custom_attributes": { "number_of_doors": "4" },
"additional_attributes": {},
"account_id": 1,
"updated_at": "2025-01-20T11:42:18Z"
}

Possible errors

StatusWhen
401Missing or invalid token.
404Product not found.
422Validation error.