I love the new updates. As Stripe is such a developer-driven service, the docs are such a critical part of the experience. Stripe doc updates seem to set the standard for API documentation across the web and it's great to see them investing in the docs and raising the bar once again.
I feel like APIs often accept form encoding solely because it allows you to show curl examples. However since nested objects don't always flatten nicely you end up with a special syntax or do not allow nesting at all.
In this case you can't update an invoice and it's line items at once - which seems a little odd to me. It would be the most convenient thing to do from the API consumers perspective - which is what APIs should aim for.
Yeah, that can be frustrating. We allow this in some places, but not others, because it can get tricky in edge cases such as when the order of objects is changed.
We do want to accept json-encoded input in addition to form-encoded input (json is nice!), though in this case the encoding isn't the limiting factor.
3 comments
[ 3.2 ms ] story [ 15.2 ms ] threadI feel like APIs often accept form encoding solely because it allows you to show curl examples. However since nested objects don't always flatten nicely you end up with a special syntax or do not allow nesting at all.
In this case you can't update an invoice and it's line items at once - which seems a little odd to me. It would be the most convenient thing to do from the API consumers perspective - which is what APIs should aim for.
Yeah, that can be frustrating. We allow this in some places, but not others, because it can get tricky in edge cases such as when the order of objects is changed.
We do want to accept json-encoded input in addition to form-encoded input (json is nice!), though in this case the encoding isn't the limiting factor.