项目作者: mohapsat

项目描述 :
Flask API to query Salesforce Marketing Cloud Data Extensions + Swagger UI
高级语言: Python
项目地址: git://github.com/mohapsat/sfmc-api.git
创建时间: 2018-12-11T22:59:20Z
项目社区:https://github.com/mohapsat/sfmc-api

开源协议:

下载


Salesforce Marekting Cloud Data Extension Query API

Enables you to query data extensions in Salesforce Marketing Cloud using any column(s) from the data extension.

BuiltWith:
Flask & Swagger UI

Available endpoints:

Swagger UI

http://0.0.0.0:5000/apidocs/
Swagger UI

Check

curl 'http://0.0.0.0:5000/check'

  1. {
  2. "status": "success",
  3. "message": "service is operating normally.",
  4. "data": []
  5. }

Error handler

curl 'http://0.0.0.0:5000/<random_text>'

  1. {"status": "error", "message": "Resource not found. Please check URL. Did you mean "/sfmc/sends/<emailType>/<correlationId> ?", "data": []}

Query Data Extension

curl 'http://0.0.0.0:5000/sfmc/sends/password_reset/TEST-GUID'

  1. {
  2. "status": "success",
  3. "message": "1 result(s) returned by Salesforce",
  4. "data": [
  5. {
  6. "name": "correlationId",
  7. "value": "TEST-GUID"
  8. },
  9. {
  10. "name": "EmailAddress",
  11. "value": "mohapsat@gmail.com"
  12. },
  13. {
  14. "name": "SubscriberKey",
  15. "value": "001"
  16. },
  17. {
  18. "name": "emailType",
  19. "value": "password_reset"
  20. },
  21. {
  22. "name": "uid",
  23. "value": "001"
  24. },
  25. {
  26. "name": "timestamp_DT",
  27. "value": "12/28/2018 8:28:47 PM"
  28. }
  29. ]
  30. }