Temporary Company Name
Creating a company with a temporary “dummy” name to be replaced after synchronisation.
1. Request Company creation
POST: /companies
Example body:
{
"name": "Dummy name",
"platformType": "xero"
}
Instead of pushing the company name you can push a “dummy” name. If using this method it is suggested you still use a meaningful identifier (e.g. session time or unique id) you can easily refer to at a later date.
2. Create Company
The key fields remain the same as the main workflow. From POST /companies the company id which id the unique company identifier throughout the flow and the redirect url.
3. Pull data from Codat
Once the synchronisation is successful you will want to access the Company name in the accounting platform. You have the option of companyName and/or companyLegalName.
GET: /companies/{companyId}/data/info
Example response:
{
"companyName": "Sandbox Company_US_1",
"accountingPlatformRef": "123146221125654",
"companyLegalName": "Sandbox Company_US_1",
…
}
4. Replace company name
Example body:
{ "name": "Sandbox Company_US_1" }