Developers
Reference · CRM

Deals

List deals #

GET/api/public/v1/quosuite/crm/deals
Scope : crm:readlistCrmDeals

Filter by pipeline, stage, status, account, contact, owner, currency and expected close; archived excluded unless archived=true. With a cursor, allowed sort on createdAt, updatedAt, amount, title. Allowed sort: createdAt, updatedAt, amount, title, expectedCloseDate (default -createdAt).

Parameters

  • langstringquery

    Language of the labels (and of the PDF). Default: Accept-Language, otherwise the workspace language.

    frenar
  • pagenumberquery

    Page number (starting at 1).

  • pageSizenumberquery

    Items per page (100 at most).

  • sortstringquery

    Sort: comma-separated fields, - prefix for descending order. Allowed fields: see the route description. A final criterion on id makes pagination stable.

  • updatedSincestringquery

    Only returns items created or updated since this instant (ISO 8601, inclusive). With sort=updatedAt, this is the recommended form of an incremental sync.

  • cursorstringquery

    Cursor pagination: nextCursor of the previous page, to be passed back as is with the same filters and the same sort. Stable even if items are created during the walk, and constant cost whatever the depth. Mutually exclusive with page.

  • limitnumberquery

    Cursor pagination: items per page (100 at most). ?limit=100 starts a cursor walk; the response returns pagination.nextCursor.

  • pipelineIdstring (uuid)query
  • stageIdstring (uuid)query
  • statusstring[]query

    Statuses, comma-separated (OPEN, WON, LOST).

  • accountIdstring (uuid)query
  • contactIdstring (uuid)query
  • ownerIdstring (uuid)query
  • currencystringquery
  • closeFromstringquery

    Expected close from (inclusive).

  • closeTostringquery

    Expected close until (inclusive).

  • archivedbooleanquery

Response 200application/json

Success.

  • itemsCrmDealDto[]required
    CrmDealDto details
  • paginationPaginationDtorequired
    PaginationDto details

Errors

400VALIDATION_FAILEDIDEMPOTENCY_KEY_INVALIDINVALID_CURSOR

Invalid parameter or body (missing, unknown or mistyped field, sort not allowed), or pagination cursor issued for another sort or other filters.

401API_KEY_MISSINGAPI_KEY_INVALIDAPI_KEY_REVOKEDAPI_KEY_EXPIRED

Key missing, invalid, revoked or expired.

403API_KEY_WRONG_PERIMETERAPI_INSUFFICIENT_SCOPEAPI_ORIGIN_NOT_ALLOWEDAPI_TENANT_MISMATCHAPI_TENANT_INACTIVEAPI_MODULE_UNAVAILABLEAPI_FEATURE_UNAVAILABLE

Valid key but insufficient: wrong perimeter, missing scope, origin refused, inactive subscription, or module / option not included in the plan.

429API_RATE_LIMITEDAPI_AUTH_BLOCKED

Key or workspace quota reached (see Retry-After), or address blocked.

500INTERNAL_ERROR

Unexpected error. Quote requestId to support.

503SERVICE_UNAVAILABLE

Temporarily unavailable (see Retry-After). No infrastructure details.

Request example
curl 'https://quosuite.com/api/public/v1/quosuite/crm/deals' \
  -H "Authorization: Bearer $QUOSUITE_API_KEY"
Response example
{
  "success": true,
  "data": {
    "items": [
      {
        "id": "2e69f4db-32f4-46c6-8d3b-3614f407cb99",
        "title": "Équipement atelier BTP Horizon",
        "accountId": "6443098c-7bf2-4812-8cac-1c9d5438fddd",
        "contactId": "876f5ec7-f7dc-435a-8d04-26b625cfaead",
        "pipelineId": "426a702d-1f21-4952-89db-8e069d3e565d",
        "stageId": "66358d3d-f38e-4482-8c4a-96784e51d8e1",
        "stageName": "Négociation",
        "status": "OPEN",
        "statusLabel": "Ouverte",
        "amount": 42000,
        "currency": "TND",
        "probability": 75,
        "weightedAmount": 31500,
        "expectedCloseDate": "2026-12-20",
        "ownerId": "332806c4-2ef5-4aca-8355-483d344c51d5",
        "ownerName": null,
        "lostReason": null,
        "source": null,
        "description": null,
        "leadId": "8d012a2d-740a-4282-82be-a54283e63615",
        "stageChangedAt": "2026-10-02T09:15:00.000Z",
        "lastActivityAt": "2026-10-02T09:15:00.000Z",
        "closedAt": "2026-10-02T09:15:00.000Z",
        "archived": true,
        "lines": [
          {
            "id": "a0bf6e21-0769-41e2-8e0d-b8126ac89ff5",
            "articleId": "8bc5a87b-4885-4296-8e2f-169e920ce389",
            "label": "Établi d’atelier 2 m",
            "quantity": 6,
            "unitPrice": 890,
            "discountPct": 0,
            "vatRate": 19,
            "total": 5340
          }
        ],
        "documents": [
          {
            "documentId": "2cbae947-e0de-49a6-8612-6aa08420a959",
            "number": "DEV-2026-0021",
            "type": "DEVIS",
            "typeLabel": "Devis",
            "status": "DRAFT",
            "origin": "GENERATED"
          }
        ],
        "createdAt": "2026-10-02T09:15:00.000Z",
        "updatedAt": "2026-10-02T09:15:00.000Z"
      }
    ],
    "pagination": {
      "page": 1,
      "pageSize": 25,
      "totalItems": 132,
      "totalPages": 6,
      "limit": 100,
      "nextCursor": "c1.eyJzIjoiZGF0ZTpkZXNjLGlkOmFzYyIsImYiOiJ…",
      "hasMore": true
    }
  },
  "timestamp": "2026-10-02T09:15:00.000Z"
}
Try this request

Create a deal #

POST/api/public/v1/quosuite/crm/deals
Scope : crm:writeIdempotentcreateCrmDeal

Default pipeline and first stage if omitted; the stage’s probability unless entered. With lines, the amount is their total excl. tax (ERP products: description, price, VAT by default). A currency other than the workspace’s requires the multi-currency option (402).

Parameters

  • Idempotency-Keystringheader

    Idempotency key (1–255 printable ASCII characters, UUID v4 recommended). A retry with the same key and the same body within 24 h replays the response of the first successful call (header Idempotent-Replayed: true) instead of creating a second time. Same key, different body: 422 IDEMPOTENCY_KEY_REUSED. First call still in progress: 409 IDEMPOTENCY_IN_PROGRESS.

