German: "Ausgaben – Entwürfe"
The purchase draft representation is:
{
"id": 123,
"title": "Ticket",
"email_from": "[email protected]",
"email_body": "here the ticket",
"user": {
"id": 933590696,
"firstname": "John",
"lastname": "Doe"
},
"created_at": "2021-10-17T09:33:46Z",
"updated_at": "2021-10-17T09:33:46Z"
}
Retrieve all drafts:
curl -X GET \
'https://{domain}.mocoapp.com/api/v1/purchases/drafts' \
-H 'Authorization: Token token=YOUR_API_KEY'
This returns an array with complete draft information (see attributes).
Retrieve a single draft:
curl -X GET \
'https://{domain}.mocoapp.com/api/v1/purchases/drafts/{id}' \
-H 'Authorization: Token token=YOUR_API_KEY'
The response is a single draft representation.
Retrieve the draft document:
curl -X GET \
'https://{domain}.mocoapp.com/api/v1/purchases/drafts/{id}.pdf' \
-H 'Authorization: Token token=YOUR_API_KEY'
This returns this draft's document if it's a PDF. Otherwise it responds with 204 No Content.