Products
In Mercantive, products represent the digital goods you provide to your customers.
Each product is associated with a Store and can include multiple product variants.
The Product object
The product model contains the following attributes:
Properties
- Name
id
- Type
- uuid
- Description
Unique identifier for the product.
- Name
store_id
- Type
- uuid
- Description
Unique identifier for the store that the product belongs to.
- Name
name
- Type
- string
- Description
Name of the product.
- Name
description
- Type
- string
- Description
Description of the product. Can be null if no description is provided.
- Name
slug
- Type
- string
- Description
A unique, human-readable identifier used in product URLs.
- Name
published
- Type
- boolean
- Description
Indicates whether the product is published and visible to customers.
- Name
display_on_storefront
- Type
- boolean
- Description
Indicates whether the product is displayed on the store's storefront.
- Name
type
- Type
- enum
- Description
The type of product (e.g.,
ONLINE_COURSE
,EBOOK
,AUDIO
,VIDEO
,IMAGE
,FILE
,MUSIC
,ONLINE_SERVICE
,ONLINE_EVENT
,SOFTWARE
,SAAS
,DESIGN
).
- Name
email_receipt_button_text
- Type
- string
- Description
Text for a button that can be included in email receipts. Can be null if not set.
- Name
email_receipt_button_link
- Type
- string
- Description
Link for a button that can be included in email receipts. Can be null if not set.
- Name
email_receipt_message
- Type
- string
- Description
Additional message to include in email receipts. Can be null if not set.
- Name
archived
- Type
- boolean
- Description
Indicates whether the product is archived and hidden from customers.
- Name
created_at
- Type
- timestamp
- Description
Timestamp of when the product was created.
- Name
updated_at
- Type
- timestamp
- Description
Timestamp of when the product was last updated.
List all products
This endpoint retrieves a list of all products from your store.
Optional attributes
- Name
page
- Type
- integer
- Description
The page number to retrieve.
Request
curl -X GET https://api.mercantive.com/v1/products \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json"
Response
{
"data": [
{
"id": "9d1e6c3b-31e7-4ecc-a2a6-426403695a2c",
"store_id": "9d1c9180-fe08-4fe4-abf6-50aee88940eb",
"name": "How to learn Laravel",
"description": null,
"slug": "monwTr0",
"published": false,
"display_on_storefront": true,
"type": "ONLINE_COURSE",
"email_receipt_button_text": null,
"email_receipt_button_link": null,
"email_receipt_message": null,
"archived": false,
"created_at": "2024-09-28T16:11:43.000000Z",
"updated_at": "2024-09-28T16:11:43.000000Z"
},
{
"id": "9d1e6c55-08ab-4f5c-8e69-5e6541ecd9f1",
"store_id": "9d1c9180-fe08-4fe4-abf6-50aee88940eb",
"name": "How to learn Vue",
"description": null,
"slug": "VNPbeoI",
"published": false,
"display_on_storefront": true,
"type": "ONLINE_COURSE",
"email_receipt_button_text": null,
"email_receipt_button_link": null,
"email_receipt_message": null,
"archived": false,
"created_at": "2024-09-28T16:12:00.000000Z",
"updated_at": "2024-09-28T16:12:01.000000Z"
}
],
"links": {
"first": "https://api.mercantive.com/v1/products?page=1",
"last": "https://api.mercantive.com/v1/products?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "Previous",
"active": false
},
{
"url": "https://api.mercantive.com/v1/products?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next",
"active": false
}
],
"path": "https://api.mercantive.com/v1/products",
"per_page": 25,
"to": 3,
"total": 3
}
}