Products
Update Product
Changed onUpdates a product. Only the fields you send are changed. A field that this endpoint does not accept, such as id or createdAt, is rejected.
Clearing fields:
Send null for slug or defaultPriceId to remove it. Other fields cannot be cleared.
Default price:
defaultPriceId must be an active price of this product. A price that is archived later stays the default until you change it.
Archiving:
Set active to false to archive the product. Products are never deleted.
put/products/{id}
Request
- Base URLhttps://api.monei.com/v1
- AuthAPI key in header Authorization
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"name": "Gold plan",
"description": "Unlimited access to every course",
"images": [
"https://example.com/images/gold-plan.png"
],
"slug": "gold-plan",
"unitLabel": "seat",
"descriptor": "MONEI GOLD",
"defaultPriceId": "3c5a1f8e-2b7d-4e9a-9c41-7d2e6b0f5a13",
"active": true,
"metadata": {
"systemId": "12345"
}
}Response
A product object
Example response
{
"id": "8f2c6d1a-4b3e-4f7a-9d2c-1e5b7a9c3f60",
"name": "Gold plan",
"description": "Unlimited access to every course",
"images": [
"https://example.com/images/gold-plan.png"
],
"slug": "gold-plan",
"unitLabel": "seat",
"descriptor": "MONEI GOLD",
"defaultPriceId": "3c5a1f8e-2b7d-4e9a-9c41-7d2e6b0f5a13",
"active": true,
"metadata": {
"systemId": "12345"
},
"createdAt": 1636366897,
"updatedAt": 1636366897
}Changes
- info
endpoint added
- info