Guest User

Hubspot API

a guest
Mar 16th, 2023
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.44 KB | None | 0 0
  1. I make a request to POST https://api.hubspot.com/automation/v4/actions/{appID} with the following body
  2. {
  3. "actionUrl": "https://test.com",
  4. "published": true,
  5. "outputFields": [
  6. {
  7. "typeDefinition": {
  8. "name": "testValue",
  9. "type": "number"
  10. }
  11. }
  12. ],
  13. "labels": {
  14. "en": {
  15. "actionName": "Test action name",
  16. "actionDescription": "Test action description",
  17. "outputFieldLabels": {
  18. "testValue": "Test Value Label"
  19. }
  20. }
  21. }
  22. }
  23.  
  24. The respone is a 201 with this in body:
  25. {
  26. "actionUrl": "https://test.com",
  27. "published": true,
  28. "inputFields": [],
  29. "objectRequestOptions": null,
  30. "labels": {
  31. "en": {
  32. "outputFieldLabels": {
  33. "testValue": "Test Value Label"
  34. },
  35. "actionName": "Test action name",
  36. "actionDescription": "Test action description"
  37. }
  38. },
  39. "objectTypes": [],
  40. "outputFields": [
  41. {
  42. "typeDefinition": {
  43. "name": "testValue",
  44. "type": "number",
  45. "fieldType": null,
  46. "options": [],
  47. "optionsUrl": null,
  48. "referencedObjectType": null,
  49. "externalOptions": false,
  50. "externalOptionsReferenceType": null
  51. }
  52. }
  53. ],
  54. "id": "31903326",
  55. "revisionId": "1",
  56. "functions": []
  57. }
  58.  
  59. This includes 'labels.en.outputFieldLabels'.
  60.  
  61. Then making a request to GET https://api.hubspot.com/automation/v4/actions/{appID}/31903326 returns
  62. {
  63. "actionUrl": "https://test.com",
  64. "published": true,
  65. "inputFields": [],
  66. "objectRequestOptions": null,
  67. "labels": {
  68. "en": {
  69. "actionName": "Test action name",
  70. "actionDescription": "Test action description"
  71. }
  72. },
  73. "objectTypes": [],
  74. "outputFields": [
  75. {
  76. "typeDefinition": {
  77. "name": "testValue",
  78. "type": "number",
  79. "fieldType": null,
  80. "options": [],
  81. "optionsUrl": null,
  82. "referencedObjectType": null,
  83. "externalOptions": false,
  84. "externalOptionsReferenceType": null
  85. }
  86. }
  87. ],
  88. "id": "31903326",
  89. "revisionId": "1",
  90. "functions": []
  91. }
  92.  
  93. Here 'labels.en.outputFieldLabels' is missing but everything else is present
Advertisement
Add Comment
Please, Sign In to add comment