Formules

Ensembles de prestations et produits avec leurs propres prix.

Valeurs des exemples

Saisissez-les une fois : tous les exemples de cette page les utilisent. La clé d’API reste sur cette page et n’est jamais enregistrée.

GET/v1/packages

Liste les formules du catalogue.

ListerEn cas de succès : 200.Permission : Lire.

Paramètres de requête

ChampTypeObligatoireNotes
pageintegerNonmin 1 · default 1
pageSizeintegerNonmin 1 · max 100 · default 25
qstringNonmin length 1 · max length 200
archivedstringNon

Réponse

30 champs
ChampTypeToujours présent
[].archivedbooleanOui
[].createdAtstring (date-time)Oui
[].createdBystring (uuid)Oui
[].currencystringOui
[].descriptionnull dans les exemplesOui
[].discountnull dans les exemplesOui
[].discountAmountintegerOui
[].discountPricesobjectOui
[].idstring (uuid)Oui
[].imagesarray of objectOui
[].images[].idstring (uuid)Oui
[].images[].urlstring (uri)Oui
[].itemsarray of objectOui
[].items[].catalogPriceintegerOui
[].items[].descriptionnull dans les exemplesOui
[].items[].kindstringOui
[].items[].namestringOui
[].items[].pricesobjectOui
[].items[].quantityintegerOui
[].items[].serviceIdstring (uuid)Oui
[].items[].skunull dans les exemplesOui
[].items[].unitPriceintegerOui
[].namestringOui
[].organizationIdstring (uuid)Oui
[].publicVisiblebooleanOui
[].subtotalintegerOui
[].totalintegerOui
[].totalsobjectOui
[].updatedAtstring (date-time)Oui
[].updatedBystring (uuid)Oui
Exemple
curl -X GET "https://api.firmado.app/v1/packages" \
  -H "X-Api-Key: fmd_..."

Réponse (200), avec des valeurs d’exemple :

[
  {
    "archived": true,
    "createdAt": "2026-11-21T14:00:00.000Z",
    "createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
    "currency": "USD",
    "description": null,
    "discount": null,
    "discountAmount": 1,
    "discountPrices": {},
    "id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
    "images": [
      {}
    ],
    "items": [
      {}
    ],
    "name": "Ana Lima",
    "organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
    "publicVisible": true,
    "subtotal": 1,
    "total": 1,
    "totals": {},
    "updatedAt": "2026-11-21T14:00:00.000Z",
    "updatedBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
  }
]

POST/v1/packages

Crée une formule de prestations et de produits.

CréerEn cas de succès : 201.Permission : Créer.

Corps

ChampTypeObligatoireNotes
namestringOuimin length 1 · max length 100
descriptionstring | nullNon
currencystringNonpattern ^[A-Z]{3}$
itemsarray of objectOuimin items 1 · max items 50
items[].serviceIdstring (uuid)Oui
items[].quantityintegerNonmin 1 · max 100000 · default 1
items[].unitPriceintegerNonmin 0 · max 10000000000000
items[].pricesobject of integerNon
discountobject | nullNon
discountPricesobject of integerNon
publicVisiblebooleanNon
archivedbooleanNon

Réponse

37 champs
ChampTypeToujours présent
archivedbooleanOui
createdAtstring (date-time)Oui
createdBystring (uuid)Oui
currencystringOui
descriptionnull dans les exemplesOui
discountobject | nullOui
discount.typestringOui
discount.valuenumberOui
discountAmountintegerOui
discountPricesobjectOui
discountPrices.USDintegerNon
idstring (uuid)Oui
imagesarray of anyOui
itemsarray of objectOui
items[].catalogPriceintegerOui
items[].descriptionstring | nullOui
items[].kindstringOui
items[].namestringOui
items[].pricesobjectOui
items[].prices.BRLintegerNon
items[].prices.USDintegerNon
items[].quantityintegerOui
items[].serviceIdstring (uuid)Oui
items[].skustring | nullOui
items[].unitPriceintegerOui
namestringOui
organizationIdstring (uuid)Oui
publicVisiblebooleanOui
subtotalintegerOui
totalintegerOui
totalsobjectOui
totals.USDobjectNon
totals.USD.discountAmountintegerOui
totals.USD.subtotalintegerOui
totals.USD.totalintegerOui
updatedAtstring (date-time)Oui
updatedBystring (uuid)Oui
Exemple
curl -X POST "https://api.firmado.app/v1/packages" \
  -H "X-Api-Key: fmd_..." \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Ana Lima",
  "items": [
    {
      "serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
      "quantity": 1,
      "unitPrice": 0,
      "prices": {}
    }
  ],
  "description": "…",
  "currency": "USD"
}'

