PUT   Edit Product


Resource

https://api.payant.ng/products/:product_id

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 status 1 or 0

Example

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 
            

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
  }
}