curl -X PATCH 'https://api.weir.ai/org/information' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-H 'x-source: console' \
-d '{
"basicInfo": {
"website": "https://acmecorp.com",
"industry": "TECHNOLOGY",
"companySize": "MEDIUM",
"founded": "2020",
"description": "An innovative technology platform"
},
"address": {
"address1": "123 Main St",
"address2": "Suite 100",
"city": "San Francisco",
"state": "CA",
"postalCode": "94105",
"country": "USA"
},
"contact": {
"phone": "+1-415-555-0100",
"email": "[email protected]"
},
"taxInfo": {
"taxId": "12-3456789",
"taxOrgType": "CORPORATION"
}
}'
{
"data": {
"organizationId": "org_123456789",
"updatedAt": "2024-01-22T15:30:00Z"
},
"message": "Organization information updated successfully",
"status": "success"
}
Update organization details and settings
curl -X PATCH 'https://api.weir.ai/org/information' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-H 'x-source: console' \
-d '{
"basicInfo": {
"website": "https://acmecorp.com",
"industry": "TECHNOLOGY",
"companySize": "MEDIUM",
"founded": "2020",
"description": "An innovative technology platform"
},
"address": {
"address1": "123 Main St",
"address2": "Suite 100",
"city": "San Francisco",
"state": "CA",
"postalCode": "94105",
"country": "USA"
},
"contact": {
"phone": "+1-415-555-0100",
"email": "[email protected]"
},
"taxInfo": {
"taxId": "12-3456789",
"taxOrgType": "CORPORATION"
}
}'
{
"data": {
"organizationId": "org_123456789",
"updatedAt": "2024-01-22T15:30:00Z"
},
"message": "Organization information updated successfully",
"status": "success"
}
curl -X PATCH 'https://api.weir.ai/org/information' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-H 'x-source: console' \
-d '{
"basicInfo": {
"website": "https://acmecorp.com",
"industry": "TECHNOLOGY",
"companySize": "MEDIUM",
"founded": "2020",
"description": "An innovative technology platform"
},
"address": {
"address1": "123 Main St",
"address2": "Suite 100",
"city": "San Francisco",
"state": "CA",
"postalCode": "94105",
"country": "USA"
},
"contact": {
"phone": "+1-415-555-0100",
"email": "[email protected]"
},
"taxInfo": {
"taxId": "12-3456789",
"taxOrgType": "CORPORATION"
}
}'
{
"data": {
"organizationId": "org_123456789",
"updatedAt": "2024-01-22T15:30:00Z"
},
"message": "Organization information updated successfully",
"status": "success"
}
const updateOrganizationInfo = async (updateData, accessToken) => {
const response = await fetch('https://api.weir.ai/org/information', {
method: 'PATCH',
headers: {
'Authorization': `Bearer ${accessToken}`,
'Content-Type': 'application/json',
'x-source': 'console'
},
body: JSON.stringify(updateData)
});
if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
return await response.json();
};
Was this page helpful?