v2

latestSwagger 2.02026-08-01139174369.1 KB
Quote

Generate a sale invoice from a Quote. When sale invoice is empty, new sale invoice will be generated from Quote.

post/v1/quotes/generateSaleInvoice

Request body

quoteIdinteger

Example request

{
  "saleInvoice": {
    "ourReference": "ddNumber_1",
    "yourReference": "poNumber_1",
    "loType": "1",
    "deliveryTo": [
      "dt_1",
      "dt_2"
    ],
    "productTrans": [
      {
        "id": 51820,
        "amount": -220,
        "amountNet": -200,
        "percentage": 10,
        "productId": 20108,
        "productCode": "PRO2",
        "quantity": -1,
        "unitPrice": 200,
        "vat": -20,
        "vatRateId": 30657,
        "vatAnalysisTypeId": 0,
        "useTaxInclusiveUnitPrice": false,
        "tranNotes": [
          "tn_1",
          "tn_2"
        ],
        "acEntries": [
          {
            "id": 73455,
            "accountCode": "SA02",
            "analysisCategoryId": 40889,
            "description": "AnCat1",
            "value": -200
          }
        ]
      }
    ],
    "saleRepId": 33110,
    "useTaxInclusiveUnitPrice": false,
    "customerId": 70585,
    "details": "detail_1",
    "unpaid": -220,
    "vatTypeId": 1,
    "totalNet": -200,
    "totalVAT": -20,
    "id": 75813,
    "bookTranTypeId": 7,
    "acCode": "CUS3",
    "note": "Customer 3",
    "entryDate": "2016-06-01T00:00:00",
    "procDate": "2016-06-24T00:00:00",
    "total": -220,
    "timestamp": "vlxK5vbv3gg=",
    "customFields": [
      {
        "id": 1,
        "userDefinedFieldId": 1,
        "description": "acudf_1",
        "value": "acudfv_1"
      },
      {
        "id": 2,
        "userDefinedFieldId": 1,
        "description": "acudf_2",
        "value": "acudfv_2"
      }
    ]
  }
}

Response

OK

object required