ProductDto reference
ProductDto is the request body for creating a product (POST /api/v1/products) and replacing one (PUT /api/v1/products/{productId}) with the Products API. This reference lists every field the server reads, the shape of the elements inside its JSON-string fields, the fields that are ignored on input, how to turn a GET response into a PUT body, and the fields of the variant items GET returns. Field names on the wire are camelCase, exactly as written here; on input the server also accepts other casings. Where this page and the OpenAPI spec differ, this page describes what the server actually does.
Where this type is used
POST /api/v1/productsandPUT /api/v1/products/{productId}takeProductDtoas a flat JSON body.GET /api/v1/productsandGET /api/v1/products/{productId}return a different, nested shape: prices underpricing, images underimages, variants undervariants, pre-order settings underpreOrderand POS IDs underintegrations. This is by design. To send a product you have read back with PUT, flatten it first (see "From a GET response to a PUT body").PATCH /api/v1/products/{productId}takes its own smaller body (productName,description,category,brand,supplier,sku,janCode,basePrice,baseCostPrice,taxRate,status) and leaves every other field unchanged. Prefer it when those are all you change.- Variants are not changed through
ProductDto. Replace the whole list withPUT /api/v1/products/{productId}/variants(see "Replace the variants" in Using the Products API).
Rules for POST and PUT
productNameis required on both. A missing or blank name returns400with{"error": "productName is required"}.statusmust beActive,DraftorDiscontinued. Any other value returns400with{"error": "invalid_status", "status": "...", "allowed": ["Active", "Draft", "Discontinued"]}. On PUT, the product's current status is accepted even if it is something else.- The business account comes from the token and the
organizationIdquery parameter. AnorganizationIdin the body is ignored. - POST:
productIdis optional; leave it out and the server assigns a GUID. If you supply an ID that already exists in the business account, the call returns409with{"error": "product_exists", "productId": "...", "deleted": false}and nothing is written. A deleted product's ID stays taken; thendeletedistrue. - PUT: the product is the one in the path, and
productIdin the body is ignored. PUT replaces the product. A field you leave out takes the default shown in the tables below, unless the table says PUT keeps the stored value. - Variants: POST and PUT both ignore
hasVariants,variantOptionsJsonandvariants. A product created with POST starts without variants, and PUT leaves the existing variants and options as they are. - Lists are sent as JSON strings, not arrays:
storePricesJsonandimageUrlsJson. - Success is
200with the saved product in the GET response shape.
Identity and basic information
| Field | Type | Notes |
|---|---|---|
productId | string | POST only, optional (see above). Ignored on PUT. |
organizationId | string | Ignored on input. |
productName | string | Required. |
sku | string | SKU code. Not checked for uniqueness. |
janCode | string | JAN code (barcode). |
category | string | Flat category name, not a hierarchy. |
brand | string | |
supplier | string | |
description | string | |
unit | string | Unit label, such as pcs or kg. |
internalMemo | string | Internal note. |
Every string field defaults to an empty string.
Specifications, B2B and trade
These are all strings: modelNumber, series, color, size, weight, contentVolume, material, specification, countryOfOrigin, casePackSize, minimumOrderQuantity, leadTimeDays, hsCode, storageRequirements, certifications. Note that casePackSize, minimumOrderQuantity and leadTimeDays are strings, not numbers.
| Field | Type | Default | Notes |
|---|---|---|---|
orderByCase | boolean | false | B2B EC orders must be a multiple of casePackSize. |
b2becStockMode | string | None | How B2B EC orders draw on stock: None (orders do not touch stock), StockOnly (an order beyond available stock is refused), Backorder (available stock is reserved, the rest waits for stock). Any other value is saved as None. |
GET returns both at the top level under the same names.
Prices
| Field | Type | Default | Notes |
|---|---|---|---|
basePrice | number | 0 | Selling price, tax excluded. |
baseCostPrice | number | 0 | Cost price. |
taxRate | number | 0.10 | A fraction: 0.10 is 10%, 0.08 is 8%. |
storePricesJson | string (JSON) | empty | Per-store overrides: an array of store price elements, sent as a string. Elements whose storeId is not a store of this business account are dropped on save. |
Store price element
Each element inside storePricesJson:
| Field | Type | Notes |
|---|---|---|
storeId | string | Store ID in this business account. |
storeName | string | Display name. |
price | number | Selling price at that store. 0 means use basePrice. |
costPrice | number | Cost at that store. 0 means use baseCostPrice. |
A store with no element uses basePrice and baseCostPrice. Keys inside a stored JSON string may come back as StoreId, Price and so on; parse them case-insensitively.
Images
| Field | Type | Notes |
|---|---|---|
imageUrl | string | Cover image URL. Returned as images.cover. To upload a file instead, use POST /api/v1/products/{productId}/image. |
imageUrlsJson | string (JSON) | The whole gallery as a JSON array of URL strings. Returned as images.gallery; when it is empty, the gallery holds imageUrl alone. |
Status, order and pre-order
| Field | Type | Default | Notes |
|---|---|---|---|
status | string | Active | One of Active, Draft, Discontinued. Anything else returns 400 (invalid_status); on PUT the product's current value is also accepted. |
sortOrder | integer | 0 | Display order. |
isPreOrder | boolean | false | |
preOrderReleaseDate | string (ISO 8601) or null | null | A value without a time zone is stored as UTC. null means the date is not decided. |
preOrderNote | string | empty |
Variants
| Field | Type | Notes |
|---|---|---|
hasVariants | boolean | Ignored on POST and PUT. It is true when the product has at least one variant, and GET returns it as variants.hasVariants. |
variantOptionsJson | string (JSON) | Ignored on POST and PUT. The options are derived from the variants' attributes, and GET returns them as variants.options (an array of elements with name and values). |
variants | array | Ignored on POST and PUT. Create, change and delete variants with PUT /api/v1/products/{productId}/variants. |
The body of the variants endpoint, its rules for creating, updating and deleting, and its errors are under "Replace the variants" in Using the Products API.
POS and e-commerce link fields
The Square, Smaregi and Shopify imports set these IDs, and later syncs use them to match products. Through the API, POST accepts only smaregiProductId, and PUT accepts some of them only when they are not empty.
| Field | Type | POST | PUT |
|---|---|---|---|
squareCatalogObjectId | string | Ignored. | Saved only when not empty; otherwise the stored value is kept. |
squareVariationId | string | Ignored. | Saved only when not empty. |
squareVersion | integer | Ignored. | Ignored. |
squarePushedAt | string (ISO 8601) or null | Ignored. | Ignored. |
squarePushError | string | Ignored. | Ignored. |
smaregiProductId | string | Saved. | Saved only when not empty. |
shopifyProductGid | string | Ignored. | Ignored. |
shopifyShopDomain | string | Ignored. | Ignored. |
shopifyUpdatedAt | string (ISO 8601) or null | Ignored. | Ignored. |
GET returns squareCatalogObjectId, squareVariationId and smaregiProductId under integrations. The other fields in this table are not returned.
Brand catalog fields
| Field | Type | Notes |
|---|---|---|
sourceBrandOrgId | string | The business account the product was imported from. Ignored on POST and PUT. |
sourceBrandProductId | string | The product ID in that business account. Ignored on POST and PUT. |
sourceBrandSyncedAt | string (ISO 8601) or null | When the import last ran. Ignored on POST and PUT. |
allowSubscriptions | boolean | Default false. The brand's opt-in that lets stores import this product. Saved on POST and PUT, and returned at the top level by GET. |
sourceBrandOrgId, sourceBrandProductId and sourceBrandSyncedAt are not returned by GET.
Fields the server manages
createdAtandupdatedAtare set by the server and ignored on input. GET returns them.isDeletedis ignored on input; use DELETE. A deleted product returns404on GET, PUT, PATCH and DELETE.
Response-only fields, ignored on input
The OpenAPI spec currently lists the following as properties of the request body. The server ignores them on POST and PUT, and none of them appears on the product in a GET response. Send the underlying field instead (storePricesJson, imageUrlsJson, basePrice and so on).
imageUrls, variantOptions, storePrices, minVariantPrice, maxVariantPrice, isLinkedToSquare, isFromShopify, isFromBrand, preOrderReleaseDateDisplay, formattedBasePrice, formattedBaseCostPrice, taxIncludedPrice, formattedTaxIncludedPrice, profitMargin, taxRateDisplay, statusDisplayJa, statusBadgeClass
From a GET response to a PUT body
Read the product with GET /api/v1/products/{productId}, then map it as follows. Read it with the same token you will write with: tokens that can write always see every store's prices and the cost prices, so the copy you send back is complete.
| GET response | PUT body |
|---|---|
id | The path (/api/v1/products/{productId}) |
pricing.basePrice / pricing.baseCostPrice / pricing.taxRate | basePrice / baseCostPrice / taxRate |
pricing.storePrices (array) | storePricesJson (the array serialized to a string) |
images.cover | imageUrl |
images.gallery (array) | imageUrlsJson (serialized to a string) |
variants (hasVariants, options, items) | Do not send; ignored. PUT does not change variants. |
preOrder.isPreOrder / preOrder.releaseDate / preOrder.note | isPreOrder / preOrderReleaseDate / preOrderNote |
integrations.squareCatalogObjectId / squareVariationId / smaregiProductId | The same names at the top level, or leave them out (PUT keeps them). |
orderByCase / b2becStockMode / allowSubscriptions | The same names, copied from the top level. |
createdAt / updatedAt | Do not send; ignored. |
Everything else (productName, sku, specification, status, sortOrder and so on) | The same name. |
Mapped this way, a PUT changes only the fields you edited. The status you read back is always accepted.
Variant items in GET responses
variants.items is filled only by GET /api/v1/products/{productId}; the list returns it empty. Each item has these fields. To change them, use PUT /api/v1/products/{productId}/variants.
| Field | Type | Notes |
|---|---|---|
variantId | string | Use it in the variants body to refer to an existing variant. |
parentProductId | string | The parent product's ID. |
sku / janCode / imageUrl | string | |
attributes | object | Option values as an object of name to value, such as {"Size":"M"}. |
attributesJson | string (JSON) | attributes as a JSON string. |
displayLabel | string | The values of attributes joined with " / "; the sku when there are no attributes. |
basePrice / baseCostPrice / taxRate | number | Same meaning as on the product. |
storePrices | array | Store price elements, in the same shape as the product's pricing.storePrices. |
status | string | One of Active, Draft, Discontinued. |
sortOrder | integer | Display order. |
squareVariationId / shopifyVariantGid | string | External IDs. |
createdAt / updatedAt | string (ISO 8601) |
Formatted prices, statusDisplayJa, statusBadgeClass and the raw storePricesJson are not returned. For a token that cannot see every store's prices and costs, storePrices holds only the caller's own stores and baseCostPrice reads as 0, as on the product.
Example POST body
{
"productName": "House Blend",
"sku": "CFE-BLD",
"category": "Drinks",
"basePrice": 480,
"baseCostPrice": 120,
"taxRate": 0.08,
"storePricesJson": "[{\"storeId\":\"{storeId}\",\"storeName\":\"Main store\",\"price\":500,\"costPrice\":120}]",
"imageUrlsJson": "[\"https://example.com/a.jpg\",\"https://example.com/b.jpg\"]",
"imageUrl": "https://example.com/a.jpg",
"status": "Active"
}
To give the product sizes or colours, take the id from the response and add variants with PUT /api/v1/products/{productId}/variants.
Related guides
-
Using the Products APIHow to list, read, create, patch, replace, soft-delete, replace the variants of, and upload cover images for products with the Products API (/api/v1/products), with exact field names.
-
Product master (PIM) and category dataExplains the data structure of ReceiptRoller's product master (PIM), categories, and variations, CRUD operations, SKU management, and synchronization patterns with e-commerce.
-
Sync your product catalogue with ReceiptRollerBuild a Node.js script that reads a local CSV or JSON file, matches products by SKU, and creates or patches them through the Products API.