Create a new product
POSThttps://core-prod.malipopay.co.tz/api/v1/product
Creates a new product record for the project
Request
- application/json
- Body
- Example (auto)
Bodyrequired
namestringrequired
Product or service name
Example:
Website Design Packagedescriptionstring
Detailed description of the product
Example:
Full responsive website with 5 pagespricenumberrequired
Price of the product
Example:
1500000currencystringrequired
Currency code
Example:
TZScategorystring
Product category
Example:
Digital Servicesunitstring
Unit of measure (e.g., piece, hour, month)
Example:
projecttaxableboolean
Whether this product is taxable
Example:
trueactiveboolean
Whether this product is currently active
Example:
true{
"name": "Website Design Package",
"description": "Full responsive website with 5 pages",
"price": 1500000,
"currency": "TZS",
"category": "Digital Services",
"unit": "project",
"taxable": true,
"active": true
}
Responses
- 201
- 400
- 500
Product created successfully
- application/json
- Schema
- Example (auto)
Schema
_idstring
Example:
64d3ef701b4c8f2a0e6b3d92namestring
Example:
Website Design Packagedescriptionstring
Example:
Full responsive website with 5 pagespricenumber
Example:
1500000currencystring
Example:
TZScategorystring
Example:
Digital Servicesunitstring
Example:
projecttaxableboolean
Example:
trueactiveboolean
Example:
trueprojectstring
Project ID this product belongs to
Example:
63db68a6c5f3e7682e23c2cadeletedboolean
Example:
falsecreatedAtdate-time
Example:
2024-03-01T10:00:00.000ZupdatedAtdate-time
Example:
2024-03-01T10:00:00.000Z{
"_id": "64d3ef701b4c8f2a0e6b3d92",
"name": "Website Design Package",
"description": "Full responsive website with 5 pages",
"price": 1500000,
"currency": "TZS",
"category": "Digital Services",
"unit": "project",
"taxable": true,
"active": true,
"project": "63db68a6c5f3e7682e23c2ca",
"deleted": false,
"createdAt": "2024-03-01T10:00:00.000Z",
"updatedAt": "2024-03-01T10:00:00.000Z"
}
Validation error
- application/json
- Schema
- Example (auto)
Schema
codeint32required
messagestringrequired
{
"code": 0,
"message": "string"
}
Internal server error
- application/json
- Schema
- Example (auto)
Schema
codeint32required
messagestringrequired
{
"code": 0,
"message": "string"
}
Authorization: apiToken
name: apiTokentype: apiKeyin: headerdescription: Project API key. Get yours from the Malipopay dashboard under Settings → API Keys.
- curl
- python
- nodejs
- php
- java
- go
- CURL
curl -L 'https://core-prod.malipopay.co.tz/api/v1/product' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'apiToken: <apiToken>' \
-d '{
"name": "Website Design Package",
"description": "Full responsive website with 5 pages",
"price": 1500000,
"currency": "TZS",
"category": "Digital Services",
"unit": "project",
"taxable": true,
"active": true
}'
Response