Add Product

post
Add product

https://api.payant.ng/products
Request
Response
Headers
Authorization
required
string
Payant secret key prefixed with "Bearer "
Body Parameters
store_id
required
string
Store ID
name
required
string
Product's name
description
required
string
Product's description
unit_cost
required
string
Product's unit cost
type
required
string
Products type product or service
list_cost
required
string
Product's list cost
200: OK
{
"status": "success",
"message": "Product created successfully.",
"data": {
"company_id": 1,
"name": "Website Design",
"description": "5 Pages Website plus 1 Year Web Hosting",
"unit_cost": "50000.00",
"image": "default.png",
"status": "1",
"created_at": "2016-12-21 18:46:30",
"updated_at": "2016-12-21 18:46:30",
"id": 1
}
}

Request

curl https://api.payant.ng/products \
-H "Content-Type: application/json" \
-H "Authorization: Bearer SECRET_KEY" \
-d '{ "store_id": "01",
"name": "Website Design",
"description": "5 Pages Website plus 1 Year Web Hosting",
"unit_cost": "50000.00",
"list_cost": "60000.00",
"type": "service",
"status": "1" }' \
-X POST

Response

{
"status": "success",
"message": "Product created successfully.",
"data": {
"company_id": 1,
"name": "Website Design",
"description": "5 Pages Website plus 1 Year Web Hosting",
"unit_cost": "50000.00",
"image": "default.png",
"status": "1",
"created_at": "2016-12-21 18:46:30",
"updated_at": "2016-12-21 18:46:30",
"id": 1
}
}