Skip to content
campaiDeveloper
campai.com

Sales · Shop

POST/{organizationId}/{mandateId}/sales/shop/products/list

List products of the shop

Lists the products sold in the mandate shop in the order buyers see them, with their prices, member price, stock per variant and whether buyers can see them right now

Permissions

Send an API key of the organization in the path, using the X-API-Key header.

Permission checks in detail
Required permissions
  • mandate.read
  • shop.read

Request

Path parameters

  • organizationIdidrequired
  • mandateIdidrequired
Request
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
  --request POST 'https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/YOUR_MANDATE_ID/sales/shop/products/list' \
  --header 'X-API-Key: YOUR_API_KEY'

Response

200 Successful response

Content-Type: application/json

  • productsobject[]
    11 properties
    • _idid
    • typestring
      regular variants package
    • namestring
    • imagestringnullable
    • activeboolean
    • optionsobject[]
      2 properties
      • namestring
      • valuesstring[]
    • minAmountnumber
    • maxAmountnumber
    • memberPriceobjectnullable
      2 properties
      • namestring
      • amountnumber
    • stockobject
      3 properties
      • availablenumbernullable
      • soldOutVariantsinteger

        at least 0

      • variantsobject[]
        2 properties
        • namestring
        • availablenumbernullable
    • statusstring
      visible shopClosed inactive soldOut
Response200
{
  "products": [
    {
      "_id": "000000000000000000000001",
      "type": "regular",
      "name": "string",
      "image": "string",
      "active": true,
      "options": [
        {
          "name": "string",
          "values": [
            "string"
          ]
        }
      ],
      "minAmount": 1,
      "maxAmount": 1,
      "memberPrice": {
        "name": "string",
        "amount": 1
      },
      "stock": {
        "available": 1,
        "soldOutVariants": 0,
        "variants": [
          {
            "name": "string",
            "available": 1
          }
        ]
      },
      "status": "visible"
    }
  ]
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.