| name | repairshopr-purchase-order |
| description | Manage purchase orders to vendors in RepairShopr |
| license | MIT |
| compatibility | opencode |
| metadata | {"audience":"parts managers, purchasers, administrators","api":"GET /purchase_orders, POST /purchase_orders, GET /purchase_orders/{id}, POST /purchase_orders/{id}/receive, POST /purchase_orders/{id}/create_po_line_item"} |
What I do
I manage purchase orders (POs) to vendors. Purchase orders track orders of products/parts from suppliers. I can list POs, create new ones, view details, receive items (mark as arrived), and add line items to an existing PO.
When to use me
Use this when:
- Ordering parts from vendors
- Tracking the status of pending orders
- Receiving shipments and updating inventory
- Adding line items to an existing PO
- Managing PO details like due dates, shipping, and costs
How to use
Required API base URL:
VITE_REPAIRSHOPR_SUBDOMAIN
VITE_REPAIRSHOPR_API_KEY
Permissions:
- "Purchase Orders - List/Search" for listing and viewing
- "Purchase Orders - Edit" for creating, receiving, adding line items
List Purchase Orders (GET /purchase_orders)
Optional:
page (integer) - Page number (20 results per page)
Create Purchase Order (POST /purchase_orders)
Required:
vendor_id (integer) - Vendor to order from
Optional:
order_date (string) - Date of PO (ISO 8601)
expected_date (string) - Expected delivery date
due_date (string) - PO due date
paid_date (string) - Payment date if prepaid
shipping_cents (integer) - Shipping cost in cents
other_cents (integer) - Other costs
shipping_notes (string) - Shipping instructions
discount_percent (integer) - Discount percentage
general_notes (string) - General notes
user_id (integer) - Assigned user
location_id (integer) - Delivery location
delivery_tracking (string) - Tracking URL or number
status (string) - PO status
line_items - Usually added separately via endpoint below
Get Purchase Order (GET /purchase_orders/{id})
Add Line Item (POST /purchase_orders/{id}/create_po_line_item)
id (integer) - PO ID
Body:
product_id (integer) - Product to order (must have "Maintain Stock" enabled)
quantity (integer) - Quantity
Receive Purchase Order (POST /purchase_orders/{id}/receive)
id (integer) - PO ID
Body: optionally line_item_id (integer) - specific line item to receive; if omitted, receive all pending items
Example call:
const po = await skill({ name: "repairshopr-purchase-order" }, {
vendor_id: 10,
order_date: "2024-01-10",
expected_date: "2024-01-20",
shipping_cents: 1500,
general_notes: "Please ship via UPS ground"
})
await skill({ name: "repairshopr-purchase-order" }, {
product_id: 500,
quantity: 5
}, { id: po.purchase_order.id, method: 'POST', endpoint: '/create_po_line_item' })
await skill({ name: "repairshopr-purchase-order" }, {},
{ id: po.purchase_order.id, method: 'POST', endpoint: '/receive' }
)
Response includes:
- PO object with
id, number, vendor, status, total, line_items, dates, etc.
- Line item creation returns
po_line_item object
- Receive returns updated PO
Important
- Product to be ordered must be marked
maintain_stock: true or you get error
- Receiving updates inventory quantities for the product's location(s)
- PO status flows (e.g., pending, partially received, received, paid)
- Vendor must exist first
- Monetary amounts typically in cents in the API but response may show as floats
Related skills
repairshopr-vendor - To manage vendors
repairshopr-product - To ensure products are stock-enabled
repairshopr-item - Parts orders created from tickets