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.

API technical issue in processing your request

https://support.ti.com/csm sent me to this forum.  Odd when the "TM4C129ENCPDTT3"  part number is entered in the form  to create this entry it reports   'unknown part number'   But the API appears to beware of the part number.

On November 4, 2022 10 pieces of part number "TM4C129ENCPDTT3" a powershell script placed an order using the URL "

https://transact.ti.com/v2/store/orders"  (a secure token was acquired and provided with the following json: 

{ "order": 
          {
            "checkoutProfileId": "****",
            "customerPurchaseOrderNumber": "Sukhy",
            "endCustomerCompanyName": "Telecor Inc.",
            "expediteShipping": false,
            "customerOrderComments": [
              {
                "message": "automated order from Telecor Inc Canada"
              }
            ],
            "lineItems": [
                {
                  "customerLineItemNumber": 1,
                  "tiPartNumber": "TM4C129ENCPDTT3",
                  "customerPartNumber": "",
                  "customReelIndicator": false,
                  "quantity": 1,
                  "customerItemComments": [
                  {
                    "message": "auto ordered"
                  }
                  ]
                }
            ]
          }
  } 

 However the following response was received:  

{
  "errors" : [
    {
      "errorCode" : "ERR-TICOM-ORDER-API-GEN-0500",
      "section" : "Generic",
      "type" : "Validation",
      "reason" : "We encountered a technical issue in processing your request.",
      "message" : "The API is temporarily unavailable. Please retry, if the issue persists, Please contact TI customer support - https://support.ti.com/csm"
    }
  ]

This lasted for 3 days until Nov 7, 2022 when the pieces were no longer available. I have tried stepping through the powershell code and now with 0 available if the order is placed The following response is observed  

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      : {@{customerLineItemNumber=1; tiPartNumber=TM4C129ENCPDTT3; quantity=1; availableQuantity=0; limit=999999999}}  

Placing the same order on the test site has the same result for part number TM4C129ENCPDTT3  and a success if the part number is changed to NE555DR. 

The concern I have is that there is something not right with the order request that is causing the "ERR-TICOM-ORDER-API-GEN-0500" to be generated. But it looks like the server is throwing an exception on the request. This issue persisted for 3 days until Nov 7, 2022. Is there something not right with the request? 

Thank you, 

  • Hi Sukh,

    Every request I can see from your account on Nov 4 - Nov 7 is incomplete. This is the entire payload I see in the logs, which is missing the front half of what was sent on subsequent requests:

    {
    	"customerLineItemNumber": 1,
    	"tiPartNumber": "TM4C129ENCPDTT3",
    	"customerPartNumber": "",
    	"customReelIndicator": false,
    	"quantity": 10,
    	"customerItemComments": [
    		{
    			"message": "auto ordered"
    		}
    	]
    }
    ]          }  }

    Beginning on Nov 9, we start seeing complete payloads that appear to be well-formed and look like what you pasted above.

    So, it looks like the issues with the payload itself have been resolved, and now the issue is truly with the available inventory.

    I hope that helps.

    Best regards,
    Paul

  • Thank you for your prompt response Paul,

    Interesting,  but the PowerShell script sends out two requests,  the first request is to check available inventory and that appears to be functioning correctly.  In the event that there is inventory available the PowerShell script will send out an order request, but this 2nd request is not sent out unless there is available inventory and as far as I can tell an order request never went out on Nov 9, 2022.

    When using the same PowerShell script test  site for part number NE555DR a success response was received from The Test Server. Why it would change  with a different part number is a mystery at the moment.  The script has been modified to Log the order request body at the point just before the call to "Invoke-RestMethod" in the PowerShell script to make sure the script itself isn't corrupting the request for any particular part number.

    At this point I see no other option but to wait until inventory becomes available and see what the script is actually sending out at that time

    Thank you,

  • Sukhy,

    I'll send you a friend request so I can send you the entire request and response from Nov 9. I see four valid test order requests from you for part TM4C129ENCPDTT3 since Nov 9 (one on the 9th, two on the 15th, and one today), and no invalid requests like we see on Nov 7 and earlier.

    So whatever caused the correction in the order request is not related to the part number. But it is unfortunate that the part you want is now out of stock.

    Best regards,
    Paul

  • This is actually Paul V using Sukhy's account.

    Haven't seen any inventory available for about 2 weeks now,  is it possible that inventory becomes available but then is sold out within 2 or 3 minutes?

    Right now the script checks for inventory every 5 minutes.  would it be beneficial if the interval was decreased to say every minute or shorter?

  • Hi Paul,

    It is certainly possible for a part to be sold out within minutes of becoming available, but it may also be that the part has been out of stock for the few weeks you checked.

    You may want to consider making use of the inventory subscription, which will send a notification to your API when a part has stocked up. This may allow you to trigger an order right after a stock up event occurs. You can find more information at https://api-portal.ti.com/store-inventory-subscription-push-api 

    Best regards,
    Paul

  • Thank you Paul,

    Handling notifications for us is more involved than writing a simple Powershell script and is something we want to avoid at this time.  So the thought was if the item does not sell out within minutes, then the current script is sufficient.  If the part can sellout within minutes one option is to decrease the interval between requests.

    What is the shortest interval recommended between requests?  I fear too frequent requests may cause other issues  e.g. security software falsely detecting a DOS attack.

  • Hi Paul,

    Five minutes between calls shouldn't cause you any trouble with the API call limit, and it's a common frequency. It's unlikely that a part will stock up and sell out within that period, but my previous reply was in response to the question of possibility - sorry for the confusion.

    Note that we expect to release an update to the API soon that would provide an estimated stock-up date for out of stock parts, so that may help you target your inventory queries in the future.

    Thanks,
    Paul

**Attention** This is a public forum