Download
Generic document download. Returns the binary PDF for any OBAPI object.
- Method:
GET /obapi/v1/download/{id}
- Headers:
Authorization: Bearer {apikey}
Parameters
| Parameter |
Type |
Required |
Description |
id |
string |
yes |
Object identifier |
type |
string |
yes |
Object type (see below) |
format |
string |
no |
Output format (default: pdf) |
Supported types
| Type |
Description |
invoice |
Customer invoice |
creditnote |
Credit note |
order |
Customer order |
proposal |
Sales proposal |
shipment |
Delivery slip |
supplier-invoice |
Supplier invoice |
supplier-order |
Purchase order |
supplier-proposal |
Supplier proposal |
reception |
Goods receipt |
contract |
Service contract |
intervention |
Intervention report |
expense-report |
Expense report |
Response
- Content-Type:
application/pdf
- Content-Disposition:
attachment; filename="FA2405-2401.pdf"
- Body: binary file content
Example
curl -X GET \
-H "Authorization: Bearer abc123" \
-o FA2405-2401.pdf \
"https://provider.example.com/obapi/v1/download/2800?type=invoice"
Error
{
"error": {
"type": "not_found",
"code": "DOCUMENT_NOT_FOUND",
"message": "No document available for this object"
}
}