Create company (admin)
Authorizations
Body
company_namestringOptionalExample:
Green earth blockchain
Responses
200
Successful response
application/json
post
POST /api/company HTTP/1.1
Host: url to be defined
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 41
{
"company_name": "Green earth blockchain"
}
200
Successful response
{
"error": {
"code": "040",
"message": "Company not found"
},
"data": {
"company": {
"company_constants": {
"geis": 0.05
},
"_id": "63c14ed824966f19e853e478",
"company_name": "Green earth blockchain"
}
}
}
The endpoint "/api/company" is used to create a new company. It is a POST request and requires an API key with either "partner" or "admin" access. The request body must be in JSON format and include the name of the company.
The response to a successful request will be a 200 status code with a JSON object. The object includes the company information, including company constants, the company ID, and the company name. In case of an error, the "error" field in the response will contain a code and a message describing the error.
Last updated