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.

SN74LS00: Quote API question

Part Number: SN74LS00

Hi team,

I input quote API to create Quote, but resonance was 500.

would you please check it?

import requests
import json

# API keyとsecretからtokenを取得する
API_Key = 'lSSXG1QYnWwrKyAlMEOVTOMhoTfgw0lR'
API_Secret = 'wTVDeeGpeiufF64t'

url = 'transact.ti.com/.../accesstoken'
header = {'Content-Type': 'application/x-www-form-urlencoded'}
params = {'grant_type': 'client_credentials', 'client_id': API_Key, 'client_secret': API_Secret}

r = requests.get(url, data=params)
JSData = r.json()
access_token = JSData['access_token']
print(access_token)

# orderNumber = '1021355171'

url = f'transact-pre.ti.com/.../quotes'
header = {'Authorization': f'Bearer {access_token}'}
data = {
  "quote": {
    "endCustomerCompanyName": "Company XYZ",
    "requestedUnitPriceCurrencyCode": "USD",
    "lineItems": [
      {
        "tiPartNumber": "SN74LS00N",
        "quantity": 2500,
        "requestedUnitPrice": 1.2
      }
    ]
  }
}

print("1")
# r = requests.post(url, headers=header, data=data)
r = requests.post(url,headers=header)
print("2")
print(r)
# JSData = r.json()
print("3")
print(json.dumps(JSData, indent=2))