{"openapi":"3.0.0","paths":{"/v1/peppol/invoice":{"post":{"description":"Submits a single UBL XML invoice and creates a tracked submission entry.\n\n**Authentication**\n- Use your Peppol API key as a bearer token in the `Authorization` header.\n\n**Input requirements**\n- `xml` must be a base64-encoded XML document.\n- ZIP files are rejected for this endpoint.\n- XML must be a valid UBL invoice and include a recipient Peppol identifier.\n\n**Response behavior**\n- HTTP `200` means the request was processed.\n- Inspect `data.status` (`sending` or `failed`) for the immediate outcome.\n- If status is `failed`, `data.errorMessage` contains the user-facing reason.","operationId":"PeppolController_sendSingleXmlByApi","parameters":[],"requestBody":{"required":true,"description":"Single UBL XML invoice payload encoded as base64. `targetNetwork` is optional and defaults to `auto`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeppolInvoiceRequest"},"examples":{"autoRouting":{"summary":"Auto routing (recommended)","description":"StoreCove automatically routes to the best supported target network.","value":{"xml":"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48SW52b2ljZSB4bWxucz0idXJuOm9hc2lzOm5hbWVzOnNwZWNpZmljYXRpb246dWJsOnNjaGVtYTp4c2Q6SW52b2ljZS0yIj48Y2JjOklEPklOVi0yMDI2LTAwMDE8L2NiYzpJRD48Y2JjOklzc3VlRGF0ZT4yMDI2LTAyLTE4PC9jYmM6SXNzdWVEYXRlPjwvSW52b2ljZT4=","targetNetwork":"auto"}},"explicitPeppol":{"summary":"Explicit Peppol routing","value":{"xml":"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48SW52b2ljZSB4bWxucz0idXJuOm9hc2lzOm5hbWVzOnNwZWNpZmljYXRpb246dWJsOnNjaGVtYTp4c2Q6SW52b2ljZS0yIj48Y2JjOklEPklOVi0yMDI2LTAwMDI8L2NiYzpJRD48Y2JjOklzc3VlRGF0ZT4yMDI2LTAyLTE4PC9jYmM6SXNzdWVEYXRlPjwvSW52b2ljZT4=","targetNetwork":"peppol"}},"explicitKsef":{"summary":"Explicit KSeF routing","value":{"xml":"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48SW52b2ljZSB4bWxucz0idXJuOm9hc2lzOm5hbWVzOnNwZWNpZmljYXRpb246dWJsOnNjaGVtYTp4c2Q6SW52b2ljZS0yIj48Y2JjOklEPklOVi0yMDI2LTAwMDM8L2NiYzpJRD48Y2JjOklzc3VlRGF0ZT4yMDI2LTAyLTE4PC9jYmM6SXNzdWVEYXRlPjwvSW52b2ljZT4=","targetNetwork":"ksef"}}}}}},"responses":{"200":{"description":"Submission was processed. `data.status` indicates immediate result (`sending` or `failed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeppolInvoiceResponse"},"examples":{"sending":{"summary":"Accepted and queued","value":{"data":{"submissionId":"bd9f47f3-7bc4-4760-a1dc-8c33df6496f3","success":true,"status":"sending"}}},"failed":{"summary":"Immediate failure with actionable reason","value":{"data":{"submissionId":"09390bc8-6f4c-4f14-8f3f-684c680f4678","success":false,"status":"failed","errorMessage":"Duplicate invoice detected: identical XML was already sent successfully before."}}}}}}},"400":{"description":"Invalid request body shape (for example invalid enum values or additional forbidden fields).","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":400},"message":{"oneOf":[{"type":"string","example":"Bad Request"},{"type":"array","items":{"type":"string"},"example":["targetNetwork must be one of the following values"]}]},"error":{"type":"string","example":"Bad Request"}}}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"invalid_api_key"},"message":{"type":"string","example":"Missing or invalid API key"}}}}}},"403":{"description":"Authenticated, but company is not eligible (enterprise/subscription/country constraints).","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"examples":{"enterpriseRequired":{"value":{"code":"enterprise_required","message":"This feature is only available for enterprise customers. Please contact support to upgrade your account."}},"subscriptionUpgradeRequired":{"value":{"code":"subscription_upgrade_required","message":"This feature requires a Complete subscription. Please upgrade your subscription to access this feature."}},"countryNotSupported":{"value":{"code":"peppol_country_not_supported","message":"Peppol is only available for companies in NL, BE, DE."}}}}}},"422":{"description":"Business validation failed. Typical codes: `invalid_base64_xml`, `single_xml_only`, `invalid_ubl_xml`, `missing_recipient`, `no_legal_entity`, `peppol_sending_not_enabled`.","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"examples":{"invalidBase64":{"value":{"code":"invalid_base64_xml","message":"XML must be valid base64-encoded UBL content."}},"invalidUbl":{"value":{"code":"invalid_ubl_xml","message":"Not a valid UBL Invoice (missing Invoice root element)"}},"missingRecipient":{"value":{"code":"missing_recipient","message":"Could not extract recipient Peppol ID from UBL document"}}}}}},"500":{"description":"Unexpected server error while processing submission.","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":500},"message":{"type":"string","example":"Internal server error"}}}}}}},"security":[{"bearer":[]}],"summary":"Submit one UBL XML invoice to Peppol","tags":["Peppol"]}}},"info":{"title":"Peppol Invoice API","description":"Public endpoint for submitting one UBL XML invoice to the Peppol network.","version":"1.0.0","contact":{}},"tags":[],"servers":[],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"PeppolInvoiceResponseData":{"type":"object","properties":{"submissionId":{"type":"string","description":"Server-generated submission identifier","format":"uuid","example":"bd9f47f3-7bc4-4760-a1dc-8c33df6496f3"},"success":{"type":"boolean","description":"Whether the invoice was accepted for immediate sending","example":true},"status":{"type":"string","enum":["sending","failed"],"description":"Immediate submission status after validation and send attempt","example":"sending"},"errorMessage":{"type":"string","description":"Present when status is `failed`; contains a user-facing reason for failure","example":"Duplicate invoice detected: identical XML was already sent successfully before."}},"required":["submissionId","success","status"]},"PeppolInvoiceResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PeppolInvoiceResponseData"}},"required":["data"]},"PeppolInvoiceRequest":{"type":"object","properties":{"xml":{"type":"string","description":"Base64-encoded content of a single UBL XML invoice document (ZIP is not supported).","format":"byte","example":"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48SW52b2ljZSB4bWxucz0idXJuOm9hc2lzOm5hbWVzOnNwZWNpZmljYXRpb246dWJsOnNjaGVtYTp4c2Q6SW52b2ljZS0yIj48Y2JjOklEPklOVi0yMDI2LTAwMDE8L2NiYzpJRD48Y2JjOklzc3VlRGF0ZT4yMDI2LTAyLTE4PC9jYmM6SXNzdWVEYXRlPjwvSW52b2ljZT4="},"targetNetwork":{"type":"string","description":"Optional routing preference. Defaults to `auto` (recommended).","enum":["auto","peppol","ksef"],"default":"auto","example":"auto"}},"required":["xml"]}}}}