Creating Lists from an API response

I need a list to show multiple records from an API response.

I’m using a custom action to get the response because there are queries that the user needs to supply. But my list is only showing one record.

I need a list of all the rates (Lines starting with ** below)

I’m able to get it to show one by assigning the API response to a “create a new record” action in my “Rates” collection. But I really need to have it create multiple records from the presence. Also, I’m confused about how adalo’s input options match up to the full response when creating the record. I really don’t my desired parameters in any sort of rider. It may just be combining them IDK.

If there’s an easier way to make this work, I will be thrilled but just getting it to work is my top priority.

Full Response:
{
“id”: “shp_14c101598d1fe1beda11dae076cf5cbc”,
“object”: “Shipment”,
“created_at”: “2020-10-30T19:05:05Z”,
“updated_at”: “2020-10-30T19:05:05Z”,
“reference”: null,
“usps_zone”: 1,
“from_address”: {
“id”: “adr_4e2488e1912e855d94d8b6b9c13bc6dc”,
“object”: “Address”,
“created_at”: “2020-10-30T17:18:50Z”,
“updated_at”: “2020-10-30T17:18:50Z”,
“name”: null,
“company”: “Alex Stockman”,
“street1”: “(Removed)”,
“street2”: “(Removed)”,
“city”: “(Removed)”,
“state”: “AZ”,
“zip”: “(Removed)”,
“country”: “US”,
“phone”: “”,
“email”: null,
“residential”: null,
“verifications”: null
},
“to_address”: {
“id”: “adr_4e2488e1912e855d94d8b6b9c13bc6dc”,
“object”: “Address”,
“created_at”: “2020-10-30T17:18:50Z”,
“updated_at”: “2020-10-30T17:18:50Z”,
“name”: null,
“company”: “Alex Stockman”,
“street1”: “(Removed)”,
“street2”: “(Removed)”,
“city”: “(Removed)”,
“state”: “AZ”,
“zip”: “(Removed)”,
“country”: “US”,
“phone”: “”,
“email”: null,
“residential”: null,
“verifications”: null
},
“return_address”: null,
“buyer_address”: null,
“parcel”: {
“id”: “prcl_717d358dc2d1d2713fcf3f1f206cd4d1”,
“object”: “Parcel”,
“created_at”: “2020-10-30T17:20:18Z”,
“updated_at”: “2020-10-30T19:05:05Z”,
“length”: 1,
“width”: 1,
“height”: 1,
“predefined_package”: null,
“weight”: 1
},
“customs_info”: null,
“rates”: [
{
** “id”: “rate_9c835caab64e0c4d5fc23aee34cd5857”,
** “object”: “Rate”,
** “created_at”: “2020-10-30T19:05:06Z”,
** “shipment_id”: “shp_14c101598d1fe1beda11dae076cf5cbc”,
** “carrier_account_id”: “ca_7d2ceaddaef48e08f2068444facb29e3”,
** “carrier”: “USPS”,
** “service”: “Priority”,
** “rate”: “7.42”,
** “delivery_date”: “2020-10-31”,
** “delivery_date_guaranteed”: false,
** “delivery_days”: 1,
** “usps_cubic”: false
** },
** {
** “id”: “rate_75b5a0b2ac5263dd9447eb478a7c2db9”,
** “object”: “Rate”,
** “created_at”: “2020-10-30T19:05:06Z”,
** “shipment_id”: “shp_14c101598d1fe1beda11dae076cf5cbc”,
** “carrier_account_id”: “ca_7d2ceaddaef48e08f2068444facb29e3”,
** “carrier”: “USPS”,
** “service”: “Express”,
** “rate”: “24.25”,
** “delivery_date”: null,
** “delivery_date_guaranteed”: false,
** “delivery_days”: null,
** “usps_cubic”: false
** },
** {
** “id”: “rate_b562364b9e0d12661d382b05fe34b020”,
** “object”: “Rate”,
** “created_at”: “2020-10-30T19:05:06Z”,
** “shipment_id”: “shp_14c101598d1fe1beda11dae076cf5cbc”,
** “carrier_account_id”: “ca_7d2ceaddaef48e08f2068444facb29e3”,
** “carrier”: “USPS”,
** “service”: “First”,
** “rate”: “2.99”,
** “delivery_date”: “2020-11-01”,
** “delivery_date_guaranteed”: false,
** “delivery_days”: 2,
** “usps_cubic”: false
** },
** {
** “id”: “rate_fcfc822e5fd22b6fb88f7c604260be4e”,
** “object”: “Rate”,
** “created_at”: “2020-10-30T19:05:06Z”,
** “shipment_id”: “shp_14c101598d1fe1beda11dae076cf5cbc”,
** “carrier_account_id”: “ca_7d2ceaddaef48e08f2068444facb29e3”,
** “carrier”: “USPS”,
** “service”: “ParcelSelect”,
** “rate”: “7.32”,
** “delivery_date”: “2020-11-01”,
** “delivery_date_guaranteed”: false,
** “delivery_days”: 2,
** “usps_cubic”: false
** }**
],
“selected_rate”: null,
“tracker”: null,
“postage_label”: null,
“refund_status”: null,
“tracking_code”: null,
“status”: null,
“is_return”: null,
“options”: {
“label_size”: “4X6”
}
}

Can you use external collections instead of custom actions ? Then use the filter in the list to apply the API parameters you need …

1 Like

Yeah, external collection then in the list you select the collection then can add filter queries.

@ncmarc do you happen to know how to do that when the thing you want to filter is a mandatory part of the api request and needed to save the external collection when setting it up?

No, all the API requests I have, I made myself because it’s displaying data from a MySQL database that powers a website with the same data, so I can taylor my requests exactly. If you are connecting to a 3rd party api that you don’t have control over, it might be more difficult.

1 Like

You can use external collections as alreayd suggested.

Another alternative is to use a 3rd party API integrator such as zapier, integromat or parabola to achieve this through the collections api.

Exactly my issue. During set up the queries work out and my response is what I need, but you cannot insert smart text when setting up the collection.

1 Like

Also - I’ve tried doing both custom action and custom collection. When doing a custom collection I get a list of every result I’ve ever gotten. Witch is not usable either. I need to somehow get a list of just the “rates”: [ from that specific response or be able to sort it by user and time created. Wich, I can’t figure out how to do with the query filters within my list.

@anon78309838 and @ashley this is the same issue that has cropped up several times just this week. Is there a way the dev team could add example request info in the External Collections setup like they did in the Custom Actions setup?

Agreed, I have another post here :point_down:

This issue will become recurrent if no solution is found :crossed_fingers:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.