Create contact
curl --request POST \
--url https://staging-api.tyms.io/v1/adam/create/contact \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Acme Supplies Ltd",
"type": "vendor",
"business_name": "Acme Supplies Limited",
"email": "billing@acmesupplies.example",
"phone": "+2348012345678",
"address": "12 Industrial Avenue, Lagos",
"tax_id": "RC-123456",
"country": "NG",
"contact_number": "VND-0091",
"payment_terms": 14,
"receivable_account": "Accounts Receivable",
"payable_account": "Accounts Payable",
"opening_balance": 0
}
'import requests
url = "https://staging-api.tyms.io/v1/adam/create/contact"
payload = {
"name": "Acme Supplies Ltd",
"type": "vendor",
"business_name": "Acme Supplies Limited",
"email": "billing@acmesupplies.example",
"phone": "+2348012345678",
"address": "12 Industrial Avenue, Lagos",
"tax_id": "RC-123456",
"country": "NG",
"contact_number": "VND-0091",
"payment_terms": 14,
"receivable_account": "Accounts Receivable",
"payable_account": "Accounts Payable",
"opening_balance": 0
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Acme Supplies Ltd',
type: 'vendor',
business_name: 'Acme Supplies Limited',
email: 'billing@acmesupplies.example',
phone: '+2348012345678',
address: '12 Industrial Avenue, Lagos',
tax_id: 'RC-123456',
country: 'NG',
contact_number: 'VND-0091',
payment_terms: 14,
receivable_account: 'Accounts Receivable',
payable_account: 'Accounts Payable',
opening_balance: 0
})
};
fetch('https://staging-api.tyms.io/v1/adam/create/contact', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"message": "Contacts imported successfully",
"data": {
"imported": 1,
"contacts": [
{
"uuid": "v8e7d6c5b4a3418290f0e9d8c7b6a5947",
"name": "Acme Supplies Ltd",
"type": "vendor"
}
]
}
}{
"status": "failed",
"message": "<string>"
}Contacts
Create contact
POST
/
create
/
contact
Create contact
curl --request POST \
--url https://staging-api.tyms.io/v1/adam/create/contact \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Acme Supplies Ltd",
"type": "vendor",
"business_name": "Acme Supplies Limited",
"email": "billing@acmesupplies.example",
"phone": "+2348012345678",
"address": "12 Industrial Avenue, Lagos",
"tax_id": "RC-123456",
"country": "NG",
"contact_number": "VND-0091",
"payment_terms": 14,
"receivable_account": "Accounts Receivable",
"payable_account": "Accounts Payable",
"opening_balance": 0
}
'import requests
url = "https://staging-api.tyms.io/v1/adam/create/contact"
payload = {
"name": "Acme Supplies Ltd",
"type": "vendor",
"business_name": "Acme Supplies Limited",
"email": "billing@acmesupplies.example",
"phone": "+2348012345678",
"address": "12 Industrial Avenue, Lagos",
"tax_id": "RC-123456",
"country": "NG",
"contact_number": "VND-0091",
"payment_terms": 14,
"receivable_account": "Accounts Receivable",
"payable_account": "Accounts Payable",
"opening_balance": 0
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Acme Supplies Ltd',
type: 'vendor',
business_name: 'Acme Supplies Limited',
email: 'billing@acmesupplies.example',
phone: '+2348012345678',
address: '12 Industrial Avenue, Lagos',
tax_id: 'RC-123456',
country: 'NG',
contact_number: 'VND-0091',
payment_terms: 14,
receivable_account: 'Accounts Receivable',
payable_account: 'Accounts Payable',
opening_balance: 0
})
};
fetch('https://staging-api.tyms.io/v1/adam/create/contact', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"message": "Contacts imported successfully",
"data": {
"imported": 1,
"contacts": [
{
"uuid": "v8e7d6c5b4a3418290f0e9d8c7b6a5947",
"name": "Acme Supplies Ltd",
"type": "vendor"
}
]
}
}{
"status": "failed",
"message": "<string>"
}Authorizations
Business secret tyms_sk_... for business-scoped routes. Partner secret for register-business and referred-business distributor routes.
Body
application/json
Contact display name.
Available options:
customer, vendor, both Used to match existing contacts.
Branch id. Same as branch_uuid. If branch_name is also sent, the name is used instead.
Branch id. Alias: branch.
Branch name, ignoring capital letters. If you send this, it is used even when an id is also present. If no branch has that name, Tyms adds one.
Department id. Same as department_uuid. If department_name is also sent, the name is used instead.
Department id. Alias: department.
Department name, ignoring capital letters. If you send this, it is used even when an id is also present. If no department has that name, Tyms adds one.
Response
Contact created