1. Home
  2. Docs
  3. Documentation
  4. Contacts APIs – V1
  5. API: Entity Create

API: Entity Create

The purpose of this API is to Create an entity.

Request

URL
https://your_account.modulus.biz/api/cnt/entity?token=YOUR_TOKEN
API Name
entity
Method
POST
Source
Third Party Server
Recipient
modulus® Server
Content Type
application/json

Query String Parameters

Parameter
Required
Type
Description
token
Yes
Text
Your authentication token.

Payload Parameters

Parameter
Required
Type
Description
code
Yes
Text
Entity code
name
Yes
Text
Entity name
type
Yes
Text
Possible values: individual, organization.
tag
No
Array
Possible values: customer, supplier, lead.
address
No
Object
Attach the address to this entity.
contact
No
Object
Attach the contact to this entity.

Address parameter details

Parameter
Required
Type
Description
Label
Yes
Text
Address label up to 255 character.
country_code
Yes
Text
Up to 3 character string.
city
Yes
Text
Name of the city inside the country.
address
Yes
Text
Full address string.

Contact parameter details

Parameter
Required
Type
Description
type
Yes
Text
possible values: mobile, phone, email, fax, website, other.
label
Yes
Text
Contact label up to 255 character.
value
Yes
Text
Contact value up to 255 character.

Responses

HTTP Status
result
title
message
object
Success Responses
200 OK
true
Success
Entity created successfully.
 
Failure Responses
500 Internal Server Error
false
Error
Error message describe the problem.
 

Example

Request
curl --request POST 'https://your_account.modulus.biz/api/cnt/entity?token=YOUR_TOKEN' \ --header 'Content-Type: application/json' \
--data '{
    "code":"c1",
    "name":"api_entity",
    "type":"individual",
    "tag":"lead",
    "address":{
        "label":"home",
        "country_code":"eg",
        "city":"moqattam",
        "address":"street 123"
    },
    "contact":{
        "type":"mobile",
        "label":"iphone",
        "value":"123123123"
    }
}'
200 OK
{ "result": true, "title": "Success", "message": "Entity created successfully."}