This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TI-API: APIv2 Error Codes

Part Number: TI-API

I tried to produce (and resolve) different error conditions during the last days, but got confusing results: When placing an order with a single TPS51200DRCT (which is unavailable) the error section of the response (reproducibly) looked like:

[errorCode] => ERR-TICOM-ORDER-API-0001
[type] => lineItems
[section] => Orders
[field] =>
[reason] => Part number(s) requested inventory quantity is not available per your request
[message] => Please check the inventory levels for available quantity and resubmit the request with different qty. Note In instances of low inventory ordering limits may be set
[data] => Array(
[0] => Array(
    [customerLineItemNumber] => 1
    [tiPartNumber] => TPS51200DRCT
    [quantity] => 1
    [availableQuantity] => 0
    [limit] => 999999999
    [waitPeriod] =>
  )
)

Another order containing 4 items - and one of those the same TPS51200DRCT was answered with this error section:


[errorCode] => ERR-TICOM-ORDER-API-0004
[type] => Application
[section] => lineItems
[field] =>
[reason] => Part number(s) requested inventory quantity is not available per your request.
[message] => Please check the inventory levels for available quantity and resubmit the request with different quantity. Note In instances of low inventory ordering limits may be set.
[data] => Array(
  [0] => Array(
   [customerLineItemNumber] => 2
    [tiPartNumber] => TPS51200DRCT
   [quantity] => 3
   [availableQuantity] => 0
   [limit] => 999999999
   [waitPeriod] =>
  )
)

Yet another order containing 7 items - two of them out of stock - was answered this way:


[errorCode] => ERR-TICOM-ORDER-API-0004
[type] => Application
[section] => lineItems
[field] =>
[reason] => Part number(s) requested inventory quantity is not available per your request.
[message] => Please check the inventory levels for available quantity and resubmit the request with different quantity. Note In instances of low inventory ordering limits may be set.
[data] => Array(
[0] => Array(
[customerLineItemNumber] => 7
[tiPartNumber] => TPS3620-33DGKT
[quantity] => 2
[availableQuantity] => 0
[limit] => 999999999
[waitPeriod] =>
)
[1] => Array(
[customerLineItemNumber] => 1
[tiPartNumber] => TPS51200DRCT
[quantity] => 5
[availableQuantity] => 0
[limit] => 999999999
[waitPeriod] =>
)
)

I want to automate responses for such cases (inform the user and reschedule the item), but I am unsure how to reliably recognize them.

a) Why are different error codes ERR-TICOM-ORDER-API-0001 and ERR-TICOM-ORDER-API-0004 used even though the reasoning is exactly the same?

b) why are the meanings of type and section swapped and what does Order vs. Application mean?

At a first glance I'd say that the first response is wrong, but I am not absolutely sure.

Some additional remark for the documentation in https://api-portal.ti.com/store-order-api#/TI%20store%20test%20order/post_store_orders_test (section "orderCreateErrors"): limit and waitPeriod are not yet covered there.

**Attention** This is a public forum