Product lists

Link to swagger documentation

  1. Product List
  2. Product Export
  3. Add New Markets 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"
}

Add New Markets Exports

You can use this service to expand your existing product data to other markets.

This endpoint facilitates the generation of a file containing your products based on the specified parameters. The file includes shared attributes applicable across all markets, derived from your provided information, alongside localizable attributes for the new markets, which require your input.

The process involves two steps:

  • STEP 1:
    To generate the file, submit a POST request to /openapi/v1/product-list/new-markets/generate, specifying the required filter parameters according to your preferences.
    Possible parameters:
    • format : partial or full (if full no additional parameteres can be sent).
    • newMarkets: specify here the new market that you would like to send us product data for. In the generated file this will be Target markets.
    • 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:

{
  "format": "partial",
  "newMarkets": [
    "ES"
  ],
  "filter": {
    "category": "87f7a4b1-7f88-419e-86f0-1d23bb10f435",
    "targetMarkets": [
      "IT"
    ]
  }
}

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 list.
    Make a GET request to /openapi/v1/product-list/new-markets/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": "9dbf89f3-c5df-4eb7-8640-5652d9ebe1fe",
    "organizationId": "59c6a756-b90f-4f56-a1f8-28678b74985d",
    "status": "created",
    "format": "partial",
    "createdAt": "2024-05-09T14:00:45+00:00",
    "generationTimeInSeconds": 1,
    "downloadedOn": null,
    "downloadUrl": "https://storage.googleapis.com/service-pim-utils-export-bucket-sandbox/59c6a756-b90f-4f56-a1f8-28678b74985d/new_markets_export_2024-05-09_14-00-46.xlsx?GoogleAccessId=app-bucket-connector%40metro-markets-dev.iam.gserviceaccount.com&Expires=1715868046&Signature=ScogAeVw%2FMkQ2HnWo7deSyvyFl0x%2FKMe0j.........",
    "newMarkets": [
        "ES"
    ]
}