j-Platform REST tüketim öncesi mutlaka auth-token (erişim belirteci) ifadesinin isteğin içerisinde yer alması gerekmektedir. swagger dokumantasyonu için http://localhost:8080/logo/restdocs/ adresine erişilerek açılan sayfada url kısmındaki help kısmına resimdeki gibi emulatingcontrollers yazılarak v2.0 kullanımlarına ulaşılabilir.


Required Informations
Method : GET
Host + Path : http://localhost:8080/logo/restservices/rest/v2.0/items?itemCode=0000000001

Header Parametreleri : 
 accept : application/json
 auth-token: MTpmMWU1NzNhMjA2Nzc1Mzc4OmFkbWlu

Örn auth-token (Base64 encode için : https://www.base64decode.org/)

BASE64Encode(client token:auth-token:user)

BASE64Encode(1:3e11f7fa1206775136:admin)


GET Response
{
  "code": "0000000011",
  "description": "2.EL ARAC SATISI/ Sezgin Deneme",
  "secondDescription": "",
  "searchText": "",
  "auxCode": "",
  "authCode": "",
  "groupCode": "",
  "additionalTaxCode": "",
  "paymentType": "",
  "glConnectionGroup": "",
  "brandCode": "",
  "brandDescription": "",
  "modelCode": "",
  "modelDescription": "",
  "shelfLife": 0.0,
  "shelfLifeType": 0,
  "guaranteePeriod": 0.0,
  "guaranteePeriodType": 0,
  "averageInStockDurationday": 0.0,
  "distributionType": 0,
  "materialCode": "",
  "materialDescription": "",
  "costingMethod1": 2,
  "ifrscostMethod": 1,
  "scrapRateforPartingOperationPercent": 0.0,
  "purchase": 18,
  "sales": 19,
  "retailSales": 21,
  "returns": 20,
  "retailSalesReturn": 22,
  "salesDeductionRatePart1": 0,
  "salesDeductionRatePart2": 0,
  "purchaseDeductionRatePart1": 0,
  "purchaseDeductionRatePart2": 0,
  "salesDeductionCode": 0,
  "salesDeductionDescription": "",
  "purchaseDeductionCode": 0,
  "purchaseDeductionDescription": "",
  "ctspcode": "",
  "exportCategoryNo": "",
  "vendorCode": "",
  "isono": "",
  "intrastatNo": "",
  "intrastatDescription": "",
  "manufacturingPlace": "",
  "stateCode": "",
  "stateName": "",
  "customsNumber": "",
  "assetCategory": 0,
  "depreciationType": 0,
  "depreciationRate": 0.0,
  "depreciationPeriodYear": 0,
  "revaluation": 1,
  "revaluationDepreciation": 1,
  "prorataDepreciation": 0,
  "auxiliaryCode2": "",
  "auxiliaryCode3": "",
  "auxiliaryCode4": "",
  "auxiliaryCode5": "",
  "unitAssignments": [
    {
      "unit": "ADET",
      "mainUnit": "ADET",
      "divisible": false,
      "barcode": "null",
      "barcodewithUnit": "",
      "decimalPlace": 0,
      "access": 0,
      "modules": 7,
      "priorityMM": 0,
      "priorityPC": 0,
      "prioritySD": 0,
      "width": 0.0,
      "unitWidth": "",
      "length": 0.0,
      "unitLength": "",
      "height": 0.0,
      "unitHeight": "",
      "area": 0.0,
      "unitArea": "",
      "netVolume": 0.0,
      "unitNetVolume": "",
      "grossVolume": 0.0,
      "unitGrossVolume": "",
      "netWeight": 0.0,
      "unitNetWeight": "",
      "grossWeight": 0.0,
      "unitGrossWeight": "",
      "code": null,
      "description": null,
      "value": null,
      "valueDescription": null,
      "boField": null,
      "restProfileFields": null
    },
    {
      "unit": "COUNT",
      "mainUnit": "ADET",
      "divisible": false,
      "barcode": "null",
      "barcodewithUnit": "",
      "decimalPlace": 0,
      "access": 0,
      "modules": 7,
      "priorityMM": 0,
      "priorityPC": 0,
      "prioritySD": 0,
      "width": 0.0,
      "unitWidth": "",
      "length": 0.0,
      "unitLength": "",
      "height": 0.0,
      "unitHeight": "",
      "area": 0.0,
      "unitArea": "",
      "netVolume": 0.0,
      "unitNetVolume": "",
      "grossVolume": 0.0,
      "unitGrossVolume": "",
      "netWeight": 0.0,
      "unitNetWeight": "",
      "grossWeight": 0.0,
      "unitGrossWeight": "",
      "code": null,
      "description": null,
      "value": null,
      "valueDescription": null,
      "boField": null,
      "restProfileFields": null
    }
  ],
  "applyVATonComponents": false,
  "trackbyLocation": false,
  "discountInapplicable": false,
  "configurable": false,
  "subjecttoInspection": false,
  "importExpense": false,
  "affectsCost": false,
  "applyDeduction": true,
  "materialManagement": true,
  "purchasingManagement": true,
  "salesManagement": true,
  "costAccounting": false,
  "corporateEmployeePortal": true,
  "lotUnitDistributable": false,
  "lotUnitCombinable": false,
  "divisibleLotSize": true,
  "spaced": false,
  "lotSerialTrackingMethod": 0,
  "gst": "",
  "hsn": "",
  "sac": null,
  "note": "",
  "description3": "",
  "description4": "",
  "additionalTaxCode2": "",
  "gSTDefinition2": "",
  "stoppageRatePercent": 0.0,
  "cPACode": "",
  "country": "",
  "countryName": "",
  "tRY": 0.0,
  "uSD": 0.0,
  "depreciationType2": 1,
  "depreciationRate2": 0.0,
  "depreciationPeriodYear2": 0,
  "revaluation2": 0,
  "revaluationDepreciation2": 0,
  "prorataDepreciation2": 0,
  "accessibility": 0,
  "tool": false,
  "package1": false,
  "unitSet": "05",
  "description2": "Adet",
  "tdsCode": null,
  "reverseChargeApplicable": false,
  "serviceCharacteristics": null,
  "averageInStockDurationdate": null,
  "cardType": 0,
  "logicalRef": 0,
  "boField": null,
  "restProfileFields": null
}
GET Request in Java
conn.setRequestMethod("GET");
conn.setRequestProperty("Accept", "application/json");
String header = CLIENT_TOKEN+":" + AUTH_TOKEN +":" + userName;
String basicAuth = Base64.getEncoder().encodeToString(header.getBytes());
conn.setRequestProperty ("auth-token", basicAuth);
conn.setRequestProperty( "charset", "utf-8");
GET Request in C#
string urlPathForRequest = "http://localhost:8080/logo/restservices/rest/v2.0/items?itemCode=0000000001";
WebRequest webrequest = WebRequest.Create(urlPathForRequest);
webrequest.Method = "GET";
webrequest.ContentType = "application/json";      
webrequest.Headers.Add("auth-token", getEncodedAuthToken());
Telif HakkıKullanım KoşullarıGizlilik
Copyright © 2018 Logo Yazılım