# Identification of a product ## Unique code Every product that is included in the Go!catalog database has a unique code that it will keep throughout its life. This code is the "**unique_id**" code. In addition to this code, a product in Go!Catalog has a Telematel code (“**id**”) which is also unique in the database, but which may change if the product is transferred or merged, being transferred to another brand. . The Telematel Code is made up of 10 numbers, the first 4 identify the brand, the next 5 the product and the last one is a control digit. This code is assigned to a product when it is added to a Go!catalog brand. If the product is transferred to another brand due to merger or spin-off processes, the product changes its Telematel code. In these cases the “**unique_id**” is the only code that does not undergo any variation in this process. We always recommend having both product codes (“**unique_id**” and “**id**”) in the integration processes to correctly manage all types of alterations that updates may generate. Summary: * The “**unique_id**” code is born and dies with the product in Go!catalog and is never modified or changed. * The Telematel code is unique in Go!catalog for each product, but its assignment is related to the brand, therefore a split or merger of brands produces a change in the Telematel code of the product but maintains the same “**unique_id** ”. * A change of commercial product reference does not produce a change of Telematel Code. <br> <br> # Brand and product states ## Product states A product in Go!Catalog can be in different states. | state_code | State_name | Comments | | --- | --- | --- | | **0** | activate | Active | | **10** | outdated | Discontinued | | **20** | recovered | Recovered. Occurs when a discontinued product becomes active | | **90** | deleted | The product is removed from the database. | | **91** | merged | Merged. When a brand merges with another brand, its products are new to that brand and are removed from its original brand. | | **92** | split | Split off. When a brand is spun off some of its products will be considered new products in the destination brand(s) and will be removed from the original brand. | <br> ## Mark States A brand in Go!Catalog can be in different states. | state_code | State_name | | --- | --- | | **0** | Active | | **10** | Discontinued. Inactive brand. Stop posting and updating your information. | | **91** | Merged. The brand in a merged state is left without products, except for one with the reference 0, whose description indicates “Brand in the process of merging”. | <br> <br> # Use cases ## When a new brand is hired Add the new brand to your database. Download the brand index. The new mark will appear in the index. You will be able to download all the products of the new contracted brand. The list of all products will be reported in the product index. <br> ## When a mark is removed A mark can be removed for two reasons: * It is removed from the list of contracted brands: from that moment it will not appear in the index of brands. * The brand is removed from the Telematel database: all products of the brand will be removed. A brand can be removed from the Telematel database when: * The brand is merged with another brand. * The manufacturer (brand) ends its commercial activity. * Other <br> ## When there is a transfer of data between brands (merger or split) Due to market demands, brands can unify or separate their content when publishing it. Each manufacturer, content publisher in Go!catalog, decides how to publish their information and occasionally, under specific circumstances, may need to make variations that require executing the brand merger or split processes. These processes, given that we maintain the traceability of the content throughout its life in Go!catalog, entail a series of changes in the product that require special attention in the update and integration processes with other applications. <br> ## **A. When a brand merges** **Brand merger**: Content from two or more brands is merged into one brand. The entire content of one or more brands is moved to another brand, therefore all products are moved and linked to another Go!catalog brand. This can be a brand already published and active in Go!Catalog or a new brand. When products are transferred from one brand to another, they change their Telematel code for new Telematel codes, assigned according to the new brand (4 brand digits + 5 product digits + 1 control digit). **Brand of origin**: the brand is merged with another brand. All of your active products are removed. No action is taken with obsolete brand products. The mark will be removed after approximately two months. **Destination brand**: all products of the origin brand are transferred to this brand as new products. If you have not contracted the destination brand, Telematel will automatically add this brand to its list of contracted brands. For each merged product, there will be two files, one for the source brand and one for the destination brand. In the JSON of the merged product (the one that is removed from the origin brand) * State “state_name” will be reported as “merged” * In the “replaced\_by\_id” field, the new Telematel code will be indicated <br> ### 1) Product file in the original brand Pay special attention to the following fields in the file: | Field | Value | | --- | --- | | **brand_id** | Brand code of the brand of origin e.g. 322 | | **id** | Internal product code (Telematel code) in the brand of origin e.g. “0322000001” | | **unique_id** | Identification number. Act as a unique identifier for the product. It is brand independent. If a product is merged with another brand, “unique_id” | | **part_code** | Product manufacturer code. If a product is merged with another brand, “part_code” | | **replaced\_by\_id** | New internal product code. Informed when a brand merges or spins off. Telematel code (id) in the destination brand. | | **deleted** | true | | **state_code** | 91 | | **state_name** | “merged” | <br> ### 2) Product file in the destination brand Pay special attention to the following fields in the file: | Field (example) | Value | | --- | --- | | **brand_id** | Brand code of the destination brand e.g. 315 | | **id** | Internal Product Code (Telematel code) in the destination brand. e.g. “**0315000001**” | | **unique_id** | Identification number. Act as a unique identifier for the product. It is independent of the brand to which a product belongs. If a product is merged with another brand, "**unique_id**" | | **part_code** | Product manufacturer code. If a product is merged with another brand, “**part_code**” | | **state_code** | 0 | | **state_name** | “**active**” (active) | Note: We will shortly incorporate the data “**previous\_by\_id**” in the JSON of the product that has been transferred to a new brand in order to indicate the previous Telematel code. <br> ### 3) Brand index file When the source mark is removed, pay special attention to the following fields of the merged mark file | Field | Value | | --- | --- | | **url** e.g. “https://api.telematel.com/products?brand_id=311&format=json” | Branded Product Request URL. It is required to add the Token parameter or security code behind the URL | | **type** | “**products\_by\_brand**” | | **state_name** | “**merged**” | | **state_code** | 91 | | **id** | e.g. 311 | | **deleted** | true | <br> ## **B. When a brand splits (divides)** **Brand spin-off**: Part of the content of a brand is transferred or one or more brands, therefore, the selected products are transferred and linked to another brand and new Telematel codes are assigned **Origin brand**: the origin brand that separated its content into one or more brands. **Destination brand**: Some products of the origin brand are transferred to this brand as new products. If you have not contracted this brand, Telematel automatically includes this brand in its list of contracted brands. For each spun off product, we have two files, one for the source brand, one for the destination brand. <br> ### 1) Product file in the original brand Pay special attention to the following fields of the file | Field (example) | Value | | --- | --- | | **brand_id** | Brand code of the brand of origin e.g. 322 | | **id** | Internal product code (Telematel code) in the brand of origin e.g. “0322000001” | | **unique_id** | Identification number. Act as a unique identifier for the product. It is independent of the brand to which a product belongs. If a product is moved to another brand, unique_id | | **part_code** | Product manufacturer code. If a product is moved to another brand, part_code | | **replaced\_by\_id** | New internal product code. Informed when a brand merges or spins off. Telematel code (id) in the destination brand. | | **deleted** | true | | **state_code** | 92 | | **state_name** | “split” | <br> ### 2) Product file in the destination brand Pay special attention to the following fields of the file | Field (example) | Value | | --- | --- | | **brand_id** | Brand code of the destination brand e.g. 323 | | **id** | Internal Product Code (Telematel code) in the destination brand. e.g. “0323000001” | | **unique_id** | Identification number. Act as a unique identifier for the product. It is independent of the brand to which a product belongs. If a product is moved to another brand, unique_id | | **part_code** | Product manufacturer code. If a product passes to another brand, part_code | | **state_code** | 0 | | **state_name** | active | <br> <br> # Download data ## Product index update The product index is updated daily and allows you to identify all types of updates when: * A new product is added * A product is modified * A product is discontinued * A product is deleted * A product is recovered <br> ### 1) Product file in the original brand Check your database. If you can't find the product, check it in. <br> ### A product is modified When a product is modified, the "date" on file will be updated in the product index. This file will help you verify when to update this product in the following download processes. Take a look at the field in the following example: | Field | Description | | --- | --- | | **date** e.g. "2018-01-03 13:23:00" | Product update date in ISO_8601 | <br> ## 2) A product is discontinued Pay special attention to the following fields on the Product tab. | Field (example) | Value | | --- | --- | | **state_code** | 10 | | **state_name** | “outdated” | | **activate** | false | <br> ## 3) A product is removed There are three possible situations. Each of them has a particular status code. | state_code | State_name | Comments | | --- | --- | --- | | **90** | deleted | The product is removed from the database. | | **91** | merged | When a brand merges with another brand, its products are new to that brand and are removed from its original brand. | | **92** | split | When a brand is spun off into another brand, some of its products are moved as a new product under that brand and are removed from its original brand. | The product is no longer in the product index after 90 days. Pay special attention to the following fields on the Product tab. | Field (example) | Value | | --- | --- | | **deleted** | true | | **activate** | false | <br> ## 4) A product is retrieved It happens when a discontinued product is activated. Pay special attention to the following fields on the Product tab. | Field (example) | Value | | --- | --- | | **state_code** | 20 | | **state_name** | “recovered” | | **activate** | false | The next time the product is modified, if it is still active, its status code will be zero. <br> ## Download Methods There are two methods to access API updates: * Downloads by product: requests made to the API product by product (by Telematel code) and a JSON is obtained for each request. * Downloads by brand: these are requests made by brand and a ZIP is obtained that contains all the JSON of the brand's products. The most notable difference is in the data download time, since the download is much faster by brand. In downloads by product, the requests are focused on the updated products in a certain period, while in the download by brand, the requests are focused on all the content of the brand, so that once downloaded, proceed to update the JSON that have undergone changes. <br> ## Recommendations To obtain optimal results in data downloads through the API, we recommend that you read the following steps carefully: * Download all products on your first connection. From then on, we recommend that you download only updated products. * It is recommended to have a specific branding process. If any errors are found in the daily update, you should be able to force a full download for a specific brand, downloading the product index for the brand and downloading all products for the brand. * When you subscribe to a new brand, download all its products. The other brands can be upgraded as usual. * If you have not downloaded products for three months, it is better to download all products * We recommend that you check which products have been updated successfully in the daily process, in order to continue the process if the process is interrupted for any reason. <br> <br> # International standards **We use multiple international standards to facilitate integration in different environments.** | | | | --- | --- | | **UTF-8 Unicode Transformation Format 8-bit** | [http://www.utf-8.com/](http://www.utf-8.com/) | | **ISO 8601 Date and time format** | [https://www.iso.org/iso-8601-date-and-time-format.html](https://www.iso.org/iso-8601-date-and-time-format.html) | | **ISO 4217 Currency codes** | [https://www.iso.org/iso-4217-currency-codes.html](https://www.iso.org/iso-4217-currency-codes.html) | | **ISO 639-1 Codes for the representation of names of languages** | [https://www.iso.org/obp/ui/#iso:std:iso:639:-1:ed-1:v1:en](https://www.iso.org/obp/ui/ #iso:std:iso:639:-1:ed-1:v1:en) | | **ISO 3166-1 alpha-2 Country code** | [https://www.iso.org/iso-3166-country-codes.html](https://www.iso.org/iso-3166-country-codes.html) | | **EAN-13 European Article Number** | [https://www.gs1.org/standards/barcodes/ean-upc](https://www.gs1.org/standards/barcodes/ean-upc) | | **GTIN Global Trade Item Number** | [https://www.gs1.org/standards/barcodes/ean-upc](https://www.gs1.org/standards/barcodes/ean-upc) Includes UCC-12, EAN-13, EAN-14 and EAN-8 | | **MD5 Cryptographic reduction** | [https://www.rfc-editor.org/rfc/rfc6151.txt](https://www.rfc-editor.org/rfc/rfc6151.txt) | | **UN/ECE CEFACT recommendation 20 Measurement units** | [https://www.unece.org/fileadmin/DAM/uncefact/recommendations/rec20/rec20\_Rev13e\_2017.xls](https://www.unece.org/fileadmin/DAM/uncefact/recommendations/rec20/ rec20_Rev13e_2017.xls) | | **ETIM International characteristics standard** | [https://www.etim-international.com](https://www.etim-international.com) | <br> ## Especificaciones técnicas Todas las respuestas del sistema API están codificadas en UTF-8. Todas las respuestas del sistema de búsqueda remota están en formato JSON. Recomendamos que la versión del sistema operativo del servidor sea superior a Windows Server 2003. <br> <br> # FAQs ### No puedo descargar el archivo de índice Verifique que la dirección IP sea una de las IP especificadas en el contrato. Si la solicitud se realiza desde otro servidor, no funcionará. <br> ### El valor del campo under\_request en los nodos public\_prices es '**verdadero**'. ¿Qué significa? El fabricante no ha facilitado el precio. Si desea conocer el precio, puede contactar directamente con el fabricante. <br> ### No puedo descargar el archivo de la marca Compruebe que tiene informado el token de cliente (código de seguridad).