Bulk Product and Modifier Documentation

Bulk Product and Modifier Documentation

API version "1". This guide is for ISV integrators who create many products or modifiers in a merchant's Valor catalogue in one call.

1. Overview

Three operations are available on the existing e-commerce endpoint, POST deeplink/index.php, each chosen by txn_type:

Operationtxn_typeWhat it does
Submit productsbulk_add_productsAccepts 1–1000 products and returns at once; they are created in the background
Submit modifiersbulk_add_modifiersAccepts 1–1000 modifiers and returns at once; they are created in the background
Check status and resultsbulk_product_statusReturns the progress and, once finished, the outcome of every item

Authenticate exactly as for addProduct: send appid, appkey and epi in the JSON body. Every request is limited to the merchant those credentials belong to; you can never see or change another merchant's catalogue or requests.

Every response uses the usual envelope: error_no, mesg, msg, desc. Success is error_no S00 with HTTP 200; every error is HTTP 400 with an error code (section 10).

2. Before you start

  • One request at a time per merchant. While a merchant has a bulk request pending or processing (products or modifiers), a new submit for that merchant returns G55. Retry after the current one finishes.
  • Modifiers first. A product's selected_group may only name modifier groups that already exist for the merchant. Send the modifiers in a bulk_add_modifiers request, wait for it to complete, then send the products.
  • Results are kept for 24 hours after a request finishes. After that the status call returns G56.

3. Submit products (bulk_add_products)

FieldTypeRequiredRule
txn_typestringyesbulk_add_products
api_versionstringyes"1"; anything else is G57
appid, appkey, epistringyesYour credentials, as for addProduct
idempotency_keystringyes1–64 letters, digits, - or _ (else G53); see section 8
productsarrayyes1–1000 products (missing or empty is G52; more than 1000 is G49); field reference in section 6

The whole body may be at most 5 MB (G51); a body that is not valid JSON is G58. A modifiers field sent here is ignored.

Example:

{
    "txn_type": "bulk_add_products",
    "api_version": "1",
    "appid": "<app id>",
    "appkey": "<app key>",
    "epi": "<epi>",
    "idempotency_key": "catalog-2026-11-05-001",
    "products": [
        {
            "product_code": "SKU0001",
            "item_name": "Latte",
            "description": "Hot latte",
            "unit_cost": "3.75",
            "inventory": "No",
            "taxable": "Yes",
            "category": "Coffee",
            "is_active": 1,
            "no_comm_uom": "Yes",
            "is_food_product": "Yes"
        },
        {
            "product_code": "SKU0002",
            "item_name": "Coffee beans",
            "description": "Beans 1 kg",
            "unit_cost": "18.00",
            "inventory": "No",
            "taxable": "Yes",
            "category": "Coffee",
            "is_active": 1,
            "no_comm_uom": "No",
            "commodity_code": "COF001",
            "unit_of_measure": "Kilogram",
            "unit_of_measure_value": "1"
        }
    ]
}

Response (nothing has been created yet; processing starts in the background):

{
    "error_no": "S00",
    "mesg": "SUCCESS",
    "msg": "SUCCESS",
    "desc": "Request submitted successfully",
    "bulk_request_id": "blk_7f3a91c2",
    "status": "pending",
    "replayed": false
}
Response fieldMeaning
bulk_request_idThe id to use with bulk_product_status
statuspending, processing, completed or failed
replayedtrue when this idempotency key was already used with the same body; nothing new was submitted

4. Submit modifiers (bulk_add_modifiers)

The same as section 3, with txn_type bulk_add_modifiers and a modifiers array of 1–1000 modifiers instead of products (missing or empty is G61; more than 1000 is G50). A products field sent here is ignored. The response is the same.

5. Check status and results (bulk_product_status)

FieldTypeRequiredRule
txn_typestringyesbulk_product_status
api_versionstringyes"1"
appid, appkey, epistringyesYour credentials
bulk_request_idstringyesFrom the submit response; another merchant's id, an unknown id or one finished more than 24 hours ago is G56