Request body application/json

  • titlestringrequired
    e.g.Équipement atelier BTP Horizon
  • accountIdstring (uuid) | null
  • contactIdstring (uuid) | null
  • pipelineIdstring (uuid)

    Default: the default pipeline (GET /crm/pipelines).

  • stageIdstring (uuid)

    Default: the pipeline’s first stage.

  • amountnumber

    Amount excl. tax, ignored when lines is provided.

    min.0e.g.42000
  • currencystring

    Default: the account’s currency, otherwise the workspace’s.

    e.g.TND
  • probabilitynumber

    Default: the stage’s.

    min.0max.100
  • expectedCloseDatestring | null
    e.g.2026-12-20
  • ownerIdstring (uuid) | null

    Owner: a user of the workspace (GET /crm/owners). Omitted on creation: none (a “new lead” automation may assign it); null on update: remove it.

  • sourceobject
  • descriptionobject
  • linesCrmDealLineInput[]

    Indicative lines (replace the previous ones).

    CrmDealLineInput details

Response 201application/json

Created.

  • idstring (uuid)required
  • titlestringrequired
    e.g.Équipement atelier BTP Horizon
  • accountIdstring (uuid) | null
  • contactIdstring (uuid) | null
  • pipelineIdstring (uuid)required
  • stageIdstring (uuid)required
  • stageNamestringrequired
    e.g.Négociation
  • statusstringrequired
    valuesOPENWONLOST
  • statusLabelstringrequired
    e.g.Ouverte
  • amountnumberrequired

    Amount excl. tax (total of the lines if any).

    e.g.42000
  • currencystringrequired
    e.g.TND
  • probabilitynumberrequired

    Probability 0–100.

    e.g.75
  • weightedAmountnumberrequired

    Amount × probability.

    e.g.31500
  • expectedCloseDatestring | null
    e.g.2026-12-20
  • ownerIdstring (uuid) | null
  • ownerNamestring | null
  • lostReasonstring | null
  • sourcestring | null
  • descriptionstring | null
  • leadIdstring (uuid) | null

    Original lead.

  • stageChangedAtstringrequired

    Entry into the current stage.

  • lastActivityAtstringrequired

    Last sales action (activity, move…).

  • closedAtstring | null
  • archivedbooleanrequired
  • linesCrmDealLineDto[]required
    CrmDealLineDto details
  • documentsCrmDealDocumentDto[]required

    Linked sales documents.

    CrmDealDocumentDto details
  • createdAtstringrequired
  • updatedAtstringrequired

Errors

400VALIDATION_FAILEDIDEMPOTENCY_KEY_INVALIDINVALID_CURSOR

Invalid parameter or body (missing, unknown or mistyped field, sort not allowed), or pagination cursor issued for another sort or other filters.

401API_KEY_MISSINGAPI_KEY_INVALIDAPI_KEY_REVOKEDAPI_KEY_EXPIRED

Key missing, invalid, revoked or expired.

402PLAN_QUOTA_EXCEEDEDFEATURE_NOT_INCLUDEDMODULE_NOT_INCLUDED

Subscription plan limit or option (monthly document quota, multi-currency…).

403API_KEY_WRONG_PERIMETERAPI_INSUFFICIENT_SCOPEAPI_ORIGIN_NOT_ALLOWEDAPI_TENANT_MISMATCHAPI_TENANT_INACTIVEAPI_MODULE_UNAVAILABLEAPI_FEATURE_UNAVAILABLE

Valid key but insufficient: wrong perimeter, missing scope, origin refused, inactive subscription, or module / option not included in the plan.

404NOT_FOUND

Resource not found — or belonging to another workspace, which amounts to the same.

409CONFLICTIDEMPOTENCY_IN_PROGRESS

Conflict: unique value already taken, or same idempotency key still in progress.

422BUSINESS_RULE_VIOLATIONIDEMPOTENCY_KEY_REUSED

Well-formed request but refused by an ERP business rule (forbidden status transition, locked paid document, stock…), or reused idempotency key.

429API_RATE_LIMITEDAPI_AUTH_BLOCKED

Key or workspace quota reached (see Retry-After), or address blocked.

500INTERNAL_ERROR

Unexpected error. Quote requestId to support.

503SERVICE_UNAVAILABLE

Temporarily unavailable (see Retry-After). No infrastructure details.

Request example
# One key per operation, reused as is on every retry.
curl -X POST 'https://quosuite.com/api/public/v1/quosuite/crm/deals' \
  -H "Authorization: Bearer $QUOSUITE_API_KEY" \
  -H 'Idempotency-Key: 3f1c2a9e-5b7d-4e8a-9c1f-2d6b8e4a7c30' \
  -H 'Content-Type: application/json' \
  -d '{
  "title": "Équipement atelier BTP Horizon"
}'
Response example
{
  "success": true,
  "data": {
    "id": "2e69f4db-32f4-46c6-8d3b-3614f407cb99",
    "title": "Équipement atelier BTP Horizon",
    "accountId": "6443098c-7bf2-4812-8cac-1c9d5438fddd",
    "contactId": "876f5ec7-f7dc-435a-8d04-26b625cfaead",
    "pipelineId": "426a702d-1f21-4952-89db-8e069d3e565d",
    "stageId": "66358d3d-f38e-4482-8c4a-96784e51d8e1",
    "stageName": "Négociation",
    "status": "OPEN",
    "statusLabel": "Ouverte",
    "amount": 42000,
    "currency": "TND",
    "probability": 75,
    "weightedAmount": 31500,
    "expectedCloseDate": "2026-12-20",
    "ownerId": "332806c4-2ef5-4aca-8355-483d344c51d5",
    "ownerName": null,
    "lostReason": null,
    "source": null,
    "description": null,
    "leadId": "8d012a2d-740a-4282-82be-a54283e63615",
    "stageChangedAt": "2026-10-02T09:15:00.000Z",
    "lastActivityAt": "2026-10-02T09:15:00.000Z",
    "closedAt": "2026-10-02T09:15:00.000Z",
    "archived": true,
    "lines": [
      {
        "id": "a0bf6e21-0769-41e2-8e0d-b8126ac89ff5",
        "articleId": "8bc5a87b-4885-4296-8e2f-169e920ce389",
        "label": "Établi d’atelier 2 m",
        "quantity": 6,
        "unitPrice": 890,
        "discountPct": 0,
        "vatRate": 19,
        "total": 5340
      }
    ],
    "documents": [
      {
        "documentId": "2cbae947-e0de-49a6-8612-6aa08420a959",
        "number": "DEV-2026-0021",
        "type": "DEVIS",
        "typeLabel": "Devis",
        "status": "DRAFT",
        "origin": "GENERATED"
      }
    ],
    "createdAt": "2026-10-02T09:15:00.000Z",
    "updatedAt": "2026-10-02T09:15:00.000Z"
  },
  "timestamp": "2026-10-02T09:15:00.000Z"
}

Get a deal #

GET/api/public/v1/quosuite/crm/deals/{id}
Scope : crm:readgetCrmDeal

With its indicative lines and linked sales documents.

Parameters

  • idstring (uuid)pathrequired
  • langstringquery

    Language of the labels (and of the PDF). Default: Accept-Language, otherwise the workspace language.

    frenar

Response 200application/json

