Overview

To get started with the TI store API suite, follow these steps: 

  1. Prerequisites for access and development
  2. Review the typical ordering flow with the TI store API suite.
  3. Authenticate to receive an access token.
  4. Learn how to query inventory and pricing information.
  5. Create a test order.
  6. Access your order information.
  7. Learn how to retrieve shipment tracking.
  8. Learn how to retrieve an invoice.
  9. Get support.

 

Step 1: Prerequisites

 

Only approved customers can build applications using the TI store API suite. To obtain approval:

  1. Create a myTI account or log in to your existing myTI account.
  2. Create a myTI company account.
  3. Click Request on the API Keys and Access page.

 

Step 2: Ordering flow overview

 

  1. Authenticate with your assigned API key and secret.
  2. Send a query to the inventory and pricing API to retrieve product availability and other matching information. 
  3. The API will reply with a status code, 200 OK, and a JavaScript Object Notation (JSON) response containing the requested product data.
  4. Build your order with your desired payload and post to the order API.
  5. The API will reply with a status code, 200 OK, and a JSON containing order acknowledgement.
  6. Query the order API for the order status and additional order details.
  7. After order processing, retrieve shipment tracking through the advanced ship notice (ASN) retrieve API and invoices through the financial document retrieve API.
  8. Interested in seeing example code for each of these steps? Download our example code.

 

 

Step 3: Authenticate

 

TI has secured its API suites with OAuth 2.0. Use your API key and secret to authenticate. After authorization, OAuth2 returns an access token used with APIs in the suite you have enabled. For more details, see the Authentication page.  

curl --request POST \   
       --url https://transact.ti.com/v1/oauth/accesstoken \   
       --header 'Content-Type: application/x-www-form-urlencoded' \   
       --data grant_type=client_credentials \   
       --data client_id=<<INSERT YOUR CLIENT KEY>> \   
       --data client_secret=<<INSERT YOUR SECRET>>

 

Step 4: Query inventory and pricing

 

The example below, illustrating how to retrieve inventory availability and pricing information per product, is querying part number AFE7799IABJ. The available inventory is 5,435 ("quantity": 5435); however, in this example, the quantity is restricted to a limit of 50 ("limit": 50) units per order. If the product does not have an order limit, the JSON response will return a blank value in the limit field. For a list of all parameters related to products, see the documentation shown on the inventory and pricing API.

Request example: 

curl --request GET \   
--url 'https://transact.ti.com/v2/store/products/AFE7799IABJ?currency=USD' \
--header 'Authorization: Bearer {access_token}' \

Response for a successful request:

