Create an order document
POST
/orders/{order_id}/documentsAuthorization
AuthorizationBearer token (JWT) · headerrequiredPath parameters
order_idstringrequiredRequest body
requiredapplication/jsondocument_typestringrequiredAllowed:
invoicereceiptdocument_numberstringfile_urlstringtransaction_idstringAssociates the document with a specific payment/refund transaction
uploader_idstringrequireduploader_typestringrequiredResponses
201Document created
idintegerdocument_typestringAllowed:
invoicereceiptdocument_numberstringfile_urlstringRequest
curl -X POST "https://api.onbolder.com/v2/orders/string/documents" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"document_type": "invoice",
"document_number": "INV-0001",
"uploader_id": "1",
"uploader_type": "User"
}'const response = await fetch("https://api.onbolder.com/v2/orders/string/documents", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"document_type": "invoice",
"document_number": "INV-0001",
"uploader_id": "1",
"uploader_type": "User"
})
});import requests
response = requests.post(
"https://api.onbolder.com/v2/orders/string/documents",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"document_type": "invoice",
"document_number": "INV-0001",
"uploader_id": "1",
"uploader_type": "User"
},
)Response
{
"id": 0,
"document_type": "invoice",
"document_number": "string",
"file_url": "string"
}