Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
741
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.37 KB | None | 0 0
  1. "ID" Number
  2. "Email" EmailAddress 254
  3. "LanguageID" Locale 5
  4. "Unsubscribed" Boolean
  5. "Promotion code sent" Boolean
  6. "T_OptedIn" Boolean
  7.  
  8. "ID" "415111"
  9. "Email" "sampleEmail@somedomain.com"
  10. "LanguageID" "hu-HU"
  11. "Unsubscribed" "False"
  12. "Promotion code sent" "False"
  13. "T_OptedIn" "False"
  14.  
  15. {
  16. "contactKey": "sampleEmail@somedomain.com",
  17. "attributeSets": [{
  18. "name": "Email Addresses",
  19. "items": [{
  20. "values": [{
  21. "name": "Email Address",
  22. "value": "sampleEmail@somedomain.com"
  23. },
  24. {
  25. "name": "HTML Enabled",
  26. "value": true
  27. }]
  28. }]
  29. }]
  30. }
  31.  
  32. curl -X POST --header "Content-Type:application/json" --header "Authorization: Bearer {{MY_TOKEN}}" -d "{"contactKey":"sampleEmail@somedomain.com","attributeSets":[{"name":"Email Addresses","items":[{"values":[{"name":"Email Address","value":"sampleEmail@somedomain.com"},{"name":"HTML Enabled","value":"true"}]}]}]}" "https://www.exacttargetapis.com/contacts/v1/contacts"
  33.  
  34. Host: https://www.exacttargetapis.com
  35. POST /contacts/v1/contacts
  36. Content-Type: application/json
  37. Authorization: Bearer {{MY_TOKEN}}
  38.  
  39. {
  40. "contactKey": "sampleEmail@somedomain.com",
  41. "attributeSets": [{
  42. "name": "Email Addresses",
  43. "items": [{
  44. "values": [{
  45. "name": "Email Address",
  46. "value": "sampleEmail@somedomain.com"
  47. },
  48. {
  49. "name": "HTML Enabled",
  50. "value": true
  51. }]
  52. }]
  53. }]
  54. }
  55.  
  56. {
  57. "operationStatus": "FAIL",
  58. "rowsAffected": 0,
  59. "requestServiceMessageID": "36f006b9-c6e0-4d8f-8907-e8ef785f0a9f",
  60. hasErrors": true,
  61. "resultMessages": [{
  62. "formatStringParams": [
  63. "ValueDefinition",
  64. null,
  65. null,
  66. "HTML Enabled"
  67. ],
  68. "messageFormatString": "Unable to resolve schema element of type: {0} by reference. [Id: {1}, Key: {2}, Name: {3}]",
  69. "resultType": "Validation",
  70. "resultClass": "Error",
  71. "resultCode": "SchemaObjectNotFoundByReference",
  72. "message": "Unable to resolve schema element of type: ValueDefinition by reference. [Id: , Key: , Name: HTML Enabled]"
  73. }],
  74. "serviceMessageID": "b1c2fbe6-1a95-4802-b838-1ff817ea08eb"
  75. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement