Products

Here we can check what information about products is received by the ONe platform that was previously sent by a PIM or ERP tool.
Additionally, it is possible to change the status of products. More about draft products and the principles of their operation can read here

Table of contents

Glossary

Name
Explanation
id
identifier of product
slug
this is the product ID in lowercase. If the product has an ID written only with numbers or lowercase letters, the slug will be identical. For example, for a product with the ID BAKS_910220, slug is baks_910220
idOrIndex
SKU (product id), ean (catalog index) or manufacturer index
productId
identifier of product
startId
this is a step that shows what products in this step were sent for create / activiation. If there are more after this step, they were also displayed
reasonNote
the reason the work product has been rejected
ProductUpdated
this is the type of draft product and means that the product in the ONe platform has been sent for create / activation

GET product by SKU (product id)

In order to get information about product use GET /api/v1/catalog/integrations/auth-required/products/by-sku using specific ID of this product. The diagram below shows the dependence of communicating with the API:
Image without caption
Use the parameter in query below to get information about specified product:
  • id
json
curl -X GET "https://api-preprod.one.unity.pl/api/v1/catalog/integrations/auth-required/products/by-sku?id=888" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}"
In response you will receive information about product
Example response:
json
{ "id": "888", "productOrigin": "EXTERNAL", "createdBy": null, "name": "Dane techniczne", "manufacturerIndex": "", "catalogIndex": null, "productSeries": null, "multivalueAttributes": [ { "valueType": "ALPHANUMERIC", "nameCode": "danetechniczne1", "name": "Kolor", "values": [ { "value": "zielony" } ] }, { "valueType": "ALPHANUMERIC", "nameCode": "danetechniczne2", "name": "Motyw", "values": [ { "value": "morze" } ] }, { "valueType": "ALPHANUMERIC", "nameCode": "danetechniczne3", "name": "Wskaźnik", "values": [ { "value": "cyfrowy" } ] }, { "valueType": "ALPHANUMERIC", "nameCode": "danetechniczne5", "name": "Silnik", "values": [ { "value": "spalinowy" } ] } ], "characteristics": [], "productDataSheets": [ { "url": "link", "fileName": "name.jpg", "order": 0, "alt": "string" } ], "certificates": [], "canonicalCategory": "1", "categoryPath": [ "1" ], "fullDescription": "", "shortDescription": "", "usage": "", "manufacturer": { "id": "", "name": "AVACORE", "logoImage": "logo.png", "acronym": "" }, "measurementUnits": { "orderUnitCode": "szt.", "orderUnitDescription": null, "contentUnitCode": "szt.", "contentUnitDescription": null, "packingQuantity": 1, "priceQuantity": null, "quantityMin": 1, "quantityInterval": 1 }, "netDimension": {}, "labels": [ "Ecommerce", "ExampleLabel" ], "relatedProducts": [ { "relationType": "ACCESSORIES", "relationName": "accessories", "products": [ { "id": "EZER_7638900423716", "quantity": 1 } ] }, { "relationType": "SIMILAR", "relationName": "similar", "products": [] }, { "relationType": "OTHERS", "relationName": "others", "products": [] } ], "slug": "888", "photos": [], "photosWithVariants": [], "seo": { "title": "title", "description": "description", "h1": "h1", "follow": true, "index": true }, "relationsByAttribute": [ { "id": "12345", "attribute": "shirt_color", "name": "Color", "productValues": { "888": "green", "54321": "Purple" } } ], "shippingTime": "", "surchargePriceAmount": null, "cannotOrderAboveStock": false, "url": "/dane-techniczne-id-888", "categories": [ { "id": "1", "name": "Oświetlenie" } ], "videos": [], "pkwiu": null, "alternativeId": null, "status": "ACTIVE", "pluginsData": {} }

DELETE product

In order to delete specified product use DELETE /api/v1/catalog/integrations/auth-required/products/by-sku. The diagram below shows the dependency of communicating with the API:
Image without caption
Use the parameter in query below to delete specified product:
  • id
Example request:
json
curl -X DELETE "https://api-preprod.one.unity.pl/api/v1/catalog/integrations/auth-required/products/by-sku?id=product4" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}"

GET product by slug

In order to get all plugins data use GET /api/v1/catalog/integrations/auth-required/products/by-slug using specific ID. The diagram below shows the dependence of communicating with the API:
Image without caption
Use the parameter in query below to get information about specified product:
  • slug