Response:

FieldMeaning
bulk_request_id, statusAs in the submit response
submitted_at, finished_atUTC times; finished_at is null until the request finishes
counts.products, counts.modifiersEach { total, created, already_exists, failed }; only the request's own kind is filled, the other is all zero
resultsPresent once status is completed or failed: one entry per item, in the order you sent them

Each result has type (product or modifier), position (1-based, in the list you sent), product_code, item_name, outcome and, when the outcome is failed, error_no and error_desc.

6. Field reference

Each item is checked with the same rules, and gives the same error codes, as addProduct or addModifier. The line-item fields (no_comm_uom, commodity_code, unit_of_measure, unit_of_measure_value, is_food_product) are taken by the bulk calls only. A bad item fails on its own; the rest of the request goes on.

Products

FieldTypeRequiredRuleError
product_codestringyes1–12 of A-Z a-z 0-9 @ #G08 missing, G26 invalid
item_namestringyesUp to 50 characters, no < or >G09
descriptionstringyesUp to 50 characters, no < or >G28
unit_coststring or numberyesSee section 7G21, G34
quantityintegerwhen inventory is Yes1–99999 when inventory is Yes; omit or 0 when NoG10, G25
inventorystringyesYes or NoG39
taxablestringyesYes or NoG37
is_activeintegeryes0 or 1G38
precedenceintegerno0–99999G27
categorystringyes1–40 letters and digitsG35
no_comm_uomstringyesYes or No. Yes: the item has no commodity code or unit of measure, and the next three fields are ignoredG63
commodity_codestringwhen no_comm_uom is No1–12 letters and digits, no spaces or special charactersG65 missing, E96 invalid
unit_of_measurestringwhen no_comm_uom is NoUp to 30 characters, any characters (< and > included). A standard unit (gram, kilogram, centimeter, meter, liter, milliliter, pound, each; matched exactly, letter case included) is saved as that unit; any other label, including a standard name in another letter case, is saved as the merchant's own unit (Inventory > Settings > Unit Of Measure), which is added if it isn't there alreadyG66
unit_of_measure_valuestring or numberwhen no_comm_uom is NoGreater than 0 and at most 9999999999.99, up to 2 decimalsG67
is_food_productstringnoEmpty, Yes or No; empty means NoG64

Modifiers

FieldTypeRequiredRuleError
item_namestringyesUp to 50 characters, no < or >G09
product_codestringno1–12 of A-Z a-z 0-9 @ #; the item name is used when omittedG26
descriptionstringyesUp to 250 charactersG28
unit_coststring or numberyesSee section 7G21, G34
quantityintegerno0–99999G25
inventorystringyesYes or NoG39
taxablestringyesYes or NoG37
is_activeintegeryes0 or 1G38
precedenceintegeryes0–99999G27
categorystringyes1–40 letters, digits and spacesG35
group_namestringyesUp to 250 characters, no < or >; a modifier without a group cannot be offered by a productA86
no_comm_uomstringyesAs for productsG63
commodity_codestringwhen no_comm_uom is NoAs for productsG65 missing, E96 invalid
unit_of_measurestringwhen no_comm_uom is NoAs for productsG66
unit_of_measure_valuestring or numberwhen no_comm_uom is NoAs for productsG67

Modifiers do not take is_food_product.

7. Amounts

unit_cost may be a JSON string ("3.75") or a JSON number (3.75). It must be greater than zero (else G21) and have at most 6 digits before and 2 after the decimal point (else G34). It is stored as whole cents exactly as you wrote it, never rounded. Forms such as 1e3, +12.99 or values with spaces are refused with G34.

