weclapp Sales Invoice API

Sales invoices.

OpenAPI Specification

weclapp-sales-invoice-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: weclapp REST Article Sales Invoice API
  description: 'weclapp is a German cloud ERP / CRM / commerce platform. Its REST API (v1) is exposed per tenant at https://{tenant}.weclapp.com/webapp/api/v1 and covers the platform''s business entities - parties (customers, suppliers, contacts, leads), articles, sales orders, quotations, sales invoices, shipments, purchase orders, warehouses, and more (150+ entities in the full Swagger). Every entity follows the same CRUD conventions: list at `/{entity}`, count at `/{entity}/count`, fetch one at `/{entity}/id/{id}`, create with `POST /{entity}`, update with `PUT /{entity}/id/{id}`, and delete with `DELETE /{entity}/id/{id}`. Authentication is an API token sent in the `AuthenticationToken` request header. This document models a grounded, representative subset of the documented v1 entities; the request/response field schemas are modeled from documented field names rather than copied from weclapp''s live Swagger, so property lists are illustrative and not exhaustive. Consult the live per-tenant Swagger at https://<tenant>.weclapp.com/webapp/api/v1/ (or https://www.weclapp.com/api/) for the authoritative schema.'
  version: v1
  contact:
    name: weclapp
    url: https://www.weclapp.com/api/
servers:
- url: https://{tenant}.weclapp.com/webapp/api/v1
  description: Per-tenant weclapp REST API (v1). Replace {tenant} with your weclapp subdomain.
  variables:
    tenant:
      default: your-tenant
      description: Your weclapp tenant subdomain (for example, the "acme" in acme.weclapp.com).
security:
- authenticationToken: []
tags:
- name: Sales Invoice
  description: Sales invoices.
paths:
  /salesInvoice:
    get:
      operationId: getSalesInvoices
      tags:
      - Sales Invoice
      summary: List sales invoices
      parameters:
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/Sort'
      - $ref: '#/components/parameters/Properties'
      - $ref: '#/components/parameters/AdditionalProperties'
      responses:
        '200':
          description: A page of sales invoices.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SalesInvoiceList'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createSalesInvoice
      tags:
      - Sales Invoice
      summary: Create a sales invoice
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SalesInvoice'
      responses:
        '201':
          description: The created sales invoice.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SalesInvoice'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /salesInvoice/count:
    get:
      operationId: countSalesInvoices
      tags:
      - Sales Invoice
      summary: Count sales invoices
      responses:
        '200':
          description: The count result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CountResult'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /salesInvoice/id/{id}:
    parameters:
    - $ref: '#/components/parameters/Id'
    get:
      operationId: getSalesInvoiceById
      tags:
      - Sales Invoice
      summary: Get a sales invoice
      responses:
        '200':
          description: The requested sales invoice.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SalesInvoice'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    put:
      operationId: updateSalesInvoice
      tags:
      - Sales Invoice
      summary: Update a sales invoice
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SalesInvoice'
      responses:
        '200':
          description: The updated sales invoice.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SalesInvoice'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: deleteSalesInvoice
      tags:
      - Sales Invoice
      summary: Delete a sales invoice
      responses:
        '204':
          description: The sales invoice was deleted.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    PageSize:
      name: pageSize
      in: query
      required: false
      description: Number of results per page.
      schema:
        type: integer
        minimum: 1
        default: 100
    AdditionalProperties:
      name: additionalProperties
      in: query
      required: false
      description: Comma-separated list of computed / related properties to include in the response.
      schema:
        type: string
    Page:
      name: page
      in: query
      required: false
      description: 1-based page number for paginated list results.
      schema:
        type: integer
        minimum: 1
        default: 1
    Id:
      name: id
      in: path
      required: true
      description: The unique identifier of the entity.
      schema:
        type: string
    Sort:
      name: sort
      in: query
      required: false
      description: Property to sort by. Prefix with a minus sign for descending order (for example, `-createdDate`).
      schema:
        type: string
    Properties:
      name: properties
      in: query
      required: false
      description: Comma-separated list of properties to include in the response.
      schema:
        type: string
  schemas:
    SalesInvoice:
      type: object
      description: Sales invoice. Modeled subset of documented fields.
      properties:
        id:
          type: string
        invoiceNumber:
          type: string
        customerId:
          type: string
        status:
          type: string
        invoiceDate:
          type: integer
          format: int64
        currencyId:
          type: string
        salesInvoiceItems:
          type: array
          items:
            $ref: '#/components/schemas/OrderItem'
        createdDate:
          type: integer
          format: int64
        lastModifiedDate:
          type: integer
          format: int64
    SalesInvoiceList:
      type: object
      properties:
        result:
          type: array
          items:
            $ref: '#/components/schemas/SalesInvoice'
    CountResult:
      type: object
      properties:
        result:
          type: integer
          description: The number of matching entities.
    Error:
      type: object
      description: Error envelope (modeled; consult live Swagger for the exact shape).
      properties:
        messages:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
              message:
                type: string
    OrderItem:
      type: object
      description: A line item on an order, quotation, or invoice. Modeled subset.
      properties:
        id:
          type: string
        articleId:
          type: string
        articleNumber:
          type: string
        quantity:
          type: string
          description: Decimal quantity serialized as a string.
        unitPrice:
          type: string
        title:
          type: string
  responses:
    NotFound:
      description: The requested entity was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid AuthenticationToken.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: The request was invalid (for example, an unknown or invalid property).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    authenticationToken:
      type: apiKey
      in: header
      name: AuthenticationToken
      description: 'API token issued per weclapp user under "My Settings > API". Sent in the `AuthenticationToken` request header. Requests must also send `Accept: application/json`; `POST` and `PUT` requests must send `Content-Type: application/json`.'