This article provides troubleshooting steps for common issues encountered while using Wix APIs.
I expect a specific field to be returned by a method, but sometimes the field isn't returned.
Wix methods are designed to support the full list of parameters you see in the documentation. However, not all parameters will always have a value. For example, if a site customer doesn't fill in their province during checkout, then when you use a method to get an order, the billingInfo > address > subdivision field won't be returned.
If your code is dependent on a specific field, it should be able to handle cases where the field isn't returned.
I often come across parameters that must have limitations, but they aren't documented.
Wix's documentation displays limitations automatically, based on the method source code. However, there are various reasons why these might not show in the documentation, especially for older APIs. If you come across missing limitations, please let us know.
I get a 403 error and don't know what to do about it.
There are 2 primary reasons for a 403 error:
I get a 409 error - "entity has already changed since the requested revision".
The entity you want to update is protected by a revision number, to prevent accidental overrides.
To prevent this error:
Note that you shouldn't rely on revision numbers received from events, as events can be delayed and may not reflect the most current state.
I get a 429 error and my API calls are failing
A 429 error likely means that you've been throttled due to sending too many requests in a short period. To resolve this, wait a minute and then retry your requests.