Skip to main content
PATCH
/
api
/
canary
/
products
/
{id}
Update Product
curl --request PATCH \
  --url https://api.cashful.africa/api/canary/products/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "metadata": {
    "sku": "PROD-001"
  }
}
'
{
  "id": "product_001",
  "merchantId": "merchant_456",
  "name": "Airtime",
  "description": "Mobile phone airtime",
  "amount": 5000,
  "currency": "ZAR",
  "active": true,
  "imageId": "file_abc123xyz",
  "imageUrl": "https://my-bucket.s3.af-south-1.amazonaws.com/merchant_123/1736951234567-a1b2c3-airtime.png",
  "metadata": {
    "category": "telecom",
    "provider": "vodacom"
  },
  "createdAt": "2025-01-15T10:30:00.000Z",
  "updatedAt": "2025-01-15T10:30:00.000Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The unique identifier of the product

Body

application/json

Product update details

metadata
object
required

Optional custom metadata

Example:
{ "sku": "PROD-001" }
name
string

The name of the product

description
string

A description of the product

amount
number

The price of the product in the smallest currency unit

active
boolean

Whether the product is active

imageId
string

The ID of the product image file

Response

Product updated successfully

id
string
required

Unique identifier

createdAt
string<date-time>
required
updatedAt
string<date-time>
required
merchantId
string
required
name
string
required
currency
string
required
active
boolean
required
metadata
object
required
Example:
{ "sku": "PROD-001" }
deletedAt
string<date-time>
description
string
amount
number
imageId
string

The ID of the product image file

imageUrl
string

The public URL of the product image