Skip to main content
Solved

Klaviyo 'subscriptions' is not a valid field for the resource 'profile-subscription-bulk-create-job'.

  • August 4, 2023
  • 5 replies
  • 952 views

Forum|alt.badge.img+3

I am testing the subscribe endpoint ‘profile-subscription-bulk-create-jobs’ with this body which was taken from the example request in the docs:

{
"data": {
"type": "profile-subscription-bulk-create-job",
"attributes": {
"list_id": "Y6nRLr",
"custom_source": "Marketing Event",
"subscriptions": [
{
"channels": {
"email": [
"MARKETING"
],
"sms": [
"MARKETING"
]
},
"email": "emily@example.com",
"phone_number": "+15005550006",
"profile_id": "01GDDKASAP8TKDDA2GRZDSVP4H"
}
]
}
}
}

But no matter what email, I am getting this error:

{
"errors": [
{
"id": "82a35350-16a7-4e32-ad2c-57784150742b",
"status": 400,
"code": "invalid",
"title": "Invalid input.",
"detail": "'subscriptions' is not a valid field for the resource 'profile-subscription-bulk-create-job'.",
"source": {
"pointer": "/data/attributes/subscriptions"
},
"meta": {}
}
]
}

I believe the above post request body is a recent change, because previously, I was using the body below, but it doesn’t pass sms consent:

{
"data": {
"type": "profile-subscription-bulk-create-job",
"attributes": {
"profiles": {
"data": [
{
"type": "profile",
"attributes": {
"email": "john@example.com"
}
}
]
}
},
"relationships": {
"list": {
"data": {
"type": "list",
"id": "some list"
}
}
}
}
}

If anyone can provide clarity on how to solve the issue that would be appreciated thanks!

Best answer by gleamdev

Solved just needed to change the API verson

5 replies

Forum|alt.badge.img+3
  • Author
  • Problem Solver I
  • 6 replies
  • August 7, 2023

Klaviyo Support would you mind looking into this?


Forum|alt.badge.img+3
  • Author
  • Problem Solver I
  • 6 replies
  • Answer
  • August 7, 2023

Solved just needed to change the API verson


Brian Turcotte
Forum|alt.badge.img+37
  • Klaviyo Alum
  • 1393 replies
  • August 7, 2023

Hi @gleamdev!

Glad this was resolved and thanks for sharing your solution with the Community!

 

- Brian


Forum|alt.badge.img+3
  • Contributor IV
  • 8 replies
  • August 7, 2023

@gleamdev where did you change that? my url is only /api without versions and i have that problem

edit: resolved, i changed the revision.


Forum|alt.badge.img+2
  • Contributor I
  • 1 reply
  • November 19, 2023

Hi @gleamdev @bproulx @Brian Turcotte 

 

What should be the correct api revision for this? I tried almost all revisions available with year 2023. But still getting same error.

 

Thanks,

Gopi