Skip to main content
POST
/
events
/
charities
Create Charity
curl --request POST \
  --url https://api.nuwebgroup.com/v1/events/charities \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "eventId": 1,
  "saleItemData": {
    "pricing": [
      {
        "currencyId": 1,
        "processingFeePercent": 4.5,
        "variablePrice": true,
        "variablePriceMin": 500,
        "variablePriceMax": 2500
      }
    ],
    "attractsGiftAid": true
  },
  "itemData": {
    "name": "Teenage Cancer Trust",
    "description": "Teenage Cancer Trust is a cancer care and support charity in the UK that exists to improve the cancer experience of young people aged 13–24. Founded in 1990, the charity's key service is providing specialist teenage units in NHS hospitals. It also trains and funds staff who are teenage cancer specialists.",
    "externalId": "TCT-FR-2021",
    "website": "https://www.teenagecancertrust.org/"
  }
}
EOF
{
  "data": {
    "type": "saleItems",
    "id": 1,
    "attributes": {
      "attractsGiftaid": true,
      "createdAt": "2021-11-22T11:59:00.000000Z",
      "updatedAt": "2021-11-22T11:59:00.000000Z"
    },
    "relationships": {
      "items": {
        "data": {
          "type": "items",
          "id": 1
        }
      }
    }
  },
  "included": [
    {
      "type": "items",
      "id": 1,
      "attributes": {
        "type": "charity",
        "name": "Teenage Cancer Trust",
        "description": "Teenage Cancer Trust is a cancer care and support charity in the UK that exists to improve the cancer experience of young people aged 13–24. Founded in 1990, the charity's key service is providing specialist teenage units in NHS hospitals. It also trains and funds staff who are teenage cancer specialists.",
        "externalId": "TCT-FR-2021",
        "website": "https://www.teenagecancertrust.org/",
        "createdAt": "2021-11-22T11:59:00.000000Z",
        "updatedAt": "2021-11-22T11:59:00.000000Z"
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

The 'Bearer' token can be obtained from the token management interface or via the login endpoint using your admin user credentials.

Body

application/json

Request body for creating a charity sale item.

eventId
integer
saleItemData
object
itemData
object

Response

Successfully created the sale item.

data
object
included
object[]