Get Marketing Texts

Retrieve marketing texts for a cost rate. The response returns all stored text types per locale under a data key, keyed by locale with the text types described in Marketing text structure. Results can optionally be filtered to specific locales by passing one or more locales[] query parameters.

By default the request returns the cost rate’s default marketing texts. To retrieve the texts authored against a single schedule entry, pass its UUID as rate_cost_schedule_uuid (see Marketing text scope).

Request

  • Method: GET

  • Path: /api/dynamic_pricing/cost_rate_marketing_text

Query parameters

Name

Type

Description

cost_rate_uuid

string

UUID of the cost rate to retrieve marketing texts for. Required.

locales[]

string

Optional. One or more locale codes to filter by. Repeat the parameter for multiple locales (e.g., locales[]=en_US&locales[]=de_AT). If omitted, all locales are returned.

rate_cost_schedule_uuid

string|null

Optional. UUID of a schedule entry (recurring or unique pricing config) to scope the read to that entry. When omitted, the cost rate’s default marketing texts are returned. See Marketing text scope for the per-locale fallback behaviour.

Example request (cost-rate default scope)

curl --location --request GET 'https://example.beenergised.cloud/api/dynamic_pricing/cost_rate_marketing_text?cost_rate_uuid=<COST_RATE_UUID>&locales[]=de_AT' \
--header 'x-api-token: <your_token>'

Example request (schedule-entry scope)

curl --location --request GET 'https://example.beenergised.cloud/api/dynamic_pricing/cost_rate_marketing_text?cost_rate_uuid=<COST_RATE_UUID>&rate_cost_schedule_uuid=<SCHEDULE_UUID>&locales[]=en_US' \
--header 'x-api-token: <your_token>'

Response (200)

{
  "data": {
    "de_AT": {
      "short_description": "Test short_description",
      "description": "Test description",
      "legal": "Test legal"
    }
  }
}

Note

The response always includes all three text type keys per locale. Types that have not been set will have an empty string "" as their value.

Error responses

  • 400: rate_cost_schedule_uuid is not a valid UUID.

{
  "status": "error",
  "message": "Invalid rate_cost_schedule_uuid format"
}
  • 404: Cost rate not found.

{
  "status": "error",
  "message": "Cost rate not found!"
}
  • 404: rate_cost_schedule_uuid is well-formed but does not resolve to a schedule entry belonging to this cost rate.

{
  "status": "error",
  "message": "Cost rate schedule not found"
}
  • 500: Generic server error.

{
  "status": "error",
  "message": "An unexpected error occured"
}