Create an entry (non-idempotent)
curl --request POST \
--url https://api.invopop.com/silo/v1/entries \
--header 'Content-Type: application/json' \
--data '{
"content_type": "application/json",
"correct": "<any>",
"data": "<any>",
"folder": "<string>",
"previous_id": "347c5b04-cde2-11ed-afa1-0242ac120002"
}'
{
"attachments": [
{
"created_at": "2018-01-01T00:00:00.000Z",
"desc": "Invoice for January 2021.",
"hash": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6",
"id": "<string>",
"meta": {},
"mime": "application/pdf",
"name": "invoice.pdf",
"size": 12345,
"stored": true,
"url": "<string>"
}
],
"created_at": "2018-01-01T00:00:00.000Z",
"data": "<any>",
"digest": {
"alg": "<string>",
"val": "<string>"
},
"doc_schema": "https://gobl.org/draft-0/bill/invoice",
"draft": true,
"env_schema": "https://gobl.org/draft-0/envelope",
"folder": "sales",
"id": "347c5b04-cde2-11ed-afa1-0242ac120002",
"meta": {},
"snippet": "<any>",
"tags": [
"<string>"
],
"updated_at": "2018-01-01T00:00:00.000Z"
}
The data
field may contain either GOBL Envelope or Document, and
will be validated before being persisted.
New entries may also be created based on a previous entry using the
previous_id
field. Using a previous entry allows you to provide
patch data instead of a new full document or envelope by setting the patch type
in the content_type
field to either:
application/json-patch+json
- for JSON Patch (RFC 6902)application/merge-patch+json
- for JSON Merge Patch (RFC 7396)
The previous_id
field can also be used to make corrective documents
by adding the corrective option data in the correct
field. For more
details on this, see the GOBL documentation
for correction options.
Body
The content type of the data being uploaded.
JSON object containing the GOBL correction option data.
Data contents to upload which may either be a GOBL Envelope or Document. Any partial data will be calculated and validated automatically.
In which folder the entry should be associated, leave empty to use the automatic rules.
The UUIDv1 of the previous silo entry to copy.
Response
List of attachments for this entry.
The date and time the silo entry was created.
JSON envelope contents when specifically requested.
Schema URL for the document.
When true, indicates that the envelope is a draft.
Schema URL for the envelope.
Key for the folder where the entry is located.
The UUIDv1 (other versions not supported) of the silo entry.
JSON object containing a snippet of the document.
The date and time the silo entry was last updated.
curl --request POST \
--url https://api.invopop.com/silo/v1/entries \
--header 'Content-Type: application/json' \
--data '{
"content_type": "application/json",
"correct": "<any>",
"data": "<any>",
"folder": "<string>",
"previous_id": "347c5b04-cde2-11ed-afa1-0242ac120002"
}'
{
"attachments": [
{
"created_at": "2018-01-01T00:00:00.000Z",
"desc": "Invoice for January 2021.",
"hash": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6",
"id": "<string>",
"meta": {},
"mime": "application/pdf",
"name": "invoice.pdf",
"size": 12345,
"stored": true,
"url": "<string>"
}
],
"created_at": "2018-01-01T00:00:00.000Z",
"data": "<any>",
"digest": {
"alg": "<string>",
"val": "<string>"
},
"doc_schema": "https://gobl.org/draft-0/bill/invoice",
"draft": true,
"env_schema": "https://gobl.org/draft-0/envelope",
"folder": "sales",
"id": "347c5b04-cde2-11ed-afa1-0242ac120002",
"meta": {},
"snippet": "<any>",
"tags": [
"<string>"
],
"updated_at": "2018-01-01T00:00:00.000Z"
}