Skip to main content
Nymble Commerce uses Cloudflare Images to store and serve product images via CDN. Use the Images API to upload and manage product images. Every image you upload receives a stable, CDN-backed URL that Nymble Commerce constructs automatically — no signed URLs, no expiry, no extra configuration required. Uploaded images are available at three sizes via their CDN base URL:
VariantURL suffix
Small{baseUrl}/small
Medium{baseUrl}/medium
Large{baseUrl}/large
All endpoints require a valid Bearer token with Admin privileges. The OrganizationId is read from your JWT claims.

Upload images from a local file

Upload a single image file directly from your machine. Nymble Commerce stores the image in Cloudflare Images and optionally associates it with a product by SKU.
POST https://api.achievemomentum.com/api/images/from-local
Content-Type: multipart/form-data

Form fields

image
file
required
The image file to upload. Send as a multipart/form-data file part.
sku
string
The product SKU to associate this image with. If supplied, Nymble Commerce links the image to the matching product after upload.
extractSkuFromImageName
boolean
default:"false"
When true, Nymble Commerce uses the image’s file name (without extension) as the SKU and attempts to find and associate the matching product automatically. Takes precedence over sku when both are provided.

Response

Returns 204 No Content on success.

Example

# Upload and associate by explicit SKU
curl -X POST "https://api.achievemomentum.com/api/images/from-local" \
  -H "Authorization: Bearer {token}" \
  -F "image=@/path/to/widget-blue-large.jpg" \
  -F "sku=WIDGET-BLU-L" \
  -F "extractSkuFromImageName=false"
# Upload and associate by extracting the SKU from the filename
# The file is named WIDGET-BLU-L.jpg, so sku = "WIDGET-BLU-L"
curl -X POST "https://api.achievemomentum.com/api/images/from-local" \
  -H "Authorization: Bearer {token}" \
  -F "image=@/path/to/WIDGET-BLU-L.jpg" \
  -F "extractSkuFromImageName=true"
Name your image files after their product SKUs and set extractSkuFromImageName: true to automate product association during bulk uploads.

Upload images from remote URLs

Provide one or more public image URLs and let Nymble Commerce fetch, process, and store them in Cloudflare Images. You can optionally associate each image with a product. This endpoint processes uploads asynchronously — it returns 204 No Content immediately and the images become available shortly after.
POST https://api.achievemomentum.com/api/images/from-remote

Body parameters

images
array
required
Array of image import objects.

Response

Returns 204 No Content. Image processing is asynchronous — check the List images endpoint to confirm availability.

Example

curl -X POST "https://api.achievemomentum.com/api/images/from-remote" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "images": [
      {
        "imageName": "widget-blue-large",
        "imageUrl": "https://example.com/products/widget-blue-large.jpg",
        "productSku": "WIDGET-BLU-L"
      },
      {
        "imageUrl": "https://example.com/products/WIDGET-RED-M.jpg",
        "extractSkuFromImageName": true
      },
      {
        "imageUrl": "https://example.com/products/banner.jpg"
      }
    ]
  }'
Images without a productSku and without extractSkuFromImageName: true are uploaded to your organization’s image library but are not linked to any product. You can assign them later by updating the product with the image name.

Upload a category image

Upload an image to use as a category’s display image. The image is stored in Cloudflare Images and the resulting URL is associated with the specified category. Pass the category name as a form field alongside the image file.
POST https://api.achievemomentum.com/api/images/category
Content-Type: multipart/form-data

Form fields

image
file
required
The image file to upload.
categoryName
string
required
The name of the category to associate this image with, e.g. Widgets. Spaces are converted to hyphens and the value is lowercased automatically.

Response

imageName
string
The name assigned to the uploaded image.
imageUrl
string
The CDN URL for the uploaded category image.

Example

curl -X POST "https://api.achievemomentum.com/api/images/category" \
  -H "Authorization: Bearer {token}" \
  -F "image=@/path/to/widgets-banner.jpg" \
  -F "categoryName=Widgets"
{
  "imageName": "widgets",
  "imageUrl": "https://images.nymblecommerce.com/cdn-cgi/imagedelivery/pH9SuiVIe-mPijB57aX3RQ/org_4e9b7f22widgets/medium"
}

List images

Retrieve a paginated list of all images in your organization’s library, with optional filtering and sorting.
GET https://api.achievemomentum.com/api/images

Query parameters

pageNumber
integer
default:"1"
The page of results to return.
pageSize
integer
default:"25"
Number of images per page.
sortOn
string
default:"Name"
Field to sort on. Accepts Name or UpdatedAt.
sortDirection
string
default:"asc"
Sort direction. Accepts asc or desc.
filters
array
Optional filter objects. Filter on fields like Name. Supported operators: startswith, contains, notcontains, endswith, equals, notequals.

