Sommaire de la documentation
Sales & CRM · crm
The sell side, end to end — sales orders and their fulfilment plus the CRM pipeline that feeds them: leads, opportunities and quotations. A confirmed order reserves stock and hands off to distribution and finance; a converted quotation or lead flows straight into an order. Sync a CRM, an e-commerce front end or an order-management system against these endpoints.
/v1/crm/quotationsScope: crm:readList quotations
Returns a cursor-paginated list of quotations. Filter by status or customer.
| limitoptional | integerPage size, 1–200 (default 50). |
| cursoroptional | stringPagination cursor from a previous response. |
| statusoptional | stringFilter by status: draft, sent, accepted, declined or expired. |
| customer_idoptional | stringFilter by customer (partner id). |
curl "https://api.apusplatform.com/v1/crm/quotations" \
-H "Authorization: Bearer $APUS_TOKEN"{
"data": [
{
"id": "qtn_3c4d",
"number": "QT-2026-000087",
"customer_id": "prt_1a2b",
"status": "sent",
"total": {
"amount": 1250000,
"currency": "VND"
},
"valid_until": "2026-08-15",
"created_at": "2026-07-16T08:00:00Z"
}
],
"has_more": false,
"next_cursor": null
}/v1/crm/quotationsScope: crm:writeCreate a quotation
Creates a quotation in draft status. Convert it to a sales order once the customer accepts.
| customer_idrequired | stringCustomer (partner id). |
| linesrequired | arrayQuote lines: array of { sku, quantity, unit_price? }. |
| valid_untiloptional | stringExpiry date (YYYY-MM-DD). |
curl -X POST "https://api.apusplatform.com/v1/crm/quotations" \
-H "Authorization: Bearer $APUS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"customer_id": "prt_1a2b",
"valid_until": "2026-08-15",
"lines": [
{
"sku": "STEEL-BRKT-08",
"quantity": 100,
"unit_price": {
"amount": 12500,
"currency": "VND"
}
}
]
}'{
"id": "qtn_3c4d",
"number": "QT-2026-000087",
"status": "draft",
"created_at": "2026-07-20T02:20:00Z"
}/v1/crm/quotations/{id}/convertScope: crm:writeConvert a quotation
Converts an accepted quotation into a draft sales order, carrying over its lines and prices.
| idrequired | stringQuotation id. |
curl -X POST "https://api.apusplatform.com/v1/crm/quotations/qtn_3c4d/convert" \
-H "Authorization: Bearer $APUS_TOKEN"{
"id": "qtn_3c4d",
"status": "accepted",
"sales_order_id": "so_1a2b",
"converted_at": "2026-07-20T02:22:00Z"
}/v1/crm/leadsScope: crm:readList leads
Returns a cursor-paginated list of leads. Filter by pipeline stage or acquisition source.
| limitoptional | integerPage size, 1–200 (default 50). |
| cursoroptional | stringPagination cursor from a previous response. |
| stageoptional | stringFilter by stage: new, contacted, qualified or unqualified. |
| sourceoptional | stringFilter by source: website, referral, event or import. |
curl "https://api.apusplatform.com/v1/crm/leads" \
-H "Authorization: Bearer $APUS_TOKEN"{
"data": [
{
"id": "lead_5e6f",
"name": "Nguyen Van An",
"email": "an.nguyen@example.com",
"company": "Cong ty CP Dai Phat",
"stage": "new",
"source": "website",
"owner_id": "usr_7a",
"created_at": "2026-07-19T09:30:00Z"
}
],
"has_more": false,
"next_cursor": null
}/v1/crm/leadsScope: crm:writeCreate a lead
Creates a lead in the new stage. Convert a qualified lead into an opportunity later.
| namerequired | stringContact's full name. |
| emailoptional | stringContact email address. |
| companyoptional | stringCompany or organization name. |
| sourceoptional | stringAcquisition source: website, referral, event or import. |
curl -X POST "https://api.apusplatform.com/v1/crm/leads" \
-H "Authorization: Bearer $APUS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Nguyen Van An",
"email": "an.nguyen@example.com",
"company": "Cong ty CP Dai Phat",
"source": "website"
}'{
"id": "lead_5e6f",
"stage": "new",
"created_at": "2026-07-20T02:25:00Z"
}/v1/crm/leads/{id}/convertScope: crm:writeConvert a lead
Converts a qualified lead into an opportunity and, when company details are present, a customer partner.
| idrequired | stringLead id. |
curl -X POST "https://api.apusplatform.com/v1/crm/leads/lead_5e6f/convert" \
-H "Authorization: Bearer $APUS_TOKEN"{
"id": "lead_5e6f",
"stage": "qualified",
"opportunity_id": "opp_9a10",
"partner_id": "prt_2b3c",
"converted_at": "2026-07-20T02:28:00Z"
}/v1/crm/opportunitiesScope: crm:readList opportunities
Returns a cursor-paginated list of opportunities. Filter by pipeline stage or owner.
| limitoptional | integerPage size, 1–200 (default 50). |
| cursoroptional | stringPagination cursor from a previous response. |
| stageoptional | stringFilter by stage: prospecting, qualification, proposal, negotiation, won or lost. |
| owner_idoptional | stringFilter by the sales rep who owns the opportunity. |
curl "https://api.apusplatform.com/v1/crm/opportunities" \
-H "Authorization: Bearer $APUS_TOKEN"{
"data": [
{
"id": "opp_9a10",
"name": "Dai Phat — ERP rollout",
"customer_id": "prt_2b3c",
"stage": "proposal",
"amount": {
"amount": 480000000,
"currency": "VND"
},
"owner_id": "usr_7a",
"expected_close": "2026-09-30",
"created_at": "2026-07-19T10:00:00Z"
}
],
"has_more": false,
"next_cursor": null
}/v1/crm/opportunities/{id}Scope: crm:writeUpdate an opportunity
Updates mutable fields of an opportunity — typically to advance its stage or revise the deal amount. Only supplied fields change.
| idrequired | stringOpportunity id. |
| stageoptional | stringPipeline stage: prospecting, qualification, proposal, negotiation, won or lost. |
| amountoptional | object{ amount (minor units), currency }. |
curl -X PATCH "https://api.apusplatform.com/v1/crm/opportunities/opp_9a10" \
-H "Authorization: Bearer $APUS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"stage": "negotiation",
"amount": {
"amount": 520000000,
"currency": "VND"
}
}'{
"id": "opp_9a10",
"stage": "negotiation",
"amount": {
"amount": 520000000,
"currency": "VND"
},
"updated_at": "2026-07-20T02:30:00Z"
}Prêt à intégrer ?
Créez un client API dans la Console de compte pour obtenir vos identifiants, ou échangez avec un ingénieur d'intégration sur votre cas d'usage.