PUT
/
silo
/
v1
/
entries
/
{id}
curl --request PUT \
  --url https://api.invopop.com/silo/v1/entries/{id} \
  --header 'Content-Type: application/json' \
  --data '{
  "allow_invalid": true,
  "content_type": "application/json",
  "correct": {
    "credit": true
  },
  "data": {},
  "folder": "<string>",
  "previous_id": "347c5b04-cde2-11ed-afa1-0242ac120002"
}'
{
  "attachments": [
    {
      "created_at": "2018-01-01T00:00:00.000Z",
      "desc": "Invoice for January 2021.",
      "entry_id": "347c5b04-cde2-11ed-afa1-0242ac120002",
      "hash": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6",
      "id": "<string>",
      "meta": {},
      "mime": "application/pdf",
      "name": "invoice.pdf",
      "size": 12345,
      "stored": true,
      "url": "<string>"
    }
  ],
  "context": "line.item",
  "created_at": "2018-01-01T00:00:00.000Z",
  "data": {},
  "digest": {
    "alg": "<string>",
    "val": "<string>"
  },
  "doc_schema": "https://gobl.org/draft-0/bill/invoice",
  "draft": true,
  "env_schema": "https://gobl.org/draft-0/envelope",
  "faults": [
    {
      "code": "<string>",
      "message": "<string>",
      "provider": "pdf"
    }
  ],
  "folder": "sales",
  "id": "347c5b04-cde2-11ed-afa1-0242ac120002",
  "invalid": true,
  "meta": [
    {
      "created_at": "2018-01-01T00:00:00.000Z",
      "entry_id": "347c5b04-cde2-11ed-afa1-0242ac120002",
      "id": "347c5b04-cde2-11ed-afa1-0242ac120002:source:key",
      "key": "service-id",
      "link_scope": "public",
      "link_url": "https://example.com/info",
      "ref": "<string>",
      "shared": true,
      "src": "source",
      "updated_at": "2018-01-01T00:00:00.000Z",
      "value": {
        "key": "value"
      }
    }
  ],
  "signed": true,
  "snippet": {
    "title": "Sample Title"
  },
  "state": "sent",
  "tags": [
    "<string>"
  ],
  "updated_at": "2018-01-01T00:00:00.000Z"
}

The data field may contain either GOBL Envelope or Object, 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 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.

Path Parameters

id
string
required

UUID of the silo entry to create.

Example:

"347c5b04-cde2-11ed-afa1-0242ac120002"

Body

application/json

Response

200 - application/json

OK

The response is of type object.