Subscription
Subscription
"openapi": "3.0.2",
"info": {
"version": "1.0.0"
},
"security": [
"OAuth2": [
"cim.api.inbound.structured"
],
"servers": [
"url": "https://{subdomain}.eu10.cim.cloud.sap/",
"variables": {
"subdomain": {
"default": "subdomain"
}
],
"externalDocs": {
"url":
"https://help.sap.com/docs/CENTRAL_INVOICE_MANAGEMENT/da931cb8aa
e0453584e3a3765a6fbd4b",
},
"tags": [
],
"paths": {
"/api/cim-create-invoice-structured/v1/": {
"post": {
"tags": [
],
"requestBody": {
"required": true,
"content": {
"multipart/form-data": {
"schema": {
"properties": {
"invoiceN": {
"type": "array",
"items": {
"oneOf": [
"$ref": "#/components/schemas/Invoices"
},
"$ref": "#/components/schemas/Binary-attachment"
},
"examples": {
"Single PO Invoice": {
},
},
},
},
},
"Multiple Invoices": {
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateInvoiceResponse"
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestError"
},
"401": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedError"
},
"403": {
"$ref": "#/components/responses/ForbiddenError"
},
"409": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConflictError"
},
"413": {
"$ref": "#/components/responses/PayloadTooLargeError"
},
"415": {
"$ref": "#/components/responses/UnsupportedMediaTypeError"
},
"429": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyRequestsError"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
},
"components": {
"schemas": {
"BadRequestError": {
"type": "object",
"required": [
"error"
],
"additionalProperties": {
"$ref": "#/components/schemas/error"
},
"example": {
"error": {
"code": "ERR_INVALID_INVOICE",
"target": "invoice1",
"details": [
"code": "ERR_INVALID_FORMAT_VALUE_FOR_INVOICE",
},
{
"code": "ERR_MISSING_MANDATORY_PROPERTY_FOR_INVOICE",
},
"code": "ERR_NOT_SUPPORTED_PURPOSE",
},
"Binary-attachment": {
"type": "string",
"format": "binary",
},
"ConflictError": {
"type": "object",
"required": [
"error"
],
"additionalProperties": {
"$ref": "#/components/schemas/error"
},
"example": {
"error": {
"code": "ERR_ALREADY_IMPORTED_INVOICE",
"message": "In 'ExternalIds', there is already an invoice with 'type'
otherId and the 'id' externalidtest1"
},
"DeliveryNoteReferences": {
"type": "object",
"properties": {
"deliveryNoteNumber": {
"type": "string",
"maxLength": 16,
"nullable": true,
"example": "122324423"
},
"required": [
"deliveryNoteNumber"
],
},
"error": {
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"target": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"target": {
"type": "string"
},
"innererror": {
"type": "object",
},
"title": "Error",
},
"ExternalIds": {
"type": "object",
"properties": {
"id": {
"type": "string",
"maxLength": 256,
"nullable": true,
},
"type": {
"type": "string",
"maxLength": 40,
"enum": [
"otherId"
],
"example": "otherId",
},
"required": [
"id",
"type"
],
},
"Invoices": {
"title": "Invoice",
"type": "object",
"properties": {
"origin": {
"type": "string",
"maxLength": 30,
"nullable": true,
"$ref": "#/components/schemas/InvoiceOrigin"
},
"supplierInvoiceId": {
"type": "string",
"maxLength": 16,
"nullable": true,
"example": "12354432"
},
"purpose": {
"type": "string",
"maxLength": 1,
"nullable": true,
"enum": [
"I",
"C",
"3",
"4"
],
"example": "I"
},
"currency": {
"type": "string",
"maxLength": 3,
"nullable": true,
"example": "EUR"
},
"grossAmount": {
"anyOf": [
"type": "number",
"format": "decimal",
"multipleOf": 0.000001
},
"type": "string"
],
"example": "110.20",
"x-sap-precision": 22,
"x-sap-scale": 6,
"nullable": true,
},
"documentDate": {
"type": "string",
"format": "date",
"example": "2017-04-13",
"nullable": true,
},
"invoiceReceiptDate": {
"type": "string",
"format": "date",
"example": "2017-04-13",
"nullable": true,
},
"documentHeaderText": {
"type": "string",
"maxLength": 25,
"nullable": true,
},
"taxFulfillmentDate": {
"type": "string",
"format": "date",
"example": "2017-04-13",
"nullable": true,
},
"receiverSystemId": {
"type": "string",
"maxLength": 30,
"nullable": true,
"example": "0LEU10H"
},
"receiverCompanyCode": {
"type": "string",
"maxLength": 10,
"nullable": true,
"example": "1010"
},
"receiverSupplier": {
"type": "string",
"maxLength": 10,
"nullable": true,
"example": "1003000083"
},
"externalIds": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ExternalIds"
},
"paymentInfos": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PaymentInfos"
},
"taxes": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Taxes"
},
"poReferences": {
"type": "array",
"items": {
"$ref": "#/components/schemas/POReferences"
}
},
"lineItems": {
"type": "array",
"items": {
"$ref": "#/components/schemas/LineItems"
},
"invoiceParties": {
"type": "array",
"items": {
"$ref": "#/components/schemas/InvoiceParties"
},
"attachments": {
"type": "array",
"items": {
"$ref": "#/components/schemas/InvoiceAttachments"
},
"deliveryNoteReferences": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DeliveryNoteReferences"
},
"sesReferences": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SESReferences"
}
},
"required": [
"origin",
"supplierInvoiceId",
"purpose",
"currency",
"grossAmount",
"documentDate",
"invoiceReceiptDate",
"attachments"
},
"InvoiceAttachments": {
"type": "object",
"properties": {
"fileName": {
"type": "string",
"maxLength": 255,
"nullable": true,
"example": "Invoice_Attachment.pdf"
},
"documentType": {
"type": "string",
"maxLength": 255,
"nullable": true,
"enum": [
"Invoice",
"Legal",
"Others"
],
"example": "Invoice",
},
"isDefault": {
"type": "boolean",
"nullable": true,
"default": false,
"example": true,
},
"required": [
"fileName",
"documentType"
],
},
"InvoiceOrigin": {
"type": "string",
"maxLength": 30,
"enum": [
"04"
],
"default": "04",
},
"InvoiceParties": {
"type": "object",
"properties": {
"role": {
"type": "string",
"maxLength": 30,
"nullable": true,
"enum": [
"from",
"soldTo"
],
"example": "from"
},
"name": {
"type": "string",
"maxLength": 256,
"nullable": true,
},
"providerAddresses": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PartyAddressData"
},
"providerOtherInfos": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PartyAttributes"
},
"required": [
"role",
"name"
],
},
"CreateInvoiceResponse": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/Invoices"
},
"example": {
"invoice1": {
"invoice": {
"receiverSystem": "ABC_123",
"receiverCompanyCode": "1010",
"id": "7874a373-32c5-4a6b-804a-c7c70371c56b",
"receiverCompanyCodeId": "ABC_123/1010",
"origin": "04",
"createdAt": "2022-08-30T08:43:42.322Z",
"modifiedAt": "2022-08-30T08:43:42.322Z",
"invoiceReceiptDate": "2022-08-18"
},
"attachments": [
"id": "cdffb29b-8dc6-4b3c-86fa-4cb5cc84d265",
"invoiceId": "7874a373-32c5-4a6b-804a-c7c70371c56b",
"fileName": "Park_Tax.pdf",
"contentType": "application/pdf",
"createdAt": "2022-08-30T08:43:42.341Z",
"modifiedAt": "2022-08-30T08:43:42.341Z",
"documentType": "Invoice",
"fileSize": 169217,
"contentHash":
"{sha256}feb5bc320a0a64cd332aa8258956f235a2c0d94277954bfb42f8a
c38a7471d5e"
},
"LineItems": {
"type": "object",
"properties": {
"invoiceDocumentItem": {
"type": "integer",
"format": "int32",
"nullable": true,
"example": "1"
},
"currency": {
"type": "string",
"maxLength": 3,
"nullable": true,
"description": "Currency used for the line item (ISO 4217 code)",
"example": "EUR"
},
"amount": {
"anyOf": [
"type": "number",
"format": "decimal",
"multipleOf": 0.000001
},
"type": "string"
],
"example": "500.80",
"x-sap-precision": 22,
"x-sap-scale": 6,
"nullable": true,
"externalUnitOfMeasure": {
"type": "string",
"maxLength": 30,
"nullable": true,
"example": "KG"
},
"unitPrice": {
"anyOf": [
"type": "number",
"format": "decimal",
"multipleOf": 0.000001
},
"type": "string"
],
"example": "30.5",
"x-sap-precision": 22,
"x-sap-scale": 6,
"nullable": true,
},
"quantity": {
"anyOf": [
"type": "number",
"format": "decimal",
"multipleOf": 0.001,
"maximum": 9999999999.999,
"minimum": -9999999999.999
},
"type": "string"
],
"example": "5",
"x-sap-precision": 13,
"x-sap-scale": 3,
"nullable": true,
},
"description": {
"type": "string",
"maxLength": 5000,
"nullable": true,
},
"taxRate": {
"anyOf": [
"type": "number",
"format": "decimal",
"multipleOf": 0.000001
},
{
"type": "string"
],
"example": "19.6",
"x-sap-precision": 22,
"x-sap-scale": 6,
"nullable": true,
},
"taxCountry": {
"type": "string",
"maxLength": 2,
"nullable": true,
"example": "DE"
},
"poReferences": {
"type": "array",
"items": {
"$ref": "#/components/schemas/POReferences"
},
"deliveryNoteReferences": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DeliveryNoteReferences"
}
},
"sesReferences": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SESReferences"
},
"required": [
"currency",
"amount",
"externalUnitOfMeasure",
"unitPrice",
"quantity",
"description"
],
},
"PartyAddressData": {
"type": "object",
"properties": {
"postalAddresses": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ScriptedPostalAddresses"
},
"required": [
"id"
],
},
"PartyAttributes": {
"type": "object",
"properties": {
"domain": {
"type": "string",
"maxLength": 30,
"example": "vatID"
},
"value": {
"type": "string",
"maxLength": 5000,
"nullable": true,
},
"required": [
"domain",
"value"
],
"description": "Non-sensitive additional attributes of this invoice
party"
},
"PaymentInfos": {
"type": "object",
"properties": {
"netDueDate": {
"type": "string",
"format": "date",
"example": "2017-04-13",
"nullable": true,
},
"paymentReference": {
"type": "string",
"maxLength": 30,
"nullable": true,
},
"required": [
"id"
],
},
"POReferences": {
"type": "object",
"properties": {
"documentNumber": {
"type": "string",
"maxLength": 10,
"nullable": true,
"example": "34354545"
},
"itemNumber": {
"type": "integer",
"format": "int32",
"nullable": true,
"example": "1"
},
"required": [
"documentNumber"
],
},
"ScriptedPostalAddresses": {
"type": "object",
"properties": {
"scriptCodeKey": {
"type": "string",
"maxLength": 4,
"nullable": true,
"example": "Latn"
},
"streetLines": {
"type": "string",
"maxLength": 5000,
"nullable": true,
},
"town": {
"type": "string",
"maxLength": 5000,
"nullable": true,
"description": "Town",
"example": "Toronto"
},
"region": {
"type": "string",
"maxLength": 3,
"nullable": true,
"example": "ON"
},
"postalCode": {
"type": "string",
"maxLength": 10,
"nullable": true,
"description": "Postal code",
"example": "M3C-0H9"
},
"country": {
"type": "string",
"maxLength": 2,
"nullable": true,
"example": "CA"
},
"required": [
"scriptCodeKey",
"town",
"country"
],
},
"SESReferences": {
"type": "object",
"properties": {
"documentNumber": {
"type": "string",
"maxLength": 10,
"nullable": true,
"example": "45678"
},
"itemNumber": {
"type": "integer",
"format": "int32",
"nullable": true,
"example": "2"
},
"required": [
"documentNumber"
],
},
"Taxes": {
"title": "Taxes",
"type": "object",
"properties": {
"percentage": {
"anyOf": [
"type": "number",
"format": "decimal",
"multipleOf": 0.000001
},
"type": "string"
}
],
"example": "19.6",
"x-sap-precision": 22,
"x-sap-scale": 6,
"nullable": true,
},
"currency": {
"type": "string",
"maxLength": 3,
"nullable": true,
"example": "EUR"
},
"amount": {
"anyOf": [
"type": "number",
"format": "decimal",
"multipleOf": 0.000001
},
"type": "string"
],
"example": "57.20",
"x-sap-precision": 22,
"x-sap-scale": 6,
"nullable": true,
"description": "Tax amount"
},
"description": {
"type": "string",
"maxLength": 5000,
"nullable": true,
},
"required": [
"id"
],
"example": {
"percentage": "19.6",
"currency": "EUR",
"amount": "120.50"
},
"TooManyRequestsError": {
"type": "object",
"required": [
"error"
],
"additionalProperties": {
"$ref": "#/components/schemas/error"
},
"example": {
"error": {
},
"UnauthorizedError": {
"type": "object",
"required": [
"error"
],
"additionalProperties": {
"$ref": "#/components/schemas/error"
},
"example": {
"error": {
"message": "Unauthorized."
},
"responses": {
"error": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
}
},
"BadRequestError": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
},
"UnauthorizedError": {
"description": "Unauthorized.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
},
"ForbiddenError": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
},
"ConflictError": {
"description": "Conflict.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
},
"PayloadTooLargeError": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
},
"UnsupportedMediaTypeError": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
},
"TooManyRequestsError": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
},
"InternalServerError": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/error"
},
"securitySchemes": {
"OAuth2": {
"type": "oauth2",
"flows": {
"clientCredentials": {
"tokenUrl":
"https://{subdomain}.authentication.eu10.hana.ondemand.com/oauth/tok
en",
"scopes": {
},
"x-sap-api-type": "REST"