4WS Suite
Home
API Reference
  • Data mangement API
  • Documents API
Home
API Reference
  • Data mangement API
  • Documents API
Fourwayshop
  1. Sales
  • Four Way Shop API
  • Before start develop
  • Why we use Resource-oriented design
  • Technical Prerequisites
  • Concepts
    • Date Handling
    • Managing Languages
    • Handling Field Updates and Null Values in Service Requests
    • ISO Code
    • Vat rates
    • Product structure
    • Product Images
    • Product dimensions
    • Product pricing
    • Dimension group vs Dimension grouping
    • Subjects overview
    • Documents structure
  • Best Practices
    • Best Practices for Error Handling in External System
    • How Testing callback response
    • Best Practices for delopers
  • Data management
    • Authentication
    • Rate Limits
    • Paginated Responses
    • Getting Started
    • API Changelog
    • Use cases
      • Cataloging a Dimension
      • Creating a New Product
      • Retriving a product details
      • Defining Product Pricing
      • Updating External System Product Catalog
      • Activate product variants and add barcodes to SKUs
      • Move a Barcode from One Product to Another
    • API
      • Login
        • login
      • Product
        • Brand
          • Get All Brands
          • Get A Brand
          • Insert brand
          • Update brand
        • Season
          • Get All Seasons
          • Get A Season
          • Insert season
          • Update season
        • Attribute
          • Get All Attribute Types
          • Get Attribute Type
          • Get Attribute
          • Insert attribute
          • Update attribute
        • Hierarchy
          • Insert hierarchy
          • Update hierarchy
        • Dimension groups
          • Insert dimension group
          • Update dimension group
        • Dimension
          • Insert dimension
          • Update dimension
          • Delete dimension
        • Product
          • Get products
          • Get product
          • Get product grouping
          • Get SKU's barcodes
          • Get product stock
          • Insert product
          • Update product
        • Activate dimensions on products
          • Insert active dimensions
          • Delete active dimensions
        • Barcode
          • Get SKU from barcode
          • Generate missing barcodes
          • Generate missing barcode for SKU
          • Insert barcode
          • Delete barcode
        • Prices
          • Get product prices
        • Price dimension groupings
          • Get Dimension Price Grouping
          • Get All Dimension Price Grouping
          • Insert dimension grouping
          • Update dimension grouping
          • Delete dimension grouping
        • Assortment
          • insert product assortment
          • delete product assortment
        • Image
          • Get images
          • Add image
          • Replace image
          • Delete image
        • Supplier
          • Get Item suppliers
          • Insert item supplier
          • Delete item supplier
          • Update item supplier
        • Custom category
          • Get Custom code
          • Insert Custom code
          • Update Custom code
        • Vat
          • Vat types
            • Get VAT type
            • Get VAT types
          • VATs
            • Get VATs
            • Get VATs by type
            • Get VAT
          • Vat rates
            • Get VAT rates
            • Get single VAT rates
        • Stock
          • Insert stock
          • Get stock
      • Price lists
        • Get price lists
        • Get price lists by type
        • Get price list
        • Get prices from price list
        • Get entities from price lists
        • Insert Price List
        • Insert Product Price
        • Insert Entity On Price Lists
        • Update price list
        • Delete all product prices
        • Delete single product price
        • Delete entity from a price lists
      • Supplier
        • Supplier contacts
        • Supplier addresses
        • Get Suppliers
        • Get A Specific Supplier
        • Insert supplier
        • Update supplier
      • Entities
        • Get entities
        • Get entity
        • Insert entity
        • Update entity
      • Miscellaneous
        • Get requests rate limits
      • Catalog
        • Get Catalogs details
        • Get Catalog details by Code
        • Get products by Catalog Code
      • Export
        • Get bulk CSV Export
  • Documents
    • Authentication
    • Paginated responses
    • Managing API Callbacks
    • Document notifications
    • Customer promo data notifications
    • Use cases
      • Updating External System Stock
      • E-commerce Recipt Processing
      • E-commerce Return Receipt Processing
      • E-commerce Order sale Processing
      • E-commerce Return Order Processing
      • E-commerce Order Handling and Internal Stock Transfer
      • E-commerce & Gift Card
      • Creating a free entry
      • Retrieving a Document by Identifier
      • Cart Validation Service
      • Sale and Shipping costs
      • Handling Line Item Discounts
      • Managing Price Forcing in Cart Items
      • Purchase Order Registration
      • Supplier Goods Entry From Purchase Order
      • Update an Orchestrated Order
      • New Orchestrated Return Orders
    • API
      • 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
        • Set Customer Opt-in
      • Loyalty vouchers
        • Get customer loyalty vouchers
        • Get loyalty vouchers at a time interval
        • Get last loyalty vouchers
      • Giftcard
        • Get Giftcard
        • Update Giftcard
        • Generate Gift Card Barcode
        • Gift Card PDF Generation
      • Stock
        • Get Stock
        • Get last stock
        • Insert Stock
  • 🚫 KeepIT
    • Authentication
    • Use cases
    • Articles (deprecated)
      • Get Articles
      • Insert/Update dimensional groups
      • Insert/Update price groupings
      • Insert/Update dimensions
      • Insert/Update attributes
      • Insert/Update hieararchies
      • Insert/Update seasons
      • Insert/Update articles
      • Insert/Update Articles Master data
      • Insert/Update Lists
      • Insert/Update Dimensions Groups
      • Create EAN13 barcode
      • Insert/Update Barcode
      • Assign dimensions to groupings
    • Price Lists (deprecated)
      • Insert price list
      • Add entity to price list
      • Add item price to price list
      • Insert sale profile
      • Insert sale period
      • Add item price to sale period
    • Stock (deprecated)
      • Get Stock
      • Get Stock Date
      • Get Stock CSV
      • Insert/Update Stock
    • Sales (deprecated)
      • Insert/Update sales
      • Delete sales
      • Upload printer sales archive
    • Deposit (deprecated)
      • Insert/Update deposits
    • Services
      • Insert/Update services
      • Delete services
    • Points
      • Insert/Update points
      • Calculate and Insert/Update Points
      • Delete points
    • Subjects
      • Check customers
      • Anonymize customers
      • Get subject data
      • Get customer discount
      • Insert/Update customer
      • Insert/Update billing customers
      • Insert/Update CRM customer
      • Insert/Update children
      • Change/Replacement card
      • Insert CRM user
    • Giftcards & Vouchers
      • Get giftcard
      • Insert/Update giftcards
      • Insert/Update Vouchers
    • Missed Opportunity
      • Get Lost Opportunities
      • Insert/Update missed opportunities
      • Delete missed opportunity
    • Documents (deprecated)
      • Insert documents
      • Get document
    • Catalogs
      • Get Catalog
      • Insert/update catalog
      • Insert/Update hierarchies item catalog
      • Insert/Update entity clusters
    • Suppliers (deprecated)
      • Insert/Update tailor
      • Insert/Update supplier
    • Export (deprecated)
      • Get Items Export
      • Get Barcodes Export
      • Get Prices Export
      • Get Customers Export
      • Get Suppliers Export
      • Get Sales Export
      • Get Movements Export
      • Get Vouchers Export
    • Configuration Mobile Shop (deprecated)
      • Insert/Update Entities
      • Insert Seller
    • Mappings
      • Insert Mappings
      • Get Mappings
  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