Skip to content
GET/{organizationId}/{mandateId}/crm/contracts/{contractId}

Gets a specific contract with all of its details

Required permissions:

  • mandate.read

  • contract.read

  • plan.read

Path Parameters

organizationIdstringrequired
mandateIdstringrequired
contractIdstringrequired

Authentication: X-API-Key

Request

GET/{organizationId}/{mandateId}/crm/contracts/{contractId}
curl --request GET 'https://cloud.campai.com/api/{organizationId}/{mandateId}/crm/contracts/{contractId}' \
  --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

Additional properties are not allowed.

Additional properties are not allowed.

Additional properties are not allowed.

startAtstringrequired
endAtstring | nullrequired
terminatedAtstring | nullrequired

Additional properties are not allowed.

flexibleIntervalstring | nullrequired

Options:

monthquarterhalfYearyear
fixedAmountinteger | nullrequired

minimum: 0

maximum: 9999999999

Additional properties are not allowed.

Additional properties are not allowed.

totalCollectedAmountintegerrequired

minimum: 0

maximum: 9999999999

createdAtdate-time | nulloptional

Additional properties are not allowed.

Response

200
{
  "_id": "000000000000000000000001",
  "mandate": "000000000000000000000001",
  "contact": {
    "name": "string",
    "type": "contact",
    "nameNormalized": "string",
    "nameSort": "string",
    "contact": "000000000000000000000001",
    "image": {
      "resource": "string"
    },
    "user": {
      "name": "string",
      "type": "user",
      "userId": "string",
      "image": {
        "resource": "string"
      }
    }
  },
  "debtor": {
    "account": 1,
    "name": "string",
    "nameNormalized": "string",
    "nameSort": "string",
    "paymentMethodType": "sepaCreditTransfer"
  },
  "plan": {
    "plan": "000000000000000000000001",
    "name": "string",
    "tags": "string",
    "interval": "month"
  },
  "options": [
    "string"
  ],
  "startAt": "string",
  "endAt": "string",
  "terminatedAt": "string",
  "pause": {
    "ruleId": "string",
    "startAt": "string",
    "endAt": "string"
  },
  "customFields": {},
  "flexibleInterval": "month",
  "fixedAmount": 0,
  "lastCollection": {
    "collectAt": "string",
    "periodStart": "string",
    "periodEnd": "string",
    "flexiblePeriodStart": "string",
    "flexiblePeriodEnd": "string",
    "counter": 1,
    "amount": 0,
    "description": "string",
    "amounts": [
      {
        "price": {
          "account": 1,
          "costCenter1": 1,
          "costCenter2": 1,
          "isNet": true,
          "taxCode": "string"
        },
        "appliedPause": {
          "rule": {
            "id": "string",
            "name": "string",
            "adjustment": {
              "operator": "set",
              "value": 0
            }
          },
          "startAt": "string",
          "endAt": "string"
        },
        "baseAmount": 1,
        "proRatedBaseAmount": 1,
        "adjustedAmount": 1,
        "proRatedAdjustedAmountBeforePause": 1,
        "proRatedAdjustedAmount": 1,
        "optionsAmount": 1,
        "proRatedOptionsAmountBeforePause": 1,
        "proRatedOptionsAmount": 1,
        "totalAmount": 1,
        "multiplyFactor": 1,
        "isDeviantStart": true,
        "isDeviantEnd": true,
        "isProRataStart": true,
        "isProRataEnd": true,
        "deviantStartDays": 1,
        "deviantEndDays": 1,
        "adjustments": [
          {
            "adjustment": {
              "operator": "set",
              "value": 1,
              "type": "filter",
              "id": "string",
              "name": "string",
              "description": "string",
              "min": 0,
              "max": 1,
              "filter": {
                "operator": "and",
                "groups": [
                  {
                    "operator": "and",
                    "fields": [
                      null
                    ]
                  }
                ]
              }
            },
            "description": "string"
          }
        ],
        "options": [
          {
            "option": {
              "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": null,
                      "from": null,
                      "to": null
                    }
                  ]
                }
              },
              "description": "string",
              "preSelected": true,
              "oneTime": true,
              "filter": {
                "operator": "and",
                "groups": [
                  {
                    "operator": "and",
                    "fields": [
                      null
                    ]
                  }
                ]
              }
            },
            "amount": 1,
            "proRatedAmount": 1,
            "description": "string"
          }
        ],
        "description": "string",
        "voucherAmount": 1,
        "vouchers": [
          {
            "voucher": "000000000000000000000001",
            "name": "string",
            "code": "string",
            "usagePeriod": "string",
            "usageDate": "string",
            "amount": 1
          }
        ]
      }
    ],
    "dueAt": "string",
    "sepaDirectDebitPurpose": "string",
    "receiptTexts": {
      "title": "string",
      "intro": "string",
      "note": "string",
      "subject": "string",
      "message": "string"
    },
    "voucherAmount": 0,
    "plan": {
      "type": "membershipFee",
      "department": "000000000000000000000001",
      "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"
        }
      },
      "charge": {
        "isNet": true
      },
      "billing": {
        "receiptTemplate": "000000000000000000000001",
        "sepaDirectDebitCashAccount": "000000000000000000000001",
        "sepaDirectDebitSendReceipts": true,
        "sepaCreditTransferCashAccount": "000000000000000000000001"
      }
    },
    "contractCollectionId": "000000000000000000000001"
  },
  "nextCollection": {
    "collectAt": "string",
    "periodStart": "string",
    "periodEnd": "string",
    "flexiblePeriodStart": "string",
    "flexiblePeriodEnd": "string",
    "counter": 1,
    "amount": 0,
    "description": "string",
    "amounts": [
      {
        "price": {
          "account": 1,
          "costCenter1": 1,
          "costCenter2": 1,
          "isNet": true,
          "taxCode": "string"
        },
        "appliedPause": {
          "rule": {
            "id": "string",
            "name": "string",
            "adjustment": {
              "operator": "set",
              "value": 0
            }
          },
          "startAt": "string",
          "endAt": "string"
        },
        "baseAmount": 1,
        "proRatedBaseAmount": 1,
        "adjustedAmount": 1,
        "proRatedAdjustedAmountBeforePause": 1,
        "proRatedAdjustedAmount": 1,
        "optionsAmount": 1,
        "proRatedOptionsAmountBeforePause": 1,
        "proRatedOptionsAmount": 1,
        "totalAmount": 1,
        "multiplyFactor": 1,
        "isDeviantStart": true,
        "isDeviantEnd": true,
        "isProRataStart": true,
        "isProRataEnd": true,
        "deviantStartDays": 1,
        "deviantEndDays": 1,
        "adjustments": [
          {
            "adjustment": {
              "operator": "set",
              "value": 1,
              "type": "filter",
              "id": "string",
              "name": "string",
              "description": "string",
              "min": 0,
              "max": 1,
              "filter": {
                "operator": "and",
                "groups": [
                  {
                    "operator": "and",
                    "fields": [
                      null
                    ]
                  }
                ]
              }
            },
            "description": "string"
          }
        ],
        "options": [
          {
            "option": {
              "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": null,
                      "from": null,
                      "to": null
                    }
                  ]
                }
              },
              "description": "string",
              "preSelected": true,
              "oneTime": true,
              "filter": {
                "operator": "and",
                "groups": [
                  {
                    "operator": "and",
                    "fields": [
                      null
                    ]
                  }
                ]
              }
            },
            "amount": 1,
            "proRatedAmount": 1,
            "description": "string"
          }
        ],
        "description": "string",
        "voucherAmount": 1,
        "vouchers": [
          {
            "voucher": "000000000000000000000001",
            "name": "string",
            "code": "string",
            "usagePeriod": "string",
            "usageDate": "string",
            "amount": 1
          }
        ]
      }
    ],
    "dueAt": "string",
    "sepaDirectDebitPurpose": "string",
    "receiptTexts": {
      "title": "string",
      "intro": "string",
      "note": "string",
      "subject": "string",
      "message": "string"
    },
    "voucherAmount": 0,
    "plan": {
      "type": "membershipFee",
      "department": "000000000000000000000001",
      "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"
        }
      },
      "charge": {
        "isNet": true
      },
      "billing": {
        "receiptTemplate": "000000000000000000000001",
        "sepaDirectDebitCashAccount": "000000000000000000000001",
        "sepaDirectDebitSendReceipts": true,
        "sepaCreditTransferCashAccount": "000000000000000000000001"
      }
    }
  },
  "totalCollectedAmount": 0,
  "voucher": {
    "name": "string",
    "interval": "month",
    "amount": 1,
    "amountPercentage": true,
    "code": "string",
    "endAt": "string",
    "startAt": "string",
    "voucher": "000000000000000000000001"
  }
}

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": []
}