Measure MapAPI

Update a product

PUT/products/{id}
products:write EnterpriseOpen Guest
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

  • idstringrequired
    The product's ID.

Request body application/json

Fields of ProductInput:

  • namestring
  • descriptionstring
  • categorystring
  • colorstring
  • iconstring
  • thumbnailUrlstring(uri)
  • textureUrlstring(uri)
  • textureTileMetersnumber
    0.01 to 20
  • enabledboolean
    Defaulttrue
  • archivedboolean
  • taxRatenumber
    0 to 100
  • costPricenumber
    What the product costs you, for your own margin in the app. Stored, never returned.
    ≥ 0
  • pricingobject
    How a product is charged, by area, by length or per spot. A new price needs its unit and currency; on an update, a price sent without them keeps the product's own.
  • distancePricingobject
    How a product is charged, by area, by length or per spot. A new price needs its unit and currency; on an update, a price sent without them keeps the product's own.
  • itemPricingobject
    How a product is charged, by area, by length or per spot. A new price needs its unit and currency; on an update, a price sent without them keeps the product's own.
  • at most 24 items

Responses

  • Product:

    • typestringrequired
      Always"product"
    • idstringrequired
    • namestringrequired
    • descriptionstring
    • ownerUidstringrequired
      Whose catalogue it belongs to, the organisation owner's or yours.
    • createdOninteger(int64)
    • enabledbooleanrequired
      Offered in the pickers.
    • archivedbooleanrequired
    • categorystring
    • colorstring
    • iconstring
    • thumbnailUrlstring(uri)
    • textureUrlstring(uri)
      A picture that fills shapes priced with it on the map.
    • textureTileMetersnumber
      Ground covered by one tile of the texture, in metres.
    • taxRatenumber
      A percentage. Absent means the project's rate applies; 0 means untaxed.
    • pricingobject
      How a product is charged, by area, by length or per spot. A new price needs its unit and currency; on an update, a price sent without them keeps the product's own.
    • distancePricingobject
      How a product is charged, by area, by length or per spot. A new price needs its unit and currency; on an update, a price sent without them keeps the product's own.
    • itemPricingobject
      How a product is charged, by area, by length or per spot. A new price needs its unit and currency; on an update, a price sent without them keeps the product's own.

Errors

A failed request answers with one of these, in an Error body.

400invalid_bodyA value in the request body is missing, has the wrong type, is too long or is not one of the accepted values.
400invalid_product_pricingA product's prices are not complete or not valid. Check the unit, the currency, the type and every tier.
401unauthorized_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.
403insufficient_scopeThe key does not have the access this endpoint needs. Create a key with that access.
403invalid_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.
404not_foundThe folder or product does not exist, or is not in your catalogue.

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_Lw7Qm2Xc

Fill in your API key to send.

As a cURL command
Shell
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
  }
}'