POST /api-v1/journal/batch

Headers

  • WEAL-TOKEN string Required

    API token (can be retrieved from account settings)

  • TARGET-ORGANIZATION-ID integer

    ID of organization, for which the operation must be performed

application/json

Body Required

  • id integer
  • organizationId integer
  • entryId integer
  • entryDate string
  • description string Required
  • amount number
  • journalLines array[object]
    Hide journalLines attributes Show journalLines attributes object
    • id integer
    • journalEntryId integer
    • accountId integer Required
    • accountNumber integer
    • description object
      Hide description attributes Show description attributes object
      • en string
      • fr string
      • de string
      • it string
    • accountCurrencyId integer
    • accountCurrencyCode string
    • foreignCurrencyId integer
    • foreignCurrencyCode string
    • accountDebit string
    • accountCredit string
    • foreignDebit string
    • foreignCredit string
    • companyDebit string
    • companyCredit string
    • departmentId integer
    • departmentName string
    • contactId integer
    • contactName string
    • orderId integer
    • orderIdToDisplay string
    • articleId integer
    • articleIdToDisplay object
      Hide articleIdToDisplay attributes Show articleIdToDisplay attributes object
      • en string
      • fr string
      • de string
      • it string
    • vatCodes array[object]
      Hide vatCodes attributes Show vatCodes attributes object
      • id integer
      • code string
      • title object
        Hide title attributes Show title attributes object
        • en string
        • fr string
        • de string
        • it string
      • countryId integer
      • startDate string
      • endDate string
      • effectiveDate string
    • vatCodesConcatenated object
      Hide vatCodesConcatenated attributes Show vatCodesConcatenated attributes object
      • en string
      • fr string
      • de string
      • it string
    • accountName object
      Hide accountName attributes Show accountName attributes object
      • en string
      • fr string
      • de string
      • it string
    • officeId integer
    • officeName string
  • type string

    Values are OPENING, MANUAL, PURCHASE_INVOICE, SALES_INVOICE, SALARY_SLIP, STOCK, CLOSING, SYSTEM, SYSTEM_FX, SYSTEM_PFUV, or FIXED_ASSET.

  • warnings string
  • isUnmodifiable boolean

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
      • freshRow object
      • freshData object
      • possibleWorkflows array[object]
        Hide possibleWorkflows attributes Show possibleWorkflows attributes object
        • id integer
        • 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

POST /api-v1/journal/batch
curl \
 --request POST 'https://wyzio.app/api-v1/journal/batch' \
 --header "Content-Type: application/json" \
 --header "WEAL-TOKEN: string" \
 --header "TARGET-ORGANIZATION-ID: 42" \
 --data '[{"id":42,"organizationId":42,"entryId":42,"entryDate":"string","description":"string","amount":42.0,"journalLines":[{"id":42,"journalEntryId":42,"accountId":42,"accountNumber":42,"description":{"en":"string","fr":"string","de":"string","it":"string"},"accountCurrencyId":42,"accountCurrencyCode":"string","foreignCurrencyId":42,"foreignCurrencyCode":"string","accountDebit":"string","accountCredit":"string","foreignDebit":"string","foreignCredit":"string","companyDebit":"string","companyCredit":"string","departmentId":42,"departmentName":"string","contactId":42,"contactName":"string","orderId":42,"orderIdToDisplay":"string","articleId":42,"articleIdToDisplay":{"en":"string","fr":"string","de":"string","it":"string"},"vatCodes":[{"id":42,"code":"string","title":{"en":"string","fr":"string","de":"string","it":"string"},"countryId":42,"startDate":"string","endDate":"string","effectiveDate":"string"}],"vatCodesConcatenated":{"en":"string","fr":"string","de":"string","it":"string"},"accountName":{"en":"string","fr":"string","de":"string","it":"string"},"officeId":42,"officeName":"string"}],"type":"OPENING","warnings":"string","isUnmodifiable":true}]'
Request examples
# Headers
WEAL-TOKEN: string
TARGET-ORGANIZATION-ID: 42

# Payload
[
  {
    "id": 42,
    "organizationId": 42,
    "entryId": 42,
    "entryDate": "string",
    "description": "string",
    "amount": 42.0,
    "journalLines": [
      {
        "id": 42,
        "journalEntryId": 42,
        "accountId": 42,
        "accountNumber": 42,
        "description": {
          "en": "string",
          "fr": "string",
          "de": "string",
          "it": "string"
        },
        "accountCurrencyId": 42,
        "accountCurrencyCode": "string",
        "foreignCurrencyId": 42,
        "foreignCurrencyCode": "string",
        "accountDebit": "string",
        "accountCredit": "string",
        "foreignDebit": "string",
        "foreignCredit": "string",
        "companyDebit": "string",
        "companyCredit": "string",
        "departmentId": 42,
        "departmentName": "string",
        "contactId": 42,
        "contactName": "string",
        "orderId": 42,
        "orderIdToDisplay": "string",
        "articleId": 42,
        "articleIdToDisplay": {
          "en": "string",
          "fr": "string",
          "de": "string",
          "it": "string"
        },
        "vatCodes": [
          {
            "id": 42,
            "code": "string",
            "title": {
              "en": "string",
              "fr": "string",
              "de": "string",
              "it": "string"
            },
            "countryId": 42,
            "startDate": "string",
            "endDate": "string",
            "effectiveDate": "string"
          }
        ],
        "vatCodesConcatenated": {
          "en": "string",
          "fr": "string",
          "de": "string",
          "it": "string"
        },
        "accountName": {
          "en": "string",
          "fr": "string",
          "de": "string",
          "it": "string"
        },
        "officeId": 42,
        "officeName": "string"
      }
    ],
    "type": "OPENING",
    "warnings": "string",
    "isUnmodifiable": true
  }
]
Response examples (200)
{
  "items": [
    {
      "errorCode": {
        "errorCode": "NO_ERROR",
        "errorDetailValues": [
          {
            "errorCode": "string",
            "fieldName": "string",
            "data": "string",
            "isSevere": true
          }
        ]
      },
      "freshRow": {},
      "freshData": {},
      "possibleWorkflows": [
        {
          "id": 42,
          "name": "string"
        }
      ],
      "error": true,
      "severeError": true
    }
  ]
}