Create a new invoice
POST/invoices
Create a new invoice with required file attachment. The file must be a PDF, an image (PNG, JPEG, TIFF, WebP) or an e-invoice XML; its content is validated, not just its name.
Request
Responses
- 201
- 400
- 401
- 403
- 404
- 409
- 429
- 500
Successfully created invoice
Response Headers
URL of the created resource
Bad request - validation error, or the file is not a PDF, image or e-invoice XML (type invoice-unsupported-file)
Unauthorized
Forbidden - request denied by authorization, or blocked by the API firewall
Purchase order not found, or not one the caller may upload to
Duplicate invoice file (type invoice-duplicate-file; carries existing_invoice_code and existing_purchase_order_code), or the purchase order's status does not accept an upload (type purchase-order-not-accepting-invoices; carries allowed_states)
Too many requests - rate limited by the API firewall; wait out the Retry-After delay before retrying
Response Headers
Delay in seconds a client must wait before retrying the request
Internal server error