Re-sync Customer

This function is used to re-sync a customer entity to a particular Salesforce ID in cases where for some reason the two accounts became out of sync. Fusebill will ensure subscriptions and details are not duplicated.

Request Parameters

PropertyTypeDescriptionRequired
fusebillIdIntegerThis is the the ID value which uniquely identifies this Customer record in the Fusebill system. This value is unique to each customer. Note, you can use either the Fusebill ID in the call body (request) or the Salesforce ID but not both.Yes if salesforceId is not provided
salesforceIdStringThe Salesforce Account ID associated with this Customer. Note, you can use the Fusebill ID in the call body (request) or the Salesforce ID but not both.Yes if fusebillId is not provided
Examples
curl -X POST "https://secure.fusebill.com/v1/Salesforce/Resynch" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}" \
	-d "{salesforceId:'{salesforceId}'}"
//Json Payload
string jsonData = "{salesforceId:'{salesforceId}'}";
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/Salesforce/Resynch/");
//Add Content type
request.ContentType = "application/json";
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic " + apiKey);
//Set request method
request.Method = "POST";
//Add the json data to request
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
  streamWriter.Write(jsonData);
  streamWriter.Flush();
  streamWriter.Close();
}
//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 dictionary to the Payload parameter
payload = {"salesforceId":'0014100000JJ3wt'}
#Pass in your URI, Payload and Headers
r = requests.post('https://secure.fusebill.com/v1/SalesForce/Resynch', data=json.dumps(payload), headers=headers)
print(r.content)
{
      "fusebillId":12717595,     
}
{
      "salesforceId":"0014100000JJ3wt" 
}
Response
{ 
   "success":true,
   "details":null
}
{
    "ErrorId": 0,
    "HttpStatusCode": 404,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Customer with id 1 not found."
        }
    ]
}
Language
Authorization