Update a product
PUT
/products/{id}Changes a product. Only the fields you send change. A price you send without a unit
or currency keeps the product's own.
Path parameters
idstringrequiredThe product's ID.
Request body application/json
Fields of ProductInput:
namestringdescriptionstringcategorystringcolorstringiconstringthumbnailUrlstring(uri)textureUrlstring(uri)textureTileMetersnumber0.01 to 20enabledbooleanDefaulttruearchivedbooleantaxRatenumber0 to 100costPricenumberWhat the product costs you, for your own margin in the app. Stored, never returned.≥ 0pricingobjectHow a product is charged, by area, by length or per spot. A new price needs itsunitandcurrency; on an update, a price sent without them keeps the product's own.distancePricingobjectHow a product is charged, by area, by length or per spot. A new price needs itsunitandcurrency; on an update, a price sent without them keeps the product's own.itemPricingobjectHow a product is charged, by area, by length or per spot. A new price needs itsunitandcurrency; on an update, a price sent without them keeps the product's own.seasonsarray of Seasonat most 24 items
Responses
typestringrequiredAlways"product"idstringrequirednamestringrequireddescriptionstringownerUidstringrequiredWhose catalogue it belongs to, the organisation owner's or yours.createdOninteger(int64)enabledbooleanrequiredOffered in the pickers.archivedbooleanrequiredcategorystringcolorstringiconstringthumbnailUrlstring(uri)textureUrlstring(uri)A picture that fills shapes priced with it on the map.textureTileMetersnumberGround covered by one tile of the texture, in metres.taxRatenumberA percentage. Absent means the project's rate applies; 0 means untaxed.pricingobjectHow a product is charged, by area, by length or per spot. A new price needs itsunitandcurrency; on an update, a price sent without them keeps the product's own.distancePricingobjectHow a product is charged, by area, by length or per spot. A new price needs itsunitandcurrency; on an update, a price sent without them keeps the product's own.itemPricingobjectHow a product is charged, by area, by length or per spot. A new price needs itsunitandcurrency; on an update, a price sent without them keeps the product's own.seasonsarray of Season
Errors
A failed request answers with one of these, in an Error body.
400
invalid_bodyA value in the request body is missing, has the wrong type, is too long or is not one of the accepted values.400
invalid_product_pricingA product's prices are not complete or not valid. Check the unit, the currency, the type and every tier.401
unauthorized_actionThe item is not on your account or your members', the request came from a web page on a website the key does not allow, or the action is not allowed for this person.403
insufficient_scopeThe key does not have the access this endpoint needs. Create a key with that access.403
invalid_api_keyNo key was sent in the Authorization header, or the key is unknown, revoked, or past the time it kept working after being replaced.Try it
This key is
The key stays in this tab and goes only to the API. Use a sandbox key while you try things: requests are real, and what they change is changed.
The product's ID.
PUT https://api.measuremaponline.com/api/v1/products/prd_Lw7Qm2XcFill in your API key to send.
As a cURL command
curl -X PUT 'https://api.measuremaponline.com/api/v1/products/prd_Lw7Qm2Xc' \
-H "Authorization: $MMO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"pricing": {
"type": "fixed",
"price": 30
}
}'