mautic-contact-client icon indicating copy to clipboard operation
mautic-contact-client copied to clipboard

how to handle nested json response?

Open rchen9012 opened this issue 4 years ago • 2 comments

Hi,

I am trying to match the response from Eventbrite which is a nested json. and also unable to handle pagination in response.

{ "pagination": { "object_count": 5, "page_number": 1, "page_size": 50, "page_count": 1, "has_more_items": false }, "attendees": [ { "team": null, "costs": { "base_price": { "display": "HK$0.00", "currency": "HKD", "value": 0, "major_value": "0.00" }, "eventbrite_fee": { "display": "HK$0.00", "currency": "HKD", "value": 0, "major_value": "0.00" }, "gross": { "display": "HK$0.00", "currency": "HKD", "value": 0, "major_value": "0.00" }, "payment_fee": { "display": "HK$0.00", "currency": "HKD", "value": 0, "major_value": "0.00" }, "tax": { "display": "HK$0.00", "currency": "HKD", "value": 0, "major_value": "0.00" } }, "resource_uri": "https://www.eventbriteapi.com/v3/events/827538913/attendees/15573903/", "id": "1557273903", "changed": "2019-11-20T07:30:12Z", "created": "2019-11-20T07:30:12Z", "quantity": 1, "variant_id": null, "profile": { "first_name": "ond", "last_name": "cn", "email": "[email protected]", "name": "test test", "addresses": {} }, "barcodes": [ { "status": "unused", "barcode": "115996298357273903001", "created": "2019-11-20T07:30:13Z", "changed": "2019-11-20T07:30:13Z", "checkin_type": 0, "is_printed": false } ], "answers": [], "checked_in": false, "cancelled": false, "refunded": false, "affiliate": "oddtdteb", "guestlist_id": null, "invited_by": null, "status": "Attending", "ticket_class_name": "General Admission", "delivery_method": "electronic", "event_id": "82753488913", "order_id": "1159962983", "ticket_class_id": "145585857" },

rchen9012 avatar Nov 26 '19 08:11 rchen9012

I'm not sure how you would handle pagination (depends on what you are trying to accomplish). But if you click Advanced and then check Manual Template you can put in your hierarchical JSON.

heathdutton avatar Nov 26 '19 13:11 heathdutton

Sorry, I missread. For a response, if you run a test you can get nested json response data for field mapping. Pagination is not supported, because this is intended to update one contact. I'm not sure what you are trying to do there.

heathdutton avatar Nov 26 '19 17:11 heathdutton