Buying Periods
Query
buyingPeriod — Returns BuyingPeriod
Scopes Required: stock_create_order stock_edit_order edit_products
| Arguments | Type | Description |
|---|---|---|
|
id |
The ID of the buying period |
Example Query
query GetBuyingPeriod($id: ID!) {
buyingPeriod(id: $id) {
id,
start,
end,
quantity,
cost
}
}
# Example variables
{
"id": "<ID>"
}Query
buyingPeriods — Returns ConnectionType of BuyingPeriod
Scopes Required: stock_create_order stock_edit_order edit_products
| Arguments | Type | Description |
|---|---|---|
|
outlet |
The outlet to view buying periods for |
|
|
supplier |
The supplier to view buying periods for |
|
|
current |
Boolean |
Whether to include the buying periods that are current (defaults to |
|
future |
Boolean |
Whether to include the buying periods that start in the future (defaults to |
|
expired |
Boolean |
Whether to include the buying periods that have expired (defaults to |
Example Query
query GetBuyingPeriods($outlet: ID) {
buyingPeriods(outlet: $outlet) {
edges {
node {
id,
start,
end,
quantity,
cost
}
},
pageInfo {
hasNextPage,
endCursor
}
}
}
# Example variables
{
"outlet": "<OUTLET>"
}