Skip to content

Receive a won deal as a contract intake

Integration API

Receive a won deal as a contract intake

POST/v1/intake/contracts

Finance reviewers, and an API key. Records a deal and, when it carries a contract file, queues its extraction and a review task; the same deal sent again returns the same intake with created false.

Headers

  • X-Tenant-Slugstring

    The workspace the request acts in.

  • X-Valtor-Advisor-Sessionstring

Request body

  • external_refstringrequired
  • source_systemstring

    Default"api"

  • company_namestringnullable
  • owner_emailstringnullable
  • stated_valueobjectnullable
    Show 2 child fields
    • amount_minorintegerrequired
    • currencystringrequired
  • deal_closed_ondatenullable
  • documentobjectnullable
    Show 4 child fields
    • filenamestringrequired
    • mime_typestringrequired
    • content_base64stringrequired
    • kindstring

      Default"signed_contract"

Response 200

  • dataobjectrequired

    The intake for the deal, with whether this call created it.

    Show 20 child fields
    • iduuidrequired

      The contract intake.

    • sourcestringrequired

      How it arrived: api, upload or crm.

    • source_systemstringrequired

      The sending system's key.

    • external_refstringrequired

      The deal's id in the sending system; unique per source system.

    • company_namestringrequirednullable

      The company the deal is with, as the sender named it.

    • owner_emailstringrequirednullable

      The deal owner's email, used only to find the member to assign.

    • stated_valueobjectrequirednullable

      The value the sender stated; null when none.

      Show 3 child fields
      • amount_minorintegerrequired

        The value the sender stated, in minor units.

      • currencystringrequired

        ISO 4217 currency of the stated value.

      • originstringrequired

        The source system that stated it. Nothing downstream reads it: a contract term is evidenced only by the contract.

    • deal_closed_onstringrequirednullable

      ISO date the deal closed in the sender's system; kept on the contract, never a term.

    • statestringrequired

      awaiting_document, plan_limit_reached (a CRM deal the plan had no room for, read once there is room), document_received, contract_created once a contract exists, or dismissed.

    • document_set_iduuidrequirednullable

      The document set holding the contract file; null while awaiting a document.

    • contract_iduuidrequirednullable

      The contract created from the document set; null until it exists.

    • extraction_statusstringrequirednullable

      Status of the newest extraction run of the document set; null before one exists.

    • task_iduuidrequirednullable

      The review task raised for the intake.

    • created_atstringrequired

      ISO timestamp the intake was received.

    • updated_atstringrequired

      ISO timestamp of its last change.

    • dismissal_reasonstringrequirednullable

      Why it was dismissed; null otherwise.

    • known_partyobjectrequirednullable

      The customer an earlier contract from the same CRM company was approved with.

      Show 2 child fields
      • iduuidrequired

        The customer.

      • namestringrequired

        The customer's display name.

    • candidate_filesarray of objectrequired

      Files a CRM deal attached when more than one could be the contract; empty unless awaiting a document.

    • unreadable_filesarray of objectrequired

      Files the CRM would not hand over, each with its reason; empty unless awaiting a document.

    • createdbooleanrequired

      True when this call created the intake, false when the deal was already known and the call was a replay.

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
409intake_conflictThe intake could not be recorded
409production_not_enabled
422intake_document_not_contractualIntake accepts the contract itself; invoices and evidence are added from the review screen
422invalid_intake_documentcontent_base64 is not valid base64
422request_validation_failedOne or more request fields are invalid