Skip to content

Report purchase orders by issue date

Open .md

POST/v1/api/store/{team_slug}/report/purchase_order

v1Operation ID v1_public_report_purchase_order

Returns every purchase order issued in the period, in full. Amounts (calc_subtotal, calc_tax, calc_total) are decimal strings with 4 decimal places ("125.0000").

Permission

Needs the View Reports permission. Otherwise 403 with a bare { "message": "Insufficient Permission" } (no success or error envelope).

Business rules

  • A purchase order is in the period when its issue date is between start_date and end_date, inclusive.

Path parameters

  • team_slugstringrequired

    Your team slug, shown as Team ID next to your API key in Profile.

    • Example your-team

Request body

application/json, required.

  • end_datestring (date-time)required

    End of the period (ISO 8601), inclusive: send 23:59:59 to include the whole last day. In UTC, like start_date (an offset is dropped, not applied).

  • start_datestring (date-time)required

    Start of the period (ISO 8601), inclusive, to the second: send the start of the day. Send it in UTC (Z): the date and time are compared with UTC as written and any offset is dropped, so 2026-10-01T00:00:00-05:00 means midnight UTC.

Response

200Successful response.

  • dataarray of objectsrequired
    Fields of each item (14)
    • calc_subtotalstring | null

      Subtotal, 4 decimal places. A decimal string, such as "125.0000"; parse it as a decimal.

    • calc_taxstring | null

      Tax. A decimal string, such as "0.0000"; parse it as a decimal.

    • calc_totalstring | null

      Total. A decimal string, such as "125.0000"; parse it as a decimal.

    • due_datestring (date-time) | null

      Due date. ISO 8601 with offset, or null.

    • idstring

      The purchase order.

    • issue_datestring (date-time) | null

      Issue date. ISO 8601 with offset, or null.

    • namestring | null
    • PDF link with its own access token.

    • scoped_idstring | null

      The PO number.

    • status_idstring | null

      The PO status.

    • tax_modestring | null
    • tax_ratestring | null

      Tax rate. A decimal string, such as "24.00000000"; parse it as a decimal.

    • vendor_idstring | null

      The vendor.

    • warehouse_idstring | null

      The warehouse.

  • statusintegerrequired
  • successbooleanrequired

Errors

  • 401The API key is missing or wrong (unauthenticated).

  • 403You are not allowed to do this. api_access_not_in_plan: your team's plan doesn't include API access (Pro and above, with an active subscription or trial), so every request answers this until the team upgrades. When your role lacks the permission the operation needs, the body is only {"message": "Insufficient Permission"}. Other refusals use the error envelope, with unauthorized or user_is_not_authorized.

    When
    Your role lacks View Reports.
    Fix
    Ask the team owner to turn on View Reports for your permission group.
  • 404Not found. page_not_found: the team slug is unknown, you are not a member of the team, or an id in the path is not one of this team's. code: null, with a message that starts "No query results for": there is no record with that id.

  • 422The request was refused and changed nothing. validation_failed lists what to fix in error.fields; other codes name a business rule, explained in error.message. A few checks answer with only {"message": "..."}. An operation that calls another service (a payment provider, a carrier, an accounting app) can answer connect_timeout ("Please retry again") when that service does not answer in time: the change may or may not have happened there, so read the record back before you retry.

    When
    start_date or end_date is missing or not ISO 8601.
    Fix
    Send both as ISO 8601 date-times.

Notes

  • There is no paging: the whole period comes back in one response. Ask for a month or less at a time.