Response

Returns a paginated result containing an array of image detail objects.

Example

curl -X GET "https://api.achievemomentum.com/api/images?pageNumber=1&pageSize=25&sortOn=UpdatedAt&sortDirection=desc" \
  -H "Authorization: Bearer {token}"
{
  "data": [
    {
      "entity": {
        "id": "euoGMuxTyhp",
        "organizationId": "org_4e9b7f22",
        "name": "widget-blue-large",
        "height": 1200,
        "width": 1200,
        "contentSize": 84320.5,
        "source": "https://example.com/products/widget-blue-large.jpg",
        "format": "jpg",
        "active": true,
        "baseUrl": "https://images.nymblecommerce.com/cdn-cgi/imagedelivery/pH9SuiVIe-mPijB57aX3RQ/euoGMuxTyhp/",
        "smallUrl": "https://images.nymblecommerce.com/cdn-cgi/imagedelivery/pH9SuiVIe-mPijB57aX3RQ/euoGMuxTyhp/small",
        "mediumUrl": "https://images.nymblecommerce.com/cdn-cgi/imagedelivery/pH9SuiVIe-mPijB57aX3RQ/euoGMuxTyhp/medium",
        "largeUrl": "https://images.nymblecommerce.com/cdn-cgi/imagedelivery/pH9SuiVIe-mPijB57aX3RQ/euoGMuxTyhp/large",
        "createdAt": "2024-03-10T08:45:00Z",
        "updatedAt": "2024-03-10T08:45:00Z"
      },
      "links": [
        { "action": "GET", "href": "api/images/euoGMuxTyhp", "rel": "self" }
      ]
    }
  ],
  "totalRecords": 142,
  "currentPage": 1,
  "totalPages": 6
}

Get an image

Retrieve a single image by its ID.
GET https://api.achievemomentum.com/api/images/{id}

Path parameters

id
string
required
The unique identifier of the image to retrieve.

Response

Returns a single image detail object.

Example

curl -X GET "https://api.achievemomentum.com/api/images/euoGMuxTyhp" \
  -H "Authorization: Bearer {token}"
{
  "id": "euoGMuxTyhp",
  "organizationId": "org_4e9b7f22",
  "name": "widget-blue-large",
  "height": 1200,
  "width": 1200,
  "contentSize": 84320.5,
  "source": "https://example.com/products/widget-blue-large.jpg",
  "format": "jpg",
  "active": true,
  "baseUrl": "https://images.nymblecommerce.com/cdn-cgi/imagedelivery/pH9SuiVIe-mPijB57aX3RQ/euoGMuxTyhp/",
  "smallUrl": "https://images.nymblecommerce.com/cdn-cgi/imagedelivery/pH9SuiVIe-mPijB57aX3RQ/euoGMuxTyhp/small",
  "mediumUrl": "https://images.nymblecommerce.com/cdn-cgi/imagedelivery/pH9SuiVIe-mPijB57aX3RQ/euoGMuxTyhp/medium",
  "largeUrl": "https://images.nymblecommerce.com/cdn-cgi/imagedelivery/pH9SuiVIe-mPijB57aX3RQ/euoGMuxTyhp/large",
  "createdAt": "2024-03-10T08:45:00Z",
  "updatedAt": "2024-03-10T08:45:00Z"
}

Delete images

Permanently delete one or more images from your organization’s library by their IDs.
DELETE https://api.achievemomentum.com/api/images

Body parameters

ids
string
required
A comma-separated string of image IDs to delete, e.g. "euoGMuxTyhp,sdFg7hJkLmN".

Response

Returns 204 No Content on success.
Deleting images is permanent and cannot be undone. If a deleted image is referenced by a product’s images array, that product will have broken image links. Remove the image from any product assignments before deleting.

Example

curl -X DELETE "https://api.achievemomentum.com/api/images" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": "euoGMuxTyhp,sdFg7hJkLmN"
  }'

The image object

id
string
Cloudflare Images unique identifier for this image.
organizationId
string
The organization this image belongs to.
name
string
The image name (typically the file name without extension).
height
integer
Image height in pixels.
width
integer
Image width in pixels.
contentSize
number
File size in bytes.
source
string
The original source URL the image was imported from, or "local" if uploaded directly.
format
string
Image format, e.g. jpg, png, webp.
active
boolean
Whether this image is active.
baseUrl
string
The CDN base URL for this image. Append /small, /medium, or /large for the appropriate size variant.
smallUrl
string
Direct CDN URL for the small variant.
mediumUrl
string
Direct CDN URL for the medium variant.
largeUrl
string
Direct CDN URL for the large variant.
createdAt
string
ISO 8601 timestamp of when the image was uploaded.
updatedAt
string
ISO 8601 timestamp of the most recent update.