Precoro MCP by usefulapi

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

사용해야 할까요

품질 및 안전성

A
설명 품질
100%
스키마 완전성
95%
이름 품질
78%
오염 위험
100%
권한 일치
100%
프로토콜 준수
100%

발견 사항 (3)

  • LOWTool 'precoro_list_purchase_requisitions' name length outside 3-30 rangeprecoro_list_purchase_requisitions에서
  • LOWTool 'precoro_get_purchase_requisition' name length outside 3-30 rangeprecoro_get_purchase_requisition에서
  • LOWTool 'precoro_create_purchase_requisition' name length outside 3-30 rangeprecoro_create_purchase_requisition에서

도구 정의와 프로토콜 준수에 대한 자동 분석을 기반으로 합니다.

컨텍스트 비용

~6,932토큰 (도구 정의)
~2.2 KB일반적인 응답 크기
상당한 주의 영향 (128k 컨텍스트의 5.42%)

이는 서버의 도구가 모델의 컨텍스트에 로드될 때마다 소비되는 대략적인 토큰 수입니다. 수치가 높을수록 다른 작업에 사용할 수 있는 주의가 줄어듭니다.

설치

원클릭 설치

`claude_desktop_config.json` 파일에 다음을 추가하세요:

{
  "mcpServers": {
    "precoro": {
      "url": "https://precoro.usefulapi.io/mcp"
    }
  }
}

원격 엔드포인트

https://precoro.usefulapi.io/mcpstreamable-http

할 수 있는 일

도구 목록

도구 (24)

🟢 읽기 전용🟡 쓰기🔴 삭제⚪ 알 수 없음
🟢precoro_list_purchase_orders(modified_since, approved_from, approved_to, status, waiting_for_my_approval, ...)

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.

입력 스키마

