Finish a shopping session
Validates the session, converts it into a POS receipt with its items and payments, and returns the receipt (201, `Location` header pointing at the receipt detail). Returns 400 with every validation violation in `messages` when the basket or its payments are not consistent. Cannot be undone. Requires `Permissions.PosShoppingSession.Update`.
BearerAuthorizationBearer <token>OAuth 2.0 client credentials. Obtain a client id/secret from Winshop support ([email protected]), then POST to the token URL.
sessionId*integerint64application/json- response
a4Print?boolean|nullapprovalOfLimitIncreaseUserId?|int32branchId?|int32brokerId?|int32cancellationReasonId?|int32cardType?|int32cashOnDeliveryInternalNumber?|int32cashRoundingAmount?|decimalcnbForeignExchangeRate?|decimalcreatedAt?|date-timecreditCardWithdrawalAmount?|decimalcustomerCardId?|int32customerEmail?|length <= 80customerId?|int32dateOfCreation?|date-timedateOfTaxableEvent?|date-timedeliveryAddressId?|int32depositAmount?|decimaldepositReasonId?|int32discountPrice?|decimaldiscountReasonId?|int32documentType?|int32doubleSale?boolean|nulldueDate?|date-timefinancialPromotionBarcode?|length <= 50financialPromotionId?|int32fiscalInfo?flightNumber?string|nullfoodStampsWithdrawalAmount?|decimalforeignCreditCardWithdrawalAmount?|decimalforeignCurrencyChange?|decimalforeignCurrencyCode?|length <= 3foreignCurrencyExchangeRate?|decimalforeignCurrencyTotalPrice?|decimalforeignCurrencyWithdrawalAmount?|decimalforeignUnit?|decimalguid?|guidheaderInternalId?|int64internalNumber?|int32invoiceNumber?|int32invoicingDetail?isCancellation?boolean|nullisChecked?|date-timeisEuRetail?boolean|nullisExported?boolean|nullisLoaded?|date-timeisSynchronized?boolean|nullisTakeAway?boolean|nullitems?array<>|nulllastModify?|date-timenote?string|nullpackages?array<>|nullpaidAsDownPayment?|decimalpaidCashOnDelivery?|decimalpaidInAdvance?|decimalpaidInCash?|decimalpaidOnEshop?|decimalpaidWithAnonCredit?|decimalpaidWithConsumerCredit?|decimalpaidWithCredit?|decimalpaidWithCreditCard?|decimalpaidWithFoodStamps?|decimalpaidWithForeignCreditCard?|decimalpaidWithForeignCurrency?|decimalpaidWithVouchers?|decimalpayments?pointsUsed?|int32posId?|int32specialFinancialPromotionBarcode?|length <= 50specialFinancialPromotionId?|int32toReturn?|decimaltotalNumberOfItems?|int32totalPrice?|decimaltotalStockPriceWoVat?|decimaluserId?|int32vatAmountBasicRate?|decimalvatAmountReducedRate?|decimalvatAmountSuperReducedRate?|decimalvatBasisBasicRate?|decimalvatBasisBazaar?|decimalvatBasisExempt?|decimalvatBasisReducedRate?|decimalvatBasisSuperReducedRate?|decimalvouchersWithdrawalAmount?|decimalwithdrawalAmount?|decimalwithdrawalAmountDifference?|decimalwithdrawalReasonId?|int32curl -X POST 'https://<your-instance>/api/documents/pos/shopping-session/0/finish' \ -H 'Authorization: Bearer <access-token>'{ "a4Print": true, "approvalOfLimitIncreaseUserId": 0, "branchId": 0, "brokerId": 0, "cancellationReasonId": 0, "cardType": 0, "cashOnDeliveryInternalNumber": 0, "cashRoundingAmount": 0, "cnbForeignExchangeRate": 0, "createdAt": "2019-08-24T14:15:22Z", "creditCardWithdrawalAmount": 0, "customerCardId": 0, "customerEmail": "string", "customerId": 0, "dateOfCreation": "2019-08-24T14:15:22Z", "dateOfTaxableEvent": "2019-08-24T14:15:22Z", "deliveryAddressId": 0, "depositAmount": 0, "depositReasonId": 0, "discountPrice": 0, "discountReasonId": 0, "documentType": 0, "doubleSale": true, "dueDate": "2019-08-24T14:15:22Z", "financialPromotionBarcode": "string", "financialPromotionId": 0, "fiscalInfo": { "eetCz": { "bkp": "string", "dateOfDispatch": "2019-08-24T14:15:22Z", "fik": "string", "guid": "string", "headerInternalId": 0, "pkp": "string", "posId": 0, "sentByPos": true, "sentByServer": true }, "eetSk": { "dateOfDispatch": "2019-08-24T14:15:22Z", "formNumber": "string", "guid": "string", "headerInternalId": 0, "id": "string", "okp": "string", "pkp": "string", "posId": 0 } }, "flightNumber": "string", "foodStampsWithdrawalAmount": 0, "foreignCreditCardWithdrawalAmount": 0, "foreignCurrencyChange": 0, "foreignCurrencyCode": "str", "foreignCurrencyExchangeRate": 0, "foreignCurrencyTotalPrice": 0, "foreignCurrencyWithdrawalAmount": 0, "foreignUnit": 0, "guid": "string", "headerInternalId": 0, "internalNumber": 0, "invoiceNumber": 0, "invoicingDetail": { "address_1": "string", "address_2": "string", "address_3": "string", "birthCertificateNumber": "string", "citizenship": "string", "city": "string", "companyIdentificationNumber": "string", "country": "string", "customerCard": "string", "date": "2019-08-24T14:15:22Z", "dateOfBirth": "2019-08-24T14:15:22Z", "dateOfTaxableEvent": "2019-08-24T14:15:22Z", "deliveryDate": "2019-08-24T14:15:22Z", "dueDate": "2019-08-24T14:15:22Z", "email": "string", "finalRecipientAddress1": "string", "finalRecipientAddress2": "string", "finalRecipientAddress3": "string", "finalRecipientCity": "string", "finalRecipientCountry": "string", "finalRecipientName": "string", "finalRecipientZipCode": "string", "guid": "string", "headerInternalId": 0, "identityCardIssuanceDate": "2019-08-24T14:15:22Z", "identityCardIssuancePlace": "string", "identityCardNumber": "string", "invoicingAddress1": "string", "invoicingAddress2": "string", "invoicingAddress3": "string", "invoicingCity": "string", "invoicingCountry": "string", "invoicingName": "string", "invoicingZipCode": "string", "name": "string", "note": "string", "phoneNumber": "string", "placeOfBirth": "string", "posId": 0, "vatPayer": true, "vatRegistrationNumber": "string", "zipCode": "string" }, "isCancellation": true, "isChecked": "2019-08-24T14:15:22Z", "isEuRetail": true, "isExported": true, "isLoaded": "2019-08-24T14:15:22Z", "isSynchronized": true, "isTakeAway": true, "items": [ { "barcode": "string", "cancellationOriginalItemGuid": "string", "color": "string", "colorId": 0, "commissionAmount": 0, "commissionVatRateId": 0, "createdAt": "2019-08-24T14:15:22Z", "dimension": "string", "dimensionId": 0, "discount": 0, "discountReasonId": 0, "fixedPromotion": true, "foreignCurrencyExchangeRate": 0, "foreignCurrencyId": 0, "foreignPrice": 0, "guid": "string", "hasPriceFromBarcode": true, "hasPriceFromPackage": true, "headerInternalId": 0, "internalNumber": 0, "isLoaded": "2019-08-24T14:15:22Z", "isSynchronized": true, "item": 0, "length": "string", "lengthId": 0, "manualDiscount": 0, "manualDiscountPercentage": 0, "manualDiscountReasonId": 0, "manuallyEnteredPrice": true, "note1": "string", "note2": "string", "note3": "string", "note4": "string", "orderCustomerItemId": 0, "orderCustomerItemVariantId": 0, "orderInternetItemId": 0, "orderInternetItemVariantId": 0, "packagePrice": 0, "points": 0, "posId": 0, "price": 0, "priceId": 0, "priceWoVat": 0, "productCode": "string", "productId": 0, "productName": "string", "promotionBarcode": "string", "promotionId": 0, "quantity": 0, "recyclingFee": 0, "recyclingFeeId": 0, "referencePrice": 0, "reservationItemId": 0, "reservationItemVariantId": 0, "royalty": 0, "royaltyId": 0, "setPrice": 0, "size": "string", "sizeId": 0, "stockPrice": 0, "unit": "string", "unitId": 0, "userId": 0, "variant": "string", "variantId": 0, "vatRate": 0, "warehouseId": 0, "warehouseSellingPrice": 0, "weight": 0, "dependentProducts": [ { "barcode": "string", "cancellationOriginalItemGuid": "string", "color": "string", "colorId": 0, "commissionAmount": 0, "commissionVatRateId": 0, "createdAt": "2019-08-24T14:15:22Z", "dimension": "string", "dimensionId": 0, "discount": 0, "discountReasonId": 0, "fixedPromotion": true, "foreignCurrencyExchangeRate": 0, "foreignCurrencyId": 0, "foreignPrice": 0, "guid": "string", "hasPriceFromBarcode": true, "hasPriceFromPackage": true, "headerInternalId": 0, "internalNumber": 0, "isLoaded": "2019-08-24T14:15:22Z", "isSynchronized": true, "item": 0, "length": "string", "lengthId": 0, "manualDiscount": 0, "manualDiscountPercentage": 0, "manualDiscountReasonId": 0, "manuallyEnteredPrice": true, "note1": "string", "note2": "string", "note3": "string", "note4": "string", "orderCustomerItemId": 0, "orderCustomerItemVariantId": 0, "orderInternetItemId": 0, "orderInternetItemVariantId": 0, "packagePrice": 0, "points": 0, "posId": 0, "price": 0, "priceId": 0, "priceWoVat": 0, "productCode": "string", "productId": 0, "productName": "string", "promotionBarcode": "string", "promotionId": 0, "quantity": 0, "recyclingFee": 0, "recyclingFeeId": 0, "referencePrice": 0, "reservationItemId": 0, "reservationItemVariantId": 0, "royalty": 0, "royaltyId": 0, "setPrice": 0, "size": "string", "sizeId": 0, "stockPrice": 0, "unit": "string", "unitId": 0, "userId": 0, "variant": "string", "variantId": 0, "vatRate": 0, "warehouseId": 0, "warehouseSellingPrice": 0, "weight": 0, "dependentOnItemGuid": "string", "type": "ReturnablePackaging" } ] } ], "lastModify": "2019-08-24T14:15:22Z", "note": "string", "packages": [ { "headerInternalId": 0, "id": 0, "isListingPrinted": true, "packageBarcode": "string", "packageNumber": "string", "packageStateId": 0, "transportTypeId": 0, "weight": 0 } ], "paidAsDownPayment": 0, "paidCashOnDelivery": 0, "paidInAdvance": 0, "paidInCash": 0, "paidOnEshop": 0, "paidWithAnonCredit": 0, "paidWithConsumerCredit": 0, "paidWithCredit": 0, "paidWithCreditCard": 0, "paidWithFoodStamps": 0, "paidWithForeignCreditCard": 0, "paidWithForeignCurrency": 0, "paidWithVouchers": 0, "payments": { "creditCardPayments": [ { "amount": 0, "cardNumber": "string", "cardType": 0, "cnbForeignExchangeRate": 0, "currency": "string", "currencyId": 0, "foreignExchangeRate": 0, "guid": "string", "internalNumber": 0, "posId": 0, "transactionId": "string" } ], "creditPayments": [ { "amount": 0, "barcode": "string", "dateOfPayment": "2019-08-24T14:15:22Z", "guid": "string", "headerInternalId": 0, "posId": 0, "userId": 0 } ], "foreignCurrencyPayments": [ { "amount": 0, "cnbForeignExchangeRate": 0, "currency": "string", "currencyId": 0, "foreignExchangeRate": 0, "guid": "string", "headerInternalId": 0, "posId": 0 } ], "qrCodePayments": [ { "amount": 0, "cancelledAtPosRegisterAt": "2019-08-24T14:15:22Z", "cashRegisterId": 0, "createdAt": "2019-08-24T14:15:22Z", "currency": "string", "headerInternalId": 0, "id": 0, "kbPaymentEventId": 0, "paymentReceived": true, "paymentReceivedAt": "2019-08-24T14:15:22Z", "variableSymbol": "string" } ] }, "pointsUsed": 0, "posId": 0, "specialFinancialPromotionBarcode": "string", "specialFinancialPromotionId": 0, "toReturn": 0, "totalNumberOfItems": 0, "totalPrice": 0, "totalStockPriceWoVat": 0, "userId": 0, "vatAmountBasicRate": 0, "vatAmountReducedRate": 0, "vatAmountSuperReducedRate": 0, "vatBasisBasicRate": 0, "vatBasisBazaar": 0, "vatBasisExempt": 0, "vatBasisReducedRate": 0, "vatBasisSuperReducedRate": 0, "vouchersWithdrawalAmount": 0, "withdrawalAmount": 0, "withdrawalAmountDifference": 0, "withdrawalReasonId": 0}Find an item by barcode (deprecated) POST
**Deprecated.** Use `POST {sessionId}/scan` instead, which also resolves customer cards. Returns the session items matching the scanned barcode. Requires `Permissions.PosShoppingSession.View`.
Add items to a shopping session POST
Appends the items in the body to an open session and recalculates its totals. Returns the whole updated session. Requires `Permissions.PosShoppingSession.Create`.