Deine erste Anfrage in fünf Minuten.
Am Ende dieser Seite hast du ein OAuth2-Token geholt, deine Sprache gefunden, ein Profil gelesen und geschrieben und einen asynchronen Batch-Job gestartet.
Jeder Aufruf für Katalog und Zielgruppe gehört zu einer Sprache. In Schritt 2 holst du eine language_id, die du danach überall nutzt.
1Access Token anfordern
Die API nutzt den OAuth2-Client-Credentials-Flow. Tausch deine Client-ID und dein Secret gegen ein kurz gültiges Access Token und sende es bei jeder Anfrage als Bearer Token mit.
curl -X POST https://app.reloadify.com/oauth/token \
-H "Content-Type: application/json" \
-d '{
"grant_type": "client_credentials",
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET"
}'
$res = $client->post('https://app.reloadify.com/oauth/token', [
'json' => [
'grant_type' => 'client_credentials',
'client_id' => getenv('RELOADIFY_CLIENT_ID'),
'client_secret' => getenv('RELOADIFY_CLIENT_SECRET'),
],
]);
$token = json_decode($res->getBody())->access_token;
import os, requests
token = requests.post(
"https://app.reloadify.com/oauth/token",
json={
"grant_type": "client_credentials",
"client_id": os.environ["RELOADIFY_CLIENT_ID"],
"client_secret": os.environ["RELOADIFY_CLIENT_SECRET"],
},
).json()["access_token"]
require "httparty"
token = HTTParty.post(
"https://app.reloadify.com/oauth/token",
body: {
grant_type: "client_credentials",
client_id: ENV["RELOADIFY_CLIENT_ID"],
client_secret: ENV["RELOADIFY_CLIENT_SECRET"]
}
)["access_token"]
2Sprache nachschlagen
Frag die Sprachen (Shops oder Märkte) ab, die du mit deinen Zugangsdaten nutzen kannst. Die id einer Sprache nutzt du in jedem Pfad für Katalog und Zielgruppe.
curl https://app.reloadify.com/api/v2/languages \
-H "Authorization: Bearer {access_token}"
$languages = json_decode(
$client->get('/api/v2/languages', $auth)->getBody()
);
languages = requests.get(
"https://app.reloadify.com/api/v2/languages",
headers={"Authorization": f"Bearer {token}"},
).json()
languages = HTTParty.get(
"https://app.reloadify.com/api/v2/languages",
headers: { "Authorization" => "Bearer #{token}" }
)
[
{ "id": "42", "name": "Deutsch", "code": "de", "active": "true" },
{ "id": "43", "name": "English", "code": "en", "active": "true" }
]
3Profile abfragen
Lies die Profile einer Sprache. Listen sind mit page und per_page (höchstens 250) paginiert und akzeptieren die Filter updated_after/created_after, damit du nur synchronisierst, was sich geändert hat.
curl "https://app.reloadify.com/api/v2/languages/42/profiles?per_page=3" \
-H "Authorization: Bearer {access_token}"
$profiles = json_decode(
$client->get('/api/v2/languages/42/profiles', [
'query' => ['per_page' => 3],
] + $auth)->getBody()
);
profiles = requests.get(
"https://app.reloadify.com/api/v2/languages/42/profiles",
params={"per_page": 3},
headers={"Authorization": f"Bearer {token}"},
).json()
profiles = HTTParty.get(
"https://app.reloadify.com/api/v2/languages/42/profiles",
query: { per_page: 3 },
headers: { "Authorization" => "Bearer #{token}" }
)
4Profil anlegen oder aktualisieren
Sende ein PUT mit einem profile-Objekt, um das Profil anzulegen oder zu aktualisieren, falls es mit dieser id/email schon existiert. Nur email ist erforderlich.
curl -X PUT https://app.reloadify.com/api/v2/languages/42/profiles \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{
"profile": {
"email": "noor@example.com",
"first_name": "Noor",
"subscribed_to_newsletter": true,
"gender": "female"
}
}'
$client->put('/api/v2/languages/42/profiles', [
'json' => ['profile' => [
'email' => 'noor@example.com',
'first_name' => 'Noor',
'subscribed_to_newsletter' => true,
]],
] + $auth);
requests.put(
"https://app.reloadify.com/api/v2/languages/42/profiles",
headers={"Authorization": f"Bearer {token}"},
json={"profile": {
"email": "noor@example.com",
"first_name": "Noor",
"subscribed_to_newsletter": True,
}},
)
HTTParty.put(
"https://app.reloadify.com/api/v2/languages/42/profiles",
headers: { "Authorization" => "Bearer #{token}", "Content-Type" => "application/json" },
body: { profile: { email: "noor@example.com", first_name: "Noor" } }.to_json
)
5Mit Batch-Jobs in großen Mengen synchronisieren
Du importierst Tausende Datensätze? Sende sie an den batch_jobs-Endpoint der Ressource. Er gibt sofort eine batch_id zurück und verarbeitet alles asynchron; danach fragst du das Ergebnis ab.
curl -X POST https://app.reloadify.com/api/v2/languages/42/profiles/batch_jobs \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{ "profiles": [ { "email": "a@example.com" }, { "email": "b@example.com" } ] }'
# → 202 { "batch_id": "abc123", "status": "queued", "status_url": "…" }
# frag den Status ab, bis der Job fertig ist, und lies dann die Ergebnisse pro Datensatz
curl https://app.reloadify.com/api/v2/batch_jobs/abc123 \
-H "Authorization: Bearer {access_token}"
Nächste Schritte
- Zur vollständigen API-Referenz: jede Ressource und jeder Endpoint, mit dem Aufbau von Anfragen und Antworten.
- Lies, wie ein Batch-Job abläuft, wenn du große Kataloge und Zielgruppen synchronisierst.
- Richte Coupon-Webhooks ein, um signierte Events von Reloadify zu empfangen.
- Du kommst nicht weiter? Klick oben auf Ask AI; der Assistent antwortet auf Basis dieser Dokumentation.