List a product’s variants
In the store’s order. Search matches the variant’s title or SKU.
GET
In the store’s order. Search matches the variant’s title or SKU.
apiKey readheader
AuthorizationBearer <token>A workspace API key (pf_…), created under Developers → API keys.
Scope: read
id*stringFormat
uuidpage?integerStarts at 1
Range
1 <= valueDefault
1pageSize?numberOne of 10, 25, 50, 100
Default
25q?stringSearch
Length
1 <= length <= 200locale?stringContent locale; the workspace default without one
Length
length <= 35stock?stringComma-separated, any of: in_stock, out_of_stock, not_tracked
sort?stringOne of position, title, price, inventory; prefix with - for descending
Default
"position"Value in
"position""-position""title""-title""price""-price""inventory""-inventory"OK
application/json- response
items*array<>total*integerpage*integerpageSize*integercurl -X GET 'https://api.postforge.dev/v1/products/497f6eca-6276-4993-bfeb-53cbbbba6f08/variants'{ "items": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "externalId": "string", "locale": "string", "title": "string", "sku": "string", "barcode": "string", "options": [ { "name": "string", "value": "string" } ], "image": { "url": "http://example.com", "alt": "string" }, "price": { "amount": 0, "currency": "str" }, "compareAtPrice": { "amount": 0, "currency": "str" }, "stock": "in_stock", "inventory": 0, "continueSellingWhenOutOfStock": true, "availableForSale": true, "position": 0, "removedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } ], "total": 0, "page": 0, "pageSize": 0}