data property containing the GOBL JSON of either a pre-built [Envelope](https://docs.gobl.org/draft-0/envelope) or a partial document like an [Invoice](https://docs.gobl.org/draft-0/bill/invoice) or [Party](https://docs.gobl.org/draft-0/org/party).
Use the `key` property to ensure idempotency. If the same key is used in the same workspace in another silo entry, the request will be rejected with `409 Conflict`. Note that idempotency using this method is intended for repeat requests whereby the system has had the opportunity to persist the first, we recommend using the [put](/api-ref/silo/entries/create-an-entry-put) method in concurrent scenarios.
```json Invoice Payload Example theme={"system"}
{
"key": "invoice-DEMO-001",
"data": {
"$schema": "https://gobl.org/draft-0/bill/invoice",
"series": "DEMO",
"code": "001",
"currency": "USD",
"supplier": {
"name": "Provide One Inc.",
"tax_id": {
"country": "US"
},
"addresses": [
{
"num": "16",
"street": "Jessie Street",
"locality": "San Francisco",
"region": "CA",
"code": "94105",
"country": "US"
}
],
"emails": [
{
"addr": "billing@provideone.com"
}
]
},
"customer": {
"name": "Sample Consumer",
"emails": [
{
"addr": "email@sample.com"
}
]
},
"lines": [
{
"quantity": "20",
"item": {
"name": "Development services",
"price": "90.00",
"unit": "h"
},
"discounts": [
{
"percent": "10%",
"reason": "Special discount"
}
],
"taxes": [
{
"cat": "ST",
"percent": "8.5%"
}
]
}
]
}
}
```
Any data uploaded to the Invopop Silo will first be normalized, calculated, and then validated to check for any errors.
Invopop will attempt to automatically determine the folder in which to store the document based on the schema, but you can override this by including the folder field in the request.
If there are any validation issues with the uploaded data, the service will respond with an error message including a `key` and `message`. Additionally, the `fields` property may include a nested structure to help identify the specific property with a validation fault.
## Creating Entries from Previous Documents
You can create new entries based on a previous entry by using the previous\_id field. This allows you to provide patch data instead of a full new document by setting the patch type in the content\_type field to one of the following:
* application/json-patch+json - for JSON Patch (RFC 6902)
* application/merge-patch+json - for JSON Merge Patch (RFC 7396)
Additionally, the previous\_id field can be used to create corrective documents by including corrective option data in the correct field. For more details, refer to the GOBL documentation on correction options.
# Create an entry with ID
Source: https://docs.invopop.com/api-ref/silo/entries/create-an-entry-put
PUT /silo/v1/entries/{id}
Create a new silo entry with the given UUID.
## New Documents
The fastest way to upload data to Invopop is by creating an entry with the data property containing the GOBL JSON of either a pre-built [Envelope](https://docs.gobl.org/draft-0/envelope) or a partial document like an [Invoice](https://docs.gobl.org/draft-0/bill/invoice) or [Party](https://docs.gobl.org/draft-0/org/party).
The `key` property can be used to ensure idempotency, preventing the creation of duplicate entries with the same key within the workspace.
A `409 Conflict` response will be provided if either the entry ID or key have been used in an existing document.
```json Invoice Body Example theme={"system"}
{
"data": {
"$schema": "https://gobl.org/draft-0/bill/invoice",
"series": "DEMO",
"code": "001",
"currency": "USD",
"supplier": {
"name": "Provide One Inc.",
"tax_id": {
"country": "US"
},
"addresses": [
{
"num": "16",
"street": "Jessie Street",
"locality": "San Francisco",
"region": "CA",
"code": "94105",
"country": "US"
}
],
"emails": [
{
"addr": "billing@provideone.com"
}
]
},
"customer": {
"name": "Sample Consumer",
"emails": [
{
"addr": "email@sample.com"
}
]
},
"lines": [
{
"quantity": "20",
"item": {
"name": "Development services",
"price": "90.00",
"unit": "h"
},
"discounts": [
{
"percent": "10%",
"reason": "Special discount"
}
],
"taxes": [
{
"cat": "ST",
"percent": "8.5%"
}
]
}
]
}
}
```
Any data uploaded to the Invopop Silo will first be normalized, calculated, and then validated to check for any errors.
Invopop will attempt to automatically determine the folder in which to store the document based on the schema, but you can override this by including the folder field in the request.
If there are any validation issues with the uploaded data, the service will respond with an error message including a `key` and `message`. Additionally, the `fields` property may include a nested structure to help identify the specific property with a validation fault.
previous\_id field. This allows you to provide patch data instead of a full new document by setting the patch type in the content\_type field to one of the following:
* application/json-patch+json - for JSON Patch (RFC 6902)
* application/merge-patch+json - for JSON Merge Patch (RFC 7396)
Additionally, the previous\_id field can be used to create corrective documents by including corrective option data in the correct field. For more details, refer to the GOBL documentation on correction options.
# Fetch all entries
Source: https://docs.invopop.com/api-ref/silo/entries/fetch-all-entries
GET /silo/v1/entries
Fetch all the silo entries in the current workspace.
# Fetch an entry
Source: https://docs.invopop.com/api-ref/silo/entries/fetch-an-entry
GET /silo/v1/entries/{id}
Fetch an existing silo entry given its UUID.
# Fetch an entry by key
Source: https://docs.invopop.com/api-ref/silo/entries/fetch-an-entry-by-key
GET /silo/v1/entries/key/{key}
Fetch an existing silo entry by its key.
# Fetch an entry version
Source: https://docs.invopop.com/api-ref/silo/entries/fetch-entry-version
GET /silo/v1/entries/{id}/versions/{version}
Retrieve the GOBL envelope data stored for a specific version of a Silo entry.
Use the `version` value returned in an entry's `version` or `versions` fields to retrieve that exact historical envelope. The response contains only the requested version identifier and its GOBL envelope data; other entry metadata remains available from the standard [fetch entry](/api-ref/silo/entries/fetch-an-entry) endpoint.
# Fetch a file
Source: https://docs.invopop.com/api-ref/silo/entries/files-fetch
GET /silo/v1/entries/{entry_id}/files/{id}
Download silo entry file's data. Content type and disposition will be set according to the source.
# Create a file without UUID
Source: https://docs.invopop.com/api-ref/silo/entries/files-post
POST /silo/v1/entries/{entry_id}/files
Add a new file to a silo entry without an explicit UUID. The file data can be provided inline as base64 encoded data, or omitted to create a placeholder. When data is not provided, you must provide sha256, size, and mime fields, and the response will include a `url` field that can be used to stream/upload the file contents directly via a PUT request to that URL. For non-enrolled users, only the `format` and `attachment` categories are allowed.
# Create a file with ID
Source: https://docs.invopop.com/api-ref/silo/entries/files-put
PUT /silo/v1/entries/{entry_id}/files/{id}
Add a new file to a silo entry with a specific UUID. The file data can be provided inline as base64 encoded data, or omitted to create a placeholder. When data is not provided, you must provide sha256, size, and mime fields, and the response will include a `url` field that can be used to stream/upload the file contents directly via a PUT request to that URL. For non-enrolled users, only the `format` and `attachment` categories are allowed.
# Find related entries
Source: https://docs.invopop.com/api-ref/silo/entries/find-related
GET /silo/v1/entries/{id}/related
Find silo entries whose document mentions the given entry's UUID.
# Search entries
Source: https://docs.invopop.com/api-ref/silo/entries/search-entries
GET /silo/v1/search
Perform a free-text search on all documents in the current workspace.
# Update an entry
Source: https://docs.invopop.com/api-ref/silo/entries/update-an-entry
PATCH /silo/v1/entries/{id}
Update an existing silo entry given its UUID.
# Build GOBL document
Source: https://docs.invopop.com/api-ref/silo/gobl/build
POST /silo/v1/gobl/build
Build GOBL Envelopes or Objects for validation purposes
# Correct GOBL envelope
Source: https://docs.invopop.com/api-ref/silo/gobl/correct
POST /silo/v1/gobl/correct
Correct or determine the correction options for a GOBL Envelope (not Object!)
Use this endpoint to help determine the options for correcting [GOBL](https://docs.gobl.org) documents and then perform the correction itself.
This is useful when you need to issue credit notes or corrective versions of a previously issued invoice and need clarity on the local options.
All requests to the endpoint require a **[GOBL Envelope](https://docs.gobl.org/draft-0/envelope)**, and cannot be used with a [GOBL Invoice](https://docs.gobl.org/draft-0/bill/invoice) or other GOBL object. This is because some tax regimes require specific details from the previous document's headers, like a special identification code.
Use the `show_options` flag to return a JSON Schema of the options that can be used with the provided document.
Once the options are clear, send in a new request with the `options` data to get an example corrected [GOBL Envelope](https://docs.gobl.org/draft-0/envelope). The same options data can be used with the [silo create entry endpoint](/api-ref/silo/entries/create-an-entry-post) and the `correct` property.
# Sign GOBL document
Source: https://docs.invopop.com/api-ref/silo/gobl/sign
POST /silo/v1/gobl/sign
Sign GOBL Envelopes or Objects
# Delete a file
Source: https://docs.invopop.com/api-ref/silo/spool/delete
DELETE /silo/v1/spool/{key}
Delete a previously uploaded entry from the spool.
# Download a file
Source: https://docs.invopop.com/api-ref/silo/spool/download
GET /silo/v1/spool/{key}
Download a previously uploaded entry from the spool.
# Upload a file
Source: https://docs.invopop.com/api-ref/silo/spool/upload
POST /silo/v1/spool
Upload temporary file data to the silo spool. Requires 'enrolled' scope.
The Silo Spool service can be used by **Applications** as a temporary file store. This can be useful for example when processing documents that need additional processing before being added to a Silo Entry as an attachment.
Additionally, the Silo Spool will be used in the Transform Jobs API when uploading files as data URIs.
# Create a job without a UUID
Source: https://docs.invopop.com/api-ref/transform/jobs/create-a-job-post
POST /transform/v1/jobs
Create a new job without an explicit ID.
Use this endpoint to execute a workflow, allowing the backend to assign the UUID.
This request will not be idempotent unless a `key` is provided. Keys are checked for uniqueness within the current workspace and are valid for up to 2 years. Note that the [put](/api-ref/transform/jobs/create-a-job-put) request is recommended for high concurrency scenarios.
To execute a job, provide one of the following fields:
* `silo_entry_id` - preferred, the UUID of the silo entry to process with the workflow.
* `data` - raw GOBL data of the job, which will be persisted to the silo before processing.
* `args` - a data object containing application-specific data used in the workflow's initial actions to prepare and upload a silo entry.
The `wait` query parameter can cause the server to block the incoming HTTP request and wait for up to the specified number of seconds. Typically, a workflow executes in under a second, but some actions may take longer. We recommend using the `wait` query parameter only in sandbox or testing environments, as workflows can sometimes exceed expected duration due to network failures or other temporary issues.
Arguments (`args`) are composed of string key-value pairs tailored to specific applications. Binary data can be included using Data URIs (`data:`), which must specify the content type and include a `name` parameter. For example: `data:text/plain;name=example.txt;base64,ZGF0YQ==`. Any data provided via this method will be automatically uploaded to the Silo Spool service and will remain accessible only through tokens issued for the corresponding workspace.
# Create a job with a UUID
Source: https://docs.invopop.com/api-ref/transform/jobs/create-a-job-put
PUT /transform/v1/jobs/{id}
Create a new job with the given ID.
Use this endpoint to execute a workflow with a specific time-based UUID, v7 or v1.
If the `key` property is provided, it will be checked for uniqueness within the current workspace and is valid for up to 2 years.
To execute a job, provide one of the following fields:
* `silo_entry_id` - preferred, the UUID of the silo entry to process with the workflow.
* `data` - raw GOBL data of the job, which will be persisted to the silo before processing.
* `args` - a data object containing application-specific data used in the workflow's initial actions to prepare and upload a silo entry.
The `wait` query parameter can cause the server to block the incoming HTTP request and wait for up to the specified number of seconds. Typically, a workflow executes in under a second, but some actions may take longer. We recommend using the `wait` query parameter only in sandbox or testing environments, as workflows can sometimes exceed expected durations due to network failures or other temporary issues.
Arguments (`args`) are composed of string key-value pairs tailored to specific applications. Binary data can be included using Data URIs (`data:`), which must specify the content type and include a `name` parameter. For example: `data:text/plain;name=example.txt;base64,ZGF0YQ==`. Any data provided via this method will be automatically uploaded to the Silo Spool service and will remain accessible only through tokens issued for the corresponding workspace.
# Fetch a job
Source: https://docs.invopop.com/api-ref/transform/jobs/fetch-a-job
GET /transform/v1/jobs/{id}
Fetch an existing job by ID.
# Fetch a job by key
Source: https://docs.invopop.com/api-ref/transform/jobs/fetch-a-job-by-key
GET /transform/v1/jobs/key/{key}
Fetch an existing job by a recent key.
# Fetch all jobs
Source: https://docs.invopop.com/api-ref/transform/jobs/fetch-all-jobs
GET /transform/v1/jobs
Fetch all jobs in the current workspace.