Appearance
Merchant Creation β
Description β
Register merchants for the marketplace with the role Agent.
HTTP Request β
http
POST /marketplace/{qwqerId}/merchantPath Parameters β
| Parameter | Type | Required | Description |
|---|---|---|---|
qwqerId | string | Yes | Agent identifier issued during marketplace registration |
Request Body β
The request body must be in JSON format and contain the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
externalId | string | Yes | Merchant unique identifier in your system |
name | string | Yes | Merchant company name |
link | string (URI) | No | Merchantβs website link |
logoLink | string (URI) | No | Link to the merchantβs logo |
email | string (email) | Yes | Merchantβs email (used for sending invoices and, in the future, for authorization in the admin panel) |
addressFirst | string | No | Primary address (street, building, district, etc.) |
addressSecond | string | No | Additional address (city, postal code, country) |
paymentRegistrationNumber | string | No | Registration number for payments |
paymentTaxNumber | string | No | Tax number (e.g., VAT) |
paymentAdditionalLines | array of string | No | Additional payment details (e.g., IBAN, SWIFT, bank, etc.) |
π‘ Info
Fields addressFirst and the following ones are used when generating invoices.
Example Request Body β
json
{
"externalId": "1",
"name": "SIA Example Name",
"link": "https://example.site",
"logoLink": "https://example.site/logo.png",
"email": "admin@domain.com",
"addressFirst": "Katla kalna iela 1, Latgales priekΕ‘pilsΔta",
"addressSecond": "Riga, LV-1073, Latvia",
"paymentRegistrationNumber": "12345678901",
"paymentTaxNumber": "LV12345678901",
"paymentAdditionalLines": [
"IBAN: LV01HABA1234567890123",
"BANK: AS SWEDBANK",
"SWIFT: HABALV22",
"Country: Latvia"
]
}Responses β
β 201 Created β
json
{
"message": "Merchant created successfully",
"data": {
"qwqerId": "112233"
}
}π‘ Info
Save the merchantβs qwqerId β it will be needed for subsequent API calls, for example when creating a Receipt.
β
302 Found β Merchant already registered for your externalId β
json
{
"message": "Merchant already exists",
"data": {
"qwqerId": "112233"
}
}β 400 Bad Request β Invalid data β
json
{
"message": "Invalid input data"
}Possible reasons:
- Missing required fields
- Invalid email or URI format
β 404 Not Found β Marketplace not found β
json
{
"message": "This marketplace is not registered yet"
}Possible reasons:
- The provided
qwqerIddoes not match any registered marketplace - The marketplace with the specified
qwqerIddoes not have permission to create merchants