Skip to main content
POST
/
api
/
deals
curl --request POST \
  --url http://xalantis.com/api/deals \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer <token>' \
  --data '{
  "name": "Partenariat 2024",
  "amount": 15000,
  "contact_email": "sophie.martin@example.com",
  "contact_first_name": "Sophie",
  "contact_last_name": "Martin"
}'
{
    "data": {
        "uuid": "8a7b9c1d-2e3f-4g5h-6i7j-8k9l0m1n2o3p",
        "name": "Partenariat 2024",
        "amount": 15000,
        "currency": "EUR",
        "status": "open",
        "probability": 10,
        "pipeline": {
            "id": 1,
            "name": "Vente Standard"
        },
        "stage": {
            "id": 15,
            "name": "Nouveau lead",
            "color": "#3b82f6"
        },
        "contact": {
            "uuid": "1b2c3d4e-5f6g-7h8i-9j0k-1l2m3n4o5p6q",
            "full_name": "Sophie Martin",
            "email": "sophie.martin@example.com"
        },
        "created_at": "2024-03-20T10:00:00.000000Z"
    }
}

Documentation Index

Fetch the complete documentation index at: https://docs.xalantis.com/llms.txt

Use this file to discover all available pages before exploring further.

Crée une nouvelle opportunité (Deal). Cette méthode gère intelligemment la création ou l’association du contact.

Fonctionnement “Intelligent”

L’API vérifie d’abord si un contact existe avec l’email fourni (contact_email).
  • Si oui : Le deal est associé à ce contact existant.
  • Si non : Un nouveau contact est créé automatiquement avec les informations fournies.

Body

name
string
required
Le nom de l’opportunité (ex: “Contrat Annuel”).
amount
number
Montant estimé du deal.
currency
string
default:"EUR"
Code devise (EUR, USD, XOF…).
pipeline_id
integer
ID du pipeline. Si non fourni, utilise le pipeline par défaut.
stage_id
integer
ID de l’étape. Si non fourni, utilise la première étape du pipeline.
expected_close_date
string
Date de clôture estimée (YYYY-MM-DD).
contact_email
string
required
Email du contact principal. Utilisé pour la recherche ou la création.
contact_first_name
string
Prénom du contact (requis si création d’un nouveau contact).
contact_last_name
string
Nom de famille du contact.
contact_phone
string
Téléphone du contact.
curl --request POST \
  --url http://xalantis.com/api/deals \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer <token>' \
  --data '{
  "name": "Partenariat 2024",
  "amount": 15000,
  "contact_email": "sophie.martin@example.com",
  "contact_first_name": "Sophie",
  "contact_last_name": "Martin"
}'
{
    "data": {
        "uuid": "8a7b9c1d-2e3f-4g5h-6i7j-8k9l0m1n2o3p",
        "name": "Partenariat 2024",
        "amount": 15000,
        "currency": "EUR",
        "status": "open",
        "probability": 10,
        "pipeline": {
            "id": 1,
            "name": "Vente Standard"
        },
        "stage": {
            "id": 15,
            "name": "Nouveau lead",
            "color": "#3b82f6"
        },
        "contact": {
            "uuid": "1b2c3d4e-5f6g-7h8i-9j0k-1l2m3n4o5p6q",
            "full_name": "Sophie Martin",
            "email": "sophie.martin@example.com"
        },
        "created_at": "2024-03-20T10:00:00.000000Z"
    }
}