docs.manob.ai
Toggle Sidebar

Find sale history

Retrieve a list of sales made by the user. This endpoint allows you to fetch all sales associated with a specific user account.

Requirements

  • Authentication is typically required to access a user’s sale history.
  • Pagination is supported via page and limit.

Usage

Request

  • Method: GET
  • Path: /sales/history

Query Parameters

| Name | Type | Required | Example | Description | |------|--------|----------|---------|-------------| | page | number | No | 1 | Page number (starting from 1). | | limit | number | No | 20 | Number of sales per page. |

Example

curl -X GET "https://api.example.com/sales/history?page=1&limit=20" \
  -H "Authorization: Bearer <token>"

Response

200 OK

Returns a standard API envelope containing sale history items and pagination metadata.

Example:

{
  "status": true,
  "path": "string",
  "statusCode": 0,
  "message": "string",
  "data": {
    "items": [
      {
        "id": "string",
        "order_id": "string",
        "order_type": "string",
        "order_status": "string",
        "item_id": "string",
        "item_meta": {
          "id": "string",
          "name": "string",
          "image": "string"
        },
        "creator_meta": {
          "id": "string",
          "name": "string",
          "avatar": "string"
        },
        "buyer_meta": {
          "id": "string",
          "name": "string",
          "avatar": "string"
        },
        "selling_price": 0,
        "created_at": "string",
        "updated_at": "string"
      }
    ],
    "pagination": {
      "current_page": 0,
      "last_page": 0,
      "total_count": 0,
      "per_page": 0,
      "total_pages": 0
    }
  }
}

Notes

  • The sale list is returned in data.items.
  • Pagination details are returned in data.pagination.
  • item_meta contains summary info about the sold product/service (id, name, image).
  • creator_meta and buyer_meta include lightweight user info for display in history tables.