Documentation · API Reference

Wiresphere REST API

Complete developer documentation for the Wiresphere REST API. This API lets you manage products, transactions, customer contacts, payments and shop settings within a multi-tenant system.

At a glance: OpenAPI 3.0.1 · Base URL https://api.wiresphere.com (PLACEHOLDER) · Authentication via Bearer JWT (valid for 24 h) · tenant-id header required for almost all endpoints. Back to the Docs Overview.
Authentication

The API uses token-based authentication (Bearer JWT). Tokens are valid for 24 hours.

1
Request a token

Send username and password to the auth endpoint. For admin users, the tenant-id header must not be included.

2
Use the token

Include the received token in the Authorization header of every secured request:

Authorization: Bearer <your-token>
3
Token expiry

Tokens are valid for 24 hours. An expired or invalid token results in a 409 Conflict.

POST
/api/v1/auth/token-auth
Request a token — verify user credentials and return a JWT

Header Parameters

NameInTypeRequiredDescription
tenant-id header string No Shop context. Must be omitted for admin authentication.

Request Body (application/json)

{
  "username": "your-username",
  "password": "your-password"
}

Response

200 Token created successfully
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
401 Invalid credentials
400 Bad request
Tenant Concept

The API is multi-tenant. Every request (except admin authentication) must identify the shop context via the tenant-id header.

tenant-id header

The tenant-id header is required for almost all endpoints. It determines the shop context in which the operation is executed. Requests without this header are rejected.

tenant-id: my-shop-id
Inventory (Products)

Management of a shop's product inventory. Supports CRUD operations as well as bulk operations.

GET
/api/v1/admin/inventory/
Retrieve all products (paginated)

Header

NameInRequiredDescription
tenant-idheaderShop ID
AuthorizationheaderBearer <token>

Query Parameters

NameTypeDescription
pintegerPage (default: 0)
sintegerPage size (default: 10)
fstring[]Filter: name, SKU, vatClass, status
ostring[]Sorting: name, SKU, vatClass, status

Response (200)

{
  "totalElements": 42,
  "totalPages": 5,
  "size": 10,
  "number": 0,
  "first": true,
  "last": false,
  "content": [
    {
      "base": { /* base product data */ },
      "additional": { /* additional data */ }
    }
  ]
}
GET
/api/v1/admin/inventory/{sku}
Retrieve a single product by SKU

Path Parameters

NameInDescription
sku*pathUnique product identifier within the shop (Stock Keeping Unit)

Response (200) — ProductDataDTO

{
  "base": { /* base product data (name, SKU, price, etc.) */ },
  "additional": { /* extended fields */ }
}
PUT
/api/v1/admin/inventory/
Create or update a product (upsert)

Request Body (application/json) — ProductDataDTO

{
  "base": {
    // Required fields and product data (name, SKU, price, status, etc.)
  },
  "additional": {
    // Optional additional fields
  }
}

Response

200 ID of the created/updated product (string)
DELETE
/api/v1/admin/inventory/
Delete multiple products by their IDs

Request Body (application/json)

["productId1", "productId2"]

Response

200 Confirmation (string)
GET
/api/v1/admin/inventory/operations
Retrieve available bulk operations

Returns all registered bulk operations along with their parameter schemas.

Response (200) — Array of ProductOperationRegistrationDTO

[{
  "operationId": "set-status",
  "description": "Sets the status of products",
  "parameterTypes": { "status": "string" },
  "previewProperties": ["status"]
}]
POST
/api/v1/admin/inventory/operations/preview
Preview a bulk operation (dry run)

Simulates a bulk operation and shows the before/after state — without saving any data.

Request Body

{
  "operationId": "set-status",
  "parameters": { "status": "ACTIVE" },
  "confirmAll": false
}
POST
/api/v1/admin/inventory/operations/execute
Execute a bulk operation

Executes a bulk operation on filtered products. Changes data permanently.

Query Parameters

NameDescription
fFilter determining which products are affected

Request Body

