Create Agent Identity
POST/v2/agents
An endpoint to create company’s user (Agent) in Flip.
Request
Header Parameters
Request content type application/x-www-form-urlencoded.
- application/x-www-form-urlencoded
Body
required
Agent’s full name.
Possible values: [ktp, passport]
Type of identity.
Identity number based on the type chosen.
Agent’s birth date. DD-MM-YYYY format
Agent’s birth place.
Agent’s country code based on the identity chosen. Available values can be retrieved from the country list API here
Agent’s province code based on the identity chosen. Available values can be retrieved from the province list API here.
Agent’s city code based on the identity chosen. Available values can be retrieved from the city list API here.
Agent’s district code based on the identity chosen. Available values can be retrieved from the district list API here.
Agent’s address based on the identity chosen.
Possible values: [male, female]
Agent’s gender.
Possible values: [housewife, entrepreneur, private_employee, government_employee, foundation_board, indonesian_migrant_worker, company, others]
Agent’s job.
Agent’s phone number. It must be the one that has been verified by the company.
Possible values: [0, 1]
A flag to set if the current residential address of the Agent is the same as the identity address. 0 is false, 1 is true.
Agent’s current residential address country code. Available values can be retrieved from the country list API here.
Agent’s current residential address province code. Available values can be retrieved from the province list API here.
Agent’s current residential address city code. Available values can be retrieved from the city list API here.
Agent’s current residential address district code. Available values can be retrieved from the district list API here.
Agent’s current residential address.
Agent’s email.
Responses
- 200
- 401
- 422
Expected Response
- application/json; charset=UTF-8
- Schema
- Example (from schema)
Schema
Possible values: [ktp, passport]
Possible values: [male, female]
{
"id": 10,
"company_id": 20,
"name": "John Doe",
"identity_type": "ktp",
"identity_number": "1234567890123456",
"birth_place": "Kota Depok",
"birth_date": "31-10-1990",
"gender": "male",
"country_id": 1,
"country_name": "Indonesia",
"province_id": 12,
"province_name": "Jawa Barat",
"city_id": 12,
"city_name": "Kota Depok",
"district_id": 1234,
"district_name": "Sukmajaya",
"address": "Jalan Margonda Raya",
"residence_country_id": 1,
"residence_country_name": "Indonesia",
"residence_province_id": 12,
"residence_province_name": "Jawa Barat",
"residence_city_id": 128,
"residence_city_name": "Kota Depok",
"residence_district_id": 1234,
"residence_district_name": "Sukmajaya",
"residence_address": "Jalan Margonda Raya",
"occupation": "entrepreneur",
"phone_number": "+628123456789",
"email": "example@mail.com",
"kyc_status": "BASIC_DATA"
}
Sample response when Your Flip api secret key value for Authorization is missing or invalid
- application/json; charset=UTF-8
- Schema
- Example (from schema)
Schema
{
"name": "Unauthorized",
"message": "Your request was made with invalid credentials.",
"status": 401
}
Sample error response
- application/json; charset=UTF-8
- Schema
- Example (from schema)
- Mising Required Fields
- Mising identity_type Field
- Mising identity_number Field
- Mising birth_place Field
- Mising country_id Field
- Mising province_id Field
- Mising city_id Field
- Mising district_id Field
- Mising address Field
- Mising gender Field
- Mising occupation Field
- Mising phone_number Field
Schema
Array [
]
errors
object[]
{
"code": "VALIDATION_ERROR",
"errors": [
{
"attribute": "name",
"code": 1001,
"message": "name cannot be empty"
}
]
}
{
"code": "VALIDATION_ERROR",
"errors": [
{
"attribute": "identity_type",
"code": 1001,
"message": "identity_type cannot be empty"
},
{
"attribute": "identity_number",
"code": 1001,
"message": "identity_number cannot be empty"
},
{
"attribute": "birth_place",
"code": 1001,
"message": "birth_place cannot be empty"
},
{
"attribute": "country_id",
"code": 1001,
"message": "country_id cannot be empty"
},
{
"attribute": "province_id",
"code": 1001,
"message": "province_id cannot be empty"
},
{
"attribute": "city_id",
"code": 1001,
"message": "city_id cannot be empty"
},
{
"attribute": "district_id",
"code": 1001,
"message": "district_id cannot be empty"
},
{
"attribute": "address",
"code": 1001,
"message": "address cannot be empty"
},
{
"attribute": "gender",
"code": 1001,
"message": "gender cannot be empty"
},
{
"attribute": "occupation",
"code": 1001,
"message": "occupation cannot be empty"
},
{
"attribute": "phone_number",
"code": 1001,
"message": "phone_number cannot be empty"
}
]
}
{
"code": "VALIDATION_ERROR",
"errors": [
{
"attribute": "identity_type",
"code": 1001,
"message": "identity_type cannot be empty"
}
]
}
{
"code": "VALIDATION_ERROR",
"errors": [
{
"attribute": "identity_number",
"code": 1001,
"message": "identity_number cannot be empty"
}
]
}
{
"code": "VALIDATION_ERROR",
"errors": [
{
"attribute": "birth_place",
"code": 1001,
"message": "birth_place cannot be empty"
}
]
}
{
"code": "VALIDATION_ERROR",
"errors": [
{
"attribute": "country_id",
"code": 1001,
"message": "country_id cannot be empty"
}
]
}
{
"code": "VALIDATION_ERROR",
"errors": [
{
"attribute": "province_id",
"code": 1001,
"message": "province_id cannot be empty"
}
]
}
{
"code": "VALIDATION_ERROR",
"errors": [
{
"attribute": "city_id",
"code": 1001,
"message": "city_id cannot be empty"
}
]
}
{
"code": "VALIDATION_ERROR",
"errors": [
{
"attribute": "district_id",
"code": 1001,
"message": "district_id cannot be empty"
}
]
}
{
"code": "VALIDATION_ERROR",
"errors": [
{
"attribute": "address",
"code": 1001,
"message": "address cannot be empty"
}
]
}
{
"code": "VALIDATION_ERROR",
"errors": [
{
"attribute": "gender",
"code": 1001,
"message": "gender cannot be empty"
}
]
}
{
"code": "VALIDATION_ERROR",
"errors": [
{
"attribute": "occupation",
"code": 1001,
"message": "occupation cannot be empty"
}
]
}
{
"code": "VALIDATION_ERROR",
"errors": [
{
"attribute": "phone_number",
"code": 1001,
"message": "phone_number cannot be empty"
}
]
}