Invoice Creation API
Invoice APIs
Invoice Creation API
Create invoices by uploading invoice files (PDF or images) for processing
Invoice Creation API
Documentation Index
Fetch the complete documentation index at: https://docs.pazy.io/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
All requests require an API key in the request headers. Headers:Request
Content-Type:multipart/form-data
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
file | File | Yes | The invoice file to upload. Supported formats: PDF, JPEG, JPG, PNG |
remarks | String or Object | No | Optional remarks/notes for the invoice. Can be provided as a string value directly, or as an object with a value property containing the remarks string |
File Requirements
- Maximum file size: 50 MB
- Supported formats: PDF (application/pdf), JPEG (image/jpeg), JPG (image/jpg), PNG (image/png)
- The file should contain a readable invoice document
Code Examples
Success Response
HTTP Status:200 OK
Response Fields:
| Field | Type | Description |
|---|---|---|
ok | boolean | Indicates whether the request was successful |
data | object | Contains the invoice creation response data |
data.id | string | Unique identifier for the invoice. Use this ID to retrieve invoice details later |
data.status | string | Current processing status. Possible values: PROCESSING, QUEUED |
data.processingId | string | Identifier for the processing job. Used for tracking invoice processing status |
data.isReady | boolean | Indicates whether the invoice is ready for use. Initially false as the invoice is being processed |
Response Example
Status Values
- PROCESSING: The invoice is currently being processed and parsed
- QUEUED: The invoice has been queued for processing
After successful upload, the invoice will be processed asynchronously. Use the returned
id to check the invoice status and retrieve details once processing is complete.Error Responses
Missing File
HTTP Status:400 Bad Request
Invalid File Type
HTTP Status:400 Bad Request
File Too Large
HTTP Status:413 Payload Too Large (or 400 Bad Request)
Authentication Errors
HTTP Status:401 Unauthorized
Permission Errors
HTTP Status:403 Forbidden
Processing Errors
HTTP Status:500 Internal Server Error
Best Practices
File Uploads
- Verify file size before upload (max 50 MB)
- Ensure file format is supported (PDF, JPEG, JPG, PNG)
- Use appropriate MIME types when setting Content-Type headers
- Handle upload errors gracefully with retry logic
Invoice Processing
- Store the returned
idfor future reference - Poll the invoice status using the invoice detail endpoint
- Wait for
isReadyto becometruebefore using the invoice data - The
statusfield will indicate if the invoice is still being processed