Three different types of fields are described on this page:

Orders fields

FieldDescription
idString, Yordex generated
UUID that is unique for this order
buyerOrderReferenceString, optional
The reference or ID under which this order is known in the systems of the buyer. The maximum length is 256 characters
sellerOrderReferenceString, optional
The reference or ID under which this order is known in the systems of the seller. The maximum length is 256 characters
statusString, Yordex generated
The status of this order. Possible values are listed on the right
buyerIdString, mandatory
The id for the trader who is the buyer in this order. This is the id used in the Traders API. This ID can also be found on the Contacts page for this trader
sellerIdString, mandatory
The id for the trader who is the seller in this order. This is the id used in the Traders API. This ID can also be found on the Contacts page for this trader
buyerWatcherUserIdsString, Yordex generated
The ids of everyone who has viewing access to the details of an order
buyerCompanyTradingNameString, Yordex generated
The company trading name for the trader who is the buyer in this order. This name is inserted by us for convenience. We will obtain if from the Traders API but you can also set it directly.
sellerCompanyTradingNameString, Yordex generated
The company trading name for the trader who is the seller in this order. This name is inserted by us for convenience. We will obtain if from the Traders API but you can also set it directly.
descriptionString, optional
A description for this order. The maximum length for this field is 255 characters
orderAmountInCents
orderAmountInCentsInBaseCurrency
Number, optional when creating order, mandatory when approving order
The total value for this order expressed in cents of the orderCurrency including VAT or GST. For example, when the orderAmountInCents is 100 and the orderCurrency is USD, the order is for $1. This field is optional when creating the order but mandatory when approving the order
orderCurrencyString, optional when creating order, mandatory when approving order
The currency for this order using the ISO-4217 standard. This field is optional when creating the order but mandatory when approving the order
orderCurrencyExponentString, Yordex generated
Indicates how many numbers at the end are reserved for cents. For most currencies this will be “2” : they have 2 digits so 100 cents. Some currencies have 0, 1 or 3 numbers. You will find a full list of supported currencies and their exponents here
vatAmountInCentsNumber, Yordex generated
The amount of VAT or GST included in the order amount in cents of the orderCurrency. This field will be calculated by Yordex if tax is included in the line items.
vatIncludedDeprecated field, don't use
buyerUserId
buyerUserEmail
String, optional
The user id of the the employee on the buyer's side who owns this order. This field can only be set by the buyer and it is updated using a PATCH.
buyerUserName
buyerUserFirstName
buyerUserLastName
String, Yordex generated
Name of the employee on the buyer's side who owns this order.
sellerUserIdString, optional
The user id of the the employee on the seller's side who owns this order. This field can only be set by the seller and it is updated using a PATCH
buyerTagsArray, optional
A set of user defined key:value pairs that can be used by the buyer to label the order. This field can only be set by the buyer and it is updated using a PATCH.

Common buyerTags are:
orderType: "PO" or "EXPENSE"
POType: "RECURRING"
creationDateString, Yordex generated
The date on which this order was created using the ISO-8601 standard
creationTimeString, Yordex generated
The time at which the order was created.
modificationDateString, Yordex generated
The date on which this order was last updated using the ISO-8601 standard
termsString, optional
The name of the terms to be used for this order. See the Terms API
eventsArray, optional when creating order, mandatory when approving order
An array representing the terms for this order. Every event represents a real-world event that can trigger a payment, e.g. “contract signed”, “goods ready for shipping” or “goods received”. The events fields are described below. The events array is optional when creating the order but mandatory when approving the order
lineItemsArray, optional
An array representing the line items for this order. The line items fields are described below.
buyerCostAllocationArray, optional
An array of budget(s) that this order should be charged to for the buyer. When the order has no line items, this field can be set directly. When the order has line items, this field will be populated by the system as the weighted average of all cost allocations of the line items.
. budgetObject, mandatory when a buyerCostAllocation is provided
The budget that this order is assigned to. Fields used within this object are customised to your account so not documented here.
. budgetValues*Object, Yordex generated**
The human readable names of the budget that this order is assigned to. Fields used within this object are customised to your account so not documented here.
. allocationObject, mandatory when a buyerCostAllocation is provided
The % of the order that is assigned to this budget.
. allocationAmountInCentsNumber, Yordex generated
The amount that is allocated to this cost allocation. It is the same as the orderAmountInCents times the allocation
. allocationVatAmountInCentsNumber, Yordex generated
The tax amount that is allocated to this cost allocation. It is the same as the orderVatAmountInCents of the order times the allocation
. budgetName
. fullBudgetName
String, Yordex generated
The name of the budget to be used for display and reporting purposes only
. glCodeString, Yordex generated
The glCode of the budget to be used for display and reporting purposes only
. budgetLineOwner
. budgetLineOwnerName
String, Yordex generated
The id and name of the employee who is the budgetOwner for this cost allocation
inBudgetBoolean, Yordex generated
Whether or not the expense is within the limits of the remaining budget.
servicesString, optional
The services used in this order.
. serviceNameString, mandatory for each service
Name of the service: MASSPAY (payouts), YORDEX_CARD or OWN_PAYMENTS
. tagsArray, optional
Array of key:value pairs. Both the key and the value can be set by the user. A maximum of 5 tags can be added for each service.

