> ## Documentation Index
> Fetch the complete documentation index at: https://invopop-fi-party-endpoints.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a job with a UUID

> 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.

Without `wait`, the response is `202 Accepted` with the job's initial state (`status: "NA"` and no intents yet); poll [fetch a job](/api-ref/transform/jobs/fetch-a-job) until `completed_at` is set, or better, add a [webhook](/guides/webhooks) step to the workflow. The `wait` query parameter can cause the server to block the incoming HTTP request and wait for up to the specified number of seconds. If the job completes within that time the response is `200 OK` with the finished job, including its `intents`, `faults` and `attachments`; otherwise the `202` response is returned as usual. 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.


## OpenAPI

````yaml PUT /transform/v1/jobs/{id}
openapi: 3.0.0
info:
  contact:
    email: dev@invopop.com
    name: Invopop Developers
  description: >-
    The Invopop Transform Service API offers endpoints to manage tasks and
    workflows with the primary objective being to send requests for jobs.
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  title: Transform Service API
  version: 1.0.1
servers:
  - description: production
    url: https://api.invopop.com
security:
  - authToken: []
paths:
  /transform/v1/jobs/{id}:
    put:
      description: Create a new job with the given ID.
      parameters:
        - description: >-
            Only for testing. Maximum number of seconds to block the http
            request waiting for the job to complete. When the job finishes
            within this time the response is 200 OK with the complete job;
            otherwise 202 Accepted is returned with the job's initial state. Do
            not use this in production.
          in: query
          name: wait
          schema:
            description: >-
              Only for testing. Maximum number of seconds to block the http
              request waiting for the job to complete. When the job finishes
              within this time the response is 200 OK with the complete job;
              otherwise 202 Accepted is returned with the job's initial state.
              Do not use this in production.
            example: 60
            title: Wait
            type: integer
        - description: ID of the job to create.
          in: path
          name: id
          required: true
          schema:
            description: ID of the job to create.
            example: 5b45453c-cdd0-11ed-afa1-0242ac120002
            format: uuid
            title: ID
            type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                args:
                  description: >-
                    Additional arguments that may be used by workflow actions.
                    Binary data may be provided inside a Data URI, including the
                    'name' parameter.
                  title: Args
                  type: object
                data:
                  description: >-
                    Raw JSON data of the GOBL Envelope or Object when the Silo
                    Entry ID is empty.
                  title: Data
                  type: object
                key:
                  description: Key to associate with the job for idempotency.
                  title: Key
                  type: string
                silo_entry_id:
                  description: >-
                    ID for the entry in the silo as an alternative for the raw
                    data object.
                  title: Silo Entry ID
                  type: string
                tags:
                  description: Tags to associate with the job.
                  items:
                    type: string
                  title: Tags
                  type: array
                workflow_id:
                  description: UUID of the workflow to execute for this job.
                  title: Workflow ID
                  type: string
              required:
                - workflow_id
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransformJob'
          description: >-
            OK. Returned only when the wait parameter was provided and the job
            completed in time; the body is the finished job with its intents,
            faults and attachments.
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransformJob'
          description: >-
            Accepted. The job has been queued; the body holds its initial state
            with status "NA" and no intents yet.
