Customer Management
This page is auto-generated from cmd/web/routes.go.
Endpoint List
| Method | Path | Handler | Request |
|---|---|---|---|
| Post | /api/modules/create-customer | handlers.Repo.CreateCustomer | CustomerRequest.CustomerCreateRequest |
| Post | /api/modules/create-customer-government-user | handlers.Repo.CreateCustomerGovernmentUser | CustomerRequest.CustomerGovernmentUserCreateRequest |
| Post | /api/modules/create-customer-type | handlers.Repo.CreateCustomerType | CustomerRequest.CustomerTypeCreateRequest |
| Post | /api/modules/delete-customer | handlers.Repo.DeleteCustomer | CustomerRequest.CustomerDeleteRequest |
| Post | /api/modules/delete-customer-type | handlers.Repo.DeleteCustomerType | CustomerRequest.CustomerTypeDeleteRequest |
| Post | /api/modules/list-client-customer | handlers.Repo.ListClientCustomer | requests.ListRequest |
| Post | /api/modules/list-customer | handlers.Repo.ListCustomer | requests.ListRequest |
| Post | /api/modules/list-customer-document-analyze | handlers.Repo.ListCustomerDocumentAnalize | requests.ListRequest |
| Post | /api/modules/list-customer-filter | handlers.Repo.ListCustomerFilter | - |
| Post | /api/modules/list-customer-type | handlers.Repo.ListCustomerType | requests.ListRequest |
| Post | /api/modules/read-customer | handlers.Repo.ReadCustomer | requests.ReadRequest |
| Get | /api/modules/read-customer-government-info | handlers.Repo.ReadCustomerGovernmentInfo | - |
| Post | /api/modules/read-customer-type | handlers.Repo.ReadCustomerType | requests.ReadRequest |
| Post | /api/modules/report-customer-list | handlers.Repo.ReportCustomerList | - |
| Post | /api/modules/update-customer | handlers.Repo.UpdateCustomer | CustomerRequest.CustomerUpdateRequest |
| Post | /api/modules/update-customer-banner | handlers.Repo.UpdateCustomerBannerPhoto | CustomerRequest.CustomerBannerUpdateRequest |
| Post | /api/modules/update-customer-bulk | handlers.Repo.UpdateBulkCustomer | CustomerRequest.CustomerBulkUpdateRequest |
| Post | /api/modules/update-customer-competences | handlers.Repo.CustomerCompetencesUpdate | CustomerRequest.CustomerCompetencesRequest |
| Post | /api/modules/update-customer-logo | handlers.Repo.UpdateCustomerLogo | CustomerRequest.CustomerLogoUpdateRequest |
| Post | /api/modules/update-customer-profile | handlers.Repo.UpdateCustomerProfile | CustomerRequest.CustomerProfileUpdateRequest |
| Post | /api/modules/update-customer-type | handlers.Repo.UpdateCustomerType | CustomerRequest.CustomerTypeUpdateRequest |
Request Example: CustomerRequest.CustomerCreateRequest
{
"logo_file_id": 0,
"customer_name": "string",
"customer_email": "string",
"mobile_phone_area": "string",
"mobile_phone_country": "string",
"mobile_phone": "string",
"customer_phone": "string",
"customer_address": "string",
"province_id": 0,
"district_id": 0,
"country_id": 0,
"post_code": "string",
"tax_office": "string",
"tax_number": "string",
"customer_type": [
0
],
"erp_code": "string",
"coordinates": "string",
"contact_info": "string",
"authorization_code": "string",
"latitude": {},
"longitude": {}
}Fields:
| Field | Type | Required |
|---|---|---|
logo_file_id | int | no |
customer_name | string | yes |
customer_email | string | no |
mobile_phone_area | string | no |
mobile_phone_country | string | no |
mobile_phone | string | no |
customer_phone | string | no |
customer_address | string | yes |
province_id | int | yes |
district_id | int | yes |
country_id | int | yes |
post_code | string | no |
tax_office | string | no |
tax_number | string | no |
customer_type | *[]int | no |
erp_code | string | no |
coordinates | *string | no |
contact_info | *string | no |
authorization_code | *string | no |
latitude | *float64 | no |
longitude | *float64 | no |
Request Example: CustomerRequest.CustomerGovernmentUserCreateRequest
{
"tax_number": "string",
"citizen_number": "string",
"password": "string"
}Fields:
| Field | Type | Required |
|---|---|---|
tax_number | string | no |
citizen_number | string | no |
password | string | no |
Request Example: CustomerRequest.CustomerTypeCreateRequest
{
"translation": {}
}Fields:
| Field | Type | Required |
|---|---|---|
translation | []Translation | no |
Request Example: CustomerRequest.CustomerDeleteRequest
{
"customer_id": 0
}Fields:
| Field | Type | Required |
|---|---|---|
customer_id | int64 | yes |
Request Example: CustomerRequest.CustomerTypeDeleteRequest
{
"id": 0
}Fields:
| Field | Type | Required |
|---|---|---|
id | int | yes |
Request Example: requests.ListRequest
{
"per_page": 0,
"page": 0,
"sort_column": "string",
"sort_order": "string"
}Fields:
| Field | Type | Required |
|---|---|---|
per_page | int | yes |
page | int | yes |
sort_column | string | no |
sort_order | string | no |
Request Example: requests.ReadRequest
{
"id": 0
}Fields:
| Field | Type | Required |
|---|---|---|
id | int | yes |
Request Example: CustomerRequest.CustomerUpdateRequest
{
"id": 0,
"customer_type": [
0
],
"logo_file_id": 0,
"country_id": 0,
"post_code": "string",
"province_id": 0,
"district_id": 0,
"customer_name": "string",
"customer_address": "string",
"tax_number": "string",
"tax_office": "string",
"telephone": "string",
"mobile_phone_area": "string",
"mobile_phone_country": "string",
"mobile_phone": "string",
"email": "string",
"fax": "string",
"coordinates": "string",
"web_site": "string",
"erp_code": "string",
"contact_info": "string",
"authorization_code": "string",
"latitude": {},
"longitude": {}
}Fields:
| Field | Type | Required |
|---|---|---|
id | int64 | yes |
customer_type | *[]int | no |
logo_file_id | *int | no |
country_id | *int | no |
post_code | *string | no |
province_id | *int | no |
district_id | *int | no |
customer_name | string | yes |
customer_address | *string | no |
tax_number | *string | no |
tax_office | *string | no |
telephone | *string | no |
mobile_phone_area | *string | no |
mobile_phone_country | *string | no |
mobile_phone | *string | no |
email | *string | no |
fax | *string | no |
coordinates | *string | no |
web_site | *string | no |
erp_code | *string | no |
contact_info | *string | no |
authorization_code | *string | no |
latitude | *float64 | no |
longitude | *float64 | no |
Request Example: CustomerRequest.CustomerBannerUpdateRequest
{
"banner_file_id": 0
}Fields:
| Field | Type | Required |
|---|---|---|
banner_file_id | *int64 | yes |
Request Example: CustomerRequest.CustomerBulkUpdateRequest
{
"ids": [
0
],
"update_type": "string",
"customer_type": [
0
]
}Fields:
| Field | Type | Required |
|---|---|---|
ids | []int64 | yes |
update_type | string | yes |
customer_type | []int | yes |
Request Example: CustomerRequest.CustomerCompetencesRequest
{
"competences": [
0
],
"customer_id": 0
}Fields:
| Field | Type | Required |
|---|---|---|
competences | *[]int | no |
customer_id | int64 | no |
Request Example: CustomerRequest.CustomerLogoUpdateRequest
{
"logo_file_id": 0
}Fields:
| Field | Type | Required |
|---|---|---|
logo_file_id | *int64 | yes |
Request Example: CustomerRequest.CustomerProfileUpdateRequest
{
"country_id": 0,
"province_id": 0,
"district_id": 0,
"post_code": "string",
"customer_name": "string",
"customer_address": "string",
"tax_number": "string",
"tax_office": "string",
"telephone": "string",
"mobile_phone": "string",
"mobile_phone_area": "string",
"mobile_phone_country": "string",
"email": "string",
"fax": "string",
"coordinates": "string",
"web_site": "string",
"erp_code": "string",
"logo_file_id": 0,
"customer_type": [
0
],
"contact_info": "string",
"authorization_code": "string",
"mini_description": "string",
"description": "string",
"latitude": {},
"longitude": {},
"banner_file_id": 0
}Fields:
| Field | Type | Required |
|---|---|---|
country_id | *int64 | no |
province_id | *int64 | no |
district_id | *int64 | no |
post_code | *string | no |
customer_name | *string | no |
customer_address | *string | no |
tax_number | *string | no |
tax_office | *string | no |
telephone | *string | no |
mobile_phone | *string | no |
mobile_phone_area | *string | no |
mobile_phone_country | *string | no |
email | *string | no |
fax | *string | no |
coordinates | *string | no |
web_site | *string | no |
erp_code | *string | no |
logo_file_id | *int64 | no |
customer_type | *[]int | no |
contact_info | *string | no |
authorization_code | *string | no |
mini_description | *string | no |
description | *string | no |
latitude | *float64 | no |
longitude | *float64 | no |
banner_file_id | *int64 | no |
Request Example: CustomerRequest.CustomerTypeUpdateRequest
{
"id": 0,
"translation": {}
}Fields:
| Field | Type | Required |
|---|---|---|
id | int64 | yes |
translation | []UpdateTranslation | no |
Response Examples
Create:
{
"status": "succeeded",
"message": "record created successfully",
"id": 1
}Delete:
{
"status": "succeeded",
"message": "deleted successfully"
}List:
{
"status": "succeeded",
"data": [ ],
"totalPage": 1,
"currentPage": 1,
"perPage": 10
}Read:
{
"status": "succeeded",
"data": { }
}Update:
{
"status": "succeeded",
"message": "updated successfully"
}Error (example):
{
"status": "invalid_request",
"message": "validation failed",
"errors": [ ]
}Last updated on