Precoro MCP by usefulapi

v1.22.1
io.usefulapi/precoro Checked 2 days ago Published 1 day ago

Read Precoro purchase orders, invoices, suppliers and budgets; approve, reject and submit documents.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

precoro_list_purchase_orders List purchase orders

List purchase orders (POs) with number (idn), supplier, location, totals, currency, required date, approval status, receiving status (0 not received, 1 partly, 2 received) and payment status (0 needs invoice, 1 not paid, 2 partly paid, 3 paid). Line items come only from precoro_get_purchase_order. Filter by status, last-modified time, approval date range, or 'waiting for my approval'. Page with next_page. GET /purchaseorders.

ParameterTypeDescription
approved_fromstringOnly documents whose final approval is on or after this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.
approved_tostringOnly documents whose final approval is on or before this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.
modified_sincestringOnly records created or changed since this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.
pageintegerPage number, from 1 (default 1). Pass the previous reply's next_page.
per_pageintegerResults per page: 10, 20, 50, 100 or 200 (default 20).
statusarrayStatus codes to include. 0 open (draft), 1 pending approval, 2 approved, 3 denied, 4 partly paid (invoices/expenses) or stopped (blanket PO), 5 purchased (PO/PR) or paid (invoices/expenses), 6 awaitin…
typearrayPO types: 0 standard, 1 blanket, 2 from requisitions, 3 recurring, 4 blanket per total, 5 service, 6 recurring service, 7 service from requisitions.
waiting_for_my_approvalbooleantrue = only documents waiting for approval by the user the API key belongs to (waitingForapprove=yes).

precoro_get_purchase_order Get a purchase order

One purchase order by IDN with all items, taxes, custom fields, approval steps, receiving and payment status. GET /purchaseorders/{idn}.

ParameterTypeDescription
idn *stringThe document IDN: the company's own document number as shown in Precoro (not the internal id).

precoro_list_purchase_requisitions List purchase requisitions

List purchase requisitions (purchase requests): requester, location, totals, required date, approval status. Line items come only from precoro_get_purchase_requisition. Filter by status, last-modified time, approval date range, or 'waiting for my approval'. GET /purchaserequisitions.

ParameterTypeDescription
approved_fromstringOnly documents whose final approval is on or after this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.
approved_tostringOnly documents whose final approval is on or before this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.
modified_sincestringOnly records created or changed since this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.
pageintegerPage number, from 1 (default 1). Pass the previous reply's next_page.
per_pageintegerResults per page: 10, 20, 50, 100 or 200 (default 20).
statusarrayStatus codes to include. 0 open (draft), 1 pending approval, 2 approved, 3 denied, 4 partly paid (invoices/expenses) or stopped (blanket PO), 5 purchased (PO/PR) or paid (invoices/expenses), 6 awaitin…
waiting_for_my_approvalbooleantrue = only documents waiting for approval by the user the API key belongs to (waitingForapprove=yes).

precoro_get_purchase_requisition Get a purchase requisition

One purchase requisition by IDN with items, custom fields and approval steps. GET /purchaserequisitions/{idn}.

ParameterTypeDescription
idn *stringThe document IDN: the company's own document number as shown in Precoro (not the internal id).

precoro_list_invoices List invoices and credit notes

List supplier invoices and credit notes: supplier, totals, currency, issue and due dates, paid sum, approval/payment status. Filter by status, kind, last-modified time, approval date range, or 'waiting for my approval'. GET /invoices.

ParameterTypeDescription
approved_fromstringOnly documents whose final approval is on or after this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.
approved_tostringOnly documents whose final approval is on or before this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.
kindarrayInvoice kinds: 0 standard, 1 credit note, 2 from order, 3 recurring, 4 from service order.
modified_sincestringOnly records created or changed since this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.
pageintegerPage number, from 1 (default 1). Pass the previous reply's next_page.
per_pageintegerResults per page: 10, 20, 50, 100 or 200 (default 20).
statusarrayStatus codes to include. 0 open (draft), 1 pending approval, 2 approved, 3 denied, 4 partly paid (invoices/expenses) or stopped (blanket PO), 5 purchased (PO/PR) or paid (invoices/expenses), 6 awaitin…
waiting_for_my_approvalbooleantrue = only documents waiting for approval by the user the API key belongs to (waitingForapprove=yes).

precoro_get_invoice Get an invoice

One supplier invoice or credit note by IDN with items, taxes, matching to purchase orders and receipts, and payments. GET /invoices/{idn}.

ParameterTypeDescription
idn *stringThe document IDN: the company's own document number as shown in Precoro (not the internal id).

