Response types Zapier expects
With every API call, Zapier expects the response data to be returned in a specific response type. This can vary depending on what part of your integration you’re working on. Use the table below to identify the correct response type to use
Method | Response type | Notes |
---|---|---|
Authentication | Object | Single JSON-formatted object with any specific fields for auth scheme. |
Authentication testing | Object | Object |
Trigger | Array | JSON-formatted array with the results in reverse chronological order. Results are parsed and passed through deduplication. Empty arrays will not trigger. |
Create action | Object | Individual fields within object are parsed for mapping into subsequent Zap steps. |
Search action | Array | JSON-formatted array sorted with the best match first, but don’t limit to a single result or group them as one. For no match found, return a 200 with an empty array. |
Note:
- If your app’s API call does not return a response, Zapier will show a timeout error.
- If you use line items in your integration, note that not all Zapier integrations support line items. Use the recommended response type in the table to reduce users possibility of needing to reformat this data to use in their Zaps. Learn more on how line items work in Zaps.
Return related data as line items
Line items are used to present multiple items associated with a single transaction, such as an order or an invoice. To return line items in the data for your users in actions, you’ll need to return the multiple items you want to show as an array of objects under a descriptive key.
For example, a Create Order action returning an order with multiple items might look like this:
Return multiple items as search results
Do not use line items to group search results. Although Zaps only use the first result by default, users can decide to group all results as line items. Other products, like Agents, will always use all results. Do not group multiple results into line items — let products and users control that instead.
Need help? Tell us about your problem and we’ll connect you with the right resource or contact support.