Create a company
Creates a company, standalone or under an enterprise.
Set external_ref to find it later by your own reference. Send an
Idempotency-Key so that a retry returns the first response.
integrationKeyAuthorizationBearer <token>Your integration key, sent as Authorization: Bearer nik_<prefix>_<secret>.
Konsol issues it.
Idempotency-Key?stringA unique value per logical request, such as a UUID. Within 24 hours a repeat
with the same key, path and body returns the first response; the same key
with a different path or body is a 409.
1 <= length <= 255application/json- body
Name the enterprise by enterprise_id or enterprise_external_ref, not
both; name neither to create the company at the top of your organisation.
external_ref?ExternalRefYour own reference for a record: any format, compared exactly and case-sensitively. Leading or trailing whitespace is refused rather than trimmed, so a stored reference always matches what was sent.
^\S(.*\S)?$1 <= length <= 128enterprise_id?stringuuidenterprise_external_ref?ExternalRefYour own reference for a record: any format, compared exactly and case-sensitively. Leading or trailing whitespace is refused rather than trimmed, so a stored reference always matches what was sent.
^\S(.*\S)?$1 <= length <= 128name*string1 <= length <= 255status?string"active""active""inactive"business_reg_no?string1 <= length <= 12tax_id_no?string1 <= length <= 64sst_no?string1 <= length <= 64contact?A point of contact. Every field is optional, and a record may come back with none of them.
address?A postal address. Send the whole object or leave it out: line1, city,
postcode, state and country are required whenever an address is sent.
A response returns it exactly as sent.
The created company
application/json- response
id*stringuuidexternal_ref?|nullenterprise_id*|The company's enterprise, or null when it has none.
uuidname*stringstatus*string"active""inactive"business_reg_no?string|nulltax_id_no?string|nullsst_no?string|nullcontact?|nulladdress?|nullcreated_at*stringdate-timeupdated_at*stringdate-timedeleted_at*|When the record was deleted, or null. Lists return deleted records only with include_deleted=true.
date-timecurl -X POST 'https://api.konsol.my/integration/v1/companies' \ -H 'Content-Type: application/json' \ -d '{ "name": "string"}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "external_ref": "ACQ-MBB", "enterprise_id": "2dbe425a-b3bc-4170-8bae-9e5391aafea6", "name": "string", "status": "active", "business_reg_no": "string", "tax_id_no": "string", "sst_no": "string", "contact": { "person": "string", "phone": "string", "email": "user@example.com" }, "address": { "line1": "string", "line2": "string", "city": "string", "postcode": "string", "state": "MY-01", "country": "MY" }, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "deleted_at": "2019-08-24T14:15:22Z"}