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

Get last loyalty vouchers

GET
/api
Last modified:2025-02-07 15:16:33
Returns loylaty vouchers created after the indicated date fromDateTime.
NB: All vouchers are returned regardless of their status, activation date or expiration date.
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 customer voucher

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#

Voucher#

FieldDescriptionType
idVoucher idString
barcodeVoucher barcodeString
totalAmountVoucher amountNumber
documentTypeDocument typeString
causeDocument causeString
documentStatusOPEN=voucher not used, CLOSE=voucher spentString
branchCodeBranch codeNumber
branchDescriptionBranch descriptionString
cardBarcodeCustomer fidelity cardString
clientCodeCustomer codeString
clientIdKeepitKeepIT subject idString
subjectDenominationSubject denominationString
confirmationDateOrderValidity start date with format "yyyy-MM-dd HH:mm:ss", using GMT timeString
endValidityEnd validity data with format "yyyy-MM-dd HH:mm:ss", using GMT timeString
currencyCurrency (ex EUR)String
currencySymbolCurrency symbolString
sellerCodeSeller codeString
sellerDescriptionSeller descriptionString
createDateVoucher create dateString

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=getLastVouchers_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 last loyalty vouchers (GAE Call) - success
application/json
Body

Example
{
    "success": true,
    "valueObjectList": [
        {
            "id": "4e8d2fd9-8ed3-4bda-b783-ced258db8828",
            "barcode": "7000000000000017",
            "totalAmount": 330.18,
            "documentType": "LOYALTY",
            "cause": "VOUCHER",
            "documentStatus": "ACTIVE",
            "branchCode": 1150,
            "branchDescription": "Negozio Mobile shop (Michele)",
            "cardBarcode": "0099000001209",
            "clientCode": "60272",
            "clientIdKeepit": "60272",
            "subjectDenomination": "Biasotto Luca",
            "confirmationDateOrder": "2021-03-17 10:42:52",
            "endValidity": "2021-04-17 10:42:00",
            "currency": "EUR",
            "currencySymbol": "€",
            "sellerCode": "111",
            "sellerDescription": "Michele Bozzo",
            "createDate": "2021-03-17 10:42:56"
        },
        {
            "id": "e466a158-2aab-48a4-a9ee-e25d17152e1e",
            "barcode": "7000000000000031",
            "totalAmount": 80.5,
            "documentType": "LOYALTY",
            "cause": "VOUCHER",
            "documentStatus": "ACTIVE",
            "branchCode": 1150,
            "branchDescription": "Negozio Mobile shop (Michele)",
            "cardBarcode": "8000000314123",
            "clientCode": "100000",
            "clientIdKeepit": "100000",
            "subjectDenomination": "ALFANO GIANLUCIA",
            "confirmationDateOrder": "2021-03-19 14:47:09",
            "endValidity": "2021-04-19 14:47:00",
            "currency": "EUR",
            "currencySymbol": "€",
            "sellerCode": "111",
            "sellerDescription": "Michele Bozzo",
            "createDate": "2021-03-19 14:47:17"
        },
        {
            "id": "d891dcb4-5f20-4693-8c5e-fac978691098",
            "barcode": "7000000000000048",
            "totalAmount": 144.49,
            "documentType": "LOYALTY",
            "cause": "VOUCHER",
            "documentStatus": "ACTIVE",
            "branchCode": 1150,
            "branchDescription": "Negozio Mobile shop (Michele)",
            "cardBarcode": "8000000314123",
            "clientCode": "100000",
            "clientIdKeepit": "100000",
            "subjectDenomination": "ALFANO GIANLUCIA",
            "confirmationDateOrder": "2021-03-19 16:36:28",
            "endValidity": "2021-04-19 16:36:00",
            "currency": "EUR",
            "currencySymbol": "€",
            "sellerCode": "111",
            "sellerDescription": "Michele Bozzo",
            "createDate": "2021-03-19 16:36:31"
        },
        {
            "id": "69093ce7-b47e-4863-9338-6c3a91c6da9a",
            "barcode": "7000000000000055",
            "totalAmount": 72.9,
            "documentType": "LOYALTY",
            "cause": "VOUCHER",
            "documentStatus": "ACTIVE",
            "branchCode": 1150,
            "branchDescription": "Negozio Mobile shop (Michele)",
            "cardBarcode": "0099000001209",
            "clientCode": "60272",
            "clientIdKeepit": "60272",
            "subjectDenomination": "Biasotto Luca",
            "confirmationDateOrder": "2021-03-24 10:38:59",
            "endValidity": "2021-04-24 10:39:00",
            "currency": "EUR",
            "currencySymbol": "€",
            "sellerCode": "111",
            "sellerDescription": "Michele Bozzo",
            "createDate": "2021-03-24 10:39:01"
        },
        {
            "id": "cf6335dd-8b80-4af5-ae9a-1ebc96001d7c",
            "barcode": "7000000000000062",
            "totalAmount": 139.8,
            "documentType": "LOYALTY",
            "cause": "VOUCHER",
            "documentStatus": "ACTIVE",
            "branchCode": 1150,
            "branchDescription": "Negozio Mobile shop (Michele)",
            "cardBarcode": "8000000336477",
            "clientCode": "101821",
            "clientIdKeepit": "101821",
            "subjectDenomination": "ALFANO LINO",
            "confirmationDateOrder": "2021-03-25 08:43:20",
            "endValidity": "2021-04-25 08:43:00",
            "currency": "EUR",
            "currencySymbol": "€",
            "sellerCode": "111",
            "sellerDescription": "Michele Bozzo",
            "createDate": "2021-03-25 08:43:24"
        },
        {
            "id": "0f6b06f3-4b97-4d53-9d0c-6a8cc2950815",
            "barcode": "7000000000000079",
            "totalAmount": 85,
            "documentType": "LOYALTY",
            "cause": "VOUCHER",
            "documentStatus": "ACTIVE",
            "branchCode": 1150,
            "branchDescription": "Negozio Mobile shop (Michele)",
            "cardBarcode": "0099000001209",
            "clientCode": "60272",
            "clientIdKeepit": "60272",
            "subjectDenomination": "Biasotto Luca",
            "confirmationDateOrder": "2021-03-25 16:18:41",
            "endValidity": "2021-04-25 16:19:00",
            "currency": "EUR",
            "currencySymbol": "€",
            "sellerCode": "111",
            "sellerDescription": "Michele Bozzo",
            "createDate": "2021-03-25 16:19:11"
        },
        {
            "id": "961ba4c8-2f83-4845-bee4-478d6451e648",
            "barcode": "7000000000000086",
            "totalAmount": 86.21,
            "documentType": "LOYALTY",
            "cause": "VOUCHER",
            "documentStatus": "ACTIVE",
            "branchCode": 1150,
            "branchDescription": "Negozio Mobile shop (Michele)",
            "cardBarcode": "8000000314123",
            "clientCode": "100000",
            "clientIdKeepit": "100000",
            "subjectDenomination": "ALFANO GIANLUCIA",
            "confirmationDateOrder": "2021-03-26 08:51:07",
            "endValidity": "2021-04-26 08:51:00",
            "currency": "EUR",
            "currencySymbol": "€",
            "sellerCode": "111",
            "sellerDescription": "Michele Bozzo",
            "createDate": "2021-03-26 08:51:10"
        },
        {
            "id": "d94b059b-0501-4cdb-97fd-ab931f177ec6",
            "barcode": "7000000000000093",
            "totalAmount": 98.3,
            "documentType": "LOYALTY",
            "cause": "VOUCHER",
            "documentStatus": "ACTIVE",
            "branchCode": 1150,
            "branchDescription": "Negozio Mobile shop (Michele)",
            "cardBarcode": "0099000001209",
            "clientCode": "60272",
            "clientIdKeepit": "60272",
            "subjectDenomination": "Biasotto Luca",
            "confirmationDateOrder": "2021-03-29 08:46:51",
            "endValidity": "2021-04-29 08:47:00",
            "currency": "EUR",
            "currencySymbol": "€",
            "sellerCode": "111",
            "sellerDescription": "Michele Bozzo",
            "createDate": "2021-03-29 08:47:36"
        },
        {
            "id": "33a2449a-8f12-49ca-beaf-f6b5e4435a87",
            "barcode": "7000000000000109",
            "totalAmount": 98.3,
            "documentType": "LOYALTY",
            "cause": "VOUCHER",
            "documentStatus": "ACTIVE",
            "branchCode": 1150,
            "branchDescription": "Negozio Mobile shop (Michele)",
            "cardBarcode": "0099000001209",
            "clientCode": "60272",
            "clientIdKeepit": "60272",
            "subjectDenomination": "Biasotto Luca",
            "confirmationDateOrder": "2021-03-29 08:46:51",
            "endValidity": "2021-04-29 08:47:00",
            "currency": "EUR",
            "currencySymbol": "€",
            "sellerCode": "111",
            "sellerDescription": "Michele Bozzo",
            "createDate": "2021-03-29 08:47:37"
        },
        {
            "id": "8aca94ac-7be8-4c88-876a-df08824b3fbc",
            "barcode": "7000000000000116",
            "totalAmount": 96.9,
            "documentType": "LOYALTY",
            "cause": "VOUCHER",
            "documentStatus": "ACTIVE",
            "branchCode": 1150,
            "branchDescription": "Negozio Mobile shop (Michele)",
            "cardBarcode": "8000000336477",
            "clientCode": "101821",
            "clientIdKeepit": "101821",
            "subjectDenomination": "ALFANO LINO",
            "confirmationDateOrder": "2021-03-31 09:12:41",
            "endValidity": "2021-04-30 09:12:00",
            "currency": "EUR",
            "currencySymbol": "€",
            "sellerCode": "111",
            "sellerDescription": "Michele Bozzo",
            "createDate": "2021-03-31 09:12:49"
        },
        {
            "id": "081460a3-be14-48c2-9da0-756ecf43c98b",
            "barcode": "7000000000000123",
            "totalAmount": 57,
            "documentType": "LOYALTY",
            "cause": "VOUCHER",
            "documentStatus": "ACTIVE",
            "branchCode": 1,
            "branchDescription": "Negozio 1",
            "cardBarcode": "9000000000933",
            "clientCode": "142169",
            "clientIdKeepit": "142169",
            "subjectDenomination": "Binda Emanuela",
            "confirmationDateOrder": "2021-04-02 17:35:00",
            "endValidity": "2021-05-02 16:03:00",
            "currency": "EUR",
            "currencySymbol": "€",
            "sellerCode": null,
            "sellerDescription": null,
            "createDate": "2021-04-02 16:03:12"
        },
        {
            "id": "ff1bf7d1-f6b6-495b-9714-fa66c86b55a1",
            "barcode": "7000000000000130",
            "totalAmount": 50.5,
            "documentType": "LOYALTY",
            "cause": "VOUCHER",
            "documentStatus": "ACTIVE",
            "branchCode": 1150,
            "branchDescription": "Negozio Mobile shop (Michele)",
            "cardBarcode": "0099000001209",
            "clientCode": "60272",
            "clientIdKeepit": "60272",
            "subjectDenomination": "Biasotto Luca",
            "confirmationDateOrder": "2021-04-07 13:08:19",
            "endValidity": "2021-05-07 13:09:00",
            "currency": "EUR",
            "currencySymbol": "€",
            "sellerCode": "111",
            "sellerDescription": "Michele Bozzo",
            "createDate": "2021-04-07 13:09:56"
        },
        {
            "id": "1c3e52f1-9a7c-45ff-b4b0-161e9d38dfd2",
            "barcode": "7000000000000147",
            "totalAmount": 70.44,
            "documentType": "LOYALTY",
            "cause": "VOUCHER",
            "documentStatus": "ACTIVE",
            "branchCode": 1150,
            "branchDescription": "Negozio Mobile shop (Michele)",
            "cardBarcode": "8000000314123",
            "clientCode": "100000",
            "clientIdKeepit": "100000",
            "subjectDenomination": "ALFANO GIANLUCIA",
            "confirmationDateOrder": "2021-04-08 08:03:01",
            "endValidity": "2021-05-08 08:03:00",
            "currency": "EUR",
            "currencySymbol": "€",
            "sellerCode": "111",
            "sellerDescription": "Michele Bozzo",
            "createDate": "2021-04-08 08:03:05"
        },
        {
            "id": "5f6e511d-875b-4ec8-9f12-daa98611e16f",
            "barcode": "7000000000000154",
            "totalAmount": 80.81,
            "documentType": "LOYALTY",
            "cause": "VOUCHER",
            "documentStatus": "ACTIVE",
            "branchCode": 1150,
            "branchDescription": "Negozio Mobile shop (Michele)",
            "cardBarcode": "8000000314123",
            "clientCode": "100000",
            "clientIdKeepit": "100000",
            "subjectDenomination": "ALFANO GIANLUCIA",
            "confirmationDateOrder": "2021-04-16 15:44:30",
            "endValidity": "2021-05-16 15:44:00",
            "currency": "EUR",
            "currencySymbol": "€",
            "sellerCode": "111",
            "sellerDescription": "Michele Bozzo",
            "createDate": "2021-04-16 15:44:39"
        },
        {
            "id": "4f955e86-5a08-46b7-a788-92248de52e2f",
            "barcode": "7000000000000161",
            "totalAmount": 816.97,
            "documentType": "LOYALTY",
            "cause": "VOUCHER",
            "documentStatus": "ACTIVE",
            "branchCode": 6,
            "branchDescription": "Negozio 6",
            "cardBarcode": "GENERIC_CUSTOMER",
            "clientCode": "141734",
            "clientIdKeepit": "141734",
            "subjectDenomination": "Generico Generico",
            "confirmationDateOrder": "2016-04-05 00:00:00",
            "endValidity": "2021-05-19 10:13:00",
            "currency": "EUR",
            "currencySymbol": "€",
            "sellerCode": null,
            "sellerDescription": null,
            "createDate": "2021-04-19 10:13:12"
        },
        {
            "id": "daa391fa-80f7-4ce9-9cf4-aad86ca6f54e",
            "barcode": "7000000000000178",
            "totalAmount": 70.8,
            "documentType": "LOYALTY",
            "cause": "VOUCHER",
            "documentStatus": "ACTIVE",
            "branchCode": 1150,
            "branchDescription": "Negozio Mobile shop (Michele)",
            "cardBarcode": "8000000314123",
            "clientCode": "100000",
            "clientIdKeepit": "100000",
            "subjectDenomination": "ALFANO GIANLUCIA",
            "confirmationDateOrder": "2021-04-21 15:50:30",
            "endValidity": "2021-05-21 15:50:00",
            "currency": "EUR",
            "currencySymbol": "€",
            "sellerCode": "111",
            "sellerDescription": "Michele Bozzo",
            "createDate": "2021-04-21 15:50:35"
        },
        {
            "id": "2bdbfbaa-6c34-42bd-a953-2022c82a7201",
            "barcode": "7000000000000185",
            "totalAmount": 45.1,
            "documentType": "LOYALTY",
            "cause": "VOUCHER",
            "documentStatus": "ACTIVE",
            "branchCode": 1150,
            "branchDescription": "Negozio Mobile shop (Michele)",
            "cardBarcode": "8000000314123",
            "clientCode": "100000",
            "clientIdKeepit": "100000",
            "subjectDenomination": "ALFANO GIANLUCIA",
            "confirmationDateOrder": "2021-04-27 10:43:18",
            "endValidity": "2021-05-27 10:43:00",
            "currency": "EUR",
            "currencySymbol": "€",
            "sellerCode": "111",
            "sellerDescription": "Michele Bozzo",
            "createDate": "2021-04-27 10:43:21"
        },
        {
            "id": "5a0ec8eb-f126-4692-988b-52cc6166f3c3",
            "barcode": "7000000000000192",
            "totalAmount": 42.5,
            "documentType": "LOYALTY",
            "cause": "VOUCHER",
            "documentStatus": "ACTIVE",
            "branchCode": 1150,
            "branchDescription": "Negozio Mobile shop (Michele)",
            "cardBarcode": "8000000336477",
            "clientCode": "101821",
            "clientIdKeepit": "101821",
            "subjectDenomination": "ALFANO LINO",
            "confirmationDateOrder": "2021-04-27 13:05:39",
            "endValidity": "2021-05-27 13:05:00",
            "currency": "EUR",
            "currencySymbol": "€",
            "sellerCode": "111",
            "sellerDescription": "Michele Bozzo",
            "createDate": "2021-04-27 13:05:43"
        },
        {
            "id": "d794a8eb-6b9b-4c18-86ff-d5a7a6d3206b",
            "barcode": "7000000000000208",
            "totalAmount": 65.6,
            "documentType": "LOYALTY",
            "cause": "VOUCHER",
            "documentStatus": "ACTIVE",
            "branchCode": 1150,
            "branchDescription": "Negozio Mobile shop (Michele)",
            "cardBarcode": "8000000336477",
            "clientCode": "101821",
            "clientIdKeepit": "101821",
            "subjectDenomination": "ALFANO LINO",
            "confirmationDateOrder": "2021-04-27 14:30:38",
            "endValidity": "2021-05-27 14:30:00",
            "currency": "EUR",
            "currencySymbol": "€",
            "sellerCode": "111",
            "sellerDescription": "Michele Bozzo",
            "createDate": "2021-04-27 14:30:44"
        },
        {
            "id": "e1e72960-c1df-48ee-b002-c9b07c7def1b",
            "barcode": "7000000000000215",
            "totalAmount": 180.8,
            "documentType": "LOYALTY",
            "cause": "VOUCHER",
            "documentStatus": "ACTIVE",
            "branchCode": 1150,
            "branchDescription": "Negozio Mobile shop (Michele)",
            "cardBarcode": "0099000001209",
            "clientCode": "60272",
            "clientIdKeepit": "60272",
            "subjectDenomination": "Biasotto Luca",
            "confirmationDateOrder": "2021-04-27 15:41:11",
            "endValidity": "2021-05-27 15:41:00",
            "currency": "EUR",
            "currencySymbol": "€",
            "sellerCode": "111",
            "sellerDescription": "Michele Bozzo",
            "createDate": "2021-04-27 15:41:16"
        }
    ],
    "moreRows": true
}
🟠422Unique constraint error
Modified at 2025-02-07 15:16:33
Previous
Get loyalty vouchers at a time interval
Next
Get Giftcard
Built with