Hello everybody!
I’m having trouble accessing some data from my API call.
I’m connecting Bubble with my wordpress site + woocommerce + booking plugin.
I want to access some data that are inside the following structure:
Purchase order > List of reserved products (“line_itens”) > Details of this reservation (“meta_data”)
A sample of the call:
{
"order_id": 20160,
"status": "processing",
"date_created": "2022-09-04T15:33:02",
"total": "312.00",
"payment_method": "credit-card",
"line_items": [{
"id": 2813,
"name": "Scuba Diving - Island Cedro",
"product_id": 11111,
"quantity": 1,
"subtotal": "312.00",
"total": "312.00",
"meta_data": [{
"id": 63349,
"key": "Number of persons",
"value": "4",
"display_key": "Número de pessoas",
"display_value": "4"
},
{
"id": 63350,
"key": "ph_bookings_participant_booking_data",
"value": [{
"participant_label": "Mergulhador",
"participant_count": "4"
}],
"display_key": "ph_bookings_participant_booking_data",
"display_value": [{
"participant_label": "Mergulhador",
"participant_count": "4"
}]
},
{
"id": 63351,
"key": "From",
"value": [
"2022-09-08 14:00"
],
"display_key": "From",
"display_value": [
"2022-09-08 14:00"
]
},
{
"id": 63352,
"key": "Reservado de",
"value": "08/09/2022 14:00",
"display_key": "Reservado de",
"display_value": "08/09/2022 14:00"
},
{
"id": 63353,
"key": "To",
"value": [
"2022-09-08 14:00"
],
"display_key": "To",
"display_value": [
"2022-09-08 14:00"
]
},
{
"id": 63354,
"key": "Reservado para",
"value": "08/09/2022 16:00",
"display_key": "Reservado para",
"display_value": "08/09/2022 16:00"
},
{
"id": 63355,
"key": "Cost",
"value": "1040",
"display_key": "Cost",
"display_value": "1040"
},
{
"id": 63356,
"key": "person_as_booking",
"value": [
"yes"
],
"display_key": "person_as_booking",
"display_value": [
"yes"
]
},
{
"id": 63362,
"key": "booking_status",
"value": [
"paid"
],
"display_key": "booking_status",
"display_value": [
"paid"
]
},
{
"id": 63363,
"key": "Status da reserva",
"value": "Pago",
"display_key": "Status da reserva",
"display_value": "Pago"
},
{
"id": 63364,
"key": "_is_ph_deposits",
"value": "yes",
"display_key": "_is_ph_deposits",
"display_value": "sim"
},
{
"id": 63365,
"key": "_ph_deposits_full_amount",
"value": "1040",
"display_key": "Total Payable",
"display_value": "1040"
},
{
"id": 63366,
"key": "_ph_deposits_full_amount_ex_tax",
"value": "1040",
"display_key": "Total Payable (excluding tax)",
"display_value": "1040"
},
{
"id": 63367,
"key": "_ph_deposit_deposits_amount_ex_tax",
"value": "312",
"display_key": "Deposit (excluding tax)",
"display_value": "312"
},
{
"id": 63368,
"key": "_ph_deposit_remaining_amount_ex_tax",
"value": "728",
"display_key": "Future Payments (excluding tax)",
"display_value": "728"
},
{
"id": 63369,
"key": "_ph_deposits_payment_plan",
"value": "0",
"display_key": "_ph_deposits_payment_plan",
"display_value": "0"
}
],
"price": 312,
"parent_name": null
}],
"tax_lines": [],
"shipping_lines": [],
"fee_lines": [],
"coupon_lines": []
}
The most important data are all under the field names “value” and “display_value”
But I don’t know why I was able to recover some of your data and some of it didn’t
For exemple:
The data from the “Keys”: “To”, “From”, “person_as_booking” and “booking_status” I was able to access your “values”
But everything else the “value” result came “Empty”
Backed Repeating Group setup:
Sample of front end result:
Any idea why is this happening and how could I solve it?
Thank you in advance