Products
Products
Product objects from the Pickler DB
ENDPOINTS:
POST /products
POST /products/ids
GET /products
PUT /products
DELETE /products
Product object
· _id string*
Unique identifier for the object.
· createdOn date*
Date and time the object was created.
· updatedOn date*
Date and time the object was updated.
· name string*
Product name.
· status enum ["draft", "verified"]
Product status. Draft by default. Verified is available only for products with 100% completeness.
· image string
URL to product image.
· weightInMg number
Product weight in milligrams (default 1000000
)
· salesPrice number
Sales price for this product in cents.
· trueCost number
Sales price and eco-costs added together in cents.
· description string
Description for this product.
· isScenarioProduct boolean
Indicates if the product is inventory (manufactured by the company) or scenario (used for benchmarking only) (default false
).
· internal object
Internal object containing additional details about the product.
· internal.productId string
Internal product id.
· internal.category string
Internal category id.
· internal.materials string[]
Internal materials.
· internal.customers object[]
Internal customers.
· internal.customers.name string*
Internal customer name.
· internal.customers.volume number
Internal customer volume. Default value is 0
.
· internal.suppliers object[]
Internal suppliers.
· internal.suppliers.volume number
Internal supplier volume. Default value is 0
.
Product company
· company object*
Details of the company to which this product belongs.
· company.companyId string*
Unique identifier for the company object.
· company.companyName string*
Company name.
Product category
· category object
Description of the category to which the product belongs.
· category.categoryId string*
Unique identifier for the category object from EcoDB.
· category.categoryName string*
Name of category.
Product industry
· industry array
Description of the industry to which the product belongs.
· industry.industryId string*
Unique identifier for the industry object from EcoDB.
· industry.industryName string*
Name of industry.
Product components
· materials array
Materials used in the product.
· components array
Components used in the product.
· components.componentId string*
Unique identifier for the component object from EcoDB.
· components.componentName string*
Component name.
· components.itemId string*
Unique identifier of the element in the array of components.
· components.materials.itemId string*
Unique identifier of the element in the array of materials.
· components.materials.materialId string*
Unique identifier for the material object from EcoDB.
· components.materials.materialName string*
Material name.
· components.materials.share number*
Share of material in product. sum of all shares must be 1
.
· components.materials.sourceDisplayName string
Source display name.
· components.materials.sourceLink string
Source link.
· components.materials.tags string[]
Other short names for material name.
Product production
· production array
Production methods of product materials. The number of methods depends on the amount of materials in the product.
· production.method.itemId string*
Unique identifier of the element in the array of production methods.
· production.method.methodId string*
Unique identifier for the production method object from EcoDB.
· production.method.componentItemId string*
Unique identifier of the element in the array of components.
· production.method.methodName string*
Production method name.
· production.method.sourceDisplayName string
Source display name.
· production.method.sourceLink string
Source link.
· production.location.locationId string*
Unique identifier for the production location object from EcoDB. Has priority over locationAddress
· production.location.locationAddress string
Human friendly location address that will be mapped to EcoDB location automatically.
· production.location.locationName string*
Location name.
· production.location.sourceDisplayName string
Source display name.
· production.location.sourceLink string
Source link.
Product transport
· transport object
Product transportation information.
· transport.categories array
Ways of transportation from production to warehouse.
· transport.categories.itemId string*
Unique identifier of the element in the array of transport categories.
· transport.categories.categoryId string*
Unique identifier for the transport category object from EcoDB.
· transport.categories.categoryName string*
Transport method name.
· transport.categories.distance number
Transportation distance in km.
· transport.categories.sourceDisplayName string
Source display name.
· transport.categories.sourceLink string
Source link.
· transport.categories.location object
Origin and destination for transportation step
· transport.categories.location.from.locationId string
Unique identifier for the origin transport location object from EcoDB. Has priority over locationAddress
· transport.categories.location.from.locationAddress string
Human friendly origin location address that will be mapped to EcoDB location automatically
· transport.categories.location.from.locationName string
Location name
· transport.categories.location.from.sourceDisplayName string
Source display name.
· transport.categories.location.from.sourceLink string
Source link.
· transport.categories.location.to.locationId string
Unique identifier for the destination transport location object from EcoDB. Has priority over locationAddress
· transport.categories.location.to.locationAddress string
Human friendly destination location address that will be mapped to EcoDB location automatically
· transport.categories.location.to.locationName string
Location name
· transport.categories.location.to.sourceDisplayName string
Source display name.
· transport.categories.location.to.sourceLink string
Source link.
· transport.pallet object
Transport pallet information.
· transport.pallet.weightInKg number
Weight of a full pallet in kg (default 300
).
· transport.pallet.lengthInSm number
Pallet length in sm (default 100
).
· transport.pallet.widthInSm number
Pallet width in sm (default 120
).
· transport.pallet.heightInSm number
Pallet height in sm (default 180
).
Product EOL
· eol array
Product end of life information.
· eol.itemId string*
Unique identifier of the element in the array of eol.
· eol.materialItemId string*
Unique identifier of the element in the array of materials.
· eol.eolTypes object[]*
Product end of life types information.
· eol.eolTypes.eolId string*
Unique identifier for the eol object from EcoDB.
· eol.eolTypes.share number*
Eol type share.
· eol.eolTypes.type enum* ["INCINERATION_EOL", "COMPOSTING_EOL", "RECYCLING_EOL", "LANDFILL_EOL"]
Eol type.
· eol.eolTypes.sourceDisplayName string
Source display name.
· eol.eolTypes.sourceLink string
Source link.
Product eco score
· ecoScore object
Eco-calculation information for each of the product steps.
· ecoScore.ecoCostPerItemTotal number
Eco cost of all stages in euros.
· ecoScore.ecoCostPerKgTotal number
Eco cost per KG of all stages in euros.
· ecoScore.carbonFootprintPerItemTotal number
Carbon footprint of all stages.
· ecoScore.carbonFootprintPerKgTotal number
Carbon footprint per FG of all stages.
· ecoScore.ecoScorePerKg enum ["A", "B", "C", "D", "E", "F", "G"]
Product eco score.
Product eco score components
· ecoScore.components object
Eco-calculation information for materials.
· ecoScore.components.items array*
Eco-calculation information for each material.
· ecoScore.components.items.componentItemId string*
Unique identifier of the element in the array of components.
· ecoScore.components.items.ecoCostPerKg number*
Eco cost of the element per kg in euros.
· ecoScore.components.items.carbonFootprintPerKg number*
Carbon footprint of the element per kg.
· ecoScore.components.items.ecoCostPerItem number*
Eco cost of the element in euros.
· ecoScore.components.items.carbonFootprintPerItem number*
Carbon footprint of the element.
· ecoScore.components.ecoCostPerKg number*
Eco cost of all stage elements per kg in euros.
· ecoScore.components.carbonFootprintPerKg number*
Carbon footprint of all stage elements per kg.
· ecoScore.components.ecoCostPerItem number*
Eco cost of all stage elements in euros.
· ecoScore.components.carbonFootprintPerItem number*
Carbon footprint of all stage elements.
· ecoScore.components.share number
Share of material stage.
· ecoScore.components.items.materials array*
Eco-calculation information for each material.
· ecoScore.components.items.materials.materialItemId string*
Unique identifier of the element in the array of materials.
· ecoScore.components.items.materials.ecoCostPerKg number*
Eco cost of the element per kg in euros.
· ecoScore.components.items.materials.carbonFootprintPerKg number*
Carbon footprint of the element per kg.
· ecoScore.components.items.materials.ecoCostPerItem number*
Eco cost of the element in euros.
· ecoScore.components.items.materials.carbonFootprintPerItem number*
Carbon footprint of the element.
Product eco score production
· ecoScore.production object
Eco-calculation information for production.
· ecoScore.production.items array*
Eco-calculation information for each production method.
· ecoScore.production.items.methodItemId string*
Unique identifier of the element in the array of production methods.
· ecoScore.production.items.ecoCostPerKg number*
Eco cost of the element per kg in euros.
· ecoScore.production.items.carbonFootprintPerKg number*
Carbon footprint of the element per kg.
· ecoScore.production.items.ecoCostPerItem number*
Eco cost of the element in euros.
· ecoScore.production.items.carbonFootprintPerItem number*
Carbon footprint of the element.
· ecoScore.production.ecoCostPerKg number
Eco cost of all stage elements per kg in euros.
· ecoScore.production.carbonFootprintPerKg number
Carbon footprint of all stage elements per kg.
· ecoScore.production.ecoCostPerItem number
Eco cost of all stage elements in euros.
· ecoScore.production.carbonFootprintPerItem number
Carbon footprint of all stage elements.
· ecoScore.production.share number
Share of production stage.
Product eco score transport
· ecoScore.transport object
Eco-calculation information for transport.
· ecoScore.transport.categories array*
Eco-calculation information for each transport category.
· ecoScore.transport.categories.categoryItemId string*
Unique identifier of the element in the array of transport category.
· ecoScore.transport.categories.ecoCostPerKg number*
Eco cost of the element per kg in euros.
· ecoScore.transport.categories.carbonFootprintPerKg number*
Carbon footprint of the element per kg.
· ecoScore.transport.categories.ecoCostPerItem number*
Eco cost of the element in euros.
· ecoScore.transport.categories.carbonFootprintPerItem number*
Carbon footprint of the element.
· ecoScore.transport.ecoCostPerKg number
Eco cost of all stage elements per kg in euros.
· ecoScore.transport.carbonFootprintPerKg number
Carbon footprint of all stage elements per kg.
· ecoScore.transport.ecoCostPerItem number
Eco cost of all stage elements in euros.
· ecoScore.transport.carbonFootprintPerItem number
Carbon footprint of all stage elements.
· ecoScore.transport.share number
Share of transport stage.
Product eco score EOL
· ecoScore.eol object
Eco-calculation information for eol.
· ecoScore.eol.items array*
Eco-calculation information for each eol.
· ecoScore.eol.items.eolItemId string*
Unique identifier of the element in the array of eols.
· ecoScore.eol.items.ecoCostPerKg number*
Eco cost of the element per kg in euros.
· ecoScore.eol.items.carbonFootprintPerKg number*
Carbon footprint of the element per kg.
· ecoScore.eol.items.ecoCostPerItem number*
Eco cost of the element in euros.
· ecoScore.eol.items.carbonFootprintPerItem number*
Carbon footprint of the element.
· ecoScore.eol.ecoCostPerKg number
Eco cost of all stage elements per kg in euros.
· ecoScore.eol.carbonFootprintPerKg number
Carbon footprint of all stage elements per kg.
· ecoScore.eol.ecoCostPerItem number
Eco cost of all stage elements in euros.
· ecoScore.eol.carbonFootprintPerItem number
Carbon footprint of all stage elements.
· ecoScore.eol.share number
Share of eol stage.
PRODUCT OBJECT:
{
"_id": "63904743c0c97414cb716a9d",
"createdOn": "2022-12-07T07:56:51.439Z",
"updatedOn": "2022-12-09T06:45:10.420Z",
"name": "Product name",
"status": "draft",
"image": "https://drive.google.com/uc?id=123",
"weightInMg": 1000000,
"salesPrice": 1000,
"trueCost": 2053,
"description": "Product description",
"isScenarioProduct": false,
"internal": {
"productId": "43904743c0c97414cb716a1d",
"category": "Electronics",
"materials": ["Aluminum", "Plastic"],
"customers": [
{
"name": "Customer name",
"volume": 10
}
]
"suppliers": [
{
"name": "Customer name",
"volume": 10
}
]
},
"company": {
"companyId": "63845d1875aeec262595a651",
"companyName": "Paralect"
},
"category": {
"categoryId": "PC.002",
"categoryName": "Big bags",
},
"industry": [{
"industryId": "PI.002",
"industryName": "Fashion",
}],
"components": [
{
"itemId": "0",
"componentId": "PP.001",
"componentName": "Main component",
"materials": [
"itemId": "0",
"materialId": "A.010.02.104",
"materialName": "Wool farmside in Australia",
"share": 0.5,
"sourceDisplayName": "Source Display Name",
"sourceLink": "https://example.com",
"tags": ["Bamboe", "Jute"]
]
}
],
"production": [
"method": {
"itemId": "0",
"methodId": "D.100.10.120",
"componentItemId": "0",
"methodName": "Rolling aluminium foil",
"sourceDisplayName": "Source Display Name",
"sourceLink": "https://example.com"
},
"location": {
"locationId": "P.010.10.112",
"locationName": "Belgium",
"locationAddress": "Brussels",
"sourceDisplayName": "Source Display Name",
"sourceLink": "https://example.com"
}
],
"transport": {
"categories": [
{
"itemId": "0",
"categoryId": "TCAT.003",
"categoryName": "Train, diesel",
"distance": 100,
"sourceDisplayName": "Source Display Name",
"sourceLink": "https://example.com",
"location": {
"from": {
"locationId": "P.010.10.112",
"locationName": "Belgium",
"locationAddress": "Brussels",
"sourceDisplayName": "Source Display Name",
"sourceLink": "https://example.com"
},
"to": {
"locationId": "P.010.10.112",
"locationName": "Belgium",
"locationAddress": "Brussels",
"sourceDisplayName": "Source Display Name",
"sourceLink": "https://example.com"
}
}
}
],
"pallet": {
"weightInKg": 300,
"lengthInSm": 100,
"widthInSm": 120,
"heightInSm": 180
}
},
"eol": [
{
"itemId": "0",
"materialItemId": "0",
"eolTypes": [
"eolId": "F.080.01.108",
"share": 1,
"type": "INCINERATION_EOL",
"sourceDisplayName": "Source Display Name",
"sourceLink": "https://example.com"
],
}
],
"ecoScore": {
"materials": {
"items": [
{
"materialItemId": "0",
"ecoCostPerKg": 525681206.53702503,
"carbonFootprintPerKg": 4281285344.827586,
"ecoCostPerItem": 525681206.53702503,
"carbonFootprintPerItem": 4281285344.827586
}
],
"ecoCostPerKg": 1051362413.0740501,
"carbonFootprintPerKg": 8562570689.655172,
"ecoCostPerItem": 1051362413.0740501,
"carbonFootprintPerItem": 8562570689.655172,
"share": 0.9788869201353454
},
"production": {
"items": [
{
"methodItemId": "0",
"ecoCostPerKg": 6131370.841007107,
"carbonFootprintPerKg": 20558192.20286431,
"ecoCostPerItem": 6131370.841007107,
"carbonFootprintPerItem": 20558192.20286431
}
],
"ecoCostPerKg": 12262741.682014214,
"carbonFootprintPerKg": 41116384.40572862,
"ecoCostPerItem": 12262741.682014214,
"carbonFootprintPerItem": 41116384.40572862,
"share": 0.011417411625382843
},
"transport": {
"categories": [
{
"categoryItemId": "0",
"ecoCostPerKg": 51199.83148967,
"carbonFootprintPerKg": 198605.42241379304,
"ecoCostPerItem": 51199.83148967,
"carbonFootprintPerItem": 198605.42241379304
}
],
"ecoCostPerKg": 67362.232819226,
"carbonFootprintPerKg": 256860.53706896547,
"ecoCostPerItem": 67362.232819226,
"carbonFootprintPerItem": 256860.53706896547,
"share": 0.00006271862851274283
},
"eol": {
"items": [
{
"eolItemId": "0",
"ecoCostPerKg": -5173080.229935,
"carbonFootprintPerKg": -44906831.89655172,
"ecoCostPerItem": -5173080.229935,
"carbonFootprintPerItem": -44906831.89655172
}
],
"ecoCostPerKg": -10346160.45987,
"carbonFootprintPerKg": -89813663.79310344,
"ecoCostPerItem": -10346160.45987,
"carbonFootprintPerItem": -89813663.79310344,
"share": 0.009632949610758923
},
"ecoCostPerItemTotal": 1053346356.5290135,
"ecoCostPerKgTotal": 1000046356.5290135,
"carbonFootprintPerItemTotal": 8514130270.804868,
"carbonFootprintPerKgTotal": 8514130270.804868,
"ecoScorePerKg": "G"
}
}
Create products
Adds new product to products portfolio with the values of the parameters passed.
This request body is multipart/form-data encoded.
There are 2 fields:
json
: that is products representation as stringified json value. Body example below.
images
: that is array of product images
Parameters
· products array*
Array of options for products.
· products.name string*
Product name. Max 50
.
· products.status enum ["draft", "verified"]
Product status. Draft by default. Verified is available only for products with 100% completeness.
· products.image string | number | null
URL to product image (max length 2048
) or index of product image from images
array.
· products.weightInMg number
Product weight in milligrams (default 1000000
). Greater than 0
and maximum 1000 000 000
.
· products.measureUnit enum ["Share", "mU", "Gram", "Gsm"]
Measure unit of materials share, according to product weight. Share by default.
· products.salesPrice number
Sales price for this product in euro. Minimum 0.01
and maximum 1000 000
.
· products.description string
Description for this product. Maximum 500
.
· products.inventoryNumber string
Product inventory number. Maximum 50
.
· products.isScenarioProduct boolean
Indicates if the product is inventory (manufactured by the company) or scenario (used for benchmarking only) (default false
).
· products.category object
Description of the category to which the product belongs.
· products.category.categoryId string*
Unique identifier for the category object from EcoDB.
· products.industry array
Description of the industries to which the product belongs.
· products.industry.industryId string*
Unique identifier for the industry object from EcoDB.
· products.internal object
Internal object containing additional details about the product.
· products.internal.productId string
Internal product id.
· products.internal.category string
Internal category id.
· products.internal.materials string[]
Internal materials.
· products.internal.customers object[]
Internal customers.
· products.internal.customers.volume number
Internal customer volume. Default value is 0
.
· products.internal.suppliers object[]
Internal suppliers.
· products.internal.suppliers.volume number
Internal supplier volume. Default value is 0
.
Parameters components
· products.components array
Components used in the product.
· products.components.componentId string*
Unique identifier for the component object from EcoDB.
· products.components.itemId string*
Unique identifier of the element in the array of components.
· products.components.materials array
Materials used in the component.
· products.components.materials.itemId string*
Unique identifier of the element in the array of materials.
· products.components.materials.materialId string*
Unique identifier for the material object from EcoDB.
· products.components.materials.share number*
Share of material in product. If measureUnit=”Share”, the sum of all shares must be 1
. If another measure unit is selected, the sum of all shares must equal the package weight. Min 0.001
.
Parameters production
· products.production array
Production methods of product materials. The number of methods depends on the amount of materials in the product.
· products.production.method object
Production item method
· products.production.method.itemId string*
Unique identifier of the element in the array of production methods.
· products.production.method.methodId string*
Unique identifier for the production method object from EcoDB.
· products.production.method.materialItemId string*
Unique identifier of the element in the array of materials.
· products.production.location object
Production item location.
· products.production.location.locationId string
Unique identifier for the production location object from EcoDB. Has priority over locationAddress
· products.production.location.locationAddress string
Human friendly location address that will be mapped to EcoDB location automatically.
Parameters transport
· products.transport object
Product transportation information.
· products.transport.categories array
Ways of transportation from production to warehouse.
· products.transport.categories.itemId string*
Unique identifier of the element in the array of transport categories.
· products.transport.categories.categoryId string*
Unique identifier for the transport category object from EcoDB.
· products.transport.categories.distance number
Transportation distance in km. Greater than 0
and maximum 1000 000
.
· products.transport.categories.location object
Transport category item location.
· products.transport.categories.location.from.locationId string
Unique identifier for the transport origin location object from EcoDB. Has priority over locationAddress
· products.transport.categories.location.from.locationAddress string
Human friendly origin location address that will be mapped to EcoDB location automatically.
· products.transport.categories.location.to.locationId string
Unique identifier for the transport destination location object from EcoDB. Has priority over locationAddress
· products.transport.categories.location.to.locationAddress string
Human friendly origin location address that will be mapped to EcoDB location automatically.
· products.transport.pallet object
Transport pallet information.
· products.transport.pallet.weightInKg number
Weight of a full pallet in kg (default 300
). Greater than 0
and maximum 1000 000
.
· products.transport.pallet.lengthInSm number
Pallet length in sm (default 100
). Greater than 0
and maximum 1000 000
.
· products.transport.pallet.widthInSm number
Pallet width in sm (default 120
). Greater than 0
and maximum 1000 000
.
· products.transport.pallet.heightInSm number
Pallet height in sm (default 180
). Greater than 0
and maximum 1000 000
.
Parameters eol
Only used when the isScenarioProduct
field is true
· products.eol object[]
Product eol information.
· products.eol.itemId string*
Unique identifier of the element in the array of eol.
· products.eol.materialItemId string*
Unique identifier of the element in the array of materials.
· products.eol.eolTypes object[]*
Product end of life types information.
· products.eol.eolTypes.share number*
Eol type share.
· products.eol.eolTypes.type enum* ["INCINERATION_EOL", "COMPOSTING_EOL", "RECYCLING_EOL", "LANDFILL_EOL"]
Eol type.
Returns
Returns an array of created products.
REQUEST: POST /products
PARAMETERS:
{
"products": [
{
"name": "TestProduct",
"status": "draft",
"image": "https://drive.google.com/uc?id=1111",
"weightInMg": 1500,
"measureUnit": "Share",
"salesPrice": 10,
"description": "Product description",
"isScenarioProduct": true,
"internal": {
"productId": "43904743c0c97414cb716a1d",
"category": "Electronics",
"materials": ["Aluminum", "Plastic"],
"customers": [
{
"name": "Customer name",
"volume": 10
}
]
"suppliers": [
{
"name": "Customer name",
"volume": 10
}
]
},
"category": {
"categoryId": "PC.002"
},
"industry": [{
"industryId": "PC.002"
}],
"components": [
{
"componentId": "PP.001",
"itemId": "0",
"materials": [
{
"itemId": "0",
"materialId": "A.120.01.110",
"componentId": "PP.001",
"share": 0.8
},
{
"itemId": "1",
"materialId": "A.130.03.105",
"componentId": "PP.005",
"share": 0.2
}
],
}
],
"production": [
{
"method": {
"itemId": "0",
"materialItemId": "0",
"methodId": "D.100.01.110"
},
"location": {
"locationId": "P.010.10.102",
"locationAddress": "Brussels, Belgium"
}
}
],
"transport": {
"categories": [
{
"itemId": "0",
"categoryId": "TCAT.007",
"categoryName": "Container ship",
"distance": 6000,
"location": {
"from": {
"locationAddress": "Berlin"
},
"to": {
"locationAddress": "Paris, France"
}
}
},
{
"itemId": "1",
"categoryId": "TCAT.003",
"categoryName": "Train, diesel",
"distance": 1500,
"location": {
"from": {
"locationAddress": "Paris, France"
},
"to": {
"locationAddress": "Brussels, Belgium"
}
}
}
],
"pallet": {
"weightInKg": 300,
"lengthInSm": 100,
"widthInSm": 120,
"heightInSm": 180
}
},
"eol": [
{
"itemId": "0",
"materialItemId": "0",
"eolTypes": [
{
"share": 1,
"type": "INCINERATION_EOL"
}
]
},
{
"itemId": "1",
"materialItemId": "1",
"eolTypes": [
{
"share": 1,
"type": "COMPOSTING_EOL"
}
]
}
]
}
]
}
Get products by IDs
Returns a list of your company products with the given IDs.
Parameters
· ids array*
List of product IDs.
Returns
Returns full data about the products, including all submitted fields, automatically assigned fields and calculated eco-data.
eol
is assigned automatically, if ID’s of materials where SEND to the system.
ecoCost
and carbonFootprint
are returned for each stage and total for the product.
REQUEST: POST /products/ids
PARAMETERS:
{
ids: ["63904743c0c97414cb716a9d"]
}
RESPONSE:
[
// Product Objects
]
List all products
Returns a list of your company products.
Parameters
· page number
Page number (default 1
).
· perPage number
Number of products per page (default 25
).
· searchValue string
Search by product text fields (name
, inventoryNumber
, description
, categoryIndustry
, categoryName
, materialName
, methodName
, locationName
, categoryName
, eolName
).
· isScenarioProduct boolean
Indicates if the product is inventory (manufactured by the company) or scenario (used for benchmarking only) (default false
).
· ecoScores enum[] ["A", "B", "C", "D", "E", "F", "G"]
Filter products by eco score.
· ecoCostPerItemTotal object
Filter products by eco cost.
· ecoCostPerItemTotal.from number
Minimum value to filter by eco cost.
· ecoCostPerItemTotal.to number
Maximum value to filter by eco cost.
· carbonFootprintPerItemTotal object
Filter products by carbon footprint
· carbonFootprintPerItemTotal.from number
Minimum value to filter by carbon footprint.
· carbonFootprintPerItemTotal.from number
Minimum value to filter by carbon footprint.
· industries string[]
Filtering products by unique industry identifiers.
· productCategories string[]
Filtering products by unique product category identifiers.
· materials string[]
Filtering products by unique material identifiers.
· productionMethods string[]
Filtering products by unique production method identifiers.
· productionLocations string[]
Filtering products by unique production location identifiers.
· transportMethods string[]
Filtering products by unique transport method identifiers.
· eolTypes enum[] ["INCINERATION_EOL", "COMPOSTING_EOL", "RECYCLING_EOL", "LANDFILL_EOL"]
Filtering products by unique EOL type.
Returns
Returns full data about the products with pagination, including all submitted fields, automatically assigned fields and calculated eco-data.
eol
is assigned automatically, if ID’s of materials where SEND to the system.
ecoCost
and carbonFootprint
are returned for each stage and total for the product.
REQUEST: POST /products/list
RESPONSE:
{
"items": [
// Product Object 1,
// Product Object 2, etc.
],
"totalPages": 1,
"count": 2
}
Update products
Re-writes selected products in the Pickler DB. Only those fields that need to be changed must be filled in.
This request body is multipart/form-data encoded.
There are 2 fields:
json
: that is products representation as stringified json value. Body example below.
images
: that is array of product images
Parameters
Same as for Create products
Returns
Returns an array of updated products.
REQUEST: PUT /products
PARAMETERS:
As Create Products
Delete products
Removes selected products from the Pickler DB
Parameters
· ids array*
List of product IDs.
Returns
Returns list of deleted product IDs.
REQUEST: DELETE /products
PARAMETERS:
{
"ids": ["63904743c0c97414cb716a9d"]
}
RESPONSE:
["63904743c0c97414cb716a9d"]
Create share urls
Creating a urls to get public access to the eco forecast page.
Parameters
· ids array*
List of product IDs.
Returns
Returns urls to eco forecast page and iframe.
REQUEST: POST /products/create-share-urls
PARAMETERS:
{
"ids": ["63904743c0c97414cb716a9d"]
}
RESPONSE:
[{
"sharedUrl": "app.pickler.io/eco-forecast/shared?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZHMiOlsiNjNlNGJlZTc1NjU2YWYwZDI1NmExMDIxIl0sImlhdCI6MTY3NjI5ODc3MX0.dadTEd_AE4FmZwqegPD3j_VLkVTVlg2Y_hNqLIJ8I1c",
"sharedIframeUrl": "app.pickler.io/eco-forecast/iframe?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZHMiOlsiNjNlNGJlZTc1NjU2YWYwZDI1NmExMDIxIl0sImlhdCI6MTY3NjI5ODc3MX0.dadTEd_AE4FmZwqegPD3j_VLkVTVlg2Y_hNqLIJ8I1c",
}]