4WS Suite
Home
API Reference
  • Data mangement API
  • Documents API
Home
API Reference
  • Data mangement API
  • Documents API
Fourwayshop
  1. Sales
  • Document Manager
    • Orders
      • Save Sale Order
      • Save Return Order
    • Orchestrated Orders
      • Orchestrated Order
      • Orchestrated Return order
      • Orchestrated Update order
    • Cart
      • Cart Validation
      • Cart Full Validation
    • Sales
      • Save receipt
        POST
      • Salve only Order
        POST
      • Replace or update sale
        POST
      • Get last digital order
        GET
    • Warehouse
      • Save Entry from supplier
      • Save Transfer document
      • Save Free Entry
    • Purchase
      • Save Purchase
    • Get Document
      GET
    • Update Document external references
      POST
  • Customer
    • Get Customer
      GET
    • Set Customer Opt-in
      POST
  • Loyalty vouchers
    • Get customer loyalty vouchers
      GET
    • Get loyalty vouchers at a time interval
      GET
    • Get last loyalty vouchers
      GET
  • Giftcard
    • Get Giftcard
      GET
    • Update Giftcard
      POST
    • Generate Gift Card Barcode
      POST
    • Gift Card PDF Generation
      POST
  • Stock
    • Get Stock
      POST
    • Get last stock
      GET
    • Insert Stock
      POST
  1. Sales

Get last digital order

GET
/api
Last modified:2025-02-07 15:14:27
Returns digital orders created after the indicated date fromDateTime
The web service response will be composed of:
success: Boolean that indicated wether the request was successful or not
moreRows: Boolean that indicated wether the are more rows to be retrieved or not
valueObjectList: Array of lost opportunities objects

Actors#

API Client: The system or user initiating the request.
4ws.trade: The backend system that processes the request.

Pagination#

The request returns a maximum of 20 elements in the valueObjectList array. If moreRows is true, then you can request the next 20 elements by appending the query parameter &start=X on the request URL, where X is the first element to be retrieved.
For example, the first request returns 20 elements and moreRows is true. You can then make a new call to the web service, appending &start=20 on the URL to get the records from 21 to 40.

Fields#

the document has the same attributes documented in validateCart_v1

Request

Query Params

Header Params

Body Params application/x-www-form-urlencoded

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request GET '/api?cmd=getLastDigitalOrders_v1&applicationId={{APPLICATION_ID}}&appId={{APPLICATION_ID}}&fromDateTime=2020-09-08 13:18:00' \
--header 'applicationId: {{APPLICATION_ID}}' \
--header 'appId: {{APPLICATION_ID}}' \
--header 'namespace: {{NAMESPACE}}' \
--header 'languageId: {{LANGUAGE}}' \
--header 'username: {{USERNAME}}' \
--header 'password: {{PASSWORD}}' \
--header 'companyId: {{COMPANY_ID}}' \
--header 'siteId: {{SITE_ID}}' \
--header 'loadRoles: Y'

Responses

🟢200Get orders digital - success
application/json
Body

