Update a FTP mapping
curl --request PATCH \
--url https://clarus-api.com/api/ftp_mapping_groups/{mapping_group_id}/mappings/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "ftp_mappings",
"attributes": {
"account_id": 5,
"account_in_file": "ACME",
"customer_id": 200,
"customer_in_file": "CUST-200",
"delivery_address_id": 91,
"delivery_address_in_file": "DEL-A",
"collection_address_id": 17,
"collection_address_in_file": "COL-Z",
"mapping_fields": [
{
"file_format": "csv"
}
]
}
}
}
'import requests
url = "https://clarus-api.com/api/ftp_mapping_groups/{mapping_group_id}/mappings/{id}"
payload = { "data": {
"type": "ftp_mappings",
"attributes": {
"account_id": 5,
"account_in_file": "ACME",
"customer_id": 200,
"customer_in_file": "CUST-200",
"delivery_address_id": 91,
"delivery_address_in_file": "DEL-A",
"collection_address_id": 17,
"collection_address_in_file": "COL-Z",
"mapping_fields": [{ "file_format": "csv" }]
}
} }
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data: {
type: 'ftp_mappings',
attributes: {
account_id: 5,
account_in_file: 'ACME',
customer_id: 200,
customer_in_file: 'CUST-200',
delivery_address_id: 91,
delivery_address_in_file: 'DEL-A',
collection_address_id: 17,
collection_address_in_file: 'COL-Z',
mapping_fields: [{file_format: 'csv'}]
}
}
})
};
fetch('https://clarus-api.com/api/ftp_mapping_groups/{mapping_group_id}/mappings/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Mappings
Update a FTP mapping
Update an existing FTP mapping. Returns 204 No Content on success.
PATCH
/
api
/
ftp_mapping_groups
/
{mapping_group_id}
/
mappings
/
{id}
Update a FTP mapping
curl --request PATCH \
--url https://clarus-api.com/api/ftp_mapping_groups/{mapping_group_id}/mappings/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "ftp_mappings",
"attributes": {
"account_id": 5,
"account_in_file": "ACME",
"customer_id": 200,
"customer_in_file": "CUST-200",
"delivery_address_id": 91,
"delivery_address_in_file": "DEL-A",
"collection_address_id": 17,
"collection_address_in_file": "COL-Z",
"mapping_fields": [
{
"file_format": "csv"
}
]
}
}
}
'import requests
url = "https://clarus-api.com/api/ftp_mapping_groups/{mapping_group_id}/mappings/{id}"
payload = { "data": {
"type": "ftp_mappings",
"attributes": {
"account_id": 5,
"account_in_file": "ACME",
"customer_id": 200,
"customer_in_file": "CUST-200",
"delivery_address_id": 91,
"delivery_address_in_file": "DEL-A",
"collection_address_id": 17,
"collection_address_in_file": "COL-Z",
"mapping_fields": [{ "file_format": "csv" }]
}
} }
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data: {
type: 'ftp_mappings',
attributes: {
account_id: 5,
account_in_file: 'ACME',
customer_id: 200,
customer_in_file: 'CUST-200',
delivery_address_id: 91,
delivery_address_in_file: 'DEL-A',
collection_address_id: 17,
collection_address_in_file: 'COL-Z',
mapping_fields: [{file_format: 'csv'}]
}
}
})
};
fetch('https://clarus-api.com/api/ftp_mapping_groups/{mapping_group_id}/mappings/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Authorizations
OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.
The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.
Path Parameters
The FTP mapping group ID
The mapping ID
Body
application/json
Show child attributes
Show child attributes
Response
Operation completed successfully with no content to return
⌘I

