Call to Get all layout IDs for all senders
Tuesday, April 2, 2019 at 09:14amHi,
I would like to get all the layout's ids .
When I do a GET /layouts, I only get the layouts for the admin not for all senders.
How can I list all the layouts from all senders in the account?
Thanks.
Reply to: Call to Get all layout IDs for all senders
Tuesday, April 2, 2019 at 10:04amHTTP Request GET /api/account/senders/{senderId}/apiKey HTTP Headers Accept: application/json Content-Type: application/json Authorization: Basic api_key Response Payload { "apiKey": "XXXXXXXXXXXXX==" }(3) put the sender's api key in request header and retrieve layout ids (guide here):HTTP Request GET /api/layouts?summary=true&from={fromPage}&to={toPage} HTTP Headers Accept: application/json Content-Type: application/json Authorization: Basic {sender_api_key}Just note that, * "summary=true" this parameter would hide some part of the return result and reduce the response time * this call returns you all shared layouts, so there's overlaps if you did the same call to all senders. You probably want to have a filter to the return results on "sender" node and check the owner's email with the current api key's account. I understand that it's a complex workflow, so if you told me your programming language, I can create some sample code for you. Hope this could help! Duo