Product lists
Product List
Through the following GET request you can get the list of your approved or rejected products. You can apply filters such as productName, category, targetMarkets, GTIN, MPN, and Manufacturer.
Appoved products List
Use GET https://service-pim-utils.sandbox.infra.metro-markets.cloud/openapi/v1/product-uploads/approved
to retrieve a list in JSON format of your successfully created products along with their attributes.
Rejected products List
Use GET https://service-pim-utils.sandbox.infra.metro-markets.cloud/openapi/v1/product-uploads/rejected
to retrieve a list in JSON format of your products with errors along with their attributes.
Filters
You can apply filters, as query params, such as productName, category, targetMarkets, GTIN, MPN, and Manufacturer.
Filter name | Data type | Comments |
---|---|---|
offset | number | Use for pagination |
limit | number | To define the amount of items to retrieve (10, 25, 50 or 100) |
sort[updatedAt] | string | ASC or DESC |
filter[category] | string | By a valid category name or category id |
filter[targetMarkets] | string | By a valid active market |
filter[productName] | string | |
filter[gtin] | string | |
filter[mpn] | string | |
filter[manufacturer] | string | |
filter[updatedAt] | string |
Disclaimer: If your dataset is considerably large, please use the filters to avoid timeouts and have a better control of the amount of data is retrieved.
Request example
GET https://service-pim-utils.sandbox.infra.metro-markets.cloud/openapi/v1/product-uploads/rejected?
offset=0&
filter[targetMarkets]=DE&
filter[mpn]=1233&
filter[manufacturer]=asdas&
limit=10
Response
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
}
Retrieve Errors for a Specific Rejected Product Upload
GET /openapi/v1/product-uploads/rejected/{id}/errors
-
Description: Fetch detailed error information for a specific rejected product upload, identified by its unique
{id}
. -
Parameters:
id
(path) — The unique identifier of the rejected product upload.
-
Response: Returns a detailed list of error messages and codes associated with the specified rejected upload.
Product Export
This endpoint facilitates the generation of a file containing your products based on the specified parameters.
Generate Approved Product Export
POST /openapi/v1/product-list/export/generate
-
Description: Initiates the generation of an export file containing the list of approved product list selected.
-
Response: Returns the ID of the resourceof the export generated.
Get Latest Approved Product Export Generated
GET /openapi/v1/product-list/export/latest
-
Description: Obtain the most recent export file detailing approved product list.
-
Response: Returns details about the latest approved product export, such as a download URL,and export metadata.
Generate Rejected Product Export
POST /openapi/v1/product-list/rejected/generate
-
Description: Initiates the generation of an export file containing the list of rejected product list selected.
-
Response: Returns the ID of the resourceof the export generated.
Get Latest Rejected Product Export Generated
GET /openapi/v1/product-list/rejected/latest
-
Description: Obtain the most recent export file detailing rejected product list.
-
Response: Returns details about the latest rejected product export, such as a download URL,and export metadata.
- 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 (iffull
no additional parameteres can be sent).filter
: productName, category, targetMarkets (multiple values allowed), gtin, manufacturer, mpn.ids
: this is theitem.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"
}
Disclaimer: If your dataset is considerably large, please use the filters to avoid timeouts and have a better control of the amount of data is retrieved.
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 (iffull
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 theitem.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"
]
}