> ## Documentation Index
> Fetch the complete documentation index at: https://docs.streamlinedpayments.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get customer monthly sales

> Chart sales and payments for each of the last 12 months, including this one, in the customer's currency.



## OpenAPI

````yaml /api-reference/openapi.yaml get /customers/{id}/monthly_sales
openapi: 3.0.3
info:
  title: Streamlined API
  description: >
    Access customers, customer applications, customer groups, products, payouts,
    invoices, transactions, deposit links, and the reports behind your dashboard
    programmatically through this API, and receive webhooks when deposit links
    change. All requests must be authenticated with an API key.
  version: 1.8.0
  license:
    name: Proprietary
    url: https://streamlinedpayments.com/terms
servers:
  - url: https://api.staging.streamlinedpayments.com/api/v1
    description: Sandbox
  - url: https://api.streamlinedpayments.com/api/v1
    description: Production
security:
  - AppIdAuth: []
    ApiKeyAuth: []
tags:
  - name: Customers
    description: Create, update and delete the businesses you sell to.
  - name: Customer applications
    description: >-
      List the applications your customers submit, and approve them. Approving
      can also set net terms and export the customer to Shopify. See [Approve
      customer applications](/guides/customer-applications).
  - name: Customer groups
    description: >-
      Organize customers into groups and manage who's in each one. A group can
      be linked to a Shopify B2B company.
  - name: Customer files
    description: Upload and manage files attached to a customer.
  - name: Customer addresses
    description: Manage a customer's addresses and choose their default billing address.
  - name: Orders
    description: Create orders, add and remove line items, and schedule them.
  - name: Invoices
    description: Create invoices from orders, then list, look up and update them.
  - name: Transactions
    description: List transactions and look one up.
  - name: Payouts
    description: List payouts, including pending ones, and look one up.
  - name: Products
    description: >-
      Create and update the products and services you sell, import them in bulk,
      and merge duplicates.
  - name: Deposit links
    description: Collect money from a customer before an invoice exists.
  - name: Webhooks
    description: >-
      Register HTTPS endpoints to receive events when something changes. See
      [Webhooks](/guides/webhooks) for signatures, retries and delivery
      guarantees.
  - name: Reports
    description: >-
      Read the aging, sales, collections, and customer figures your dashboard
      and customer pages show. Amounts are in cents, in the currency each
      response names. See [Reports](/guides/reports) for how each figure is
      worked out.
paths:
  /customers/{id}/monthly_sales:
    get:
      tags:
        - Customers
      summary: Get customer monthly sales
      description: >-
        Chart sales and payments for each of the last 12 months, including this
        one, in the customer's currency.
      operationId: getCustomerMonthlySales
      parameters:
        - name: id
          in: path
          required: true
          description: The customer's UUID.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonthlySales'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: >-
            Customer not found. The ID is wrong, or it belongs to another
            account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: customer_not_found
                message: Customer not found
components:
  schemas:
    MonthlySales:
      type: object
      properties:
        currency:
          $ref: '#/components/schemas/Currency'
        data:
          type: array
          description: >-
            Every month in the range, oldest first, with zeros where nothing
            happened.
          items:
            type: object
            properties:
              month:
                $ref: '#/components/schemas/ReportMonth'
              sales_amount:
                type: integer
                description: >-
                  Invoices issued that month, in cents. Voided invoices are left
                  out.
                example: 4210000
              payment_amount:
                type: integer
                description: Payments received that month, in cents.
                example: 3880000
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
    Currency:
      type: string
      description: >-
        ISO currency code. Most resources support these. Products are limited to
        USD, CAD, EUR, GBP, AUD.
      enum:
        - USD
        - CAD
        - GBP
        - EUR
        - AUD
        - JPY
        - INR
    ReportMonth:
      type: string
      description: Month, as `YYYY-MM`, in your account's time zone.
      example: 2026-10
  responses:
    BadRequest:
      description: >-
        A parameter is malformed, out of range, or not one of its allowed values
        (`invalid_parameter`). `message` says which. Values aren't ignored,
        except that `per_page` above 100 is treated as 100.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: invalid_parameter
            message: weeks must be one of 13, 26, 52
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            AuthenticationRequired:
              value:
                error: Authentication required
                message: >-
                  API endpoint requires authentication. Please provide valid
                  X-App-Id and X-Api-Key headers.
            InvalidCredentials:
              value:
                error: Invalid credentials
                message: >-
                  The provided API credentials are invalid. Please check your
                  X-App-Id and X-Api-Key values.
  securitySchemes:
    AppIdAuth:
      type: apiKey
      in: header
      name: X-App-Id
      description: App ID for authentication
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
      description: API Key for authentication

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.