get
https://app.fracttal.com/api/warehouse_purchase_orders/
This endpoint allows you to query the purchase orders of a warehouse created during a period of time, or the detail of a specific purchase order —including its items and totals— by indicating its id in the URL.
GET https://app.fracttal.com/api/warehouse_purchase_orders/GET https://app.fracttal.com/api/warehouse_purchase_orders/{id_movement}Input parameters — Detail mode (by ID)
| Parameter | Type | Required | Description |
|---|---|---|---|
id_movement (in URL) | Integer | Yes (for this mode) | Id of the Purchase Order, sent as a URL path segment, not as a query parameter. Example: /api/warehouse_purchase_orders/53168742. Returns the header along with the items and totals blocks. |
Input parameters — List mode
| Parameter | Type | Required | Description |
|---|---|---|---|
warehouse_code | String | No | Warehouse code. If omitted, no warehouse filter is applied and purchase orders from all warehouses of the company are listed. |
since | String | Optional | Query start date. Format: 'YYYY-MM-DDTHH:MM:SS-UTC' Example:'2016-07-12T20:00:00-03'. (Defaults to 30 days before) |
until | String | Optional | Query end date. Format: 'YYYY-MM-DDTHH:MM:SS-UTC' Example:'2016-07-12T20:00:00-03'. (Defaults to the current date). |
page | Integer | Optional | Page number to query. |
start | Integer | Optional | Starting record number for the query. |
limit | Integer | Optional | Ending record number returned by the query. |
Difference between modes
- List mode (no
id_movementin the URL): returns the header of each purchase order matching the filters, without theitemsortotalsblocks.- Detail mode (
id_movementin the URL): returns a single purchase order, with the header plus theitemsandtotalsblocks.
Output parameters
| Parameter | Type | Description |
|---|---|---|
id_movement | Integer | Movement id |
folio_source | String | Movement id of the source warehouse |
folio_target | String | Movement id of the destination warehouse |
date | Date | Delivery date |
description | String | Description of the entry. |
document | String | Reference |
movements_types_description | String | Movement type |
movements_states_description | String | Movement status description |
warehouses_target_description | String | Source warehouse |
warehouses_target_code | String | Source warehouse code |
third_parties_name | String | Third party name |
costs_center_description | String | Cost center |
responsible_description | String | Responsible party |
priorities_description | String | Priority |
date_create | String | Movement creation date |
third_parties_code | String | Third party code |
third_parties_address | String | Third party address |
third_parties_telephone_1 | String | Third party phone 1 |
third_parties_telephone_2 | String | Third party phone 2 |
third_parties_email | String | Third party email |
number_details | Number | Number of items in the movement |
id_movement_reference | Integer | Id of the purchase order related to the material entry. Used to link a material entry record with a purchase order movement. |
items | Array of objects | Item detail of the purchase order. See the items structure below. |
totals | Object | Calculated totals of the purchase order (subtotal, taxes, total). See the totals structure below. |
items structure
items structureEach element of the items array represents an item of the purchase order:
| Parameter | Type | Description |
|---|---|---|
code | String | Item code. |
items_description | String | Item description. |
units_description | String | Unit of measure description. |
qty | Number | Ordered quantity. |
qty_pending | Number | Quantity still pending to be received. |
unit_cost | Number | Unit cost. |
tax_name | String or null | Name of the applied tax. null if the item has no tax assigned. |
item_tax_rate | Number | Tax percentage. 0 when tax_name is null. |
totals structure
totals structure| Parameter | Type | Description |
|---|---|---|
subtotal | Number | Sum of (qty × unit_cost) of all items, before taxes. |
taxes | Array of objects | Breakdown by tax type. See structure below. |
total | Number | Grand total of the purchase order (subtotal + taxes). |
Structure of each taxes element
taxes element| Parameter | Type | Description |
|---|---|---|
tax_name | String | Tax name. |
tax_rate | Number | Tax percentage. |
tax_amount | Number | Calculated tax amount for that type. |
Notes:
- If the purchase order has no items registered,
itemsreturns[]andtotalsreturns{ "subtotal": 0, "taxes": [], "total": 0 }. - If an item has no tax assigned,
tax_nameisnullanditem_tax_rateis0. - Amounts are returned in the purchase order's own currency, without conversion (see
currency_description/currency_symbolin the header). - The 22 existing header fields (table above) do not change — this is a backwards-compatible extension.
Errors
| Code | Cause |
|---|---|
401 | Not authenticated. |
404 | The specified warehouse_code does not exist (list mode, if sent). |
404 | The specified id_movement does not exist (detail mode). |
Example:
List mode
Request: (GET)https://app.fracttal.com/api/warehouse_purchase_orders/?warehouse_code=1254
{
"success": true,
"message": "200",
"data": [
{
"id_movement": 2133,
"folio_source": null,
"folio_target": "TUER3640",
"date": "2018-05-31",
"description": null,
"document": "PLAN JUNIO",
"movements_types_description": "PURCHASE_ORDER",
"movements_states_description": "NOT_DELIVERED",
"warehouses_source_description": null,
"warehouses_target_description": "ALMACEN",
"third_parties_name": "Máchena",
"costs_center_description": "PRODUCCIÓN",
"costs_center_value": "11000",
"responsible_description": " ",
"conditions_description": "CREDITO 30 DIAS",
"priorities_description": "VERY_HIGH",
"date_create": "2018-05-25T16:15:09.253565+00:00",
"third_parties_code": "234",
"third_parties_address": null,
"third_parties_telephone_1": "",
"third_parties_telephone_2": "",
"third_parties_email": null,
"number_details": 1,
"currency_description": "PESO CHILENO",
"currency_symbol": "$",
"id_movement_reference": 11111111,
"items": [
{
"code": "REP-001",
"items_description": "Rodamiento 6205",
"units_description": "Unidad",
"qty": 2,
"qty_pending": 0,
"unit_cost": 15000,
"tax_name": "IVA",
"item_tax_rate": 19
}
],
"totals": {
"subtotal": 30000,
"taxes": [
{ "tax_name": "IVA", "tax_rate": 19, "tax_amount": 5700 }
],
"total": 35700
}
}
],
"total": 1
}Example — purchase order with no items
{
"success": true,
"message": "200",
"data": [
{
"id_movement": 2140,
"folio_source": null,
"folio_target": "TUER3651",
"date": "2018-06-02",
"description": null,
"document": "PLAN JUNIO",
"movements_types_description": "PURCHASE_ORDER",
"movements_states_description": "NOT_DELIVERED",
"warehouses_source_description": null,
"warehouses_target_description": "ALMACEN",
"third_parties_name": "Máchena",
"costs_center_description": "PRODUCCIÓN",
"costs_center_value": "11000",
"responsible_description": " ",
"conditions_description": "CREDITO 30 DIAS",
"priorities_description": "VERY_HIGH",
"date_create": "2018-06-01T10:05:00.000000+00:00",
"third_parties_code": "234",
"third_parties_address": null,
"third_parties_telephone_1": "",
"third_parties_telephone_2": "",
"third_parties_email": null,
"number_details": 0,
"currency_description": "PESO CHILENO",
"currency_symbol": "$",
"id_movement_reference": 11111112,
"items": [],
"totals": {
"subtotal": 0,
"taxes": [],
"total": 0
}
}
],
"total": 1
}Detail mode
Request: (GET)https://app.fracttal.com/api/warehouse_purchase_orders/53168742
{
"success": true,
"message": "200",
"data": [
{
"id_movement": 53168742,
"folio_source": null,
"folio_target": "TUER4820",
"date": "2026-08-15",
"description": null,
"document": "PLAN AGOSTO",
"movements_types_description": "PURCHASE_ORDER",
"movements_states_description": "NOT_DELIVERED",
"warehouses_source_description": null,
"warehouses_target_description": "ALMACEN",
"third_parties_name": "Proveedor Ejemplo",
"costs_center_description": "PRODUCCIÓN",
"costs_center_value": "11000",
"responsible_description": " ",
"conditions_description": "CREDITO 30 DIAS",
"priorities_description": "MEDIUM",
"date_create": "2026-08-10T09:30:00.000000+00:00",
"third_parties_code": "512",
"third_parties_address": null,
"third_parties_telephone_1": "",
"third_parties_telephone_2": "",
"third_parties_email": null,
"number_details": 1,
"currency_description": "PESO CHILENO",
"currency_symbol": "$",
"id_movement_reference": 22222222,
"items": [
{
"code": "REP-014",
"items_description": "Filtro de aceite",
"units_description": "Unidad",
"qty": 4,
"qty_pending": 4,
"unit_cost": 8500,
"tax_name": "IVA",
"item_tax_rate": 19
}
],
"totals": {
"subtotal": 34000,
"taxes": [
{ "tax_name": "IVA", "tax_rate": 19, "tax_amount": 6460 }
],
"total": 40460
}
}
],
"total": 1
}Response — Error (401 / 404)
401 / 404){
"success": false,
"message": "404",
"data": null
}TEST CONNECTION
OpenAPI definition
{
"openapi": "3.1.0",
"info": {
"title": "query-purchase-orders",
"version": "2-En"
},
"servers": [
{
"url": "https://app.fracttal.com/api/warehouse_purchase_orders"
}
],
"security": [
{}
],
"paths": {
"/": {
"get": {
"summary": "Query purchase orders",
"description": "This endpoint allows you to query the purchase orders of a warehouse created during a period of time.",
"operationId": "query-purchase-orders",
"parameters": [
{
"name": "warehouse_code",
"in": "query",
"required": false,
"schema": { "type": "string" },
"description": "Warehouse code. If omitted, no warehouse filter is applied."
},
{
"name": "since",
"in": "query",
"required": false,
"schema": { "type": "string" }
},
{
"name": "until",
"in": "query",
"required": false,
"schema": { "type": "string" }
},
{
"name": "page",
"in": "query",
"required": false,
"schema": { "type": "integer" }
},
{
"name": "start",
"in": "query",
"required": false,
"schema": { "type": "integer" }
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": { "type": "integer" }
}
],
"deprecated": false,
"security": []
}
},
"/{id_movement}": {
"get": {
"summary": "Query the detail of a purchase order",
"description": "Returns the header of a specific purchase order along with the items and totals blocks.",
"operationId": "query-purchase-order-detail",
"parameters": [
{
"name": "id_movement",
"in": "path",
"required": true,
"schema": { "type": "integer" },
"description": "Id of the Purchase Order."
}
],
"deprecated": false,
"security": []
}
}
},
"x-readme": {
"headers": [],
"explorer-enabled": false,
"proxy-enabled": true
},
"x-readme-fauxas": true
}