4WS Suite
Home
API Reference
  • Data mangement API
  • Documents API
Home
API Reference
  • Data mangement API
  • Documents API
Fourwayshop
  1. Document Manager
  • 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
      • Salve only Order
      • Replace or update sale
      • Get last digital order
    • 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. Document Manager

Get Document

GET
/api
Last modified:2025-11-10 15:52:51

Get Document#

The API allows you to retrieve documents managed by 4ws.suite.
WARNING
This API is paginated. Please refer to the Pagination section to understand how to navigate through the result pages.

Actors#

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

Possible Document Searches#

You can search for a document in 3 ways:
By Document Identifier#
FieldDescriptionTypeMandatory
idUnique internal identifier of the document within the suiteVarchar(250)✓
By Document Number#
FieldDescriptionTypeMandatory
documentNumberDocument number, e.g., SDN/0000001449Varchar(250)✓
documentTypeDocument type codeVarchar(250)✓
causeDocument cause codeVarchar(250)✓
documentStatusDocument status codeVarchar(250)
branchCodeBranch code of the documentVarchar(250)
By Document External Code#
The external code documentExternal is the code assigned by an external system such as an ecommerce site or an ERP application.
In this case, the document is often created by the insertion services.
FieldDescriptionTypeMandatory
documentExternalExternal code of the documentVarchar(250)✓
documentTypeDocument type codeVarchar(250)✓
causeDocument cause codeVarchar(250)✓
documentStatusDocument status codeVarchar(250)
branchCodeBranch code of the documentVarchar(250)
INFO
To learn about document types and causes, please refer to the Document Types and Causes section.

Request

Query Params

Header Params

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=getDocument_v1&applicationId={{APPLICATION_ID}}&appId={{APPLICATION_ID}}&documentNumber=178&id=00059b54-48c2-44d5-918d-e40047d03a18&documentExternal=WEB0000234&documentStatus=CLOSE&documentType=ORDER&cause=SALE&entityCode=PRECIADOS&branchCode=10' \
--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 'Content-Type: application/json'

Responses

🟢200Document found
application/json
Body