{
  "tiPartNumber": "AFE7799IABJ",
  "genericPartNumber": "AFE7799",
  "buyNowURL": "https://www.ti.com/product/AFE7799/part-details/AFE7799IABJ",
  "quantity": 5435,
  "limit": 50,
  "pricing": [
    {
      "currency": "USD",
      "priceBreaks": [
        {
          "priceBreakQuantity": 1,
          "price": 2.03
        },
        {
          "priceBreakQuantity": 10,
          "price": 1.43
        },
        {
          "priceBreakQuantity": 25,
          "price": 1.35
        },

...

  ],
  "description": "8-Bit 200MSPS Low-Power Analog-to-Digital Converter (ADC) With Internal Sample and Hold",
  "minimumOrderQuantity": 1,
  "standardPackQuantity": 126,
  "exportControlClassificationNumber": "EAR99",
  "htsCode": "8542390001",
  "pinCount": 5,
  "packageType": "SOT-23 (DBV)",
  "packageCarrier": "Large T&R",
  "customReel": true,
  "lifeCycle": "ACTIVE"
}

 

Step 5: Create a test order

 

Test orders are simulated; in other words, they are not submitted orders and their intent is only to assist in the development of your application. The inventory used for placing test orders does not diminish or reserve. The information returned simulates the information returned by production order data, but some fields are for demonstrative purposes only and do not represent processed information.

To place an order (test or production), you must have an API-eligible checkout profile saved within your company account. See the API Keys and Access page to learn more about the creation of company accounts and checkout profiles. To select a checkout profile to reference with your order, you will need to retrieve the checkout profile ID from your company account. You can find checkout profiles on your myTI dashboard under Order Preferences > Checkout Profiles. As shown below, on the Checkout Profiles page, look for the copy icon in the ID column next to the checkout profile that you wish to use.

 

Checkout profiles table with ID column highlighted

Copy the ID that you intend to use for your order.

  "Orders" : {
    "checkoutProfileID" : "INSERT YOUR CHECKOUTPROFILEID HERE",
    "customerPurchaseOrderNumber" : "PGR - 04202021",
    "purchaseOrderDate" : "2020-12-31T13:56:00Z",
    "endCustomerCompanyName" : "TI Electronics Inc",
    "expediteShipping" : true,

Using your generated checkoutProfileID, POST your order.

#!/bin/bash
curl --request POST \
--url 'https://transact.ti.com/v2/store/orders/test' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json' \
--data-binary @- <<DATA
{
  "Orders" : {
    "checkoutProfileId" : "COP_ID-1234",
    "customerPurchaseOrderNumber" : "PGR - 04202021",
    "purchaseOrderDate" : "2020-12-31T13:56:00Z",
    "endCustomerCompanyName" : "TI Electronics Inc",
    "expediteShipping" : true,
    "orderComments" : [ {
      "attribute" : "PO: 234723"
    }, {
      "attribute" : "my Test order"
    } ],
    "lineItems" : [ {
      "customerLineItemNumber" : 1,
      "tiPartNumber" : "ISO1042",
      "customerPartNumber" : "CUS-SN74LS00N",
      "customReelIndicator" : false,
      "quantity" : 10000,
      "customerItemAttributes" : [ {
        "attribute" : "For BOM2  - aquired "
      } ]
    }, {
      "customerLineItemNumber" : 2,
      "tiPartNumber" : "OPA33AIDR",
      "quantity" : 10000
    } ]
  }
}
DATA

Example response:

{
  "orderNumber": 0,
  "orderStatus": "string",
  "customerPurchaseOrderNumber": "string",
  "subTotal": 0,
  "totalPrice": 0,
  "lineItems": [
    {
      "tiPartNumber": "string",
      "tiPartDescription": "string",
      "quantity": "string",
      "status": "string",
      "unitPrice": 0,
      "customReelIndicator": true
    }
  ],
  "shippingAddress": [
    {
      "addressType": "string",
      "firstName": "string",
      "lastName": "string",
      "company": "string",
      "addressLine1": "string",
      "addressLine2": "string",
      "town": "string",
      "state": "string",
      "postalCode": "string",
      "country": "string",
      "email": "string",
      "phoneNumber": "string",
      "companyURL": "string"
    }
  ],
  "billingAddress": [
    {
      "addressType": "string",
      "firstName": "string",
      "lastName": "string",
      "company": "string",
      "addressLine1": "string",
      "addressLine2": "string",
      "town": "string",
      "state": "string",
      "postalCode": "string",
      "country": "string",
      "email": "string",
      "phoneNumber": "string",
      "companyURL": "string"
    }
  ],
  "orderMessages": [
    {
      "code": "string",
      "type": "string",
      "Message": "string"
    }
  ],
  "customerOrderAttributes": [
    {
      "attribute": "string"
    }
  ],
  "orderPlacedTime": "string",
  "paymentType": "string",
  "currencyISO": "string",
  "totalTax": 0,
  "checkoutProfileIdentifier": "string",
  "totalDeliveryCost": 0,
  "totalDiscount": 0,
  "couponCodes": "string"
}

When you are ready to place a production order, review all of the parameters that you would like to send in the request payload and use the URL ".../store/orders". To learn more about test and production ordering, see the Order API Documentation page.

 

Step 6: Query order details

 

To learn more about ordering and available order details, see the Order API Documentation page.

Example request:

curl --request GET \
--url 'https://transact.ti.com/v2/store/orders/{orderNumber}'
--header 'Authorization: Bearer {access_token}' \

Example response:

{
  "orderNumber": 0,
  "orderStatus": "string",
  "customerPurchaseOrderNumber": "string",
  "subTotal": 0,
  "totalPrice": 0,
  "lineItems": [
    {
      "tiPartNumber": "string",
      "tiPartDescription": "string",
      "quantity": "string",
      "status": "string",
      "unitPrice": 0,
      "customReelIndicator": true
    }
  ],
  "shippingAddress": [
    {
      "addressType": "string",
      "firstName": "string",
      "lastName": "string",
      "company": "string",
      "addressLine1": "string",
      "addressLine2": "string",
      "town": "string",
      "state": "string",
      "postalCode": "string",
      "country": "string",
      "email": "string",
      "phoneNumber": "string",
      "companyURL": "string"
    }
  ],
  "billingAddress": [
    {
      "addressType": "string",
      "firstName": "string",
      "lastName": "string",
      "company": "string",
      "addressLine1": "string",
      "addressLine2": "string",
      "town": "string",
      "state": "string",
      "postalCode": "string",
      "country": "string",
      "email": "string",
      "phoneNumber": "string",
      "companyURL": "string"
    }
  ],
  "orderMessages": [
    {
      "code": "string",
      "type": "string",
      "Message": "string"
    }
  ],
  "customerOrderAttributes": [
    {
      "attribute": "string"
    }
  ],
  "orderPlacedTime": "string",
  "paymentType": "string",
  "currencyISO": "string",
  "totalTax": 0,
  "checkoutProfileIdentifier": "string",
  "totalDeliveryCost": 0,
  "totalDiscount": 0,
  "couponCodes": "string"
}

Step 7: Shipment tracking

 

After packing your order, when it's ready to ship TI generates shipment tracking information accessible through the advanced ship notification (ASN) API. The response includes detailed information regarding your shipment, such as shipment tracking number, carrier information and commercial invoices. The API is available in push or retrieve implementations. 

Example request for retrieve:

curl --request GET \
--url 'https://transact.ti.com/v2/store/orders/{orderNumber}/advanced-shipment-notices/{wayBillNumber}'
--header 'Authorization: Bearer {access_token}' \

Step 8: Retrieving an invoice

 

The finance API provides invoice information for non-Apruve payments. To retrieve an invoice using the finance API, the order number is a required part of the retrieve's JSON payload. Invoices become available after TI processes orders.

For invoices using Apruve as the payment method, navigate to your Apruve portal to obtain your invoice directly.

To retrieve a PDF, see documentation for configuration options.

Example request:

curl --request GET \
--url 'https://transact.ti.com/v2/store/orders/{orderNumber}/financial-documents/{financialDocumentNumber}'
--header 'Authorization: Bearer {access_token}' \

Example response:

{
    "OrderNumber": "T02281839",
    "SupplierFinancialDocumentIdentifier": "1234567890",
    "TotalNumberOfDocuments": "1",
    "Documents": [
        {
            "SupplierDocumentType": "INVOICE",
            "SupplierFinancialDocumentIdentifier": "1234567890",
            "SupplierDocumentCreatedDate": "2020-05-11",
            "SupplierDocumentStatus": "CLEARED",
            "SupplierDocumentCurrency": "USD",
            "CustomerPurchaseOrderIdentifier": "PO1234",
            "CustomerReferenceIdentifier": "0100000200",
            "SupplierGrossWeight": "100.000",
            "SupplierNetWeight": "100.000",
            "SupplierWeightUnit": "GRM",
            "SupplierCarrier": "FEDEX EXPRESS",
            "DocumentValue": {
                "SupplierTotalAmount": "15,000.00"
            },
            "SalesOrder": {
                "SupplierOrderIdentifier": "1000001234",
                "SupplierOrderLineItemNumber": "000000",
                "CustomerPurchaseOrderIdentifier": "PO1234",
                "CustomerPurchaseOrderDate": "2020-01-01"
            },
            "PaymentTerms": {
                "SupplierIncoterms1": "TERMS1",
                "SupplierIncoterms2": "TERMS2",
                "SupplierTermsOfDelivery": "SHIPPING TERMS",
                "SupplierTermsOfPayment": "Net XX Days from Invoice Date",
                "PaymentTermsText": [
                    {
                        "SupplierPaymentTermsText": "Up to XX.XX.2020 without deduction"
                    }
                ]
            },
            "CreditManager": {
                "SupplierCreditManagerName": "Bill Johnson",
                "SupplierCreditManagerTelephone": "1234567890",
                "SupplierCreditManagerEmail": "bj-noreply@ti.com"
            },
            "Delivery": {
                "SupplierDeliveryIdentifier": "0200000300",
                "SupplierDeliveryLineItemNumber": "000000",
                "SupplierDeliveryDate": "2020-04-13",
                "SupplierGoodsMovementDate": "2020-05-11"
            },
            "Waybill": {
                "SupplierWaybillNumber": "123456",
                "SupplierNumberOfBoxes": "1"
            },
            "Partners": [
                {
                    "PartnerTypeDescription": "Sender",
                    "Name1": "Texas Instruments Incorporated",
                    "Name2": "Semiconductor",
                    "StreetAddress": "12500 TI Boulevard",
                    "City": "Dallas",
                    "Region": "TX",
                    "PostalCode": "75243",
                    "Country": "US"
                },
...

 

Step 9: Where to find technical support

For technical support, see the TI E2E™ design support forums or post your question.