mutation CalculateSalesEntity($request: CalculateSalesEntityCommandRequestInput!) {
CalculateSalesEntity(request: $request) {
lineItems {
syncNumber
lineItemType
itemId
quantity
salesPriceNet
salesPriceGross
}
totalNetAmount
totalGrossAmount
totalNetAmountExcludingShipping
totalGrossAmountExcludingShipping
vatId
}
}{
"request": {
"calculateSalesEntityRequest": {
"companyId": "id",
"vatId": "string",
"customerId": "id",
"lineItems": [
{
"syncNumber": 1,
"quantity": "value",
"taxRate": "value",
"totalSalesPriceNet": "value",
"totalSalesPriceGross": "value",
"lineItemType": "CUSTOM"
}
],
"currencyIso": "string",
"currencyFactor": "value",
"departureCountryIso": "string",
"taxSetting": "DELIVERY_WITH_VAT"
},
"recalculateTaxMode": "NO_RECALCULATION",
"changes": [
{}
]
}
}{
"data": {
"CalculateSalesEntity": {
"lineItems": [
{
"syncNumber": 1,
"lineItemType": "CUSTOM",
"itemId": "id",
"quantity": "value",
"salesPriceNet": "value",
"salesPriceGross": "value"
}
],
"totalNetAmount": "value",
"totalGrossAmount": "value",
"totalNetAmountExcludingShipping": "value",
"totalGrossAmountExcludingShipping": "value",
"vatId": "string"
}
}
}CalculateSalesEntity
Recalculate prices, discounts, and taxes for a sales entity from a client-supplied state without persisting it.
If a request with this mutation’s Idempotency-Key was already completed, the response’s extensions contains an idempotency.{responseName} entry with wasReplayed: true.
CalculateSalesEntity(request: CalculateSalesEntityCommandRequestInput!): CalculateSalesEntityCommandResponse!Arguments
The list of calculated sales entity line items.
The total net amount for the sales entity.
The total gross amount for the sales entity.
The total net amount for the sales entity excluding shipping costs.
The total gross amount for the sales entity excluding shipping costs.
The VAT ID of the company for the departure country.
The ISO code of the currency used for the calculated prices.
The currency factor used for the price conversion.
The net shipping cost.
The gross shipping cost.
The VAT amounts grouped by tax rate.
The tax setting applied to the sales entity.
mutation CalculateSalesEntity($request: CalculateSalesEntityCommandRequestInput!) {
CalculateSalesEntity(request: $request) {
lineItems {
syncNumber
lineItemType
itemId
quantity
salesPriceNet
salesPriceGross
}
totalNetAmount
totalGrossAmount
totalNetAmountExcludingShipping
totalGrossAmountExcludingShipping
vatId
}
}{
"request": {
"calculateSalesEntityRequest": {
"companyId": "id",
"vatId": "string",
"customerId": "id",
"lineItems": [
{
"syncNumber": 1,
"quantity": "value",
"taxRate": "value",
"totalSalesPriceNet": "value",
"totalSalesPriceGross": "value",
"lineItemType": "CUSTOM"
}
],
"currencyIso": "string",
"currencyFactor": "value",
"departureCountryIso": "string",
"taxSetting": "DELIVERY_WITH_VAT"
},
"recalculateTaxMode": "NO_RECALCULATION",
"changes": [
{}
]
}
}{
"data": {
"CalculateSalesEntity": {
"lineItems": [
{
"syncNumber": 1,
"lineItemType": "CUSTOM",
"itemId": "id",
"quantity": "value",
"salesPriceNet": "value",
"salesPriceGross": "value"
}
],
"totalNetAmount": "value",
"totalGrossAmount": "value",
"totalNetAmountExcludingShipping": "value",
"totalGrossAmountExcludingShipping": "value",
"vatId": "string"
}
}
}Was this page helpful?