Purchase orders
Learn how to create and manage purchase orders in Monite.
Overview
A purchase order is a document created by an entity with precise information about products and/or services that the entity intends to purchase from a counterpart (vendor). It also contains the entity and counterpart data.
Each item in the purchase order must have:
- name
- quantity
- unit
- price (with currency)
- vat_rate
The list of items should be carefully filled to match the external catalog of products/services that the vendor offers.
It is possible to preview the purchase order and send it via email to the counterpart.
Purchase orders lifecycle
Purchase orders can move through different statuses during their lifecycle:
- Draft: This is the initial status for all new purchase orders. A
draft
purchase order is not sent yet and can be edited anytime. - Issued: Indicates that the purchase order has been sent to the counterpart. When a purchase order is issued its status is changed to
issued
.
Create a purchase order
To create a purchase order, call POST /payable_purchase_orders
:
The successful response contains the information about the recently created purchase order, including its ID:
Preview the purchase order
To preview a draft
purchase order before sending via email, call POST /payable_purchase_orders/{purchase_order_id}/preview
, passing the purchase order ID in the URL:
The successful response contains information about the preview:
Send the purchase order via email
To send a purchase order via email to a counterpart, call POST /payable_purchase_orders/{purchase_order_id}/send
and provide the email subject and body text. The purchase order will be attached as a PDF file to the email.
The successful response contains the ID of the sent email:
Notes:
- The purchase order will be sent to the email address of the counterpart’s default contact. If no default contact is set (or the contact list is empty), the purchase order will be sent to the email address present in the counterpart object.
- Once the purchase order is sent, its
status
field changes fromdraft
toissued
and theissued_at
field is set to the current date. - You can also opt to attach the purchase order’s PDF to the email sent to the counterpart. To do this, you must update the value of the
mail.attach_documents_as_pdf
field totrue
in your partner settings. For more information, see Update partner settings.
Resend the purchase order
To resend an already issued purchase order, you can call POST /payable_purchase_orders/{purchase_order_id}/send
again, optionally with different subject_text
and body_text
templates.
Resending a purchase order does not change its status
or issued_at
date.
List all purchase orders
To get information about all purchase orders associated with the specified entity, call GET /payable_purchase_orders
.
Retrieve a purchase order
To get information about a specific purchase order, call GET /payable_purchase_orders/{purchase_order_id}
.
Edit a purchase order
To edit an existing purchase order, call PATCH /payable_purchase_orders/{purchase_order_id}
. Only purchase orders in the draft
status can be edited.
Delete a purchase order
To delete a specific purchase order, call DELETE /payable_purchase_orders/{purchase_order_id}
. Only purchase orders in the draft
status can be deleted.