To make an API call to Purchase Order Plus, you must provide:
an Authorization
header field, with API Token
The following example:
https://po.mimoran.com/api/v1/graphql.php Authorization: Bearer abcdefghijklmnopqrstuvwxyz123456
query { purchaseOrders( since: 1 //int limit: 1 //int created_at: "string" //filter POs created in this day (format Y-m-d H:i:s) - eg: 2023-02-10 20:20:20 from_created_at: "string" //filter POs create after this day (format Y-m-d H:i:s) - eg: 2023-02-10 20:20:20 to_created_at: "string" //filter POs create before this day (format Y-m-d H:i:s) - eg: 2023-03-10 20:20:20 updated_at: "string" //filter POs updated in this day (format Y-m-d H:i:s) - eg: 2023-02-10 20:20:20 from_updated_at: "string" //filter POs update after this day (format Y-m-d H:i:s) - eg: 2023-02-10 20:20:20 to_updated_at: "string" //filter POs update before this day (format Y-m-d H:i:s) - eg: 2023-03-10 20:20:20 ) { purchase_order_id purchase_code po_date expected_date currency supplier_id supplier_name ship_to_name ship_to_address discount_label discount_amount tax_label tax_amount shipping_label shipping_amount status created_at updated_at items { purchase_order_product_id product_id variant_id inventory_item_id product_name product_sku product_supplier_sku variant_name product_image variant_image qty_ordered qty_received cost sales_price } } }
query { purchaseOrder(id: 1) { purchase_order_id purchase_code po_date expected_date currency supplier_id supplier_name ship_to_name ship_to_address discount_label discount_amount tax_label tax_amount shipping_label shipping_amount status created_at updated_at items { purchase_order_product_id product_id variant_id inventory_item_id product_name product_sku product_supplier_sku variant_name product_image variant_image qty_ordered qty_received cost sales_price } } }
mutation { createPurchaseOrder( purchase_code: "string" po_date: "string" //Eg: "2023-10-25" expected_date: "string" //Eg: "2023-10-25" currency: "string" //Eg: "USD" ship_to_name: "string" ship_to_address: "string" discount_label: "string" discount_amount: "float" tax_label: "string" tax_amount: "float" shipping_label: "string" shipping_amount: "float" items: [ { variant_id: "string" product_supplier_sku: "string" qty_ordered: "float" cost: "float" } ] ) { purchase_order_id purchase_code po_date expected_date currency supplier_id supplier_name ship_to_name ship_to_address discount_label discount_amount tax_label tax_amount shipping_label shipping_amount status created_at updated_at items { purchase_order_product_id product_id variant_id inventory_item_id product_name product_sku product_supplier_sku variant_name product_image variant_image qty_ordered qty_received cost sales_price } } }
query { suppliers( supplier_name: "string" created_at: "string" //filter POs created in this day (format Y-m-d H:i:s) - eg: 2023-02-10 20:20:20 from_created_at: "string" //filter POs create after this day (format Y-m-d H:i:s) - eg: 2023-02-10 20:20:20 to_created_at: "string" //filter POs create before this day (format Y-m-d H:i:s) - eg: 2023-03-10 20:20:20 updated_at: "string" //filter POs updated in this day (format Y-m-d H:i:s) - eg: 2023-02-10 20:20:20 from_updated_at: "string" //filter POs update after this day (format Y-m-d H:i:s) - eg: 2023-02-10 20:20:20 to_updated_at: "string" //filter POs update before this day (format Y-m-d H:i:s) - eg: 2023-03-10 20:20:20 ) { supplier_id supplier_name contact_name contact_email telephone fax street city country region postcode website status created_at updated_at } }