precoro_list_expenses List expenses

List expense documents (purchases without a purchase order): supplier, totals, currency, status and payment status. Filter by status, last-modified time, approval date range, or 'waiting for my approval'. GET /expenses.

ParameterTypeDescription
approved_fromstringOnly documents whose final approval is on or after this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.
approved_tostringOnly documents whose final approval is on or before this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.
modified_sincestringOnly records created or changed since this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.
pageintegerPage number, from 1 (default 1). Pass the previous reply's next_page.
per_pageintegerResults per page: 10, 20, 50, 100 or 200 (default 20).
statusarrayStatus codes to include. 0 open (draft), 1 pending approval, 2 approved, 3 denied, 4 partly paid (invoices/expenses) or stopped (blanket PO), 5 purchased (PO/PR) or paid (invoices/expenses), 6 awaitin…
waiting_for_my_approvalbooleantrue = only documents waiting for approval by the user the API key belongs to (waitingForapprove=yes).

precoro_get_expense Get an expense

One expense document by IDN with items, custom fields and approval steps. GET /expenses/{idn}.

ParameterTypeDescription
idn *stringThe document IDN: the company's own document number as shown in Precoro (not the internal id).

precoro_list_receipts List receipts

List goods receipts (what was delivered against purchase orders): purchase order, status and dates. Line items and received quantities come only from precoro_get_receipt. Filter by status, last-modified time, approval date range, or 'waiting for my approval'. GET /receipts.

ParameterTypeDescription
approved_fromstringOnly documents whose final approval is on or after this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.
approved_tostringOnly documents whose final approval is on or before this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.
modified_sincestringOnly records created or changed since this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.
pageintegerPage number, from 1 (default 1). Pass the previous reply's next_page.
per_pageintegerResults per page: 10, 20, 50, 100 or 200 (default 20).
statusarrayStatus codes to include. 0 open (draft), 1 pending approval, 2 approved, 3 denied, 4 partly paid (invoices/expenses) or stopped (blanket PO), 5 purchased (PO/PR) or paid (invoices/expenses), 6 awaitin…
waiting_for_my_approvalbooleantrue = only documents waiting for approval by the user the API key belongs to (waitingForapprove=yes).

precoro_get_receipt Get a receipt

One goods receipt by IDN with items and approval steps. GET /receipts/{idn}.

ParameterTypeDescription
idn *stringThe document IDN: the company's own document number as shown in Precoro (not the internal id).

precoro_list_payments List payments

List payments recorded against invoices and expenses: pay date, sum paid, status (0 paid, 8 canceled), kind (0 payment, 1 credit, 2 supplier credit balance, 3-6 prepayments/credits) and the invoice or expense paid. GET /payments.

ParameterTypeDescription
pageintegerPage number, from 1 (default 1). Pass the previous reply's next_page.
per_pageintegerResults per page: 10, 20, 50, 100 or 200 (default 20).

precoro_list_budgets List budgets

List budgets with name, period, total sum, how much is used in purchase requisitions, purchase orders, invoices and expenses, and whether the limit is enforced. GET /budgets.

ParameterTypeDescription
pageintegerPage number, from 1 (default 1). Pass the previous reply's next_page.
per_pageintegerResults per page: 10, 20, 50, 100 or 200 (default 20).

precoro_list_contracts List supplier contracts

List supplier contracts with number, supplier, begin and end dates and whether they auto-prolong. GET /contracts.

ParameterTypeDescription
pageintegerPage number, from 1 (default 1). Pass the previous reply's next_page.
per_pageintegerResults per page: 10, 20, 50, 100 or 200 (default 20).

precoro_list_ap_inbox List AP inbox documents

List documents in the accounts-payable inbox (uploaded or emailed supplier invoices read by OCR): file name, supplier, gross total, currency, status, upload and processed dates. GET /ap/documents.

ParameterTypeDescription
pageintegerPage number, from 1 (default 1). Pass the previous reply's next_page.
per_pageintegerResults per page: 10, 20, 50, 100 or 200 (default 20).

precoro_list_suppliers List suppliers

List suppliers: name, unique code, currencies, payment conditions, minimum order sum, contact and address fields, accounting ids, status. Bank details are never returned. Filter by last-modified time. GET /suppliers.

ParameterTypeDescription
modified_sincestringOnly records created or changed since this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.
pageintegerPage number, from 1 (default 1). Pass the previous reply's next_page.
per_pageintegerResults per page: 10, 20, 50, 100 or 200 (default 20).

precoro_get_supplier Get a supplier

One supplier by id with contacts, conditions, custom field defaults and credit balance. Bank details are never returned. GET /suppliers/{id}.

