Create branch
curl --request POST \
--url https://staging-api.usetyms.com/v1/adam/branches \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Lagos HQ",
"address": "12 Adeola Odeku, Victoria Island",
"state": "Lagos",
"country": "NG",
"phone": "+2348011111111",
"email": "lagos@acme.example"
}
'import requests
url = "https://staging-api.usetyms.com/v1/adam/branches"
payload = {
"name": "Lagos HQ",
"address": "12 Adeola Odeku, Victoria Island",
"state": "Lagos",
"country": "NG",
"phone": "+2348011111111",
"email": "lagos@acme.example"
}
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: 'Lagos HQ',
address: '12 Adeola Odeku, Victoria Island',
state: 'Lagos',
country: 'NG',
phone: '+2348011111111',
email: 'lagos@acme.example'
})
};
fetch('https://staging-api.usetyms.com/v1/adam/branches', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"message": "Branch created successfully",
"data": {
"uuid": "br1234567890abcdef1234567890abcd",
"business_uuid": "b1b2b3...",
"name": "Lagos HQ",
"address": "12 Adeola Odeku, Victoria Island",
"state": "Lagos",
"country": "NG",
"is_default": false,
"phone": "+2348011111111",
"email": "lagos@acme.example"
}
}{
"status": "failed",
"message": "<string>"
}Branches
Create branch
Create a new branch location. name, address, state, and country are required. The default branch cannot be deleted.
POST
/
branches
Create branch
curl --request POST \
--url https://staging-api.usetyms.com/v1/adam/branches \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Lagos HQ",
"address": "12 Adeola Odeku, Victoria Island",
"state": "Lagos",
"country": "NG",
"phone": "+2348011111111",
"email": "lagos@acme.example"
}
'import requests
url = "https://staging-api.usetyms.com/v1/adam/branches"
payload = {
"name": "Lagos HQ",
"address": "12 Adeola Odeku, Victoria Island",
"state": "Lagos",
"country": "NG",
"phone": "+2348011111111",
"email": "lagos@acme.example"
}
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: 'Lagos HQ',
address: '12 Adeola Odeku, Victoria Island',
state: 'Lagos',
country: 'NG',
phone: '+2348011111111',
email: 'lagos@acme.example'
})
};
fetch('https://staging-api.usetyms.com/v1/adam/branches', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"message": "Branch created successfully",
"data": {
"uuid": "br1234567890abcdef1234567890abcd",
"business_uuid": "b1b2b3...",
"name": "Lagos HQ",
"address": "12 Adeola Odeku, Victoria Island",
"state": "Lagos",
"country": "NG",
"is_default": false,
"phone": "+2348011111111",
"email": "lagos@acme.example"
}
}{
"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
Branch name.
Street address.
State or region.
Country code.
Base64-encoded logo when overriding branding.
When true, uses logo instead of the business logo on branch documents.
Response
Branch created