- Introduction
- Getting Started
- Authentication
- Error Handling
- Contact Support
- Modaltrans API
- Get Auth Token
- Accounting
- Customs
- Logistics
- Depot
- Fleet Management
- CRM
- Timelines
- S3 Files
- Notifications
- User Details
Create a Product
Developing
Testing Env
https://demo.modaltrans.com
Testing Env
https://demo.modaltrans.com
POST
/api/v1/products
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Body Params application/json
UpdateProduct
code
string
required
barcode
string
required
product_name
string
required
country_id
string
optional
gtip_code
string
optional
price
number
optional
price_curr
string
optional
weight_unit
string
optional
imco
string
optional
min_count
integer
optional
min_temperature
number
optional
max_temperature
number
optional
storage_area
string
optional
length
number
optional
width
number
optional
height
number
optional
sku_model
string
optional
io_type
enum<string>
optional
Allowed values:
inputoutputinput_output
status
string
optional
pack_type
string
optional
warehouse_code
string
required
Example
{
"product": {
"code": "PROD12345",
"barcode": "5012345678900",
"product_name": "Stainless Steel Kettle",
"warehouse_code": "TEST1212",
"price": "29.99",
"price_curr": "GBP",
"imco": "imco14",
"storage_area": "shelf",
"length": 10.0,
"width": 10.0,
"height": 30.0,
"sku_model": "KETTLE-X100",
"io_type": "input_output",
"pack_type": "Box"
}
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://demo.modaltrans.com/api/v1/products' \
--header 'Content-Type: application/json' \
--data-raw '{
"product": {
"code": "PROD12345",
"barcode": "5012345678900",
"product_name": "Stainless Steel Kettle",
"warehouse_code": "TEST1212",
"price": "29.99",
"price_curr": "GBP",
"imco": "imco14",
"storage_area": "shelf",
"length": 10.0,
"width": 10.0,
"height": 30.0,
"sku_model": "KETTLE-X100",
"io_type": "input_output",
"pack_type": "Box"
}
}'
Responses
🟢201Created
application/json
Body
array of:
code
string
required
barcode
string
required
product_name
string
required
country_id
string
required
gtip_code
string
required
price
number
required
price_curr
string
required
weight_unit
string
required
imco
string
required
min_count
integer
required
min_temperature
number
required
storage_area
string
required
length
number
required
width
number
required
height
number
required
sku_model
string
required
io_type
string
required
status
string
required
pack_type
string
optional
Example
[
{
"code": "string",
"barcode": "string",
"product_name": "string",
"country_id": "string",
"gtip_code": "string",
"price": 0,
"price_curr": "string",
"weight_unit": "string",
"imco": "string",
"min_count": 0,
"min_temperature": 0,
"storage_area": "string",
"length": 0,
"width": 0,
"height": 0,
"sku_model": "string",
"io_type": "string",
"status": "string",
"pack_type": "string"
}
]
🟠403Forbidden
🟠404Record Not Found
🟠400Bad Request
🟠422Unprocessable Entity
Modified at 2024-08-28 10:03:33