Skip to content
POST/{organizationId}/{mandateId}/crm/plans/list

Gets a list of plans for the mandate

Required permissions:

  • mandate.read

  • plan.read

Path Parameters

organizationIdstringrequired
mandateIdstringrequired

Request Body required

Content-Type: application/json

limitintegeroptional

Default: 50

minimum: 0

maximum: 100

offsetintegeroptional

Default: 0

minimum: 0

maximum: 9007199254740991

returnCountbooleanoptional

Default: false

searchTermstringoptional

maxItems: 50

contactTypestring | nulloptional

Options:

memberaddresscustomersponsorcontributoremployeesupplier

A stringified json object representing a property filter

Authentication: X-API-Key

Request

POST/{organizationId}/{mandateId}/crm/plans/list
curl --request POST 'https://cloud.campai.com/api/{organizationId}/{mandateId}/crm/plans/list' \
  --header 'X-API-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "sort": {},
  "limit": 50,
  "offset": 0
}'

Responses

This endpoint returns different response codes based on the request outcome.

200Successful response

Content-Type: application/json

countintegerrequired

minimum: 0

maximum: 9007199254740991

Response

200
{
  "count": 0,
  "plans": [
    {
      "_id": "000000000000000000000001",
      "mandate": "000000000000000000000001",
      "contactType": "member",
      "name": "string",
      "tags": "string",
      "type": "membershipFee",
      "period": {
        "interval": "month",
        "mode": "interval",
        "count": 1,
        "custom": {
          "startDay": 1,
          "startMonth": 1,
          "rrule": "string",
          "range": {
            "value": 1,
            "unit": "hours"
          }
        },
        "flexible": {
          "baseInterval": "month",
          "intervals": [
            "month"
          ],
          "mode": "multiply"
        }
      },
      "collection": {
        "mode": "relative",
        "period": "start",
        "relative": "at",
        "shiftMode": "before",
        "shiftTime": {
          "value": 0,
          "unit": "hours"
        },
        "deviantMode": "before",
        "deviantTime": {
          "value": 0,
          "unit": "hours"
        },
        "daysToDue": 0,
        "absolute": {
          "anchor": "interval",
          "date": 1,
          "month": 1
        }
      },
      "charge": {
        "isNet": true,
        "proRataDivisor": 2,
        "amount": {
          "price": {
            "isNet": true,
            "price": 0,
            "taxCode": "string",
            "account": 1,
            "costCenter1": 1,
            "costCenter2": 1
          },
          "proRataMode": "start",
          "expression": {
            "operator": "set",
            "expression": {
              "literal": [
                1
              ]
            }
          },
          "tiers": {
            "expression": {
              "literal": [
                1
              ]
            },
            "tiers": [
              {
                "operator": "set",
                "value": 1,
                "from": 1,
                "to": 1
              }
            ]
          }
        },
        "contactNameMode": "disabled",
        "description": "string",
        "relativeDate": "periodStart",
        "options": [
          {
            "id": "string",
            "name": "string",
            "amount": {
              "price": {
                "isNet": true,
                "price": 0,
                "taxCode": "string",
                "account": 1,
                "costCenter1": 1,
                "costCenter2": 1
              },
              "proRataMode": "start",
              "expression": {
                "operator": "set",
                "expression": {
                  "literal": [
                    null
                  ]
                }
              },
              "tiers": {
                "expression": {
                  "literal": [
                    null
                  ]
                },
                "tiers": [
                  {
                    "operator": "set",
                    "value": 1,
                    "from": 1,
                    "to": 1
                  }
                ]
              }
            },
            "description": "string",
            "preSelected": true,
            "oneTime": true,
            "filter": {
              "operator": "and",
              "groups": [
                {
                  "operator": "and",
                  "fields": [
                    {
                      "path": "string",
                      "comparator": "exists"
                    }
                  ]
                }
              ]
            }
          }
        ],
        "adjustments": {
          "adjustments": [
            {
              "operator": "set",
              "value": 1,
              "type": "filter",
              "id": "string",
              "name": "string",
              "description": "string",
              "min": 0,
              "max": 1,
              "filter": {
                "operator": "and",
                "groups": [
                  {
                    "operator": "and",
                    "fields": [
                      {
                        "path": null,
                        "comparator": "exists"
                      }
                    ]
                  }
                ]
              }
            }
          ],
          "min": 0,
          "max": 1
        }
      },
      "pauseRules": [
        {
          "id": "string",
          "name": "string",
          "adjustment": {
            "operator": "set",
            "value": 0
          }
        }
      ],
      "billing": {
        "deleteContractAfterEnd": true,
        "sepaDirectDebitCashAccount": "000000000000000000000001",
        "sepaDirectDebitPurpose": "string",
        "sepaDirectDebitSendReceipts": true,
        "sepaCreditTransferCashAccount": "000000000000000000000001",
        "receiptTemplate": "000000000000000000000001",
        "receiptTexts": {
          "intro": "string",
          "note": "string",
          "title": "string",
          "subject": "string",
          "message": "string"
        }
      },
      "customFields": {
        "groups": [
          {
            "id": "string",
            "label": "string",
            "fields": [
              {
                "id": "string",
                "type": "placeholder",
                "name": "string"
              }
            ]
          }
        ]
      },
      "department": "000000000000000000000001",
      "requireActiveDepartment": true
    }
  ]
}

400Invalid input data

Content-Type: application/json

The error information

messagestringrequired

The error message

codestringrequired

The error code

An array of issues that were responsible for the error

Response

400
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}

401Authorization not provided

Content-Type: application/json

The error information

messagestringrequired

The error message

codestringrequired

The error code

An array of issues that were responsible for the error

Response

401
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}

403Insufficient access

Content-Type: application/json

The error information

messagestringrequired

The error message

codestringrequired

The error code

An array of issues that were responsible for the error

Response

403
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}

500Internal server error

Content-Type: application/json

The error information

messagestringrequired

The error message

codestringrequired

The error code

An array of issues that were responsible for the error

Response

500
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}