{
  "operationId": "set-status",
  "parameters": { "status": "INACTIVE" }
}
Transactions

Transactions cover all orders, contracts and invoices. Both a public and an admin endpoint are available.

Available doctype values

When filtering by doctype, the following values are known: ORDER, CONTRACT, INVOICE

GET
/api/v1/admin/transaction/
Retrieve all transactions (admin) — paginated, filterable

Filter fields (parameter f)

FieldFormatDescription
min_createdAtISO 8601Created from date
max_createdAtISO 8601Created up to date
doctypeORDER/CONTRACT/INVOICETransaction type
docIdstringDocument ID
processIdstringProcess ID
processTypestringProcess pipeline
payload.channelstringSales channel
payload.emailstringCustomer's email

Sort fields (parameter o)

createdAt, docId, payload.netTotalPrice, payload.grossTotalPrice, payload.customer.name

Example

GET /api/v1/admin/transaction/?f=doctype::ORDER,min_createdAt::2024-01-01T00:00:00.000Z&o=createdAt::DESC&p=0&s=20
Authorization: Bearer <token>
tenant-id: my-shop
GET
/api/v1/admin/transaction/{processId}/{docId}
Retrieve a single transaction

Path Parameters

NameDescription
processId*Process ID (groups related transactions)
docId*Document ID of the specific transaction
GET
/api/v1/admin/transaction/filter-values
Retrieve distinct values for filters

Query Parameters

NameRequiredDescription
propsFields for which distinct values should be determined
andNoAND pre-filter
orNoOR pre-filter

Response (200)

{
  "doctype": ["ORDER", "INVOICE"],
  "payload.channel": ["online", "terminal"]
}
POST
/api/v1/admin/transaction/{processId}/{docId}/cancel
Cancel a single transaction

Path Parameters

NameDescription
processId*Process ID
docId*Document ID of the transaction to cancel

Query Parameters

NameDescription
reasonOptional cancellation reason
POST
/api/v1/admin/transaction/{processId}/cancel
Cancel an entire process (all transactions)

Path Parameters

NameDescription
processId*Process ID — all associated transactions are cancelled

Query Parameters

NameDescription
reasonOptional cancellation reason
GET
/api/v1/transaction/
Retrieve transactions (public endpoint — no Bearer required)

Identical filter and sort options to the admin endpoint, but without Bearer authentication. Filters on the data accessible within the shop context.

People (CRM)

CRM management of people (customers, contacts). Two parallel controller paths exist with identical functionality.

Parallel endpoints

People can be managed via two paths: /api/v1/admin/person/ and /api/v1/admin/business-contacts/people/. Both provide the same functionality — prefer the business-contacts path for new integrations.

GET
/api/v1/admin/person/all
Retrieve all people (paginated)

Filter fields (parameter f)

personId, firstName, lastName, email

Response (200) — PageCrmPersonDTO

{
  "totalElements": 100,
  "content": [{
    "id": "507f1f77bcf86cd799439011",
    "firstName": "John",
    "lastName": "Doe",
    "email": "john@example.com",
    "personId": "external-123",
    "addresses": [],
    "communications": [],
    "organisations": [],
    "types": []
  }]
}
GET
/api/v1/admin/person/{id}
Retrieve a single person

Path Parameters

NameDescription
id*MongoDB ObjectId of the person
POST
/api/v1/admin/person
Create a person

Request Body (application/json) — PersonDTO

{
  "firstName": "John",
  "lastName": "Doe",
  "email": "john@example.com",
  "salutation": "Mr",
  "title": "Dr.",
  "personId": "external-id-123",
  "addresses": [{
    "street": "Sample Street",
    "streetNumber": "1",
    "zipCode": "12345",
    "city": "Sampletown",
    "country": "DE",
    "type": "MAIN"
  }],
  "communications": [{
    "type": "PHONE",
    "value": "+49 123 4567890"
  }],
  "types": []
}
PUT
/api/v1/admin/person/{id}
Update a person

Same request body as POST. Fully replaces the record.

PATCH
/api/v1/admin/person/{id}/organisations
Adjust a person's organization assignments

Request Body — RelationDeltaDTO

{
  "add": ["orgId1", "orgId2"],
  "remove": ["orgIdOld"]
}
DELETE
/api/v1/admin/person/{id}
Delete a person

Response (200) — OkDTO

{ "ok": true }
DELETE
/api/v1/admin/person/bulk-delete
Delete multiple people at once

Request Body

["id1", "id2", "id3"]
Organizations (CRM)

Management of companies and organizations. As with people, also accessible via two parallel paths.

GET
/api/v1/admin/organisation/all
Retrieve all organizations (paginated)

Filter fields

name (substring search)

Response (200) — PageCrmOrganisationDTO

{
  "totalElements": 10,
  "content": [{
    "id": "...",
    "name": "Example Inc.",
    "organisationId": "external-id",
    "addresses": [],
    "communications": [],
    "people": [],
    "types": []
  }]
}
POST
/api/v1/admin/organisation
Create an organization

Request Body — OrganisationDTO

{
  "name": "Example Inc.",
  "organisationId": "external-id",
  "addresses": [],
  "communications": [],
  "types": []
}
PATCH
/api/v1/admin/organisation/{id}/people
Adjust an organization's people assignments

Request Body — RelationDeltaDTO

{
  "add": ["personId1"],
  "remove": []
}
Catalog / Slugs

Slugs define URL routes in the shop and present either individual products (product) or product lists (product-list).

GET
/api/v1/admin/catalog/
Retrieve all slugs (paginated)

Response — PageSlug

{
  "content": [{
    "id": "507f...",
    "slug": "beton-c25-30",
    "label": "Concrete C25/30",
    "objectType": "product",
    "collection": "products",
    "refId": "productMongoId",
    "inactive": false
  }]
}
PUT
/api/v1/admin/catalog/
Create or update a slug (upsert)

Request Body — Slug

{
  "id": "507f...",           // Provide when updating
  "slug": "my-slug",        // URL segment (required)
  "collection": "products",  // MongoDB collection (required)
  "objectType": "product",   // "product" or "product-list" (required)
  "refId": "...",            // Product ID (for objectType "product")
  "fields": {                  // Filter for "product-list"
    "category": "beton"
  },
  "defaultSort": [{ "field": "name", "direction": "asc" }],
  "context": ["main-nav"],
  "inactive": false
}
GET
/api/v1/admin/catalog/ref-id/{refId}
Retrieve a slug by reference ID (product ID)

Useful for finding the slug of a known product.

POST
/api/v1/admin/catalog/create-slugs/{fieldName}
Generate slugs automatically

Path Parameters

NameDescription
fieldName*Product field from which slugs are generated

Query Parameters

NameDescription
valuesOptional restriction to specific field values
Categories & Navigation
GET
/api/v1/category/navigation
Retrieve navigation (public)

Query Parameters

NameDescription
navScopeOptional filter on the navigation context
GET
/api/v1/admin/category/navigation-contexts
Retrieve available navigation contexts

Response (200)

["main-nav", "footer", "sidebar"]
PUT
/api/v1/admin/category/items/order
Update the order of items within a category

Request Body — Array of ItemOrderDTO

[
  { "sku": "SKU-001", "categoryId": "catId", "order": 0 },
  { "sku": "SKU-002", "categoryId": "catId", "order": 1 }
]
POST
/api/v1/admin/category/update-slug-navigations
Add a slug to navigation(s) (idempotent)

Request Body — NavigationUpdateDTO

{
  "slugId": "slugMongoId",
  "navigationNames": ["main-nav", "footer"]
}
Settings
GET
/api/v1/admin/settings/{key}
Retrieve a setting by key

Path Parameters

NameDescription
key*Settings key
PUT
/api/v1/admin/settings
Create or update a setting

Request Body — Setting

