Create product
POST/products
Create product.
Authorization Action:
pay:products:create
Request
Responses
- 201
- application/json
- Schema
- Example (auto)
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:
serviceurlstring
A URL of a publicly-accessible webpage for this product.
{
"id": "string",
"created": 0,
"name": "string",
"active": true,
"description": "string",
"images": [
"string"
],
"metadata": {},
"type": "service",
"url": "string"
}
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
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());