Skip to content
GET/{organizationId}/{mandateId}/crm/plans/{planId}

Gets a specific plan with all of its details

Required permissions:

  • mandate.read

  • plan.read

Path Parameters

organizationIdstringrequired
mandateIdstringrequired
planIdstringrequired

Authentication: X-API-Key

Request

GET/{organizationId}/{mandateId}/crm/plans/{planId}
curl --request GET 'https://cloud.campai.com/api/{organizationId}/{mandateId}/crm/plans/{planId}' \
  --header 'X-API-Key: YOUR_API_KEY'

Responses

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

200Successful response

Content-Type: application/json

ObjectId as string

ObjectId as string

contactTypestring | nullrequired

Options:

memberaddresscustomersponsorcontributoremployeesupplier
namestringrequired

minLength: 1

maxLength: 64

tagsstring arrayrequired
typestringrequired

Options:

membershipFeecontractdonation

Additional properties are not allowed.

Additional properties are not allowed.

Additional properties are not allowed.

Additional properties are not allowed.

Additional properties are not allowed.

ObjectId as string

requireActiveDepartmentbooleanrequired

Response

200
{
  "_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": [
                1
              ]
            }
          },
          "tiers": {
            "expression": {
              "literal": [
                1
              ]
            },
            "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": "string",
                    "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": []
}

404Not found

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

404
{
  "code": "NOT_FOUND",
  "message": "Not found",
  "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": []
}