Success.

  • idstring (uuid)required
  • titlestringrequired
    e.g.Équipement atelier BTP Horizon
  • accountIdstring (uuid) | null
  • contactIdstring (uuid) | null
  • pipelineIdstring (uuid)required
  • stageIdstring (uuid)required
  • stageNamestringrequired
    e.g.Négociation
  • statusstringrequired
    valuesOPENWONLOST
  • statusLabelstringrequired
    e.g.Ouverte
  • amountnumberrequired

    Amount excl. tax (total of the lines if any).

    e.g.42000
  • currencystringrequired
    e.g.TND
  • probabilitynumberrequired

    Probability 0–100.

    e.g.75
  • weightedAmountnumberrequired

    Amount × probability.

    e.g.31500
  • expectedCloseDatestring | null
    e.g.2026-12-20
  • ownerIdstring (uuid) | null
  • ownerNamestring | null
  • lostReasonstring | null
  • sourcestring | null
  • descriptionstring | null
  • leadIdstring (uuid) | null

    Original lead.

  • stageChangedAtstringrequired

    Entry into the current stage.

  • lastActivityAtstringrequired

    Last sales action (activity, move…).

  • closedAtstring | null
  • archivedbooleanrequired
  • linesCrmDealLineDto[]required
    CrmDealLineDto details
  • documentsCrmDealDocumentDto[]required

    Linked sales documents.

    CrmDealDocumentDto details
  • createdAtstringrequired
  • updatedAtstringrequired

Errors

400VALIDATION_FAILEDIDEMPOTENCY_KEY_INVALIDINVALID_CURSOR

Invalid parameter or body (missing, unknown or mistyped field, sort not allowed), or pagination cursor issued for another sort or other filters.

401API_KEY_MISSINGAPI_KEY_INVALIDAPI_KEY_REVOKEDAPI_KEY_EXPIRED

Key missing, invalid, revoked or expired.

403API_KEY_WRONG_PERIMETERAPI_INSUFFICIENT_SCOPEAPI_ORIGIN_NOT_ALLOWEDAPI_TENANT_MISMATCHAPI_TENANT_INACTIVEAPI_MODULE_UNAVAILABLEAPI_FEATURE_UNAVAILABLE

Valid key but insufficient: wrong perimeter, missing scope, origin refused, inactive subscription, or module / option not included in the plan.

404NOT_FOUND

Resource not found — or belonging to another workspace, which amounts to the same.

429API_RATE_LIMITEDAPI_AUTH_BLOCKED

Key or workspace quota reached (see Retry-After), or address blocked.

500INTERNAL_ERROR

Unexpected error. Quote requestId to support.

503SERVICE_UNAVAILABLE

Temporarily unavailable (see Retry-After). No infrastructure details.

Request example
curl 'https://quosuite.com/api/public/v1/quosuite/crm/deals/aac39e3a-0c40-44b2-8697-b597f357c5a9' \
  -H "Authorization: Bearer $QUOSUITE_API_KEY"
Response example
{
  "success": true,
  "data": {
    "id": "2e69f4db-32f4-46c6-8d3b-3614f407cb99",
    "title": "Équipement atelier BTP Horizon",
    "accountId": "6443098c-7bf2-4812-8cac-1c9d5438fddd",
    "contactId": "876f5ec7-f7dc-435a-8d04-26b625cfaead",
    "pipelineId": "426a702d-1f21-4952-89db-8e069d3e565d",
    "stageId": "66358d3d-f38e-4482-8c4a-96784e51d8e1",
    "stageName": "Négociation",
    "status": "OPEN",
    "statusLabel": "Ouverte",
    "amount": 42000,
    "currency": "TND",
    "probability": 75,
    "weightedAmount": 31500,
    "expectedCloseDate": "2026-12-20",
    "ownerId": "332806c4-2ef5-4aca-8355-483d344c51d5",
    "ownerName": null,
    "lostReason": null,
    "source": null,
    "description": null,
    "leadId": "8d012a2d-740a-4282-82be-a54283e63615",
    "stageChangedAt": "2026-10-02T09:15:00.000Z",
    "lastActivityAt": "2026-10-02T09:15:00.000Z",
    "closedAt": "2026-10-02T09:15:00.000Z",
    "archived": true,
    "lines": [
      {
        "id": "a0bf6e21-0769-41e2-8e0d-b8126ac89ff5",
        "articleId": "8bc5a87b-4885-4296-8e2f-169e920ce389",
        "label": "Établi d’atelier 2 m",
        "quantity": 6,
        "unitPrice": 890,
        "discountPct": 0,
        "vatRate": 19,
        "total": 5340
      }
    ],
    "documents": [
      {
        "documentId": "2cbae947-e0de-49a6-8612-6aa08420a959",
        "number": "DEV-2026-0021",
        "type": "DEVIS",
        "typeLabel": "Devis",
        "status": "DRAFT",
        "origin": "GENERATED"
      }
    ],
    "createdAt": "2026-10-02T09:15:00.000Z",
    "updatedAt": "2026-10-02T09:15:00.000Z"
  },
  "timestamp": "2026-10-02T09:15:00.000Z"
}
Try this request

Update a deal #

PATCH/api/public/v1/quosuite/crm/deals/{id}
Scope : crm:writeupdateCrmDeal

Only the fields sent change; lines replaces all lines. To change stage, prefer POST /crm/deals/{id}/stage.

Parameters

  • idstring (uuid)pathrequired

Request body application/json

  • titlestring
    e.g.Équipement atelier BTP Horizon
  • accountIdstring (uuid) | null
  • contactIdstring (uuid) | null
  • pipelineIdstring (uuid)

    Default: the default pipeline (GET /crm/pipelines).

  • stageIdstring (uuid)

    Default: the pipeline’s first stage.

  • amountnumber

    Amount excl. tax, ignored when lines is provided.

    min.0e.g.42000
  • currencystring

    Default: the account’s currency, otherwise the workspace’s.

    e.g.TND
  • probabilitynumber

    Default: the stage’s.

    min.0max.100
  • expectedCloseDatestring | null
    e.g.2026-12-20
  • ownerIdstring (uuid) | null

    Owner: a user of the workspace (GET /crm/owners). Omitted on creation: none (a “new lead” automation may assign it); null on update: remove it.

  • sourceobject
  • descriptionobject
  • linesCrmDealLineInput[]

    Indicative lines (replace the previous ones).

    CrmDealLineInput details

Response 200application/json

