Objective: Inserts tracking (correios or other carriers) into the order actively
JSON Composition for sending:
{
*"auth" : key obtained in get/auth method
,"id" : internal order code
,"order" : order number
,"tracking" : text containing the order SRO
,"state" : integer - adjusts order status
}
Returns with (SUCCESS):
{
"code": 200,
"message": "TRACKING INSERTED SUCCESSFULLY",
"id": 999999,
"stock": 99999
}
State:
0 - normal (follows the order flow)
1 - indicates order ready for collection
2 - indicates order ready for collection (no items needed)
HTTP Code:
200: BID returned successfully
213: Tracking write error – contact IT
402: No data received
404: Order not found
405: Mandatory data not provided
406: Mandatory to provide ID or ORDER for order location
407: Non-existent user
500: Invalid auth
501: Invalid credentials
502: Client blocked
503: Status change not allowed