Skip to main content
PUT
/
v1
/
files
/
readings
/
{file_reading_id}
Update File Reading
const options = {
  method: 'PUT',
  headers: {
    Authorization: '<authorization>',
    'x-organization-id': '<x-organization-id>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({content: {}, 'content.items': [{}]})
};

fetch('https://api.dcycle.io/v1/files/readings/{file_reading_id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));

Update File Reading

Use this endpoint to correct OCR or LLM extraction output before converting the reading into invoices or wastes.

Headers

Authorization
string
required
Bearer token or API token for the authenticated user.
x-organization-id
string
required
Organization UUID that owns the reading.

Path Parameters

file_reading_id
string
required
File reading UUID from GET /v1/files/readings.

Body

Send the full updated content.items array. The shape depends on the reading category.
content
object
required
Wrapper for the updated extracted content.
content.items
array
required
Updated parsed items. Replace the existing list with the corrected values.

Example

curl -X PUT "https://api.dcycle.io/v1/files/readings/22222222-2222-2222-2222-222222222222" \
  -H "Authorization: Bearer ${DCYCLE_API_KEY}" \
  -H "x-organization-id: ${DCYCLE_ORG_ID}" \
  -H "x-partner: dcycle" \
  -H "Content-Type: application/json" \
  -d '{
    "content": {
      "items": [
        {
          "invoice_number": "WTR-2024-03",
          "quantity": 32.1,
          "unit": "cubic_metre_(m3)",
          "start_date": "2024-03-01",
          "end_date": "2024-03-31"
        }
      ]
    }
  }'

Response

The endpoint returns the updated reading object, including:
  • id
  • status
  • content.items

Notes

  • Use this before calling POST /v1/files/readings.
  • The API does not currently publish category-specific schemas in the docs, so clients should start from the values returned by GET /v1/files/readings, modify only the needed fields, and send the full content.items array back.