Success.

  • idstring (uuid)required
  • titlestringrequired
    e.g.Équipement atelier BTP Horizon
  • accountIdstring (uuid) | null
  • contactIdstring (uuid) | null
  • pipelineIdstring (uuid)required
  • stageIdstring (uuid)required
  • stageNamestringrequired
    e.g.Négociation
  • statusstringrequired
    valuesOPENWONLOST
  • statusLabelstringrequired
    e.g.Ouverte
  • amountnumberrequired

    Amount excl. tax (total of the lines if any).

    e.g.42000
  • currencystringrequired
    e.g.TND
  • probabilitynumberrequired

    Probability 0–100.

    e.g.75
  • weightedAmountnumberrequired

    Amount × probability.

    e.g.31500
  • expectedCloseDatestring | null
    e.g.2026-12-20
  • ownerIdstring (uuid) | null
  • ownerNamestring | null
  • lostReasonstring | null
  • sourcestring | null
  • descriptionstring | null
  • leadIdstring (uuid) | null

    Original lead.

  • stageChangedAtstringrequired

    Entry into the current stage.

  • lastActivityAtstringrequired

    Last sales action (activity, move…).

  • closedAtstring | null
  • archivedbooleanrequired
  • linesCrmDealLineDto[]required
    CrmDealLineDto details
  • documentsCrmDealDocumentDto[]required

    Linked sales documents.

    CrmDealDocumentDto details
  • createdAtstringrequired
  • updatedAtstringrequired

Errors

400VALIDATION_FAILEDIDEMPOTENCY_KEY_INVALIDINVALID_CURSOR

Invalid parameter or body (missing, unknown or mistyped field, sort not allowed), or pagination cursor issued for another sort or other filters.

401API_KEY_MISSINGAPI_KEY_INVALIDAPI_KEY_REVOKEDAPI_KEY_EXPIRED

Key missing, invalid, revoked or expired.

403API_KEY_WRONG_PERIMETERAPI_INSUFFICIENT_SCOPEAPI_ORIGIN_NOT_ALLOWEDAPI_TENANT_MISMATCHAPI_TENANT_INACTIVEAPI_MODULE_UNAVAILABLEAPI_FEATURE_UNAVAILABLE

Valid key but insufficient: wrong perimeter, missing scope, origin refused, inactive subscription, or module / option not included in the plan.

404NOT_FOUND

Resource not found — or belonging to another workspace, which amounts to the same.

409CONFLICTIDEMPOTENCY_IN_PROGRESS

Conflict: unique value already taken, or same idempotency key still in progress.

422BUSINESS_RULE_VIOLATIONIDEMPOTENCY_KEY_REUSED

Well-formed request but refused by an ERP business rule (forbidden status transition, locked paid document, stock…), or reused idempotency key.

429API_RATE_LIMITEDAPI_AUTH_BLOCKED

Key or workspace quota reached (see Retry-After), or address blocked.

500INTERNAL_ERROR

Unexpected error. Quote requestId to support.

503SERVICE_UNAVAILABLE

Temporarily unavailable (see Retry-After). No infrastructure details.

Request example
curl -X PATCH 'https://quosuite.com/api/public/v1/quosuite/crm/deals/aac39e3a-0c40-44b2-8697-b597f357c5a9' \
  -H "Authorization: Bearer $QUOSUITE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "title": "Équipement atelier BTP Horizon",
  "amount": 42000,
  "currency": "TND",
  "expectedCloseDate": "2026-12-20"
}'
Response example
{
  "success": true,
  "data": {
    "id": "2e69f4db-32f4-46c6-8d3b-3614f407cb99",
    "title": "Équipement atelier BTP Horizon",
    "accountId": "6443098c-7bf2-4812-8cac-1c9d5438fddd",
    "contactId": "876f5ec7-f7dc-435a-8d04-26b625cfaead",
    "pipelineId": "426a702d-1f21-4952-89db-8e069d3e565d",
    "stageId": "66358d3d-f38e-4482-8c4a-96784e51d8e1",
    "stageName": "Négociation",
    "status": "OPEN",
    "statusLabel": "Ouverte",
    "amount": 42000,
    "currency": "TND",
    "probability": 75,
    "weightedAmount": 31500,
    "expectedCloseDate": "2026-12-20",
    "ownerId": "332806c4-2ef5-4aca-8355-483d344c51d5",
    "ownerName": null,
    "lostReason": null,
    "source": null,
    "description": null,
    "leadId": "8d012a2d-740a-4282-82be-a54283e63615",
    "stageChangedAt": "2026-10-02T09:15:00.000Z",
    "lastActivityAt": "2026-10-02T09:15:00.000Z",
    "closedAt": "2026-10-02T09:15:00.000Z",
    "archived": true,
    "lines": [
      {
        "id": "a0bf6e21-0769-41e2-8e0d-b8126ac89ff5",
        "articleId": "8bc5a87b-4885-4296-8e2f-169e920ce389",
        "label": "Établi d’atelier 2 m",
        "quantity": 6,
        "unitPrice": 890,
        "discountPct": 0,
        "vatRate": 19,
        "total": 5340
      }
    ],
    "documents": [
      {
        "documentId": "2cbae947-e0de-49a6-8612-6aa08420a959",
        "number": "DEV-2026-0021",
        "type": "DEVIS",
        "typeLabel": "Devis",
        "status": "DRAFT",
        "origin": "GENERATED"
      }
    ],
    "createdAt": "2026-10-02T09:15:00.000Z",
    "updatedAt": "2026-10-02T09:15:00.000Z"
  },
  "timestamp": "2026-10-02T09:15:00.000Z"
}

Mark a deal lost #

POST/api/public/v1/quosuite/crm/deals/{id}/lost
Scope : crm:writeloseCrmDeal

Reason required; sends crm_deal.lost.

Parameters

  • idstring (uuid)pathrequired

Request body application/json

  • reasonstringrequired
    e.g.Prix trop élevé

Response 200application/json

Success.

  • idstring (uuid)required
  • titlestringrequired
    e.g.Équipement atelier BTP Horizon
  • accountIdstring (uuid) | null
  • contactIdstring (uuid) | null
  • pipelineIdstring (uuid)required
  • stageIdstring (uuid)required
  • stageNamestringrequired
    e.g.Négociation
  • statusstringrequired
    valuesOPENWONLOST
  • statusLabelstringrequired
    e.g.Ouverte
  • amountnumberrequired

    Amount excl. tax (total of the lines if any).

    e.g.42000
  • currencystringrequired
    e.g.TND
  • probabilitynumberrequired

    Probability 0–100.

    e.g.75
  • weightedAmountnumberrequired

    Amount × probability.

    e.g.31500
  • expectedCloseDatestring | null
    e.g.2026-12-20
  • ownerIdstring (uuid) | null
  • ownerNamestring | null
  • lostReasonstring | null
  • sourcestring | null
  • descriptionstring | null
  • leadIdstring (uuid) | null

    Original lead.

  • stageChangedAtstringrequired

    Entry into the current stage.

  • lastActivityAtstringrequired

    Last sales action (activity, move…).

  • closedAtstring | null
  • archivedbooleanrequired
  • linesCrmDealLineDto[]required
    CrmDealLineDto details
  • documentsCrmDealDocumentDto[]required

    Linked sales documents.

    CrmDealDocumentDto details
  • createdAtstringrequired
  • updatedAtstringrequired

Errors

400VALIDATION_FAILEDIDEMPOTENCY_KEY_INVALIDINVALID_CURSOR