{
  "key": "settings-key",
  "public": {
    // Publicly accessible settings
    "theme": "dark"
  },
  "private": {
    // Accessible to authenticated requests only
    "apiKey": "secret"
  }
}
File Management
GET
/api/v1/admin/files/
List files/images

Query Parameters

NameDescription
pPage
sPage size
fFilename filter
mimeMIME type filter (e.g. image/png)
POST
/api/v1/admin/files/
Upload a file

Request as multipart/form-data with the field file.

Content-Type: multipart/form-data

file: [binary data]
Payment / Stripe

Stripe integration for payment processing. There are two modes: standard Stripe (stripe) and external Stripe (stripe-external).

GET
/api/v1/payment/stripe/public
Retrieve public Stripe settings (e.g. publishable key)

Response (200)

{ "publishableKey": "pk_live_..." }
GET
/api/v1/payment/stripe/state
Retrieve the current Stripe payment state

Returns the shop's current payment state.

POST
/api/v1/payment/stripe-common/capturable
Stripe webhook — set payment status (production)

For Stripe webhooks only

This endpoint is for incoming Stripe webhook events. The Stripe-Signature header is required and is set automatically by Stripe.

Header

NameDescription
Stripe-Signature*Signature header set by Stripe for verification
POST
/api/v1/admin/payment/stripe-common/webhook-test
Test the Stripe webhook (admin)

Response (200) — WebhookTestStatusDTO

{
  "sandbox": {
    "mode": "SANDBOX",
    "passed": true,
    "ranAt": "2024-01-15T10:30:00Z",
    "durationMs": 234,
    "pending": false
  },
  "production": { /* same structure */ }
}
Import / Export
POST
/api/v1/admin/import/{entity}
Import entities (CSV/JSON upload)

Path Parameters

NameDescription
entity*Entity type (e.g. products, persons)

Request Body (multipart)

Content-Type: application/json
file: [binary — CSV or JSON file]

Response (200) — UploadResponse

{
  "success": true,
  "importCount": 42
}
GET
/api/v1/admin/export/{entity}
Export entities (file download)

Path Parameters

NameDescription
entity*Entity type (e.g. products, persons)

Response

Binary file (string format: binary)

Data Models (Schemas)

Overview of all data structures in use.

PersonDTO

FieldTypeDescription
idstringMongoDB ObjectId
firstNamestringFirst name
lastNamestringLast name
emailstringEmail address
salutationstringSalutation
titlestringTitle (e.g. Dr.)
personIdstringExternal/custom ID
tenantIdintegerTenant assignment
addressesAddressDTO[]Addresses
communicationsCommunicationDTO[]Communication channels
organisationsOrganisationDTO[]Assigned organizations
typesBusinessContactTypeDTO[]Contact types
createdAtdatetimeCreation timestamp
updatedAtdatetimeLast update

AddressDTO

FieldTypeDescription
streetstringStreet name
streetNumberstringHouse number
supplementalstringAddress supplement
zipCodestringPostal code
citystringCity
countrystringCountry (ISO code, e.g. DE)
typestringAddress type (e.g. MAIN, BILLING)

Slug

FieldTypeRequiredDescription
idstringMongoDB ObjectId
slugstringURL subroute of the shop
labelstringReadable name
collectionstringMongoDB collection
objectTypestring"product" or "product-list"
refIdstringProduct reference (for product)
fieldsobjectFilter for product-list
contextstring[]Display contexts
defaultSortSortField[]Default sorting
inactivebooleanDeactivates the slug

ProductDataDTO

FieldTypeDescription
baseobjectBase product data (dynamic, shop-specific)
additionalobjectExtensible additional fields

RelationDeltaDTO

Used by PATCH endpoints to manage relations (people↔organizations).

FieldTypeDescription
addstring[]IDs to be added
removestring[]IDs to be removed

Wiresphere API · OpenAPI 3.0.1 · Documentation generated May 2026

Base URL: https://api.wiresphere.com · Authentication: Bearer JWT · Token validity: 24 hours