{
  "type": "object",
  "properties": {
    "modified_since": {
      "description": "Only records created or changed since this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.",
      "type": "string"
    },
    "approved_from": {
      "description": "Only documents whose final approval is on or after this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.",
      "type": "string"
    },
    "approved_to": {
      "description": "Only documents whose final approval is on or before this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.",
      "type": "string"
    },
    "status": {
      "description": "Status 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 awaiting confirmation, 7 on revise, 8 canceled, 9 pending receipt (invoices), 10 approval review, 11 closed.",
      "maxItems": 12,
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 0,
        "maximum": 11
      }
    },
    "waiting_for_my_approval": {
      "description": "true = only documents waiting for approval by the user the API key belongs to (waitingForapprove=yes).",
      "type": "boolean"
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "per_page": {
      "description": "Results per page: 10, 20, 50, 100 or 200 (default 20).",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "type": {
      "description": "PO types: 0 standard, 1 blanket, 2 from requisitions, 3 recurring, 4 blanket per total, 5 service, 6 recurring service, 7 service from requisitions.",
      "maxItems": 8,
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 0,
        "maximum": 7
      }
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢precoro_get_purchase_order(idn)

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

입력 스키마

{
  "type": "object",
  "properties": {
    "idn": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "The document IDN: the company's own document number as shown in Precoro (not the internal id)."
    }
  },
  "required": [
    "idn"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢precoro_list_purchase_requisitions(modified_since, approved_from, approved_to, status, waiting_for_my_approval, ...)

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.

입력 스키마

{
  "type": "object",
  "properties": {
    "modified_since": {
      "description": "Only records created or changed since this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.",
      "type": "string"
    },
    "approved_from": {
      "description": "Only documents whose final approval is on or after this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.",
      "type": "string"
    },
    "approved_to": {
      "description": "Only documents whose final approval is on or before this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.",
      "type": "string"
    },
    "status": {
      "description": "Status 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 awaiting confirmation, 7 on revise, 8 canceled, 9 pending receipt (invoices), 10 approval review, 11 closed.",
      "maxItems": 12,
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 0,
        "maximum": 11
      }
    },
    "waiting_for_my_approval": {
      "description": "true = only documents waiting for approval by the user the API key belongs to (waitingForapprove=yes).",
      "type": "boolean"
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "per_page": {
      "description": "Results per page: 10, 20, 50, 100 or 200 (default 20).",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢precoro_get_purchase_requisition(idn)

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

입력 스키마

{
  "type": "object",
  "properties": {
    "idn": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "The document IDN: the company's own document number as shown in Precoro (not the internal id)."
    }
  },
  "required": [
    "idn"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢precoro_list_invoices(modified_since, approved_from, approved_to, status, waiting_for_my_approval, ...)

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.

입력 스키마

{
  "type": "object",
  "properties": {
    "modified_since": {
      "description": "Only records created or changed since this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.",
      "type": "string"
    },
    "approved_from": {
      "description": "Only documents whose final approval is on or after this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.",
      "type": "string"
    },
    "approved_to": {
      "description": "Only documents whose final approval is on or before this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.",
      "type": "string"
    },
    "status": {
      "description": "Status 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 awaiting confirmation, 7 on revise, 8 canceled, 9 pending receipt (invoices), 10 approval review, 11 closed.",
      "maxItems": 12,
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 0,
        "maximum": 11
      }
    },
    "waiting_for_my_approval": {
      "description": "true = only documents waiting for approval by the user the API key belongs to (waitingForapprove=yes).",
      "type": "boolean"
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "per_page": {
      "description": "Results per page: 10, 20, 50, 100 or 200 (default 20).",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "kind": {
      "description": "Invoice kinds: 0 standard, 1 credit note, 2 from order, 3 recurring, 4 from service order.",
      "maxItems": 5,
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 0,
        "maximum": 4
      }
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢precoro_get_invoice(idn)

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

입력 스키마

{
  "type": "object",
  "properties": {
    "idn": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "The document IDN: the company's own document number as shown in Precoro (not the internal id)."
    }
  },
  "required": [
    "idn"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢precoro_list_expenses(modified_since, approved_from, approved_to, status, waiting_for_my_approval, ...)

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.

입력 스키마

{
  "type": "object",
  "properties": {
    "modified_since": {
      "description": "Only records created or changed since this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.",
      "type": "string"
    },
    "approved_from": {
      "description": "Only documents whose final approval is on or after this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.",
      "type": "string"
    },
    "approved_to": {
      "description": "Only documents whose final approval is on or before this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.",
      "type": "string"
    },
    "status": {
      "description": "Status 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 awaiting confirmation, 7 on revise, 8 canceled, 9 pending receipt (invoices), 10 approval review, 11 closed.",
      "maxItems": 12,
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 0,
        "maximum": 11
      }
    },
    "waiting_for_my_approval": {
      "description": "true = only documents waiting for approval by the user the API key belongs to (waitingForapprove=yes).",
      "type": "boolean"
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "per_page": {
      "description": "Results per page: 10, 20, 50, 100 or 200 (default 20).",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢precoro_get_expense(idn)

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

입력 스키마

{
  "type": "object",
  "properties": {
    "idn": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "The document IDN: the company's own document number as shown in Precoro (not the internal id)."
    }
  },
  "required": [
    "idn"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢precoro_list_receipts(modified_since, approved_from, approved_to, status, waiting_for_my_approval, ...)

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.

입력 스키마

{
  "type": "object",
  "properties": {
    "modified_since": {
      "description": "Only records created or changed since this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.",
      "type": "string"
    },
    "approved_from": {
      "description": "Only documents whose final approval is on or after this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.",
      "type": "string"
    },
    "approved_to": {
      "description": "Only documents whose final approval is on or before this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.",
      "type": "string"
    },
    "status": {
      "description": "Status 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 awaiting confirmation, 7 on revise, 8 canceled, 9 pending receipt (invoices), 10 approval review, 11 closed.",
      "maxItems": 12,
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 0,
        "maximum": 11
      }
    },
    "waiting_for_my_approval": {
      "description": "true = only documents waiting for approval by the user the API key belongs to (waitingForapprove=yes).",
      "type": "boolean"
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "per_page": {
      "description": "Results per page: 10, 20, 50, 100 or 200 (default 20).",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢precoro_get_receipt(idn)

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

입력 스키마

{
  "type": "object",
  "properties": {
    "idn": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "The document IDN: the company's own document number as shown in Precoro (not the internal id)."
    }
  },
  "required": [
    "idn"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢precoro_list_payments(page, per_page)

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.

입력 스키마

{
  "type": "object",
  "properties": {
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "per_page": {
      "description": "Results per page: 10, 20, 50, 100 or 200 (default 20).",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢precoro_list_budgets(page, per_page)

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.

입력 스키마

{
  "type": "object",
  "properties": {
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "per_page": {
      "description": "Results per page: 10, 20, 50, 100 or 200 (default 20).",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢precoro_list_contracts(page, per_page)

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

입력 스키마

{
  "type": "object",
  "properties": {
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "per_page": {
      "description": "Results per page: 10, 20, 50, 100 or 200 (default 20).",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢precoro_list_ap_inbox(page, per_page)

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.

입력 스키마

{
  "type": "object",
  "properties": {
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "per_page": {
      "description": "Results per page: 10, 20, 50, 100 or 200 (default 20).",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢precoro_list_suppliers(modified_since, page, per_page)

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.

입력 스키마

{
  "type": "object",
  "properties": {
    "modified_since": {
      "description": "Only records created or changed since this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.",
      "type": "string"
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "per_page": {
      "description": "Results per page: 10, 20, 50, 100 or 200 (default 20).",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢precoro_get_supplier(id)

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

입력 스키마

{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "description": "The supplier id (the numeric id, not the unique code)."
    }
  },
  "required": [
    "id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢precoro_list_items(modified_since, page, per_page)

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

입력 스키마

{
  "type": "object",
  "properties": {
    "modified_since": {
      "description": "Only records created or changed since this UTC time: yyyy-mm-dd or yyyy-mm-ddThh:mm:ss.",
      "type": "string"
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "per_page": {
      "description": "Results per page: 10, 20, 50, 100 or 200 (default 20).",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢precoro_get_item(id)

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

입력 스키마

{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "description": "The item id."
    }
  },
  "required": [
    "id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢precoro_list_reference_data(table, page, per_page)

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.

입력 스키마

{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "enum": [
        "users",
        "locations",
        "legal_entities",
        "taxes",
        "payment_terms",
        "units",
        "warehouses",
        "product_groups",
        "document_custom_fields",
        "item_custom_fields",
        "supplier_custom_fields"
      ],
      "description": "Which table to list."
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "per_page": {
      "description": "Results per page: 10, 20, 50, 100 or 200 (default 20).",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "table"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🔴precoro_approve_document(document, idn)

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.

입력 스키마

{
  "type": "object",
  "properties": {
    "document": {
      "type": "string",
      "enum": [
        "warehouserequests",
        "purchaserequisitions",
        "purchaseorders",
        "receipts",
        "invoices",
        "expenses"
      ],
      "description": "Document type: warehouserequests, purchaserequisitions, purchaseorders, receipts, invoices or expenses."
    },
    "idn": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "The document IDN: the company's own document number as shown in Precoro (not the internal id)."
    }
  },
  "required": [
    "document",
    "idn"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🔴precoro_reject_document(document, idn, comment)

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.

입력 스키마

{
  "type": "object",
  "properties": {
    "document": {
      "type": "string",
      "enum": [
        "warehouserequests",
        "purchaserequisitions",
        "purchaseorders",
        "receipts",
        "invoices",
        "expenses"
      ],
      "description": "Document type: warehouserequests, purchaserequisitions, purchaseorders, receipts, invoices or expenses."
    },
    "idn": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "The document IDN: the company's own document number as shown in Precoro (not the internal id)."
    },
    "comment": {
      "type": "string",
      "minLength": 1,
      "maxLength": 800,
      "description": "Why it is rejected (required, up to 800 characters)."
    }
  },
  "required": [
    "document",
    "idn",
    "comment"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🔴precoro_submit_document(document, idn)

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.

입력 스키마

{
  "type": "object",
  "properties": {
    "document": {
      "type": "string",
      "enum": [
        "warehouserequests",
        "purchaserequisitions",
        "purchaseorders",
        "receipts",
        "invoices",
        "expenses"
      ],
      "description": "Document type: warehouserequests, purchaserequisitions, purchaseorders, receipts, invoices or expenses."
    },
    "idn": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "The document IDN: the company's own document number as shown in Precoro (not the internal id)."
    }
  },
  "required": [
    "document",
    "idn"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🔴precoro_create_purchase_requisition(required_date, currency, location_id, legal_entity_id, budget_id, ...)

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.

입력 스키마

{
  "type": "object",
  "properties": {
    "required_date": {
      "type": "string",
      "description": "Delivery date, yyyy-mm-dd."
    },
    "currency": {
      "type": "string",
      "pattern": "^[A-Za-z]{3}$"
    },
    "location_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "description": "Location id (must be accessible to the key user)."
    },
    "legal_entity_id": {
      "description": "Required when the company uses legal entities.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "budget_id": {
      "description": "Budget line id.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "note": {
      "description": "Plain-text note (stored as HTML).",
      "type": "string",
      "maxLength": 4000
    },
    "custom_fields": {
      "description": "Document custom field values (department, project, GL account...). Every required one must be given.",
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "description": "The document custom field id."
          },
          "value": {
            "type": "string",
            "maxLength": 500,
            "description": "Dropdown: the option id as text. Text: the text. Date: an ISO 8601 date."
          },
          "type": {
            "anyOf": [
              {
                "type": "number",
                "const": 1
              },
              {
                "type": "number",
                "const": 2
              },
              {
                "type": "number",
                "const": 3
              }
            ],
            "description": "1 dropdown, 2 text, 3 date."
          }
        },
        "required": [
          "id",
          "value",
          "type"
        ]
      }
    },
    "items": {
      "minItems": 1,
      "maxItems": 500,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "item_id": {
            "description": "A catalog item id; its name, SKU and type then come from the catalog.",
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "name": {
            "description": "Item name (required without item_id).",
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "quantity": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 1000000000
          },
          "price": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000000000,
            "description": "Unit price in the document currency."
          },
          "type": {
            "description": "0 non-inventory (default), 1 inventory, 2 service, 3 shipping, 4 tax.",
            "type": "integer",
            "minimum": 0,
            "maximum": 4
          },
          "supplier_id": {
            "description": "Supplier id for this line.",
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "quantity",
          "price"
        ]
      }
    }
  },
  "required": [
    "required_date",
    "currency",
    "location_id",
    "items"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🔴precoro_create_supplier(name, currencies, unique_code, legal_address, city, ...)

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.

입력 스키마

{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "currencies": {
      "description": "Currencies the supplier is paid in, e.g. [\"USD\"].",
      "minItems": 1,
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[A-Za-z]{3}$"
      }
    },
    "unique_code": {
      "description": "Your own supplier code (unique).",
      "type": "string",
      "maxLength": 100
    },
    "legal_address": {
      "type": "string",
      "maxLength": 500
    },
    "city": {
      "type": "string",
      "maxLength": 200
    },
    "state": {
      "type": "string",
      "maxLength": 200
    },
    "country": {
      "description": "Country code or name as Precoro shows it, e.g. US.",
      "type": "string",
      "maxLength": 100
    },
    "postal_code": {
      "type": "string",
      "maxLength": 50
    },
    "phone": {
      "type": "string",
      "maxLength": 50
    },
    "note": {
      "type": "string",
      "maxLength": 2000
    },
    "conditions": {
      "description": "Payment or delivery conditions text.",
      "type": "string",
      "maxLength": 2000
    },
    "delivery_period_days": {
      "type": "integer",
      "minimum": 0,
      "maximum": 3650
    },
    "minimum_order_sum": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000000000000
    },
    "contacts": {
      "description": "Supplier contacts. Precoro can email purchase orders to them.",
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "maxLength": 254,
            "pattern": "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"
          },
          "first_name": {
            "type": "string",
            "maxLength": 200
          },
          "phone": {
            "type": "string",
            "maxLength": 50
          }
        },
        "required": [
          "email"
        ]
      }
    }
  },
  "required": [
    "name"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}

커뮤니티

이 서버 평가하기

증거

최근 관측

검증됨버전이 기록되지 않음도구 24개