Example request:
json
curl -X GET "https://api-preprod.one.unity.pl/api/v1/catalog/integrations/auth-required/products/by-slug?slug=product4111" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}"
In response you will receive information about product
Example response:
json
{ "id": "product4111", "productOrigin": "EXTERNAL", "createdBy": null, "name": "test name", "manufacturerIndex": "manu123", "catalogIndex": "5901234560009", "productSeries": null, "multivalueAttributes": [ { "valueType": "ALPHANUMERIC", "nameCode": "color", "name": "Color", "values": [ { "value": "green" } ] } ], "characteristics": [], "productDataSheets": [ { "url": "[url]", "fileName": "test name", "order": 0, "alt": "alt test text" } ], "certificates": [ { "url": "[url]", "fileName": "test name", "order": 0, "alt": "alt test text" } ], "canonicalCategory": "kategoria2", "categoryPath": [ "kategoria2" ], "fullDescription": "test description", "shortDescription": "test short", "usage": "test usage", "manufacturer": { "id": "manu123", "name": "manufactura", "logoImage": "smutna buzia.png", "acronym": "manu" }, "brand": { "id": "testbranname", "name": "test bran name", "description": "test brand" }, "measurementUnits": { "orderUnitCode": "pack123", "orderUnitDescription": "pack", "contentUnitCode": "pack", "contentUnitDescription": "pack", "packingQuantity": 2, "priceQuantity": null, "quantityMin": 2, "quantityInterval": 2 }, "netDimension": { "netVolume": 2, "netWeight": 2, "netLength": 2, "netWidth": 2, "netDepth": 2, "netDiameter": 2 }, "labels": [ "Ecommerce" ], "relatedProducts": [ { "relationType": "ACCESSORIES", "relationName": "accessories", "products": [ { "id": "888", "quantity": 1 } ] }, { "relationType": "SIMILAR", "relationName": "similar", "products": [] }, { "relationType": "OTHERS", "relationName": "others", "products": [] } ], "slug": "product4111", "photos": [], "photosWithVariants": [], "seo": { "title": "test seo", "description": "test sero", "h1": "test h1", "follow": true, "index": true }, "relationsByAttribute": [ { "id": "12345", "attribute": "shirt_color", "name": "Color", "productValues": { "888": "green", "54321": "Purple" } } ], "shippingTime": "24H", "surchargePriceAmount": 23, "cannotOrderAboveStock": false, "url": "/test-name-id-product4111", "categories": [ { "id": "kategoria2", "name": "kategoria2" } ], "videos": [ { "url": "[url]", "fileName": "test name", "order": 0, "alt": "alt test text" } ], "pkwiu": null, "alternativeId": null, "status": "ACTIVE", "pluginsData": {} }

GET products by SKU (product id), ean (catalog index) or manufacturer index

In order to get information about products (in the for of a list of products) use GET /api/v1/catalog/integrations/auth-required/products/list-by-id-or-index using SKU (product id), ean (catalog index) or manufacturer index. The diagram below shows the dependence of communicating with the API:
Image without caption
Use the parameter in query below to get information about products:
  • idOrIndex
Example request:
json
curl -X GET "https://api-preprod.one.unity.pl/api/v1/catalog/integrations/auth-required/products/list-by-id-or-index?idOrIndex=manu123" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}"
In response you will receive information about products
Example response:
json
[ { "id": "SKU/30", "productOrigin": "ONE", "createdBy": "7b8cac11-dc09-403d-9737-c14962eb3510", "name": "Draft1", "manufacturerIndex": "draft1", "catalogIndex": null, "productSeries": null, "multivalueAttributes": [], "characteristics": [], "productDataSheets": [], "certificates": [], "canonicalCategory": "other", "categoryPath": [ "other" ], "fullDescription": "", "shortDescription": "", "usage": "", "manufacturer": { "id": "8375", "name": "Geberit", "logoImage": "smutna buzia.png", "acronym": "Geberit" }, "measurementUnits": { "orderUnitCode": "C62", "orderUnitDescription": "szt", "contentUnitCode": "C62", "contentUnitDescription": "szt", "packingQuantity": 1, "priceQuantity": null, "quantityMin": 1, "quantityInterval": 1 }, "netDimension": {}, "labels": [], "relatedProducts": [ { "relationType": "ACCESSORIES", "relationName": "accessories", "products": [] }, { "relationType": "SIMILAR", "relationName": "similar", "products": [] }, { "relationType": "OTHERS", "relationName": "others", "products": [] } ], "slug": "sku-30", "photos": [], "photosWithVariants": [], "seo": { "title": null, "description": null, "h1": null, "follow": false, "index": false }, "relationsByAttribute": [], "shippingTime": "", "surchargePriceAmount": null, "cannotOrderAboveStock": false, "url": "/draft1-id-sku-30", "categories": [ { "id": "other", "name": "Other" } ], "videos": [], "pkwiu": null, "alternativeId": null, "status": "DRAFT_NEW", "pluginsData": {} }, { "id": "SKU/31", "productOrigin": "ONE", "createdBy": "7b8cac11-dc09-403d-9737-c14962eb3510", "name": "draft2", "manufacturerIndex": "draft1", "catalogIndex": null, "productSeries": null, "multivalueAttributes": [], "characteristics": [], "productDataSheets": [], "certificates": [], "canonicalCategory": "other", "categoryPath": [ "other" ], "fullDescription": "", "shortDescription": "", "usage": "", "manufacturer": { "id": "dvsafvsd", "name": "vdsvc", "logoImage": "smutna buzia.png", "acronym": "vsdvcz" }, "measurementUnits": { "orderUnitCode": "C62", "orderUnitDescription": "szt", "contentUnitCode": "C62", "contentUnitDescription": "szt", "packingQuantity": 1, "priceQuantity": null, "quantityMin": 1, "quantityInterval": 1 }, "netDimension": {}, "labels": [], "relatedProducts": [ { "relationType": "ACCESSORIES", "relationName": "accessories", "products": [] }, { "relationType": "SIMILAR", "relationName": "similar", "products": [] }, { "relationType": "OTHERS", "relationName": "others", "products": [] } ], "slug": "sku-31", "photos": [], "photosWithVariants": [], "seo": { "title": null, "description": null, "h1": null, "follow": false, "index": false }, "relationsByAttribute": [], "shippingTime": "", "surchargePriceAmount": null, "cannotOrderAboveStock": false, "url": "/draft2-id-sku-31", "categories": [ { "id": "other", "name": "Other" } ], "videos": [], "pkwiu": null, "alternativeId": null, "status": "DRAFT_NEW", "pluginsData": {} } ]