8. Idempotency and retries

  • Choose a new idempotency_key for each new upload (for example a date and a counter).
  • If you are not sure a submit reached us (a timeout, a dropped connection), send exactly the same body with the same key. Within 24 hours you get the original bulk_request_id and replayed: true, and nothing is submitted twice.
  • The same key with a different body is G54.
  • G55 means another request for this merchant is still running: wait and retry; do not change the key.
  • To fix failed items, send a new request (new key) with the corrected items; items already in the catalogue come back as already_exists, never as duplicates.

9. Outcomes

OutcomeMeaning
createdThe item was added to the catalogue
already_existsThe merchant already has this product code (products) or this modifier code or name (modifiers); nothing was changed
failedThe item was not created; error_no and error_desc say why

An item that repeats an earlier item of the same request fails with G59. If processing stops and cannot be finished, the request ends failed and every item not processed fails with G60. If an item could not be saved, it fails with G62: send it again in a new request.

10. Error codes

CodeTextWhere
G49TOO MANY PRODUCTS, MAXIMUM IS 1000submit products
G50TOO MANY MODIFIERS, MAXIMUM IS 1000submit modifiers
G51REQUEST BODY TOO LARGE, MAXIMUM IS 5 MBsubmit
G52PRODUCT LIST IS REQUIREDsubmit products
G53INVALID IDEMPOTENCY KEYsubmit
G54IDEMPOTENCY KEY ALREADY USED WITH A DIFFERENT REQUESTsubmit
G55A BULK REQUEST IS ALREADY IN PROGRESS, RETRY LATERsubmit
G56BULK REQUEST NOT FOUND OR EXPIREDstatus
G57UNSUPPORTED API VERSIONall
G58INVALID REQUEST BODYall
G61MODIFIER LIST IS REQUIREDsubmit modifiers
G08PRODUCT CODE IS REQUIREDper item
G09INVALID ITEM NAMEper item
G10PRODUCT QUANTITY IS REQUIRED AND ALLOWED MAX 5 CHAR INTEGER ONLYper item
G21INVALID PRODUCT AMOUNTper item
G25INVALID PRODUCT QTYper item
G26INVALID PRODUCT CODEper item
G27PRECEDENCE ALLOWED MAX 5 CHAR INTEGER ONLYper item
G28INVALID DESCRIPTIONper item
G34AMOUNT EXCEEDEDper item
G35INVALID CATEGORYper item
G37TAX SHOULD BE ALLOWED YES OR NOper item
G38IS ACTIVE SHOULD BE ALLOWED 0 OR 1per item
G39INVENTORY SHOULD BE ALLOWED YES OR NOper item
G41INVALID SELECTED GROUPper item
A86INVALID MODIFIER GROUP NAMEper item
G59DUPLICATE IN THIS REQUESTper item
G60PROCESSING DID NOT COMPLETEper item
G62ITEM COULD NOT BE SAVED, PLEASE RESENDper item
G63NO_COMM_UOM MUST BE YES OR NOper item
G64IS_FOOD_PRODUCT MUST BE YES OR NOper item
G65COMMODITY CODE IS REQUIREDper item
E96INVALID COMMODITY CODEper item
G66INVALID UNIT OF MEASUREper item
G67INVALID UNIT OF MEASURE VALUEper item
G68UNIT OF MEASURE COULD NOT BE ADDED (a new merchant unit could not be saved; the item is not created)per item

Authentication failures return the same codes addProduct returns.

11. Merchant e-mail

When a request finishes, the merchant receives one e-mail at the address on file for their account: the request reference, the times, the counts, and the failed items with their codes (up to 200; beyond that the e-mail gives the number of further failures, and you can see them all with the status call). If processing stopped, the e-mail says so. When the merchant has no address on file, no e-mail is sent; your results are unaffected.

12. Limits summary

LimitValue
Products per request1–1000
Modifiers per request1–1000
Request body5 MB
Idempotency key1–64 of letters, digits, -, _
Requests in progress per merchant1
Results kept after finishing24 hours
Failures listed in the merchant e-mail200