跳至主要内容

Order creation warnings

What's new

The create_order response now includes an optional warnings array. It lists request fields whose invalid values were ignored when the order was created, for example an unsupported locale or country.

Impact

An order can be created even when some optional request values are invalid. Those values are dropped instead of being applied, and warnings tells you which ones. Each warning has:

  • type: the validation error type
  • loc: the location of the request value, as a list of field names and indexes
  • msg: why the value is invalid
  • input: the value that was ignored (optional)

Changes

ResourceChange
create_orderAdded optional warnings array of RequestWarning objects to the 201 response
ComponentsAdded the RequestWarning and JsonValue schemas

Upgrade

  • No changes are required.
  • To catch integration mistakes, log or alert on a non-empty warnings array after creating an order.

需要技术支持?
联系我们的集成技术团队: [email protected]