跳到主要内容

Mesh API

Overview​

The Mesh API provides utility services including email verification, file upload, SMS sending, translation, barcode generation, address verification, UPC barcode management, and currency exchange services.

Base Endpoint: /mesh

API Endpoints​

1. Email Verification​

Verify email address format and deliverability.

Endpoint: POST /mesh/emailcheck

Parameters:

ParameterTypeRequiredDescription
emailStringYesEmail address to verify

Request:

curl -X POST "https://api.alaikis.com/std/mesh/emailcheck" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "email=user@example.com"

Response:

{
"code": 200,
"msg": "Request successful",
"data": {
"succeed": true,
"msg": "邮件验证成功"
}
}

2. File Upload (Base64)​

Upload files using base64 encoding.

Endpoint: POST /mesh/file/base64/upload

Parameters:

ParameterTypeRequiredDescription
bizContentStringYesJSON containing file base64 data and optional channel
- fileStringYesBase64 encoded file data with data URI prefix
- channelStringNoStorage channel (default: auto)

Request:

curl -X POST "https://api.alaikis.com/std/mesh/file/base64/upload" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "bizContent={\"file\": \"data:image/png;base64,iVBORw0KGgo...\", \"channel\": \"auto\"}"

3. File Upload (Multipart)​

Upload files using multipart form data.

Endpoint: POST /mesh/uploader

Parameters:

ParameterTypeRequiredDescription
fileFileYesMultipart file
channelStringYesStorage channel (primary, auto, etc.)

Request:

curl -X POST "https://api.alaikis.com/std/mesh/uploader" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-F "file=@document.pdf" \
-F "channel=auto"

4. Human Segmentation (Image Matting)​

Remove background from images.

Endpoint: POST /mesh/humansegment

Parameters:

ParameterTypeRequiredDescription
bizContentStringYesJSON containing URL
- urlStringYesImage URL to process

Request:

curl -X POST "https://api.alaikis.com/std/mesh/humansegment" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "bizContent={\"url\": \"https://example.com/photo.jpg\"}"

5. Send SMS​

Send SMS messages through SMS gateway.

Endpoint: POST /mesh/sms

Parameters:

ParameterTypeRequiredDescription
bizContentStringYesJSON containing SMS parameters
- routeStringYesGateway route identifier
- phoneNumberStringYesDestination phone number
- messageStringYesSMS message content

Request:

curl -X POST "https://api.alaikis.com/std/mesh/sms" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "bizContent={\"route\": \"default\", \"phoneNumber\": \"+14155551234\", \"message\": \"Hello!\"}"

6. Send Nexmo SMS​

Send SMS messages through Nexmo/Vonage gateway.

Endpoint: POST /mesh/nexmo/sms

Parameters:

ParameterTypeRequiredDescription
bizContentStringYesJSON containing SMS parameters
- fromStringYesSender ID
- toStringYesDestination phone number
- messageStringYesSMS message content

Request:

curl -X POST "https://api.alaikis.com/std/mesh/nexmo/sms" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "bizContent={\"from\": \"Company\", \"to\": \"+14155551234\", \"message\": \"Hello!\"}"

7. Text Translation​

Translate text between languages with database caching.

Endpoint: POST /mesh/translate

Parameters:

ParameterTypeRequiredDescription
bizContentStringYesJSON containing translation parameters
- textStringYesText to translate
- targetStringYesTarget language code
- sourceStringNoSource language code (auto-detect if not provided)
- channelStringNoTranslation provider (default: ai)

Request:

curl -X POST "https://api.alaikis.com/std/mesh/translate" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "bizContent={\"text\": \"Hello World\", \"target\": \"zh\", \"source\": \"en\"}"

8. Send Email Notification​

Send notification emails with support for both JSON and direct parameter formats.

Endpoint: POST /mesh/emailnotify

Parameters (Format 1 - JSON via bizContent):

ParameterTypeRequiredDescription
bizContentStringYesJSON containing email parameters
- toStringYesRecipient email address
- subjectStringYesEmail subject
- emailStringYesEmail body content (HTML supported)

Parameters (Format 2 - Direct Parameters):

ParameterTypeRequiredDescription
toStringYesRecipient email address
subjectStringYesEmail subject
emailStringYesEmail body content (HTML supported)

Request (JSON Format):

curl -X POST "https://api.alaikis.com/std/mesh/emailnotify" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "bizContent={\"to\": \"user@example.com\", \"subject\": \"Welcome\", \"email\": \"<h1>Hello!</h1>\"}"

Request (Direct Parameters):

curl -X POST "https://api.alaikis.com/std/mesh/emailnotify" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "to=user@example.com" \
-d "subject=Welcome" \
-d "email=<h1>Hello!</h1>"

9. Product Information Collection​

Collect detailed product information from e-commerce platforms.

Endpoint: POST /mesh/product/detail

Parameters:

ParameterTypeRequiredDescription
bizContentStringYesJSON containing product URL and channel
- channelStringYesPlatform identifier (amazon, ebay, etc.)
- urlStringYesProduct page URL