Invalid parameter or body (missing, unknown or mistyped field, sort not allowed), or pagination cursor issued for another sort or other filters.

401API_KEY_MISSINGAPI_KEY_INVALIDAPI_KEY_REVOKEDAPI_KEY_EXPIRED

Key missing, invalid, revoked or expired.

403API_KEY_WRONG_PERIMETERAPI_INSUFFICIENT_SCOPEAPI_ORIGIN_NOT_ALLOWEDAPI_TENANT_MISMATCHAPI_TENANT_INACTIVEAPI_MODULE_UNAVAILABLEAPI_FEATURE_UNAVAILABLE

Valid key but insufficient: wrong perimeter, missing scope, origin refused, inactive subscription, or module / option not included in the plan.

404NOT_FOUND

Resource not found — or belonging to another workspace, which amounts to the same.

409CONFLICTIDEMPOTENCY_IN_PROGRESS

Conflict: unique value already taken, or same idempotency key still in progress.

422BUSINESS_RULE_VIOLATIONIDEMPOTENCY_KEY_REUSED

Well-formed request but refused by an ERP business rule (forbidden status transition, locked paid document, stock…), or reused idempotency key.

429API_RATE_LIMITEDAPI_AUTH_BLOCKED

Key or workspace quota reached (see Retry-After), or address blocked.

500INTERNAL_ERROR

Unexpected error. Quote requestId to support.

503SERVICE_UNAVAILABLE

Temporarily unavailable (see Retry-After). No infrastructure details.

Request example
curl -X POST 'https://quosuite.com/api/public/v1/quosuite/crm/deals/aac39e3a-0c40-44b2-8697-b597f357c5a9/lost' \
  -H "Authorization: Bearer $QUOSUITE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "reason": "Prix trop élevé"
}'
Response example
{
  "success": true,
  "data": {
    "id": "2e69f4db-32f4-46c6-8d3b-3614f407cb99",
    "title": "Équipement atelier BTP Horizon",
    "accountId": "6443098c-7bf2-4812-8cac-1c9d5438fddd",
    "contactId": "876f5ec7-f7dc-435a-8d04-26b625cfaead",
    "pipelineId": "426a702d-1f21-4952-89db-8e069d3e565d",
    "stageId": "66358d3d-f38e-4482-8c4a-96784e51d8e1",
    "stageName": "Négociation",
    "status": "OPEN",
    "statusLabel": "Ouverte",
    "amount": 42000,
    "currency": "TND",
    "probability": 75,
    "weightedAmount": 31500,
    "expectedCloseDate": "2026-12-20",
    "ownerId": "332806c4-2ef5-4aca-8355-483d344c51d5",
    "ownerName": null,
    "lostReason": null,
    "source": null,
    "description": null,
    "leadId": "8d012a2d-740a-4282-82be-a54283e63615",
    "stageChangedAt": "2026-10-02T09:15:00.000Z",
    "lastActivityAt": "2026-10-02T09:15:00.000Z",
    "closedAt": "2026-10-02T09:15:00.000Z",
    "archived": true,
    "lines": [
      {
        "id": "a0bf6e21-0769-41e2-8e0d-b8126ac89ff5",
        "articleId": "8bc5a87b-4885-4296-8e2f-169e920ce389",
        "label": "Établi d’atelier 2 m",
        "quantity": 6,
        "unitPrice": 890,
        "discountPct": 0,
        "vatRate": 19,
        "total": 5340
      }
    ],
    "documents": [
      {
        "documentId": "2cbae947-e0de-49a6-8612-6aa08420a959",
        "number": "DEV-2026-0021",
        "type": "DEVIS",
        "typeLabel": "Devis",
        "status": "DRAFT",
        "origin": "GENERATED"
      }
    ],
    "createdAt": "2026-10-02T09:15:00.000Z",
    "updatedAt": "2026-10-02T09:15:00.000Z"
  },
  "timestamp": "2026-10-02T09:15:00.000Z"
}

Generate a deal’s quote #

POST/api/public/v1/quosuite/crm/deals/{id}/quote
Scope : crm:writeIdempotentquoteCrmDeal

Creates a draft ERP quote for the account’s customer, in the deal’s currency, with its lines — ERP numbering, customer price list, taxes and multi-currency check. The account must have a customer record, or createClient: true. The quote is then read with GET /sales/quotes/{id}.

Additional required scopes: sales:write.

Parameters

  • idstring (uuid)pathrequired
  • Idempotency-Keystringheader

    Idempotency key (1–255 printable ASCII characters, UUID v4 recommended). A retry with the same key and the same body within 24 h replays the response of the first successful call (header Idempotent-Replayed: true) instead of creating a second time. Same key, different body: 422 IDEMPOTENCY_KEY_REUSED. First call still in progress: 409 IDEMPOTENCY_IN_PROGRESS.

Request body application/json

  • validUntilstring

    Quote validity.

    e.g.2026-12-31
  • createClientboolean

    Create the account’s ERP customer record if it has none (otherwise 422).

    defaultfalse

Response 201application/json

Created.

  • dealCrmDealDtorequired

    The deal, with the linked document.

    CrmDealDto details
  • quoteCrmDealDocumentDtorequired

    The created quote (draft).

    CrmDealDocumentDto details

Errors

400VALIDATION_FAILEDIDEMPOTENCY_KEY_INVALIDINVALID_CURSOR

Invalid parameter or body (missing, unknown or mistyped field, sort not allowed), or pagination cursor issued for another sort or other filters.

401API_KEY_MISSINGAPI_KEY_INVALIDAPI_KEY_REVOKEDAPI_KEY_EXPIRED

Key missing, invalid, revoked or expired.

402PLAN_QUOTA_EXCEEDEDFEATURE_NOT_INCLUDEDMODULE_NOT_INCLUDED

Subscription plan limit or option (monthly document quota, multi-currency…).

403API_KEY_WRONG_PERIMETERAPI_INSUFFICIENT_SCOPEAPI_ORIGIN_NOT_ALLOWEDAPI_TENANT_MISMATCHAPI_TENANT_INACTIVEAPI_MODULE_UNAVAILABLEAPI_FEATURE_UNAVAILABLE

Valid key but insufficient: wrong perimeter, missing scope, origin refused, inactive subscription, or module / option not included in the plan.

404NOT_FOUND

Resource not found — or belonging to another workspace, which amounts to the same.

409CONFLICTIDEMPOTENCY_IN_PROGRESS

Conflict: unique value already taken, or same idempotency key still in progress.

422BUSINESS_RULE_VIOLATIONIDEMPOTENCY_KEY_REUSED

Well-formed request but refused by an ERP business rule (forbidden status transition, locked paid document, stock…), or reused idempotency key.

429API_RATE_LIMITEDAPI_AUTH_BLOCKED

Key or workspace quota reached (see Retry-After), or address blocked.

500INTERNAL_ERROR

Unexpected error. Quote requestId to support.

503SERVICE_UNAVAILABLE

Temporarily unavailable (see Retry-After). No infrastructure details.

