Sales

Use the sales endpoints to list non-draft sales for an organization, fetch one sale by ID, and list sales owned by a specific agent.

List sales

GET /api/v2/organizations/{organization_id}/sales

This endpoint supports limit, cursor, start_date, and end_date. Date parameters are optional — omit them to return all sales regardless of time.

Example pagination block:

List sales request

curl -G https://api.hyperrep.ai/api/v2/organizations/gAAAAABexampleOrganizationIdReturnedByApi7mN4qP2xLs9dV5kTr8cY1hJ6uW3/sales \
  -H "X-API-KEY: your-api-key" \
  --data-urlencode "limit=25" \
  --data-urlencode "start_date=2026-04-01T00:00:00Z" \
  --data-urlencode "end_date=2026-04-30T23:59:59Z"

Example response

{
  "data": [
    {
      "sale_id": "gAAAAABexampleSaleIdReturnedByApi2xLm8dV4kTr7cY1hJ5uN9qP3",
      "associated_conversation_ids": [
        "gAAAAABexampleConversationIdReturnedByApi8kP3xLs7dV2mTr5cN9hY1uJ4"
      ],
      "company_id": "gAAAAABexampleCompanyIdReturnedByApi1hJ7uW4dF8qN2xLm5sV3kRt9",
      "owner_id": "gAAAAABexampleAgentIdReturnedByApi5qN8xLm3sV6kRt2cY9hJ4uW1dF7",
      "associated_contacts": [
        {
          "contact_id": "gAAAAABexampleContactIdReturnedByApi3dF7qN1xLm6sV4kRt8cY2hJ5uW9",
          "is_primary": true
        }
      ],
      "quote_details": {
        "output": {
          "currency": "USD",
          "total_price": "1200.00"
        },
        "arguments": {
          "products": [
            {
              "quantity": 1,
              "unit_price": "1200.00",
              "product_name": "Legacy Seed Service"
            }
          ]
        }
      },
      "notes": "Backfilled sale for new sales framework compatibility.",
      "current_status": {
        "label": "Accepted",
        "status": "accepted",
        "changed_at": "2026-03-13T01:28:41.829924Z"
      },
      "status_history": [
        {
          "label": "Qualified",
          "status": null,
          "changed_at": "2026-03-12T01:28:41.829924Z"
        },
        {
          "label": "Quoted",
          "status": "quote_sent",
          "changed_at": "2026-03-12T01:43:41.829924Z"
        },
        {
          "label": "Accepted",
          "status": "accepted",
          "changed_at": "2026-03-13T01:28:41.829924Z"
        }
      ],
      "created_at": "2026-03-12T01:28:41.829924Z",
      "last_activity_at": "2026-03-12T01:28:41.829924Z"
    }
  ],
  "pagination": {
    "limit": 25,
    "cursor": null,
    "next_cursor": "next_cursor_from_previous_response",
    "has_more": true
  }
}

Get a sale

GET /api/v2/organizations/{organization_id}/sales/{sale_id}

Use a sale_id value from the sales collection response.

Get sale request

curl https://api.hyperrep.ai/api/v2/organizations/gAAAAABexampleOrganizationIdReturnedByApi7mN4qP2xLs9dV5kTr8cY1hJ6uW3/sales/gAAAAABexampleSaleIdReturnedByApi2xLm8dV4kTr7cY1hJ5uN9qP3 \
  -H "X-API-KEY: your-api-key"

Example response

{
  "sale_id": "gAAAAABexampleSaleIdReturnedByApi2xLm8dV4kTr7cY1hJ5uN9qP3",
  "associated_conversation_ids": [
    "gAAAAABexampleConversationIdReturnedByApi8kP3xLs7dV2mTr5cN9hY1uJ4"
  ],
  "company_id": "gAAAAABexampleCompanyIdReturnedByApi1hJ7uW4dF8qN2xLm5sV3kRt9",
  "owner_id": "gAAAAABexampleAgentIdReturnedByApi5qN8xLm3sV6kRt2cY9hJ4uW1dF7",
  "associated_contacts": [
    {
      "contact_id": "gAAAAABexampleContactIdReturnedByApi3dF7qN1xLm6sV4kRt8cY2hJ5uW9",
      "is_primary": true
    }
  ],
  "quote_details": {
    "output": {
      "currency": "USD",
      "total_price": "1200.00"
    },
    "arguments": {
      "products": [
        {
          "quantity": 1,
          "unit_price": "1200.00",
          "product_name": "Legacy Seed Service"
        }
      ]
    }
  },
  "notes": "Backfilled sale for new sales framework compatibility.",
  "current_status": {
    "label": "Accepted",
    "status": "accepted",
    "changed_at": "2026-03-13T01:28:41.829924Z"
  },
  "status_history": [
    {
      "label": "Qualified",
      "status": null,
      "changed_at": "2026-03-12T01:28:41.829924Z"
    },
    {
      "label": "Quoted",
      "status": "quote_sent",
      "changed_at": "2026-03-12T01:43:41.829924Z"
    },
    {
      "label": "Accepted",
      "status": "accepted",
      "changed_at": "2026-03-13T01:28:41.829924Z"
    }
  ],
  "created_at": "2026-03-12T01:28:41.829924Z",
  "last_activity_at": "2026-03-12T01:28:41.829924Z"
}