Example
{
    "valueObjectList": [
        {
            "seller": "Marco Bianchi",
            "zReportNumber": "",
            "clientName": "ALESSANDRO",
            "docNumber": 2,
            "endDate": "2020-09-08 13:19:56",
            "goodsVoucher": [],
            "payments": [
                {
                    "paymentType": "E",
                    "paymentAmount": 33.47,
                    "paymentCash": 33.47,
                    "paymentCode": "301",
                    "channel": "DIGITAL",
                    "paymentDescription": "Adyen",
                    "paymentImg": "adyen.png",
                    "paymentProgr": "09c4b62e-3924-445c-b363-d9cdaf7c1c5f",
                    "paymentDone": "Y"
                }
            ],
            "masterRegister": "N",
            "clientDenomination": "CASETTA ALESSANDRO",
            "clientSurname": "CASETTA",
            "pointsCode": "POINTS_PLAN_NOT_FOUND",
            "deviceId": "945d8af21d80556a",
            "printerCode": "BOGGI_500_210_1001_5",
            "invoiceClient": {
                "birthday": "1983-12-01 00:00:00",
                "zipCode": "20121",
                "subjectTypeDescription": "Fidelity",
                "city": "MILANO",
                "earnedPoints": 67,
                "cardSubtype": 4,
                "cardSubtypeDescription": "CONVENZIONATO",
                "province": "VE",
                "fiscalCode": "BZZMHL74E28F770N",
                "cardBarcode": "9999003622498",
                "email": "alessandro.casetta@sinesy.it",
                "subjectName": "ALESSANDRO",
                "entityCode": 210,
                "address1": "VIA ORTICELLI",
                "sex": "M",
                "branchCode": 1001,
                "companyId": "BOGGI",
                "siteId": 500,
                "subjectSubtype": "4",
                "subjectSurname": "CASETTA",
                "subjectDenomination": "CASETTA ALESSANDRO",
                "subjectCode": 60901,
                "discountsManualCumulative": "N",
                "contractDiscount": 70,
                "country": "IT",
                "isCompany": "N",
                "pec": "michele.bozzo@sinesy.it",
                "paIndex": "",
                "companyVatCode": "",
                "invoiceChannel": "DIGITAL"
            },
            "sellerId": 1001,
            "clientContractDiscount": 70,
            "movementType": "V",
            "pointsPrevious": 67,
            "barcodeInfo": "10012220090800002",
            "currency": "EUR",
            "discountsManualCumulative": "N",
            "deliveryDate": "2020-09-15 15:17:32",
            "registerCode": "22",
            "clientBarcode": "9999003622498",
            "delivery": [
                {
                    "addressId": "BOGGI_9999003622498_1",
                    "address": "via Roma 55 31100 Treviso IT",
                    "addressName": "Alessandro Casetta",
                    "deliveryId": "BOGGI_500_EUR_1",
                    "deliveryDesc": "STANDARD",
                    "deliveryAmount": 15.5,
                    "itemCode": "SPED",
                    "itemBarcode": "010101010101",
                    "rowId": "7fdb3aee-e27f-42c4-8897-d5d3fcc77cd6",
                    "rowServiceId": "04aab833-1a06-4d72-9a47-e8f0ea749ab0",
                    "channel": "DIGITAL",
                    "address1": "via Roma 55",
                    "address2": "",
                    "city": "Treviso",
                    "country": "IT",
                    "email": "",
                    "fax": "",
                    "municipality": "",
                    "note": "",
                    "province": "TV",
                    "region": "",
                    "state": "",
                    "zipCode": "31100",
                    "subjectCompanyName": "Alessandro Casetta",
                    "phone": ""
                }
            ],
            "entityCode": "210",
            "clientId": 60901,
            "receiptType": "INVOICE",
            "ticket": 2,
            "clientEmail": "alessandro.casetta@sinesy.it",
            "pointsMessage": "Loyalty plan not found",
            "currencySymbol": "€",
            "rounding": 2,
            "totals": {
                "totalDiscountAmount": 0,
                "total": 27.43,
                "vat": 6.04,
                "grandTotal": 33.47,
                "totalDiscount": 0,
                "totalDiscountType": "",
                "totalDiscountReason": "",
                "allowance": 0,
                "alreadyPayed": 0,
                "taxableIncome": 27.43,
                "inStoreGrandTotal": 0,
                "digitalGrandTotal": 33.47
            },
            "transactionId": "8b5b419c-ec92-45d6-bb17-6a21494e15a1",
            "branchCode": "1001",
            "printerError": "Forced sale closing",
            "onlineValidation": "N",
            "filling": "LAST",
            "appliedPromotions": [],
            "ticketRT": "",
            "candidatePromos": [],
            "items": [
                {
                    "rowId": "7fdb3aee-e27f-42c4-8897-d5d3fcc77cd6",
                    "rowType": "ITEM",
                    "barcode": "155989000112",
                    "barcodeType": "BARCODE_ARTICOLO",
                    "unitPrice": 59.9,
                    "qty": 1,
                    "qtyType": "N",
                    "itemState": "SERVER_OK",
                    "seller": "Marco Bianchi",
                    "sellerId": 1001,
                    "vatCode": 20,
                    "rowTaxableIncome": 14.73,
                    "rowVat": 3.24,
                    "rowTotal": 17.97,
                    "description": "CAMICIA COTONE TWILL COLLO WINDSOR SLIM ",
                    "discount": 70,
                    "discountReasonDescription": "Convenzione fidelity",
                    "discountType": "P",
                    "discountAmount": 41.93,
                    "qtaConfirmed": "Y",
                    "movementType": "V",
                    "note": "",
                    "havingTailoring": "N",
                    "priceList": "1001",
                    "channel": "DIGITAL",
                    "itemCode": "BF19P000301",
                    "imgUrl": "https://storage.googleapis.com/app-mobileshop-items-images/BOGGI/500/210/BF19P000301/BIBL/M/BF19P000301_BIBL_M_1.jpg?GoogleAccessId=711439762495-38h1rs18fbp4scgt4th1gqok4qjltb2u@developer.gserviceaccount.com&Expires=1599571650017&Signature=jwAktpDSP%2FKOQviF%2BK43UyfHGGZ%2B4CRrCwKN5G2Wqa7xl8o%2Fp9OGLlhEk07l%2BcDqlmTlBzTxQvDaX4yPAkSFZ7Ey1apCZn29PPv%2F1%2BWiwG9%2BTVZUfsJgksqefpz7K8yXAYxhAF5dvaI3IU2Kr4D8hh04abPX6lES6IUBn97HPUU%3D",
                    "currencySymbol": "€",
                    "currency": "EUR",
                    "rounding": 2,
                    "shopDescription": "C WINDSOR SL TWILL",
                    "dimensionDescription1": "48",
                    "dimensionDescription2": "BIBL",
                    "itemType": "PRODUCT",
                    "taxRate": 22,
                    "dimension1": "12",
                    "dimension2": "BIBL",
                    "dimensionType1": "TAGLIA",
                    "dimensionType2": "COLORE",
                    "unpairedItem": "BF19P003301",
                    "dimensionType1Desc": "Taglia",
                    "dimensionType2Desc": "Colore",
                    "oldUnitPrice": 59.9,
                    "oldTaxRate": 22,
                    "autoDiscountType": "CONTRACT",
                    "discountTotalAmount": 41.93,
                    "discountType1": "",
                    "discount1": "",
                    "discountAmount1": "",
                    "discountReason1": "",
                    "discountType2": "",
                    "discount2": "",
                    "discountAmount2": "",
                    "discountReason2": "",
                    "discountType3": "",
                    "discount3": "",
                    "discountAmount3": "",
                    "discountReason3": "",
                    "discountType4": "",
                    "discount4": "",
                    "discountAmount4": "",
                    "discountReason4": "",
                    "discountType5": "",
                    "discount5": "",
                    "discountAmount5": "",
                    "discountReason5": "",
                    "discountRowTotalAmount": 0,
                    "rowOrder": 1
                },
                {
                    "rowId": "04aab833-1a06-4d72-9a47-e8f0ea749ab0",
                    "rowType": "DELIVERY",
                    "itemType": "SERVICE",
                    "itemSubType": "DELIVERY",
                    "channel": "DIGITAL",
                    "barcode": "010101010101",
                    "barcodeType": "",
                    "qty": 1,
                    "qtyType": "N",
                    "discount": "",
                    "discountType": "",
                    "discountReason": "",
                    "discountReasonDescription": "",
                    "vatCode": "20",
                    "itemState": "SERVER_OK",
                    "seller": "",
                    "currencySymbol": "",
                    "currency": "",
                    "description": "Spese di spedizione STANDARD",
                    "unitPrice": 15.5,
                    "taxRate": 22,
                    "rowTaxableIncome": 12.7,
                    "rowVat": 2.8,
                    "rowTotal": 15.5,
                    "itemCode": "SPED",
                    "discountAmount": "",
                    "discountTotalAmount": 0,
                    "discountRowTotalAmount": 0,
                    "sellerId": "",
                    "movementType": "V",
                    "note": "",
                    "havingTailoring": "N",
                    "shopDescription": "Spese di spedizione STANDARD",
                    "discountType1": "",
                    "discount1": "",
                    "discountAmount1": "",
                    "discountReason1": "",
                    "discountType2": "",
                    "discount2": "",
                    "discountAmount2": "",
                    "discountReason2": "",
                    "discountType3": "",
                    "discount3": "",
                    "discountAmount3": "",
                    "discountReason3": "",
                    "discountType4": "",
                    "discount4": "",
                    "discountAmount4": "",
                    "discountReason4": "",
                    "discountType5": "",
                    "discount5": "",
                    "discountAmount5": "",
                    "discountReason5": "",
                    "rowOrder": 2
                }
            ],
            "transactionState": 1,
            "startDate": "2020-09-08 13:17:32",
            "branchDescription": "TEST - MILANO SAN BABILA"
        }
    ],
    "moreRows": false,
    "resultSetLength": 1
}
🟠422Unique constraint error
Modified at 2025-02-07 15:14:27
Previous
Replace or update sale
Next
Save Entry from supplier
Built with