Working with Images
Currently, the Menu API supports one image per menu item. You can attach or update the image during creation or via an update request.
Adding or Updating an Image
To update the image after creation, use the PATCH Menu Item operation:
PATCH /menu_items/{id}
curl --request PATCH \
--url 'https://api-g.weedmaps.com/wm/2025-07/partners/menu_items/{MENU_ITEM_ID}' \
--header 'accept: application/json' \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json' \
--data '{ "image_url": "https://picsum.photos/300/300" }'
Forcing Image Refresh
In some cases, you may update the underlying image at the same URL. Weedmaps does not re-download images if the URL remains unchanged. To force an update:
{
"image_url": "https://yourcdn.com/image.jpg",
"image_updated_at": 1726163200
}
image_updated_at
must be a valid UNIX timestamp.- Do not use
image_updated_at
if your image URLs change on updates, as it can cause inconsistent behavior.
Troubleshooting Image Uploads
Weedmaps performs validations to ensure images meet security and performance standards. Before contacting support, confirm the following:
1. HEAD Request Support
- Weedmaps issues a HEAD request to your image URL before downloading.
- Your server must respond with HTTP 200 OK.
- If your service blocks HEAD requests, contact your hosting provider—Weedmaps cannot bypass this restriction.
2. Valid Image Formats
- Supported formats: JPG and PNG.
- The Content-Type header must match the actual image file type.
- Example: If your response header says
image/jpeg
but the file is actually a PNG, the image will be rejected.
How to Verify Locally
file -b --mime-type ~/path/to/image.jpg
This command shows the true file type. Ensure it matches your Content-Type
header.
Updated 4 days ago