List agent sales

GET /api/v2/organizations/{organization_id}/agents/{agent_id}/sales

Use this endpoint when you only want sales owned by one agent. Use the agent_id returned by the agent endpoints.

List agent sales request

curl -G https://api.hyperrep.ai/api/v2/organizations/gAAAAABexampleOrganizationIdReturnedByApi7mN4qP2xLs9dV5kTr8cY1hJ6uW3/agents/gAAAAABexampleAgentIdReturnedByApi5qN8xLm3sV6kRt2cY9hJ4uW1dF7/sales \
  -H "X-API-KEY: your-api-key" \
  --data-urlencode "limit=25"

Example response

{
  "data": [
    {
      "sale_id": "gAAAAABexampleSaleIdReturnedByApi2xLm8dV4kTr7cY1hJ5uN9qP3",
      "associated_conversation_ids": [
        "gAAAAABexampleConversationIdReturnedByApi8kP3xLs7dV2mTr5cN9hY1uJ4"
      ],
      "company_id": "gAAAAABexampleCompanyIdReturnedByApi1hJ7uW4dF8qN2xLm5sV3kRt9",
      "owner_id": "gAAAAABexampleAgentIdReturnedByApi5qN8xLm3sV6kRt2cY9hJ4uW1dF7",
      "associated_contacts": [
        {
          "contact_id": "gAAAAABexampleContactIdReturnedByApi3dF7qN1xLm6sV4kRt8cY2hJ5uW9",
          "is_primary": true
        }
      ],
      "quote_details": {
        "output": {
          "currency": "USD",
          "total_price": "1200.00"
        },
        "arguments": {
          "products": [
            {
              "quantity": 1,
              "unit_price": "1200.00",
              "product_name": "Legacy Seed Service"
            }
          ]
        }
      },
      "notes": "Backfilled sale for new sales framework compatibility.",
      "current_status": {
        "label": "Accepted",
        "status": "accepted",
        "changed_at": "2026-03-13T01:28:41.829924Z"
      },
      "status_history": [
        {
          "label": "Qualified",
          "status": null,
          "changed_at": "2026-03-12T01:28:41.829924Z"
        },
        {
          "label": "Quoted",
          "status": "quote_sent",
          "changed_at": "2026-03-12T01:43:41.829924Z"
        },
        {
          "label": "Accepted",
          "status": "accepted",
          "changed_at": "2026-03-13T01:28:41.829924Z"
        }
      ],
      "created_at": "2026-03-12T01:28:41.829924Z",
      "last_activity_at": "2026-03-12T01:28:41.829924Z"
    }
  ],
  "pagination": {
    "limit": 25,
    "cursor": null,
    "next_cursor": null,
    "has_more": false
  }
}

Key response fields

  • Name
    sale_id
    Description

    Unique identifier for the sale.

  • Name
    associated_conversation_ids
    Description

    List of encoded conversation IDs linked to this sale.

  • Name
    company_id
    Description

    Identifier for the company associated with the sale.

  • Name
    owner_id
    Description

    Identifier for the agent who owns the sale.

  • Name
    associated_contacts
    Description

    Contacts linked to the sale. Each entry includes contact_id and is_primary — only one contact will have is_primary: true.

  • Name
    quote_details
    Description

    Quote information attached to the sale. Contains two sub-objects:

    • output — the computed quote result, including currency and total_price as a decimal string
    • arguments — the inputs used to generate the quote; products is an array of line items each with product_name, quantity, and unit_price
  • Name
    notes
    Description

    Free-text notes attached to the sale. May be null.

  • Name
    current_status
    Description

    The sale's latest status event. Contains label (display name), status (status tag), and changed_at (ISO 8601 timestamp). null if no status has been set yet.

  • Name
    status_history
    Description

    Ordered list of all status events, ascending by changed_at. Each entry has the same shape as current_status. The first entry's status is always null (the Qualified stage).

  • Name
    created_at
    Description

    ISO 8601 timestamp when the sale was created.

  • Name
    last_activity_at
    Description

    ISO 8601 timestamp of the most recent activity. Used as the sort key for list and pagination responses.

Was this page helpful?