Request:

curl -X POST "https://api.alaikis.com/std/mesh/product/detail" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "bizContent={\"channel\": \"amazon\", \"url\": \"https://amazon.com/dp/...\"}"

10. UPC Barcode Import​

Batch import UPC barcodes into the system.

Endpoint: POST /mesh/upc/bluk/import

Parameters:

ParameterTypeRequiredDescription
bizContentStringYesJSON containing UPC codes
- upcsStringYesSemicolon-separated UPC codes

Request:

curl -X POST "https://api.alaikis.com/std/mesh/upc/bluk/import" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "bizContent={\"upcs\": \"012345678901;012345678902\"}"

11. Get UPC Barcodes​

Retrieve available unused UPC barcodes.

Endpoint: POST /mesh/upc/get

Parameters:

ParameterTypeRequiredDescription
bizContentStringYesJSON containing pagination parameters
- pageIntegerNoPage number (default: 1)
- numberIntegerNoNumber per page (default: 20)

Request:

curl -X POST "https://api.alaikis.com/std/mesh/upc/get" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "bizContent={\"page\": 1, \"number\": 50}"

12. Mark UPC as Used​

Mark UPC barcodes as used/unavailable.

Endpoint: POST /mesh/upc/markused

Parameters:

ParameterTypeRequiredDescription
bizContentStringYesJSON containing UPC ID
- upcIdIntegerYesUPC database identifier

Request:

curl -X POST "https://api.alaikis.com/std/mesh/upc/markused" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "bizContent={\"upcId\": 12345}"

13. Currency Exchange Rate​

Get current currency exchange rates with Redis caching.

Endpoint: POST /mesh/forex/getcurr

Parameters:

ParameterTypeRequiredDescription
bizContentStringYesJSON containing currency parameters
- fromStringYesSource currency code
- toStringYesTarget currency code
- moneyDecimalNoAmount to convert (default: 1)
- anchor_currencyStringNoAnchor currency (default: CNY)

Request:

curl -X POST "https://api.alaikis.com/std/mesh/forex/getcurr" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "bizContent={\"from\": \"USD\", \"to\": \"EUR\", \"money\": 100}"

14. Language Detection​

Detect language of input text.

Endpoint: POST /mesh/language/detect

Parameters:

ParameterTypeRequiredDescription
bizContentStringYesJSON containing text
- textStringYesText to analyze

Request:

curl -X POST "https://api.alaikis.com/std/mesh/language/detect" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "bizContent={\"text\": \"Hello World\"}"

15. Douyin Shipper Code​

Query Douyin (TikTok) shipper codes.

Endpoint: POST /mesh/douyin/shipper/code

Parameters:

ParameterTypeRequiredDescription
bizContentStringYesJSON containing name
- nameStringYesShipper name to search

Request:

curl -X POST "https://api.alaikis.com/std/mesh/douyin/shipper/code" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "bizContent={\"name\": \"顺丰\"}"

16. Address Verification​

Verify address components against zone database.

Endpoint: POST /mesh/address/verify

Parameters:

ParameterTypeRequiredDescription
bizContentStringYesJSON containing address data
- countryCodeStringYesCountry code
- provinceStringYesState/province name
- cityStringYesCity name

Request:

curl -X POST "https://api.alaikis.com/std/mesh/address/verify" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "bizContent={\"countryCode\": \"US\", \"province\": \"California\", \"city\": \"Los Angeles\"}"

17. Address Fingerprint​

Generate MD5 fingerprint for address zone hierarchy.

Endpoint: POST /mesh/address/figure

Parameters:

ParameterTypeRequiredDescription
bizContentStringYesJSON containing zone ID
- idIntegerYesZone database ID

Request:

curl -X POST "https://api.alaikis.com/std/mesh/address/figure" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "bizContent={\"id\": 1234}"

18. Zone/State Information​

Query zone hierarchy information.

Endpoint: POST /mesh/address/state

Parameters:

ParameterTypeRequiredDescription
bizContentStringYesJSON containing address data
- countryCodeStringYesCountry code
- provinceStringNoState/province name
- cityStringNoCity name

Request:

curl -X POST "https://api.alaikis.com/std/mesh/address/state" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "bizContent={\"countryCode\": \"US\", \"province\": \"California\"}"

19. Country Information by Name​

Retrieve country information by country name.

Endpoint: POST /mesh/address/country/inforbyname

Parameters:

ParameterTypeRequiredDescription
bizContentStringYesJSON containing country name
- countryStringYesCountry name

Request:

curl -X POST "https://api.alaikis.com/std/mesh/address/country/inforbyname" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d "bizContent={\"country\": \"United States\"}"

Rate Limiting​

  • Email Verification: 500 requests/hour
  • File Upload: 100 requests/hour (10MB max)
  • Translation: 10000 characters/hour
  • SMS: 500 messages/hour
  • UPC Operations: 20