components:
  schemas:
    TransformJob:
      properties:
        args:
          additionalProperties:
            type: string
          description: Any additional arguments that might be used by workflow actions.
          title: Args
          type: object
        attachments:
          description: >-
            Any files that have been generated while processing the job in the
            workflow will be here.
          items:
            $ref: '#/components/schemas/TransformFile'
          title: Attachments
          type: array
        completed_at:
          description: When this job was completed, will be nil if still ongoing.
          title: Completed At
          type: string
        created_at:
          description: When the job was created.
          title: Created At
          type: string
        envelope:
          description: Raw JSON data of the complete GOBL Envelope.
          title: GOBL Envelope
          type: object
        faults:
          description: >-
            Array of fault objects that represent errors that occurred during
            the processing of the job.
          items:
            $ref: '#/components/schemas/TransformFault'
          title: Faults
          type: array
        id:
          description: The UUID v7 or v1 of the job
          example: 5b45453c-cdd0-11ed-afa1-0242ac120002
          title: ID
          type: string
        intents:
          description: >-
            Array of intent objects following the execution of each of the steps
            of the associated workflow.
          items:
            $ref: '#/components/schemas/TransformIntent'
          title: Intents
          type: array
        key:
          description: Key assigned to the job, used to identify it in the system.
          title: Key
          type: string
        silo_entry_id:
          example: 75fa764a-cdd0-11ed-afa1-0242ac120002
          title: Silo Entry ID
          type: string
        status:
          description: Last known status text for this job.
          title: Status
          type: string
        tags:
          description: Any tags that may be useful to be associated with the job.
          items:
            type: string
          title: Tags
          type: array
        updated_at:
          description: When the job was last updated.
          title: Updated At
          type: string
        workflow_id:
          example: 186522a6-e697-4e34-8498-eee961bcb845
          title: Workflow ID
          type: string
      type: object
    TransformFile:
      properties:
        category:
          description: Category of the file
          example: version
          title: Category
          type: string
        desc:
          description: Description of the file
          example: My file description.
          title: Description
          type: string
        hash:
          description: SHA256 hash of the file
          example: ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
          title: Hash
          type: string
        id:
          description: UUID for the file inside the entry
          example: b564ff94-7823-4f54-975e-280feb38df3f
          title: ID
          type: string
        key:
          description: Short identifier for the file.
          example: pdf
          title: Key
          type: string
        meta:
          additionalProperties:
            type: string
          description: Any additional data that might be relevant.
          title: Meta
          type: object
        mime:
          description: MIME type of the file
          example: application/pdf
          title: MIME
          type: string
        name:
          description: Name of the file
          example: my-file.pdf
          title: Name
          type: string
        size:
          description: Size of the file in bytes
          example: 12345
          title: Size
          type: integer
        url:
          description: Public URL where the file can be downloaded.
          title: URL
          type: string
      type: object
    TransformFault:
      properties:
        code:
          description: >-
            Code assigned by the provider that may provide additional
            information about the fault.
          title: Code
          type: string
        message:
          description: >-
            Message assigned by the provider that may provide additional
            information about the fault.
          title: Message
          type: string
        provider:
          description: ID of the provider that generated the fault.
          example: pdf
          title: Provider
          type: string
      type: object
    TransformIntent:
      properties:
        completed:
          description: When true, this intent has completed.
          title: Completed
          type: boolean
        created_at:
          description: When the intent was created.
          title: Created At
          type: string
        events:
          description: Array of event objects tracking the execution of the intent.
          items:
            $ref: '#/components/schemas/TransformEvent'
          title: Events
          type: array
        id:
          description: UUIDv4 for the Intent
          example: b564ff94-7823-4f54-975e-280feb38df3f
          title: ID
          type: string
        name:
          description: Name of the executed workflow step
          example: PDF Generation
          title: Name
          type: string
        provider:
          description: ID of the provider to use
          example: pdf
          title: Provider
          type: string
        step_id:
          description: ID of the step to use
          example: 8d49556b-ff63-477b-9cd3-32c986c1c77b
          title: Step ID
          type: string
        updated_at:
          description: When the intent was last updated.
          title: Updated At
          type: string
      type: object
    TransformEvent:
      properties:
        args:
          additionalProperties:
            type: string
          description: >-
            Map of additional arguments that will be included in embedded
            actions.
          title: Arguments
          type: object
        at:
          description: When the event was created.
          example: '2021-09-15T15:04:05.999Z'
          title: At
          type: string
        code:
          description: >-
            Code assigned by the provider that may provide additional
            information about the event.
          title: Code
          type: string
        index:
          description: Index of the event in the intent.
          example: 0
          title: Index
          type: integer
        message:
          description: >-
            Message assigned by the provider that may provide additional
            information about the event, especially errors.
          title: Message
          type: string
        silo_entry_id:
          description: ID of the entry in the silo that was created by this event.
          title: Silo Entry ID
          type: string
        status:
          description: Status of the event.
          example: ERR
          title: Status
          type: string
      type: object
  securitySchemes:
    authToken:
      bearerFormat: JWT
      description: >-
        Use the `Bearer` scheme with a valid JWT token to authenticate requests.
        Example: `Authorization: Bearer <token>`
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.