PUT
/
product
/
{id}
Update a product
curl --request PUT \
  --url https://lightyshare.com/api/token-secured/product/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "product": {
    "title": "<string>",
    "description": "<string>",
    "rent": 1.01,
    "cost": 1,
    "stock_type": 0,
    "sku": "<string>",
    "quantity": 2,
    "equipments": [
      {
        "name": "<string>",
        "quantity": 2
      }
    ],
    "images": [
      {
        "src": "<string>"
      }
    ],
    "online": true,
    "archived": true
  }
}'
{
  "success": true
}

Authorizations

Authorization
string
header
required

Use your API token in the Authorization header with Bearer scheme. Alternative: You can also pass the token as a query parameter ?token=your_token for backward compatibility.

Path Parameters

id
integer
required

Resource identifier

Example:

12345

Query Parameters

token
string
required

User authentication token

Example:

"YOUR_TOKEN"

Body

application/json
product
object
required

Response

Product successfully updated

success
boolean
Example:

true