Create a company
To create a company using the Spire API simply send a PUT request with the details of the company that you wish to create populated in the following JSON object. Make sure to include all of the fields listed below, or an error could be returned instead.
{ "companyName":"testCompany", "description":"This is a test Company", "address" : { "address":"123 Fake Street", "countryCode": "CAN" }, "businessNo": "123456", "yearEnd": "12-31-2022" }
Then send a PUT request to the company code endpoint that you wish to create. For example in the following request we will be creating a new company with code testCo, which can be seen in the URL that we created for this new company.
To confirm that our new company record was created successfully, the server responds with a 201 Created Message
And then sending a GET request to the expected new company’s endpoint, we get the expected response which is the data object for a valid company.