4WS Suite
Home
API Reference
  • Data mangement API
  • Documents API
Home
API Reference
  • Data mangement API
  • Documents API
Fourwayshop
  1. Giftcard
  • 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. Giftcard

Get Giftcard

GET
/api
Last modified:2025-02-07 15:16:44
To validate a giftcart it's necessary to make a GET call passing the barcode in the request.


The web service response will be composed of:
success: Boolean that indicated wether the request was successful enqueued or not
giftcard: If giftcard is valid contains the giftcard data


Actors#

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

Fields#

Giftcard#

FieldDescriptionType
idVILU_500_440_2000000001814String
companyIdcompany idString
siteIdite idnumber
branchCodebranch codeString
entityCodeenty codeString
cardBarcodegiftcard barcode, ex: 2000000001814String
issueDateisseu date, ex: 2021-10-04 00:00:00String
activationDateactivate date, ex 2021-10-04 00:00:00String
expirationDateexpiration date, ex: 2021-06-01 00:00:00String
flgActiveY/N, Y if giftcard is activeString
priceListprice listString
priceListTypeprice list typeString
decimalNumbergiftcard decimal numberString
currencySymbolcurrency symbol, ex: €String
currencycurrency code, ex: EURString
originalAmountoriginal giftcard amountnumber
amountcurrent giftcard amountString
itemTypeitem typeString
itemSubtypeitem subtypeString
itemCodeitem codeString
taxRatetax ratenumber
vatCodevat codeString
printerDepartmentCodeprinter department codeString
flgNetworkUsageenable network Usage Y/NString
flgPartiallyUsageenable partially usage Y/NString
paymentTermCode01String
flgAllowOfflineUsageenable allow offline usage Y/NString
taxationtaxation, ex:RT,XM7String

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=getGiftcard_v1&applicationId={{APPLICATION_ID}}&appId={{APPLICATION_ID}}&barcode=2000000001814' \
--header 'applicationId: {{APPLICATION_ID}}' \
--header 'appId: {{APPLICATION_ID}}' \
--header 'namespace: {{NAMESPACE}}' \
--header 'languageId: IT' \
--header 'username: {{USERNAME}}' \
--header 'password: {{PASSWORD}}' \
--header 'companyId: {{COMPANY_ID}}' \
--header 'siteId: {{SITE_ID}}' \
--header 'loadRoles: Y' \
--header 'Content-Type: application/json'

Responses

🟢200Get Giftcard (GAE Call) - success response
application/json
Body

Example
{
    "success": true,
    "giftcard": {
        "id": "SVILU_500_440_2000000001814",
        "companyId": "SVILU",
        "siteId": 500,
        "branchCode": 1,
        "entityCode": 440,
        "cardBarcode": "2000000001814",
        "issueDate": "2021-10-04 00:00:00",
        "activationDate": "2021-10-04 00:00:00",
        "expirationDate": "2021-11-04 00:00:00",
        "flgActive": "Y",
        "priceList": "1",
        "priceListType": "V",
        "decimalNumber": 2,
        "currencySymbol": "€",
        "currency": "EUR",
        "originalAmount": 390,
        "amount": 390,
        "itemType": "FINANCIAL",
        "itemSubtype": "GIFTCARD",
        "itemCode": "GF440VP15_400_3",
        "taxRate": 21,
        "vatCode": 3,
        "printerDepartmentCode": 1,
        "flgNetworkUsage": "Y",
        "flgPartiallyUsage": "Y",
        "paymentTermCode": 201,
        "flgAllowOfflineUsage": "N",
        "taxation": ""
    }
}
🟠422Unique constraint error
Modified at 2025-02-07 15:16:44
Previous
Get last loyalty vouchers
Next
Update Giftcard
Built with