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.

Help api, product information

Other Parts Discussed in Thread: AFE7799

Good morning, I'm integrating with the api, following the tutorial: api-portal.ti.com/product-api-getstarted

I was able to recover the token normally via the api, but I have some doubts/errors and would like help.

1 - 

When testing by postman with this product AFE7799, it returns Product not found, but with the product LM1971MX%2FNOPB it returns normally, I would like to know where I can see my products to test?

2 - When accessing api-portal.ti.com/product-information-api and running /products I am having the following error:

 

3 - I'm testing the LM1971MX%2FNOPB product through POSTMAN, which normally returns me.

But via code returns NOTHING, the code:

 

Do you need to configure something to operate the product search by code?

Awaiting return,

  • Leonardo, I will be glad to assist, let me digest this info and will get back to you a littler later today.

  • Leonardo, 

    let me see if i can answer your questions.

    I can see that you have been successful to pull some other product materials - if you need the data sheets the product API is what you need. If you are interested in material and inventory you could also try to use the Inventory and Pricing API - TI store Inventory and Pricing API | TI API Portal.

    1- products -you can view them with the product API via Postman. The reason this material AFE7799 is not found as it is not a true TI material - in the example it should be this material AFE7799IABJ, I will also see if we can get the portal document updated with this material.

    2- CORS error -. it looks like we have not yet enabled that feature for Product Info API on the portal ... Let me reach out to our development team to see when we can enable that feature"...  then the try out feature should work from the portal.

    3- Code example - we have this FAQ help document for code, see if this gets you what you need:  

    We do have sample code that you can look at and use. Before using the code, please make sure you have a valid company profile and have Client API Key and Secret (https://api-portal.ti.com/order-api-keys).  Python example code for latest API can be found here. https://git.ti.com/cgit/ti-store-api/api_examples/tree/

    There are two ways you can look at the code...

    Web View:

    Pull Code to your local machine:

    Prerequisite: Git Client is installed.  if you don't have the Git client then you can look at https://git-scm.com/downloads/guis and decide which one you would like to use. 

    • Open a command prompt and go to the folder to which you want to download the code. 
    • Run this command

                        % git clone https://git.ti.com/git/ti-store-api/api_examples.git

    • You can look at README.md for more info on how the code is structured. 
    • This will get the code to your local dir. Now you can use your favorite python IDE to start looking at the code. 

    Let me know if you have further questions.

    Tammy

  • Good morning friend, How are you? Thanks for the feedback, regarding the token, I can get it normally via code, here is the code I got from the token, Note: I get the normal token.

    everything is fine so far

    About the CORS error, the error still persists here, follow the print:

    I tested making the request by http://transact.ti.com/v2/store/products/catalog for the POSTMAN,and it returns status 200 and values ​​normally

    I made the same request via code (javascript) and also with angular

    javascript:

    angular:

    With javascript it gives me an error, and with angular it gives me a CORS error

    In my point of view this would be a configuration there with you (server)? Well, notice that the CORS error when I send the request via angular or javascript is the same error that appears on your own website when I make the request mentioned in this image

    I hope we manage to proceed, as integration with the system is very important to us, I look forward to your feedback, thank you again

  • I'll leave the topic open, so we can discuss it as I'm following here in the implementations

    Good afternoon how are you?

    I don't know if in the meantime that I'm testing too, you are correcting the cors part

    After numerous searches, finding out why the product search was in error

    following your tutorial

    https://api-portal.ti.com/product-api-getstarted

    look at the documentation link https transact.ti.com/v1/products/XXXXX'

    but only with the link : https transact.ti.com/v2/store/products/AFE7799IABJ that I managed to do and have a return of the product information

    I believe your documentation is out of date?

    now i'm doing this part

     And even adding the v2 in the link I can't get a return, how should I proceed knowing or not if the documentation is up to date?

    I am happy that we are able to proceed, but I need your help in this part of the documentation

  • Good afternoon, updating here, from what I apparently saw the most up-to-date documentation is https://api-portal.ti.com/store-api-getstarted

    I'm currently doing step 5 : Step 5: Create a test order

    but this way, it returns the error 400

    and adding json.strignify gives me the error 500:

     copied id

  • Yes we have not corrected the CORS error as yet but to be in work. Let me forward your information to a developer who can provide more informaton to you.

  • Hi Leonardo,

    Yes, we have not corrected the CORS error as yet but to be in work, I will notify you once it has been updated and you can then attempt the tryout feature on the v1 Product API which is valid. (We do have customers using the V1 APIs that use the v1 Product API that was in place before we created our v2 APIs.)

    APIs:

    v1 Product API -retrieves basic product details, parametric data, limited quality and reliability information with a single endpoint call. 

    Within the TI Store API Order suite - all of our APIs listed in the suite are v2- this would be the preferred APIs - as indicated your company account and setup are based around our v2 APIs. 

    Let's focus on the TI Store Inventory and Pricing API v2, (https://transact.ti.com/v2/store/products(tipartnumberthis will tell you about your product, giving you pricing and available inventory. This API is the one I believe would be most interested in to gather your information then enable you take the data to place an order. 

    Once you have determined your materials, inventory and pricing, you could then place orders with the TI store order API - (https://transact.ti.com/v2/store/orders/testNote:  it is important that you have header content type as 'application/json'

    v2 TI Store Products Catalog API (http://transact.ti.com/v2/store/products/catalog) - this one is our total material catalog huge download many thousands of products - this would not be one you want to call often due to time consuming, volume size and limits of 4 calls per day. 

    I hope this helps explain the APIs and what you are experiencing.

    Tammy

  • Thanks for the feedback, I just managed to create a test order, and check that order.

    Questions:

    1 - I had a doubt, I created the test order, does this order not appear on my panel?

    2 - or only official requests will appear in this print panel?

    3 - another doubt, the return when I create the order, already comes with the payment information, let's assume that this would be my official order, if I make the payment for this json information returned, would the order automatically change the status to paid?

    4 - Is it possible when creating the order I choose the type of payment I want?

    5 - Another question, can I call the catalog every 4 hours, or just 4 a day? Because I did a test, I called it once and it worked, and I called it again right after and it gave the 429 limit/timeout error

    I am happy that we are now able to proceed with product consultation and order creation.
    Thank you for your help so far

  • Ok, for test orders they should not appear in your myTI company account, but yes real production orders should be there in the dashboard. 

    Payment - when you setup your checkout profile, you or the admin provides type of payment that you want - believe there are choices, bank transfer, Apruve, some cases line of credit, no credit card, etc. I do not believe you ever see the status paid on the order, you place the order then once it is picked, packed and shipped, you can retrieve your invoice and ASN by using the other APIs that we have in the Order API suite to retrieve that information. If you have an Apruve account for payment, invoicing payment is handled through Apruve.  

    You can look at this url for payment information: Shipping, payment and tax | Ordering resources | TI.com

    Call for product catalog - we  pdate once a day and we allow a call 1x - every 4 hours (this may change at any time)

    I am sorry I thought I had replied on Friday - I hope this finds you well.. it seems I did not submit my reply.

  • Good afternoon, how are you? Thanks for the replies, I have a few more questions.

    What is the difference between api push and retrieve? example:

    Financial document push API
    Financial document retrieve API

    Advanced ship notice (ASN) push
    Advanced ship notice (ASN) retrieve API

    and

    Is there any API where I can check if my token is valid / if it has already expired?, to request the token again

    I am unable to understand them.

  • The Retrieve Financial API allows you once your product is shipped to use that API to Retrieve your order's invoice for the shipment - the Retrieve ASN API allows you to pull the Advance Ship Notice of your order shipment by using that API to get information on your shipment intransit. 

     The same equivalent type of API exists for Financial and ASN as PUSH  API requires some configuration on our side but it then means we control the send of that document to you  versus allowing you the access to retrieve  it. Normally customers prefer to retrieve themselves and that is the default at the onboarding process but if a customer prefer to have this information sent to them, it can be configured to do so. 

    Let me check on the Is token Valid API question.  No, there is not a token API for checking validity - but when you generate your token it tells you token expires in xxxx - it seems to be about an hour that the token will remain valid. 

  • Sorry, but it's still not clear to me, the difference between retrieve and push, for example

    Advanced ship notice (ASN) push

    Advanced ship notice (ASN) retrieve API

    ´Push or Retrieve brings me the same result,


    In this case I'm using Advanced ship notice (ASN) retrieve API because it seems to be easier, because I only need to pass the order number.

    But I couldn't understand the push

    //////////////

    another question

    I saw that the invoice number on the test is always
    5999999999. But I want to know when I'm going to use the real one, without being a test one, where am I going to get that number? through which api and the field?

  • I will need to gather some  information to share to you on your questions. I may be a little delayed but I will gather the information and share to you by Tuesday next week, we are out on holiday Monday and not sure I can gather all the needed info today.  I will run some test and checks so i can provide you the api and the field and sample to help you understand.

  • Alright, thanks a lot for your help so far, I appreciate it.
    I'm waiting

  • Leandro

    Once you place an order with TI give it some time guesstimate 3-4 hrs then use your order # and use the GET /v2/store/orders/Txxxxx order number here.  It will contain the invoice number and waybill number- and order information associated to your shipment, but only after an order has shipped.  

    Now that you have an Invoice number and an Order number -you can use the Retrieve ASN API with the order number and the Retrieve Financial API with order number and Invoice number and receive related ASN shipment and Invoice information on your order. 

    Push ASN or Push Financial API - TI will initiate the data to be pushed to your system.

    Retrieve ASN API or Retrieve Financial API -you initiate the request to pull data from our system. 

    In this Retrieve ASN API you insert your Order number and it will pull back the ASN (Waybill shipment information once it has shipped) i.e. (/v2/store/orders/T10999999=your order number here)/advanced-shipment-notices
    Regardless, if you choose PUSH or Retrieve API processing - you need a way to handle the request data back to you.  Note: Push API, you will get a json payload - so you would need a web server that can receive json payload and use that data to your internal system
  • et me see if I understood.

    this would be the field where I retrieve the invoice number right? I noticed that it is inside the LineItems array, so in this case, each item will have an invoice number?

    And in the case of test orders, I can't see the invoice number right? Do I have to use the test invoice number right?

    ///////////////////////////////////////////////////////////

    The "Push " , do I need to configure something so that your system automatically sends the information to my system? without me having to make the request?

    And in the case of retrieve, I myself make this request whenever I want ?

    Would it be this? Sorry this really left me with doubts

    In this case, we have our web server here, and we are configuring it, so I am clearing all possible doubts, so that the configuration is aligned with your system

    //////////////////////////////////////////////

    Another question, can you tell me all the possible statuses of the orders? for me to configure on my system

  • Hi Leonardo,

    Wanted to share we got the CORs error corrected for the API product on the portal, so if you want to try this again, please do so.  Sorry I was out on another project this past week...   let me see if I can answer these questions.

    Test Retrieve financial document - it is strictly a simulation, so if you are on the API portal and you enter in that sample order number and invoice number found in the financial info on the API Portal and do the retrieve. *order number is T1099999 and financial doc is 5999999999  yes you would get a hit but it is a simulation only.  

    The question about the financial invoice #  being different - normally there should only be 1 financial invoice number with multi items- do not believe - i have ever experienced multi invoice numbers for the same order. You will have an order per invoice.

    For the order reasons, we have an FAQ for all the different Order status codes -[FAQ] TI-API: API Order status codes and meanings - Enterprise Automation Integration Forum - Enterprise Automation Integration - TI E2E support forums

    For Invoice or ASN Push API - you would go to your myTI dashboard and under APi Keys and Access  - you would choose which push API or both if desired that you want to use - the screen looks like this  provide the required information and this is the setup piece to allow TI to push data for ASN or Invoice to your web server. 

    If I missed anything let me know.

  • now I get it

    Advanced ship notice (ASN) push and Financial document push API.

    I must configure for your system to send me automatically, ok understood.

    ///////////////////////////////////////////////////////////////////////////

    Question 1

    I need to tell you one more thing

    I'm testing it here on the system we're creating. When I create order the request in your API 

    https://transact.ti.com/v2/store/orders/test

    product (AFE7799IABJ 10 unit). 

    the variable orderInfo > lineItems > trackingAndShipping it's coming as a list. However, in your documentation it is declared as an object 

    and if I go to the order search api and take an order that I have already created, the return from trackingAndShipping is like object

    I believe the error is in your request creation return, as this order should come as an object, as shown in your documents

    I need to know if this is a mistake on your part? Because I need to leave the trackingAndShipping configured as the same object as shown in your documentation

    ///////////////////////////////////////////////////////////////////////////

    Question 2

    I'm creating a test order with the product 1A1G04QDBVRG4Q1 with 92424 units and it is created normally, but when I put 100 or 1000 units, it gives me the return error 422

    ///////////////////////////////////////////////////////////////////////////

    Question 3

    I need to configure all the variables/lists/objects that show here?

      

    Because in the direct return of my javascript, it does not return all these variables, only some. I need to know which one should I take into account, set all variables as per the print? Or just consider what influenced me about javascript

    ///////////////////////////////////////////////////////////////////////////

    Question 4

    look another difference:

    in your documentation

    look at the direct return from the api with javascript

    in the address fields 1 and 2, in your documentation it has another name (addressLine) . Already in the return of the api will javascript is with the correct name (address1).

    ///////////////////////////////////////////////////////////////////////////

  • i have been away a few days, let me read through the above and get back to you this week for your questions.

  • Yes our documentation has information and descriptions  depending on the languqage you choose you would set how you want it.  In our documentation we do have Object with many lists and the lists -grouping of arrays. In our spec usually between [ ] will be the list of arrays and usually between the { } is our objects.  Our documentation does not cover all coding languages so you will determine how you want it passed to you in that language.  

  • Okay, that part I understand, but what I mean,
    is that in your documentation it is marked as "shippingAddress -> addressLine1" but the return from the api is coming like this "address1" and this was not configured on my part
    and
    and the orderInfo > lineItems > trackingAndShipping variable in your documentation is as an object, and the return from the api is coming as an array, without me having configured it on my part

    We are already finalizing our communication system with its API. Can you tell me if you have an API to delete test orders? Because we are generating several to test, and then I would like to clean these "test" order

    about question 2, can you help me?

    I'm creating a test order with the product 1A1G04QDBVRG4Q1 with 92424 units and it is created normally, but when I put 100 or 1000 units, it gives me the return error 422

  • We do not have a delete test order API, since we have test environment and prod environment, the test orders will not be completed or shipped in our test system- we provide you the capability for you to try to connect and get resopnses and test your code, etc.  However, I will bring up with a developer if there is a way to clear test orders for our customers that are testing.

    Let me place the order as you are in question 2 and see what may be occurring for that item in the test system.

    WhenIi run this product with a qty or 20 - I receive the 422 error as you indicate and t his error msg in my json payload - what this tells me - is you must be a certain payment type that has a min $$ value tied to the payment option. So as you are below the MIN spend it throws this back to state  the reason and message below...

    If you place your order to exceed $1000 value - then you would be a successful return. So if you boost your qty to 5k or more - you should hit a successful return and order process. 

    5000 x.267 = $1,335.

     "unitPrice": 0.267,
    "netPrice": 5.34,

    "errorCode": "ERR-TICOM-ORDER-API-0009",
    "type": "Validation",
    "section": "Generic",
    "field": null,
    "reason": "Order value too low for selected payment method, resubmit order with a total value > 1000 USD",
    "message": "Resubmit the request with different payment options. For additional information refer to ">api-portal.ti.com/order-api-payment",
    "data": null
    }

  • Thanks for the feedback, it would be important to have an API to delete test orders

    Because I generated some (50) requests for orders

    And these test orders appear in the return of the api

    transact.ti.com/.../orders

    /
    ///////////////////////////////////////



    in the last tests I found a divergent error to your documentation

    https://transact.ti.com/v1/products-extended/AFE7799IABJ


    the return of the parametric is this:

     "Parametric": {
        "RF frequency": {
          "Type": "RF frequency",
          "Description": "RF frequency",
          "Unit": "MHz",
          "UnitDescription": "MHz",
          "Range": {
            "Min": "600",
            "Max": "6000"
          }
        },
        "Operating temperature range": {
          "Type": "Operating temperature range",
          "Value": "-40 to 85",
          "Unit": "C"
        },
        "Applications": {
          "Type": "Applications",
          "Value": "Wireless infrastructure",
          "Description": "Applications. Do not use without approval"
        },
        "Rating": {
          "Type": "Rating",
          "Value": "Catalog",
          "Description": "Rating"
        },
        "Number of DUCs per TX": {
          "Type": "Number of DUCs per TX",
          "Value": "1",
          "Description": "Number of digital up-converters per transmitter"
        },
        "Number of DDCs per RX": {
          "Type": "Number of DDCs per RX",
          "Value": "1",
          "Description": "Number of digital down-converters per receiver"
        },
        "Number of TXs and RXs": {
          "Type": "Number of TXs and RXs",
          "Value": "4 TX, 4 RX, 2 F",
          "Description": "Number of transmitters and receivers"
        },
        "Datarate (MSPS)": {
          "Type": "Datarate (MSPS)",
          "Value": "737",
          "Description": "Data rate for RF sampling transceivers"
        },
        "Package Group": {
          "Type": "Package Group",
          "Value": "FCBGA|400"
        }
      }

    Look at your documentation:



    How do I configure my object in front of this? because it is not an array, but several objects with different names

  • I talked with our developers for more insight. -this  may help you out - It depends on how you intend to use the data and what language you are using to parse the JSON response. If you care about specific parameters, then those parameter fields can be explicitly defined in your response class as attributes. For example, if you are specifically interested in "Operating temperature range", you can define a class attribute and reference it directly. 

    If you want a generic solution for ingesting the parametrics, most languages provide a JSON node system that can be used to explore the JSON object as a series of generic dictionaries and arrays rather than mapping the data to an instance of a class. Alternately, it is also possible to define the response as a dictionary of string keys mapping to an instance of a Parametric class that has attributes defined for Description, Range, Type, etc.

**Attention** This is a public forum