API Actions JSON

I have an API i am writing to that takes JSON input, the API requires a combination of strings and literals
Here is a copy of it

{
  "name": "{{api_get_rezdy_booking.data.bookings[0].customer.name}}",
  "email": "{{api_get_rezdy_booking.data.bookings[0].customer.email}}",
  "invoiceEmail": "{{api_get_rezdy_booking.data.bookings[0].customer.email}}",
  "overdueNoticeEmail": "{{api_get_rezdy_booking.data.bookings[0].customer.email}}",
  "phoneNumber": "{{api_get_rezdy_booking.data.bookings[0].customer.phone}}",
  "phoneNumberMobile": "{{api_get_rezdy_booking.data.bookings[0].customer.mobile}}",
  "language": "{{api_get_rezdy_booking.data.bookings[0].customer.preferredLanguage.uppercase()}}",
  "isPrivateIndividual": "{{api_get_rezdy_booking.data.bookings[0].customer.companyName?true:false}}", //Should be literal boolean
  "isSupplier": false,
  "invoiceSendMethod": "EMAIL",
  "emailAttachmentType": "LINK",
  "postalAddress": {
    "addressLine1": "{{api_get_rezdy_booking.data.bookings[0].customer.addressLine}}",
    "addressLine2": "{{api_get_rezdy_booking.data.bookings[0].customer.state}}",
    "postalCode": "{{api_get_rezdy_booking.data.bookings[0].customer.postCode}}",
    "city": "{{api_get_rezdy_booking.data.bookings[0].customer.city}}",
    "country": {
      "id": "{{filter_county_list.id}}" //Should be literal number
    }
  },
  "invoicesDueIn": 0,
  "invoicesDueInType": "DAYS",
  "currency": {
    "id": "{{filter_currency_list.id}}", //Should be literal number
    "code": "{{filter_currency_list.code}}",
    "description": "{{filter_currency_list.description}}",
    "factor": "{{filter_currency_list.factor}}" //Should be literal number
  }
}

If I remove the " characters around the {{filter_country_list.id}} or any of the others, then the JSON says it is invalid, so how do I insert my dynamic literal data?

I am sure I am just doing something dumb here… in fact I think @mebeingken helped me with this once before and I can not find the topic.

Ok figured this out, there was nothing wrong with the JSON, there was something wrong with one of my variables before this step.

Community Page
Last updated: