Create Product v2
POST /api/v2/products
Description
Create a new product.
Path Parameters
| Name | Type | Description |
|---|---|---|
| None | No parameters |
Request Headers
| Name | Type | Description |
|---|---|---|
tenantId | string | The tenant ID (header) |
userId | string | The user ID (header) |
countryCode | string | The country code (header) |
Request Body
- Content Type:
application/json
{
"productTypeId": "string",
"quantity": 0,
"productUnitType": "Barrels",
"state": "string",
"city": "string",
"address": "string",
"deliveryCapacity": {
"quantity": 0,
"productUnitType": "Barrels",
"frequency": "HOURS"
},
"businessId": "string",
"userId": "string",
"tenantId": "string",
"countryCode": "string"
}
Response Code: 201 - Created
Description
Product created successfully.
Method: POST
>http://your-api-url/api/v2/products
Headers
| Content-Type | Value |
|---|---|
| apiKey | {{apiKey}} |
| tenantId | string |
| userId | string |
| countryCode | string |
Body
{
"productTypeId": "prod123",
"quantity": 100,
"productUnitType": "Barrels",
"state": "California",
"city": "Los Angeles",
"address": "1234 Main St",
"deliveryCapacity": {
"quantity": 50,
"productUnitType": "Barrels",
"frequency": "HOURS"
},
"businessId": "biz456",
"userId": "usr789",
"tenantId": "ten012",
"countryCode": "US"
}
🔑 Authentication bearer
| Param | Value | Type |
|---|---|---|
| token | {{accessCode}} | string |
LANGUAGE
CURL REQUEST
curl --request POST \
--url /api/v2/products \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!