Required for payouts:
buyer_currency
seller_currency
nextApproverString, Yordex generated
This is the traderId of either the buyer or the seller, depending on which of these two needs to approve the order next
approvalsArray, Yordex generated
All approvals received for this order. An order is only approved by the buyer if all internalApprovals have been completed. For the seller, all approvals are recorded here
. approvedBoolean, mandatory
Indicating approval (true) or rejection (false) of this order
. dateString, Yordex generated
The date on which this order was approved using the ISO-8601 standard
. approverTraderIdString, Yordex generated
Id of the trader who approved the order
. approverString, Yordex generated
Role of the party that approved. This can be SELLER, BUYER or SYSTEM
internalApprovalsArray, Yordex generated
All internal approvals received for this order by the buyer. This object is only returned if the buyer gets the order
actionsObject, Yordex generated
This array lists all the actions that are possible on this order and its events
Order statusDescription
NOT_APPROVEDOrder is not yet approved and can still be edited
TRADER_APPROVEDBoth buyer and seller approved the order but Yordex is still reviewing it
APPROVEDOrder is approved and the events are in progress
COMPLETEDOrder is completed, all events and all payments have been completed
CLOSEDOrder was cancelled by the seller. The order can be re-opened using the “Open order” method

Events fields

FieldDescription
idString, Yordex generated
UUID that is unique for this event
eventNameString, mandatory
The name of the real-world event. When this event has a payment associated with it, this will be the event that triggers the payment, e.g. "Order approved", "Goods ready for shipping" or "Goods received"
paymentNameString, optional
The name of the payment for this event. For example, this could be "Deposit", "Partial payment" or "Full payment"
statusString, Yordex generated
The status of this event. Possible values are listed on the right
spendStatusString, Yordex generated
The status that combines the order status and event status in a unique status name. Values are listed on the right
buyerAccountingSyncedString, Yordex generated
Whether this event has been synced with the buyer's accounting system or not. This field can be toggled using a PATCH API
pctToBePaidString, optional
The percentage of the orderAmountInCents of the order that will be due for this event. For example, if 30% is due when the order is approved, the value for this field will be 30. The sum of pctToBePaid for all events has to be 100 but for an individual event this field can be 0 or not provided
paymentTypeString, optional
The type of payment for this event. Possible values are listed on the right. This field is mandatory if pctToBePaid is defined.
amountToBePaidInCentsString, Yordex generated
This is pctToBePaid times the orderAmountInCents of the order. The currency is the same as the orderCurrency for the order.
vatAmountToBePaidInCentsString, Yordex generated
This is tax (VAT) associated with this event. It is calculated as the vat times the amountToBePaidInCents of the event. The currency is the same as the orderCurrency for the order.
receivedAmountInCentsString, Yordex generated
The amount that has been paid in for this order. The currency is the same as the orderCurrency for the order.
invoiceDateString, Yordex generated
The data of the invoice. The user specifies this field when uploading the invoice as a document and we will copy that field into this event
invoiceReferenceString, Yordex generated
The reference of the invoice. The user specifies this field when uploading the invoice as a document and we will copy that field into this event
confirmationDueDateString, optional
Date by when we expect this event to be confirmed. This is used to alert responsible users when the event isn't confirmed on time and also to estimate the paymentDueDate. When the order is created the paymentDueDate is estimated to be the confirmationDueDate plus the credit terms.
paymentDueDateString, optional
Date by which the buyer has to pay. When this date passes, the status of the event will automatically update from PAYMENT_DUE to PAYMENT_OVERDUE. It is possible to specify this date yourself, but if one or both of creditTerms or creditTermsFrom are set, the paymentDueDate will be overwritten based on the confirmationDueDate or invoiceDate.
recognitionMonthsNumber, optional
The number of months over which the costs for this event has to be recognised for accounting purposes. This field is only provided for orders with buyerTag POType:RECURRING
paymentRecognitionDatesArray, Yordex generated
Date on which the costs for this event should be recognised for accounting purposes. This is based on the recognitionMonths field and the paymentDueDate.
creditTermsString, optional
Number of days that the buyer has to pay the invoice after the event is confirmed. For example, if the value for this field is 30 that means the buyer has 30 days to pay the invoice. The paymentDueDate will be set to be the confirmation date plus creditTerms when the event is confirmed. creditTerms has precedence, over the paymentDueDate so when both paymentDueDate and creditTerms have been set before the event is confirmed, the paymentDueDate will be overwritten when the event is confirmed.
creditTermsFromString, optional
The start date for the creditTerms. The only possible value is EOM (End of Month). The default is the invoiceDate, but if EOM is specified, the creditTerms will start counting from the last date of the month of the invoice date.
eventNumberString, optional for POST, mandatory for PUT
Events are sequential and the eventNumber indicates the position of this event in the list of events. The first event has eventNumber 1 etc. If no eventNumber is specified when creating an event, it will automatically be added as the last event. It is mandatory to provide an eventNumber when updating an event
documentsRequiredArray, optional
Documents that need to be uploaded before this event can be confirmed. An invoice would be a typical example of such a document, but other document types could include a bill of lading, an inspection report etc. It is up to the confirmers to verify these documents before confirming. The system will allow confirmation if the documents are not uploaded. The structure of a required document is described below.
earlyPaymentDiscountObject, optional
An early payment discount associated with this event.
. discountPctFloat, mandatory when an earlyPaymentDiscount is set
The percentage discount offered, e.g. 2%
. expiryDaysInteger, optional
The number of days after the invoice date after which the early payment discount expires. This field is not required for [dynamic discounting[(https://yordex.com/faqs/what-is-dynamic-discounting) when the early payment discount is added after the invoice is already provided.
. expiryDateDate, mandatory once the event is confirmed
The date on which the early payment discount will expire.
confirmersArray, optional
Possible values are BUYER, SELLER or PROVIDER of a service. Each party listed has to confirm this event before the payment becomes due. If there are no confirmers, the payment will automatically become due as soon as the previous event is completed or as soon as the order is approved in case this is the first event of the order
confirmedBoolean, Yordex generated
Indicates whether this event has been confirmed or not
confirmationsArray, Yordex generated
An array with all confirmations received for this event. The structure of a confirmation is described below
. confirmerTypeString, Yordex generated
Actor who confirmed the event. This can be BUYER, SELLER or PROVIDER of a service
. dateString, Yordex generated
The date on which this event was confirmed using the ISO-8601 standard
invoiceMandatoryBoolean, optional
Indicates whether an invoice is mandatory for this event. If so, if the event has been fully paid, the status will become WAITING_FOR_INVOICE. Only when the invoice is provided will the status of the event become COMPLETED. The default value is false.
generateInvoiceBoolean, optional
Indicates whether an invoice should be generated by Yordex for this event. The default is false
Event StatusDescription
NOT_STARTEDEvent was not yet started, either because the order was not yet approved or because the previous event was not yet completed
FOR_CONFIRMATIONEvent has started and the next step is for the confirmers of this event to confirm the associated real-world event has happened
PAYMENT_DUEReal-world event has been confirmed; the payment is now due
PAYMENT_OVERDUEReal-world event has been confirmed; the paymentDueDate has passed so the payment is now overdue
WAITING_FOR_INVOICEThe event has been confirmed and paid but the invoice has not yet been provided. An event will only go into this state if the field invoiceMandatory has been set to true
COMPLETEDEvent has been confirmed and paid
spendStatusorder.statusevent.status
NOT_SUBMITTEDNOT_APPROVED, next approver is this userAny, except COMPLETED
AWAITING_APPROVALNOT_APPROVED, next approver is another userAny, except COMPLETED
CONFIRMAPPROVEDFOR_CONFIRMATION
AWAITING_PAYMENTAPPROVEDPAYMENT DUE, PAYMENT_OVERDUE
COMPLETEDAPPROVED, NOT_APPROVED or COMPLETEDCOMPLETED
AWAITING_INVOICEAPPROVEDWAITING_FOR_INVOICE
DISPUTEDAPPROVEDDISPUTED
CANCELLEDCLOSED, last approval wasn’t a rejectionAny
REJECTEDCLOSED, last approval was a rejectionAny
Payment TypeDescription
PAYMENTPayments where the buyer pays the seller directly
PAYINPayments where the buyer pays a third party
PAYOUTPayments where a third party pays the seller

Line items fields

FieldDescription
idString, Yordex generated
UUID that is unique for this line item
orderIdString, Yordex generated
The id of the order this line item belongs to
lineItemNumberNumber, mandatory
Line items are in order. This is the rank order of the line item
typeString, mandatory
Usually "PRODUCT" indicating this is a product line item. It can also be "COST"
masterBoolean, Yordex generated
When created all line items are master line items. When partially receiving a line item, including for subscription, non-master line items are created.
nameString, mandatory
The description of the line item
listPriceInCentsNumber, mandatory
The unit cost of the line item before tax and discounts in cents
quantityNumber, mandatory
The quantity ordered
vatNumber, optional
The sales tax to be applied to this line item in %. Only one off vat, vatAmountInCents or buyerTaxType can be provided
vatAmountInCentsNumber, optional
The sales tax to be applied to this line item as an amount in cents. Only one off vat, vatAmountInCents or buyerTaxType can be provided
buyerTaxTypeString, optional
The sales tax to be applied to this line item as a tax type string which are defined separately for each trader. Only one off vat, vatAmountInCents or taxCode can be provided
discountNumber, optional
The discount to be applied to this line item in %.
lineItemAmountInCentsNumber, Yordex generated
The total amount for this line item in cents. This is equal to the listPriceInCents quantity (1-vat) * (1-discount)
buyerCostAllocationArray, optional
The same as the buyerCostAllocation of orders
buyerProductReferenceString, optional
A product number or other reference number for this line items as used by the buyer
sellerProductReferenceString, optional
A product number or other reference number for this line items as used by the seller