Request example
# One key per operation, reused as is on every retry.
curl -X POST 'https://quosuite.com/api/public/v1/quosuite/crm/deals/aac39e3a-0c40-44b2-8697-b597f357c5a9/quote' \
  -H "Authorization: Bearer $QUOSUITE_API_KEY" \
  -H 'Idempotency-Key: 3f1c2a9e-5b7d-4e8a-9c1f-2d6b8e4a7c30' \
  -H 'Content-Type: application/json' \
  -d '{
  "validUntil": "2026-12-31"
}'
Response example
{
  "success": true,
  "data": {
    "deal": {
      "id": "2e69f4db-32f4-46c6-8d3b-3614f407cb99",
      "title": "Équipement atelier BTP Horizon",
      "accountId": "6443098c-7bf2-4812-8cac-1c9d5438fddd",
      "contactId": "876f5ec7-f7dc-435a-8d04-26b625cfaead",
      "pipelineId": "426a702d-1f21-4952-89db-8e069d3e565d",
      "stageId": "66358d3d-f38e-4482-8c4a-96784e51d8e1",
      "stageName": "Négociation",
      "status": "OPEN",
      "statusLabel": "Ouverte",
      "amount": 42000,
      "currency": "TND",
      "probability": 75,
      "weightedAmount": 31500,
      "expectedCloseDate": "2026-12-20",
      "ownerId": "332806c4-2ef5-4aca-8355-483d344c51d5",
      "ownerName": null,
      "lostReason": null,
      "source": null,
      "description": null,
      "leadId": "8d012a2d-740a-4282-82be-a54283e63615",
      "stageChangedAt": "2026-10-02T09:15:00.000Z",
      "lastActivityAt": "2026-10-02T09:15:00.000Z",
      "closedAt": "2026-10-02T09:15:00.000Z",
      "archived": true,
      "lines": [
        {
          "id": "a0bf6e21-0769-41e2-8e0d-b8126ac89ff5",
          "articleId": "8bc5a87b-4885-4296-8e2f-169e920ce389",
          "label": "Établi d’atelier 2 m",
          "quantity": 6,
          "unitPrice": 890,
          "discountPct": 0,
          "vatRate": 19,
          "total": 5340
        }
      ],
      "documents": [
        {
          "documentId": "2cbae947-e0de-49a6-8612-6aa08420a959",
          "number": "DEV-2026-0021",
          "type": "DEVIS",
          "typeLabel": "Devis",
          "status": "DRAFT",
          "origin": "GENERATED"
        }
      ],
      "createdAt": "2026-10-02T09:15:00.000Z",
      "updatedAt": "2026-10-02T09:15:00.000Z"
    },
    "quote": {
      "documentId": "2cbae947-e0de-49a6-8612-6aa08420a959",
      "number": "DEV-2026-0021",
      "type": "DEVIS",
      "typeLabel": "Devis",
      "status": "DRAFT",
      "origin": "GENERATED"
    }
  },
  "timestamp": "2026-10-02T09:15:00.000Z"
}

Reopen a closed deal #

POST/api/public/v1/quosuite/crm/deals/{id}/reopen
Scope : crm:writereopenCrmDeal

Parameters

  • idstring (uuid)pathrequired

Request body application/json

  • stageIdstring (uuid)

    Reopening stage (default: the last one).

Response 200application/json

Success.

  • idstring (uuid)required
  • titlestringrequired
    e.g.Équipement atelier BTP Horizon
  • accountIdstring (uuid) | null
  • contactIdstring (uuid) | null
  • pipelineIdstring (uuid)required
  • stageIdstring (uuid)required
  • stageNamestringrequired
    e.g.Négociation
  • statusstringrequired
    valuesOPENWONLOST
  • statusLabelstringrequired
    e.g.Ouverte
  • amountnumberrequired

    Amount excl. tax (total of the lines if any).

    e.g.42000
  • currencystringrequired
    e.g.TND
  • probabilitynumberrequired

    Probability 0–100.

    e.g.75
  • weightedAmountnumberrequired

    Amount × probability.

    e.g.31500
  • expectedCloseDatestring | null
    e.g.2026-12-20
  • ownerIdstring (uuid) | null
  • ownerNamestring | null
  • lostReasonstring | null
  • sourcestring | null
  • descriptionstring | null
  • leadIdstring (uuid) | null

    Original lead.

  • stageChangedAtstringrequired

    Entry into the current stage.

  • lastActivityAtstringrequired

    Last sales action (activity, move…).

  • closedAtstring | null
  • archivedbooleanrequired
  • linesCrmDealLineDto[]required
    CrmDealLineDto details
  • documentsCrmDealDocumentDto[]required

    Linked sales documents.

    CrmDealDocumentDto details
  • createdAtstringrequired
  • updatedAtstringrequired

Errors

400VALIDATION_FAILEDIDEMPOTENCY_KEY_INVALIDINVALID_CURSOR

Invalid parameter or body (missing, unknown or mistyped field, sort not allowed), or pagination cursor issued for another sort or other filters.

401API_KEY_MISSINGAPI_KEY_INVALIDAPI_KEY_REVOKEDAPI_KEY_EXPIRED

Key missing, invalid, revoked or expired.

403API_KEY_WRONG_PERIMETERAPI_INSUFFICIENT_SCOPEAPI_ORIGIN_NOT_ALLOWEDAPI_TENANT_MISMATCHAPI_TENANT_INACTIVEAPI_MODULE_UNAVAILABLEAPI_FEATURE_UNAVAILABLE

Valid key but insufficient: wrong perimeter, missing scope, origin refused, inactive subscription, or module / option not included in the plan.

404NOT_FOUND

Resource not found — or belonging to another workspace, which amounts to the same.

409CONFLICTIDEMPOTENCY_IN_PROGRESS

Conflict: unique value already taken, or same idempotency key still in progress.

422BUSINESS_RULE_VIOLATIONIDEMPOTENCY_KEY_REUSED

Well-formed request but refused by an ERP business rule (forbidden status transition, locked paid document, stock…), or reused idempotency key.

429API_RATE_LIMITEDAPI_AUTH_BLOCKED

Key or workspace quota reached (see Retry-After), or address blocked.

500INTERNAL_ERROR

Unexpected error. Quote requestId to support.

503SERVICE_UNAVAILABLE

Temporarily unavailable (see Retry-After). No infrastructure details.

