bigcommerce / docs

The open source docs home for BigCommerce, including API specifications in OAS YAML and narrative docs in MDX
https://developer.bigcommerce.com
12 stars 30 forks source link

SELFDEV-626 Change PUT site's routes body to array #351

Closed markcmurphy closed 3 months ago

markcmurphy commented 3 months ago

SELFDEV-626

What changed?

This PR changes the request body of PUT site's routes to an array of objects, as pointed out by the SELFDEV-626 submitter.

Furthermore, the code sample for "Update a Site's Routes" is incorrect. Since it's a bulk update for all possible Routes, it should be wrapped in an array:

[{
"id": 0,
"type": "product",
"matching": "5",
"route": "/my-amazing-product"
}]

Attempting to run the code sample presently documented will result in this error:

"status": 422,
"title": "The request payload has to be a JSON array for the endpoint"
bc-tgomez commented 3 months ago

Thanks for the fix.