Part Number: TI-API
Hi TI support,
I am in Backlog Sandbox environment testing order change function.
However, there seems to be some steps (confirm the order?) that needs to be completed in your end so that I can send request to change existing order.
*ORDER NUMBER: TEST20231205155531
Here is my Python code for order_change:
from TI_Backlog_API_V2 import TI_Backlog_Orders
class Backlog_Example_Script:
def __init__(self, client_id, client_secret, server, ship_to):
self.server = server
self.client_id = client_id
self.client_secret = client_secret
self.ship_to = ship_to
self.ordersAPI = TI_Backlog_Orders(client_id=client_id, client_secret=client_secret, server=server)
def change_order(self, customer_name, customer_order_number, line_items):
response = self.ordersAPI.change_order(
customer_name=customer_name,
customer_order_number=customer_order_number,
ship_to=self.ship_to,
line_items=line_items
)
if response.status_code == 200:
print("Order changed successfully.")
return response.json()
else:
print(f"Failed to change order: {response.status_code}, {response.text}")
return None
# Usage example
if __name__ == "__main__":
client_id = 'masked' # Replace with your actual client ID
client_secret = 'masked' # Replace with your actual client secret
server = 'https://transact-pre.ti.com' # Replace with the actual server URL
shipTo='masked',
soldTo='masked',
debug=True,
customer_name = 'Test Customer' # Replace with the actual customer name
customer_order_number = 'masked' # Replace with the actual customer order number
# Example line item changes
line_items = [
{
"customerLineItemNumber": 1,
"lineItemChangeIndicator": "U",
"tiPartNumber": "SN74S00N",
"customerAnticipatedUnitPrice": 0.8,
"customerCurrencyCode": "USD",
"schedules": [
{
"requestedQuantity": 12000,
"requestedDeliveryDate": "2026-06-15"
}
]
}
]
backlog_script = Backlog_Example_Script(client_id, client_secret, server, shipTo)
result = backlog_script.change_order(customer_name, customer_order_number, line_items)
if result:
print("Updated Order Information:", result)
else:
print("Order update could not be processed.")
Here is the error message for order_change:
WARNING: Unexpected HTTP status code 500.
Failed to change order: 500, {
"orders" : [
{
"messages" : [
{
"code" : "TI-SOU-50000",
"type" : "ERROR",
"message" : "System error occurred. Execution ID: execution-914c2838-2af5-47bb-ad61-b4a5ae195185-2023.12.06 . Contact TI API Support https://api-portal.ti.com/support with the execution ID."
}
]
}
]
}
Order update could not be processed.
Thanks,
David




