Skip to main content

Overview

The Supplier API provides comprehensive endpoints for managing business partners including suppliers/vendors, customers, and members. It handles contact information, financial relationships, and permissions.

Supplier Management

Get Supplier Info

Retrieve detailed information about a specific supplier by ID.
GET /supplier/info?id={id}
id
Long
required
The unique identifier of the supplier
code
integer
Response status code (200 for success)
data
object

List Suppliers

Retrieve a paginated list of suppliers with optional search filters.
GET /supplier/list?search={search}
JSON string containing search parameters:
  • supplier: Supplier name filter
  • type: Type filter (供应商/客户/会员)
  • contacts: Contact person filter
  • phonenum: Phone number filter
  • telephone: Telephone filter

Create Supplier

Create a new supplier, customer, or member.
POST /supplier/add
supplier
string
required
Supplier/Company name
type
string
required
Type: “供应商” (Vendor), “客户” (Customer), or “会员” (Member)
contacts
string
Contact person name
phoneNum
string
Mobile phone number
telephone
string
Landline telephone
email
string
Email address
address
string
Physical address
taxNum
string
Tax registration number
bankName
string
Bank name
accountNumber
string
Bank account number
enabled
boolean
Enable status (default: true)
curl -X POST "http://localhost:9999/jshERP-boot/supplier/add" \
  -H "Content-Type: application/json" \
  -d '{
    "supplier": "ABC Trading Co.",
    "type": "供应商",
    "contacts": "John Smith",
    "phoneNum": "13800138000",
    "email": "[email protected]",
    "address": "123 Business St, Shanghai",
    "enabled": true
  }'

Update Supplier

Update an existing supplier’s information.
PUT /supplier/update
id
Long
required
Supplier ID to update
supplier
string
Updated supplier name
contacts
string
Updated contact person
phoneNum
string
Updated phone number

Delete Supplier

Delete a supplier by ID.
DELETE /supplier/delete?id={id}
id
Long
required
Supplier ID to delete

Batch Delete Suppliers

Delete multiple suppliers at once.
DELETE /supplier/deleteBatch?ids={ids}
ids
string
required
Comma-separated supplier IDs (e.g., “1,2,3”)

Batch Set Status

Enable or disable multiple suppliers at once.
POST /supplier/batchSetStatus
status
boolean
required
true to enable, false to disable
ids
string
required
Comma-separated supplier IDs

Supplier Selection

Find Customers by Select

Search for customers (type=“客户”) for dropdown selection.
POST /supplier/findBySelect_cus
key
string
Search keyword
organId
Long
Filter by organization ID
limit
integer
Maximum number of results
data
array
curl -X POST "http://localhost:9999/jshERP-boot/supplier/findBySelect_cus" \
  -H "Content-Type: application/json" \
  -d '{
    "key": "ABC",
    "limit": 20
  }'

Find Suppliers by Select

Search for suppliers/vendors (type=“供应商”) for dropdown selection.
POST /supplier/findBySelect_sup
key
string
Search keyword
organId
Long
Filter by organization ID
limit
integer
Maximum number of results

Find Organizations by Select

Search for all business partners (both suppliers and customers).
POST /supplier/findBySelect_organ
key
string
Search keyword
organId
Long
Filter by specific organization
limit
integer
Maximum number of results
data
array

Find Members by Select

Search for members (type=“会员”) for retail operations.
POST /supplier/findBySelect_retail
key
string
Search keyword
organId
Long
Filter by organization ID
limit
integer
Maximum number of results
data
array

Validation

Check Name Exists

Check if a supplier name already exists.
GET /supplier/checkIsNameExist
id
Long
required
Supplier ID (use 0 for new supplier)
name
string
required
Supplier name to check
code
integer
Response status code
data
object
status
boolean
true if name exists, false otherwise

Check Name and Type Exist

Check if a supplier name exists with a specific type.
GET /supplier/checkIsNameAndTypeExist
id
Long
required
Supplier ID (use 0 for new)
name
string
required
Supplier name
type
string
required
Supplier type (供应商/客户/会员)

Financial Information

Get Begin Need by Organization

Get beginning balance and financial information for a supplier/customer.
GET /supplier/getBeginNeedByOrganId?organId={organId}
organId
Long
required
Organization/Supplier ID
code
integer
Response status code
data
object

Batch Set Advance In

Recalculate advance payment balances for members.
POST /supplier/batchSetAdvanceIn
ids
string
required
Comma-separated member IDs

Customer Permissions

Get All Customers

Get list of all customers (for permission management).
GET /supplier/getAllCustomer
rows
array

Get User Customer Value

Get customer IDs accessible by a user.
GET /supplier/getUserCustomerValue
UBType
string
required
User business type (e.g., “UserCustomer”)
UBKeyId
string
required
User ID
code
integer
Response status code
data
array
Array of customer IDs accessible by the user

Import & Export

Import Vendors

Import vendor data from Excel file.
POST /supplier/importVendor
file
file
required
Excel file containing vendor data
code
integer
Response status code (200 for success)
data
string
Import result message
curl -X POST "http://localhost:9999/jshERP-boot/supplier/importVendor" \
  -F "[email protected]"

Import Customers

Import customer data from Excel file.
POST /supplier/importCustomer
file
file
required
Excel file containing customer data

Import Members

Import member data from Excel file.
POST /supplier/importMember
file
file
required
Excel file containing member data

Export Excel

Export supplier data to Excel file.
GET /supplier/exportExcel
supplier
string
Supplier name filter
type
string
required
Type filter (供应商/客户/会员)
phonenum
string
Phone number filter
telephone
string
Telephone filter

Lookup by Name

Get Info by Name

Retrieve supplier information by name and type.
GET /supplier/getInfoByName
name
string
required
Supplier name
type
string
required
Supplier type (供应商/客户/会员)
code
integer
Response status code
data
object
info
object
Complete supplier object

Build docs developers (and LLMs) love