Help Page Home - Company
POST Company
Insert a company.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
WsAccessKey | The Web Service access key for this user and file which allows access to the API for the associated file (found in File - Settings). Using OAuth authentication mechanism is the preferred method to allow API access. | string |
Optional. Legacy authentication method and only required if not using OAuth. OAuth is preferred. |
FileId | Specifies the file id of the file to perform the operation upon. | integer |
Required |
Body Parameters
Company details.
CompanyDetailName | Description | Type | Additional information |
---|---|---|---|
Id | The unique key/Id of the company. | integer |
None. |
Name | Name of the company. | string |
None. |
Abn | Company ABN. | string |
None. |
Website | Url of the company website. | string |
None. |
LastUpdatedId | Identifier used for concurrency checking. Required for update. | string |
None. |
LongDescription | Description of the company. | string |
None. |
LogoUrl | Url of the company logo. Note: This field is not supported and will be removed in a future version. | string |
None. |
TradingName | Company trading name. | string |
None. |
CompanyEmail | Company email address. | string |
None. |
LastModifiedDateUtc | Date and time that the company data was last modified in UTC. | date |
None. |
CreatedDateUtc | Date and time that the company was created in UTC. | date |
None. |
LastModifiedByUserId | The user id that last modified the company data. | integer |
None. |
_links | Hypermedia links. Contains contextual links to possible next actions related to this resource. Only present in responses. This data is not to be sent to the server. | Collection of Link |
None. |
Request Formats
application/json, text/json
Sample:
{ "Id": 1, "Name": "MakeMoney Inc.", "Abn": "53004085616", "Website": "https://makemoney.org", "LastUpdatedId": "AAAAAAKbc=", "LongDescription": "A test company", "LogoUrl": null, "TradingName": "MakeMoney Inc", "CompanyEmail": "bigboss@somecompany.com", "LastModifiedDateUtc": "2024-10-12T18:00:06.8949485Z", "CreatedDateUtc": "2024-10-03T18:00:06.8949485Z", "LastModifiedByUserId": 321, "_links": [] }
application/xml, text/xml
Sample:
<CompanyDetail xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <_links /> <Id>1</Id> <Name>MakeMoney Inc.</Name> <Abn>53004085616</Abn> <Website>https://makemoney.org</Website> <LastUpdatedId>AAAAAAKbc=</LastUpdatedId> <LongDescription>A test company</LongDescription> <TradingName>MakeMoney Inc</TradingName> <CompanyEmail>bigboss@somecompany.com</CompanyEmail> <LastModifiedDateUtc>2024-10-12T18:00:06.8949485Z</LastModifiedDateUtc> <CreatedDateUtc>2024-10-03T18:00:06.8949485Z</CreatedDateUtc> <LastModifiedByUserId>321</LastModifiedByUserId> </CompanyDetail>
Response Information
Resource Description
InsertCompanyResultName | Description | Type | Additional information |
---|---|---|---|
InsertedCompanyId | The id of the newly created/inserted company. | integer |
None. |
LastUpdatedId | The unique id associated with this insert. This value is required to be passed in on subsequent updates to prevent concurrency errors. | string |
None. |
LastModified | The date and time this resource was modified in UTC. | date |
None. |
_links | Hypermedia links. Contains contextual links to possible next actions related to this resource. Only present in responses. This data is not to be sent to the server. | Collection of Link |
None. |
Response Formats
application/json, text/json
Sample:
{ "InsertedCompanyId": 123, "LastUpdatedId": "AAAAAFwWAN8=", "LastModified": "2024-10-13T18:00:06.9401263Z", "_links": [ { "rel": "self", "href": "https://api.saasu.com/Company/123?FileId=123", "method": "POST", "title": null }, { "rel": "list", "href": "https://api.saasu.com/Companies?FileId=123", "method": "GET", "title": null }, { "rel": "update", "href": "https://api.saasu.com/Company/123?FileId=123", "method": "PUT", "title": null }, { "rel": "delete", "href": "https://api.saasu.com/Company/123?FileId=123", "method": "DELETE", "title": null } ] }
application/xml, text/xml
Sample:
<InsertCompanyResult xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <_links> <Link> <rel>self</rel> <href>https://api.saasu.com/Company/123?FileId=123</href> <method>POST</method> </Link> <Link> <rel>list</rel> <href>https://api.saasu.com/Companies?FileId=123</href> <method>GET</method> </Link> <Link> <rel>update</rel> <href>https://api.saasu.com/Company/123?FileId=123</href> <method>PUT</method> </Link> <Link> <rel>delete</rel> <href>https://api.saasu.com/Company/123?FileId=123</href> <method>DELETE</method> </Link> </_links> <InsertedCompanyId>123</InsertedCompanyId> <LastUpdatedId>AAAAAFwWAN8=</LastUpdatedId> <LastModified>2024-10-13T18:00:06.9401263Z</LastModified> </InsertCompanyResult>