WebAPI changes with the release of SR11

WebAPI changes with the release of SR11

The SR11 release has performance improvements at the API level and essentially the ODATA methods, but these improvements have forced us to have small breaks.

With the release of SR11, integrations between Valuekeep and external systems or specific reports my stop working. To fix this issue, please make the bellow changes: 
  1. Get methods:
  1. When creating a company dependent record, if there is only one company, it will not be selected automatically. It is now necessary to pass it as a resource or use the X-Company Hearder;

  2. The strings "1" and "0" are no longer converted into booleans.
    1. Example: Create an entity and pass a boolean field as 0 or 1, as in the example below:
  1. 0001/financialcore/paymentterms
    {
    "test": "t0",
    "cenario": "Criação de condição de pronto pagamento",
    "paymentTermKey": "0dias",
    "description": "Pronto pagamento",
    "daysFromReferenceDate": "0",
    "useInAccountsReceivable": "1",
    "useInAccountsPayable": "1",
    "validFrom": "2016-01-01T00:00:00",
    "validTo": "2099-12-31T00:00:00"
    }
Returns an error and the message:
  1. {"validations":[{"propertyName":"useInAccountsPayable","errorMessage":"Could not
    convert string to boolean: 1. Path 'useInAccountsPayable', line 8, position 28."},{"propertyName":"useInAccountsReceivable","errorMessage":"Could not convert string toboolean: 1. Path 'useInAccountsReceivable', line 7, position 31."}]}
  1. Money properties with empty values are no longer accepted;
    1. Example:
  1. 0001/financialcore/financialAccounts{"description": "Caixa para moedas estrangeiras","financialAccountType":"1","validFrom": "2016-01-01T00:00:00","validTo": "2099-12-31T00:00:00","financialAccountKey": "CXCURRENCY","company": "SOQUENTE","allowForeignCurrency":"true","hasOpeningBalance":"","openingDate":"","openingAmount": {"amount":""}}}}
Returns an error (400) and the message:
  1. {"validations":[{"propertyName":"openingAmount.amount","errorMessage":"Error
    converting value {null} to type 'System.Decimal'. Path 'openingAmount.amount', line22, position _15."}]}

Important: with the new version of OData, some commands have changed slightly:
Ex: "Expand" command.
Before: /odata?$select=DocumentLines/SalesItem&$expand=DocumentLines
Current: /odata?$select=NaturalKey&$expand=DocumentLines($select=SalesItem)


    • Related Articles

    • Product Release December 2022

      Automatic English subtitles available in the video. In this release, we highlight the following features: Web Spare parts within locations Allows you to define which spare parts and quantities are associated with a given location. Predicted duration ...
    • Product Release September 2022

      In this release, we highlight the following features: Planner It is now possible to create, edit, assign work orders, and manage preventive events directly from the planner.   Manage meters and monitoring characteristics Manage meter and monitoring ...
    • Product Release October 2022

      In this release, we highlight the following features: Valuekeep solution in two new languages: French and Romanian.  Besides the above-mentioned new languages, Valuekeep can also be used in Portuguese, Spanish, English, and Italian.
    • Product Release March 2023

      In this release, we highlight the following features: Automatic english subtitles available Contracts Valuekeep allows companies to create different types of contracts, define contract flows, and add information such as descriptions, dates, values, ...
    • Product Release June 2022

      In this release we highlight the following features: Planner With Valuekeep Planner, the maintenance manager and administrator can now plan the work of their technicians through various calendar views. ​ With the administrator profile, you can view ...