ParameterTypeDescription
id *integerThe supplier id (the numeric id, not the unique code).

precoro_list_items List catalog items

List catalog items (products and services): name, SKU, unit, price, currency, supplier, group and custom fields. Filter by last-modified time. GET /items.

ParameterTypeDescription
modified_sincestringOnly records created or changed since this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.
pageintegerPage number, from 1 (default 1). Pass the previous reply's next_page.
per_pageintegerResults per page: 10, 20, 50, 100 or 200 (default 20).

precoro_get_item Get a catalog item

One catalog item by id. GET /items/{id}.

ParameterTypeDescription
id *integerThe item id.

precoro_list_reference_data List reference data

List a configuration table: users (name, email, roles), locations, legal_entities, taxes, payment_terms, units, warehouses, product_groups, document_custom_fields (departments, projects, classes, GL accounts), item_custom_fields or supplier_custom_fields. Use it to find the ids that purchase requisitions and suppliers need (location, legal entity, custom field). Bank details are never returned. GET /users, /locations, /legalentities, /taxes, /paymentterms, /units, /warehouses, /groups, /documentcustomfields, /itemcustomfields, /suppliercustomfields.

ParameterTypeDescription
table *stringWhich table to list.
pageintegerPage number, from 1 (default 1). Pass the previous reply's next_page.
per_pageintegerResults per page: 10, 20, 50, 100 or 200 (default 20).

precoro_approve_document Approve a document

WRITE: approve a document as the Precoro user the API key belongs to (that user must be a current approver of it). Approving can release spending: an approved purchase order may be sent to the supplier and an approved invoice can go to payment. Find candidates with the list tools and waiting_for_my_approval. Cannot be undone through this server. POST /{document}/{idn}/approve.

ParameterTypeDescription
document *stringDocument type: warehouserequests, purchaserequisitions, purchaseorders, receipts, invoices or expenses.
idn *stringThe document IDN: the company's own document number as shown in Precoro (not the internal id).

precoro_reject_document Reject a document

WRITE: reject (deny) a document that is waiting for the key user's approval. A comment is required; the creator is notified and sees it. POST /{document}/{idn}/reject.

ParameterTypeDescription
comment *stringWhy it is rejected (required, up to 800 characters).
document *stringDocument type: warehouserequests, purchaserequisitions, purchaseorders, receipts, invoices or expenses.
idn *stringThe document IDN: the company's own document number as shown in Precoro (not the internal id).

precoro_submit_document Submit a draft for approval

WRITE: confirm a draft (open) document so it enters the approval flow (or is approved at once if no approval is needed). Approvers are notified. POST /{document}/{idn}/confirm.

ParameterTypeDescription
document *stringDocument type: warehouserequests, purchaserequisitions, purchaseorders, receipts, invoices or expenses.
idn *stringThe document IDN: the company's own document number as shown in Precoro (not the internal id).

precoro_create_purchase_requisition Create a purchase requisition (draft)

WRITE: create a purchase requisition in draft (open) status for the key user; it is not submitted for approval until precoro_submit_document is called. Needs a location id, a currency, a delivery date and at least one item (a catalog item_id, or a name with quantity and price). Find ids with precoro_list_reference_data (locations, legal_entities, document_custom_fields) and precoro_list_items. All required document custom fields (for example department or project) must be passed in custom_fields. Returns the new idn and id. POST /purchaserequisitions.

ParameterTypeDescription
currency *string
items *array
location_id *integerLocation id (must be accessible to the key user).
required_date *stringDelivery date, yyyy-mm-dd.
budget_idintegerBudget line id.
custom_fieldsarrayDocument custom field values (department, project, GL account...). Every required one must be given.
legal_entity_idintegerRequired when the company uses legal entities.
notestringPlain-text note (stored as HTML).

precoro_create_supplier Create a supplier

WRITE: create a supplier. The name must be unique in the company (a duplicate name, unique code or registration number is rejected). The supplier is available to all legal entities. Depending on the company's settings it may need approval before it can be used on orders. Returns the new supplier. POST /suppliers.

ParameterTypeDescription
name *string
citystring
conditionsstringPayment or delivery conditions text.
contactsarraySupplier contacts. Precoro can email purchase orders to them.
countrystringCountry code or name as Precoro shows it, e.g. US.
currenciesarrayCurrencies the supplier is paid in, e.g. ["USD"].
delivery_period_daysinteger
legal_addressstring
minimum_order_sumnumber
notestring
phonestring
postal_codestring
statestring
unique_codestringYour own supplier code (unique).