UniventsAPIProducts
Create a product with its first variant
Creates a product and its first variant in one call. The actor must be an owner or admin of the event.
POST
/editions/{edition_id}/productsCreates a product and its first variant in one call. The actor must be an owner or admin of the event.
Authorization
bearerAuth AuthorizationBearer <token>
JWT issued by IdentityX, signed with Ed25519
In: header
Path Parameters
edition_id*string
Edition ID.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Request body for creating a product with its first variant. Mirrors models.CreateInitialProductRequest.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/editions/497f6eca-6276-4993-bfeb-53cbbbba6f08/products" \ -H "Content-Type: application/json" \ -d '{ "requires_registration": false, "vendor_code": "TEE-2026", "variant_vendor_code": "TEE-2026-BLACK-M", "name": "Conference T-Shirt", "description": "Black, size M.", "price": 8900, "stock": 100 }'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"edition_id": "aeda7fca-56fe-426a-8c37-1876faaaf005",
"vendor_code": "string",
"requires_registration": true,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_at": "2019-08-24T14:15:22Z"
}{
"detail": "string",
"instance": "../dictionary",
"errors": [
{
"field": "string",
"message": "string"
}
],
"type": "http://example.com",
"status": 400,
"title": "Validation Failed"
}{
"detail": "string",
"instance": "../dictionary",
"errors": [
{
"field": "string",
"message": "string"
}
],
"type": "http://example.com",
"status": 401,
"title": "Unauthenticated"
}{
"detail": "string",
"instance": "../dictionary",
"errors": [
{
"field": "string",
"message": "string"
}
],
"type": "http://example.com",
"status": 403,
"title": "Insufficient Role"
}{
"detail": "string",
"instance": "../dictionary",
"errors": [
{
"field": "string",
"message": "string"
}
],
"type": "http://example.com",
"status": 404,
"title": "Not Found"
}{
"detail": "string",
"instance": "../dictionary",
"errors": [
{
"field": "string",
"message": "string"
}
],
"type": "http://example.com",
"status": 500,
"title": "Internal Server Error"
}