Sales
Orders, products, stock, customers (POS/sales).
6 endpoints · base /api/v1/sales
List orders.
MCP tool:
sales_list_ordersScope: sales.orders.viewUser OAuthAPI key / appParameter
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
pageNumber | int | query | no | Page (starts at 1) |
pageSize | int | query | no | Rows per page (default 20 for CRM and Sales orders/customers; 50 for Sales products) |
Example
curl https://api.nextx.vn/api/v1/sales/orders?pageNumber=1&pageSize=1 \
-H "Authorization: Bearer <ACCESS_TOKEN>"Sample response
{
"items": [
{
"id": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"code": "string",
"orderType": "string",
"status": "string",
"salesCustomerId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"contactName": "string",
"contactPhone": "string",
"customerCode": "string",
"address": "string",
"branchId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"branchName": "string",
"subtotal": 0,
"discountAmount": 0,
"taxAmount": 0,
"shippingFee": 0,
"total": 0,
"paidAmount": 0,
"debtAmount": 0,
"debtStatus": "string",
"paymentMethod": "string",
"createdAt": "2026-10-27T09:00:00+07:00",
"notes": "string",
"vatMode": "string",
"confirmedAt": "2026-10-27T09:00:00+07:00",
"cancelledAt": "2026-10-27T09:00:00+07:00",
"cancelReason": "string",
"itemCount": 0,
"assignedTo": {
"id": null,
"name": null
},
"assignees": [
null
],
"unitCode": "string",
"unitName": "string",
"paymentBreakdown": [
null
],
"returnStatus": "string",
"hasOpenReturn": false,
"channelCode": "string",
"orderDate": "2026-10-27T09:00:00+07:00",
"eInvoiceStatus": "string",
"eInvoiceNumber": "string",
"vatExportedAt": "2026-10-27T09:00:00+07:00",
"outletId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"deliveryEmployee": {
"id": null,
"name": null
},
"expectedDeliveryDate": "2026-10-27T09:00:00+07:00",
"depositAmount": 0,
"deliveryStatus": "string",
"internalNotes": "string",
"deliveredAt": "2026-10-27T09:00:00+07:00",
"lastPaymentDate": "2026-10-27T09:00:00+07:00",
"payments": [
null
],
"deliveryAddress": "string",
"deliveryName": "string",
"deliveryPhone": "string",
"customerInfo": {
"groupName": null,
"email": null,
"companyName": null,
"taxCode": null,
"netDebt": null,
"ownerName": null
},
"outletInfo": {
"code": null,
"name": null,
"ownerName": null,
"ownerPhone": null,
"address": null,
"channelCode": null,
"tier": null,
"repNames": null,
"routeNames": null,
"taxCode": null
}
}
],
"totalCount": 0,
"page": 0,
"pageSize": 0,
"totalPages": 0,
"hasNextPage": false,
"hasPreviousPage": false,
"summary": {
"subtotal": 0,
"discountAmount": 0,
"taxAmount": 0,
"totalAmount": 0,
"totalPaid": 0,
"totalDebt": 0,
"totalQuantity": 0
},
"paymentMethodsPresent": [
"string"
]
}Details of one order.
MCP tool:
sales_get_orderScope: sales.orders.viewUser OAuthAPI key / appParameter
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
id | GUID | path | yes | — |
Example
curl https://api.nextx.vn/api/v1/sales/orders/<id> \
-H "Authorization: Bearer <ACCESS_TOKEN>"Sample response
{
"id": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"code": "string",
"orderType": "string",
"status": "string",
"salesCustomerId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"contactName": "string",
"contactPhone": "string",
"branchId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"branchName": "string",
"subtotal": 0,
"shippingFee": 0,
"total": 0,
"paidAmount": 0,
"debtAmount": 0,
"paymentMethod": "string",
"cashAccountId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"shipmentId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"notes": "string",
"items": [
{
"id": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"productId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"productName": "string",
"sku": "string",
"variantId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"variantName": "string",
"unitCode": "string",
"unitName": "string",
"quantity": 0,
"unitPrice": 0,
"subtotal": 0,
"total": 0,
"notes": "string",
"discount": {
"type": null,
"rate": null,
"amount": null
},
"tax": {
"rate": null,
"amount": null
},
"tracking": {
"type": null,
"lotId": null,
"lotNumber": null,
"imeiSerial": null,
"imeiSerials": null
},
"variantCode": "string",
"fulfilledQuantity": 0,
"unfulfilledQuantity": 0,
"convertedQty": 0,
"remainingConvertQty": 0,
"productType": "string",
"returnedQuantity": 0,
"itemNote": "string",
"isGift": false,
"productGroup": "string",
"weight": 0,
"weightUnit": "string",
"productItemCode": "string",
"skuCode": "string",
"openReturnQuantity": 0,
"openReturnCodes": [
"string"
],
"kitComponents": [
null
],
"skuId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"lots": [
null
],
"priceIncludesVat": false
}
],
"confirmedAt": "2026-10-27T09:00:00+07:00",
"completedAt": "2026-10-27T09:00:00+07:00",
"cancelledAt": "2026-10-27T09:00:00+07:00",
"cancelReason": "string",
"createdAt": "2026-10-27T09:00:00+07:00",
"updatedAt": "2026-10-27T09:00:00+07:00",
"assignedTo": {
"id": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"name": "string"
},
"assignees": [
{
"userId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"name": "string",
"commissionPercent": 0
}
],
"createdBy": {
"id": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"name": "string"
},
"discount": {
"type": "string",
"value": 0,
"amount": 0
},
"vat": {
"percent": 0,
"included": false,
"mode": "string",
"amount": 0
},
"paymentStatus": "string",
"couponCode": "string",
"delivery": {
"customerAddressId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"name": "string",
"phone": "string",
"addressLine": "string",
"province": "string",
"provinceCode": "string",
"district": "string",
"districtCode": "string",
"ward": "string",
"wardCode": "string",
"latitude": 0,
"longitude": 0
},
"codAmount": 0,
"channelCode": "string",
"externalOrderId": "string",
"orderDate": "2026-10-27T09:00:00+07:00",
"sourceOrderIds": [
"0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b"
],
"convertedAt": "2026-10-27T09:00:00+07:00",
"returns": [
{
"id": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"returnCode": "string",
"status": "string",
"returnType": "string",
"refundAmount": 0,
"createdAt": "2026-10-27T09:00:00+07:00",
"exchangeNewOrderId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b"
}
],
"pointsUsed": 0,
"pointsDiscount": 0,
"voucherCodes": [
"string"
],
"depositAmount": 0,
"depositPaymentMethod": "string",
"depositDeducted": 0,
"expectedDeliveryDate": "2026-10-27T09:00:00+07:00",
"promotionId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"paymentBreakdown": [
{
"method": "string",
"amount": 0
}
],
"bankAccountId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"customerCode": "string",
"customerAddress": "string",
"customerTaxCode": "string",
"priceListIdOverride": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"sourcePreOrderId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"sourcePreOrderCode": "string",
"customerCurrentDebt": 0,
"customFields": {},
"approvedAt": "2026-10-27T09:00:00+07:00",
"approvedBy": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"childOrders": [
{
"id": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"code": "string",
"status": "string",
"createdAt": "2026-10-27T09:00:00+07:00",
"orderDate": "2026-10-27T09:00:00+07:00",
"total": 0,
"paidAmount": 0
}
],
"internalNotes": "string",
"otherCharges": 0,
"outletId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"deliveryEmployee": {
"id": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"name": "string"
},
"deliveredAt": "2026-10-27T09:00:00+07:00",
"idempotentReplay": false,
"shippingPlan": {
"carrierCode": "string",
"carrierConfigId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"serviceType": "string",
"weightGrams": 0,
"lengthCm": 0,
"widthCm": 0,
"heightCm": 0,
"carrierOptions": null,
"estimatedFee": 0,
"freeshipCode": "string",
"note": "string"
},
"discountAmount": 0,
"taxAmount": 0
}List/search products.
MCP tool:
sales_list_productsScope: sales.products.viewUser OAuthAPI key / appParameter
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
search | string | query | no | — |
pageNumber | int | query | no | Page (starts at 1) |
pageSize | int | query | no | Rows per page (default 20 for CRM and Sales orders/customers; 50 for Sales products) |
Example
curl https://api.nextx.vn/api/v1/sales/products?search=...&pageNumber=1&pageSize=1 \
-H "Authorization: Bearer <ACCESS_TOKEN>"Sample response
{
"items": [
{
"id": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"code": "string",
"name": "string",
"productType": "string",
"trackingType": "string",
"category": {
"id": null,
"name": null
},
"unit": {
"id": null,
"code": null,
"name": null
},
"currentPrice": 0,
"currentCost": 0,
"wholesalePrice": 0,
"minPrice": 0,
"maxPrice": 0,
"stockQuantity": 0,
"openingStock": 0,
"status": "string",
"imageKey": "string",
"imageUrl": "string",
"warrantyMonths": 0,
"variantCount": 0,
"attributes": "string",
"createdAt": "2026-10-27T09:00:00+07:00",
"unitConversions": [
null
],
"isLotTracked": false,
"isSerialTracked": false,
"taxRate": 0,
"sellPriceIncludesVat": false,
"defaultSkuId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"barcode": "string",
"customFields": {},
"sku": "string",
"brandId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"brandName": "string",
"minStockLevel": 0,
"maxStockLevel": 0,
"reserved": 0,
"location": "string",
"weight": 0,
"weightUnit": "string",
"notes": "string",
"source": "string",
"sourceRef": "string",
"packageKind": "string",
"durationMonths": 0,
"packageServicesJson": "string"
}
],
"totalCount": 0,
"page": 0,
"pageSize": 0,
"totalPages": 0,
"hasNextPage": false,
"hasPreviousPage": false,
"summary": {
"totalStock": 0,
"totalReserved": 0,
"totalStockValueCost": 0,
"totalStockValuePrice": 0
}
}Product details.
MCP tool:
sales_get_productScope: sales.products.viewUser OAuthAPI key / appParameter
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
id | GUID | path | yes | — |
Example
curl https://api.nextx.vn/api/v1/sales/products/<id> \
-H "Authorization: Bearer <ACCESS_TOKEN>"Sample response
{
"id": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"code": "string",
"name": "string",
"productType": "string",
"trackingType": "string",
"barcode": "string",
"category": {
"id": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"name": "string"
},
"brand": {
"id": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"name": "string",
"code": "string"
},
"unit": {
"id": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"code": "string",
"name": "string"
},
"currentPrice": 0,
"currentCost": 0,
"wholesalePrice": 0,
"taxRate": 0,
"sellPriceIncludesVat": false,
"stockQuantity": 0,
"warrantyMonths": 0,
"status": "string",
"description": "string",
"imageKey": "string",
"imageUrl": "string",
"imageKeys": [
"string"
],
"imageUrls": [
"string"
],
"variantCount": 0,
"attributes": "string",
"minPrice": 0,
"maxPrice": 0,
"defaultSkuId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"isLotTracked": false,
"isSerialTracked": false,
"isSoldDirectly": false,
"isDeleteProtected": false,
"notes": "string",
"kitPriceMode": "AutoCalculate",
"kitPriceOverride": 0,
"stockByBranch": [
{
"branchId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"branchName": "string",
"onHand": 0,
"reserved": 0,
"available": 0,
"avgCost": 0,
"incoming": 0,
"daysUntilStockout": 0,
"estimatedStockoutDate": "2026-10-27T09:00:00+07:00",
"allowSale": false
}
],
"minStockLevel": 0,
"maxStockLevel": 0,
"weight": 0,
"weightUnit": "string",
"lengthCm": 0,
"widthCm": 0,
"heightCm": 0,
"locations": [
{
"id": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"name": "string",
"code": "string"
}
],
"createdAt": "2026-10-27T09:00:00+07:00",
"updatedAt": "2026-10-27T09:00:00+07:00",
"customFields": {}
}Stock of one product.
MCP tool:
sales_get_product_stockScope: sales.products.viewUser OAuthAPI key / appParameter
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
id | GUID | path | yes | — |
Example
curl https://api.nextx.vn/api/v1/sales/products/<id>/stock \
-H "Authorization: Bearer <ACCESS_TOKEN>"Sample response
[
{
"branchId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"branchName": "string",
"onHand": 0,
"reserved": 0,
"available": 0,
"sold": 0,
"incoming": 0,
"daysUntilStockout": 0,
"estimatedStockoutDate": "2026-10-27T09:00:00+07:00"
}
]List customers.
MCP tool:
sales_list_customersScope: sales.customers.viewUser OAuthAPI key / appParameter
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
pageNumber | int | query | no | Page (starts at 1) |
pageSize | int | query | no | Rows per page (default 20 for CRM and Sales orders/customers; 50 for Sales products) |
Example
curl https://api.nextx.vn/api/v1/sales/customers?pageNumber=1&pageSize=1 \
-H "Authorization: Bearer <ACCESS_TOKEN>"Sample response
{
"items": [
{
"id": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"customerCode": "string",
"crmContactId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"fullName": "string",
"phone": "string",
"email": "string",
"customerType": "string",
"customerGroupId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"customerGroupName": "string",
"status": "string",
"totalDebt": 0,
"debtLimit": 0,
"totalOrders": 0,
"totalRevenue": 0,
"totalPurchase": 0,
"lastOrderAt": "2026-10-27T09:00:00+07:00",
"createdAt": "2026-10-27T09:00:00+07:00",
"avatarKey": "string",
"avatarUrl": "string",
"priceListIdOverride": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"totalPoints": 0,
"gymMemberCode": "string",
"assignedTo": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"assignedToName": "string",
"customFields": {},
"notes": "string",
"debtDays": 0,
"linkedSupplierId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"address": "string",
"advanceRemaining": 0,
"netDebt": 0,
"branchId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b"
}
],
"totalCount": 0,
"page": 0,
"pageSize": 0,
"totalPages": 0,
"hasNextPage": false,
"hasPreviousPage": false,
"summary": {
"totalDebt": 0,
"totalRevenue": 0,
"totalPurchase": 0,
"totalDebtLimit": 0,
"totalOrders": 0,
"totalPoints": 0,
"totalAdvance": 0,
"netDebt": 0
}
}