Réponse (201), avec des valeurs d’exemple :

{
  "archived": true,
  "createdAt": "2026-11-21T14:00:00.000Z",
  "createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
  "currency": "USD",
  "description": null,
  "discount": {
    "type": "…",
    "value": 1
  },
  "discountAmount": 1,
  "discountPrices": {
    "USD": 1
  },
  "id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
  "images": [],
  "items": [
    {
      "catalogPrice": 1,
      "description": "…",
      "kind": "…",
      "name": "Ana Lima",
      "prices": {},
      "quantity": 1,
      "serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
      "sku": "…",
      "unitPrice": 1
    }
  ],
  "name": "Ana Lima",
  "organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
  "publicVisible": true,
  "subtotal": 1,
  "total": 1,
  "totals": {
    "USD": {
      "subtotal": 1,
      "discountAmount": 1,
      "total": 1
    }
  },
  "updatedAt": "2026-11-21T14:00:00.000Z",
  "updatedBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}

DELETE/v1/packages/{id}

Supprime une formule ; les propositions et factures gardent leurs copies.

SupprimerEn cas de succès : 204.Permission : Supprimer.

Paramètres de chemin

ChampTypeObligatoireNotes
idstringOui
Exemple
curl -X DELETE "https://api.firmado.app/v1/packages/{id}" \
  -H "X-Api-Key: fmd_..."

GET/v1/packages/{id}

Renvoie une formule avec ses articles et ses prix.

Voir unEn cas de succès : 200.Permission : Lire.

Paramètres de chemin

ChampTypeObligatoireNotes
idstringOui

Réponse

30 champs
ChampTypeToujours présent
archivedbooleanOui
createdAtstring (date-time)Oui
createdBystring (uuid)Oui
currencystringOui
descriptionnull dans les exemplesOui
discountobject | nullOui
discount.typestringOui
discount.valueintegerOui
discountAmountintegerOui
discountPricesobjectOui
idstring (uuid)Oui
imagesarray of anyOui
itemsarray of objectOui
items[].catalogPriceintegerOui
items[].descriptionnull dans les exemplesOui
items[].kindstringOui
items[].namestringOui
items[].pricesobjectOui
items[].quantityintegerOui
items[].serviceIdstring (uuid)Oui
items[].skunull dans les exemplesOui
items[].unitPriceintegerOui
namestringOui
organizationIdstring (uuid)Oui
publicVisiblebooleanOui
subtotalintegerOui
totalintegerOui
totalsobjectOui
updatedAtstring (date-time)Oui
updatedBystring (uuid)Oui
Exemple
curl -X GET "https://api.firmado.app/v1/packages/{id}" \
  -H "X-Api-Key: fmd_..."

Réponse (200), avec des valeurs d’exemple :

{
  "archived": true,
  "createdAt": "2026-11-21T14:00:00.000Z",
  "createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
  "currency": "USD",
  "description": null,
  "discount": {
    "type": "…",
    "value": 1
  },
  "discountAmount": 1,
  "discountPrices": {},
  "id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
  "images": [],
  "items": [
    {
      "serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
      "quantity": 1,
      "unitPrice": 1,
      "prices": {},
      "kind": "…",
      "sku": null,
      "name": "Ana Lima",
      "description": null,
      "catalogPrice": 1
    }
  ],
  "name": "Ana Lima",
  "organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
  "publicVisible": true,
  "subtotal": 1,
  "total": 1,
  "totals": {},
  "updatedAt": "2026-11-21T14:00:00.000Z",
  "updatedBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}

PATCH/v1/packages/{id}

Modifie une formule : articles, prix et visibilité.

ModifierEn cas de succès : 200.Permission : Modifier.

Paramètres de chemin

ChampTypeObligatoireNotes
idstringOui

Corps

ChampTypeObligatoireNotes
namestringNonmin length 1 · max length 100
descriptionstring | nullNon
currencystringNonpattern ^[A-Z]{3}$
itemsarray of objectNonmin items 1 · max items 50
items[].serviceIdstring (uuid)Oui
items[].quantityintegerNonmin 1 · max 100000 · default 1
items[].unitPriceintegerNonmin 0 · max 10000000000000
items[].pricesobject of integerNon
discountobject | nullNon
discountPricesobject of integerNon
publicVisiblebooleanNon
archivedbooleanNon

Réponse

37 champs
ChampTypeToujours présent
archivedbooleanOui
createdAtstring (date-time)Oui
createdBystring (uuid)Oui
currencystringOui
descriptionnull dans les exemplesOui
discountobject | nullOui
discount.typestringOui
discount.valueintegerOui
discountAmountintegerOui
discountPricesobjectOui
discountPrices.USDintegerNon
idstring (uuid)Oui
imagesarray of anyOui
itemsarray of objectOui
items[].catalogPriceintegerOui
items[].descriptionnull dans les exemplesOui
items[].kindstringOui
items[].namestringOui
items[].pricesobjectOui
items[].prices.BRLintegerNon
items[].prices.USDintegerNon
items[].quantityintegerOui
items[].serviceIdstring (uuid)Oui
items[].skunull dans les exemplesOui
items[].unitPriceintegerOui
namestringOui
organizationIdstring (uuid)Oui
publicVisiblebooleanOui
subtotalintegerOui
totalintegerOui
totalsobjectOui
totals.USDobjectNon
totals.USD.discountAmountintegerOui
totals.USD.subtotalintegerOui
totals.USD.totalintegerOui
updatedAtstring (date-time)Oui
updatedBystring (uuid)Oui
Exemple
curl -X PATCH "https://api.firmado.app/v1/packages/{id}" \
  -H "X-Api-Key: fmd_..." \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Ana Lima",
  "description": "…",
  "currency": "USD",
  "items": [
    {
      "serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
      "quantity": 1,
      "unitPrice": 0,
      "prices": {}
    }
  ]
}'

Réponse (200), avec des valeurs d’exemple :

{
  "archived": true,
  "createdAt": "2026-11-21T14:00:00.000Z",
  "createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
  "currency": "USD",
  "description": null,
  "discount": {
    "type": "…",
    "value": 1
  },
  "discountAmount": 1,
  "discountPrices": {
    "USD": 1
  },
  "id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
  "images": [],
  "items": [
    {
      "catalogPrice": 1,
      "description": null,
      "kind": "…",
      "name": "Ana Lima",
      "prices": {},
      "quantity": 1,
      "serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
      "sku": null,
      "unitPrice": 1
    }
  ],
  "name": "Ana Lima",
  "organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
  "publicVisible": true,
  "subtotal": 1,
  "total": 1,
  "totals": {
    "USD": {
      "subtotal": 1,
      "discountAmount": 1,
      "total": 1
    }
  },
  "updatedAt": "2026-11-21T14:00:00.000Z",
  "updatedBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}

POST/v1/packages/{id}/images

Envoie une photo pour une formule.

Modifier/{id}/imagesEn cas de succès : 201.Permission : Modifier.

Paramètres de chemin

ChampTypeObligatoireNotes
idstringOui

Corps : un formulaire multipart, avec le fichier dans `file`

ChampTypeObligatoireNotes
filestring (binary)Oui

Réponse

3 champs
ChampTypeToujours présent
imagesarray of objectOui
images[].idstring (uuid)Oui
images[].urlstring (uri)Oui
Exemple
curl -X POST "https://api.firmado.app/v1/packages/{id}/images" \
  -H "X-Api-Key: fmd_..." \
  -F "file=@./file.pdf"

Réponse (201), avec des valeurs d’exemple :

{
  "images": [
    {
      "id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
      "url": "https://example.com"
    }
  ]
}

DELETE/v1/packages/{id}/images/{imageId}

Retire la photo d’une formule.

Supprimer/{id}/images/{imageId}En cas de succès : 200.Permission : Supprimer.

Paramètres de chemin

ChampTypeObligatoireNotes
idstringOui
imageIdstringOui
Exemple
curl -X DELETE "https://api.firmado.app/v1/packages/{id}/images/{imageId}" \
  -H "X-Api-Key: fmd_..."

Événements de webhook

Les changements de cette fonctionnalité que les webhooks peuvent envoyer.

  • package.createdCréer
  • package.updatedModifier
  • package.deletedSupprimer