A walk-through of the most common actions in Xena, done via our API.
For a complete overview of the Xena API, please go to https://xena.biz/api-doc/

How the create a partner

A partner in Xena can be used as a creditor, debtor and/or employee. The idea behind this is to avoid duplicate data and to give our customers a better overview of all of their business with a specific partner. If a partner is a creditor, it will have a customer context connected. If a partner is a debtor, it will have a supplier context connected. A partner can have more than one context. When you make a lookup on a specific partner, you will get info about the contexts associated.
GET https://my.xena.biz/Api/Fiscal/{fiscalId}/Partner/{partnerId}
"SupplierId": {Supplier context id},
"CustomerId": {customer context id},
"ResourceId": {resource context id},
This is important to understand when you create a new partner. If you use the default endpoint, the partner will be created without any contexts.
There are two ways to creating a partner. The first method requires two API calls. The second method can only create a customer or supplier but only requires one API call.
Create a partner without any context
This will create a new partner in Xena. In Xena, the partner can be converted to a customer, supplier or/and employee. If you want to add a context you can use the following endpoint.
Create a partner context
Create a partner as a customer and/or supplier

How to create an order and add articles

In this section we will show you how to create an order and add an article to that order. This can be done with the following steps:
  1. 1.
    Create the order
  2. 2.
    Find the order task or add an order task
  3. 3.
    Add a line to the order task
  4. 4.
    Update the order line with an article
In the following sections we will describe the needed endpoints.
Create an order
Save the Id - you will need it later.
You can find the full model here
Articles/lines are not added directly to the order but to an order task. One order can have several order tasks. The next step is to get the tasks and add articles to them.
Get order tasks
Find an order task
You should save the Id.
Create an order task line
Update an order task line

How to create an invoice

[Coming up]