- Reference (v1)
- Angebote
- Neues Angebot anfordern
Version: API v1
Neues Angebot anfordern
POST/v1/offers
API-Version
v1
Request-Methode
POST
Operation-ID
requestQuote
Über diese Operation kann ein neues Angebot angefordert werden
Request
Format
application/json
- recipientobjectrequired
- firstNamestring (≥ 1 Zeichen)required
- lastNamestring (≥ 1 Zeichen)required
- titlestring (≥ 1 Zeichen)
- salutationstring (einer von: Herr, Frau, Divers)required
- streetstring (≥ 1 Zeichen)required
- houseNumberstring (≥ 1 Zeichen)required
- citystring (≥ 1 Zeichen)required
- companystring
- emailAddressstring (email)required
- phonestringrequired
- countrystring (≥ 2 Zeichen, ≤ 2 Zeichen)required
iso country short code (ISO 3166-1 alpha-2)
- articlesobjectrequired
- mainobjectrequired
- articleNumbernumberrequired
- additionalArray von object
- Array[
- *object
- articleNumbernumberrequired
]
- isTechnicalAdminForRecipientboolean
Content-Type: application/json
{
"recipient": {
"firstName": "string",
"lastName": "string",
"title": "string",
"salutation": "Herr",
"street": "string",
"houseNumber": "string",
"city": "string",
"company": "string",
"emailAddress": "email@mittwald.example",
"phone": "string",
"country": "string"
},
"articles": {
"main": {
"articleNumber": 123
},
"additional": [
{
"articleNumber": 123
}
]
},
"isTechnicalAdminForRecipient": true
}
{
"title": "OfferRequest",
"required": [
"articles",
"recipient"
],
"type": "object",
"properties": {
"recipient": {
"title": "OfferRequestRecipient",
"required": [
"city",
"country",
"emailAddress",
"firstName",
"houseNumber",
"lastName",
"phone",
"salutation",
"street"
],
"type": "object",
"properties": {
"firstName": {
"minLength": 1,
"type": "string"
},
"lastName": {
"minLength": 1,
"type": "string"
},
"title": {
"minLength": 1,
"type": "string"
},
"salutation": {
"type": "string",
"enum": [
"Herr",
"Frau",
"Divers"
]
},
"street": {
"minLength": 1,
"type": "string"
},
"houseNumber": {
"minLength": 1,
"type": "string"
},
"city": {
"minLength": 1,
"type": "string"
},
"company": {
"type": "string"
},
"emailAddress": {
"type": "string",
"format": "email"
},
"phone": {
"pattern": "^\\+([0-9]{2,3}|1)\\-[0-9]{2,5}\\-[0-9]+$",
"type": "string"
},
"country": {
"maxLength": 2,
"minLength": 2,
"type": "string",
"description": "iso country short code (ISO 3166-1 alpha-2)"
}
}
},
"articles": {
"title": "OfferRequestArticles",
"required": [
"main"
],
"type": "object",
"properties": {
"main": {
"title": "OfferRequestArticle",
"required": [
"articleNumber"
],
"type": "object",
"properties": {
"articleNumber": {
"type": "number"
}
}
},
"additional": {
"type": "array",
"items": {
"title": "OfferRequestArticle",
"required": [
"articleNumber"
],
"type": "object",
"properties": {
"articleNumber": {
"type": "number"
}
}
}
}
}
},
"isTechnicalAdminForRecipient": {
"type": "boolean",
"default": false
}
}
}
Responses
Format
application/json
Beschreibung
Ungültige Anfrage. Dies kann beispielsweise geschehen, wenn die Anfrage ungültig codierte Inhalte enthält oder der Inhalt semantisch inkorrekt ist.
- messagestring
Content-Type: application/json
{
"message": "string"
}
{
"title": "Error",
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
}
Format
application/json
Beschreibung
Zugriff verweigert
- messagestring
Content-Type: application/json
{
"message": "string"
}
{
"title": "Error",
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
}
Format
application/json
Beschreibung
Bei der Verarbeitung der Anfrage ist ein Fehler aufgetreten.
- messagestring
Content-Type: application/json
{
"message": "string"
}
{
"title": "Error",
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
}
Nutzungsbeispiele
$ curl \
--fail \
--location \
-X POST \
-d '{"recipient":{"firstName":"string","lastName":"string","title":"string","salutation":"Herr","street":"string","houseNumber":"string","city":"string","company":"string","emailAddress":"email@mittwald.example","phone":"string","country":"string"},"articles":{"main":{"articleNumber":123},"additional":[{"articleNumber":123}]},"isTechnicalAdminForRecipient":true}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v1/offers