profile
viewpoint
Paul Kirby prkirby Underground Web Lab Chicago, IL http://undergroundweblab.com Co-Founder and Owner at Underground Web Lab. Musician | Explorer | Pizza Expert | Dog Lover

lbryio/lbrypress 5

LBRY WordPress plugin

craftx/craftx.io 3

Unofficial Craft CMS Community

prkirby/craft-foundation-scaffold 3

A scaffold for working with Foundation for Sites and the Craft CMS. Built for ease of use and quick setup.

prkirby/holobiont 1

Kinetic Heatmap art installation

cnplummer/WolfMoose-WebArt 0

Tools to publish sound art on the web originally developed at Michigan Tech to create an interactive soundscape experience of the first 53 years of the Wolf Moose Study on Isle Royal.

prkirby/craft3foundationscaffold 0

Craft 3 mixed with Zurb Foundation Wholesome Goodness

prkirby/easy-foundation-shortcodes 0

WordPress.org Plugin Mirror

issue openedDripEmail/drip-nodejs

Documentation incorrect for createUpdateSubscriber

Hello,

Just had to spend about an hour debugging this, which was frustrating so hopefully this can be resolved or someone else having the same issue can find this in the future.

The documentation at https://developer.drip.com/?javascript#create-or-update-a-subscriber states the payload for createUpdateUser should look like this:

const payload = {
  subscribers: [{
    email: "john@acme.com",
    time_zone: "America/Los_Angeles",
    custom_fields: {
      shirt_size: "Medium"
    }
  }]
};

However, I was continuously getting this, very unhelpful error: {"errors":[{"code":"parsing_error","message":"JSON parsing error: The property '#/' of type object did not match one or more of the required schemas"}]}

After triple checking all of my custom field identifiers and racking my brain, I logged the actual entire error response and noticed the body of the request was this: body: '{"subscribers":[{"subscribers":[{"email":"test90@quiz.com"}]}]}',

So while the documentation is telling you to have your subscriber wrapped in an array under subscribers, you are actually just supposed to send only the subscriber object, like this:

const payload = {
    email: "john@acme.com",
    time_zone: "America/Los_Angeles",
    custom_fields: {
      shirt_size: "Medium"
    }
};

Hopefully you guys can make that small change in the documentation, and maybe this issue will help others before that happens. Thanks!

created time in 2 months

more