Check a file of codes
Reads a CSV of codes (a column named code, coupon or discount code, else the first column) and says how many would be imported, which the file has twice, which the store has already, and which rows can’t be a code and why. Imports nothing.
POST
Reads a CSV of codes (a column named code, coupon or discount code, else the first column) and says how many would be imported, which the file has twice, which the store has already, and which rows can’t be a code and why. Imports nothing.
apiKey writeheader
AuthorizationBearer <token>A workspace API key (pf_…), created under Developers → API keys.
Scope: write
idempotency-key?stringRun this write once: a retry with the same key gets the first answer (24 hours).
Length
1 <= length <= 255application/json- body
storeId*stringFormat
uuidcsv*stringLength
length <= 25000000OK
application/json- response
column*string|nullrows*integervalid*integersamples*array<string>duplicates*integerexisting*integerexistingSamples*array<string>invalid*integerproblems*array<>curl -X POST 'https://api.postforge.dev/v1/coupons/import-check' \ -H 'Content-Type: application/json' \ -d '{ "storeId": "b8adcdc8-9238-4168-90f8-77b2d14c211c", "csv": "string"}'{ "column": "string", "rows": 0, "valid": 0, "samples": [ "string" ], "duplicates": 0, "existing": 0, "existingSamples": [ "string" ], "invalid": 0, "problems": [ { "row": 0, "value": "string", "reason": "string" } ]}