Request example
curl -X POST 'https://quosuite.com/api/public/v1/quosuite/crm/deals/aac39e3a-0c40-44b2-8697-b597f357c5a9/reopen' \
  -H "Authorization: Bearer $QUOSUITE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "stageId": "a1bd7d9b-e983-4246-8947-6e1e7573b419"
}'
Response example
{
  "success": true,
  "data": {
    "id": "2e69f4db-32f4-46c6-8d3b-3614f407cb99",
    "title": "Équipement atelier BTP Horizon",
    "accountId": "6443098c-7bf2-4812-8cac-1c9d5438fddd",
    "contactId": "876f5ec7-f7dc-435a-8d04-26b625cfaead",
    "pipelineId": "426a702d-1f21-4952-89db-8e069d3e565d",
    "stageId": "66358d3d-f38e-4482-8c4a-96784e51d8e1",
    "stageName": "Négociation",
    "status": "OPEN",
    "statusLabel": "Ouverte",
    "amount": 42000,
    "currency": "TND",
    "probability": 75,
    "weightedAmount": 31500,
    "expectedCloseDate": "2026-12-20",
    "ownerId": "332806c4-2ef5-4aca-8355-483d344c51d5",
    "ownerName": null,
    "lostReason": null,
    "source": null,
    "description": null,
    "leadId": "8d012a2d-740a-4282-82be-a54283e63615",
    "stageChangedAt": "2026-10-02T09:15:00.000Z",
    "lastActivityAt": "2026-10-02T09:15:00.000Z",
    "closedAt": "2026-10-02T09:15:00.000Z",
    "archived": true,
    "lines": [
      {
        "id": "a0bf6e21-0769-41e2-8e0d-b8126ac89ff5",
        "articleId": "8bc5a87b-4885-4296-8e2f-169e920ce389",
        "label": "Établi d’atelier 2 m",
        "quantity": 6,
        "unitPrice": 890,
        "discountPct": 0,
        "vatRate": 19,
        "total": 5340
      }
    ],
    "documents": [
      {
        "documentId": "2cbae947-e0de-49a6-8612-6aa08420a959",
        "number": "DEV-2026-0021",
        "type": "DEVIS",
        "typeLabel": "Devis",
        "status": "DRAFT",
        "origin": "GENERATED"
      }
    ],
    "createdAt": "2026-10-02T09:15:00.000Z",
    "updatedAt": "2026-10-02T09:15:00.000Z"
  },
  "timestamp": "2026-10-02T09:15:00.000Z"
}

Advance a deal (change stage) #

POST/api/public/v1/quosuite/crm/deals/{id}/stage
Scope : crm:writemoveCrmDeal

Write conditioned on the stage read: two simultaneous moves, the second gets 409. A closed deal does not change stage (reopen it first); the stage must belong to the pipeline (CRM_STAGE_PIPELINE_MISMATCH). Sends crm_deal.stage_changed and triggers the “deal enters a stage” automations.

Parameters

  • idstring (uuid)pathrequired

Request body application/json

  • stageIdstring (uuid)required

    Target stage (of the deal’s pipeline, or of pipelineId).

  • pipelineIdstring (uuid)

    Also change pipeline.

Response 200application/json

Success.

  • idstring (uuid)required
  • titlestringrequired
    e.g.Équipement atelier BTP Horizon
  • accountIdstring (uuid) | null
  • contactIdstring (uuid) | null
  • pipelineIdstring (uuid)required
  • stageIdstring (uuid)required
  • stageNamestringrequired
    e.g.Négociation
  • statusstringrequired
    valuesOPENWONLOST
  • statusLabelstringrequired
    e.g.Ouverte
  • amountnumberrequired

    Amount excl. tax (total of the lines if any).

    e.g.42000
  • currencystringrequired
    e.g.TND
  • probabilitynumberrequired

    Probability 0–100.

    e.g.75
  • weightedAmountnumberrequired

    Amount × probability.

    e.g.31500
  • expectedCloseDatestring | null
    e.g.2026-12-20
  • ownerIdstring (uuid) | null
  • ownerNamestring | null
  • lostReasonstring | null
  • sourcestring | null
  • descriptionstring | null
  • leadIdstring (uuid) | null

    Original lead.

  • stageChangedAtstringrequired

    Entry into the current stage.

  • lastActivityAtstringrequired

    Last sales action (activity, move…).

  • closedAtstring | null
  • archivedbooleanrequired
  • linesCrmDealLineDto[]required
    CrmDealLineDto details
  • documentsCrmDealDocumentDto[]required

    Linked sales documents.

    CrmDealDocumentDto details
  • createdAtstringrequired
  • updatedAtstringrequired

Errors

400VALIDATION_FAILEDIDEMPOTENCY_KEY_INVALIDINVALID_CURSOR

Invalid parameter or body (missing, unknown or mistyped field, sort not allowed), or pagination cursor issued for another sort or other filters.

401API_KEY_MISSINGAPI_KEY_INVALIDAPI_KEY_REVOKEDAPI_KEY_EXPIRED

Key missing, invalid, revoked or expired.

403API_KEY_WRONG_PERIMETERAPI_INSUFFICIENT_SCOPEAPI_ORIGIN_NOT_ALLOWEDAPI_TENANT_MISMATCHAPI_TENANT_INACTIVEAPI_MODULE_UNAVAILABLEAPI_FEATURE_UNAVAILABLE

Valid key but insufficient: wrong perimeter, missing scope, origin refused, inactive subscription, or module / option not included in the plan.

404NOT_FOUND

Resource not found — or belonging to another workspace, which amounts to the same.

409CONFLICTIDEMPOTENCY_IN_PROGRESS

Conflict: unique value already taken, or same idempotency key still in progress.

422BUSINESS_RULE_VIOLATIONIDEMPOTENCY_KEY_REUSED

Well-formed request but refused by an ERP business rule (forbidden status transition, locked paid document, stock…), or reused idempotency key.

429API_RATE_LIMITEDAPI_AUTH_BLOCKED

Key or workspace quota reached (see Retry-After), or address blocked.

500INTERNAL_ERROR

Unexpected error. Quote requestId to support.

503SERVICE_UNAVAILABLE

Temporarily unavailable (see Retry-After). No infrastructure details.

Request example
curl -X POST 'https://quosuite.com/api/public/v1/quosuite/crm/deals/aac39e3a-0c40-44b2-8697-b597f357c5a9/stage' \
  -H "Authorization: Bearer $QUOSUITE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "stageId": "3ac41960-b92a-4238-8260-64a975c11dbd"
}'
Response example
{
  "success": true,
  "data": {
    "id": "2e69f4db-32f4-46c6-8d3b-3614f407cb99",
    "title": "Équipement atelier BTP Horizon",
    "accountId": "6443098c-7bf2-4812-8cac-1c9d5438fddd",
    "contactId": "876f5ec7-f7dc-435a-8d04-26b625cfaead",
    "pipelineId": "426a702d-1f21-4952-89db-8e069d3e565d",
    "stageId": "66358d3d-f38e-4482-8c4a-96784e51d8e1",
    "stageName": "Négociation",
    "status": "OPEN",
    "statusLabel": "Ouverte",
    "amount": 42000,
    "currency": "TND",
    "probability": 75,
    "weightedAmount": 31500,
    "expectedCloseDate": "2026-12-20",
    "ownerId": "332806c4-2ef5-4aca-8355-483d344c51d5",
    "ownerName": null,
    "lostReason": null,
    "source": null,
    "description": null,
    "leadId": "8d012a2d-740a-4282-82be-a54283e63615",
    "stageChangedAt": "2026-10-02T09:15:00.000Z",
    "lastActivityAt": "2026-10-02T09:15:00.000Z",
    "closedAt": "2026-10-02T09:15:00.000Z",
    "archived": true,
    "lines": [
      {
        "id": "a0bf6e21-0769-41e2-8e0d-b8126ac89ff5",
        "articleId": "8bc5a87b-4885-4296-8e2f-169e920ce389",
        "label": "Établi d’atelier 2 m",
        "quantity": 6,
        "unitPrice": 890,
        "discountPct": 0,
        "vatRate": 19,
        "total": 5340
      }
    ],
    "documents": [
      {
        "documentId": "2cbae947-e0de-49a6-8612-6aa08420a959",
        "number": "DEV-2026-0021",
        "type": "DEVIS",
        "typeLabel": "Devis",
        "status": "DRAFT",
        "origin": "GENERATED"
      }
    ],
    "createdAt": "2026-10-02T09:15:00.000Z",
    "updatedAt": "2026-10-02T09:15:00.000Z"
  },
  "timestamp": "2026-10-02T09:15:00.000Z"
}

