Receipt Upload API
Use this endpoint to submit a receipt image for a logged-in or known customer.
The upload creates a receipt submission in Rivo. The receipt still follows your normal receipt scanning and approval workflow, so a successful upload does not award points immediately.
This endpoint uses storefront API access, not a Merchant REST API key. If you need storefront API credentials for a headless or custom storefront build, contact your Rivo account manager.
Before You Begin
Make sure receipt scanning is enabled for your store.
Create an active receipt-based way to earn in your points program.
Have the Shopify customer ID for the customer submitting the receipt.
Have storefront API access if you are calling this endpoint outside Rivo’s built-in storefront experience.
Endpoint
POST /api/customers/loggedin/upload_receipt
Use loggedin in the path when submitting with storefront API access. Pass the Shopify customer ID with logged_in_customer_id.
Query Parameters
shop: Your Shopify myshopify.com domain.logged_in_customer_id: The Shopify customer ID for the customer submitting the receipt.
Headers
Authorization: Bearer {storefront_api_token}Content-Type: multipart/form-data
Your HTTP client usually sets this automatically when you send form data.
Body
Send the receipt image as multipart form data:
Field | Required | Description |
| Yes | The receipt image file to upload. |
Example Request
curl --request POST \ --url "https://loyalty-api.rivo.io/api/customers/loggedin/upload_receipt?shop=example.myshopify.com&logged_in_customer_id=7855248179442" \ --header "Authorization: Bearer your_storefront_api_token" \ --form "file=@/path/to/receipt.jpg"
Success Response
On success, the API returns 200 OK:
{ "success": true }This means the receipt was submitted for scanning and review. Points are awarded only after the receipt is approved and matches an active receipt earning rule.
Error Responses
Status | Response | When it happens |
|
| The storefront API token is missing, invalid, or not enabled for the store. |
| Forbidden response | The storefront request is not authorized for the store. |
|
| The customer ID is missing or does not resolve to a customer. |
|
| The receipt could not be saved, such as when the image is missing or invalid. |
Notes
The endpoint accepts image uploads only.
Rivo optimizes the submitted image before saving it for receipt scanning.
The response does not include the receipt submission ID.
Automatic approval depends on your receipt scanning settings. If automatic approval is off, or if the receipt needs review, it remains pending until your team approves or rejects it.
Frequency limits on your receipt way to earn control whether points are awarded after approval. They do not prevent receipt uploads.
