You can use the Purchase Orders resource to document the sale of products and services to be delivered at a late date.
Authenticated access scopes: com.read_inventories, com.write_inventories
What you can do with Purchase Orders
The Haravan API lets you do the following with the Purchase Orders resource.
Purchase Orders properties
Endpoints
GET https://apis.haravan.com/com/inventories/purchase_orders.json
Retrieves a list of purchase orders.
limit | Limit of the result. |
page | Page to show the result. |
Retrieves a list of purchase orders by page number. By default, the number of resources on the page is 50.
GET https://apis.haravan.com/com/inventories/purchase_orders?page=1
HTTP/1.1 200 OK
{ "purchase_orders": [ { "id": 1000355305, "purchase_number": "PO100001", "notes": "", "status": "Chưa nhận hàng", "tran_date": "2021-07-30T06:04:34Z", "created_at": "2021-07-30T06:05:24.336Z", "updated_at": "2021-07-30T06:05:24.925Z", "completed_at": null, "closed_at": null, "ref_number": "iN_3007", "supplier": null, "location": { "id": 1007284, "name": "Dottie Phan Đăng Lưu", "location_type": null, "email": null, "address1": "123 Phan Đăng Lưu", "address2": null, "zip": "70000", "city": null, "province": "Hồ Chí Minh", "country": "Vietnam", "phone": "0796060700", "country_code": null, "country_name": "Vietnam", "province_code": "HC", "district": "Quận Phú Nhuận", "district_code": "HC481", "ward": null, "ward_code": null, "created_at": "2020-11-16T02:22:43.485Z", "updated_at": "2020-11-16T02:22:43.485Z", "is_primary": false, "is_unavailable_quantity": false, "type": null }, "line_item": { "received_items": null, "not_received_items": [ { "id": 1002496132, "product_id": 1028183686, "product_variant_id": 1061514767, "product_name": "Váy Quây dài", "variant_title": "Đen / S", "sku": "AO551", "barcode": "AO551", "quantity": 1, "cost_amount": 0.00, "status": "Chưa nhận hàng", "receive_id": null, "receive_date": null } ] } }, { "id": 1000354988, "purchase_number": "PO100000", "notes": "", "status": "Hoàn thành", "tran_date": "2021-07-27T03:29:32Z", "created_at": "2021-07-27T03:33:38.404Z", "updated_at": "2021-07-30T05:58:31.483Z", "completed_at": "2021-07-30T05:58:31Z", "closed_at": null, "ref_number": "IN_2707", "supplier": null, "location": { "id": 1007284, "name": "Dottie Phan Đăng Lưu", "location_type": null, "email": null, "address1": "123 Phan Đăng Lưu", "address2": null, "zip": "70000", "city": null, "province": "Hồ Chí Minh", "country": "Vietnam", "phone": "0796060700", "country_code": null, "country_name": "Vietnam", "province_code": "HC", "district": "Quận Phú Nhuận", "district_code": "HC481", "ward": null, "ward_code": null, "created_at": "2020-11-16T02:22:43.485Z", "updated_at": "2020-11-16T02:22:43.485Z", "is_primary": false, "is_unavailable_quantity": false, "type": null }, "line_item": { "received_items": [ { "id": 1002494198, "product_id": 1028183663, "product_variant_id": 1061514702, "product_name": "Đầm Bẹt Vai Thô Phối Bèo", "variant_title": "Default Title", "sku": "D-0003", "barcode": null, "quantity": 10, "cost_amount": 1000000.00, "status": "Hoàn thành", "receive_id": 1000345765, "receive_date": "2021-07-30T12:58:22Z" } ], "not_received_items": null } } ] }
GEThttps://apis.haravan.com/com/inventories/purchase_orders/{purchase_id}.json
Retrieves single the purchase order.
Retrieves single the purchase order.
GET https://apis.haravan.com/com/inventories/purchase_orders/1000355305.json
HTTP/1.1 200 OK
{ "purchase_order": { "id": 1000355305, "purchase_number": "PO100001", "notes": "", "status": "Chưa nhận hàng", "tran_date": "2021-07-30T06:04:34Z", "created_at": "2021-07-30T06:05:24.336Z", "updated_at": "2021-07-30T06:05:24.925Z", "completed_at": null, "closed_at": null, "ref_number": "iN_3007", "supplier": null, "location": { "id": 1007284, "name": "Dottie Phan Đăng Lưu", "location_type": null, "email": null, "address1": "123 Phan Đăng Lưu", "address2": null, "zip": "70000", "city": null, "province": "Hồ Chí Minh", "country": "Vietnam", "phone": "0796060700", "country_code": null, "country_name": "Vietnam", "province_code": "HC", "district": "Quận Phú Nhuận", "district_code": "HC481", "ward": null, "ward_code": null, "created_at": "2020-11-16T02:22:43.485Z", "updated_at": "2020-11-16T02:22:43.485Z", "is_primary": false, "is_unavailable_quantity": false, "type": null }, "line_item": { "received_items": null, "not_received_items": [ { "id": 1002496132, "product_id": 1028183686, "product_variant_id": 1061514767, "product_name": "Váy Quây dài", "variant_title": "Đen / S", "sku": "AO551", "barcode": "AO551", "quantity": 1, "cost_amount": 0.00, "status": "Chưa nhận hàng", "receive_id": null, "receive_date": null } ] } } }