Edit Sales Tracking Code

This endpoint allows you to edit an existing Sales Tracking Code, even if it has been previously retired.

Request Parameters

codeStringThe code from the category pick-list. [Max Length: 255 characters]
nameStringThe name associated with the code [Max Length: 255 characters]
descriptionStringA description of the pick-list value [Max Length: 1000 characters]
emailStringAn email associated with the sales tracking code. [Max Length: 255 characters]
idIntegerThe Fusebill generated ID that uniquely identifies this Sales Tracking Code
curl –X PUT https://secure.fusebill.com/v1/SalesTrackingCodes \ 
  -H "Content-Type: application/json" \ 
  -H "Authorization: Basic {APIKey}" \ 
  -d "{type: 'Sales Tracking Code 1', code: 'CodeA', name: 'Code A',description: 'Some text',email: '[email protected]',status: 'Active',deletable: false,id: 366649,uri: 'https://secure.fusebill.com/v1/SalesTrackingCodes/366649'}"
//Json data 
string jsonData = "{'type': 'Sales Tracking Code 1', 'code': 'CodeA', 'name': 'Code A','description': 'Some text','email': '[email protected]','status': 'Active','deletable': false,'id': 366649,'uri': 'https://secure.fusebill.com/v1/SalesTrackingCodes/366649'}"; 
//Setup API key 
string apiKey = "{APIKey}"; 
//Configure URI 
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/salesTrackingCodes"); 
//Add Content type 
request.ContentType = "application/json"; 
//Add Api key authorization 
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey); 
//Set request method 
request.Method = "PUT"; 
//Add the json data to request 
using (var streamWriter = new StreamWriter(request.GetRequestStream())) 
//Perform the request 
var httpResponse = (HttpWebResponse)request.GetResponse(); 
//Record the response from our request 
var result = ""; 
using (var streamReader = new StreamReader(httpResponse.GetResponseStream())) 
  result = streamReader.ReadToEnd(); 
#Import library JSON 
import json 
#Import library Requests 
import requests 
#Pass in a dictionary to the Headers parameter 
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'} 
#Pass in a dict to the Payload parameter 
payload = {'type': 'Sales Tracking Code 1', 'code': 'CodeA', 'name': 'Code A','description': 'Some text','email': '[email protected]','status': 'Active','deletable': False,'id': 366649,'uri': 'https://secure.fusebill.com/v1/SalesTrackingCodes/366649'}
#Pass in your URI, Payload and Headers 
r = requests.put('https://secure.fusebill.com/v1/salesTrackingCodes', data=json.dumps(payload), headers=headers) 
        "type": "Sales Tracking Code 1",
        "code": "CodeA",
        "name": "Code A",
        "description": "Some text",
        "email": "[email protected]",
        "status": "Active",
        "deletable": false,
        "id": 366649,
        "uri": "https://secure.fusebill.com/v1/SalesTrackingCodes/366649"
    "type": "Sales Tracking Code 1",
    "code": "Updated Code",
    "name": "Updated Name",
    "description": "a new description ",
    "email": "[email protected]",
    "status": "Retired",
    "deletable": false,
    "id": 35397,
    "uri": "https://secure.fusebill.com/v1/salesTrackingCodes/35397"
    "ErrorId": 0,
    "HttpStatusCode": 404,
    "Errors": [
            "Key": "Api Error",
            "Value": "SalesTrackingCode with id 1 not found."