PaidGoods

Create a product with its variants

POST
/v1/stores/{storeId}/products

Authorization

AuthorizationBearer <token>

API key from Settings → API keys

In: header

Path Parameters

storeId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/stores/string/products" \  -H "Content-Type: application/json" \  -d '{    "product": {      "name": "string"    },    "variants": [      {        "name": "string",        "priceMinor": 0,        "deliveryType": "serials"      }    ]  }'
{  "product": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "slug": "string",    "name": "string",    "descriptionMd": "string",    "currency": "string",    "visibility": "public",    "archived": true,    "groupId": "eb54e96e-21b8-4f54-9cd4-80fccbd06f55",    "categoryIds": [      "7a99018c-b68f-4d32-be08-29a0cbea434a"    ],    "tabs": [      {        "title": "string",        "bodyMd": "string"      }    ],    "badges": [      {        "text": "string",        "icon": "string",        "color": "string",        "showOnCard": true,        "showOnPage": true      }    ],    "statusLabel": {      "text": "string",      "color": "string",      "enabled": true    },    "instructionsMd": "string",    "thankYouMd": "string",    "outOfStockMessage": "string",    "deliverablesLabel": "string",    "redirectUrl": "string",    "forceDiscordLogin": true,    "cashbackBp": -9007199254740991,    "liveStats": true,    "hideStockCount": true,    "imageIds": [      "8d58dc1e-e712-4076-87f6-5c508f901d76"    ],    "seo": {      "title": "string",      "description": "string",      "imageId": "bbefe473-c66a-4040-85cf-1c7e6f0b3830",      "cardType": "large_image"    },    "collectBillingAddress": true,    "liveStatsConfig": {      "showViews": true,      "showSales": true,      "salesTimespan": "all",      "salesNotifications": true    },    "feedbackReward": {      "enabled": true,      "minRating": 1,      "kind": "percent",      "value": 1,      "showBeforeReview": true,      "validDays": 1,      "minOrderMinor": 0    },    "metadata": {      "property1": null,      "property2": null    },    "customFieldsAfterPayment": true,    "requiredDiscordRole": {      "guildId": "string",      "roleId": "string"    },    "paymentMethodFeesBp": {      "property1": -9007199254740991,      "property2": -9007199254740991    },    "dealsDisabledWithCoupon": true,    "deliveryEstimate": {      "unit": "instant",      "min": 0,      "max": 0,      "note": "string"    },    "warranty": {      "days": 0,      "termsMd": "string",      "extensions": [        {          "id": "string",          "label": "string",          "days": 1,          "priceMinor": 0        }      ]    },    "upsellOnAdd": true,    "prePaymentNoteMd": "string",    "showInstructionsBeforePayment": true,    "publishAt": "string",    "publicationState": "published",    "offerConfig": {      "buyerPrice": {        "enabled": true,        "kind": "pay_what_you_want",        "minMinor": -9007199254740991,        "maxMinor": -9007199254740991,        "suggestedMinor": -9007199254740991      },      "tips": {        "enabled": true,        "presetsBp": [          1        ],        "allowCustom": true,        "roundUp": true      },      "membership": {        "enabled": true,        "label": "string",        "priceMinor": -9007199254740991      },      "serviceQuote": {        "enabled": true,        "minQuantity": 1,        "maxQuantity": 1,        "step": 1,        "unitLabel": "string",        "allowBudgetInput": true      },      "bonus": {        "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113",        "variantId": "d53feca7-c65b-4741-aca7-827a42d686bf",        "quantity": 1,        "expiresDays": 1      },      "postPurchaseUpsell": true    },    "storefrontSort": -9007199254740991,    "dashboardSort": -9007199254740991,    "version": -9007199254740991,    "createdAt": "string",    "updatedAt": "string",    "url": "string"  },  "variants": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "name": "string",      "description": "string",      "priceMinor": -9007199254740991,      "compareAtMinor": -9007199254740991,      "costMinor": -9007199254740991,      "currencyPrices": {        "property1": -9007199254740991,        "property2": -9007199254740991      },      "imageId": "bbefe473-c66a-4040-85cf-1c7e6f0b3830",      "imageIds": [        "8d58dc1e-e712-4076-87f6-5c508f901d76"      ],      "minQty": -9007199254740991,      "maxQty": -9007199254740991,      "deliveryType": "serials",      "deliveryConfig": {        "serviceText": "string",        "manualFulfilment": true,        "dynamicUrl": "string",        "fileIds": [          "ede129fb-d491-4897-912f-401a8573064f"        ],        "weightGrams": 0,        "requiresShipping": true,        "giftCard": true      },      "stockMode": "unlimited",      "serialSelection": "random",      "instructionsMd": "string",      "redirectUrl": "string",      "discordRoleIds": [        "string"      ],      "disabledPaymentMethodIds": [        "860f5798-cad1-4a86-9e5b-2af553de9cdc"      ],      "preorderEnabled": true,      "preorderPriceMinor": -9007199254740991,      "preorderNote": "string",      "warrantyDays": -9007199254740991,      "visibility": "public",      "statusLabel": {        "text": "string",        "color": "string",        "enabled": true      },      "licencePolicy": {        "enabled": true,        "prefix": "string",        "validityDays": 1,        "maxActivations": 1      },      "stockPoolId": "8fc4e098-8328-499e-aed4-c5e0e99d94ed",      "stockPoolUnits": -9007199254740991,      "stock": {        "mode": "unlimited",        "available": -9007199254740991,        "reserved": -9007199254740991,        "onHand": -9007199254740991      }    }  ],  "customFields": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "key": "string",      "label": "string",      "type": "text",      "placeholder": "string",      "hint": "string",      "defaultValue": "string",      "required": true,      "regex": "string",      "options": [        "string"      ],      "template": "discord_username",      "minSelections": -9007199254740991,      "maxSelections": -9007199254740991,      "conditionAddonIds": [        "985a0c88-d4e4-4c33-9c67-080cc9c45a5b"      ]    }  ],  "addons": [    {      "addonId": "ed930881-3f27-4e25-9365-ff53ffbcfa14",      "name": "string",      "priceMinor": -9007199254740991,      "currency": "string",      "required": true    }  ],  "upsellProductIds": [    "1e4c9bfa-8421-460a-ba4e-9cbeb9ab1987"  ],  "deals": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "variantId": "d53feca7-c65b-4741-aca7-827a42d686bf",      "minQty": -9007199254740991,      "discountBp": -9007199254740991,      "unitPriceMinor": -9007199254740991    }  ]}