Fetch Purchase Orders


Get the purchase orders available on the sales channel listing.

Basic Information

  • Method: GET
  • URI: /purchase_orders
  • Response Format: JSON

Headers

The following headers should be sent along with the request

  • Accept: application/json
  • Authorization: Your API Key

Request

Below table list the request parameters which can be sent to Fetch Purchase Orders API to filter records.

{info} The request parameters should be sent as query parameters in the URL.

Parameter Type Required Description
per_page Number No How many records you want at a time
page Number No Page number used for pagination
purchase_order_id String No Purchase Order ID to fetch. Only the matched order will be returned in the response if you use this filter
reference_purchase_order_id String No Reference Purchase Order ID to fetch. Only the matched order will be returned in the response if you use this filter


Sample Request

https://dev-fc-api.aymakan.net/api/v1/purchase_orders?per_page=20&page=1&reference_purchase_order_id=po-ref-1&purcase_order_id=PO-OL1-13

Response

Sample response is added here:

{
    "success": true,
    "message": "",
    "data": [
        {
            "seller_name": "Ollkom Store",
            "hub_code": "ollkomHub",
            "purchase_order_id": "PO-OL1-13",
            "reference_purchase_order_id": "po-ref-1",
            "supplier_name": "Rg1",
            "type": "standard",
            "total_amount": 104,
            "currency": "SAR",
            "shipping": {},
            "item_number": 10,
            "remark": "Ritik",
            "created_at": "",
            "updated_at": ""
        }
    ],
    "meta": {
        "current_page": 1,
        "last_page": 1,
        "per_page": 20,
        "total": 1
    }
}