Colizey - Get Product Info
Summary of Changes: (The purpose of this table is to keep traceability and Product team to highlight the things that were changed into the scope, based on comments or discussions)
Date | Version | Comment |
---|---|---|
05/09/2022 | 1.1 | Based on a comment added more explanation re report. |
Typos were edited | ||
07/09/2022 | 1.2 | Typo edited; |
12/09/2022 | 1.3 | Added information regarding the structure of the file and some details regarding the e-mail we are going to receive. |
Since we will be listing products using csv feed exported directly from Hemi using our Automatic Export functionality, we wont be receiving any responses what is actually created and not. Thus we will have to do additional call to obtain the list of online SKUs and use the report as a response. The Colizey report of online SKUs is generated on a daily basis and we can only get the latest report. The whole flow consist of two steps: First we will have to request the report and get the link from the response
API Call: GET https://api.colizey.fr/merchant/skus
API Docs: https://apidoc.colizey.fr/?php#list-of-online-skus-object
Request Body:
No Body
Response:
{
"id": "75856bf2-15e3-4016-b429-deb3628fd59b",
"downloadLink": "https://api.colizey.fr/merchant/skus/latest/download",
"count": 4242,
"buyboxWonPct": 4200,
"date": "2020-01-06T14:21:51+00:00"
}
From the response we will be need to use the "downloadLink"
in order to download the report, doing another GET request.
The second step is to actually download the report with
API Call: GET https://api.colizey.fr/merchant/skus/latest/download
Request Body:
No Body
Response:
No Body
If successful, the API call will return a 200 status code, with the content of latest export in excel format.
The report will be downloaded in .xlsx format directly on the machine FTP in folder .temp/Colizey/ProductReport.
The file structure will be:
Column name | Description | Will use for mapping: |
---|---|---|
product_id |
Item identifier for Colizey (many SKUs can have the same product id) | Yes |
brand |
Brand name | No (for info only that we will receive it) |
sku |
Item unique identifier for the merchant | Yes |
name |
Merchant title for product | No (for info only that we will receive it) |
price |
Product price | No (for info only that we will receive it) |
original_price |
Product original price | No (for info only that we will receive it) |
price_with_shipping |
Product price with shipping | No (for info only that we will receive it) |
buy-box |
Merchant product wins the buy box (yes/no) | No (for info only that we will receive it) |
sku_in_competition |
Merchant product is in competition with other (yes/no) | No (for info only that we will receive it) |
best_price_with_shipping |
Sum of the best price and the best shipping price | No (for info only that we will receive it) |
link |
The product link | No (for info only that we will receive it) |
What we will need to do is to compare the SKU from the report against our Product Details > SKU and if there is a match and an Product Account record with account Colizey for this SKU to update
Product Account > Channel Item ID = product_id
Product Account > Product Status = “Product published
"
This while flow need to be automated in one cron se we can schedule it to work once in a day.
We would want to incorporate a functionality, where we will be able to generate a report in CSV format with following structure:
SKU | Name |
---|
The report will be used for comparing the existing SKUs on Colizey with the SKUs in Hemi. The report will contain the products which are in Colizey but not in Hemi.
This report will be send via e-mail. The e-mail field will be into Account Colizey and we will have an option for more than one e-mail addresses to be insert.
Bear in mind, the report will have delimiter ',', . The report will consist the information regarding the missing products from the file that we receive from Colizey.
The e-mail title would be “Emails for missing products from the marketplace Colizey.“ The report will be send via e-mail as attachment only if the size of the report is equal or smaller than 2MB. If the file exceed 2MB, it will be send through a link into the e-mail, and via clicking on the link, the user will be able to download the report file.