# Salesforce

{% embed url="<https://www.youtube.com/watch?v=vJ1FGQiGt2I>" %}
Salesforce API proxy, get started in seconds without having to set up a connected app in Salesforce. No code required!
{% endembed %}

### Overview

The Stacksync Salesforce API Proxy provides secure, streamlined access to the Salesforce APIs without requiring you to manage Connected Apps, OAuth flows, or API-specific quirks.\
Once configured, you can perform common Salesforce operations (insert, update, upsert, delete, query, and metadata access) through a single, consistent HTTPS endpoint using your Stacksync service token.

Operations:

* [Insert records](#insert)
* [Upsert records](#upsert) (tries to update a record and inserts it if it is not found)
* [Update records](#update)
* [Delete records](#delete)
* [Get records](#get)
* [Make an SOQL query](#soql)
* [Describe Salesforce instance](#describe)
* [Describe object](#describe)
* [Create a custom field into a Salesforce object](#add-a-custom-field-to-a-salesforce-object)
* [Pass Through](#pass-through)
* [Get Country List](#get-country-list)

### Insert

Insert up to 10,000 records in a single request.\
You provide the field values for each record, and the API Proxy returns a per-record result indicating success or failure.

{% tabs %}
{% tab title="cURL" %}

```url
curl -X POST https://eu.api-proxy.stacksync.com/v1/object/insert/Account \
        -H "Authorization: Bearer your_api_proxy_service_token" \
        -H "Content-Type: application/json" \
        -d '{"data":[{"name": "John Doe"},{"name": "Jane Smith"}]}'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

object_name = 'Account'
url = f"https://eu.api-proxy.stacksync.com/v1/object/insert/{object_name}"

data ={
"data" :
         [
            {
                'name': 'John Doe',
                'site': 'example.com'
            },
            {
                'name': 'Jane Smith',
                'site': 'example.com'
            }
        ]
}

api_proxy_service_token = "your_api_proxy_service_token"

headers = {
    'Authorization': f'Bearer {api_proxy_service_token}',
    'Content-Type': 'application/json'
}

response = requests.post(url, json=data, headers=headers)

```

{% endtab %}

{% tab title="Javascript" %}

```javascript
const objectName = 'Account';
const url = `https://eu.api-proxy.stacksync.com/v1/object/insert/${objectName}`;

const data ={
data:
     [
      {
        name: 'John Doe',
        site: 'johndoe@example.com'
      },
      {
        name: 'Jane Smith',
        site: 'janesmith@example.com'
      }
    ]
};

const apiProxyServiceToken = 'your_api_proxy_service_token';

const headers = {
  'Authorization': `Bearer ${apiProxyServiceToken}`,
  'Content-Type': 'application/json'
};

fetch(url, {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(data)
})
  .then(response => response.json())
  .then(data => {
    console.log(data);
  })
  .catch(error => {
    console.error(error);
  });
  
```

{% endtab %}
{% endtabs %}

Example response body:

```json
{
	"data": [
		{
			"errors": [],
			"id": "0010600002BpRZDAA3",
			"success": true
		},
		{
			"errors": [],
			"id": "0010600002BpRZEAA3",
			"success": true
		}
	]
}
```

### Upsert

Create or update a single Salesforce record in an idempotent way, based on a matching key. The `match_key` can be the record `Id` or any other field you designate as a unique identifier.

If the key does not match an existing record, a new record is created. If it matches exactly one record, that record is updated. If it matches multiple records, the operation fails to avoid ambiguous updates.

Use this operation when you want to safely handle “create‑or‑update” logic without building separate lookup and write steps.

{% tabs %}
{% tab title="cURL" %}

```url
curl -X POST https://eu.api-proxy.stacksync.com/v1/object/upsert/Account \
        -H "Authorization: Bearer your_api_proxy_service_token" \
        -H "Content-Type: application/json" \
        -d '{"data":[{"name":"Jon Doe"}],"match_key":"name"}'
```

{% endtab %}

{% tab title="Python" %}

<pre class="language-python"><code class="lang-python"><strong>import requests
</strong>

object_name = 'Account'

url = f"https://eu.api-proxy.stacksync.com/v1/object/upsert/{object_name}"

data = {
        "data": 
                [
                        {
                                "name": "Jon Doe", 
                                "site": "example.com"
                        }
                ],
        "match_key": "name"
    }

api_proxy_service_token = "your_api_proxy_service_token"

headers = {
    'Authorization': f'Bearer {api_proxy_service_token}',
    'Content-Type': 'application/json'
}

response = requests.post(url, json=data, headers=headers)

</code></pre>

{% endtab %}

{% tab title="Javascript" %}

```javascript
const object_name = 'Account';
const url = `https://eu.api-proxy.stacksync.com/v1/object/upsert/${object_name}`;

const data ={
data:
        [
            {
                name: 'Jon Doe',
                "site": "example.com"
            }
        ],
match_key: "name"
};

const api_proxy_service_token = 'your_api_proxy_service_token';

const headers = {
    'Authorization': `Bearer ${apiProxyServiceToken}`,
    'Content-Type': 'application/json'
};

fetch(url, {
    method: 'POST',
    headers: headers,
    body: JSON.stringify(data)
})
    .then(response => response.json())
    .then(data => {
     console.log(data);
    })
    .catch(error => {
     console.error(error);
    });

```

{% endtab %}
{% endtabs %}

Example response body:

```json
{
	"data": [
		{	
			"errors": [],
			"id": "0010600002BpLWtAAN",
			"success": true
		}
	]
}
```

### Update

Modify existing Salesforce records in bulk. This operation lets you update up to 10,000 records per request and overwrites the specified fields with the new values you provide.

It is designed for controlled bulk changes, such as correcting attributes, updating ownership, or propagating new values from another system, with per‑record success and error reporting.

{% tabs %}
{% tab title="cURL" %}

```url
curl -X POST https://eu.api-proxy.stacksync.com/v1/object/update/Account \
        -H "Authorization: Bearer your_api_proxy_service_token" \
        -H "Content-Type: application/json" \
        -d '{"data":[{"id": "0010600002BpLWtAAN", "name": "John Doe"}, {"id": "0010600002BpLWuAAN", "name": "Jane Smith"}]}'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

object_name = 'Account'

url = f"https://eu.api-proxy.stacksync.com/v1/object/update/{object_name}"

data ={
 "data": 
        [
            {
                'id': '0010600002BpLWtAAN',
                'name': 'John Doe',
                'site': 'www.example.com'
            },
            {
                'id': '0010600002BpLWuAAN',
                'name': 'Jane Smith',
                'site': 'www.example.com'
            }
        ]
}
api_proxy_service_token = "your_api_proxy_service_token"

headers = {
    'Authorization': f'Bearer {api_proxy_service_token}',
    'Content-Type': 'application/json'
}

response = requests.post(url, json=data, headers=headers)

```

{% endtab %}

{% tab title="Javascript" %}

```javascript
const objectName = 'Account';
const url = `https://eu.api-proxy.stacksync.com/v1/object/update/${objectName}`;

const data ={
data:
        [
            {
                id: '0010600002BpLWtAAN',
                name: 'John Doe',
                site: 'www.example.com'
            },
            {
                id: '0010600002BpLWuAAN',
                name: 'Jane Smith',
                site: 'www.example.com'
            }
        ]
};

const apiProxyServiceToken = 'your_api_proxy_service_token';

const headers = {
    'Authorization': `Bearer ${apiProxyServiceToken}`,
    'Content-Type': 'application/json'
};

fetch(url, {
    method: 'POST',
    headers: headers,
    body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => {
 console.log(data);
})
.catch(error => {
 console.error(error);
});

```

{% endtab %}
{% endtabs %}

Example response body:

```json
{
	"data": [
		{
			"errors": [],
			"id": "0010600002BpLWtAAN",
			"success": true
		},
		{
			"errors": [],
			"id": "0010600002BpLWuAAN",
			"success": true
		}
	]
}
```

### Delete

Remove Salesforce records in bulk by their Ids. This endpoint allows you to delete up to 10,000 records per request and returns a result for each Id indicating whether the delete succeeded or failed.

Use this operation for operational clean‑up, testing environments, and data hygiene tasks, where you need auditable, large‑scale deletions via a single, secure API call.

{% tabs %}
{% tab title="cURL" %}

```url
curl -X POST https://eu.api-proxy.stacksync.com/v1/object/delete \
        -H "Authorization: Bearer your_api_proxy_service_token" \
        -H "Content-Type: application/json" \
        -d '{"data": {"ids":["0010600002BpLWtAAN","0010600002BpLWuAAN"]}}'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = f"https://eu.api-proxy.stacksync.com/v1/object/delete"

data ={
 "data": 
    {
        "ids" : ["0010600002BpLWtAAN","0010600002BpLWuAAN"]
    }
}

api_proxy_service_token = "your_api_proxy_service_token"

headers = {
    'Authorization': f'Bearer {api_proxy_service_token}',
    'Content-Type': 'application/json'
}

response = requests.post(url, json=data, headers=headers)

```

{% endtab %}

{% tab title="Javascript" %}

```javascript
const url = 'https://eu.api-proxy.stacksync.com/v1/object/delete';
const data ={
data :
    {
        ids : ['0010600002BpLWtAAN','0010600002BpLWuAAN']
    }
};

const api_proxy_service_token = 'your_api_proxy_service_token';

const headers = {
  'Authorization': `Bearer ${apiProxyServiceToken}`,
  'Content-Type': 'application/json'
};

fetch(url, {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(data)
})
  .then(response => response.json())
  .then(data => {
    console.log(data);
  })
  .catch(error => {
    console.error(error);
  });

```

{% endtab %}
{% endtabs %}

Example response body:

```json
{
         "data": [
                  {
                     "id" : "0010600002BpLWtAAN",
                     "success" : true,
                     "errors" : [ ]
                  },
                  {
                     "id" : "0010600002BpLWuAAN",
                     "success" : true,
                     "errors" : [ ]
                  }
         ]
}
```

### Get

Retrieve full or partial representations of Salesforce records by Id. You can request up to 10,000 records in a single call and optionally specify the list of fields to return.

If no fields are provided, all fields available to the connected Salesforce user are returned. This operation is ideal when you need record‑level detail for downstream processing, enrichment, or troubleshooting.

{% tabs %}
{% tab title="cURL" %}

```url
curl -X POST https://eu.api-proxy.stacksync.com/v1/object/get/Account \
        -H "Authorization: Bearer your_api_proxy_service_token" \
        -H "Content-Type: application/json" \
        -d '{"data": {"ids": ["0010600002BpLWuAAN", "0010600002BpLWtAAN"], "fields": ["Name"]}}'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

object_name = 'Account'

url = f"https://eu.api-proxy.stacksync.com/v1/object/get/{object_name}"

data ={
"data":
      {
         "ids" : ["0010600002BpLWuAAN", "0010600002BpLWtAAN"],
         "fields" : ["Name"]
      }
}

api_proxy_service_token = "your_api_proxy_service_token"

headers = {
    'Authorization': f'Bearer {api_proxy_service_token}',
    'Content-Type': 'application/json'
}

response = requests.post(url, json=data, headers=headers)

```

{% endtab %}

{% tab title="Javascript" %}

```javascript
const object_name = 'Account';
const url = `https://eu.api-proxy.stacksync.com/v1/object/get/${object_name}`;

const data ={
data:
    {
      ids: ["0010600002BpLWuAAN", "0010600002BpLWtAAN"],
      fields: ["Name"]
    }
};

const api_proxy_service_token = 'your_api_proxy_service_token';

const headers = {
  'Authorization': `Bearer ${apiProxyServiceToken}`,
  'Content-Type': 'application/json'
};

fetch(url, {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(data)
})
  .then(response => response.json())
  .then(data => {
    console.log(data);
  })
  .catch(error => {
    console.error(error);
  });

```

{% endtab %}
{% endtabs %}

Example response body:

```json
{
	"data": [
		{
			"Id": "0010600002BpLWuAAN",
			"Name": "John Doe",
			"attributes": {
				"type": "Account",
				"url": "/services/data/v57.0/sobjects/Account/0010600002BpLWuAAN"
			}
		},
		{
			"Id": "0010600002BpLWtAAN",
			"Name": "Jane Smith",
			"attributes": {
				"type": "Account",
				"url": "/services/data/v57.0/sobjects/Account/0010600002BpLWtAAN"
			}
		}
	]
}
```

### SOQL

Execute a SOQL (Salesforce Object Query Language) query against your Salesforce instance through the Stacksync API Proxy.\
SOQL lets you select specific fields from one or more Salesforce objects, filter records with conditions, and control ordering and limits, similar to how you would use SQL against a relational database.&#x20;

Use this operation when you need to:

* Power reports, dashboards, or internal tools that read Salesforce data on demand or low-volume, otherwise using Stacksync Syncs is recommended.
* Retrieve targeted subsets of data (for example, “all open Opportunities over a certain amount”) without loading full objects.
* Implement application logic that depends on Salesforce state, such as routing, enrichment, or eligibility checks.

You provide the SOQL query string, and the API Proxy executes it using the managed Salesforce connection and returns the query results in a standard JSON format. \[

{% tabs %}
{% tab title="cURL" %}

```url
curl -X POST https://eu.api-proxy.stacksync.com/v1/object/soql \
        -H "Authorization: Bearer your_api_proxy_service_token" \
        -H "Content-Type: application/json" \
        -d '{"data": "SELECT Id, Name, Email FROM Contacts"}'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = f"https://eu.api-proxy.stacksync.com/v1/object/soql"

data = {
    'data': 'SELECT Id, Name, Email FROM contacts'
}

api_proxy_service_token = "your_api_proxy_service_token"

headers = {
    'Authorization': f'Bearer {api_proxy_service_token}',
    'Content-Type': 'application/json'
}

response = requests.post(url, json=data, headers=headers)
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
const url = "https://eu.api-proxy.stacksync.com/v1/object/soql";

const data = {
  data: "SELECT Id, Name, Email FROM contacts",
};

const api_proxy_service_token = "your_api_proxy_service_token";

const headers = {
  "Authorization": `Bearer ${apiProxyServiceToken}`,
  "Content-Type": "application/json",
};

fetch(url, {
  method: "POST",
  headers: headers,
  body: JSON.stringify(data),
})
  .then((response) => response.json())
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

```

{% endtab %}
{% endtabs %}

### Describe Salesforce Instance

Retrieve metadata about your Salesforce instance, including the list of available objects and their high‑level characteristics.

This operation is useful for discovery and tooling scenarios, such as generating config, inspecting available objects before building integrations, or validating that required objects exist in a given org.

{% tabs %}
{% tab title="cURL" %}

```url
curl -X POST https://eu.api-proxy.stacksync.com/v1/describe \
        -H "Authorization: Bearer your_api_proxy_service_token" \
        -H "Content-Type: application/json"
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = f"https://eu.api-proxy.stacksync.com/v1/describe"

api_proxy_service_token = "your_api_proxy_service_token"

headers = {
    'Authorization': f'Bearer {api_proxy_service_token}',
    'Content-Type': 'application/json'
}

response = requests.post(url, headers=headers)
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
const url = "https://api-proxy.stacksync.com/v1/describe";
const api_proxy_service_token = "your_api_proxy_service_token";

const headers = {
  "Authorization": `Bearer ${apiProxyServiceToken}`,
  "Content-Type": "application/json",
};

fetch(url, {
  method: "POST",
  headers: headers
})
  .then((response) => response.json())
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error(error);
  });

```

{% endtab %}
{% endtabs %}

### Describe Object

Retrieve detailed metadata for a specific Salesforce object, including field definitions and attributes.

Use this operation when you need to understand the structure of an object (such as required fields, data types, and constraints) before building or adjusting integrations and data flows.

{% tabs %}
{% tab title="cURL" %}

```url
curl -X POST https://eu.api-proxy.stacksync.com/v1/describe/{object_name} \
        -H "Authorization: Bearer your_api_proxy_service_token" \
        -H "Content-Type: application/json"
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

object_name = "Account"

url = f"https://eu.api-proxy.stacksync.com/v1/describe/{object_name}"

api_proxy_service_token = "your_api_proxy_service_token"

headers = {
    'Authorization': f'Bearer {api_proxy_service_token}',
    'Content-Type': 'application/json'
}

response = requests.post(url, headers=headers)
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
const objectName = "Account";
const url = `https://eu.api-proxy.stacksync.com/v1/describe/${objectName}`;

const apiProxyServiceToken = "your_api_proxy_service_token";

const headers = {
  'Authorization': `Bearer ${apiProxyServiceToken}`,
  'Content-Type': 'application/json'
};

fetch(url, {
  method: 'POST',
  headers: headers
})
  .then(response => response.json())
  .then(data => {
    console.log(data);
  })
  .catch(error => {
    console.error(error);
  });
  
```

{% endtab %}
{% endtabs %}

### Add a custom field to a Salesforce object

Add a custom field to a Salesforce object. Standard and custom objects are supported.

This operation is suited for automated provisioning and configuration, where you want infrastructure or integration pipelines to manage Salesforce schema changes in a controlled, repeatable way.

The required request body parameters are:&#x20;

* `type` the type of the custom field you wish to create&#x20;
* `name` the name of the custom field you wish to create
* `label` the label associated to the custom field you wish to create

`type` can be any of the field types presented [here](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_field_types.htm)

Unless otherwise noted, all fields are creatable, filterable, and nullable.

Some optional parameters may be required depending on the `type`, \
(eg: `length` is required when creating a custom field of type `Text`)

Learn more about the API behavior [here](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/customfield.htm).

{% tabs %}
{% tab title="cURL" %}

```url
curl -X POST https://eu.api-proxy.stacksync.com/v1/object/add_custom_field/{object_name} \
        -H "Authorization: Bearer your_api_proxy_service_token" \
        -H "Content-Type: application/json" \
        -d '{"data": {"name": "field_name", "type": "field_type", "label": "field_label"}}'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

headers = {
    'Authorization': 'Bearer your_api_proxy_service_token',
    'Content-Type': 'application/json',
}

json_data = {
    'data': {
        'name': 'field_name',
        'type': 'field_type',
        'label': 'field_label'
    },
}

response = requests.post(
    'https://eu.api-proxy.stacksync.com/v1/object/add_custom_field/{object_name}',
    headers=headers,
    json=json_data,
)
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
fetch('https://eu.api-proxy.stacksync.com/v1/object/add_custom_field/{object_name}'
  method: 'POST',
  headers: {
    'Authorization': 'Bearer your_api_proxy_service_token',
    'Content-Type': 'application/json'
  },
  // body: '{"data": {"field_name": "field_name", "field_type": "field_type"}}',
  body: JSON.stringify({
    'data': {
      'field_name': 'field_name',
      'field_type': 'field_type'
    }
  })
});
```

{% endtab %}
{% endtabs %}

Example Response Body:&#x20;

```json
{
    "data": {
        "errors": [],
        "id": "01N7R00000FlUGDUA3",
        "infos": [],
        "success": true,
        "warnings": []
    },
    "msg": "custom field added successfully"
}
```

Example requests for different field types:

{% tabs %}
{% tab title="Text" %}

```
curl -X POST https://eu.api-proxy.stacksync.com/v1/object/add_custom_field/{object_name} \
        -H "Authorization: Bearer *****" \
        -H "Content-Type: application/json" \
        -d '{"data": 
                {"name": "field_name", 
                "type": "Text", 
                "label": "list_field", 
                "length":100}}'
```

{% endtab %}

{% tab title="Picklist field" %}
Example:

```
curl -X POST 

https://eu.api-proxy.stacksync.cloud/v1/object/add_custom_field/{object_name} \
        -H "Authorization: Bearer ******" \
        -H "Content-Type: application/json" \
        -d '{
	"data": {
		"name": "picklistField",
		"type": "Picklist",
		"label": "picklistField",
		"valueSet": {
			"restricted": false,
			"valueSetDefinition": {
				"sorted": false,
				"value": [
					{
						"fullName": "Option1",
						"default": false
					},
					{
						"fullName": "Option2",
						"default": false
					},
					{
						"fullName": "Option3",
						"default": false
					}
				]
			}
		}
	}
}'
```

{% endtab %}
{% endtabs %}

## Pass Through

Invoke any Salesforce REST API endpoint via the Stacksync API Proxy. You provide the full Salesforce URL, HTTP method, and optional request body, and the proxy forwards the request using the managed Salesforce connection.

Use this operation when you need capabilities that are not yet covered by the higher‑level endpoints (insert, update, delete, etc.), while still benefiting from centralized authentication, logging, and access control.

```
curl -X [GET | POST | PUT | PATCH | DELETE] 
https://eu.api-proxy.stacksync.com/v1/proxy/INSERT_REQUEST_URL_HERE \
-H "Authorization: Bearer your_api_proxy_service_token" \
-d 'Optional'
```

Example request:

**Get Account Record**

{% tabs %}
{% tab title="cURL" %}

```url
curl -X GET https://eu.api-proxy.stacksync.com/v1/proxy/https://MyDomainName.my.salesforce.com/services/data/v60.0/sobjects/Account/0017S00000GYoL3QAL \
        -H "Authorization: Bearer your_api_proxy_service_token"        
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://eu.api-proxy.stacksync.com/v1/proxy/https://MyDomainName.my.salesforce.com/services/data/v60.0/sobjects/Account/0017S00000GYoL3QAL"

api_proxy_service_token = "your_api_proxy_service_token"

headers = {
    'Authorization': f'Bearer {api_proxy_service_token}'
}

response = requests.get(url, headers=headers)

```

{% endtab %}

{% tab title="Javascript" %}

```javascript
const url = `https://eu.api-proxy.stacksync.com/v1/proxy/https://MyDomainName.my.salesforce.com/services/data/v60.0/sobjects/Account/0017S00000GYoL3QAL`;

const api_proxy_service_token = 'your_api_proxy_service_token';

const headers = {
  'Authorization': `Bearer ${apiProxyServiceToken}`
};

fetch(url, {
  method: 'GET',
  headers: headers
})
  .then(response => response.json())
  .then(data => {
    console.log(data);
  })
  .catch(error => {
    console.error(error);
  });

```

{% endtab %}
{% endtabs %}

Example response:

```json
{
	"AccountNumber": "CD355118",
	"AccountSource": null,
	"Active__c": "Yes",
	"AnnualRevenue": 5600000000.0,
	"BillingAddress": {
		"city": "New York",
		"country": "test",
		"geocodeAccuracy": null,
		"latitude": 12.699999997,
		"longitude": 12.8,
		"postalCode": "123",
		"state": "NY",
		"street": "1301 Avenue of the Americas \nNew York, NY 10019\nUSA"
	},
	"BillingCity": "New York",
	"BillingCountry": "test",
	"BillingGeocodeAccuracy": null,
	"BillingLatitude": 12.699999997,
	"BillingLongitude": 12.8,
	"BillingPostalCode": "123",
	"BillingState": "NY",
	"BillingStreet": "1301 Avenue of the Americas \nNew York, NY 10019\nUSA",
	"CleanStatus": "Pending",
	"CreatedById": "0057S000000WzYEQA0",
	"CreatedDate": "2022-10-28T08:44:59.000+0000",
	"CustomerPriority__c": "High",
	"DandbCompanyId": null,
	"Description": "World's third largest oil and gas company.",
	"DunsNumber": null,
	"Fax": "(212) 842-5501",
	"Id": "0017S00000GYoL3QAL",
	"Industry": "Energy",
	"IsDeleted": false,
	"Jigsaw": null,
	"JigsawCompanyId": null,
	"LastActivityDate": null,
	"LastModifiedById": "0057S000000WzYEQA0",
	"LastModifiedDate": "2024-01-25T11:28:30.000+0000",
	"LastReferencedDate": "2024-02-12T01:58:55.000+0000",
	"LastViewedDate": "2024-02-12T01:58:55.000+0000",
	"MasterRecordId": null,
	"NaicsCode": null,
	"NaicsDesc": null,
	"Name": "Dickenson plc 2",
	"NumberOfEmployees": 145000,
	"NumberofLocations__c": 34.0,
	"OperatingHoursId": null,
	"OwnerId": "0057S000000WzYEQA0",
	"Ownership": "Public",
	"ParentId": null,
	"Phone": "12",
	"PhotoUrl": "/services/images/photo/0017S00000GYoL3QAL",
	"Rating": "Hot",
	"SLAExpirationDate__c": "2023-05-24",
	"SLASerialNumber__c": "6654",
	"SLA__c": "Platinum",
	"ShippingAddress": {
		"city": "Paris",
		"country": "France",
		"geocodeAccuracy": null,
		"latitude": null,
		"longitude": null,
		"postalCode": "75251",
		"state": "q",
		"street": "1301 Avenue of the Americas \nNew York, NY 10019\nUSA"
	},
	"ShippingCity": "Paris",
	"ShippingCountry": "France",
	"ShippingGeocodeAccuracy": null,
	"ShippingLatitude": null,
	"ShippingLongitude": null,
	"ShippingPostalCode": "75251",
	"ShippingState": "q",
	"ShippingStreet": "1301 Avenue of the Americas \nNew York, NY 10019\nUSA",
	"Sic": "4437",
	"SicDesc": null,
	"Site": "resr",
	"SystemModstamp": "2024-01-25T11:28:31.000+0000",
	"TickerSymbol": "UOS",
	"Tradestyle": null,
	"Type": "Customer - Direct",
	"UpsellOpportunity__c": "Yes",
	"Website": "http://www.uos.com",
	"YearStarted": null,
	"aaaa__c": null,
	"api_token_test__c": null,
	"attributes": {
		"type": "Account",
		"url": "/services/data/v60.0/sobjects/Account/0017S00000GYoL3QAL"
	},
	"encrypted_test__c": "XXXXXXXXXX",
	"formula_test__c": 5600145000.0,
	"geolocation_test__Latitude__s": 12.0,
	"geolocation_test__Longitude__s": 32.0,
	"geolocation_test__c": {
		"latitude": 12.0,
		"longitude": 32.0
	},
	"multipick_list__c": "string;string;12.541",
	"percent_test__c": 5.0,
	"picklisttestnow__c": null,
	"randomfield__c": null,
	"rich_text_test__c": null,
	"rollup_test__c": 720000.0,
	"test_custom_string5__c": "test",
	"time_test__c": "00:15:00.000Z",
	"url_test__c": "www.google.com"
}
```

### Get Country List

Retrieves the list of countries configured in your Salesforce org's Address Settings. This is useful for populating country dropdowns or validating country data in your application.

{% tabs %}
{% tab title="cURL" %}

```url
curl -X POST https://eu.api-proxy.stacksync.com/v1/country_list \
        -H "Authorization: Bearer your_api_proxy_service_token"
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

object_name = "Account"

url = f"https://eu.api-proxy.stacksync.com/v1/country_list"

api_proxy_service_token = "your_api_proxy_service_token"

headers = {
    'Authorization': f'Bearer {api_proxy_service_token}'
}

response = requests.post(url, headers=headers)
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
const objectName = "Account";
const url = `https://eu.api-proxy.stacksync.com/v1/country_list`;

const apiProxyServiceToken = "your_api_proxy_service_token";

const headers = {
  'Authorization': `Bearer ${apiProxyServiceToken}`
};

fetch(url, {
  method: 'POST',
  headers: headers
})
  .then(response => response.json())
  .then(data => {
    console.log(data);
  })
  .catch(error => {
    console.error(error);
  });
  
```

{% endtab %}
{% endtabs %}

Example response:

```json
  {                                                                                                                                                                                                                                        
    "data": [                                                                                                                                                                                                                              
      {                                                                                                                                                                                                                                    
        "label": "United States",                                                                                                                                                                                                          
        "iso_code": "US"                                                                                                                                                                                                                   
      },                                                                                                                                                                                                                                   
      {                                                                                                                                                                                                                                    
        "label": "United Kingdom",                                                                                                                                                                                                         
        "iso_code": "GB"                                                                                                                                                                                                                   
      },                                                                                                                                                                                                                                   
      {                                                                                                                                                                                                                                    
        "label": "France",                                                                                                                                                                                                                 
        "iso_code": "FR"                                                                                                                                                                                                                   
      }                                                                                                                                                                                                                                    
    ],                                                                                                                                                                                                                                     
  }  
```
