Create Business


Create Business

The Create Business API provides a method to create a new business.


Request and Headers

curl --location --request POST 'https://core.getfaceage.com/api/v1/business?site=https://www.ypur_domain_url&name=your_business_name&country=22&business_size=small' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer your_secret_key'

Query Parameters

site :

This field is required and unique. It is your domain url.

Type: string

name :

This field is required. It is your business name.

Type: string

country :

This field is required. you can find it through calling Get Countries API and the value is 'value' in the response object.

Type: integer

business_size :

This field is required and value should be one of these values: small, medium, large, very_large.

Type: string


Response

Upon successful creation, the endpoint returns a JSON object with the newly created business details, including its unique identifier (id), your unique token,and etc.

{success} Response 200

{
    "status": true,
    "data": {
        "user_id": 25659,
        "name": "My Beauty Business",
        "main_domain": "mybeauty.com",
        "site": "https://www.mybeauty.com",
        "country_id": "22",
        "business_size": "small",
        "token": "NZdYQbh2Z9dg379NoL0H",
        "updated_at": "2024-03-12T07:39:25.000000Z",
        "created_at": "2024-03-12T07:39:25.000000Z",
        "id": 8646778
    }
}


{warning} Response 401 : Unauthorized

{
    "message": "Unauthenticated."
}


{warning} Response 422 : Duplication domain error

{
    "message": "The domain must be unique.",
    "errors": {
        "site": [
            "The domain must be unique."
        ]
    }
}