Create Agency F10

# 1. Tổng quan

  • Action URL: /api/vi/agencies
  • Đặc tả chi tiết: Swagger Link (opens new window)
  • Mô tả: Tính năng này cho phép tạo mới một agency F10. Chỉ F1 agency mới có quyền tạo agency F10.

# 2. Hướng dẫn

  • Bước 1: Thực hiện xây dựng request và POST tới API action URL.
  • Bước 2: Nhận về response.

# 3. Parameters

# Bảng mô tả Parameters

Thuộc tính Bắt buộc Kiểu dữ liệu Mô tả
x-api-token Có String Token API (F1)
x-api-password Có String Mật khẩu API (F1)
x-api-account Có String Tài khoản API (F1)

# 4. Request Body

# 4.1 Ví dụ Request Body

{
  "companyName": "string",
  "contactEmail": "string",
  "contactPhone": "string",
  "address": "string",
  "agencyCredit": "string",
  "balenceAmount": 0,
  "balenceLimit": 0,
  "industry": "string",
  "agencyType": "string",
  "notes": "string",
  "firstName": "string",
  "lastName": "string"
}

# 4.2 Bảng mô tả Request Body

Thuộc tính Bắt buộc Kiểu dữ liệu Mô tả Ví dụ
companyName Có string Tên công ty Agency XYZ
contactEmail Có string Email liên hệ contact@agencyxyz.com
contactPhone Có string Số điện thoại liên hệ (+84) +84987654321
address Có string Địa chỉ 123 Đường ABC, Quận XYZ, TP.HCM
agencyCredit Có string Tín dụng agency limit
balenceAmount Có number Số dư agency 10000
balenceLimit Có number Giới hạn số dư agency 0
industry Có string Ngành nghề Travel
agencyType Có string Loại agency F10
notes Có string Ghi chú Agency mới tạo
firstName Có string Họ Nguyễn
lastName Có string Tên Văn A

# 5. Responses

# 5.1 Ví dụ Responses

{
  "StatusCode": 201,
  "Timestamp": "2:29:08 AM",
  "Path": "/api/v1/agencies",
  "Message": "Tạo mới agency F10 thành công",
  "Data": {
    "Agency": {
      "id": "094051d1-21bd-45c4-826f-0b5d0546bf84",
      "companyName": "Agency 001",
      "contactEmail": "agency01@gmail.com",
      "contactPhone": "+84987600001",
      "apiAccount": "...",
      "apiPassword": "...",
      "apiToken": "...",
      "address": "123 Đường ABC, Quận XYZ, TP.HCM",
      "notes": "Agency mới tạo",
      "agencyType": "F10",
      "firstName": "Nguyễn",
      "lastName": "Văn A",
      "isActive": true,
      "tier": "premium",
      "defaultLanguage": "VI",
      "defaultCurrency": "VND",
      "subscriptionId": null,
      "balenceAmount": "10000.00",
      "balenceLimit": "0.00",
      "industry": "Travel",
      "agencyCredit": "limit",
      "parentAgencyId": "...",
      "createdAt": "2025-10-16T02:29:08.320Z",
      "updatedAt": "2025-10-16T02:29:08.322Z"
    },
    "Credentials": {
      "apiAccount": "...",
      "apiPassword": "...",
      "apiToken": "..."
    }
  },
  "Errors": null,
  "RequestId": "req_1760581747622_uyg66pbvv",
  "TotalDuration": 1017
}

# 5.2 Bảng mô tả Responses

Thuộc tính Kiểu dữ liệu Mô tả Ví dụ
id* string ID của agency 12345
companyName* string Tên công ty Agency XYZ
contactEmail* string Email liên hệ contact@agencyxyz.com
contactPhone* string Số điện thoại liên hệ (+84) +84987654321
apiAccount* string Tài khoản API api_account
apiPassword* string Mật khẩu API api_password
apiToken* string Token API api_token
address* string Địa chỉ 123 Đường ABC, Quận XYZ, TP.HCM
notes* string Ghi chú Agency mới tạo
contactId* string ID liên hệ 12345
agencyType* string Loại agency. Giá trị hợp lệ: F1, F10 F1
firstName* string Họ Nguyễn
lastName* string Tên Văn A
isActive* boolean Trạng thái hoạt động true
tier* string Cấp độ agency (basic, standard, premium, enterprise) basic
defaultLanguage* string Ngôn ngữ mặc định VI
defaultCurrency* string Tiền tệ mặc định VND
subscriptionId string ID của subscription đang sử dụng uuid-string
balenceAmount number Số dư agency 10000
balenceLimit number Giới hạn số dư agency 0
industry string Ngành nghề Travel
agencyCredit string Tín dụng agency limit
parentAgencyId string ID của agency cha 12345
subscription object Thông tin subscription đang sử dụng { description: ... }
avatarUrl string URL ảnh đại diện agency https://example.com/avatar.jpg (opens new window)
coverUrl string URL ảnh bìa agency https://example.com/cover.jpg (opens new window)
createdAt* string (date-time) Ngày tạo 2023-01-01T00:00:00.000Z
updatedAt* string (date-time) Ngày cập nhật 2023-01-02T00:00:00.000Z

This site uses cookies to learn which topics interest our readers.