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

Get Customer

GET
/api
Last modified:2025-02-07 15:15:48
Returns the customer for the passed fidelity card barcode.
The web service response will be composed of:
success: Boolean that indicated wether the request was successful or not
customer: Customer Data
NB: if you want the user's barcode in a non-standard field, this field must be specified in pkFieldName

Actors#

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

Fields#

Customer data#

FieldDescriptionType
address1Main addressString
birthdayBirthday in format with format "yyyy-MM-dd HH:mm:ss", using GMT timeString
branchCodeBranch codeNumber
cardBarcodecustomer barcodeString
cardSubtypeDescriptionDefaultString
cardSubtypeCard subtypeString
circuitCard circuitString
cityCityString
companyIdCompany idString
countryCountry (ISO2)String
earnedPointsEarned pointsNumber
emailCustomer emailString
entityCodeEntity codeNumber
flgFreeServicesY/N if user has free servicesString
foreignPersonY/N if is a foreign personString
isCompanyY/N if is a companyString
provinceProvince (ISO2)String
siteIdSite idNumber
subjectCodeSubject KeepIT codeString
subjectDenominationSujbect denominationString
subjectNameSubject nameString
subjectSubtypeSubject subtypeString
subjectSurnameSubject nameString
subjectTypeDescriptionSubject type descriptionString
identifierex of customer id field specify in pkFieldNameString

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 --request GET '/api?applicationId=MOBILE_SHOP&appId=MOBILE_SHOP&cardBarcode=0000004385251&cmd=getCustomer_v1&pkFieldName=identifier' \
--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' \
--header 'Content-Type: application/json'

Responses

🟢200Get Customer - success response
application/json
Body

Example
{
    "success": true,
    "customer": {
        "address1": "Via Pascoli",
        "birthday": "1969-05-06 00:00:00",
        "branchCode": 1150,
        "cardBarcode": "0000004385257",
        "cardSubtypeDescription": "Default",
        "cardSubtype": "1",
        "circuit": "SINESY",
        "city": "Bologna",
        "companyId": "SVILU",
        "country": "IT",
        "earnedPoints": 0,
        "email": "andrea.camilla@sinesy.it",
        "entityCode": 500,
        "flgFreeServices": "N",
        "foreignPerson": "F",
        "isCompany": "N",
        "province": "BO",
        "siteId": 500,
        "subjectCode": "143434",
        "subjectDenomination": "Camilla Andrea",
        "subjectName": "Andrea",
        "subjectSubtype": "4",
        "subjectSurname": "Camilla",
        "subjectTypeDescription": "Fidelity",
        "identifier": "0000004385257"
    }
}
🟢200Get Customer - fail customer not found
🟠422Unique constraint error
Modified at 2025-02-07 15:15:48
Previous
Update Document external references
Next
Set Customer Opt-in
Built with