# Sổ địa chỉ - Doanh nghiệp - Sửa hoá đơn
# Get All Invoice Address of Customer - Done
Sử dụng API này để lất tất cả danh sách địa chỉ xuất hóa đơn của khách hàng, khi khách hàng đã đăng nhập
# Endpoint
# Parameters
Name | Type | Description | Required |
---|
# Response
{
"status": true,
"messageCode": "",
"messageContent": "",
"data": {
"totalCnt": 1,
"items": [
{
"id": 1,
"customerId": 1,
"companyName": "EI Cty",
"taxCode": "code1234456",
"email": "linh05029708@gmail.com",
"phone": "0971785208",
"province": "2",
"district": "2",
"ward": "2",
"address": "123 tân thạnh đông",
"isDefault": true,
"createdAt": "2021-07-21T02:56:55.071Z",
"updatedAt": "2021-07-21T02:59:12.098Z",
"createdBy": 1,
"updatedBy": 1,
"deleted": false
}
]
}
}
curl -X POST http://localhost:3000/customerInvoiceAddress/ei/getList \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <const name="MOCK_TOKEN" />' \
--data '{}'
# Add New Invoice Address of Customer - Done
Sử dụng API này để khách hàng thêm địa chỉ xuất hóa đơn khi khách hàng đã đăng nhập
# Endpoint
# Parameters
Name | Type | Description | Required |
---|---|---|---|
companyName | String | ➖ | |
taxCode | String | ma thue | ✔️ |
String | ✔️ | ||
phone | String | ✔️ | |
province | Number | ➖ | |
district | Number | ➖ | |
ward | Number | ➖ | |
isDefault | boolean | ➖ |
# Response
{
"status": true,
"messageCode": "",
"messageContent": "",
"data": {
"items": {
"createdAt": {
"val": "CURRENT_TIMESTAMP(3)"
},
"updatedAt": {
"val": "CURRENT_TIMESTAMP(3)"
},
"isDefault": false,
"deleted": false,
"id": 1,
"customerId": 1,
"companyName": "EI",
"taxCode": "code123456",
"email": "linh050297@gmail.com",
"phone": "0971785209",
"province": "1",
"district": "1",
"ward": "1",
"address": "123 tân thạnh đông",
"createdBy": 1
}
}
}
curl -X POST http://localhost:3000/customerInvoiceAddress/ei/add \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <const name="MOCK_TOKEN" />' \
--data '{
"companyName":"EI",
"taxCode":"code123456",
"email":"linh050297@gmail.com",
"phone":"0971785209",
"province":"1",
"district":"1",
"ward":"1",
"address":"123 tân thạnh đông",
"isDefault":"false"
}'
# Edit Invoice Address of Customer - Done
Sử dụng API này để khách hàng chỉnh sửa thông tin địa chỉ xuất hóa đơn, khi khách hàng đã đăng nhập
# Endpoint
# Parameters
Name | Type | Description | Required |
---|---|---|---|
addressId | Number | ✔️ | |
companyName | String | ➖ | |
taxCode | String | ma thue | ➖ |
String | ➖ | ||
phone | String | ➖ | |
province | Number | ➖ | |
district | Number | ➖ | |
ward | Number | ➖ | |
isDefault | boolean | ➖ |
# Response
{
"status": true,
"messageCode": "",
"messageName": "",
"data": {
"items": {
"id": 1,
"customerId": 1,
"companyName": "EI Cty",
"receiverName": "Example Name",
"email": "example@gmail.com",
"phone": "0971234567",
"province": 2,
"district": 2,
"ward": 2,
"createdAt": "2021-07-16T06:45:46.821Z",
"updatedAt": {
"val": "CURRENT_TIMESTAMP(3)"
},
"createdBy": 1,
"updatedBy": 1,
"deleted": false
}
}
}
curl -X POST http://localhost:3000/customerInvoiceAddress/ei/update \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <const name="MOCK_TOKEN" />' \
--data '{
"addressId":"1",
"companyName":"EI",
"taxCode":"code1234456",
"email":"linh05029708@gmail.com",
"phone":"0971785208",
"province":"2",
"district":"2",
"ward":"2",
"isDefault":"true"
}'
# Delete Invoice Address of Customer - Done
Sử dụng API này để khách hàng xóa thông tin địa chỉ xuất hóa đơn, khi khách hàng đã đăng nhập
# Endpoint
# Parameters
Name | Type | Description | Required |
---|---|---|---|
addressId | Number | ✔️ |
# Response
{
"status": true,
"messageCode": "",
"messageContent": "",
"data": {
"items": {
"id": 1,
"customerId": 1,
"companyName": "EI Cty",
"taxCode": "code1234456",
"email": "linh05029708@gmail.com",
"phone": "0971785208",
"province": "2",
"district": "2",
"ward": "2",
"address": "123 tân thạnh đông",
"isDefault": true,
"createdAt": "2021-07-21T02:56:55.071Z",
"updatedAt": {
"val": "CURRENT_TIMESTAMP(3)"
},
"createdBy": 1,
"updatedBy": 1,
"deleted": true
}
}
}
curl -X POST http://localhost:3000/customerInvoiceAddress/ei/delete \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <const name="MOCK_TOKEN" />' \
--data '{
"addressId":"1"
}'