Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Die The Product List API ermöglicht den Abruf einer vollständigen Produktliste für den eigenen Vendor Account. Mögliche Anwendungsfälle sind zum Beispiel Produktlisten auf Ihrer Verkaufsseite.

...

allows you to retrieve a complete product list for your vendor account. Possible use cases include product lists on your webiste. 


Info

The data must be cached on your side, we reserve the right to restrict the retrieval of data via API with throttling before too many requests


Table of Contents
stylenone


1.

...

Requirements

Definition

...

of a Secret Key in the account settings in the MY-Area

A secret key must be used to authenticate the request to the API. You can generate this in your MY area by clicking on your Vendor Name → Account Settings → API → Secret Key → Generate.


       


2.

...

Call

The call to the Product List API ist ein einfacher GET-Requestis a simple GET request:

https://secure.affilibank.de/[vendor name]/getproducts

Im HEAD des Request muss der obige Secret Key mitgeliefert werdenIn the HEAD of the request the secret key above must be supplied:

X-API-KEY=[ihr api key]

3.

...

Example code
The following code shows an example of the call via Curl and PHP


Code Block
languagephp
titleBeispiel PHP + CURL request
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://secure.affilibank.de/demo-account-affilicon/getproducts',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'X-API-KEY: DEMO_API_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

4. Response

Der JSON Response sieht dann je nach konfigurierten Produkten beispielsweise so ausThe JSON response then looks like this, for example, depending on the configured products:

Code Block
languagejs
titleResponse
{
    "13987": {
        "price": 19.899999999999999,
        "pricing_net": false,
        "image_url": "https://fd897.s3-eu-central-1.amazonaws.com/images/jtw9celoug0ggcog4ccccsggscw4go0.jpg",
        "texts": {
            "de_DE": {
                "title": "PhysischesPhysical Produktproduct simpelsimple (ze.Bg. Buchbook, coffee Kaffeetassecup)",
                "description": "DiesThis istis eina physischesphysical Produkt,product welchesthat aufis postalischemsent Wegeto zumthe Kundencustomer geschicktby wirdmail. "
            }
        },
        "shipping": {
            "europe1": {
                "base": 3.8999999999999999
            }
        }
    },
    "13988": {
        "price": 24.899999999999999,
        "pricing_net": false,
        "image_url": "https://fd897.s3-eu-central-1.amazonaws.com/images/r36uo2ly85wo08oso8gkcswcgwkogso.jpg",
        "texts": {
            "de_DE": {
                "title": "DigitalesDigital ProduktProduct (z.B. eBook, PDF)",
                "description": "DiesThis istis eina digitalesdigital Produkt,product welchesthat denis Kundenmade peravailable Downloadto zurcustomers Verfügungvia gestellt wirddownload. DerThe Kundecustomer kanncan direktaccess nachthe demproduct Kaufimmediately auf das Produkt zugreifenafter purchase."
            }
        }
    },
    "13989": {
        "price": 198,
        "pricing_net": false,
        "image_url": "https://fd897.s3-eu-central-1.amazonaws.com/images/bmtfodbaoi880cg4c80ck04ck0go4sg.jpg",
        "texts": {
            "de_DE": {
                "title": "Seminar with mitticket Ticket-Versanddelivery (ze.Bg. Businessbusiness Coachingcoaching)",
                "description": "HierbeiThis handeltis es sich um ein Seminara seminar, Coachingcoaching oderor eineother andereevent. Veranstaltung.Following Imthe Anschlusspurchase, anthe dencustomer Kaufimmediately erhältreceives derhis KundeeTicket sofortto seinthe eTicketevent zurby Veranstaltungemail. perYou Email.can Dascustomize Designthe desdesign Ticketsof könnenthe Sieticket nachaccording Ihrento Vorliebenyour anpassenpreferences."
            }
        }
    }
}