curl --request POST \
--url https://api.paypulse.io/v1/invoices/retail/ingest \
--header 'Authorization: Bearer <token>'
{
"message": "Retail invoices fetched successfully",
"code": 200,
"data": {
"totalEmailsFound": 5,
"byVendor": {
"dominos": 2,
"foodora": 3
},
"dateRange": {
"start": "2025/02/19",
"end": "2025/03/21"
},
"errors": []
}
}
Fetch retail invoice HTML emails from Gmail for all configured vendors and upload them to S3.
curl --request POST \
--url https://api.paypulse.io/v1/invoices/retail/ingest \
--header 'Authorization: Bearer <token>'
{
"message": "Retail invoices fetched successfully",
"code": 200,
"data": {
"totalEmailsFound": 5,
"byVendor": {
"dominos": 2,
"foodora": 3
},
"dateRange": {
"start": "2025/02/19",
"end": "2025/03/21"
},
"errors": []
}
}
Documentation Index
Fetch the complete documentation index at: https://mintlify.com/azfar-imtiaz/PayPulse-Cloud/llms.txt
Use this file to discover all available pages before exploring further.
Authorization header.
Authorization: Bearer <token>
VendorConfig table for all active vendors, then searches the user’s Gmail account for matching invoice emails within the determined date range. HTML content from matching emails is uploaded to S3. Duplicate emails (already present in S3) are skipped.
If no custom date range is provided, the search window is determined automatically:
last_retail_invoice_fetch timestamp stored on the user record.last_retail_invoice_fetch timestamp is updated.
The Gmail account must be connected before calling this endpoint. See Store Gmail tokens.
YYYY-MM-DD format. Must be provided together with end_date.YYYY-MM-DD format. Must be provided together with start_date.food-delivery, clothing, technology, subscriptions, grocery, utility, miscellaneous, travel."Retail invoices fetched successfully"200 on success.Hide properties
{"dominos": 2, "foodora": 3}.| Status | Error code | Description |
|---|---|---|
400 | MISSING_FIELDS | Only one of start_date / end_date was provided, or a required key is missing. |
400 | INVALID_JSON | The request body is not valid JSON. |
401 | INVALID_CREDENTIALS | The Authorization header is missing or the OAuth token is invalid. |
401 | TOKEN_EXPIRED | The JWT has expired. |
404 | USER_NOT_FOUND | No account exists for the user ID encoded in the token. |
502 | DEPENDENCY_FAILURE | The Gmail API returned an error. |
502 | GMAIL_TOKEN_EXPIRED | The Gmail OAuth refresh token has expired and the account must be re-connected. |
500 | INTERNAL_SERVER_ERROR | An unexpected server-side error occurred. |
{
"error": {
"code": "MISSING_FIELDS",
"message": "Both start_date and end_date must be provided for custom date range"
}
}
curl --request POST \
--url https://api.paypulse.io/v1/invoices/retail/ingest \
--header 'Authorization: Bearer <token>'
{
"message": "Retail invoices fetched successfully",
"code": 200,
"data": {
"totalEmailsFound": 5,
"byVendor": {
"dominos": 2,
"foodora": 3
},
"dateRange": {
"start": "2025/02/19",
"end": "2025/03/21"
},
"errors": []
}
}