POST api/v1/liquidations

Creates a liquidation and returns the ID

Request Information

Body Parameters

Information of the liquidation to create

Name Description Type Additional information
DocumentTypeID Liquidation document type ID byte Range: inclusive between 1 and 255
Number Number of the sale related to the liquidation. Leave zero if number must be generated on insert integer No additional information available.
SerieCode ID of the serie that you want to add string Required
Device The device that is adding the sale globally unique identifier No additional information available.
EntityID Target entity ID related to the liquidation integer Range: inclusive between 1 and 9,22337203685478E+18
LiquidationDate The effective date of the liquidation. Cannot be bigger than today's date date The selected date cannot be bigger than today's date
Details List of details in the liquidation Array of AddDetail No additional information available.
Relation Information of the relation with another liquidation, if exists AddLiquidationRelation No additional information available.
ReceivedAmount Amount received in the liquidation decimal number No additional information available.
DiscountAmount Amount discounted decimal number No additional information available.
CreatorUserID The ID of the user who created the liquidation integer No additional information available.
CreationDate The date when liquidation was created date The selected date cannot be bigger than now's date
BankNoteID The ID of the details of the bank payment, if exists integer No additional information available.
CashFlowID The ID of the details of the cash payment, if exists integer No additional information available.
Observation Observations about the liquidation string Max length: 1000

Request Formats

application/json, text/json

Sample:
                    
{
  "documentTypeID": 64,
  "number": 2,
  "serieCode": "sample string 3",
  "device": "888cab03-10ac-45d1-9127-a268e922ad73",
  "entityID": 5,
  "liquidationDate": "2021-10-25T15:04:52.5351091+01:00",
  "details": [
    {
      "saleDocTypeID": 64,
      "saleNumber": 2,
      "saleSerieCode": "sample string 3",
      "discountAmount": 4.0,
      "receivedAmount": 5.0
    },
    {
      "saleDocTypeID": 64,
      "saleNumber": 2,
      "saleSerieCode": "sample string 3",
      "discountAmount": 4.0,
      "receivedAmount": 5.0
    }
  ],
  "relation": {
    "documentTypeID": 64,
    "number": 2,
    "serieCode": "sample string 3"
  },
  "receivedAmount": 7.0,
  "discountAmount": 8.0,
  "creatorUserID": 9,
  "creationDate": "2021-10-25T15:04:52.5351091+01:00",
  "bankNoteID": 1,
  "cashFlowID": 1,
  "observation": "sample string 11"
}
                        
            

Response Information

Resource Description

No information available

Response Formats

application/json, text/json

Sample:
                    
1