host

Note: This is an experimental feature, please contact support if you want to utilize this endpoint.

This endpoint returns a list of host sales. The default sorting mode is DESC (newest sales first), but you can also specify ASC (oldest sales first). For session and appointment sales, additional meta data is returned in the response.

get/api/v2/host/sales

Request

  • Base URL
    https://api.momence.com
  • Auth
    OAuth 2
    Authorization code/api/v2/auth/authorize
    Password
    Token URL/api/v2/auth/token

Query parameters

pageinteger required

Starts at 0

pageSizeinteger required
Example:10
sortOrder'ASC' | 'DESC'
sortBystring

Field to sort by

Response

Example response

{
  "pagination": {
    "pageSize": 10,
    "totalCount": 1
  },
  "payload": [
    {
      "id": 1,
      "saleDate": "2021-01-01T00:00:00Z",
      "items": [
        {
          "id": 1,
          "saleItemId": 1,
          "itemType": "membership",
          "itemName": "Monthly Membership for Johns",
          "descriptiveItemName": "Monthly Membership for Johns",
          "payingMember": {
            "id": 1,
            "firstName": "John",
            "lastName": "Doe"
          },
          "targetMember": {
            "id": 1,
            "firstName": "John",
            "lastName": "Doe"
          },
          "session": {
            "id": 1,
            "name": "Monday Morning Yoga",
            "startsAt": "2021-01-01T00:00:00Z",
            "endsAt": "2021-01-01T01:00:00Z"
          },
          "appointment": {
            "id": 3,
            "name": "Stretching with John"
          },
          "product": {
            "id": 3,
            "name": "T-Shirt"
          },
          "productVariant": {
            "id": 3,
            "name": "M"
          },
          "openArea": {
            "id": 3,
            "name": "Gym A"
          },
          "quantity": 1,
          "unitPriceExcludingTaxInCurrency": "9.99",
          "unitTaxAmountInCurrency": "0.43"
        }
      ],
      "paymentTransaction": {
        "items": [
          {
            "paymentMethodType": "custom",
            "paymentMethodName": "Custom payment method",
            "amountInCurrencyWithoutTax": "9.99",
            "taxAmountInCurrency": "9.99"
          }
        ]
      }
    }
  ]
}

Changes

    • warning

      added the new imported-sale enum value to the allOf[subschema #2]/payload/items/items/items/itemType response property for the response status

    • warning

      added the new reward-points enum value to the allOf[subschema #2]/payload/items/items/items/itemType response property for the response status

    • warning

      added the new stripe-twint enum value to the allOf[subschema #2]/payload/items/paymentTransaction/items/items/paymentMethodType response property for the response status

    1 more change in this revision