Skip to content

Push a usage figure

Integration API

Push a usage figure

POST/v1/intake/usage

Finance reviewers, delivery staff and integration keys. Stages a figure from another system for review; only finance accepts it and nothing here bills.

Headers

  • Idempotency-Keystring

    A unique value per intended change, such as a UUID. Sending the same key again replays the first answer instead of acting twice.

  • X-Tenant-Slugstring

    The workspace the request acts in.

  • X-Valtor-Advisor-Sessionstring

Request body

  • obligation_iduuidnullable
  • charge_rule_iduuidnullable
  • perioddatenullable
  • valuenumber or stringrequired
  • unitstringnullable
  • source_systemstringrequired
  • source_refstringrequired
  • notestringnullable

Response 201

  • dataobjectrequired

    The pushed figure, staged for review.

    Show 4 child fields
    • import_idstringrequired

      The import batch holding the figure.

    • idstringrequired

      The actual created.

    • obligation_idstringrequired

      The obligation the figure was matched to.

    • statestringrequired

      Always review_required: only finance accepts it.

Errors

Every error has the same shape: an error object with a stable code and a message for people. 403 is a missing role, 404 a row this workspace does not hold, 409 a state conflict, 422 a broken business rule. A missing or invalid token answers 401 on every signed-in route.

StatusCodeMeaning
404usage_obligation_not_foundNo open usage charge matches; list them at /v1/intake/usage/obligations
409actual_already_acceptedThis charge already has an accepted figure; a correction is made in Valtor
409actual_already_awaiting_reviewA figure for this charge is already waiting for review
422request_validation_failedOne or more request fields are invalid