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.

  • In case it helps: The order for the first (and in my eyes wrong) error message looked like this:

    {
    "order": {
    "checkoutProfileId":"available-via-PN-if-necessary",
    "customerPurchaseOrderNumber":"18010296",
    "lineItems":[
    {
    "customerLineItemNumber":"1",
    "tiPartNumber":"TPS51200DRCT",
    "quantity":1,
    "customerPartNumber":"6.000001"
    }
    ]
    }
    }
  • Stefan:

    Thanks for reaching out to API Support. 

    Let me look into why we are seeing different Error code for similar usecase. I will update by cob tomorrow what I found.   

    ~Samip

  • Stefan:

    Sorry it took some time to get back to you with some update. Development team has found the issue and we will be fixing the error code so that it is constant. I am waiting to hear back from the team on the time line when the fix will be pushed out. Please give me until tomorrow to provide you the timeline.  

    ~Samip

  • Stefan:

    Fix has been pushed out so in both scenario we should see "ERR-TICOM-ORDER-API-0004" error code. 

    ~Samip

**Attention** This is a public forum