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.
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.
post
https://my.xena.biz
/Api/Fiscal/{fiscalId}/Partner
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.
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.