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

Update Document external references

POST
/api
Last modified:2025-04-08 08:19:18
Il servizio consente di modificare alcuni campi come il riferimento esterni anche per documenti in stato chiuso.
La risposta del servizio web sarà composta da:
success: valore booleano che indica se la richiesta ha avuto successo o meno
documentHeader: JSON contenente un elenco di attributi dell'intestazione di un documento specificato
messaggio: stringa che spiega il motivo di un errore, se si è verificato

Actors#

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

Esempio#

Response#

{
        "success": true,
        "documentHeader": {
            "id": "0402b666-c83a-44cd-adce-1fa11e50ebac",
            "addressee": "103",
            "addresseeAddress": "Piazza Roma, 11",
            "addresseeDescription": "Transito Fil.",
            "addresseeType": "WRH",
            "appearance": null,
            "barcode": "00581657533998592000165",
            "billingAddress": null,
            "billingCity": null,
            "billingClientCode": null,
            "billingClientIdKeepit": null,
            "billingCompanyName": null,
            "billingCountry": null,
            "billingDenomination": null,
            "billingEmail": null,
            "billingIsCompany": null,
            "billingName": null,
            "billingPec": null,
            "billingProvince": null,
            "billingSdiCode": null,
            "billingSurname": null,
            "billingVatCode": null,
            "billingZipCode": null,
            "branchCode": 103,
            "branchCodeAddressee": null,
            "branchCodePickup": null,
            "branchCodeTransfer": "",
            "branchDescription": "Transito Fil.",
            "branchSubtype": "SHOP",
            "branchType": "20",
            "buyerCode": null,
            "cancelDate": null,
            "cardBarcode": null,
            "carrierAddress": null,
            "carrierCode": null,
            "cashbackTotalAmount": null,
            "cause": "TRANSIT_EXIT",
            "causeDescription": "Uscita transito",
            "causeSign": 1,
            "channel": null,
            "channelDescription": null,
            "clientCode": null,
            "clientIdKeepit": null,
            "clientPhoneNumber": null,
            "companyId": "SVIL2",
            "confirmationDateOrder": null,
            "createDate": "2022-07-11 10:54:24",
            "currency": "EUR",
            "currencyCompany": "EUR",
            "currencySite": "EUR",
            "currencySymbol": "€",
            "customerDeliveryDate": null,
            "ddtNumber": null,
            "deliveryDate": null,
            "deliveryLimitDate": null,
            "deposit": null,
            "discount1": null,
            "discount2": null,
            "discount3": null,
            "discount4": null,
            "discount5": null,
            "discountAmount": null,
            "discountPerc": null,
            "discountReason": null,
            "discountReasonDescription": null,
            "discountType": null,
            "discountWithVat": null,
            "docNumberDigital": null,
            "documentDate": "2022-07-11 23:00:00",
            "documentDeliveryExternal": "06af5ede-5508-4a98-9dc4-4c8db6e62c58",
            "documentExternal": null,
            "documentNumber": "496",
            "documentStatus": "CLOSE",
            "documentType": "TRANSFER_NOTICE",
            "documentTypeDescription": "Avviso di trasferimento",
            "endValidity": null,
            "entityCode": 501,
            "exchangeRate": 1,
            "isB2B": null,
            "isClickAndCollect": null,
            "isDeposit": null,
            "isDigital": null,
            "isEvadable": null,
            "isFiscal": null,
            "isInStore": null,
            "isReservation": null,
            "lastUpdate": null,
            "movementDate": "2022-07-11 23:00:00",
            "note": null,
            "orderBranch": null,
            "orderDate": null,
            "orderYear": null,
            "payeeAddress": null,
            "payeeCity": null,
            "payeeCompanyName": null,
            "payeeCountry": null,
            "payeeEmail": null,
            "payeeIsCompany": null,
            "payeeName": null,
            "payeeProvince": null,
            "payeeSdiCode": null,
            "payeeSurname": null,
            "payeeTaxRegime": null,
            "payeeVatCode": null,
            "payeeZipCode": null,
            "paymentExpirationDate": null,
            "payments": null,
            "pointsBalance": null,
            "pointsEarned": null,
            "pointsMessage": null,
            "pointsPrevious": null,
            "printerReceiptNumber": null,
            "printerSerial": null,
            "printerTaxation": null,
            "printerZReport": null,
            "promoDiscount": null,
            "rebates": null,
            "refDigitalDocumentHeader": null,
            "refDocumentHeader": "f4192638-4bab-4f59-8d0a-ec0074cca45c",
            "refFiscalDocumentHeader": null,
            "refundDate": null,
            "registerCode": null,
            "reservedTo": null,
            "rowVersion": 1,
            "seasonCode": null,
            "sectional": null,
            "sellerCode": null,
            "sellerDescription": null,
            "sender": "58",
            "senderAddress": "Piazza Soncino",
            "senderDescription": "FAMILY & FRIENDS",
            "senderType": "BRANCH",
            "shippingAddress1": null,
            "shippingAddress2": null,
            "shippingCity": null,
            "shippingCountry": null,
            "shippingEmail": null,
            "shippingFirstName": null,
            "shippingLastName": null,
            "shippingMultiple": null,
            "shippingMunicipality": null,
            "shippingNote": null,
            "shippingPhone": null,
            "shippingProvince": null,
            "shippingRegion": null,
            "shippingState": null,
            "shippingSubjectCompanyName": null,
            "shippingZipCode": null,
            "siteId": 501,
            "status": "E",
            "stepB2B": null,
            "subjectDenomination": null,
            "supplierBranch": null,
            "supplierCode": null,
            "supplierReference": null,
            "tailorCode": null,
            "tailorCost": null,
            "tailorDeliveryDate": null,
            "tailorDescription": null,
            "taxFreeData": null,
            "taxFreeNumber": null,
            "taxRateExemption": null,
            "taxableIncome": null,
            "totalAmount": 1320,
            "totalCostTaxableIn": 0,
            "totalCostTaxableOut": 653.2,
            "totalDiscount": null,
            "totalInvoiceTaxableIn": 0,
            "totalInvoiceTaxableOut": 653.2,
            "totalPackages": null,
            "totalQuantity": 4,
            "totalQuantityIn": 0,
            "totalQuantityOut": 4,
            "transferBranch": null,
            "transportType": null,
            "userCreate": "SHOP",
            "userUpdate": null,
            "userVisibility": null,
            "vatCodeExemption": null,
            "visibleMobile": "N",
            "weightKg": null,
            "withdrawalDate": null,
            "year": 2022
        }
    }

Request

Query Params

Header Params

Body Params application/json

Example
{
    "docId": "000073ef-6366-41cc-88ef-eda002bb7d35",
    "documentExternal": "Test documentExternal",
    "documentDeliveryExternal": "Test documentDeliveryExternal",
    "docNumberDigital": "Test docNumberDigital"
}

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 POST '/api?cmd=updateDocumentHeader_v1&applicationId={{APPLICATION_ID}}&appId={{APPLICATION_ID}}' \
--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' \
--data-raw '{
    "docId": "000073ef-6366-41cc-88ef-eda002bb7d35",
    "documentExternal": "Test documentExternal",
    "documentDeliveryExternal": "Test documentDeliveryExternal",
    "docNumberDigital": "Test docNumberDigital"
}'

Responses

🟢200Success
application/json
Body

Example
{}
🟠422Unique constraint error
Modified at 2025-04-08 08:19:18
Previous
Get Document
Next
Get Customer
Built with