Skip to main content

Create product

POST 

/products

Create product.

Authorization Action:

pay:products:create

Request

Responses

Schema
    idstringrequired

    Unique identifier for the object.

    creatednumberrequired

    Time at which the object was created. Measured in seconds since the Unix epoch.

    namestringrequired

    The product's name, meant to be displayable to the customer.

    activeboolean
    descriptionstring

    The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.

    imagesstring[]

    A list of up to 8 URLs of images for this product, meant to be displayable to the customer.

    metadataobject

    Set of key-value pairs that you can attach to an object.

    typestring

    The type of the product.

    Possible values: [service]

    Default value: service
    urlstring

    A URL of a publicly-accessible webpage for this product.

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://connhex.com/products");
request.Headers.Add("Accept", "application/json");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());