# Queries / Buying Periods

# Buying Periods

**Query**
## buyingPeriod — Returns [BuyingPeriod](/documentation/Objects/Buying-Periods#BuyingPeriod)

**Scopes required:** stock_create_order, stock_edit_order, edit_products

| Arguments | Type | Description |
| --- | --- | --- |
| id | [ID!](/documentation/Types/UUID#UUID) | The ID of the buying period |

**Example Query**

```graphql
query GetBuyingPeriod($id: ID!) {
    buyingPeriod(id: $id) {
        id,
        start,
        end,
        quantity,
        cost
    }
}

# Example variables
{
    "id": "<ID>"
}
```

**Query**
## buyingPeriods — Returns [ConnectionType](/documentation/General/Connections) of [BuyingPeriod](/documentation/Objects/Buying-Periods#BuyingPeriod)

**Scopes required:** stock_create_order, stock_edit_order, edit_products

| Arguments | Type | Description |
| --- | --- | --- |
| outlet | [ID](/documentation/Types/UUID#UUID) | The outlet to view buying periods for |
| supplier | [ID](/documentation/Types/UUID#UUID) | The supplier to view buying periods for |
| current | *Boolean* | Whether to include the buying periods that are current (defaults to `true`) |
| future | *Boolean* | Whether to include the buying periods that start in the future (defaults to `true`) |
| expired | *Boolean* | Whether to include the buying periods that have expired (defaults to `false`) |

**Example Query**

```graphql
query GetBuyingPeriods($outlet: ID) {
    buyingPeriods(outlet: $outlet) {
        edges {
            node {
                id,
                start,
                end,
                quantity,
                cost
            }
        },
        pageInfo {
            hasNextPage,
            endCursor
        }
    }
}

# Example variables
{
    "outlet": "<OUTLET>"
}
```