PUT - activate product (changes status to ACTIVE)

In order to change status of the draft product to active use PUT /api/v1/catalog/integrations/auth-required/products/statuses/activate.
⚠️
More about draft products and the principles of their operation can read here
The sequence diagram below shows the process:
Image without caption
Use the parameter in query below to update status of product to active:
  • productId
Example request:
json
curl -X PUT "https://api-preprod.one.unity.pl/api/v1/catalog/integrations/auth-required/products/statuses/activate?productId=SKU%2F6" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}"

PUT - reject product (changes status to DRAFT_REJECTED)

In order to change status of the draft product to draft_rejected use PUT /api/v1/catalog/integrations/auth-required/products/statuses/reject.
⚠️
More about draft products and the principles of their operation can read here
The sequence diagram below shows the process:
Image without caption
Use the parameter in query below to update change status of product to draft_rejected:
  • productId
Example request:
json
curl -X PUT "https://api-preprod.one.unity.pl/api/v1/catalog/integrations/auth-required/products/statuses/reject?productId=SKU%2F8" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}"

GET products for synchronization

In this endpoint, we can synchronize the products that have been sent for create / activation. For this purpose, use GET /api/v1/catalog/integrations/auth-required/products/synchronization using specific ID. The diagram below shows the dependence of communicating with the API:
Image without caption
Use the parameter in query below to check which products were sent for establishment in the defined step:
  • startId
Example request:
json
curl -X GET "https://api-preprod.one.unity.pl/api/v1/catalog/integrations/auth-required/products/synchronization?startId=1" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}"
In response you will receive information about plugin
Example response:
json
{ "nextId": 6, "events": [ { "sku": "SKU/5", "type": "ProductUpdated" }, { "sku": "SKU/8", "type": "ProductUpdated" }, { "sku": "SKU/9", "type": "ProductUpdated" }, { "sku": "EZER_76389026", "type": "ProductUpdated" }, { "sku": "SKU/7", "type": "ProductUpdated" } ] }

GET product by SKU

In order to get selected information about product use GET /api/v1/catalog/integrations/auth-required/products/technical-attributes using specific ID. The diagram below shows the dependence of communicating with the API:
Image without caption
Use the parameter in query below to get selected information about specified product:
  • productId
Example request:
json
curl -X GET "https://api-preprod.one.unity.pl/api/v1/catalog/integrations/auth-required/products/technical-attributes?productId=product4111" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}"
In response you will receive selected information about product
Example response:
json
{ "id": "product4111", "productOrigin": "EXTERNAL", "createdBy": null, "manufacturer": { "name": "manufactura", "acronym": "manu", "id": "manu123" }, "measurementUnits": { "orderUnitCode": "pack123", "orderUnitDescription": "pack", "contentUnitCode": "pack", "contentUnitDescription": "pack", "packingQuantity": 2, "quantityMin": 2, "quantityInterval": 2 }, "name": "test name", "manufacturerIndex": "manu123", "fullDescription": "test description", "shortDescription": "test short", "usage": "test usage", "brand": { "id": "testbranname", "name": "test bran name", "description": "test brand" }, "gtin": "5901234560009", "productSeries": "test series", "netDimensions": { "netVolume": 2, "netWeight": 2, "netLength": 2, "netWidth": 2, "netDepth": 2, "netDiameter": 2 }, "surchargePriceAmount": 23, "shippingTime": "24H", "status": "ACTIVE", "splitPayment": true, "cableType": "DRUM_CABLE", "gtu": "5901234560009" }

Powered by Notaku