Product lists

Link to swagger documentation

  1. Product List
  2. Product Export

Product List

Use GET /openapi/v1/product-uploads/approved to retrieve a list in JSON format of your successfully created products along with their attributes.
You can apply filters such as productName, category, targetMarkets, GTIN, MPN, and Manufacturer.

You will get a https status code 200 response with a similar body (depending on your products and filters that you request).

{
    "items": [
        {
            "id": "dcf4e79dfad88a35f292a318aed707d9c215fe69",
            "updated_at": "2023-05-09T09:23:16+00:00",
            "target_markets": [
                "PT",
            ],
            "raw_data": {
                "GTIN": "12345678905",
                "MID": null,
                "Manufacturer": "METRO",
                "MPN": "bacdf",
                "Product name PT": "Tempo de trabalho",
                "Description PT": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
                "Key feature PT": "test of key",
                "Product category": "1a079aae-c2ac-4a22-840f-4c665b91c827",
                "Brand": "aro",
                "Image": [
                    "https://upload.metro.de/metro/commons/8/85/Logo-Test.png"
                ]
            }
        },
        .....
        ],
    "totalCount": 16
}

Product Export

This endpoint facilitates the generation of a file containing your products based on the specified parameters.

The process involves two steps:

  • STEP 1:
    To generate the file, submit a POST request to /openapi/v1/product-list/export/generate, specifying the required filter parameters according to your preferences.
    Possible parameters:
    • format : partial or full (if full no additional parameteres can be sent).
    • filter: productName, category, targetMarkets (multiple values allowed), gtin, manufacturer, mpn.
    • ids: this is the item.id received in GET /openapi/v1/product-uploads/approved and it´s not compatible with filters.

Request example 1:

{
    "format": "partial",
    "filter": {
        "category": "766ebf04-ec2a-45b9-a6c8-a4638c50e4d4",
        "productName": "Tork",
        "targetMarkets": [
            "ES","DE"
        ]
    }
}

Request example 2:

{
    "format": "partial",
    "ids": [
        "52fedb03c4fa36f2b16327e45f14bb3cdca9d459",
        "76fedb03c4fa36f2b16327e45f14bb3cdca9d756"
    ]
}

Response: You will get http status code 202 with an uuid in the body. This indicates that file is currently being generated.

{
    "id": "9071e8cb-260f-43c6-bec8-3f9fb54b7187"
}

  • STEP 2:
    Request the generated product list.
    Make a GET request to /openapi/v1/product-list/export/latest. This will provide access to the .xlsx file generated in the preceding call. Note that only the latest file can be downloaded.

The response is http status code 200 with the following body. Please use the downloadUrl to obtain the file.

{
  "id": "0e8653d7-792b-4191-a02a-ad37efa595e3",
  "organizationId": "0e8653d7-792b-4191-a02a-ad37efa12345",
  "status": "created",
  "format": "partial",
  "createdAt": "2024-02-01T13:59:01.533Z",
  "generationTimeInSeconds": 45,
  "downloadedOn": "2024-02-01T13:59:01.533Z",
  "downloadUrl": "https://storage.googleapis.com/service-file-documents-bucket/file/5eb5b538-192d-4b30-adaf-87b550ca74fd"
}