Verben GET/POST/PATCH/DELETE verbs
Folgende Verben stehen zur Ausführung von Operationen auf die Ressourcen zur Verfügung:
GET: ruft ein Element oder eine Sammlung von Elementen ab.POST: erstellt eine Ressource mit Parametern.PATCH: aktualisiert eine Ressource mit Parametern.DELETE: löscht eine Ressource.
Beispielanfragen
-
Beispielhafte GET-Anfrage für die Profilsammlung.
code language-none $curl -X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer <ACCESS_TOKEN>' \ -H 'Cache-Control: no-cache' \ -H 'X-Api-Key: <API_KEY>'Es wird eine Tabelle mit Profilen zurückgegeben.
code language-none { "content": [ { "PKey": "<PKEY>", "firstName": "Olivia", "lastName": "Varney", "birthDate": "1977-09-°4", "email": "o.varney@mail.com", }, { "PKey": "<PKEY>", "firstName": "John", "lastName": "Doe", "birthDate": "1985-08-17", "email": "johndoe@mail.com", } ], } -
Beispielhafte GET-Anfrage für ein bestimmtes Profil.
code language-none $curl -X GET https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/<PKEY> \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer <ACCESS_TOKEN>' \ -H 'Cache-Control: no-cache' \ -H 'X-Api-Key: <API_KEY>'Es wird das angeforderte Profil zurückgegeben.
code language-none { "PKey": "<PKEY>", "firstName": "John", "lastName": "Doe", "birthDate": "1985-08-17", "email": "johndoe@mail.com", ... } -
Beispielhafte POST-Anfrage zum Erstellen eines Profils.
code language-none -X POST https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer <ACCESS_TOKEN>' \ -H 'Cache-Control: no-cache' \ -H 'X-Api-Key: <API_KEY>' \ -d '{"lastName":"Doe"}'Es wird das Profil mit den Standardfeldern zurückgegeben.
code language-none { "PKey": "<PKEY>", "firstName": "John", "lastName": "Doe", "birthDate": "1985-08-17", "email": "johndoe@mail.com", } -
Beispielhafte PATCH-Anfrage zum Aktualisieren eines Profils.
code language-none -X PATCH https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/<PKEY> \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer <ACCESS_TOKEN>' \ -H 'Cache-Control: no-cache' \ -H 'X-Api-Key: <API_KEY>' \ -d '{"firstName":"Mark"',"lastName":"Smith"}'Es werden der PKEY und die URL zurückgegeben, um das aktualisierte Profil abzurufen.
code language-none { "PKey": "<PKEY>", "href": "https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/<PKEY>" } -
Beispielhafte DELETE-Anfrage zum Löschen eines Profils.
code language-none -X DELETE https://mc.adobe.io/<ORGANIZATION>/campaign/profileAndServices/profile/<PKEY> \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer <ACCESS_TOKEN>' \ -H 'Cache-Control: no-cache' \ -H 'X-Api-Key: <API_KEY>'Die Anfrage gibt eine 200-Antwort zurück, um zu bestätigen, dass das Profil gelöscht wurde.
recommendation-more-help
3ef63344-7f3d-48f9-85ed-02bf569c4fff