hitmeister / api-sdk-php

Kaufland.de Onlineshop (former real.de and Hitmeister) API SDK for PHP
https://www.real.de/api/v1/
MIT License
24 stars 29 forks source link

GET /product-data/{ean}/ question #104

Open xiaoyukarl opened 3 years ago

xiaoyukarl commented 3 years ago

hello When I use this 'GET /product-data/{ean}/' API, some eans return original_picture. original_url is a url, and some eans return a base64 string. Why is there such a difference? When the return is a base64 string, the response time is very long, I want to return only the url。 thank

{
  "ean": [
    "0794832213874"
  ],
  "category": [
    "nachthemden"
  ],
  "title": [
    "Damen V Ausschnitt Sling Nachtwäsche Sexy Spitze Einfarbig Schlafkleid Ärmellos Nachthemd mit Tanga-Slip XL (EU:48) Schwarz"
  ],
  "mpn": [],
  "list_price": [],
  "short_description": [],
  "description": [
    "<p><strong>Eigenschaften:</strong><br />\n❀V-Ausschnitt mit Spitze, Ärmellos, Kontrast Farbe Patchwork.<br />\n❀Die Falten auf der Brust machen dieses Nachthemd voll von sexy und lässigem französischen Stil.<br />\n❀Super weich, sehr angenehm auf der Haut. <br />\n❀Einfache Formen und klassische Stile, können Sie wählen, um es als Schlafkleid oder Freizeitkleidung frei zu tragen. Irgendeine Jahreszeit oder einfach für das Tragen um das Haus oder das Faulenzen.</p>\n\n<p><strong>Produktinformation:</strong><br />\n❀Material: 95% Polyester, 5% Elasthan<br />\n❀Länge: Kurze<br />\n❀Ausschnitt: V-Neck<br />\n❀Ärmellänge: Ärmellos<br />\n❀Jahreszeit: Frühling, Herbst, Sommer<br />\n❀Kleidungspflege: Handwäsche, Maschinenwaschbar</p>\n\n<p><strong>Größe:</strong><br />\n❀L(EU:46):Büste:96cm,Länge:98cm<br />\n❀XL(EU:48):Büste:102cm,Länge:99cm<br />\n❀2XL(EU:50):Büste:108cm,Länge:100cm<br />\n❀3XL(EU:52):Büste:116cm,Länge:101cm<br />\n❀4XL(EU:54):Büste:122cm,Länge:102cm<br />\n❀5XL(EU:56):Büste:128cm,Länge:103cm</p>\n\n<p><strong>Hinweis: </strong><br />\n1. Bitte vergleichen Sie vor dem Kauf mit Ihrer detaillierten Größe. <br />\n2. Aufgrund des Farbunterschieds zwischen verschiedenen Computern kann die Farbe des tatsächlichen Produkts geringfügig vom Bild abweichen. <br />\n3. Aufgrund der manuellen Messung bitte 1-3CM Fehler zulassen.</p>"
  ],
  "picture": [
    "http://pds-pictures-seller.s3.amazonaws.com/0794832213874/35693014/2242d14f848364fa68eb91da8bdeae60.jpg",
    "http://pds-pictures-seller.s3.amazonaws.com/0794832213874/35693014/dee73545941088831336c3d48b7a52af.jpg",
    "http://pds-pictures-seller.s3.amazonaws.com/0794832213874/35693014/e501f678cba114fe3a40a766b129164d.jpg",
    "http://pds-pictures-seller.s3.amazonaws.com/0794832213874/35693014/06ed1c8296064ac7ec006cea5abe978c.jpg",
    "http://pds-pictures-seller.s3.amazonaws.com/0794832213874/35693014/a0743b6229ecb8f2294bbe25e52a7358.jpg",
    "http://pds-pictures-seller.s3.amazonaws.com/0794832213874/35693014/a9d7880d5f2a8932d6adafcb1d3ae546.jpg",
    "http://pds-pictures-seller.s3.amazonaws.com/0794832213874/35693014/f07d3180f7b4774153744626b9f4de1d.jpg",
    "http://pds-pictures-seller.s3.amazonaws.com/0794832213874/35693014/691e72e2f1056282bdab4ced0eb5f01a.jpg",
    "http://pds-pictures-seller.s3.amazonaws.com/0794832213874/35693014/be937e28d13fbc2fb589a5f7fdfb1dbf.jpg"
  ],
  "licence": [],
  "manufacturer": [
    "10001"
  ],
  "battery_disposal_instruction": [],
  "target": [
    "Damen"
  ],
  "colour": [
    "Schwarz"
  ],
  "pattern": [
    "Unifarben"
  ],
  "material_composition": [
    "95% Polyester, 5% Elasthan"
  ],
  "clothing_size": [
    "XL"
  ],
  "original_picture": [
    {
      "original_url": "https://media.real-onlineshop.de/images/items/original/2242d14f848364fa68eb91da8bdeae60.jpg",
      "uploaded_url": "http://pds-pictures-seller.s3.amazonaws.com/0794832213874/35693014/2242d14f848364fa68eb91da8bdeae60.jpg"
    },
    {
      "original_url": "https://media.real-onlineshop.de/images/items/original/dee73545941088831336c3d48b7a52af.jpg",
      "uploaded_url": "http://pds-pictures-seller.s3.amazonaws.com/0794832213874/35693014/dee73545941088831336c3d48b7a52af.jpg"
    },
    {
      "original_url": "https://media.real-onlineshop.de/images/items/original/e501f678cba114fe3a40a766b129164d.jpg",
      "uploaded_url": "http://pds-pictures-seller.s3.amazonaws.com/0794832213874/35693014/e501f678cba114fe3a40a766b129164d.jpg"
    },
    {
      "original_url": "https://media.real-onlineshop.de/images/items/original/06ed1c8296064ac7ec006cea5abe978c.jpg",
      "uploaded_url": "http://pds-pictures-seller.s3.amazonaws.com/0794832213874/35693014/06ed1c8296064ac7ec006cea5abe978c.jpg"
    },
    {
      "original_url": "https://media.real-onlineshop.de/images/items/original/a0743b6229ecb8f2294bbe25e52a7358.jpg",
      "uploaded_url": "http://pds-pictures-seller.s3.amazonaws.com/0794832213874/35693014/a0743b6229ecb8f2294bbe25e52a7358.jpg"
    },
    {
      "original_url": "https://media.real-onlineshop.de/images/items/original/a9d7880d5f2a8932d6adafcb1d3ae546.jpg",
      "uploaded_url": "http://pds-pictures-seller.s3.amazonaws.com/0794832213874/35693014/a9d7880d5f2a8932d6adafcb1d3ae546.jpg"
    },
    {
      "original_url": "https://media.real-onlineshop.de/images/items/original/f07d3180f7b4774153744626b9f4de1d.jpg",
      "uploaded_url": "http://pds-pictures-seller.s3.amazonaws.com/0794832213874/35693014/f07d3180f7b4774153744626b9f4de1d.jpg"
    },
    {
      "original_url": "https://media.real-onlineshop.de/images/items/original/691e72e2f1056282bdab4ced0eb5f01a.jpg",
      "uploaded_url": "http://pds-pictures-seller.s3.amazonaws.com/0794832213874/35693014/691e72e2f1056282bdab4ced0eb5f01a.jpg"
    },
    {
      "original_url": "https://media.real-onlineshop.de/images/items/original/be937e28d13fbc2fb589a5f7fdfb1dbf.jpg",
      "uploaded_url": "http://pds-pictures-seller.s3.amazonaws.com/0794832213874/35693014/be937e28d13fbc2fb589a5f7fdfb1dbf.jpg"
    }
  ]
}
{
  "ean": [
    "0794832212693"
  ],
  "category": [
    "sommerkleider"
  ],
  "title": [
    "Baby Mädchen Sommer Casual Bekleidung 2Stücke Rüschen Schulter Kurzarm Top+Blumendruck Shorts Kleidung Set Outfits 18-24 Monate (86-92) Grau"
  ],
  "mpn": [],
  "list_price": [],
  "short_description": [],
  "description": [
    "<p><strong>【Material】</strong> Hautfreundliches Baumwolle- und Polyestergewebe, atmungsaktiv, bietet Ihrem kleinen Baby ein weiches und angenehmes Gefühl.<br />\n<strong>【Süßes Design】</strong> Kurzarm Top: Grau Rüschen Baby Kurzarm Top;Blumendruck Shorts: Layer Volant dekorative, elastische Taille. Kommt<br />\n<strong>【Anlass】</strong> Ideal für den täglichen Gebrauch, Urlaub, Party, Fotografie, Babygeschenk und jedes andere besondere Festival.<br />\n<strong>【Größe】</strong>Geeignet für 0-6/6-12/12-18/18-24Monate Neugeborenes Baby Mädchen,Saison,Frühling/Sommer/Herbst/.<br />\n<strong>【Stil】</strong>Stilvoll,Neugeborenes Baby Mädchen Beiläufig Kleidung set.</p>\n\n<p><strong>Größe </strong><br />\n●Empfohlenes Alter: 0-6Monate(62-68),Länge:30cm,Bust:46cm,Hosenlänge:23cm<br />\n●Empfohlenes Alter: 6-12Monate(74-80),Länge:32cm,Bust:48cm,Hosenlänge:24cm<br />\n●Empfohlenes Alter: 12-18Monate(80-86),Länge:34cm,Bust:50cm,Hosenlänge:25cm<br />\n●Empfohlenes Alter: 18-24Monate(86-92),Länge:36cm,Bust:52cm,Hosenlänge:26cm</p>\n\n<p><strong>※Hinweis: </strong><br />\n1. Bitte vergleichen Sie vor dem Kauf mit Ihrer detaillierten Größe. <br />\n2. Aufgrund des Farbunterschieds zwischen verschiedenen Computern kann die Farbe des tatsächlichen Produkts geringfügig vom Bild abweichen. <br />\n3. Aufgrund der manuellen Messung bitte 1-3CM Fehler zulassen.</p>\n"
  ],
  "picture": [
    "http://pds-pictures-seller.s3.amazonaws.com/0794832212693/35693014/432fe0686927879ae0ab8e35996565a5.jpg",
    "http://pds-pictures-seller.s3.amazonaws.com/0794832212693/35693014/25cb12911b890f674a1637268115002f.jpg",
    "http://pds-pictures-seller.s3.amazonaws.com/0794832212693/35693014/a886185483bbc980d6072f9f6c284903.jpg",
    "http://pds-pictures-seller.s3.amazonaws.com/0794832212693/35693014/a0e534dd9a9e7707b7eed299e25be4ac.jpg",
    "http://pds-pictures-seller.s3.amazonaws.com/0794832212693/35693014/afafdd18a21cc235f744bf8fae8819e7.jpg",
    "http://pds-pictures-seller.s3.amazonaws.com/0794832212693/35693014/4901280f3dd753eab563b0a61cd0b7f8.jpg",
    "http://pds-pictures-seller.s3.amazonaws.com/0794832212693/35693014/e5109caab81ed6840539a8b08b4ca608.jpg"
  ],
  "licence": [],
  "manufacturer": [
    "10002"
  ],
  "battery_disposal_instruction": [],
  "target": [
    "Kinder",
    "Mädchen"
  ],
  "colour": [
    "Grau"
  ],
  "pattern": [
    "Geblümt",
    "Blumen"
  ],
  "material_composition": [
    "95% Baumwolle"
  ],
  "clothing_size": [
    "86/92"
  ],
  "original_picture": [
       {
      "original_url": "data:image/jpeg;base64,/9j/4SUmRXhpZgAATU0AKxxxxx",
      "uploaded_url": "http://pds-pictures-seller.s3.amazonaws.com/0794832213874/35693014/2242d14f848364fa68eb91da8bdeae60.jpg"
    },
    {
      "original_url": "data:image/jpeg;base64,/9j/4SUmRXhpZgAATU0AKxxxxxxx",
      "uploaded_url": "http://pds-pictures-seller.s3.amazonaws.com/0794832213874/35693014/dee73545941088831336c3d48b7a52af.jpg"
    },
  ]
}
mansurs commented 3 years ago

Sorry, maybe the answer is a bit late, because the ean 0794832212693 has no data-urls. Do you have an another example?

xiaoyukarl commented 3 years ago

Sorry, maybe the answer is a bit late, because the ean 0794832212693 has no data-urls. Do you have an another example?

Hi, @mansurs , These original_picture.original_url of ean all return base64 strings, can you control not to return this part of information through parameter control, because this information is useless to us, but it causes the API to respond very slowly;

0794832214017, 0794832214000, 0794832213997, 0794832213980, 0794832213973

Thanks;

mansurs commented 3 years ago

@xiaoyukarl we should have fixed the issue. We don't store base64 string and we don't expose the internal fields in the API anymore. Could you please check and confirm?