Examples
{
    "success": true,
    "documentHeader": {
        "taxableIncome": 106.56,
        "year": 2024,
        "documentNumber": "1",
        "discountAmount": 0,
        "isReservation": "N",
        "isDeposit": "N",
        "currencySite": "EUR",
        "totalQuantity": 1,
        "sellerDescription": "Michele Bozzo",
        "currencyCompany": "EUR",
        "pointsPrevious": 0,
        "discountReason": "",
        "branchDescription": "Negozio NAPOLI",
        "id": "ca9e24c4-c112-41f4-a905-bfd13e49c0c8",
        "barcode": "99991024050200001",
        "registerCode": 10,
        "rowVersion": 2,
        "pointsMessage": "OK",
        "causeDescription": "Scontrino vendita",
        "branchSubtype": "NEGOZI",
        "printerReceiptNumber": "1846",
        "branchCode": 9999,
        "totalAmount": 130,
        "companyId": "SVIL3",
        "lastUpdate": "2024-05-02 15:31:11",
        "deposit": 0,
        "subjectDenomination": "Paggiaro Angelina ",
        "printerSerial": "99ICE090909",
        "printerTaxation": "XML7",
        "status": "E",
        "documentDate": "2024-05-02 15:18:46",
        "rebates": 0,
        "documentTypeDescription": "Documento fiscale",
        "documentType": "TAX_DOCUMENT",
        "cause": "RECEIPT",
        "sellerCode": "9999",
        "userCreate": "501_9999",
        "addresseeType": "CUSTOMER",
        "cardBarcode": "9990000000517",
        "currency": "EUR",
        "discountType": "",
        "documentStatus": "CLOSE",
        "branchType": "SHOP",
        "promoDiscount": 0,
        "statusMachineLog": 1,
        "createDate": "2024-05-02 15:30:51",
        "entityCode": 501,
        "cashbackTotalAmount": 0,
        "isDigital": "N",
        "printerZReport": "4123",
        "confirmationDateOrder": "2024-05-02 15:18:46",
        "discountWithVat": 0,
        "visibleMobile": "N",
        "currencySymbol": "€",
        "isInStore": "Y",
        "addresseeDescription": "Paggiaro Angelina ",
        "clientCode": "177735",
        "discountPerc": 0,
        "siteId": 501,
        "totalDiscount": 0
    },
    "documentRows": [
        {
            "id": "67126657-fb9a-47bf-b827-3708b1fd8e22",
            "attributeDescriptionLevel1": null,
            "attributeDescriptionLevel10": null,
            "attributeDescriptionLevel2": null,
            "attributeDescriptionLevel3": null,
            "attributeDescriptionLevel4": null,
            "attributeDescriptionLevel5": null,
            "attributeDescriptionLevel6": null,
            "attributeDescriptionLevel7": null,
            "attributeDescriptionLevel8": null,
            "attributeDescriptionLevel9": null,
            "attributeLevel1": null,
            "attributeLevel10": null,
            "attributeLevel2": null,
            "attributeLevel3": null,
            "attributeLevel4": null,
            "attributeLevel5": null,
            "attributeLevel6": null,
            "attributeLevel7": null,
            "attributeLevel8": null,
            "attributeLevel9": null,
            "barcode": "2000021033054",
            "brandCode": null,
            "brandDescription": null,
            "cancelDate": null,
            "companyId": "SVIL3",
            "composition": "Default 100%",
            "createDate": "2024-05-02 15:30:51",
            "currencySymbol": "€",
            "currencySymbolCompany": null,
            "currencySymbolSite": null,
            "customerDeliveryDate": null,
            "deliveryDate": null,
            "deliveryDateReservation": null,
            "deposit": null,
            "description": "CAMICIA",
            "descriptionGrouping": null,
            "dimension1": "1",
            "dimension2": "99",
            "dimension3": ".",
            "dimension4": ".",
            "dimension5": null,
            "dimensionDescription1": "UNI",
            "dimensionDescription2": "99",
            "dimensionDescription3": "Non assegnato",
            "dimensionDescription4": "Non assegnato",
            "dimensionDescription5": null,
            "dimensionGroup1": "6",
            "dimensionGroup2": "1",
            "dimensionGroup3": "DROP",
            "dimensionGroup4": "STATURA",
            "dimensionGroup5": null,
            "dimensionGrouping": null,
            "dimensionPosition1": null,
            "dimensionPosition2": null,
            "dimensionPosition3": null,
            "dimensionPosition4": null,
            "dimensionPosition5": null,
            "dimensionType1": "TAGLIA",
            "dimensionType2": "COLORE",
            "dimensionType3": "DROP",
            "dimensionType4": "STATURA",
            "dimensionType5": null,
            "discount1": null,
            "discount2": null,
            "discount3": null,
            "discount4": null,
            "discount5": null,
            "discountAmount": 0,
            "discountPerc": 0,
            "discountReason": null,
            "discountRowTotalAmount": 0,
            "discountTotalAmount": 0,
            "discountType": null,
            "discountWithVat": 0,
            "documentDate": "2024-05-02 15:18:46",
            "endDateReservation": null,
            "endValidity": null,
            "entityCode": "501",
            "hierarchyDescriptionLevel1": "CAMICIA",
            "hierarchyDescriptionLevel10": null,
            "hierarchyDescriptionLevel2": "Abbligliamento",
            "hierarchyDescriptionLevel3": "Uomo",
            "hierarchyDescriptionLevel4": null,
            "hierarchyDescriptionLevel5": null,
            "hierarchyDescriptionLevel6": null,
            "hierarchyDescriptionLevel7": null,
            "hierarchyDescriptionLevel8": null,
            "hierarchyDescriptionLevel9": null,
            "hierarchyLevel1": "MCAM",
            "hierarchyLevel10": null,
            "hierarchyLevel2": "ABB",
            "hierarchyLevel3": "MAN",
            "hierarchyLevel4": null,
            "hierarchyLevel5": null,
            "hierarchyLevel6": null,
            "hierarchyLevel7": null,
            "hierarchyLevel8": null,
            "hierarchyLevel9": null,
            "internalDocumentRow": null,
            "itemCode": "037--------09999",
            "itemSubType": "ITEM",
            "itemType": "PRODUCT",
            "lastUpdate": "2024-05-02 15:31:11",
            "madeIn": "XIT",
            "note": null,
            "originalBarcode": null,
            "originalPrice": 130,
            "priceCmp": 109.29,
            "priceForcingReason": null,
            "priceInvoiceTaxable": 79.94,
            "priceInvoiceTaxableCompany": 79.94,
            "priceInvoiceTaxableSite": 79.94,
            "priceList": "9999",
            "pricePurchaseTaxable": 110,
            "pricePurchaseTaxableCompany": 110,
            "pricePurchaseTaxableSite": 110,
            "priceSale": 130,
            "priceSaleCompany": 130,
            "priceSaleSite": 130,
            "quantity": 1,
            "quantity1": null,
            "quantity10": null,
            "quantity2": null,
            "quantity3": null,
            "quantity4": null,
            "quantity5": null,
            "quantity6": null,
            "quantity7": null,
            "quantity8": null,
            "quantity9": null,
            "quantityArrived": null,
            "quantityCanceled": null,
            "quantityCommitted": null,
            "quantityDispatched": null,
            "quantityExit": null,
            "quantityInvoiced": null,
            "quantityOnDelivery": null,
            "quantityOrder": null,
            "quantityOrderPurchase": null,
            "quantityOrderTransfer": null,
            "quantityReceipted": null,
            "quantityReceiptedReturned": null,
            "quantityReservated": null,
            "quantityReturned": null,
            "quantityReturnedInvoice": null,
            "quantityTransferred": null,
            "refDocumentDescription": null,
            "refDocumentRow": "55fd2650-2584-44e3-b25b-5b908810f449",
            "refOrder": "41839aa7-ff97-42ee-abfa-e11d272a3e3f",
            "refOrderRow": "55411423-6870-402e-acaa-995a2831d864",
            "refParcel": null,
            "refParcelDescription": null,
            "returnReasonDescription": "",
            "returnReasonId": "",
            "returnReasonNote": "",
            "rowNumber": 1,
            "rowStatus": "CONFIRM",
            "rowTaxableIncome": 106.56,
            "rowTotal": 130,
            "rowVat": 23.44,
            "rowVersion": 2,
            "seasonCode": "3",
            "seasonDescription": "CONT2000",
            "sellerCode": "9999",
            "sellerDescription": "Michele Bozzo",
            "siteId": 501,
            "startDateReservation": null,
            "startValidity": null,
            "status": "E",
            "supplierCode": null,
            "supplierItemCode": null,
            "tailorCode": null,
            "tailorCost": null,
            "tailorDeliveryDate": null,
            "tailorDescription": null,
            "tailorNote": null,
            "tailorProductBarcode": null,
            "tailorProductCode": null,
            "tailorProductDescription": null,
            "taxRate": 22,
            "taxRateExemption": null,
            "unitPrice": 130,
            "userCreate": "501_9999",
            "userUpdate": "501_9999",
            "vatCode": "4",
            "vatCodeExemption": null
        }
    ],
    "moreRows": false
}
🟢200Document not found
🟠422Unique constraint error
Modified at 2025-11-10 15:52:51
Previous
Save Purchase
Next
Update Document external references
Built with