Mark a deal won #

POST/api/public/v1/quosuite/crm/deals/{id}/won
Scope : crm:writewinCrmDeal

Probability 100%, closedAt set; sends crm_deal.won.

Parameters

  • idstring (uuid)pathrequired

Response 200application/json

Success.

  • idstring (uuid)required
  • titlestringrequired
    e.g.Équipement atelier BTP Horizon
  • accountIdstring (uuid) | null
  • contactIdstring (uuid) | null
  • pipelineIdstring (uuid)required
  • stageIdstring (uuid)required
  • stageNamestringrequired
    e.g.Négociation
  • statusstringrequired
    valuesOPENWONLOST
  • statusLabelstringrequired
    e.g.Ouverte
  • amountnumberrequired

    Amount excl. tax (total of the lines if any).

    e.g.42000
  • currencystringrequired
    e.g.TND
  • probabilitynumberrequired

    Probability 0–100.

    e.g.75
  • weightedAmountnumberrequired

    Amount × probability.

    e.g.31500
  • expectedCloseDatestring | null
    e.g.2026-12-20
  • ownerIdstring (uuid) | null
  • ownerNamestring | null
  • lostReasonstring | null
  • sourcestring | null
  • descriptionstring | null
  • leadIdstring (uuid) | null

    Original lead.

  • stageChangedAtstringrequired

    Entry into the current stage.

  • lastActivityAtstringrequired

    Last sales action (activity, move…).

  • closedAtstring | null
  • archivedbooleanrequired
  • linesCrmDealLineDto[]required
    CrmDealLineDto details
  • documentsCrmDealDocumentDto[]required

    Linked sales documents.

    CrmDealDocumentDto details
  • createdAtstringrequired
  • updatedAtstringrequired

Errors

400VALIDATION_FAILEDIDEMPOTENCY_KEY_INVALIDINVALID_CURSOR

Invalid parameter or body (missing, unknown or mistyped field, sort not allowed), or pagination cursor issued for another sort or other filters.

401API_KEY_MISSINGAPI_KEY_INVALIDAPI_KEY_REVOKEDAPI_KEY_EXPIRED

Key missing, invalid, revoked or expired.

403API_KEY_WRONG_PERIMETERAPI_INSUFFICIENT_SCOPEAPI_ORIGIN_NOT_ALLOWEDAPI_TENANT_MISMATCHAPI_TENANT_INACTIVEAPI_MODULE_UNAVAILABLEAPI_FEATURE_UNAVAILABLE

Valid key but insufficient: wrong perimeter, missing scope, origin refused, inactive subscription, or module / option not included in the plan.

404NOT_FOUND

Resource not found — or belonging to another workspace, which amounts to the same.

409CONFLICTIDEMPOTENCY_IN_PROGRESS

Conflict: unique value already taken, or same idempotency key still in progress.

422BUSINESS_RULE_VIOLATIONIDEMPOTENCY_KEY_REUSED

Well-formed request but refused by an ERP business rule (forbidden status transition, locked paid document, stock…), or reused idempotency key.

429API_RATE_LIMITEDAPI_AUTH_BLOCKED

Key or workspace quota reached (see Retry-After), or address blocked.

500INTERNAL_ERROR

Unexpected error. Quote requestId to support.

503SERVICE_UNAVAILABLE

Temporarily unavailable (see Retry-After). No infrastructure details.

Request example
curl -X POST 'https://quosuite.com/api/public/v1/quosuite/crm/deals/aac39e3a-0c40-44b2-8697-b597f357c5a9/won' \
  -H "Authorization: Bearer $QUOSUITE_API_KEY"
Response example
{
  "success": true,
  "data": {
    "id": "2e69f4db-32f4-46c6-8d3b-3614f407cb99",
    "title": "Équipement atelier BTP Horizon",
    "accountId": "6443098c-7bf2-4812-8cac-1c9d5438fddd",
    "contactId": "876f5ec7-f7dc-435a-8d04-26b625cfaead",
    "pipelineId": "426a702d-1f21-4952-89db-8e069d3e565d",
    "stageId": "66358d3d-f38e-4482-8c4a-96784e51d8e1",
    "stageName": "Négociation",
    "status": "OPEN",
    "statusLabel": "Ouverte",
    "amount": 42000,
    "currency": "TND",
    "probability": 75,
    "weightedAmount": 31500,
    "expectedCloseDate": "2026-12-20",
    "ownerId": "332806c4-2ef5-4aca-8355-483d344c51d5",
    "ownerName": null,
    "lostReason": null,
    "source": null,
    "description": null,
    "leadId": "8d012a2d-740a-4282-82be-a54283e63615",
    "stageChangedAt": "2026-10-02T09:15:00.000Z",
    "lastActivityAt": "2026-10-02T09:15:00.000Z",
    "closedAt": "2026-10-02T09:15:00.000Z",
    "archived": true,
    "lines": [
      {
        "id": "a0bf6e21-0769-41e2-8e0d-b8126ac89ff5",
        "articleId": "8bc5a87b-4885-4296-8e2f-169e920ce389",
        "label": "Établi d’atelier 2 m",
        "quantity": 6,
        "unitPrice": 890,
        "discountPct": 0,
        "vatRate": 19,
        "total": 5340
      }
    ],
    "documents": [
      {
        "documentId": "2cbae947-e0de-49a6-8612-6aa08420a959",
        "number": "DEV-2026-0021",
        "type": "DEVIS",
        "typeLabel": "Devis",
        "status": "DRAFT",
        "origin": "GENERATED"
      }
    ],
    "createdAt": "2026-10-02T09:15:00.000Z",
    "updatedAt": "2026-10-02T09:15:00.000Z"
  },
  "timestamp": "2026-10-02T09:15:00.000Z"
}

Generated from the QuoSuite API OpenAPI contract v1.0.0.