Batch update organization PDF templates

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://restapi.wyzio.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Wyzio MCP server": {
    "url": "https://restapi.wyzio.com/mcp"
  }
}

Close
PUT /api-v1/pdf-template/batch

Updates multiple organization PDF templates. Returns 200 on success, or 400 if any entry fails validation.

Headers

  • WEAL-TOKEN Required

    API token (can be retrieved from account settings)

  • TARGET-ORGANIZATION-ID

    ID of organization, for which the operation must be performed

application/json

Body Required

  • id integer

    Entity ID. If negative value, a new entity will be created

  • name string Required

    Template name

  • templateType string

    Template type

    Values are SALES_INVOICE, LATE_NOTICE, SALARY_SLIP, MY_SALARY_SLIP, SALES_ORDER, VAT_REPORT, DELIVERY_NOTE, or GENERAL_LEDGER.

  • countryId integer

    Country ID this template applies to. Required for certain document types by country

  • sourceTemplate object Required

    Reference to a previously uploaded source template file

    Hide sourceTemplate attribute Show sourceTemplate attribute object
    • id integer Required

      Document file ID

  • previewTemplate object

    Reference to a previously uploaded preview template file

    Hide previewTemplate attribute Show previewTemplate attribute object
    • id integer Required

      Document file ID

  • previewImage object

    Reference to a previously uploaded preview image file

    Hide previewImage attribute Show previewImage attribute object
    • id integer Required

      Document file ID

  • isActive boolean

    Whether the template is active

  • description string

    Template description

Responses

  • 200 application/json

    OK

    Hide response attribute Show response attribute object
    • items array[object]
      Hide items attributes Show items attributes object
      • errorCode object
        Hide errorCode attributes Show errorCode attributes object
        • errorCode string

          Values are NO_ERROR, NOT_IMPLEMENTED_YET, CONTACT_NOT_FOUND, FIELD_REQUIRED, VALIDATION_ERROR, DUPLICATION_ERROR, UNIQUE_CONSTRAINT_VIOLATION, WRONG_PASSWORD_FORMAT, WRONG_PASSWORD, ACTION_DENIED, NOT_FOUND, EXPECTED_ONE_FILE, UNIQUE_VIOLATION, CONTENT_EMPTY, INVALID_TYPE, CONVERSION_ERROR, FILE_PARSE_EXCEPTION, or IN_USE.

        • errorDetailValues array[object]
          Hide errorDetailValues attributes Show errorDetailValues attributes object
          • errorCode string
          • fieldName string
          • data string
          • isSevere boolean
      • freshData

        Refreshed domain data

      • freshRow

        Refreshed table row data

      • possibleWorkflows array[object]
        Hide possibleWorkflows attributes Show possibleWorkflows attributes object
        • id integer(int64)
        • name string
      • error boolean
      • severeError boolean
  • 400

    400 Bad Request

  • 401

    401 Unauthorized

  • 403

    403 Access Denied

  • 404

    404 Not Found

  • 500

    500 Internal Server Error

PUT /api-v1/pdf-template/batch
curl \
 --request PUT 'https://wyzio.app/api-v1/pdf-template/batch' \
 --header "Content-Type: application/json" \
 --data '[{"id":12345678,"name":"Invoice Template EN","templateType":"SALES_INVOICE","countryId":12345678,"sourceTemplate":{"id":12345678},"previewTemplate":{"id":12345678},"previewImage":{"id":12345678},"isActive":true,"description":"Standard English invoice layout"}]'
Request examples
# Headers

# Payload
[
  {
    "id": 12345678,
    "name": "Invoice Template EN",
    "templateType": "SALES_INVOICE",
    "countryId": 12345678,
    "sourceTemplate": {
      "id": 12345678
    },
    "previewTemplate": {
      "id": 12345678
    },
    "previewImage": {
      "id": 12345678
    },
    "isActive": true,
    "description": "Standard English invoice layout"
  }
]
Response examples (200)
{
  "items": [
    {
      "errorCode": {
        "errorCode": "NO_ERROR",
        "errorDetailValues": [
          {
            "errorCode": "string",
            "fieldName": "string",
            "data": "string",
            "isSevere": true
          }
        ]
      },
      "possibleWorkflows": [
        {
          "id": 42,
          "name": "string"
        }
      ],
      "error": true,
      "severeError": true
    }
  ]
}