Edit Product

put
Edit Product

https://api.payant.ng/products/:reference_code
Request
Response
Headers
optional
string
‚Äč
Body Parameters
name
required
string
Product's name
description
required
string
Product's description
unit_cost
required
string
Product's unit cost
type
required
string
Product type product or service
status
required
string
Product satus 1 or 0
200: OK
curl https://api.payant.ng/products/1 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer SECRET_KEY" \
-d '{ "name": "Website Design",
"description": "5 Pages Website plus 1 Year Web Hosting",
"unit_cost": "50000.00",
"type": "service",
"status": "1" }' \
-X PUT
302: Found
{
"status": "success",
"message": "Product updated successfully.",
"data": {
"company_id": 1,
"name": "Website Design",
"description": "5 Pages Website plus 1 Year Web Hosting",
"unit_cost": "50000.00",
"type": "service",
"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/1 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer SECRET_KEY" \
-d '{ "name": "Website Design",
"description": "5 Pages Website plus 1 Year Web Hosting",
"unit_cost": "50000.00",
"list_cost": "60000.00",
"status": "1" }' \
-X PUT

Response

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