API · v1 · stable
CODEMETA OSDeveloper Center
FR
Ouvrir la console

POST /v1/invoices/from-sales-order/{orderId}

POST/v1/invoices/from-sales-order/{orderId}

Create an invoice from a sales order (all or selected items)

Modèle de données

Cette opération porte sur l'entité Invoice (invoice). Les 51 champs (type, validation, caractère obligatoire, relations) figurent dans la référence du schéma.

Corps de la requête

NomTypeDescription
itemIdsstring[]
paymentTermsDaysinteger
defaultVatRatestring

Paramètres de chemin

NomTypeDescription
orderIdobligatoirestring

Exemple

curl -X POST https://api.codemeta-os.de/v1/invoices/from-sales-order/{orderId} \
  -H "X-Tenant-Id: $TENANT" \
  -H "Content-Type: application/json" \
  -b cookies.txt \
  -d '{
  "itemIds": [],
  "paymentTermsDays": 0,
  "defaultVatRate": "string"
}'
const result = await cm.invoices.post({
  "itemIds": [],
  "paymentTermsDays": 0,
  "defaultVatRate": "string"
});

Codes de réponse

HTTP Signification
201 Default Response

Recherche