Loading
Uniconta
Search
Generic filters
Free trial signup
  • Visit a Country Site
    • Dansk
    • Deutsch
    • Eesti
    • Íslenska
    • Lietuvis
    • Nederlands
    • Norsk
    • English
  • Search
  • Uniconta
    • What is Uniconta ?
    • Modules
    • Ledger
    • Customer
    • Sales Order
    • Vendor
    • Purchase
    • Inventory
    • Logistics
    • Project
    • Light Manufacturing
    • CRM
    • Fixed assets
    • Dashboard
    • Company
    • Adaptability
  • Download
    • Uniconta for Windows
    • Uniconta for Mac
    • Download for Developers
    • Free trial signup
  • Resellers
    • Find a reseller
    • Become a reseller
    • Partner Portal Login
    • Partner Portal sign up
  • Developers
    • Become an integration partner
    • Documentation
    • Samples
    • Downloads
  • Accountants
    • Become a Univisor
  • News Overview
    • Blog
    • News
    • Uniconta Update
    • Customer cases
  • About us
    • About us
      • Management
      • Contact
      • IT Security ISAE 3402
      • System status
    • Terms & Conditions
      • License Agreement
      • Data Processing Agreement (DPA)
      • Privacy policy
      • Cookie policy
      • Sub-processors

Developers Unipedia

  • API
    • API
    • User defined fields
    • User defined tables
    • Saving a Session
    • Posting an Invoice
    • Post Invoice and get PDF
    • Localization
    • Attach physical voucher to entities
    • Server-Login User
    • How to find C# Property from Uniconta Label
    • Minimize network traffic and optimize speed
  • Plugins
    • Plugins
    • Debug Uniconta Plugins
    • Refreshing UI with plugins
    • How to use Uniconta Plugin
    • Develop a user plugin
    • Event Handling
    • Global Script
    • How to capture menu events
    • How to open a form in Uniconta from Plugin
    • Open new content in a IContentPluginBase plugin
    • Adding plugin in a menu
    • How to add user parameter in plugin menu
    • How to create plugin with Devexpress Library
    • Synchronize Entity Support in form page
    • Develop a PageEventBase Plugin
    • Logging Exceptions on local machine
    • Create Custom Uniconta Pages From Github Code
  • OData
    • CRUD operations in OData
    • ODATA REST API – Testing with Postman

ODATA REST API – Testing with Postman

2,276 898 January 29th, 2020 August 6th, 2020
Print Friendly, PDF & Email

A common tool for testing REST services is the tool Postman.

This article will cover how to access and use the Uniconta ODATA API using Postman.

Because it is an ODATA API, no API key is required. Uniconta login credentials are the only thing you need to call the API.

Endpoints

You can find endpoints and more in the CRUD operations in ODATA article.

In general, the endpoints have the following formats:

GET:
https://odata.uniconta.com/api/Entities/GLDailyJournalClient
https://odata.uniconta.com/api/Entities/Read/GLDailyJournalClient

POST:
https://odata.uniconta.com/api/Entities/Insert/GLDailyJournalClient

DELETE:
https://odata.uniconta.com/api/Entities/Delete/GLDailyJournalClient

PUT:
https://odata.uniconta.com/api/Entities/Update/GLDailyJournalClient

 

Filter

You can filter or query for specific entries as follows:

https://odata.uniconta.com/api/Entities/CreditorClient?Name=Account&Value=2001

The above will return a JSON array with 1 entry, which has Account 2001.

Authorization

Authorization uses Basic Auth.

The username is where the company id is specified, as well as the username.

The company and username can be specified in the following format:

00<CompanyID>/<Username>

The two zeros at the start denotes that a company ID will be provided. There are more ways to login, see the article “OData – Hent data fra Uniconta” for more information.

Sending a PUT request

In order to update an entitiy, we must first get said entity.

We can do this by using the filtered search from earlier:

https://odata.uniconta.com/api/Entities/CreditorClient?Name=Account&Value=2001

The JSON element within the array, we will copy to the body of our PUT request. It may look something like this:

{
    “_UpdatedAt”: “2020-01-29T08:15:50Z”,
    “_Account”: “2001”,
    “_Name”: “MyRestCreditor”,
    …
}

Note that all properties with null will be omitted. So if the address2 property was null, you must add it yourself as so:

{
    “_UpdatedAt”: “2020-01-29T08:15:50Z”,
    “_Account”: “2001”,
    “_Name”: “MyRestCreditor”,
    “Address2”: “My Extra Address”,
    …
}

Then send out the PUT request, which should return status code 200.

Sending a DELETE request

Similarly to UPDATE, we must first get the entity to delete.

We simply dump the JSON element into the body of the DELETE request and sned it out.

Sending a POST request

When we wish to create a new entity, we simply need to provide the body of the request with a JSON of the information we wish to provide.

Only the entities required properties must be provided(e.g. Account).

A valid body for a CreditorClient may be the following:

{
“Account”:  2001,
“Name”: “My Test Account”
}

 

Categories: API, Developers Unipedia, OData

Get in touch with us

Uniconta

  • Uniconta
  • Modules
  • Downloads
  • Free trial signup
  • Subscription Terms
  • System Status

PARTNER

  • Become a Reseller
  • Become App Partner
  • For Developers
  • For Accountants (Univisor)
  • Uniconta Partner Portal

INFO

  • News
  • Updates
  • Customer cases
  • Video
  • IT Security
  • About us
  • Management

Support

  • Unipedia
  • API information
  • Contacts
  • Visit a Country Site
    • Dansk
    • Deutsch
    • Eesti
    • Íslenska
    • Lietuvis
    • Nederlands
    • Norsk
    • English
Uniconta
© Copyright 2019 | All rights reserved | info@uniconta.com | Terms & Conditions
Facebook Twitter LinkedIn Youtube