Access API Data From Parent Not In External API Looper Array

I’m looping through the invoice.documents and need to access the invoice_id within that loop using the external api looper.

How do i access the invoice_id to use in the documents looper?

{
"invoice": {
    "invoice_id": "2504429000024034480",
    "documents": [
        {
            "can_send_in_mail": true,
            "file_name": "Screenshot 2024-02-13 at 3.35.50 PM.png",
            "attachment_order": 1,
            "source": "desktop",
            "document_id": "2504429000024034527",
            "file_size": "1434518",
            "source_formatted": "Desktop",
            "uploaded_by": "Eva Chakir",
            "file_type": "png",
            "file_size_formatted": "1.4 MB",
            "uploaded_on": "13 Feb 2024 03:36 PM",
            "alter_text": "",
            "uploaded_on_date_formatted": "13 Feb 2024"
        },
        {
            "can_send_in_mail": true,
            "file_name": "Screenshot 2024-02-13 at 3.35.20 PM.png",
            "attachment_order": 2,
            "source": "desktop",
            "document_id": "2504429000024034529",
            "file_size": "2500257",
            "source_formatted": "Desktop",
            "uploaded_by": "Eva Chakir",
            "file_type": "png",
            "file_size_formatted": "2.4 MB",
            "uploaded_on": "13 Feb 2024 03:36 PM",
            "alter_text": "",
            "uploaded_on_date_formatted": "13 Feb 2024"
        }
    ]

}

}

See the guide here about “Looper Depth”. You can access it through {{dc:looper:field key="invoice_id" depth="1"}}. Let us know if that helps and have a great day.

Ah, got it! I wasn’t using depth=“1”. As always, very helpful, Charlie…

1 Like

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